[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.22-985-g3c00f00
beidson at apple.com
beidson at apple.com
Wed Mar 17 17:57:48 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit b23a7b60bbb27c2515029759c6e0649bf3c64825
Author: beidson at apple.com <beidson at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Feb 23 22:39:06 2010 +0000
Regression (r55107) - WebInspector docking is busted.
https://bugs.webkit.org/show_bug.cgi?id=35274
Reviewed by Tim Hatcher and Pavel Feldman.
WebCore:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::canAttachWindow): Use the minimum height for this calculation,
not the preferred height.
(WebCore::InspectorController::attachWindow): attachWindow() shouldn't decide the policy, as it is
often called partway through the show or dock procedure after some of the initial conditions have
changed. Let the front-end itself and the InspectorClient's make the policy decision at the start
of the show/dock operation.
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::canAttachWindow):
* inspector/InspectorFrontendHost.h:
* inspector/InspectorFrontendHost.idl:
* inspector/front-end/inspector.js:
(WebInspector.toggleAttach): Before attaching, ask the front-end-host if attaching is allowed.
WebKit/mac:
* WebCoreSupport/WebInspectorClient.mm:
(-[WebInspectorWindowController showWindow:]): Swap the order of the "should attach?" check
to get the expected behavior.
WebKit/win:
* WebCoreSupport/WebInspectorClient.cpp:
(WebInspectorClient::showWindowWithoutNotifications): Swap the order of the "should attach?" check
to get the expected behavior.
LayoutTests:
* inspector/timeline-event-dispatch.html: Actually click in the right place now that the
inspector isn't docked anymore.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55172 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 4f10389..ed01ea2 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-02-23 Brady Eidson <beidson at apple.com>
+
+ Reviewed by Tim Hatcher and Pavel Feldman.
+
+ Regression (r55107) - WebInspector docking is busted.
+ https://bugs.webkit.org/show_bug.cgi?id=35274
+
+ * inspector/timeline-event-dispatch.html: Actually click in the right place now that the
+ inspector isn't docked anymore.
+
2010-02-23 Enrica Casucci <enrica at apple.com>
Reviewed by Darin Adler.
diff --git a/LayoutTests/inspector/timeline-event-dispatch.html b/LayoutTests/inspector/timeline-event-dispatch.html
index 203d2b0..d01e93b 100644
--- a/LayoutTests/inspector/timeline-event-dispatch.html
+++ b/LayoutTests/inspector/timeline-event-dispatch.html
@@ -16,10 +16,11 @@ function doit()
var target = document.getElementById("testTarget");
target.addEventListener("mousedown", handleMouseDown, true);
+ var rect = target.getBoundingClientRect();
// Simulate the mouse down over the target to trigger an EventDispatch
if (window.eventSender) {
- window.eventSender.mouseMoveTo(200, 300);
+ window.eventSender.mouseMoveTo(rect.left + rect.width / 2, rect.top + rect.height / 2);
window.eventSender.mouseDown();
}
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 29d32bb..cd85ac2 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,26 @@
+2010-02-23 Brady Eidson <beidson at apple.com>
+
+ Reviewed by Tim Hatcher and Pavel Feldman.
+
+ Regression (r55107) - WebInspector docking is busted.
+ https://bugs.webkit.org/show_bug.cgi?id=35274
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::canAttachWindow): Use the minimum height for this calculation,
+ not the preferred height.
+ (WebCore::InspectorController::attachWindow): attachWindow() shouldn't decide the policy, as it is
+ often called partway through the show or dock procedure after some of the initial conditions have
+ changed. Let the front-end itself and the InspectorClient's make the policy decision at the start
+ of the show/dock operation.
+
+ * inspector/InspectorFrontendHost.cpp:
+ (WebCore::InspectorFrontendHost::canAttachWindow):
+ * inspector/InspectorFrontendHost.h:
+ * inspector/InspectorFrontendHost.idl:
+
+ * inspector/front-end/inspector.js:
+ (WebInspector.toggleAttach): Before attaching, ask the front-end-host if attaching is allowed.
+
2010-02-23 Mark Rowe <mrowe at apple.com>
Reviewed by Geoff Garen.
diff --git a/WebCore/inspector/InspectorController.cpp b/WebCore/inspector/InspectorController.cpp
index 13dc517..e329929 100644
--- a/WebCore/inspector/InspectorController.cpp
+++ b/WebCore/inspector/InspectorController.cpp
@@ -415,16 +415,11 @@ bool InspectorController::canAttachWindow() const
{
if (!enabled())
return false;
-
- String attachedHeight = setting(inspectorAttachedHeightName);
- bool success = true;
- int height = attachedHeight.toInt(&success);
- unsigned preferredHeight = success ? height : defaultAttachedHeight;
unsigned inspectedPageHeight = m_inspectedPage->mainFrame()->view()->visibleHeight();
- // Don't allow the attach if the window is too small to respect what should be the minimum inspector height.
- return preferredHeight <= inspectedPageHeight * maximumAttachedHeightRatio;
+ // Don't allow the attach if the window would be too small to accommodate the minimum inspector height.
+ return minimumAttachedHeight <= inspectedPageHeight * maximumAttachedHeightRatio;
}
void InspectorController::attachWindow()
@@ -438,10 +433,6 @@ void InspectorController::attachWindow()
bool success = true;
int height = attachedHeight.toInt(&success);
unsigned preferredHeight = success ? height : defaultAttachedHeight;
-
- // Don't allow the attach if the window is too small to respect what should be the minimum inspector height.
- if (preferredHeight > inspectedPageHeight * maximumAttachedHeightRatio)
- return;
m_client->attachWindow();
diff --git a/WebCore/inspector/InspectorFrontendHost.cpp b/WebCore/inspector/InspectorFrontendHost.cpp
index 1aeb1d7..c1a1761 100644
--- a/WebCore/inspector/InspectorFrontendHost.cpp
+++ b/WebCore/inspector/InspectorFrontendHost.cpp
@@ -96,6 +96,13 @@ void InspectorFrontendHost::windowUnloading()
m_inspectorController->close();
}
+bool InspectorFrontendHost::canAttachWindow() const
+{
+ if (m_inspectorController)
+ return m_inspectorController->canAttachWindow();
+ return false;
+}
+
void InspectorFrontendHost::setAttachedWindowHeight(unsigned height)
{
if (m_inspectorController)
diff --git a/WebCore/inspector/InspectorFrontendHost.h b/WebCore/inspector/InspectorFrontendHost.h
index 390b018..cbe6a9b 100644
--- a/WebCore/inspector/InspectorFrontendHost.h
+++ b/WebCore/inspector/InspectorFrontendHost.h
@@ -65,6 +65,7 @@ public:
void closeWindow();
void windowUnloading();
+ bool canAttachWindow() const;
void setAttachedWindowHeight(unsigned height);
void moveWindowBy(float x, float y) const;
diff --git a/WebCore/inspector/InspectorFrontendHost.idl b/WebCore/inspector/InspectorFrontendHost.idl
index 9de49c1..150e9fc 100644
--- a/WebCore/inspector/InspectorFrontendHost.idl
+++ b/WebCore/inspector/InspectorFrontendHost.idl
@@ -38,6 +38,7 @@ module core {
void closeWindow();
void windowUnloading();
+ boolean canAttachWindow();
void setAttachedWindowHeight(in unsigned long height);
void moveWindowBy(in float x, in float y);
diff --git a/WebCore/inspector/front-end/inspector.js b/WebCore/inspector/front-end/inspector.js
index 8195833..8a036da 100644
--- a/WebCore/inspector/front-end/inspector.js
+++ b/WebCore/inspector/front-end/inspector.js
@@ -885,6 +885,9 @@ WebInspector.focusSearchField = function()
WebInspector.toggleAttach = function()
{
+ if (!this.attached && InspectorFrontendHost.canAttachWindow && !InspectorFrontendHost.canAttachWindow())
+ return;
+
this.attached = !this.attached;
this.drawer.resize();
}
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index 9119ca2..5c499b1 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,14 @@
+2010-02-23 Brady Eidson <beidson at apple.com>
+
+ Reviewed by Tim Hatcher and Pavel Feldman.
+
+ Regression (r55107) - WebInspector docking is busted.
+ https://bugs.webkit.org/show_bug.cgi?id=35274
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ (-[WebInspectorWindowController showWindow:]): Swap the order of the "should attach?" check
+ to get the expected behavior.
+
2010-02-23 Dan Bernstein <mitz at apple.com>
Reviewed by Simon Fraser.
diff --git a/WebKit/mac/WebCoreSupport/WebInspectorClient.mm b/WebKit/mac/WebCoreSupport/WebInspectorClient.mm
index f6c7603..8b51566 100644
--- a/WebKit/mac/WebCoreSupport/WebInspectorClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebInspectorClient.mm
@@ -326,14 +326,12 @@ void WebInspectorClient::inspectorWindowObjectCleared()
_visible = YES;
- if (![_inspectedWebView page]->inspectorController()->canAttachWindow())
- _shouldAttach = NO;
+ // If no preference is set - default to an attached window. This is important for inspector LayoutTests.
+ String shouldAttach = [_inspectedWebView page]->inspectorController()->setting(inspectorStartsAttachedName);
+ _shouldAttach = shouldAttach != "false";
- if (_shouldAttach) {
- // If no preference is set - default to an attached window. This is important for inspector LayoutTests.
- String shouldAttach = [_inspectedWebView page]->inspectorController()->setting(inspectorStartsAttachedName);
- _shouldAttach = shouldAttach != "false";
- }
+ if (_shouldAttach && ![_inspectedWebView page]->inspectorController()->canAttachWindow())
+ _shouldAttach = NO;
if (_shouldAttach) {
WebFrameView *frameView = [[_inspectedWebView mainFrame] frameView];
diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog
index 7a13504..76b1450 100644
--- a/WebKit/win/ChangeLog
+++ b/WebKit/win/ChangeLog
@@ -1,3 +1,14 @@
+2010-02-23 Brady Eidson <beidson at apple.com>
+
+ Reviewed by Tim Hatcher and Pavel Feldman.
+
+ Regression (r55107) - WebInspector docking is busted.
+ https://bugs.webkit.org/show_bug.cgi?id=35274
+
+ * WebCoreSupport/WebInspectorClient.cpp:
+ (WebInspectorClient::showWindowWithoutNotifications): Swap the order of the "should attach?" check
+ to get the expected behavior.
+
2010-02-23 Steve Block <steveblock at google.com>
Reviewed by Darin Adler.
diff --git a/WebKit/win/WebCoreSupport/WebInspectorClient.cpp b/WebKit/win/WebCoreSupport/WebInspectorClient.cpp
index 2b0ba3f..14e6e10 100644
--- a/WebKit/win/WebCoreSupport/WebInspectorClient.cpp
+++ b/WebKit/win/WebCoreSupport/WebInspectorClient.cpp
@@ -349,15 +349,13 @@ void WebInspectorClient::showWindowWithoutNotifications()
ASSERT(m_webView);
ASSERT(m_inspectedWebViewHwnd);
- if (!m_inspectedWebView->page()->inspectorController()->canAttachWindow())
+ // If no preference is set - default to an attached window. This is important for inspector LayoutTests.
+ String shouldAttach = m_inspectedWebView->page()->inspectorController()->setting(inspectorStartsAttachedName);
+ m_shouldAttachWhenShown = shouldAttach != "false";
+
+ if (m_shouldAttachWhenShown && !m_inspectedWebView->page()->inspectorController()->canAttachWindow())
m_shouldAttachWhenShown = false;
- if (m_shouldAttachWhenShown) {
- // If no preference is set - default to an attached window. This is important for inspector LayoutTests.
- String shouldAttach = m_inspectedWebView->page()->inspectorController()->setting(inspectorStartsAttachedName);
- m_shouldAttachWhenShown = shouldAttach != "false";
- }
-
if (!m_shouldAttachWhenShown) {
// Put the Inspector's WebView inside our window and show it.
m_webView->setHostWindow(reinterpret_cast<OLE_HANDLE>(m_hwnd));
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list