Remote Layer Tree: Implement Page Overlays
https://bugs.webkit.org/show_bug.cgi?id=124165
<rdar://problem/15199056>

Reviewed by Anders Carlsson.

Implement page overlays, very similar to how they work in TiledCoreAnimationDrawingArea,
but manipulating the PlatformCALayer tree instead of the CALayer tree directly.

* WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
* WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
(WebKit::RemoteLayerTreeContext::outOfTreeLayerWasAdded):
(WebKit::RemoteLayerTreeContext::outOfTreeLayerWillBeRemoved):
(WebKit::RemoteLayerTreeContext::flushLayers):
Add a list of out-of-tree GraphicsLayers which are flushed in addition
to the page's GraphicsLayer tree, and functions to manipulate this list.

* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
Make RemoteLayerTreeDrawingArea a GraphicsLayerClient, so we can get callbacks
from the GraphicsLayers that drive our page overlays.
Override the relevant page overlay functions.
Add storage for the root layer, view size, and a map of PageOverlay->GraphicsLayer.

* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::setRootCompositingLayer):
Store the root GraphicsLayer for later use.

(WebKit::RemoteLayerTreeDrawingArea::updateGeometry):
Update the size of the page overlays when the DrawingArea's geometry changes.

(WebKit::RemoteLayerTreeDrawingArea::updatePreferences):
Update the page overlay settings when necessary.

(WebKit::RemoteLayerTreeDrawingArea::didInstallPageOverlay):
Create a GraphicsLayer for our page overlay, set it up, and parent it.
Inform the RemoteLayerTreeContext that it will need to flush this GraphicsLayer,
since it's not a part of the page's GraphicsLayer tree.

(WebKit::RemoteLayerTreeDrawingArea::didUninstallPageOverlay):
Tear down our page overlay's GraphicsLayer.

(WebKit::RemoteLayerTreeDrawingArea::setPageOverlayNeedsDisplay):
(WebKit::RemoteLayerTreeDrawingArea::setPageOverlayOpacity):
(WebKit::RemoteLayerTreeDrawingArea::paintContents):
(WebKit::RemoteLayerTreeDrawingArea::deviceScaleFactor):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159079 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Actually land a result for the test that I added (and make it a text test).

* compositing/tiling/tiled-in-iframe-expected.txt: Added.
* compositing/tiling/tiled-in-iframe.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159080 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Win] m_isCompositeFontReference is uninitialized.
https://bugs.webkit.org/show_bug.cgi?id=124170

Reviewed by Tim Horton.

Initialize value to false, as is done in the other constructors for this data type.

* platform/graphics/win/FontPlatformDataCGWin.cpp:
(WebCore::FontPlatformData::FontPlatformData):
* platform/graphics/win/FontPlatformDataCairoWin.cpp:
(WebCore::FontPlatformData::FontPlatformData):
* platform/graphics/win/FontPlatformDataWin.cpp:
(WebCore::FontPlatformData::FontPlatformData):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159081 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r155660): box-shadow causes overlay scrollbars to be in the wrong position when element is composited (85647)
https://bugs.webkit.org/show_bug.cgi?id=124090

Source/WebCore:

Reviewed by Beth Dakin.

After r155660 we did fewer layouts, so were left with overlay scrollbars in the
wrong locations because nothing would update them after RenderLayerBacking
computed a new offsetFromRenderer.

First part of the fix is to wean positionOverflowControlsLayers() off of
an absolute offset from the root. Do this by not using Widget::frameRect()
to position the layers, but instead RenderLayer::rectFor{Horizontal|Vertical}Scrollbar
which is what we used to position the scrollbars in the first place.

Second part of the fix is to call positionOverflowControlsLayers() from
RenderLayerBacking::updateGraphicsLayerGeometry() if the offsetFromRenderer
changed.

Test: compositing/overflow/overflow-scrollbar-layer-positions.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::positionOverflowControls):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
(WebCore::RenderLayerBacking::positionOverflowControlsLayers):
* rendering/RenderLayerBacking.h:

LayoutTests:

Reviewed by Beth Dakin.

Test, but it doesn't actually test the fix until we enable overlay scrollbars
in tests (bug 60716).

* compositing/overflow/overflow-scrollbar-layer-positions-expected.txt: Added.
* compositing/overflow/overflow-scrollbar-layer-positions.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159082 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed build fix on CMake Based port since r159077.

* CMakeLists.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159083 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r158927): curly-braces-escaping.html is broken on Mac WebKit2
https://bugs.webkit.org/show_bug.cgi?id=124164

Reviewed by Alexey Proskuryakov.

Back out the change to use NSSecureCoding for encoding/decoding NSURLRequest and
NSURLResponse objects; turns out the NSURL encoding/decoding doesn't preserve the raw URL bytes.

* Shared/mac/WebCoreArgumentCodersMac.mm:
(CoreIPC::encodePlatformData):
(CoreIPC::decodePlatformData):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159084 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove unused Qt cruft
https://bugs.webkit.org/show_bug.cgi?id=124174

Reviewed by Tim Horton.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::resetStateAfterProcessExited):
* UIProcess/WebPageProxy.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159088 268f45cc-cd09-0410-ab3c-d52691b4dbfc
FrameFilter can just be an std::function instead
https://bugs.webkit.org/show_bug.cgi?id=124176

Reviewed by Tim Horton.

Source/WebCore:

* WebCore.exp.in:
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create):
* loader/archive/cf/LegacyWebArchive.h:

Source/WebKit/mac:

* DOM/WebDOMOperations.mm:
(-[DOMNode webArchiveByFilteringSubframes:]):

Source/WebKit2:

* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::webArchiveData):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159089 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r158976): Web Inspector: unable to start docked or dock
https://bugs.webkit.org/show_bug.cgi?id=124148

Reviewed by Timothy Hatcher.

* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::canAttach): check for a level that is greater than 1 rather than 0
to deny attachment, since 1 is the first level of inspectors.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159090 268f45cc-cd09-0410-ab3c-d52691b4dbfc