Title: [147505] trunk
- Revision
- 147505
- Author
- [email protected]
- Date
- 2013-04-02 16:17:18 -0700 (Tue, 02 Apr 2013)
Log Message
Padding applied twice for empty generated RenderInlines
https://bugs.webkit.org/show_bug.cgi?id=113800
Source/WebCore:
Reviewed by Levi Weintraub.
The padding for empty generated content render objects is
incorrectly applied twice. Regression from r140693.
Test: fast/css-generated-content/margin-empty-content.html
* rendering/RenderBlockLineLayout.cpp:
(WebCore::inlineLogicalWidth):
LayoutTests:
Reviewed by Levi Weintraub.
Add test for empty generated content with padding.
* fast/css-generated-content/margin-empty-content-expected.html: Added.
* fast/css-generated-content/margin-empty-content.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (147504 => 147505)
--- trunk/LayoutTests/ChangeLog 2013-04-02 23:10:49 UTC (rev 147504)
+++ trunk/LayoutTests/ChangeLog 2013-04-02 23:17:18 UTC (rev 147505)
@@ -1,3 +1,15 @@
+2013-04-02 Emil A Eklund <[email protected]>
+
+ Padding applied twice for empty generated RenderInlines
+ https://bugs.webkit.org/show_bug.cgi?id=113800
+
+ Reviewed by Levi Weintraub.
+
+ Add test for empty generated content with padding.
+
+ * fast/css-generated-content/margin-empty-content-expected.html: Added.
+ * fast/css-generated-content/margin-empty-content.html: Added.
+
2013-04-02 Levi Weintraub <[email protected]>
InlineIterator needs to be updated when RenderCombineText shrinks at a line break
Added: trunk/LayoutTests/fast/css-generated-content/margin-empty-content-expected.html (0 => 147505)
--- trunk/LayoutTests/fast/css-generated-content/margin-empty-content-expected.html (rev 0)
+++ trunk/LayoutTests/fast/css-generated-content/margin-empty-content-expected.html 2013-04-02 23:17:18 UTC (rev 147505)
@@ -0,0 +1,20 @@
+<html>
+ <head>
+ <style>
+ ul {
+ list-style-type: none;
+ }
+ li {
+ display: inline-block;
+ }
+ li:after {
+ margin: 0 0 0 1px;
+ }
+ </style>
+ </head>
+ <body>
+ <ul>
+ <li>Should not wrap</li>
+ </ul>
+ </body>
+</html>
Added: trunk/LayoutTests/fast/css-generated-content/margin-empty-content.html (0 => 147505)
--- trunk/LayoutTests/fast/css-generated-content/margin-empty-content.html (rev 0)
+++ trunk/LayoutTests/fast/css-generated-content/margin-empty-content.html 2013-04-02 23:17:18 UTC (rev 147505)
@@ -0,0 +1,21 @@
+<html>
+ <head>
+ <style>
+ ul {
+ list-style-type: none;
+ }
+ li {
+ display: inline-block;
+ }
+ li:after {
+ margin: 0 0 0 1px;
+ content: "";
+ }
+ </style>
+ </head>
+ <body>
+ <ul>
+ <li>Should not wrap</li>
+ </ul>
+ </body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (147504 => 147505)
--- trunk/Source/WebCore/ChangeLog 2013-04-02 23:10:49 UTC (rev 147504)
+++ trunk/Source/WebCore/ChangeLog 2013-04-02 23:17:18 UTC (rev 147505)
@@ -1,3 +1,18 @@
+2013-04-02 Emil A Eklund <[email protected]>
+
+ Padding applied twice for empty generated RenderInlines
+ https://bugs.webkit.org/show_bug.cgi?id=113800
+
+ Reviewed by Levi Weintraub.
+
+ The padding for empty generated content render objects is
+ incorrectly applied twice. Regression from r140693.
+
+ Test: fast/css-generated-content/margin-empty-content.html
+
+ * rendering/RenderBlockLineLayout.cpp:
+ (WebCore::inlineLogicalWidth):
+
2013-04-02 Levi Weintraub <[email protected]>
InlineIterator needs to be updated when RenderCombineText shrinks at a line break
Modified: trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp (147504 => 147505)
--- trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp 2013-04-02 23:10:49 UTC (rev 147504)
+++ trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp 2013-04-02 23:17:18 UTC (rev 147505)
@@ -322,12 +322,14 @@
RenderObject* parent = child->parent();
while (parent->isRenderInline() && lineDepth++ < cMaxLineDepth) {
RenderInline* parentAsRenderInline = toRenderInline(parent);
- if (start && shouldAddBorderPaddingMargin(child->previousSibling(), start))
- extraWidth += borderPaddingMarginStart(parentAsRenderInline);
- if (end && shouldAddBorderPaddingMargin(child->nextSibling(), end))
- extraWidth += borderPaddingMarginEnd(parentAsRenderInline);
- if (!start && !end)
- return extraWidth;
+ if (!isEmptyInline(parentAsRenderInline)) {
+ if (start && shouldAddBorderPaddingMargin(child->previousSibling(), start))
+ extraWidth += borderPaddingMarginStart(parentAsRenderInline);
+ if (end && shouldAddBorderPaddingMargin(child->nextSibling(), end))
+ extraWidth += borderPaddingMarginEnd(parentAsRenderInline);
+ if (!start && !end)
+ return extraWidth;
+ }
child = parent;
parent = child->parent();
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes