Changeset 107362 in webkit
- Timestamp:
- Feb 9, 2012, 10:23:49 PM (15 years ago)
- Location:
- trunk/Source
- Files:
-
- 5 edited
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/inspector/InspectorFrontendClientLocal.cpp (modified) (1 diff)
-
WebKit2/ChangeLog (modified) (1 diff)
-
WebKit2/UIProcess/WebInspectorProxy.cpp (modified) (1 diff)
-
WebKit2/UIProcess/WebInspectorProxy.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r107360 r107362 1 2012-02-09 Timothy Hatcher <timothy@apple.com> 2 3 Prevent attaching when inspecting the Web Inspector. 4 5 https://webkit.org/b/78304 6 7 Reviewed by Brian Weinstein. 8 9 * inspector/InspectorFrontendClientLocal.cpp: 10 (WebCore::InspectorFrontendClientLocal::canAttachWindow): Prevent attaching when the page is an inspector page. 11 1 12 2012-02-09 Dana Jansens <danakj@chromium.org> 2 13 -
trunk/Source/WebCore/inspector/InspectorFrontendClientLocal.cpp
r105600 r107362 160 160 bool InspectorFrontendClientLocal::canAttachWindow() 161 161 { 162 // Don't allow the attach if the window would be too small to accommodate the minimum inspector height. 163 // Also don't allow attaching to another inspector -- two inspectors in one window is too much! 164 bool isInspectorPage = m_inspectorController->inspectedPage()->inspectorController()->hasInspectorFrontendClient(); 162 165 unsigned inspectedPageHeight = m_inspectorController->inspectedPage()->mainFrame()->view()->visibleHeight(); 163 164 // Don't allow the attach if the window would be too small to accommodate the minimum inspector height. 165 return minimumAttachedHeight <= inspectedPageHeight * maximumAttachedHeightRatio; 166 unsigned maximumAttachedHeight = inspectedPageHeight * maximumAttachedHeightRatio; 167 return minimumAttachedHeight <= maximumAttachedHeight && !isInspectorPage; 166 168 } 167 169 -
trunk/Source/WebKit2/ChangeLog
r107359 r107362 1 2012-02-09 Timothy Hatcher <timothy@apple.com> 2 3 Prevent attaching when inspecting the Web Inspector. 4 5 Also adds some comments about keeping in sync with InspectorFrontendClientLocal::canAttachWindow 6 and why there are two implementations of the same function. 7 8 https://webkit.org/b/78304 9 10 Reviewed by Brian Weinstein. 11 12 * UIProcess/WebInspectorProxy.cpp: 13 (WebKit::WebInspectorProxy::canAttach): Prevent attaching when the page is an inspector page. 14 Added comments about InspectorFrontendClientLocal::canAttachWindow. 15 * UIProcess/WebInspectorProxy.h: 16 (WebInspectorProxy): Added comment about keeping in sync with InspectorFrontendClientLocal. 17 1 18 2012-02-09 Alexey Proskuryakov <ap@apple.com> 2 19 -
trunk/Source/WebKit2/UIProcess/WebInspectorProxy.cpp
r107028 r107362 261 261 bool WebInspectorProxy::canAttach() 262 262 { 263 unsigned inspectedWindowHeight = platformInspectedWindowHeight(); 264 return inspectedWindowHeight && minimumAttachedHeight <= (inspectedWindowHeight * 3 / 4); 263 // Keep this in sync with InspectorFrontendClientLocal::canAttachWindow. There are two implementations 264 // to make life easier in the multi-process world we have. WebInspectorProxy uses canAttach to decide if 265 // we can attach on open (on the UI process side). And InspectorFrontendClientLocal::canAttachWindow is 266 // used to decide if we can attach when the attach button is pressed (on the WebProcess side). 267 268 // Don't allow the attach if the window would be too small to accommodate the minimum inspector height. 269 // Also don't allow attaching to another inspector -- two inspectors in one window is too much! 270 bool isInspectorPage = m_page->pageGroup() == inspectorPageGroup(); 271 unsigned inspectedPageHeight = platformInspectedWindowHeight(); 272 unsigned maximumAttachedHeight = inspectedPageHeight * 3 / 4; 273 return minimumAttachedHeight <= maximumAttachedHeight && !isInspectorPage; 265 274 } 266 275 -
trunk/Source/WebKit2/UIProcess/WebInspectorProxy.h
r107028 r107362 165 165 static const unsigned initialWindowWidth = 750; 166 166 static const unsigned initialWindowHeight = 650; 167 168 // Keep this in sync with the value in InspectorFrontendClientLocal. 167 169 static const unsigned minimumAttachedHeight = 250; 168 170
Note:
See TracChangeset
for help on using the changeset viewer.