RESOLVED FIXED123379
Change WebPage, WebPageProxy, WebPageCreationParameters to use ViewState
https://bugs.webkit.org/show_bug.cgi?id=123379
Summary Change WebPage, WebPageProxy, WebPageCreationParameters to use ViewState
Gavin Barraclough
Reported 2013-10-25 18:01:15 PDT
Remove individual visibility flags from WebPageProxy, WebPageCreationParameters, and replace them with a ViewState. This way we can pass a consistent visibility state from the UIProcess to the WebProcess. Restructure WebPageProxy::viewStateDidChange to break the operation down into three steps: 1) Update the m_viewState member in the WebPageProxy 2) Send any messages to the WebPage to communicate state changes 3) Perform any further work necessary in the UIProcess. (In a following patch we'll merge the messages in step 2).
Attachments
Fix (18.11 KB, patch)
2013-10-25 18:12 PDT, Gavin Barraclough
no flags
style fix (18.10 KB, patch)
2013-10-25 18:16 PDT, Gavin Barraclough
eflews.bot: commit-queue-
Fix (21.75 KB, patch)
2013-10-28 09:01 PDT, Gavin Barraclough
darin: review+
buildbot: commit-queue-
Archive of layout-test-results from webkit-ews-13 for mac-mountainlion-wk2 (442.98 KB, application/zip)
2013-10-28 09:52 PDT, Build Bot
no flags
Gavin Barraclough
Comment 1 2013-10-25 18:12:27 PDT
WebKit Commit Bot
Comment 2 2013-10-25 18:14:00 PDT
Attachment 215233 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit2/ChangeLog', u'Source/WebKit2/Shared/ViewState.h', u'Source/WebKit2/Shared/WebPageCreationParameters.cpp', u'Source/WebKit2/Shared/WebPageCreationParameters.h', u'Source/WebKit2/UIProcess/WebPageProxy.cpp', u'Source/WebKit2/UIProcess/WebPageProxy.h', u'Source/WebKit2/WebProcess/WebPage/WebPage.cpp', u'Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm']" exit_code: 1 Source/WebKit2/Shared/WebPageCreationParameters.h:31: "SessionState.h" already included at Source/WebKit2/Shared/WebPageCreationParameters.h:30 [build/include] [4] Total errors found: 1 in 8 files If any of these errors are false positives, please file a bug against check-webkit-style.
Gavin Barraclough
Comment 3 2013-10-25 18:16:06 PDT
Created attachment 215234 [details] style fix
EFL EWS Bot
Comment 4 2013-10-25 18:23:56 PDT
Comment on attachment 215234 [details] style fix Attachment 215234 [details] did not pass efl-wk2-ews (efl-wk2): Output: http://webkit-queues.appspot.com/results/13328004
Gavin Barraclough
Comment 5 2013-10-28 09:01:23 PDT
WebKit Commit Bot
Comment 6 2013-10-28 09:02:51 PDT
Attachment 215311 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit2/ChangeLog', u'Source/WebKit2/Shared/ViewState.h', u'Source/WebKit2/Shared/WebPageCreationParameters.cpp', u'Source/WebKit2/Shared/WebPageCreationParameters.h', u'Source/WebKit2/UIProcess/WebPageProxy.cpp', u'Source/WebKit2/UIProcess/WebPageProxy.h', u'Source/WebKit2/WebProcess/WebPage/WebPage.cpp', u'Source/WebKit2/WebProcess/WebPage/WebPage.h', u'Source/WebKit2/WebProcess/WebPage/WebPage.messages.in', u'Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm']" exit_code: 1 Source/WebKit2/WebProcess/WebPage/WebPage.h:687: The parameter name "isInWindow" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 1 in 10 files If any of these errors are false positives, please file a bug against check-webkit-style.
Darin Adler
Comment 7 2013-10-28 09:18:06 PDT
Comment on attachment 215311 [details] Fix View in context: https://bugs.webkit.org/attachment.cgi?id=215311&action=review > Source/WebKit2/Shared/ViewState.h:42 > + static const Flags Reset = 0; Maybe NoFlags would be a better name than Reset? > Source/WebKit2/UIProcess/WebPageProxy.h:755 > + void updateViewState(ViewState::Flags = ViewState::AllFlags); The purpose of this argument is not entirely clear. I suggest naming it something like flagsToUpdate. >> Source/WebKit2/WebProcess/WebPage/WebPage.h:687 >> + void setIsInWindow(bool isInWindow); > > The parameter name "isInWindow" adds no information, so it should be removed. [readability/parameter_name] [5] I agree with the style bot; better to omit this name.
Build Bot
Comment 8 2013-10-28 09:51:59 PDT
Comment on attachment 215311 [details] Fix Attachment 215311 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/12448066 New failing tests: fast/dom/Window/mozilla-focus-blur.html
Build Bot
Comment 9 2013-10-28 09:52:01 PDT
Created attachment 215315 [details] Archive of layout-test-results from webkit-ews-13 for mac-mountainlion-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: webkit-ews-13 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.5
Geoffrey Garen
Comment 10 2013-10-28 09:56:23 PDT
> New failing tests: > fast/dom/Window/mozilla-focus-blur.html Is this test failure real? Seems like blur could be related to changes in view state.
Sergio Correia (qrwteyrutiyoup)
Comment 11 2013-10-28 10:13:52 PDT
Hi Gavin, If you wish to fix the GTK/EFK build prior to landing, just replace m_isPaintingSuspended(!parameters.isVisible) with m_isPaintingSuspended(!(parameters.viewState & ViewState::IsVisible)) in both WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:63 and WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp:60, similar to your change in TiledCoreAnimationDrawingArea.mm.
EFL EWS Bot
Comment 12 2013-10-28 10:30:39 PDT
Gavin Barraclough
Comment 13 2013-10-28 10:38:37 PDT
(In reply to comment #10) > > New failing tests: > > fast/dom/Window/mozilla-focus-blur.html > > Is this test failure real? Seems like blur could be related to changes in view state. This test is passing for me locally. :-/
Gavin Barraclough
Comment 14 2013-10-28 10:40:38 PDT
(In reply to comment #11) > Hi Gavin, > > If you wish to fix the GTK/EFK build prior to landing, just replace m_isPaintingSuspended(!parameters.isVisible) with m_isPaintingSuspended(!(parameters.viewState & ViewState::IsVisible)) in both > > WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:63 and > WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp:60, > > similar to your change in TiledCoreAnimationDrawingArea.mm. Done!
Gavin Barraclough
Comment 15 2013-10-31 11:05:31 PDT
Fixed in r158372
Note You need to log in before you can comment on or make changes to this bug.