Reviewed by Dave Hyatt and Sam Weinig.
- fix <rdar://problem/
5605937> Inspector: Disclosure triangle not drawn in node's properties panel until click
Test: fast/layers/add-layer-with-nested-stacking.html
Test: fast/layers/remove-layer-with-nested-stacking.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::addChild): If the new child is overflow-only
but has children of its own, dirty the stacking context's z-order lists
since the grandchildren might need to be in them.
(WebCore::RenderLayer::removeChild): Similarly for the old child.
LayoutTests:
Reviewed by Dave Hyatt and Sam Weinig.
- pixel tests for <rdar://problem/
5605937> Inspector: Disclosure triangle not drawn in node's properties panel until click
* fast/layers/add-layer-with-nested-stacking.html: Added.
* fast/layers/remove-layer-with-nested-stacking.html: Added.
* platform/mac/fast/layers/add-layer-with-nested-stacking-expected.checksum: Added.
* platform/mac/fast/layers/add-layer-with-nested-stacking-expected.png: Added.
* platform/mac/fast/layers/add-layer-with-nested-stacking-expected.txt: Added.
* platform/mac/fast/layers/remove-layer-with-nested-stacking-expected.checksum: Added.
* platform/mac/fast/layers/remove-layer-with-nested-stacking-expected.png: Added.
* platform/mac/fast/layers/remove-layer-with-nested-stacking-expected.txt: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@29007
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2007-12-27 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Dave Hyatt and Sam Weinig.
+
+ - pixel tests for <rdar://problem/5605937> Inspector: Disclosure triangle not drawn in node's properties panel until click
+
+ * fast/layers/add-layer-with-nested-stacking.html: Added.
+ * fast/layers/remove-layer-with-nested-stacking.html: Added.
+ * platform/mac/fast/layers/add-layer-with-nested-stacking-expected.checksum: Added.
+ * platform/mac/fast/layers/add-layer-with-nested-stacking-expected.png: Added.
+ * platform/mac/fast/layers/add-layer-with-nested-stacking-expected.txt: Added.
+ * platform/mac/fast/layers/remove-layer-with-nested-stacking-expected.checksum: Added.
+ * platform/mac/fast/layers/remove-layer-with-nested-stacking-expected.png: Added.
+ * platform/mac/fast/layers/remove-layer-with-nested-stacking-expected.txt: Added.
+
2007-12-27 Eric Seidel <eric@webkit.org>
Reviewed by Sam.
--- /dev/null
+<style>
+#test {
+ overflow: hidden; /* Required to reproduce. */
+}
+
+#test::before {
+ content: ""; /* Some content required to reproduce. */
+ opacity: 0.999; /* Required to reproduce. */
+ display: block;
+ width: 100px;
+ height: 100px;
+ background-color: green;
+}
+</style>
+<div id="test" style="display: none"></div>
+<script type="text/javascript">
+ function test()
+ {
+ document.getElementById("test").style.display = "block";
+ }
+
+ if (!window.layoutTestController)
+ setTimeout(test, 0);
+ else {
+ document.body.offsetTop;
+ layoutTestController.display();
+ test();
+ }
+</script>
--- /dev/null
+The square should be a uniform shade of green.
+<div style="width: 100px; height: 50px; background-color: green; opacity: 0.5;"></div>
+<span style="opacity: 0.9">
+ <div id="inner" style="float: left; width: 100px; height: 100px; overflow: hidden;">
+ <span style="display: inline-block; width: 100px; height: 50px; background-color: green; opacity: 0.5;"></span>
+ </div>
+</span>
+<script>
+ function test()
+ {
+ document.getElementById("inner").style.float = "none";
+ }
+
+ if (!window.layoutTestController)
+ setTimeout(test, 0);
+ else {
+ document.body.offsetTop;
+ layoutTestController.display();
+ test();
+ }
+</script>
--- /dev/null
+66f7ab9da2ff72a42906052c1a4737d8
\ No newline at end of file
--- /dev/null
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+layer at (8,8) size 784x100
+ RenderBlock {DIV} at (0,0) size 784x100
+layer at (8,8) size 100x100
+ RenderBlock (generated) at (0,0) size 100x100 [bgcolor=#008000]
+ RenderText at (0,0) size 0x0
--- /dev/null
+f1c461b643ce606552ea16a280cdf583
\ No newline at end of file
--- /dev/null
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock (anonymous) at (0,0) size 784x18
+ RenderText {#text} at (0,0) size 300x18
+ text run at (0,0) width 300: "The square should be a uniform shade of green."
+ RenderBlock (anonymous) at (0,68) size 784x0
+ RenderBlock (anonymous) at (0,68) size 784x100
+ RenderBlock (anonymous) at (0,168) size 784x0
+ RenderText {#text} at (0,0) size 0x0
+ RenderText {#text} at (0,0) size 0x0
+layer at (8,76) size 100x100
+ RenderBlock {DIV} at (0,0) size 100x100
+ RenderText {#text} at (0,0) size 0x0
+layer at (8,26) size 100x50
+ RenderBlock {DIV} at (0,18) size 100x50 [bgcolor=#008000]
+layer at (8,76) size 100x50
+ RenderBlock {SPAN} at (0,0) size 100x50 [bgcolor=#008000]
+2007-12-27 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Dave Hyatt and Sam Weinig.
+
+ - fix <rdar://problem/5605937> Inspector: Disclosure triangle not drawn in node's properties panel until click
+
+ Test: fast/layers/add-layer-with-nested-stacking.html
+ Test: fast/layers/remove-layer-with-nested-stacking.html
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::addChild): If the new child is overflow-only
+ but has children of its own, dirty the stacking context's z-order lists
+ since the grandchildren might need to be in them.
+ (WebCore::RenderLayer::removeChild): Similarly for the old child.
+
2007-12-27 Jan Michael Alonzo <jmalonzo@unpluggable.com>
Reviewed by Alp Toker.
renderArena->free(*(size_t *)this, this);
}
-void RenderLayer::addChild(RenderLayer *child, RenderLayer* beforeChild)
+void RenderLayer::addChild(RenderLayer* child, RenderLayer* beforeChild)
{
RenderLayer* prevSibling = beforeChild ? beforeChild->previousSibling() : lastChild();
if (prevSibling) {
child->setPreviousSibling(prevSibling);
prevSibling->setNextSibling(child);
- }
- else
+ } else
setFirstChild(child);
if (beforeChild) {
beforeChild->setPreviousSibling(child);
child->setNextSibling(beforeChild);
- }
- else
+ } else
setLastChild(child);
-
+
child->setParent(this);
if (child->isOverflowOnly())
dirtyOverflowList();
- else {
+
+ if (!child->isOverflowOnly() || child->firstChild()) {
// Dirty the z-order list in which we are contained. The stackingContext() can be null in the
// case where we're building up generated content layers. This is ok, since the lists will start
// off dirty in that case anyway.
if (stackingContext)
stackingContext->dirtyZOrderLists();
}
-
+
child->updateVisibilityStatus();
if (child->m_hasVisibleContent || child->m_hasVisibleDescendant)
childVisibilityChanged(true);
if (oldChild->isOverflowOnly())
dirtyOverflowList();
- else {
+ if (!oldChild->isOverflowOnly() || oldChild->firstChild()) {
// Dirty the z-order list in which we are contained. When called via the
// reattachment process in removeOnlyThisLayer, the layer may already be disconnected
// from the main layer tree, so we need to null-check the |stackingContext| value.