Title: [103446] branches/safari-534.54-branch

Diff

Modified: branches/safari-534.54-branch/LayoutTests/ChangeLog (103445 => 103446)


--- branches/safari-534.54-branch/LayoutTests/ChangeLog	2011-12-21 22:08:44 UTC (rev 103445)
+++ branches/safari-534.54-branch/LayoutTests/ChangeLog	2011-12-21 22:12:15 UTC (rev 103446)
@@ -1,5 +1,29 @@
 2011-12-21  Lucas Forschler  <[email protected]>
 
+    Merge 94582
+
+    2011-09-06  Abhishek Arya  <[email protected]>
+
+            Style not propagated to anonymous boxes and anonymous
+            inline-blocks.
+            https://bugs.webkit.org/show_bug.cgi?id=67364
+
+            Add comments explaining what the test does.
+
+            Reviewed by James Robinson.
+
+            * fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
+            * fast/ruby/ruby-block-style-not-updated.html:
+            * fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
+            * fast/ruby/ruby-inline-style-not-updated.html:
+            * fast/table/table-before-child-style-update.html:
+            * fast/table/table-row-before-child-style-update.html:
+            * fast/table/table-row-style-not-updated-with-after-content.html:
+            * fast/table/table-row-style-not-updated-with-before-content.html:
+            * fast/table/table-style-not-updated.html:
+
+2011-12-21  Lucas Forschler  <[email protected]>
+
     Merge 94543
 
     2011-09-04  Abhishek Arya  <[email protected]>

Modified: branches/safari-534.54-branch/LayoutTests/fast/ruby/ruby-block-style-not-updated-with-before-after-content.html (103445 => 103446)


--- branches/safari-534.54-branch/LayoutTests/fast/ruby/ruby-block-style-not-updated-with-before-after-content.html	2011-12-21 22:08:44 UTC (rev 103445)
+++ branches/safari-534.54-branch/LayoutTests/fast/ruby/ruby-block-style-not-updated-with-before-after-content.html	2011-12-21 22:12:15 UTC (rev 103446)
@@ -1,3 +1,4 @@
+<!-- The orange, blue, yellow and green text boxes should not overlap -->
 <html>
 <body style="font: 1em/1 Ahem, sans-serif;">
 <style>

Modified: branches/safari-534.54-branch/LayoutTests/fast/ruby/ruby-block-style-not-updated.html (103445 => 103446)


--- branches/safari-534.54-branch/LayoutTests/fast/ruby/ruby-block-style-not-updated.html	2011-12-21 22:08:44 UTC (rev 103445)
+++ branches/safari-534.54-branch/LayoutTests/fast/ruby/ruby-block-style-not-updated.html	2011-12-21 22:12:15 UTC (rev 103446)
@@ -1,3 +1,4 @@
+<!-- The blue and green text boxes should not overlap -->
 <html>
 <body style="font: 1em/1 Ahem, sans-serif;">
 <ruby id="test" style="display: block; color: blue">

Modified: branches/safari-534.54-branch/LayoutTests/fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html (103445 => 103446)


--- branches/safari-534.54-branch/LayoutTests/fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html	2011-12-21 22:08:44 UTC (rev 103445)
+++ branches/safari-534.54-branch/LayoutTests/fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html	2011-12-21 22:12:15 UTC (rev 103446)
@@ -1,3 +1,4 @@
+<!-- The orange, blue, yellow and green text boxes should not overlap -->
 <html>
 <body style="font: 1em/1 Ahem, sans-serif;">
 <style>

Modified: branches/safari-534.54-branch/LayoutTests/fast/ruby/ruby-inline-style-not-updated.html (103445 => 103446)


--- branches/safari-534.54-branch/LayoutTests/fast/ruby/ruby-inline-style-not-updated.html	2011-12-21 22:08:44 UTC (rev 103445)
+++ branches/safari-534.54-branch/LayoutTests/fast/ruby/ruby-inline-style-not-updated.html	2011-12-21 22:12:15 UTC (rev 103446)
@@ -1,3 +1,4 @@
+<!-- The blue and green text boxes should not overlap -->
 <html>
 <body style="font: 1em/1 Ahem, sans-serif;">
 <ruby id="test" style="color: blue">

Modified: branches/safari-534.54-branch/LayoutTests/fast/table/table-before-child-style-update.html (103445 => 103446)


--- branches/safari-534.54-branch/LayoutTests/fast/table/table-before-child-style-update.html	2011-12-21 22:08:44 UTC (rev 103445)
+++ branches/safari-534.54-branch/LayoutTests/fast/table/table-before-child-style-update.html	2011-12-21 22:12:15 UTC (rev 103446)
@@ -1,3 +1,4 @@
+<!-- The blue and green text boxes should not overlap -->
 <html>
 <body style="font: 1em/1 Ahem, sans-serif;">
 <style>

Modified: branches/safari-534.54-branch/LayoutTests/fast/table/table-row-before-child-style-update.html (103445 => 103446)


--- branches/safari-534.54-branch/LayoutTests/fast/table/table-row-before-child-style-update.html	2011-12-21 22:08:44 UTC (rev 103445)
+++ branches/safari-534.54-branch/LayoutTests/fast/table/table-row-before-child-style-update.html	2011-12-21 22:12:15 UTC (rev 103446)
@@ -1,3 +1,4 @@
+<!-- The blue and green text boxes should not overlap -->
 <html>
 <body style="font: 1em/1 Ahem, sans-serif;">
 <style>

Modified: branches/safari-534.54-branch/LayoutTests/fast/table/table-row-style-not-updated-with-after-content.html (103445 => 103446)


--- branches/safari-534.54-branch/LayoutTests/fast/table/table-row-style-not-updated-with-after-content.html	2011-12-21 22:08:44 UTC (rev 103445)
+++ branches/safari-534.54-branch/LayoutTests/fast/table/table-row-style-not-updated-with-after-content.html	2011-12-21 22:12:15 UTC (rev 103446)
@@ -1,3 +1,4 @@
+<!-- The blue, yellow and green text boxes should not overlap -->
 <html>
 <body style="font: 1em/1 Ahem, sans-serif;">
 <style>    

Modified: branches/safari-534.54-branch/LayoutTests/fast/table/table-row-style-not-updated-with-before-content.html (103445 => 103446)


--- branches/safari-534.54-branch/LayoutTests/fast/table/table-row-style-not-updated-with-before-content.html	2011-12-21 22:08:44 UTC (rev 103445)
+++ branches/safari-534.54-branch/LayoutTests/fast/table/table-row-style-not-updated-with-before-content.html	2011-12-21 22:12:15 UTC (rev 103446)
@@ -1,3 +1,4 @@
+<!-- The orange, blue and green text boxes should not overlap -->
 <html>
 <body style="font: 1em/1 Ahem, sans-serif;">
 <style>    

Modified: branches/safari-534.54-branch/LayoutTests/fast/table/table-style-not-updated.html (103445 => 103446)


--- branches/safari-534.54-branch/LayoutTests/fast/table/table-style-not-updated.html	2011-12-21 22:08:44 UTC (rev 103445)
+++ branches/safari-534.54-branch/LayoutTests/fast/table/table-style-not-updated.html	2011-12-21 22:12:15 UTC (rev 103446)
@@ -1,3 +1,4 @@
+<!-- The blue and green text boxes should not overlap -->
 <html>
 <body style="font: 1em/1 Ahem, sans-serif;">
 <style>    

Modified: branches/safari-534.54-branch/Source/WebCore/ChangeLog (103445 => 103446)


--- branches/safari-534.54-branch/Source/WebCore/ChangeLog	2011-12-21 22:08:44 UTC (rev 103445)
+++ branches/safari-534.54-branch/Source/WebCore/ChangeLog	2011-12-21 22:12:15 UTC (rev 103446)
@@ -1,5 +1,25 @@
 2011-12-21  Lucas Forschler  <[email protected]>
 
+    Merge 94582
+
+    2011-09-06  Abhishek Arya  <[email protected]>
+
+            Style not propagated to anonymous boxes and anonymous
+            inline-blocks.
+            https://bugs.webkit.org/show_bug.cgi?id=67364
+
+            Reviewed by James Robinson.
+
+            Share propagateStyleToAnonymousChildren with RenderBlock::styleDidChange.
+
+            * rendering/RenderBlock.cpp:
+            (WebCore::RenderBlock::styleDidChange):
+            * rendering/RenderObject.cpp:
+            (WebCore::RenderObject::propagateStyleToAnonymousChildren):
+            * rendering/RenderObject.h:
+
+2011-12-21  Lucas Forschler  <[email protected]>
+
     Merge 94543
 
     2011-09-04  Abhishek Arya  <[email protected]>

Modified: branches/safari-534.54-branch/Source/WebCore/rendering/RenderBlock.cpp (103445 => 103446)


--- branches/safari-534.54-branch/Source/WebCore/rendering/RenderBlock.cpp	2011-12-21 22:08:44 UTC (rev 103445)
+++ branches/safari-534.54-branch/Source/WebCore/rendering/RenderBlock.cpp	2011-12-21 22:12:15 UTC (rev 103446)
@@ -242,21 +242,7 @@
         }
     }
 
-    // FIXME: We could save this call when the change only affected non-inherited properties
-    for (RenderObject* child = firstChild(); child; child = child->nextSibling()) {
-        if (child->isAnonymousBlock()) {
-            RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyle(style());
-            if (style()->specifiesColumns()) {
-                if (child->style()->specifiesColumns())
-                    newStyle->inheritColumnPropertiesFrom(style());
-                if (child->style()->columnSpan())
-                    newStyle->setColumnSpan(true);
-            }
-            newStyle->setDisplay(BLOCK);
-            child->setStyle(newStyle.release());
-        }
-    }
-
+    propagateStyleToAnonymousChildren(true);    
     m_lineHeight = -1;
 
     // Update pseudos for :before and :after now.

Modified: branches/safari-534.54-branch/Source/WebCore/rendering/RenderObject.cpp (103445 => 103446)


--- branches/safari-534.54-branch/Source/WebCore/rendering/RenderObject.cpp	2011-12-21 22:08:44 UTC (rev 103445)
+++ branches/safari-534.54-branch/Source/WebCore/rendering/RenderObject.cpp	2011-12-21 22:12:15 UTC (rev 103446)
@@ -1777,10 +1777,11 @@
     }
 }
 
-void RenderObject::propagateStyleToAnonymousChildren()
+void RenderObject::propagateStyleToAnonymousChildren(bool blockChildrenOnly)
 {
+    // FIXME: We could save this call when the change only affected non-inherited properties.
     for (RenderObject* child = firstChild(); child; child = child->nextSibling()) {
-        if (child->isAnonymous() && !child->isBeforeOrAfterContent()) {
+        if (blockChildrenOnly ? child->isAnonymousBlock() : child->isAnonymous() && !child->isBeforeOrAfterContent()) {
             RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyle(style());
             if (style()->specifiesColumns()) {
                 if (child->style()->specifiesColumns())
@@ -1788,7 +1789,7 @@
                 if (child->style()->columnSpan())
                     newStyle->setColumnSpan(true);
             }
-            newStyle->setDisplay(child->style()->display());
+            newStyle->setDisplay(blockChildrenOnly ? BLOCK : child->style()->display());
             child->setStyle(newStyle.release());
         }
     }

Modified: branches/safari-534.54-branch/Source/WebCore/rendering/RenderObject.h (103445 => 103446)


--- branches/safari-534.54-branch/Source/WebCore/rendering/RenderObject.h	2011-12-21 22:08:44 UTC (rev 103445)
+++ branches/safari-534.54-branch/Source/WebCore/rendering/RenderObject.h	2011-12-21 22:12:15 UTC (rev 103446)
@@ -791,7 +791,7 @@
     virtual void styleWillChange(StyleDifference, const RenderStyle* newStyle);
     // Overrides should call the superclass at the start
     virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
-    void propagateStyleToAnonymousChildren();
+    void propagateStyleToAnonymousChildren(bool blockChildrenOnly = false);
 
     void drawLineForBoxSide(GraphicsContext*, int x1, int y1, int x2, int y2, BoxSide,
                             Color, EBorderStyle, int adjbw1, int adjbw2, bool antialias = false);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to