Log Message
[CSS Shapes] ShapeOutsideInfo needs to use the parent's writing mode when calculating offsets https://bugs.webkit.org/show_bug.cgi?id=124680
Patch by Rob Buis <rob.b...@samsung.com> on 2013-12-06 Reviewed by Dirk Schulze. Source/WebCore: Do not take the writing-mode property on the float into account for shape-outside. Add a virtual method writingMode() in order to do this for shape-outside but keep old behavior (element writingMode) for shape-inside. Change existing test floats/shape-outside-floats-different-writing-modes.html to test the new behavior. * rendering/shapes/ShapeInfo.cpp: (WebCore::::computedShape): * rendering/shapes/ShapeInfo.h: (WebCore::ShapeInfo::writingMode): * rendering/shapes/ShapeOutsideInfo.cpp: (WebCore::ShapeOutsideInfo::writingMode): * rendering/shapes/ShapeOutsideInfo.h: LayoutTests: Make sure the writing-mode property on the float is not taken into account for shape-outside. Adapt highlight-shape-outside.html so it sets the writing-mode on the container div, not the float. However because of earlier unreliability in EFL/GTK, skip the test for now. * TestExpectations: * fast/shapes/shape-outside-floats/shape-outside-floats-different-writing-modes.html: * inspector-protocol/model/highlight-shape-outside-expected.txt: * inspector-protocol/model/highlight-shape-outside.html:
Modified Paths
- trunk/LayoutTests/ChangeLog
- trunk/LayoutTests/TestExpectations
- trunk/LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-different-writing-modes.html
- trunk/LayoutTests/inspector-protocol/model/highlight-shape-outside.html
- trunk/Source/WebCore/ChangeLog
- trunk/Source/WebCore/rendering/shapes/ShapeInfo.cpp
- trunk/Source/WebCore/rendering/shapes/ShapeInfo.h
- trunk/Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp
- trunk/Source/WebCore/rendering/shapes/ShapeOutsideInfo.h
Diff
Modified: trunk/LayoutTests/ChangeLog (160242 => 160243)
--- trunk/LayoutTests/ChangeLog 2013-12-06 20:59:16 UTC (rev 160242)
+++ trunk/LayoutTests/ChangeLog 2013-12-06 21:02:22 UTC (rev 160243)
@@ -1,3 +1,19 @@
+2013-12-06 Rob Buis <rob.b...@samsung.com>
+
+ [CSS Shapes] ShapeOutsideInfo needs to use the parent's writing mode when calculating offsets
+ https://bugs.webkit.org/show_bug.cgi?id=124680
+
+ Reviewed by Dirk Schulze.
+
+ Make sure the writing-mode property on the float is not taken into account for shape-outside.
+ Adapt highlight-shape-outside.html so it sets the writing-mode on the container div, not the float.
+ However because of earlier unreliability in EFL/GTK, skip the test for now.
+
+ * TestExpectations:
+ * fast/shapes/shape-outside-floats/shape-outside-floats-different-writing-modes.html:
+ * inspector-protocol/model/highlight-shape-outside-expected.txt:
+ * inspector-protocol/model/highlight-shape-outside.html:
+
2013-12-06 Filip Pizlo <fpi...@apple.com>
FTL should support all of ValueToInt32
Modified: trunk/LayoutTests/TestExpectations (160242 => 160243)
--- trunk/LayoutTests/TestExpectations 2013-12-06 20:59:16 UTC (rev 160242)
+++ trunk/LayoutTests/TestExpectations 2013-12-06 21:02:22 UTC (rev 160243)
@@ -68,3 +68,5 @@
# No port in WebKit already support getMediaStream, so we are skipping those for now.
fast/mediastream/MediaStream-construct-with-ended-tracks.html [ Skip ]
fast/mediastream/MediaStream-clone.html [ Skip ]
+
+webkit.org/b/124660 inspector-protocol/model/highlight-shape-outside.html [ Failure ]
Modified: trunk/LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-different-writing-modes.html (160242 => 160243)
--- trunk/LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-different-writing-modes.html 2013-12-06 20:59:16 UTC (rev 160242)
+++ trunk/LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-different-writing-modes.html 2013-12-06 21:02:22 UTC (rev 160243)
@@ -8,7 +8,7 @@
}
.float {
-webkit-writing-mode: vertical-lr;
- -webkit-shape-outside: rectangle(0px, -20px, 20px, 20px) content-box;
+ -webkit-shape-outside: rectangle(-20px, 0px, 20px, 20px) content-box;
height: 20px;
width: 40px;
margin: 0px 20px;
Modified: trunk/LayoutTests/inspector-protocol/model/highlight-shape-outside.html (160242 => 160243)
--- trunk/LayoutTests/inspector-protocol/model/highlight-shape-outside.html 2013-12-06 20:59:16 UTC (rev 160242)
+++ trunk/LayoutTests/inspector-protocol/model/highlight-shape-outside.html 2013-12-06 21:02:22 UTC (rev 160243)
@@ -72,19 +72,19 @@
'path' : ['M', 50, 50, 'L', 150, 50, 'L', 150, 100, 'L', 50, 100, 'L', 50, 50, 'Z']
},
{
- 'selector' : '.rectangle.vertical-lr',
+ 'selector' : '.vertical-lr > .rectangle',
'path' : ['M', 50, 50, 'L', 50, 100, 'L', 150, 100, 'L', 150, 50, 'L', 50, 50, 'Z']
},
{
- 'selector' : '.rectangle.vertical-rl',
+ 'selector' : '.vertical-rl > .rectangle',
'path' : ['M', 150, 50, 'L', 150, 100, 'L', 50, 100, 'L', 50, 50, 'L', 150, 50, 'Z']
},
{
- 'selector' : '.rectangle.padded.vertical-rl',
+ 'selector' : '.vertical-rl > .rectangle.padded',
'path' : ['M', 175, 75, 'L', 175, 125, 'L', 75, 125, 'L', 75, 75, 'L', 175, 75, 'Z']
},
{
- 'selector' : '.rectangle.padded.vertical-rl.border-box',
+ 'selector' : '.vertical-rl > .rectangle.padded.border-box',
'path' : ['M', 150, 50, 'L', 150, 100, 'L', 50, 100, 'L', 50, 50, 'L', 150, 50, 'Z']
},
{
@@ -130,10 +130,14 @@
<div class='shape polygon'></div>
<div class='shape padded rectangle'></div>
<div class='shape padded rectangle border-box'></div>
- <div class='shape rectangle vertical-lr'></div>
- <div class='shape rectangle vertical-rl'></div>
- <div class='shape padded rectangle vertical-rl'></div>
- <div class='shape padded rectangle vertical-rl border-box'></div>
+ <div class='vertical-lr'>
+ <div class='shape rectangle'></div>
+ </div>
+ <div class='vertical-rl'>
+ <div class='shape rectangle'></div>
+ <div class='shape padded rectangle'></div>
+ <div class='shape padded rectangle border-box'></div>
+ </div>
<div class='shape padded content-box'></div>
<div class='shape padded raster-svg'></div>
<div class='shape padded raster-svg-complex'></div>
Modified: trunk/Source/WebCore/ChangeLog (160242 => 160243)
--- trunk/Source/WebCore/ChangeLog 2013-12-06 20:59:16 UTC (rev 160242)
+++ trunk/Source/WebCore/ChangeLog 2013-12-06 21:02:22 UTC (rev 160243)
@@ -1,3 +1,25 @@
+2013-12-06 Rob Buis <rob.b...@samsung.com>
+
+ [CSS Shapes] ShapeOutsideInfo needs to use the parent's writing mode when calculating offsets
+ https://bugs.webkit.org/show_bug.cgi?id=124680
+
+ Reviewed by Dirk Schulze.
+
+ Do not take the writing-mode property on the float into account for shape-outside.
+ Add a virtual method writingMode() in order to do this for shape-outside but
+ keep old behavior (element writingMode) for shape-inside.
+
+ Change existing test floats/shape-outside-floats-different-writing-modes.html to test the
+ new behavior.
+
+ * rendering/shapes/ShapeInfo.cpp:
+ (WebCore::::computedShape):
+ * rendering/shapes/ShapeInfo.h:
+ (WebCore::ShapeInfo::writingMode):
+ * rendering/shapes/ShapeOutsideInfo.cpp:
+ (WebCore::ShapeOutsideInfo::writingMode):
+ * rendering/shapes/ShapeOutsideInfo.h:
+
2013-12-06 Joseph Pecoraro <pecor...@apple.com>
Web Inspector: Remove Staging Workaround
Modified: trunk/Source/WebCore/rendering/shapes/ShapeInfo.cpp (160242 => 160243)
--- trunk/Source/WebCore/rendering/shapes/ShapeInfo.cpp 2013-12-06 20:59:16 UTC (rev 160242)
+++ trunk/Source/WebCore/rendering/shapes/ShapeInfo.cpp 2013-12-06 21:02:22 UTC (rev 160243)
@@ -60,7 +60,7 @@
if (Shape* shape = m_shape.get())
return *shape;
- WritingMode writingMode = m_renderer.style().writingMode();
+ WritingMode writingMode = this->writingMode();
Length margin = m_renderer.style().shapeMargin();
Length padding = m_renderer.style().shapePadding();
float shapeImageThreshold = m_renderer.style().shapeImageThreshold();
Modified: trunk/Source/WebCore/rendering/shapes/ShapeInfo.h (160242 => 160243)
--- trunk/Source/WebCore/rendering/shapes/ShapeInfo.h 2013-12-06 20:59:16 UTC (rev 160242)
+++ trunk/Source/WebCore/rendering/shapes/ShapeInfo.h 2013-12-06 21:02:22 UTC (rev 160243)
@@ -165,6 +165,8 @@
virtual ShapeValue* shapeValue() const = 0;
virtual void getIntervals(LayoutUnit, LayoutUnit, SegmentList&) const = 0;
+ virtual WritingMode writingMode() const { return m_renderer.style().writingMode(); }
+
LayoutUnit logicalTopOffset() const
{
BasicShape::ReferenceBox box = resolvedBox();
Modified: trunk/Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp (160242 => 160243)
--- trunk/Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp 2013-12-06 20:59:16 UTC (rev 160242)
+++ trunk/Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp 2013-12-06 21:02:22 UTC (rev 160243)
@@ -100,6 +100,12 @@
return m_renderer.style().shapeOutside();
}
+WritingMode ShapeOutsideInfo::writingMode() const
+{
+ ASSERT(m_renderer.containingBlock());
+ return m_renderer.containingBlock()->style().writingMode();
}
+}
+
#endif
Modified: trunk/Source/WebCore/rendering/shapes/ShapeOutsideInfo.h (160242 => 160243)
--- trunk/Source/WebCore/rendering/shapes/ShapeOutsideInfo.h 2013-12-06 20:59:16 UTC (rev 160242)
+++ trunk/Source/WebCore/rendering/shapes/ShapeOutsideInfo.h 2013-12-06 21:02:22 UTC (rev 160243)
@@ -79,6 +79,8 @@
return computedShape().getExcludedIntervals(lineTop, lineHeight, segments);
}
+ virtual WritingMode writingMode() const;
+
LayoutUnit m_leftMarginBoxDelta;
LayoutUnit m_rightMarginBoxDelta;
LayoutUnit m_lineTop;
_______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes