Skip to content
Permalink
Browse files
Handle backdrop views that have to tile
https://bugs.webkit.org/show_bug.cgi?id=142317
<rdar://problem/20049088>

Reviewed by Simon Fraser.

Source/WebCore:

Make sure backdrop layers don't tile. If they are big
enough, we'll leave it to the platform compositor to handle.

This also fixes a bug where if a layer changed from a backdrop
type to a tiled type, it would still retain its custom appearance
and we'd try to add children to the wrong layer.

Test: compositing/media-controls-bar-appearance-big.html

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Check if
a layer needs a backdrop before checking if it needs to tile.

Source/WebKit2:

Add some better logging for custom appearance.

* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTextStream::operator<<):

LayoutTests:

A test that creates some backdrop views, then makes them
big enough that it would trigger tiling (which we don't want
to happen).

* compositing/media-controls-bar-appearance-big-expected.txt: Added.
* compositing/media-controls-bar-appearance-big.html: Added.

Canonical link: https://commits.webkit.org/162728@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183894 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
grorg committed May 6, 2015
1 parent 734559d commit 0c3ee4631a3843bfaaf8e53adea12101a523470a
@@ -1,3 +1,18 @@
2015-05-06 Dean Jackson <dino@apple.com>

Handle backdrop views that have to tile
https://bugs.webkit.org/show_bug.cgi?id=142317
<rdar://problem/20049088>

Reviewed by Simon Fraser.

A test that creates some backdrop views, then makes them
big enough that it would trigger tiling (which we don't want
to happen).

* compositing/media-controls-bar-appearance-big-expected.txt: Added.
* compositing/media-controls-bar-appearance-big.html: Added.

2015-05-06 Martin Robinson <mrobinson@igalia.com>

[FreeType] Vertical CJK glyphs should not be rendered with synthetic oblique
@@ -0,0 +1,23 @@
(GraphicsLayer
(anchor 0.00 0.00)
(bounds 2056.00 4117.00)
(children 1
(GraphicsLayer
(bounds 2056.00 4117.00)
(contentsOpaque 1)
(children 2
(GraphicsLayer
(position 8.00 8.00)
(bounds 2048.00 2048.00)
(drawsContent 1)
)
(GraphicsLayer
(position 8.00 2056.00)
(bounds 2048.00 2048.00)
(drawsContent 1)
)
)
)
)
)

@@ -0,0 +1,56 @@
<!DOCTYPE html>
<html>
<head>
<style>
div {
position: relative;
height: 100px;
width: 100px;
}
.big {
width: 2048px;
height: 2048px;
}
.media-controls {
-webkit-transform: translate3d(0, 0, 0); /* The element has to request a layer for the appearance to work */
}
.dark {
-webkit-appearance: media-controls-dark-bar-background;
}
.light {
-webkit-appearance: media-controls-light-bar-background;
}
</style>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}

function change()
{
var elements = document.querySelectorAll(".media-controls");
for (var i = 0; i < elements.length; ++i)
elements[i].classList.add("big");
setTimeout(dumpLayers, 0);
}

function dumpLayers()
{
var layersResult = document.getElementById('layers');
if (window.testRunner) {
layersResult.innerText = window.internals.layerTreeAsText(document);
testRunner.notifyDone();
}
}
window.addEventListener('load', change, false)
</script>
</head>
<body>
<div class="media-controls dark">
</div>
<div class="media-controls light">
</div>
<pre id="layers"></pre>
</body>
</html>
@@ -1,3 +1,24 @@
2015-05-06 Dean Jackson <dino@apple.com>

Handle backdrop views that have to tile
https://bugs.webkit.org/show_bug.cgi?id=142317
<rdar://problem/20049088>

Reviewed by Simon Fraser.

Make sure backdrop layers don't tile. If they are big
enough, we'll leave it to the platform compositor to handle.

This also fixes a bug where if a layer changed from a backdrop
type to a tiled type, it would still retain its custom appearance
and we'd try to add children to the wrong layer.

Test: compositing/media-controls-bar-appearance-big.html

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Check if
a layer needs a backdrop before checking if it needs to tile.

2015-05-06 Carlos Garcia Campos <cgarcia@igalia.com> and Per Arne Vollan <peavo@outlook.com>

[WinCairo] Compile error due to undefined symbols after r183868
@@ -1438,10 +1438,10 @@ void GraphicsLayerCA::commitLayerChangesBeforeSublayers(CommitState& commitState
bool needBackdropLayerType = (customAppearance() == LightBackdropAppearance || customAppearance() == DarkBackdropAppearance);
PlatformCALayer::LayerType neededLayerType = m_layer->layerType();

if (needTiledLayer)
neededLayerType = PlatformCALayer::LayerTypeTiledBackingLayer;
else if (needBackdropLayerType)
if (needBackdropLayerType)
neededLayerType = layerTypeForCustomBackdropAppearance(customAppearance());
else if (needTiledLayer)
neededLayerType = PlatformCALayer::LayerTypeTiledBackingLayer;
else if (isCustomBackdropLayerType(m_layer->layerType()) || m_usingTiledBacking)
neededLayerType = PlatformCALayer::LayerTypeWebLayer;

@@ -1,3 +1,16 @@
2015-05-06 Dean Jackson <dino@apple.com>

Handle backdrop views that have to tile
https://bugs.webkit.org/show_bug.cgi?id=142317
<rdar://problem/20049088>

Reviewed by Simon Fraser.

Add some better logging for custom appearance.

* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTextStream::operator<<):

2015-05-06 Chris Dumez <cdumez@apple.com>

Disable network cache efficacy logging
@@ -666,6 +666,7 @@
RemoteLayerTreeTextStream& operator<<(const FilterOperations&);
RemoteLayerTreeTextStream& operator<<(const PlatformCAAnimationRemote::Properties&);
RemoteLayerTreeTextStream& operator<<(const RemoteLayerBackingStore&);
RemoteLayerTreeTextStream& operator<<(const WebCore::GraphicsLayer::CustomAppearance&);
RemoteLayerTreeTextStream& operator<<(BlendMode);
RemoteLayerTreeTextStream& operator<<(PlatformCAAnimation::AnimationType);
RemoteLayerTreeTextStream& operator<<(PlatformCAAnimation::FillModeType);
@@ -837,6 +838,19 @@ static void dumpProperty(RemoteLayerTreeTextStream& ts, String name, T value)
return ts;
}

RemoteLayerTreeTextStream& RemoteLayerTreeTextStream::operator<<(const WebCore::GraphicsLayer::CustomAppearance& customAppearance)
{
RemoteLayerTreeTextStream& ts = *this;
switch (customAppearance) {
case WebCore::GraphicsLayer::CustomAppearance::NoCustomAppearance: ts << "none"; break;
case WebCore::GraphicsLayer::CustomAppearance::ScrollingOverhang: ts << "scrolling-overhang"; break;
case WebCore::GraphicsLayer::CustomAppearance::ScrollingShadow: ts << "scrolling-shadow"; break;
case WebCore::GraphicsLayer::CustomAppearance::LightBackdropAppearance: ts << "light-backdrop"; break;
case WebCore::GraphicsLayer::CustomAppearance::DarkBackdropAppearance: ts << "dark-backdrop"; break;
}
return ts;
}

RemoteLayerTreeTextStream& RemoteLayerTreeTextStream::operator<<(BlendMode blendMode)
{
RemoteLayerTreeTextStream& ts = *this;

0 comments on commit 0c3ee46

Please sign in to comment.