[webkit-changes] cvs commit: LayoutTests/fast/table
overflowHidden-expected.txt
Maciej
mjs at opensource.apple.com
Mon Oct 24 15:33:57 PDT 2005
mjs 05/10/24 15:33:56
Modified: . ChangeLog
khtml/rendering render_container.cpp render_container.h
render_flow.cpp render_layer.cpp render_layer.h
. ChangeLog
fast/clip 008-expected.txt
fast/css acid2-expected.txt acid2-pixel-expected.txt
fast/table overflowHidden-expected.txt
Log:
LayoutTests:
Re-landing Dave Hyatt's changes from when the tree was closed.
* fast/clip/008-expected.txt:
* fast/css/acid2-expected.txt:
* fast/css/acid2-pixel-expected.txt:
* fast/table/overflowHidden-expected.txt:
WebCore:
Re-landing Dave Hyatt's changes from when the tree was closed.
* khtml/rendering/render_container.cpp:
(RenderContainer::destroy):
(RenderContainer::destroyLeftoverAnonymousChildren):
* khtml/rendering/render_container.h:
* khtml/rendering/render_flow.cpp:
(RenderFlow::destroy):
* khtml/rendering/render_layer.cpp:
(khtml::RenderLayer::isTransparent):
(khtml::RenderLayer::paintLayer):
(khtml::isOverflowOnly):
(khtml::compare):
(khtml::sortByZOrder):
* khtml/rendering/render_layer.h:
Revision Changes Path
1.275 +18 -0 WebCore/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebCore/ChangeLog,v
retrieving revision 1.274
retrieving revision 1.275
diff -u -r1.274 -r1.275
--- ChangeLog 24 Oct 2005 21:51:54 -0000 1.274
+++ ChangeLog 24 Oct 2005 22:33:50 -0000 1.275
@@ -1,3 +1,21 @@
+2005-10-24 Maciej Stachowiak <mjs at apple.com>
+
+ Re-landing Dave Hyatt's changes from when the tree was closed.
+
+ * khtml/rendering/render_container.cpp:
+ (RenderContainer::destroy):
+ (RenderContainer::destroyLeftoverAnonymousChildren):
+ * khtml/rendering/render_container.h:
+ * khtml/rendering/render_flow.cpp:
+ (RenderFlow::destroy):
+ * khtml/rendering/render_layer.cpp:
+ (khtml::RenderLayer::isTransparent):
+ (khtml::RenderLayer::paintLayer):
+ (khtml::isOverflowOnly):
+ (khtml::compare):
+ (khtml::sortByZOrder):
+ * khtml/rendering/render_layer.h:
+
2005-10-24 Alexey Proskuryakov <ap at nypop.com>
Reviewed by Darin Adler.
1.77 +3 -8 WebCore/khtml/rendering/render_container.cpp
Index: render_container.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/rendering/render_container.cpp,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -r1.76 -r1.77
--- render_container.cpp 18 Oct 2005 00:16:44 -0000 1.76
+++ render_container.cpp 24 Oct 2005 22:33:54 -0000 1.77
@@ -59,20 +59,15 @@
void RenderContainer::destroy()
{
- if (m_first)
- destroyChildren();
-
+ destroyLeftoverAnonymousChildren();
RenderBox::destroy();
}
-void RenderContainer::destroyChildren()
+void RenderContainer::destroyLeftoverAnonymousChildren()
{
- if (continuation())
- continuation()->destroy();
-
while (m_first) {
if (m_first->isListMarker())
- m_first->remove();
+ m_first->remove(); // List markers are owned by their enclosing list and so don't get destroyed by this container.
else
m_first->destroy();
}
1.22 +1 -1 WebCore/khtml/rendering/render_container.h
Index: render_container.h
===================================================================
RCS file: /cvs/root/WebCore/khtml/rendering/render_container.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- render_container.h 18 Oct 2005 00:16:44 -0000 1.21
+++ render_container.h 24 Oct 2005 22:33:54 -0000 1.22
@@ -49,7 +49,7 @@
virtual void removeChild(RenderObject *oldChild);
virtual void destroy();
- void destroyChildren();
+ void destroyLeftoverAnonymousChildren();
virtual RenderObject* removeChildNode(RenderObject* child);
virtual void appendChildNode(RenderObject* child);
1.173 +7 -1 WebCore/khtml/rendering/render_flow.cpp
Index: render_flow.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/rendering/render_flow.cpp,v
retrieving revision 1.172
retrieving revision 1.173
diff -u -r1.172 -r1.173
--- render_flow.cpp 22 Oct 2005 01:10:32 -0000 1.172
+++ render_flow.cpp 24 Oct 2005 22:33:54 -0000 1.173
@@ -183,9 +183,15 @@
void RenderFlow::destroy()
{
- RenderContainer::destroyChildren();
+ // Detach our continuation first.
+ if (m_continuation)
+ m_continuation->destroy();
m_continuation = 0;
+ // Make sure to destroy anonymous children first while they are still connected to the rest of the tree, so that they will
+ // properly dirty line boxes that they are removed from. Effects that do :before/:after only on hover could crash otherwise.
+ RenderContainer::destroyLeftoverAnonymousChildren();
+
if (!documentBeingDestroyed()) {
if (m_firstLineBox) {
// We can't wait for RenderContainer::destroy to clear the selection,
1.115 +24 -14 WebCore/khtml/rendering/render_layer.cpp
Index: render_layer.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/rendering/render_layer.cpp,v
retrieving revision 1.114
retrieving revision 1.115
diff -u -r1.114 -r1.115
--- render_layer.cpp 19 Oct 2005 09:15:14 -0000 1.114
+++ render_layer.cpp 24 Oct 2005 22:33:54 -0000 1.115
@@ -297,9 +297,8 @@
return curr;
}
-#if APPLE_CHANGES
bool
-RenderLayer::isTransparent()
+RenderLayer::isTransparent() const
{
return m_object->style()->opacity() < 1.0f;
}
@@ -327,8 +326,6 @@
}
}
-#endif
-
void* RenderLayer::operator new(size_t sz, RenderArena* renderArena) throw()
{
return renderArena->allocate(sz);
@@ -882,10 +879,8 @@
// Ensure our z-order lists are up-to-date.
updateZOrderLists();
-#if APPLE_CHANGES
if (isTransparent())
haveTransparency = true;
-#endif
// If this layer's renderer is a child of the paintingRoot, we render unconditionally, which
// is done by passing a nil paintingRoot down to our renderer (as if no paintingRoot was ever set).
@@ -899,11 +894,9 @@
// We want to paint our layer, but only if we intersect the damage rect.
bool shouldPaint = intersectsDamageRect(layerBounds, damageRect);
if (shouldPaint && !selectionOnly && !damageRect.isEmpty()) {
-#if APPLE_CHANGES
// Begin transparency layers lazily now that we know we have to paint something.
if (haveTransparency)
beginTransparencyLayers(p);
-#endif
// Paint our background first, before painting any child layers.
// Establish the clip used to paint our background.
@@ -933,11 +926,9 @@
// Now establish the appropriate clip and paint our child RenderObjects.
if (shouldPaint && !clipRectToApply.isEmpty()) {
-#if APPLE_CHANGES
// Begin transparency layers lazily now that we know we have to paint something.
if (haveTransparency)
beginTransparencyLayers(p);
-#endif
// Set up the clip used when painting our children.
setClip(p, paintDirtyRect, clipRectToApply);
@@ -973,13 +964,11 @@
}
}
-#if APPLE_CHANGES
// End our transparency layer
if (isTransparent() && m_usedTransparency) {
p->endTransparencyLayer();
m_usedTransparency = false;
}
-#endif
}
bool
@@ -1323,6 +1312,27 @@
}
}
+// Helpers for the sorting of layers by z-index.
+static inline bool isOverflowOnly(const RenderLayer* layer)
+{
+ return layer->renderer()->hasOverflowClip() &&
+ !layer->renderer()->isPositioned() &&
+ !layer->renderer()->isRelPositioned() &&
+ !layer->isTransparent();
+}
+
+static inline bool compare(const RenderLayer* layer1, const RenderLayer* layer2)
+{
+ if (layer1->zIndex() == layer2->zIndex())
+ // Layers that exist solely because of overflow clip do not technically establish a stacking context.
+ // Our creation of RenderLayers for overflow regions is a convenience but is not really correct. Overflow
+ // content should have just painted where it occurred in the document. Although we can't do that,
+ // we will at least make sure that overflow layers lose to the other types of layers (positioned, relative positioned
+ // and opacity).
+ return isOverflowOnly(layer1) || !isOverflowOnly(layer2);
+ return layer1->zIndex() < layer2->zIndex();
+}
+
// Sort the buffer from lowest z-index to highest. The common scenario will have
// most z-indices equal, so we optimize for that case (i.e., the list will be mostly
// sorted already).
@@ -1340,7 +1350,7 @@
for (uint j = start; j < i; j++) {
RenderLayer* elt = buffer->at(j);
RenderLayer* elt2 = buffer->at(j+1);
- if (elt->zIndex() > elt2->zIndex()) {
+ if (!compare(elt, elt2)) {
sorted = false;
buffer->insert(j, elt2);
buffer->insert(j+1, elt);
@@ -1361,7 +1371,7 @@
// Handle the fast common case (of equal z-indices). The list may already
// be completely sorted.
- if (elt->zIndex() <= elt2->zIndex())
+ if (compare(elt, elt2))
return;
// We have to merge sort. Ensure our merge buffer is big enough to hold
1.52 +1 -3 WebCore/khtml/rendering/render_layer.h
Index: render_layer.h
===================================================================
RCS file: /cvs/root/WebCore/khtml/rendering/render_layer.h,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- render_layer.h 18 Oct 2005 00:16:45 -0000 1.51
+++ render_layer.h 24 Oct 2005 22:33:54 -0000 1.52
@@ -187,11 +187,9 @@
Marquee* marquee() const { return m_marquee; }
void suspendMarquees();
-#if APPLE_CHANGES
- bool isTransparent();
+ bool isTransparent() const;
RenderLayer* transparentAncestor();
void beginTransparencyLayers(QPainter* p);
-#endif
RenderLayer* root() {
RenderLayer* curr = this;
1.48 +9 -0 LayoutTests/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/LayoutTests/ChangeLog,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- ChangeLog 24 Oct 2005 21:42:31 -0000 1.47
+++ ChangeLog 24 Oct 2005 22:33:55 -0000 1.48
@@ -1,3 +1,12 @@
+2005-10-24 Maciej Stachowiak <mjs at apple.com>
+
+ Re-landing Dave Hyatt's changes from when the tree was closed.
+
+ * fast/clip/008-expected.txt:
+ * fast/css/acid2-expected.txt:
+ * fast/css/acid2-pixel-expected.txt:
+ * fast/table/overflowHidden-expected.txt:
+
2005-10-24 Mitz Pettel <opendarwin.org at mitzpettel.com>
Reviewed by Darin. Committed by David Harrison.
1.8 +2 -2 LayoutTests/fast/clip/008-expected.txt
Index: 008-expected.txt
===================================================================
RCS file: /cvs/root/LayoutTests/fast/clip/008-expected.txt,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- 008-expected.txt 18 Oct 2005 00:16:47 -0000 1.7
+++ 008-expected.txt 24 Oct 2005 22:33:55 -0000 1.8
@@ -11,9 +11,9 @@
text run at (293,18) width 446: "a containing block model, and that a fixed positioned element inside an"
text run at (0,36) width 353: "absolute positioned element is not considered overflow. "
RenderText {TEXT} at (0,0) size 0x0
+layer at (200,200) size 100x100
+ RenderBlock {DIV} at (100,100) size 100x100 [bgcolor=#008000]
layer at (8,62) size 100x100
RenderBlock (positioned) {DIV} at (8,62) size 100x100
layer at (100,100) size 200x200
RenderBlock (positioned) {DIV} at (100,100) size 100x100
-layer at (200,200) size 100x100
- RenderBlock {DIV} at (100,100) size 100x100 [bgcolor=#008000]
1.4 +7 -7 LayoutTests/fast/css/acid2-expected.txt
Index: acid2-expected.txt
===================================================================
RCS file: /cvs/root/LayoutTests/fast/css/acid2-expected.txt,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- acid2-expected.txt 18 Oct 2005 00:16:47 -0000 1.3
+++ acid2-expected.txt 24 Oct 2005 22:33:56 -0000 1.4
@@ -45,6 +45,13 @@
RenderBlock (positioned) {P} at (132,108) size 48x18 [bgcolor=#000000] [border: none (6px solid #FFFF00) none]
layer at (132,144) size 48x15
RenderBlock (positioned) {P} at (132,144) size 48x15 [bgcolor=#000000] [border: none (3px solid #FF0000) none]
+layer at (48,2842) size 740x10 scrollHeight 276
+ RenderBlock {DIV} at (12,204) size 740x10
+ RenderTable {TABLE} at (0,0) size 64x276
+ RenderTableSection {TBODY} at (0,0) size 0x276
+ RenderTableRow {TR} at (0,0) size 0x0
+ RenderTableCell {TD} at (0,0) size 64x276 [r=0 c=0 rs=1 cs=1]
+ RenderImage {IMG} at (0,152) size 64x64
layer at (108,2686) size 96x12
RenderBlock (positioned) {BLOCKQUOTE} at (72,48) size 96x12 [border: none (24px solid #000000) none (24px solid #000000)]
RenderBlock (floating) {ADDRESS} at (24,0) size 48x12 [bgcolor=#FFFF00]
@@ -63,13 +70,6 @@
RenderBlock (floating) {SPAN} at (12,0) size 96x12 [border: none (12px solid #00000000) none (12px solid #00000000)]
RenderBlock (floating) {EM} at (12,0) size 72x24 [border: (12px solid #FFFF00) none (12px solid #000000) none]
RenderBlock {STRONG} at (0,12) size 72x0
-layer at (48,2842) size 740x10 scrollHeight 276
- RenderBlock {DIV} at (12,204) size 740x10
- RenderTable {TABLE} at (0,0) size 64x276
- RenderTableSection {TBODY} at (0,0) size 0x276
- RenderTableRow {TR} at (0,0) size 0x0
- RenderTableCell {TD} at (0,0) size 64x276 [r=0 c=0 rs=1 cs=1]
- RenderImage {IMG} at (0,152) size 64x64
layer at (48,84) size 704x82
RenderBlock (relative positioned) zI: 2 {DIV} at (48,0) size 704x82 [color=#000000] [bgcolor=#FFFFFF] [border: (1px solid #000000)]
RenderBlock {H1} at (13,13) size 678x28
1.4 +7 -7 LayoutTests/fast/css/acid2-pixel-expected.txt
Index: acid2-pixel-expected.txt
===================================================================
RCS file: /cvs/root/LayoutTests/fast/css/acid2-pixel-expected.txt,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- acid2-pixel-expected.txt 18 Oct 2005 00:16:47 -0000 1.3
+++ acid2-pixel-expected.txt 24 Oct 2005 22:33:56 -0000 1.4
@@ -48,6 +48,13 @@
layer at (108,120) size 96x12
RenderBlock (positioned) {BLOCKQUOTE} at (72,48) size 96x12 [border: none (24px solid #000000) none (24px solid #000000)]
RenderBlock (floating) {ADDRESS} at (24,0) size 48x12 [bgcolor=#FFFF00]
+layer at (48,276) size 740x10 scrollHeight 276
+ RenderBlock {DIV} at (12,204) size 740x10
+ RenderTable {TABLE} at (0,0) size 64x276
+ RenderTableSection {TBODY} at (0,0) size 0x276
+ RenderTableRow {TR} at (0,0) size 0x0
+ RenderTableCell {TD} at (0,0) size 64x276 [r=0 c=0 rs=1 cs=1]
+ RenderImage {IMG} at (0,152) size 64x64
layer at (84,144) size 144x24
RenderBlock (positioned) {DIV} at (48,72) size 144x24 [bgcolor=#FF0000]
RenderBlock {DIV} at (0,0) size 144x0
@@ -63,10 +70,3 @@
RenderBlock (floating) {SPAN} at (12,0) size 96x12 [border: none (12px solid #00000000) none (12px solid #00000000)]
RenderBlock (floating) {EM} at (12,0) size 72x24 [border: (12px solid #FFFF00) none (12px solid #000000) none]
RenderBlock {STRONG} at (0,12) size 72x0
-layer at (48,276) size 740x10 scrollHeight 276
- RenderBlock {DIV} at (12,204) size 740x10
- RenderTable {TABLE} at (0,0) size 64x276
- RenderTableSection {TBODY} at (0,0) size 0x276
- RenderTableRow {TR} at (0,0) size 0x0
- RenderTableCell {TD} at (0,0) size 64x276 [r=0 c=0 rs=1 cs=1]
- RenderImage {IMG} at (0,152) size 64x64
1.4 +6 -6 LayoutTests/fast/table/overflowHidden-expected.txt
Index: overflowHidden-expected.txt
===================================================================
RCS file: /cvs/root/LayoutTests/fast/table/overflowHidden-expected.txt,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- overflowHidden-expected.txt 18 Oct 2005 00:16:48 -0000 1.3
+++ overflowHidden-expected.txt 24 Oct 2005 22:33:56 -0000 1.4
@@ -133,12 +133,12 @@
RenderBlock {DIV} at (1,1) size 100x100 [bgcolor=#800080]
layer at (12,12) size 302x104 clip at (13,13) size 300x102
RenderTableCell {TD} at (2,52) size 302x4 [bgcolor=#808080] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
+layer at (12,160) size 604x104 clip at (13,161) size 602x102
+ RenderTableCell {TD} at (2,43) size 604x22 [bgcolor=#808080] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
layer at (14,90) size 600x18
RenderBlock (positioned) {DIV} at (14,90) size 600x18 [bgcolor=#00FFFF]
RenderText {TEXT} at (0,0) size 209x18
text run at (0,0) width 209: "With absolute positioning on div."
-layer at (12,160) size 604x104 clip at (13,161) size 602x102
- RenderTableCell {TD} at (2,43) size 604x22 [bgcolor=#808080] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
layer at (14,203) size 600x18
RenderBlock {DIV} at (2,2) size 600x18 [bgcolor=#00FFFF]
RenderText {TEXT} at (0,0) size 129x18
@@ -174,10 +174,6 @@
text run at (0,0) width 51: "Reverse"
layer at (12,1006) size 604x104 clip at (13,1007) size 602x102
RenderTableCell {TD} at (2,43) size 604x22 [bgcolor=#808080] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
-layer at (14,1049) size 600x18
- RenderBlock (relative positioned) {DIV} at (2,2) size 600x18 [bgcolor=#FFA500]
- RenderText {TEXT} at (0,0) size 203x18
- text run at (0,0) width 203: "With relative positioning on div."
layer at (12,1154) size 604x104 clip at (13,1155) size 602x102
RenderTableCell {TD} at (2,43) size 604x22 [bgcolor=#808080] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
RenderBlock {DIV} at (2,2) size 600x18 [bgcolor=#FFC0CB]
@@ -200,6 +196,10 @@
RenderBlock {DIV} at (0,0) size 600x18 [bgcolor=#FFA500]
RenderText {TEXT} at (0,0) size 278x18
text run at (0,0) width 278: "With display:table-cell + relative positioning"
+layer at (14,1049) size 600x18
+ RenderBlock (relative positioned) {DIV} at (2,2) size 600x18 [bgcolor=#FFA500]
+ RenderText {TEXT} at (0,0) size 203x18
+ text run at (0,0) width 203: "With relative positioning on div."
layer at (8,1718) size 605x107 clip at (11,1721) size 602x102
RenderTableCell {TD} at (0,41) size 605x25 [bgcolor=#808080] [border: (3px inset #808080)] [r=0 c=0 rs=1 cs=1]
RenderBlock {DIV} at (4,4) size 600x18 [bgcolor=#FFFF00]
More information about the webkit-changes
mailing list