[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
simon.fraser at apple.com
simon.fraser at apple.com
Wed Dec 22 12:23:29 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 8ca06fa65d16192880c60fd7cbfa28ac60f4895c
Author: simon.fraser at apple.com <simon.fraser at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Aug 20 21:03:17 2010 +0000
2010-08-20 Simon Fraser <simon.fraser at apple.com>
Reviewed by Dan Bernstein.
<rdar://problem/8245719> backface-visibility and reflections don't play nicely together.
On elements with a reflection and backface-visibility: hidden, set the doubleSided property on the
reflection flattening layer so that backface-visibility works in all configurations.
Test: compositing/reflections/backface-hidden-reflection.html
* platform/graphics/mac/GraphicsLayerCA.mm:
(WebCore::GraphicsLayerCA::updateBackfaceVisibility): Call setDoubleSided: on the structural
layer for reflections.
(WebCore::GraphicsLayerCA::ensureStructuralLayer): Fix a comment typo, and call updateBackfaceVisibility()
when we gain a structural layer.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65752 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index a849705..2baeeef 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -32,6 +32,19 @@
Reviewed by Dan Bernstein.
+ <rdar://problem/8245719> backface-visibility and reflections don't play nicely together.
+
+ Testcase with a reflected element with backface-visibility, rotated around so the back os showing.
+
+ * compositing/reflections/backface-hidden-reflection-expected.checksum: Copied from LayoutTests/compositing/overflow/zero-size-overflow-expected.checksum.
+ * compositing/reflections/backface-hidden-reflection-expected.png: Copied from LayoutTests/compositing/overflow/zero-size-overflow-expected.png.
+ * compositing/reflections/backface-hidden-reflection-expected.txt: Added.
+ * compositing/reflections/backface-hidden-reflection.html: Added.
+
+2010-08-20 Simon Fraser <simon.fraser at apple.com>
+
+ Reviewed by Dan Bernstein.
+
Slider labels do not update as you move the sliders on this page
https://bugs.webkit.org/show_bug.cgi?id=41020
diff --git a/LayoutTests/compositing/overflow/zero-size-overflow-expected.checksum b/LayoutTests/compositing/reflections/backface-hidden-reflection-expected.checksum
similarity index 100%
copy from LayoutTests/compositing/overflow/zero-size-overflow-expected.checksum
copy to LayoutTests/compositing/reflections/backface-hidden-reflection-expected.checksum
diff --git a/LayoutTests/compositing/reflections/backface-hidden-reflection-expected.txt b/LayoutTests/compositing/reflections/backface-hidden-reflection-expected.txt
new file mode 100644
index 0000000..232eba2
--- /dev/null
+++ b/LayoutTests/compositing/reflections/backface-hidden-reflection-expected.txt
@@ -0,0 +1,8 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x116
+ RenderBlock {HTML} at (0,0) size 800x116
+ RenderBody {BODY} at (8,8) size 784x100
+ RenderBlock {DIV} at (0,0) size 100x100 [bgcolor=#008000]
+layer at (8,8) size 100x100
+ RenderBlock {DIV} at (0,0) size 100x100 [bgcolor=#FF0000]
diff --git a/LayoutTests/compositing/reflections/backface-hidden-reflection.html b/LayoutTests/compositing/reflections/backface-hidden-reflection.html
new file mode 100644
index 0000000..e587546
--- /dev/null
+++ b/LayoutTests/compositing/reflections/backface-hidden-reflection.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+ <style type="text/css" media="screen">
+
+ .container {
+ height: 100px;
+ width:100px;
+ background-color: green;
+ }
+
+ .reflected {
+ height: 100px;
+ width: 100px;
+ background-color: red;
+ -webkit-transform: rotate3d(0, 1, 0, 180deg);
+ -webkit-box-reflect: below;
+ -webkit-backface-visibility: hidden;
+ }
+ </style>
+</head>
+<body>
+ <!-- In the pixel results, a single green square should be visible. -->
+ <div class="container">
+ <div class="reflected">
+ </div>
+ </div>
+</body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index ec14c1a..7998975 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -38,6 +38,23 @@
Reviewed by Dan Bernstein.
+ <rdar://problem/8245719> backface-visibility and reflections don't play nicely together.
+
+ On elements with a reflection and backface-visibility: hidden, set the doubleSided property on the
+ reflection flattening layer so that backface-visibility works in all configurations.
+
+ Test: compositing/reflections/backface-hidden-reflection.html
+
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ (WebCore::GraphicsLayerCA::updateBackfaceVisibility): Call setDoubleSided: on the structural
+ layer for reflections.
+ (WebCore::GraphicsLayerCA::ensureStructuralLayer): Fix a comment typo, and call updateBackfaceVisibility()
+ when we gain a structural layer.
+
+2010-08-20 Simon Fraser <simon.fraser at apple.com>
+
+ Reviewed by Dan Bernstein.
+
Slider labels do not update as you move the sliders on this page
https://bugs.webkit.org/show_bug.cgi?id=41020
diff --git a/WebCore/platform/graphics/mac/GraphicsLayerCA.mm b/WebCore/platform/graphics/mac/GraphicsLayerCA.mm
index cb4ca58..315cc00 100644
--- a/WebCore/platform/graphics/mac/GraphicsLayerCA.mm
+++ b/WebCore/platform/graphics/mac/GraphicsLayerCA.mm
@@ -1213,6 +1213,18 @@ void GraphicsLayerCA::updateContentsOpaque()
void GraphicsLayerCA::updateBackfaceVisibility()
{
+ if (m_structuralLayer && structuralLayerPurpose() == StructuralLayerForReplicaFlattening) {
+ [m_structuralLayer.get() setDoubleSided:m_backfaceVisibility];
+
+ if (LayerMap* layerCloneMap = m_structuralLayerClones.get()) {
+ LayerMap::const_iterator end = layerCloneMap->end();
+ for (LayerMap::const_iterator it = layerCloneMap->begin(); it != end; ++it) {
+ CALayer *currLayer = it->second.get();
+ [currLayer setDoubleSided:m_backfaceVisibility];
+ }
+ }
+ }
+
[m_layer.get() setDoubleSided:m_backfaceVisibility];
if (LayerMap* layerCloneMap = m_layerClones.get()) {
@@ -1243,7 +1255,7 @@ void GraphicsLayerCA::ensureStructuralLayer(StructuralLayerPurpose purpose)
// Release the structural layer.
m_structuralLayer = 0;
- // Update the properties of m_layer now that we no loner have a structural layer.
+ // Update the properties of m_layer now that we no longer have a structural layer.
updateLayerPosition();
updateLayerSize();
updateAnchorPoint();
@@ -1294,6 +1306,7 @@ void GraphicsLayerCA::ensureStructuralLayer(StructuralLayerPurpose purpose)
updateAnchorPoint();
updateTransform();
updateChildrenTransform();
+ updateBackfaceVisibility();
// Set properties of m_layer to their default values, since these are expressed on on the structural layer.
CGPoint point = CGPointMake(m_size.width() / 2.0f, m_size.height() / 2.0f);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list