WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-122243-20131002152829.patch (text/plain), 5.67 KB, created by
Bem Jones-Bey
on 2013-10-02 15:28:30 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Bem Jones-Bey
Created:
2013-10-02 15:28:30 PDT
Size:
5.67 KB
patch
obsolete
>Subversion Revision: 156797 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 707b71f4bf9caf4ba13555ef03a7ffbbcc019eb4..fbeb896d4daeee22a4beb9377f04509b975f0174 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,19 @@ >+2013-10-02 Bem Jones-Bey <bjonesbe@adobe.com> >+ >+ [css-shapes] shape-outside does not properly handle the container and the float having different writing modes >+ https://bugs.webkit.org/show_bug.cgi?id=122243 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ The margin box offset needs to be computed based on the writing mode >+ of the container, not the writihg mode of the float itself. This >+ patch makes that happen. >+ >+ Test: fast/shapes/shape-outside-floats/shape-outside-floats-different-writing-modes.html >+ >+ * rendering/shapes/ShapeOutsideInfo.cpp: >+ (WebCore::ShapeOutsideInfo::updateDeltasForContainingBlockLine): >+ > 2013-10-02 Andreas Kling <akling@apple.com> > > Remove Qt from WebCore/platform. >diff --git a/Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp b/Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp >index 077920a2daaf12b333c734dad4e43ff3e7274ec2..67e29b7ec768a56d961c26d90e555000e79696e6 100644 >--- a/Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp >+++ b/Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp >@@ -67,14 +67,14 @@ void ShapeOutsideInfo::updateDeltasForContainingBlockLine(const RenderBlock* con > if (lineOverlapsShapeBounds()) { > SegmentList segments = computeSegmentsForLine(lineTopInShapeCoordinates, lineHeight); > if (segments.size()) { >- m_leftMarginBoxDelta = segments[0].logicalLeft + m_renderer->marginStart(); >- m_rightMarginBoxDelta = segments[segments.size()-1].logicalRight - m_renderer->logicalWidth() - m_renderer->marginEnd(); >+ m_leftMarginBoxDelta = segments[0].logicalLeft + containingBlock->marginStartForChild(m_renderer); >+ m_rightMarginBoxDelta = segments[segments.size()-1].logicalRight - containingBlock->logicalWidthForChild(m_renderer) - containingBlock->marginEndForChild(m_renderer); > return; > } > } > >- m_leftMarginBoxDelta = m_renderer->logicalWidth() + m_renderer->marginStart(); >- m_rightMarginBoxDelta = -m_renderer->logicalWidth() - m_renderer->marginEnd(); >+ m_leftMarginBoxDelta = containingBlock->logicalWidthForChild(m_renderer) + containingBlock->marginStartForChild(m_renderer); >+ m_rightMarginBoxDelta = -containingBlock->logicalWidthForChild(m_renderer) - containingBlock->marginEndForChild(m_renderer); > } > } > >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index fd6311a0cde973186c4ca8283efd980fcf8ad1d6..164d3c1e346c3604a0a7d55e69085980e5de6a5b 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,16 @@ >+2013-10-02 Bem Jones-Bey <bjonesbe@adobe.com> >+ >+ [css-shapes] shape-outside does not properly handle the container and the float having different writing modes >+ https://bugs.webkit.org/show_bug.cgi?id=122243 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Test that the margins and width are properly computed in the case of >+ different writing modes. >+ >+ * fast/shapes/shape-outside-floats/shape-outside-floats-different-writing-modes-expected.html: Added. >+ * fast/shapes/shape-outside-floats/shape-outside-floats-different-writing-modes.html: Added. >+ > 2013-10-02 Manuel Rego Casasnovas <rego@igalia.com> > > [CSS Regions] Selection layout tests moved to specific folder >diff --git a/LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-different-writing-modes-expected.html b/LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-different-writing-modes-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..7b856a414848c6f0623a67b6e95d16040514ebef >--- /dev/null >+++ b/LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-different-writing-modes-expected.html >@@ -0,0 +1,22 @@ >+<!DOCTYPE html> >+<title>shape-outside on floats with a different writing mode in the float and the container</title> >+<style> >+ .container { >+ font: 20px/1 Ahem; >+ line-height: 20px; >+ } >+ .float { >+ height: 20px; >+ width: 40px; >+ margin: 0px 20px; >+ background-color: red; >+ color: green; >+ float: left; >+ } >+</style> >+<body> >+ <p>You should see a single green square. You should not see any red.</p> >+ <div class="container"> >+ <div class="float">XX</div> >+ </div> >+</body> >diff --git a/LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-different-writing-modes.html b/LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-different-writing-modes.html >new file mode 100644 >index 0000000000000000000000000000000000000000..7c72eeb526befc8ab9cf75c301ce282a539f142f >--- /dev/null >+++ b/LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-different-writing-modes.html >@@ -0,0 +1,25 @@ >+<!DOCTYPE html> >+<title>shape-outside on floats with a different writing mode in the float and the container</title> >+<style> >+ .container { >+ font: 20px/1 Ahem; >+ line-height: 20px; >+ color: green; >+ } >+ .float { >+ -webkit-writing-mode: vertical-lr; >+ -webkit-shape-outside: rectangle(-20px, 0, 20px, 20px); >+ height: 20px; >+ width: 40px; >+ margin: 0px 20px; >+ background-color: red; >+ float: left; >+ } >+</style> >+<body> >+ <p>You should see a single green square. You should not see any red.</p> >+ <div class="container"> >+ <div class="float"></div> >+ XX >+ </div> >+</body>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 122243
:
213207
|
213209