Changeset 158369 in webkit
- Timestamp:
- Oct 31, 2013 10:48:33 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r158362 r158369 1 2013-10-30 Gavin Barraclough <barraclough@apple.com> 2 3 WebPageCreationParameters should be consistent in Window.open 4 https://bugs.webkit.org/show_bug.cgi?id=123557 5 6 Reviewed by Sam Weinig. 7 8 When Window.open in called in WebKit2 the WebProcess sends a synchronous request to open 9 a page (WebPageProxy::createNewPage). The UIProcess creates a WebpageProxy, and responds 10 with instructions to the WebProcess to create the WebPage. The initial creation state of 11 the WebPage is communicated to the WebProcess via two routes (firstly an asynchronous 12 WebProcess::CreateWebPage message, and secondly in the synchronous response from 13 WebPageProxy::createNewPage). Unfortunately these responses are inconsistent with each 14 other. The creationParameters() for the page are calculated twice, and since the WKView 15 will be added to a window between the async message being sent and the synchronous reply 16 being returned the visibility state of the page can change. 17 18 To fix the inconsistency we can set the creation parameters at the point that the 19 WebPageProxy is instantiated. This will result in a functional change that is web 20 visible, since the page will initially be opened in a hidden/blurred state, and may 21 later become visible/focussed. This change is consistent with the direction we want to 22 evolve in. Whilst we will still probably require a synchronous message from the 23 WebProcess to the UIProcess on Window.open, we'll probably make this return much earlier 24 – having just created the WebPageProxy, but avoiding blocking the WebProcess over the 25 client delegate callback that opens the new window. 26 27 This fix results in a layout test result change, due to the change in behavior (page is 28 created blurred, and becomes focussed, resulting in a focus event being fired – rather 29 than the window opening directly into a focussed state). This is reported as a 30 progression (test is broken in WebKit1, fixed in WebKit2 after this change). In reality 31 the test is actually slightly broken in DRT/test-runner – the test runs differently than 32 in browser, since there is is no visible main window. In-browser this patch results in 33 no change in behavior on dom/Window/mozilla-focus-blur.html (the affected test). 34 35 * platform/mac-wk2/fast/dom/Window: Added. 36 * platform/mac-wk2/fast/dom/Window/mozilla-focus-blur-expected.txt: Added. 37 - This test now reports a pass on WebKit2 38 1 39 2013-10-31 Alexey Proskuryakov <ap@apple.com> 2 40 -
trunk/Source/WebKit2/ChangeLog
r158360 r158369 1 2013-10-30 Gavin Barraclough <barraclough@apple.com> 2 3 WebPageCreationParameters should be consistent in Window.open 4 https://bugs.webkit.org/show_bug.cgi?id=123557 5 6 Reviewed by Sam Weinig. 7 8 When Window.open in called in WebKit2 the WebProcess sends a synchronous request to open 9 a page (WebPageProxy::createNewPage). The UIProcess creates a WebpageProxy, and responds 10 with instructions to the WebProcess to create the WebPage. The initial creation state of 11 the WebPage is communicated to the WebProcess via two routes (firstly an asynchronous 12 WebProcess::CreateWebPage message, and secondly in the synchronous response from 13 WebPageProxy::createNewPage). Unfortunately these responses are inconsistent with each 14 other. The creationParameters() for the page are calculated twice, and since the WKView 15 will be added to a window between the async message being sent and the synchronous reply 16 being returned the visibility state of the page can change. 17 18 To fix the inconsistency we can set the creation parameters at the point that the 19 WebPageProxy is instantiated. This will result in a functional change that is web 20 visible, since the page will initially be opened in a hidden/blurred state, and may 21 later become visible/focussed. This change is consistent with the direction we want to 22 evolve in. Whilst we will still probably require a synchronous message from the 23 WebProcess to the UIProcess on Window.open, we'll probably make this return much earlier 24 – having just created the WebPageProxy, but avoiding blocking the WebProcess over the 25 client delegate callback that opens the new window. 26 27 This fix results in a layout test result change, due to the change in behavior (page is 28 created blurred, and becomes focussed, resulting in a focus event being fired – rather 29 than the window opening directly into a focussed state). This is reported as a 30 progression (test is broken in WebKit1, fixed in WebKit2 after this change). In reality 31 the test is actually slightly broken in DRT/test-runner – the test runs differently than 32 in browser, since there is is no visible main window. In-browser this patch results in 33 no change in behavior on dom/Window/mozilla-focus-blur.html (the affected test). 34 35 * UIProcess/WebPageProxy.cpp: 36 (WebKit::WebPageProxy::initializeWebPage): 37 - call initializeCreationParameters 38 (WebKit::WebPageProxy::initializeCreationParameters): 39 - calculate m_creationParameters 40 * UIProcess/WebPageProxy.h: 41 (WebKit::WebPageProxy::creationParameters): 42 - Added m_creationParameters, initializeCreationParameters, 43 creationParameters returns m_creationParameters 44 1 45 2013-10-31 Philippe Normand <pnormand@igalia.com> 2 46 -
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
r158034 r158369 523 523 #endif 524 524 525 m_process->send(Messages::WebProcess::CreateWebPage(m_pageID, creationParameters()), 0); 525 initializeCreationParameters(); 526 m_process->send(Messages::WebProcess::CreateWebPage(m_pageID, m_creationParameters), 0); 526 527 527 528 #if ENABLE(PAGE_VISIBILITY_API) … … 3833 3834 } 3834 3835 3835 WebPageCreationParameters WebPageProxy::creationParameters() const 3836 { 3837 WebPageCreationParameters parameters; 3838 3839 parameters.viewSize = m_pageClient->viewSize(); 3840 parameters.isActive = m_pageClient->isViewWindowActive(); 3841 parameters.isFocused = m_pageClient->isViewFocused(); 3842 parameters.isVisible = m_pageClient->isViewVisible(); 3843 parameters.isInWindow = m_pageClient->isViewInWindow(); 3844 parameters.drawingAreaType = m_drawingArea->type(); 3845 parameters.store = m_pageGroup->preferences()->store(); 3846 parameters.pageGroupData = m_pageGroup->data(); 3847 parameters.drawsBackground = m_drawsBackground; 3848 parameters.drawsTransparentBackground = m_drawsTransparentBackground; 3849 parameters.underlayColor = m_underlayColor; 3850 parameters.areMemoryCacheClientCallsEnabled = m_areMemoryCacheClientCallsEnabled; 3851 parameters.useFixedLayout = m_useFixedLayout; 3852 parameters.fixedLayoutSize = m_fixedLayoutSize; 3853 parameters.suppressScrollbarAnimations = m_suppressScrollbarAnimations; 3854 parameters.paginationMode = m_paginationMode; 3855 parameters.paginationBehavesLikeColumns = m_paginationBehavesLikeColumns; 3856 parameters.pageLength = m_pageLength; 3857 parameters.gapBetweenPages = m_gapBetweenPages; 3858 parameters.userAgent = userAgent(); 3859 parameters.sessionState = SessionState(m_backForwardList->entries(), m_backForwardList->currentIndex()); 3860 parameters.highestUsedBackForwardItemID = WebBackForwardListItem::highedUsedItemID(); 3861 parameters.canRunBeforeUnloadConfirmPanel = m_uiClient.canRunBeforeUnloadConfirmPanel(); 3862 parameters.canRunModal = m_canRunModal; 3863 parameters.deviceScaleFactor = deviceScaleFactor(); 3864 parameters.mediaVolume = m_mediaVolume; 3865 parameters.mayStartMediaWhenInWindow = m_mayStartMediaWhenInWindow; 3866 parameters.minimumLayoutSize = m_minimumLayoutSize; 3867 parameters.autoSizingShouldExpandToViewHeight = m_autoSizingShouldExpandToViewHeight; 3868 parameters.scrollPinningBehavior = m_scrollPinningBehavior; 3836 void WebPageProxy::initializeCreationParameters() 3837 { 3838 m_creationParameters.viewSize = m_pageClient->viewSize(); 3839 m_creationParameters.isActive = m_pageClient->isViewWindowActive(); 3840 m_creationParameters.isFocused = m_pageClient->isViewFocused(); 3841 m_creationParameters.isVisible = m_pageClient->isViewVisible(); 3842 m_creationParameters.isInWindow = m_pageClient->isViewInWindow(); 3843 m_creationParameters.drawingAreaType = m_drawingArea->type(); 3844 m_creationParameters.store = m_pageGroup->preferences()->store(); 3845 m_creationParameters.pageGroupData = m_pageGroup->data(); 3846 m_creationParameters.drawsBackground = m_drawsBackground; 3847 m_creationParameters.drawsTransparentBackground = m_drawsTransparentBackground; 3848 m_creationParameters.underlayColor = m_underlayColor; 3849 m_creationParameters.areMemoryCacheClientCallsEnabled = m_areMemoryCacheClientCallsEnabled; 3850 m_creationParameters.useFixedLayout = m_useFixedLayout; 3851 m_creationParameters.fixedLayoutSize = m_fixedLayoutSize; 3852 m_creationParameters.suppressScrollbarAnimations = m_suppressScrollbarAnimations; 3853 m_creationParameters.paginationMode = m_paginationMode; 3854 m_creationParameters.paginationBehavesLikeColumns = m_paginationBehavesLikeColumns; 3855 m_creationParameters.pageLength = m_pageLength; 3856 m_creationParameters.gapBetweenPages = m_gapBetweenPages; 3857 m_creationParameters.userAgent = userAgent(); 3858 m_creationParameters.sessionState = SessionState(m_backForwardList->entries(), m_backForwardList->currentIndex()); 3859 m_creationParameters.highestUsedBackForwardItemID = WebBackForwardListItem::highedUsedItemID(); 3860 m_creationParameters.canRunBeforeUnloadConfirmPanel = m_uiClient.canRunBeforeUnloadConfirmPanel(); 3861 m_creationParameters.canRunModal = m_canRunModal; 3862 m_creationParameters.deviceScaleFactor = deviceScaleFactor(); 3863 m_creationParameters.mediaVolume = m_mediaVolume; 3864 m_creationParameters.mayStartMediaWhenInWindow = m_mayStartMediaWhenInWindow; 3865 m_creationParameters.minimumLayoutSize = m_minimumLayoutSize; 3866 m_creationParameters.autoSizingShouldExpandToViewHeight = m_autoSizingShouldExpandToViewHeight; 3867 m_creationParameters.scrollPinningBehavior = m_scrollPinningBehavior; 3869 3868 3870 3869 #if PLATFORM(MAC) 3871 parameters.layerHostingMode = m_layerHostingMode; 3872 parameters.colorSpace = m_pageClient->colorSpace(); 3873 #endif 3874 3875 return parameters; 3870 m_creationParameters.layerHostingMode = m_layerHostingMode; 3871 m_creationParameters.colorSpace = m_pageClient->colorSpace(); 3872 #endif 3876 3873 } 3877 3874 -
trunk/Source/WebKit2/UIProcess/WebPageProxy.h
r158034 r158369 51 51 #include "WebLoaderClient.h" 52 52 #include "WebPageContextMenuClient.h" 53 #include "WebPageCreationParameters.h" 53 54 #include <WebCore/AlternativeTextClient.h> // FIXME: Needed by WebPageProxyMessages.h for DICTATION_ALTERNATIVES. 54 55 #include "WebPageProxyMessages.h" … … 149 150 struct PlatformPopupMenuData; 150 151 struct PrintInfo; 151 struct WebPageCreationParameters;152 152 struct WebPopupItem; 153 153 … … 629 629 void didCancelForOpenPanel(); 630 630 631 WebPageCreationParameters creationParameters() const; 631 WebPageCreationParameters creationParameters() const 632 { 633 return m_creationParameters; 634 } 632 635 633 636 #if USE(COORDINATED_GRAPHICS) … … 752 755 WebPageProxy(PageClient*, PassRefPtr<WebProcessProxy>, WebPageGroup*, uint64_t pageID); 753 756 void platformInitialize(); 757 void initializeCreationParameters(); 754 758 755 759 void resetState(); … … 1247 1251 1248 1252 WebCore::ScrollPinningBehavior m_scrollPinningBehavior; 1253 1254 WebPageCreationParameters m_creationParameters; 1249 1255 }; 1250 1256
Note: See TracChangeset
for help on using the changeset viewer.