Title: [127145] trunk
Revision
127145
Author
[email protected]
Date
2012-08-30 08:51:25 -0700 (Thu, 30 Aug 2012)

Log Message

Unreviewed, rolling out r127131.
http://trac.webkit.org/changeset/127131
https://bugs.webkit.org/show_bug.cgi?id=95463

It makes the fast/regions/ test crash on Chromium (Requested
by jchaffraix on #webkit).

Patch by Sheriff Bot <[email protected]> on 2012-08-30

Source/WebCore:

* css/StyleResolver.cpp:
(WebCore::StyleResolver::collectMatchingRulesForList):
* rendering/InlineBox.cpp:
* rendering/InlineBox.h:
(WebCore):
(InlineBox):
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::addToLine):
(WebCore::InlineFlowBox::addTextBoxVisualOverflow):
* rendering/RenderRegion.h:
(RenderRegion):

LayoutTests:

* fast/regions/region-style-text-shadow-expected.html: Removed.
* fast/regions/region-style-text-shadow.html: Removed.

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (127144 => 127145)


--- trunk/LayoutTests/ChangeLog	2012-08-30 15:46:04 UTC (rev 127144)
+++ trunk/LayoutTests/ChangeLog	2012-08-30 15:51:25 UTC (rev 127145)
@@ -1,5 +1,17 @@
 2012-08-30  Sheriff Bot  <[email protected]>
 
+        Unreviewed, rolling out r127131.
+        http://trac.webkit.org/changeset/127131
+        https://bugs.webkit.org/show_bug.cgi?id=95463
+
+        It makes the fast/regions/ test crash on Chromium (Requested
+        by jchaffraix on #webkit).
+
+        * fast/regions/region-style-text-shadow-expected.html: Removed.
+        * fast/regions/region-style-text-shadow.html: Removed.
+
+2012-08-30  Sheriff Bot  <[email protected]>
+
         Unreviewed, rolling out r127133.
         http://trac.webkit.org/changeset/127133
         https://bugs.webkit.org/show_bug.cgi?id=95462

Deleted: trunk/LayoutTests/fast/regions/region-style-text-shadow-expected.html (127144 => 127145)


--- trunk/LayoutTests/fast/regions/region-style-text-shadow-expected.html	2012-08-30 15:46:04 UTC (rev 127144)
+++ trunk/LayoutTests/fast/regions/region-style-text-shadow-expected.html	2012-08-30 15:51:25 UTC (rev 127145)
@@ -1,47 +0,0 @@
-<!doctype html>
- <html>
-     <!--
-     Test for https://bugs.webkit.org/show_bug.cgi?id=94472 ([CSSRegions]Add support for text-shadow in region styling).
-     You should not see any red text below.
-     -->
-     <head>
-         <style>
-             body { font-family: monospace; }
-             #p1 { text-shadow: 340px 100px #008000; position: absolute; top: 10px; }
-             #span2 { text-shadow: 340px 100px #008000; position: absolute; top: 50px; }
-             #article3 { text-shadow: 340px 100px #0000ff; position: absolute; top: 90px; }
-             #div3 { text-shadow: 340px 100px #008000; }
-             em { text-shadow: 340px 100px #008000; }
-             #div4 { position: absolute; top: 140px; width: 340px; height: 40px; }
-             #p4 { text-shadow: 340px 100px #0000ff; }
-             #div51 { position: absolute; top: 190px; width: 340px; height: 40px; }
-             #div52 { text-shadow: 340px 100px #0000ff; }
-             #div6 { position: absolute; top: 240px; width: 340px; height: 40px; }
-             #div7 { position: absolute; top: 290px; width: 340px; height: 40px; text-shadow: 340px 100px #0000ff, 0px 100px #0000ff, 340px 0px #0000ff; }
-         </style>
-     </head>
-     <body>
- 		<p id="p1">P shadow styled in region: #008000.</p>
- 		<span id="span2">Span shadow styled in region: #008000.</span>
-         <div id="article3">
-             Text shadow styled in region: #0000ff.
-             <div id="div3">Div shadow styled in region: #008000.</div>
-             Text shadow styled in region: #0000ff.
-         </div>       
-
-         <div id="div4">
-            Text without shadow.
-            <p id="p4">P shadow styled in region: #0000ff.</p>
-        </div>
-        <div id="div51">
-            Text without shadow.
-            <div id="div52">Div shadow styled in region: #0000ff.</div>
-        </div>
-        <div id="div6">
-            Text with removed shadow due to region styling.
-        </div>
-        <div id="div7">
-                Text with multiple shadows.
-        </div>
-     </body>
- </html>
\ No newline at end of file

Deleted: trunk/LayoutTests/fast/regions/region-style-text-shadow.html (127144 => 127145)


--- trunk/LayoutTests/fast/regions/region-style-text-shadow.html	2012-08-30 15:46:04 UTC (rev 127144)
+++ trunk/LayoutTests/fast/regions/region-style-text-shadow.html	2012-08-30 15:51:25 UTC (rev 127145)
@@ -1,103 +0,0 @@
-<!doctype html>
- <html>
-     <!--
-     Test for https://bugs.webkit.org/show_bug.cgi?id=94472 ([CSSRegions]Add support for text-shadow in region styling).
-     You should not see any red shadows below.
-     -->
-     <head>
-         <style>
-             body { font-family: monospace; }
-             .regionBox { width: 340px; height: 24px; }
-             .regionBox2 { width: 340px; height: 40px; }
- 
-             #article1 { -webkit-flow-into: flow1; }
-             #region1 { -webkit-flow-from: flow1; position: absolute; top: 10px; }
-             #p1 { text-shadow: 340px 100px #ff0000; }
-             @-webkit-region #region1 {
-                 #p1 { text-shadow: 340px 100px #008000; }
-             }
- 
-             #article2 { -webkit-flow-into: flow2; }
-             #region2 { -webkit-flow-from: flow2; position: absolute; top: 50px; }
-             #span2 { text-shadow: 340px 100px #ff0000; }
-             @-webkit-region #region2 {
-                 #span2 { text-shadow: 340px 100px #008000; }
-             }
- 
-             #article3 { -webkit-flow-into: flow3; }
-             #region3 { -webkit-flow-from: flow3; position: absolute; top: 90px; }
-             #article3 { text-shadow: 340px 100px #ff0000; }
-             @-webkit-region #region3 {
-                 #article3 { text-shadow: 340px 100px #0000ff; }
-                 #div3 { text-shadow: 340px 100px #008000; }
-             }
-             #article4 { -webkit-flow-into: flow4; }
-             #p4 { text-shadow: 340px 100px #ff0000; }
-             #region4 { -webkit-flow-from: flow4; position: absolute; top: 140px; }
-              @-webkit-region #region4 {
-                 #p4 { text-shadow: 340px 100px #0000ff; }
-             }
-
-             #article5 { -webkit-flow-into: flow5; }
-             #div5 { text-shadow: 340px 100px #ff0000; }
-             #region5 { -webkit-flow-from: flow5; position: absolute; top: 190px; }
-              @-webkit-region #region5 {
-                 #div5 { text-shadow: 340px 100px #0000ff; }
-             }
-             #article6 { -webkit-flow-into: flow6; }
-             #div6 { text-shadow: 340px 100px #ff0000; }
-             #region6 { -webkit-flow-from: flow6; position: absolute; top: 240px; }
-             @-webkit-region #region6 {
-                 #div6 { text-shadow: none; }
-             }
-             #article7 { -webkit-flow-into: flow7; }
-             #div7 { text-shadow: 340px 100px #ff0000; }
-             #region7 { -webkit-flow-from: flow7; position: absolute; top: 290px; }
-             @-webkit-region #region7 {
-                 #div7 { text-shadow: 340px 100px #0000ff, 0px 100px #0000ff, 340px 0px #0000ff; }
-             }
-         </style>
-     </head>
-     <body>
-         <div id="article1">
-             <p id="p1">P shadow styled in region: #008000.</p>
-         </div>
-         <div id="region1" class="regionBox"></div>
- 
-         <div id="article2">
-             <span id="span2">Span shadow styled in region: #008000.</span>
-         </div>
-         <div id="region2" class="regionBox"></div>
- 
-         <div id="article3">
-             Text shadow styled in region: #0000ff.
-             <div id="div3">Div shadow styled in region: #008000.</div>
-             Text shadow styled in region: #0000ff.
-         </div>
-         <div id="region3" class="regionBox2"></div>
-         <div id="region41" class="regionBox2"></div>
-         <div id="region42" class="regionBox2"></div>
-         <div id="article4">
-            Text without shadow.
-            <p id="p4">P shadow styled in region: #0000ff.</p>
-         </div>
-         <div id="region4" class="regionBox2"></div>
-         <div id="article5">
-            Text without shadow.
-            <div id="div5">Div shadow styled in region: #0000ff.</div>
-         </div>
-         <div id="region5" class="regionBox2"></div>
-         <div id="article6">
-            <div id="div6">
-                Text with removed shadow due to region styling.
-            </div>
-        </div>
-        <div id="region6" class="regionBox"></div>
-        <div id="article7">
-            <div id="div7">
-                Text with multiple shadows.
-            </div>
-        </div>
-        <div id="region7" class="regionBox"></div>
-     </body>
- </html>
\ No newline at end of file

Modified: trunk/Source/WebCore/ChangeLog (127144 => 127145)


--- trunk/Source/WebCore/ChangeLog	2012-08-30 15:46:04 UTC (rev 127144)
+++ trunk/Source/WebCore/ChangeLog	2012-08-30 15:51:25 UTC (rev 127145)
@@ -1,3 +1,24 @@
+2012-08-30  Sheriff Bot  <[email protected]>
+
+        Unreviewed, rolling out r127131.
+        http://trac.webkit.org/changeset/127131
+        https://bugs.webkit.org/show_bug.cgi?id=95463
+
+        It makes the fast/regions/ test crash on Chromium (Requested
+        by jchaffraix on #webkit).
+
+        * css/StyleResolver.cpp:
+        (WebCore::StyleResolver::collectMatchingRulesForList):
+        * rendering/InlineBox.cpp:
+        * rendering/InlineBox.h:
+        (WebCore):
+        (InlineBox):
+        * rendering/InlineFlowBox.cpp:
+        (WebCore::InlineFlowBox::addToLine):
+        (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
+        * rendering/RenderRegion.h:
+        (RenderRegion):
+
 2012-08-30  Alexander Pavlov  <[email protected]>
 
         Web Inspector: Some urls in CSS stylesheets cause errors when generating Computed Styles HTML

Modified: trunk/Source/WebCore/css/StyleResolver.cpp (127144 => 127145)


--- trunk/Source/WebCore/css/StyleResolver.cpp	2012-08-30 15:46:04 UTC (rev 127144)
+++ trunk/Source/WebCore/css/StyleResolver.cpp	2012-08-30 15:51:25 UTC (rev 127145)
@@ -3277,7 +3277,6 @@
     switch (id) {
     case CSSPropertyBackgroundColor:
     case CSSPropertyColor:
-    case CSSPropertyTextShadow:
         return true;
     default:
         break;

Modified: trunk/Source/WebCore/rendering/InlineBox.cpp (127144 => 127145)


--- trunk/Source/WebCore/rendering/InlineBox.cpp	2012-08-30 15:46:04 UTC (rev 127144)
+++ trunk/Source/WebCore/rendering/InlineBox.cpp	2012-08-30 15:51:25 UTC (rev 127145)
@@ -28,9 +28,6 @@
 #include "PaintInfo.h"
 #include "RenderArena.h"
 #include "RenderBlock.h"
-#include "RenderFlowThread.h"
-#include "RenderRegion.h"
-#include "RenderStyle.h"
 #include "RootInlineBox.h"
 
 #ifndef NDEBUG
@@ -254,30 +251,6 @@
     return renderer()->hitTest(request, result, locationInContainer, accumulatedOffset);
 }
 
-RenderStyle* InlineBox::styleInRegion(RenderRegion* region)
-{
-    if (!region || !renderer()->inRenderFlowThread())
-        return renderer()->style(isFirstLineStyle());
-    RenderObject* elementRenderer = renderer();
-    while (elementRenderer && (elementRenderer->isAnonymous() || !elementRenderer->node() || !elementRenderer->node()->isElementNode()))
-        elementRenderer = elementRenderer->parent();
-    if (!elementRenderer)
-        return renderer()->style(isFirstLineStyle());
-    // FIXME: We should be taking into account isFirstLine
-    return region->computeStyleInRegion(elementRenderer).get();
-}
-
-RenderRegion* InlineBox::regionDuringLayout()
-{
-    // This assumes that the box has not been positioned yet, so it uses the containing block's current logical height to get the region.
-    if (!renderer()->inRenderFlowThread())
-        return 0;
-    RenderFlowThread* flowThread = renderer()->enclosingRenderFlowThread();
-    ASSERT(flowThread);
-    RenderBlock* containingBlock = renderer()->containingBlock();
-    return flowThread->regionAtBlockOffset(containingBlock->offsetFromLogicalTopOfFirstPage() + containingBlock->logicalHeight());
-}
-
 const RootInlineBox* InlineBox::root() const
 { 
     if (m_parent)

Modified: trunk/Source/WebCore/rendering/InlineBox.h (127144 => 127145)


--- trunk/Source/WebCore/rendering/InlineBox.h	2012-08-30 15:46:04 UTC (rev 127144)
+++ trunk/Source/WebCore/rendering/InlineBox.h	2012-08-30 15:51:25 UTC (rev 127145)
@@ -28,8 +28,6 @@
 
 class HitTestRequest;
 class HitTestResult;
-class RenderStyle;
-class RenderRegion;
 class RootInlineBox;
 
 // InlineBox represents a rectangle that occurs on a line.  It corresponds to
@@ -99,8 +97,6 @@
     virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutUnit lineBottom);
     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom);
 
-    RenderStyle* styleInRegion(RenderRegion*);
-    RenderRegion* regionDuringLayout();
     // Overloaded new operator.
     void* operator new(size_t, RenderArena*);
 

Modified: trunk/Source/WebCore/rendering/InlineFlowBox.cpp (127144 => 127145)


--- trunk/Source/WebCore/rendering/InlineFlowBox.cpp	2012-08-30 15:46:04 UTC (rev 127144)
+++ trunk/Source/WebCore/rendering/InlineFlowBox.cpp	2012-08-30 15:51:25 UTC (rev 127145)
@@ -159,7 +159,7 @@
 
     if (!child->renderer()->isOutOfFlowPositioned()) {
         if (child->isText()) {
-            RenderStyle* childStyle = child->styleInRegion(child->regionDuringLayout());
+            RenderStyle* childStyle = child->renderer()->style(isFirstLineStyle());
             if (childStyle->letterSpacing() < 0 || childStyle->textShadow() || childStyle->textEmphasisMark() != TextEmphasisMarkNone || childStyle->textStrokeWidth())
                 child->clearKnownToHaveNoOverflow();
         } else if (child->renderer()->isReplaced()) {
@@ -820,7 +820,8 @@
     if (textBox->knownToHaveNoOverflow())
         return;
 
-    RenderStyle* style = textBox->styleInRegion(textBox->regionDuringLayout());
+    RenderStyle* style = textBox->renderer()->style(isFirstLineStyle());
+    
     GlyphOverflowAndFallbackFontsMap::iterator it = textBoxDataMap.find(textBox);
     GlyphOverflow* glyphOverflow = it == textBoxDataMap.end() ? 0 : &it->second.second;
     bool isFlippedLine = style->isFlippedLinesWritingMode();

Modified: trunk/Source/WebCore/rendering/RenderRegion.h (127144 => 127145)


--- trunk/Source/WebCore/rendering/RenderRegion.h	2012-08-30 15:46:04 UTC (rev 127144)
+++ trunk/Source/WebCore/rendering/RenderRegion.h	2012-08-30 15:51:25 UTC (rev 127145)
@@ -107,7 +107,6 @@
     virtual LayoutUnit logicalHeightOfAllFlowThreadContent() const;
 
     virtual void expandToEncompassFlowThreadContentsIfNeeded() {};
-    PassRefPtr<RenderStyle> computeStyleInRegion(const RenderObject*);
 
 protected:
     void setRegionObjectsRegionStyle();
@@ -123,6 +122,7 @@
 
     virtual void installFlowThread();
 
+    PassRefPtr<RenderStyle> computeStyleInRegion(const RenderObject*);
     void computeChildrenStyleInRegion(const RenderObject*);
     void setObjectStyleInRegion(RenderObject*, PassRefPtr<RenderStyle>, bool objectRegionStyleCached);
     void printRegionObjectsStyles();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to