[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

hyatt at apple.com hyatt at apple.com
Wed Dec 22 13:39:57 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 399ec5cde0c8cb472463f429cc8944f8520f0bf7
Author: hyatt at apple.com <hyatt at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Sep 22 21:37:26 2010 +0000

    https://bugs.webkit.org/show_bug.cgi?id=46304
    
    Reviewed by Dan Bernstein.
    
    display:inline should become display:inline-block when an object's block flow does not match its parent's block flow.
    
    Added fast/blockflow/display-mutation.html
    
    WebCore:
    
    * css/CSSStyleSelector.cpp:
    (WebCore::CSSStyleSelector::styleForElement):
    (WebCore::CSSStyleSelector::pseudoStyleForElement):
    (WebCore::CSSStyleSelector::adjustRenderStyle):
    * css/CSSStyleSelector.h:
    
    LayoutTests:
    
    * fast/blockflow/display-mutation-expected.txt: Added.
    * fast/blockflow/display-mutation.html: Added.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68083 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 8a1e590..0879540 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,16 @@
+2010-09-22  David Hyatt  <hyatt at apple.com>
+
+        Reviewed by Dan Bernstein.
+
+        https://bugs.webkit.org/show_bug.cgi?id=46304
+        
+        display:inline should become display:inline-block when an object's block flow does not match its parent's block flow.
+
+        Added fast/blockflow/display-mutation.html
+
+        * fast/blockflow/display-mutation-expected.txt: Added.
+        * fast/blockflow/display-mutation.html: Added.
+
 2010-09-22  Abhishek Arya  <inferno at chromium.org>
 
         Unreviewed.
diff --git a/LayoutTests/editing/selection/5136696-expected.txt b/LayoutTests/fast/blockflow/display-mutation-expected.txt
similarity index 100%
copy from LayoutTests/editing/selection/5136696-expected.txt
copy to LayoutTests/fast/blockflow/display-mutation-expected.txt
diff --git a/LayoutTests/fast/blockflow/display-mutation.html b/LayoutTests/fast/blockflow/display-mutation.html
new file mode 100644
index 0000000..69778e0
--- /dev/null
+++ b/LayoutTests/fast/blockflow/display-mutation.html
@@ -0,0 +1,19 @@
+<html>
+<head>
+<script>
+if (window.layoutTestController)
+  window.layoutTestController.dumpAsText();
+
+function runTest()
+{
+   elt = document.getElementById('test');
+   if (getComputedStyle(elt, 0).getPropertyValue("display") == "inline-block")
+     document.getElementById('console').innerHTML = "PASS";
+   else
+     document.getElementById('console').innerHTML = "FAIL";
+}
+</script>
+</head>
+<body onload="runTest()">
+<span id="test" style="-webkit-block-flow:lr"></span>
+<div id="console"></div>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 6d33284..bc09caa 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-09-22  David Hyatt  <hyatt at apple.com>
+
+        Reviewed by Dan Bernstein.
+
+        https://bugs.webkit.org/show_bug.cgi?id=46304
+        
+        display:inline should become display:inline-block when an object's block flow does not match its parent's block flow.
+
+        Added fast/blockflow/display-mutation.html
+
+        * css/CSSStyleSelector.cpp:
+        (WebCore::CSSStyleSelector::styleForElement):
+        (WebCore::CSSStyleSelector::pseudoStyleForElement):
+        (WebCore::CSSStyleSelector::adjustRenderStyle):
+        * css/CSSStyleSelector.h:
+
 2010-09-22 Mario Sanchez Prada <msanchez at igalia.com>
 
         Reviewed by Martin Robinson.
diff --git a/WebCore/css/CSSStyleSelector.cpp b/WebCore/css/CSSStyleSelector.cpp
index 05f59ab..13c35b8 100644
--- a/WebCore/css/CSSStyleSelector.cpp
+++ b/WebCore/css/CSSStyleSelector.cpp
@@ -1344,7 +1344,7 @@ PassRefPtr<RenderStyle> CSSStyleSelector::styleForElement(Element* e, RenderStyl
         updateFont();
     
     // Clean up our style object's display and text decorations (among other fixups).
-    adjustRenderStyle(style(), e);
+    adjustRenderStyle(style(), m_parentStyle, e);
 
     // Start loading images referenced by this style.
     loadPendingImages();
@@ -1562,7 +1562,7 @@ PassRefPtr<RenderStyle> CSSStyleSelector::pseudoStyleForElement(PseudoId pseudo,
         updateFont();
 
     // Clean up our style object's display and text decorations (among other fixups).
-    adjustRenderStyle(style(), 0);
+    adjustRenderStyle(style(), parentStyle, 0);
 
     // Start loading images referenced by this style.
     loadPendingImages();
@@ -1646,7 +1646,7 @@ static void addIntrinsicMargins(RenderStyle* style)
     }
 }
 
-void CSSStyleSelector::adjustRenderStyle(RenderStyle* style, Element *e)
+void CSSStyleSelector::adjustRenderStyle(RenderStyle* style, RenderStyle* parentStyle, Element *e)
 {
     // Cache our original display.
     style->setOriginalDisplay(style->display());
@@ -1716,6 +1716,11 @@ void CSSStyleSelector::adjustRenderStyle(RenderStyle* style, Element *e)
                 style->setDisplay(BLOCK);
         }
         
+        // FIXME: Don't support this mutation for pseudo styles like first-letter or first-line, since it's not completely
+        // clear how that should work.
+        if (style->display() == INLINE && style->styleType() == NOPSEUDO && parentStyle && style->blockFlow() != parentStyle->blockFlow())
+            style->setDisplay(INLINE_BLOCK);
+            
         // After performing the display mutation, check table rows.  We do not honor position:relative on
         // table rows or cells.  This has been established in CSS2.1 (and caused a crash in containingBlock()
         // on some sites).
diff --git a/WebCore/css/CSSStyleSelector.h b/WebCore/css/CSSStyleSelector.h
index b77f23c..2bca2f4 100644
--- a/WebCore/css/CSSStyleSelector.h
+++ b/WebCore/css/CSSStyleSelector.h
@@ -181,7 +181,7 @@ public:
         void checkForZoomChange(RenderStyle*, RenderStyle* parentStyle);
         void checkForTextSizeAdjust();
 
-        void adjustRenderStyle(RenderStyle*, Element*);
+        void adjustRenderStyle(RenderStyle* styleToAdjust, RenderStyle* parentStyle, Element*);
 
         void addMatchedRule(CSSRuleData* rule) { m_matchedRules.append(rule); }
         void addMatchedDeclaration(CSSMutableStyleDeclaration* decl);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list