Bug 131353

Summary: Unify and factor out page overlay implementations
Product: WebKit Reporter: Tim Horton <thorton>
Component: WebKit2Assignee: Tim Horton <thorton>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, commit-queue, koivisto, mitz, ossy, sam, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 131425    
Bug Blocks:    
Attachments:
Description Flags
WIP
none
patch
none
found more code to delete
none
rebase
none
rebasex2
andersca: review+
fix a tiny bug andersca: review+

Description Tim Horton 2014-04-08 02:24:38 PDT
There's no reason (as far as I can tell) to reimplement straightforward and platform-independent page overlay functionality in various places, and there's no reason for it to be scattered all over DrawingArea and WebPage.
Comment 1 Tim Horton 2014-04-08 03:04:56 PDT
Created attachment 228823 [details]
WIP
Comment 2 WebKit Commit Bot 2014-04-08 03:05:35 PDT
Attachment 228823 [details] did not pass style-queue:


ERROR: Source/WebKit2/WebProcess/WebPage/WebPage.h:45:  Alphabetical sorting problem.  [build/include_order] [4]
ERROR: Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:1222:  Should have a space between // and comment  [whitespace/comments] [4]
Total errors found: 2 in 17 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Tim Horton 2014-04-08 13:02:13 PDT
Created attachment 228875 [details]
patch
Comment 4 Simon Fraser (smfr) 2014-04-08 13:15:01 PDT
Comment on attachment 228875 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=228875&action=review

> Source/WebKit2/WebProcess/WebPage/PageOverlayController.cpp:89
> +    m_webPage->drawingArea()->scheduleCompositingLayerFlush();

It this necessary? I would have thought that the GraphicsLayer tree modifications were enough to trigger it.

> Source/WebKit2/WebProcess/WebPage/PageOverlayController.cpp:114
> +    m_webPage->drawingArea()->scheduleCompositingLayerFlush();

Ditto.

> Source/WebKit2/WebProcess/WebPage/PageOverlayController.cpp:128
> +    m_webPage->drawingArea()->scheduleCompositingLayerFlush();

Ditto
Comment 5 Tim Horton 2014-04-08 13:32:59 PDT
Comment on attachment 228875 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=228875&action=review

>> Source/WebKit2/WebProcess/WebPage/PageOverlayController.cpp:89
>> +    m_webPage->drawingArea()->scheduleCompositingLayerFlush();
> 
> It this necessary? I would have thought that the GraphicsLayer tree modifications were enough to trigger it.

I think it's not, if I implement notifyFlushRequired here (since all of these GraphicsLayers use this class as their client) and forward it along to the DrawingArea. That's much neater, thanks!
Comment 6 Tim Horton 2014-04-08 13:51:54 PDT
Created attachment 228881 [details]
found more code to delete
Comment 7 Tim Horton 2014-04-08 13:56:20 PDT
Created attachment 228883 [details]
rebase
Comment 8 Tim Horton 2014-04-08 14:09:10 PDT
Created attachment 228886 [details]
rebasex2

still building post-rebase. need to test some  exposedrect-enabled apps.
Comment 9 Tim Horton 2014-04-08 16:12:50 PDT
http://trac.webkit.org/changeset/166975
Comment 10 Tim Horton 2014-04-08 16:37:55 PDT
Created attachment 228912 [details]
fix a tiny bug
Comment 11 Anders Carlsson 2014-04-08 16:38:53 PDT
Comment on attachment 228912 [details]
fix a tiny bug

View in context: https://bugs.webkit.org/attachment.cgi?id=228912&action=review

> Source/WebKit2/WebProcess/WebPage/PageOverlayController.cpp:105
> +    if (m_pageOverlays.size())

This should be

if (!m_pageOverlays.isEmpty())
Comment 12 Tim Horton 2014-04-08 16:41:40 PDT
http://trac.webkit.org/changeset/166978
Comment 13 Csaba Osztrogonác 2014-04-08 23:32:56 PDT
New bug report to fix the Coordinated Graphics build and functionality -
https://bugs.webkit.org/show_bug.cgi?id=131425
Comment 14 Csaba Osztrogonác 2014-04-08 23:37:45 PDT
(In reply to comment #13)
> New bug report to fix the Coordinated Graphics build and functionality -
> https://bugs.webkit.org/show_bug.cgi?id=131425

It seems GTK (DrawingAreaImpl.cpp) needs similar fix too.