WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
126356
Propagate WindowServer modifications state to WebProcess
https://bugs.webkit.org/show_bug.cgi?id=126356
Summary
Propagate WindowServer modifications state to WebProcess
Gavin Barraclough
Reported
2013-12-31 22:47:14 PST
This will be necessary to move control of process suppression to the WebProcess.
Attachments
Fix
(8.63 KB, patch)
2013-12-31 23:06 PST
,
Gavin Barraclough
eflews.bot
: commit-queue-
Details
Formatted Diff
Diff
GTK fix
(8.71 KB, patch)
2013-12-31 23:45 PST
,
Gavin Barraclough
sam
: review-
Details
Formatted Diff
Diff
WIP
(27.33 KB, patch)
2014-01-02 17:22 PST
,
Gavin Barraclough
no flags
Details
Formatted Diff
Diff
Fix
(30.94 KB, patch)
2014-01-02 17:53 PST
,
Gavin Barraclough
sam
: review+
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Gavin Barraclough
Comment 1
2013-12-31 23:06:02 PST
Created
attachment 220178
[details]
Fix
EFL EWS Bot
Comment 2
2013-12-31 23:10:53 PST
Comment on
attachment 220178
[details]
Fix
Attachment 220178
[details]
did not pass efl-wk2-ews (efl-wk2): Output:
http://webkit-queues.appspot.com/results/5880595670368256
Gavin Barraclough
Comment 3
2013-12-31 23:45:10 PST
Created
attachment 220182
[details]
GTK fix
Sam Weinig
Comment 4
2014-01-01 13:58:20 PST
Comment on
attachment 220182
[details]
GTK fix View in context:
https://bugs.webkit.org/attachment.cgi?id=220182&action=review
> Source/WebKit2/UIProcess/WebContext.h:304 > +#if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 > + void windowModificationsStateChanged(); > + static WindowModificationsState windowModificationsState(); > +#else > + static WindowModificationsState windowModificationsState() { return WindowModificationsStarted; } > +#endif
I don't get why something called WindowModificationsState would be on the WebContext (or static). "Window" level concepts should really a PageClient thing if possible.
> Source/WebKit2/UIProcess/mac/WebContextMac.mm:137 > + for (auto *context : contexts) {
* on the wrong side.
> Source/WebKit2/UIProcess/mac/WebProcessProxyMac.mm:85 > +void WebProcessProxy::windowModificationsStateChanged()
Even though this isn't currently used by other platforms, there isn't anything really mac specific about it. Can this just go in WebProcessProxy.cpp?
> Source/WebKit2/UIProcess/mac/WebProcessProxyMac.mm:88 > + for (WebPageProxyMap::iterator it = m_pageMap.begin(), end = m_pageMap.end(); it != end; ++it) > + it->value->viewStateDidChange(ViewState::IsModifying);
This can be written as: for (const auto& page : m_pageMap.values()) page->viewStateDidChange(ViewState::IsModifying);
Gavin Barraclough
Comment 5
2014-01-01 21:59:42 PST
(In reply to
comment #4
)
> (From update of
attachment 220182
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=220182&action=review
> > > Source/WebKit2/UIProcess/WebContext.h:304 > > +#if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 > > + void windowModificationsStateChanged(); > > + static WindowModificationsState windowModificationsState(); > > +#else > > + static WindowModificationsState windowModificationsState() { return WindowModificationsStarted; } > > +#endif > > I don't get why something called WindowModificationsState would be on the WebContext (or static). "Window" level concepts should really a PageClient thing if possible.
The WindowModifications state is not per window, as you might expect from the name – it is per WindowServer connection (i.e. process wide). The code registers a single handler, and then broadcasts the message out to all WebPageProxies. The alternative would be to redundantly register multiple handlers which would all be receiving exactly the same message, which seemed inefficient. It looked like the best way to find all WebPageProxies in existence was from the WebContext – the WebContext statically know all WebContexts in existence, which in turn can find all WebPageProxies, which in turn can find all WebPageProxies. Did I miss a more direct route?
> * on the wrong side. > > Even though this isn't currently used by other platforms, there isn't anything really mac specific about it. Can this just go in WebProcessProxy.cpp?
>
> This can be written as:
Yep, yep, yep - will fix.
Gavin Barraclough
Comment 6
2014-01-02 17:22:37 PST
Created
attachment 220269
[details]
WIP
Gavin Barraclough
Comment 7
2014-01-02 17:53:05 PST
Created
attachment 220275
[details]
Fix
Gavin Barraclough
Comment 8
2014-01-02 18:05:45 PST
Committed revision 161246.
Geoffrey Garen
Comment 9
2014-01-03 12:05:44 PST
Comment on
attachment 220275
[details]
Fix View in context:
https://bugs.webkit.org/attachment.cgi?id=220275&action=review
> Source/WebKit2/ChangeLog:11 > + WindowServer connection basis, and as such may produce (safe) false positives.
Did you mean "safe false negatives"? I don't think it's ever safe to falsely say that something is not visible to the user when in reality it is.
Gavin Barraclough
Comment 10
2014-01-03 23:41:40 PST
(In reply to
comment #9
)
> (From update of
attachment 220275
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=220275&action=review
> > > Source/WebKit2/ChangeLog:11 > > + WindowServer connection basis, and as such may produce (safe) false positives. > > Did you mean "safe false negatives"? I don't think it's ever safe to falsely say that something is not visible to the user when in reality it is.
Ugh, yes you're right, this is now "safe false negatives" – the comment reflects the initial implementation. The flag was inverted – in the former version of the patch the value was called "IsModifying", which meant !IsVisuallyIdle – and as such we would sometimes produce safe false positives.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug