Title: [200302] trunk
- Revision
- 200302
- Author
- [email protected]
- Date
- 2016-04-30 23:07:35 -0700 (Sat, 30 Apr 2016)
Log Message
REGRESSION (r199640): position:absolute generated content inherits text-decoration from its element
https://bugs.webkit.org/show_bug.cgi?id=157199
<rdar://problem/26013111>
Reviewed by Zalan Bujtas.
Source/WebCore:
Test: fast/css/text-decoration-inheritance-pseudo.html
* css/StyleResolver.cpp:
(WebCore::doesNotInheritTextDecoration):
(WebCore::StyleResolver::adjustRenderStyle):
There was an accidental logic change here. Even if element is null other conditions may make this test true.
LayoutTests:
* fast/css/text-decoration-inheritance-pseudo-expected.html: Added.
* fast/css/text-decoration-inheritance-pseudo.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (200301 => 200302)
--- trunk/LayoutTests/ChangeLog 2016-05-01 05:42:25 UTC (rev 200301)
+++ trunk/LayoutTests/ChangeLog 2016-05-01 06:07:35 UTC (rev 200302)
@@ -1,3 +1,14 @@
+2016-04-30 Antti Koivisto <[email protected]>
+
+ REGRESSION (r199640): position:absolute generated content inherits text-decoration from its element
+ https://bugs.webkit.org/show_bug.cgi?id=157199
+ <rdar://problem/26013111>
+
+ Reviewed by Zalan Bujtas.
+
+ * fast/css/text-decoration-inheritance-pseudo-expected.html: Added.
+ * fast/css/text-decoration-inheritance-pseudo.html: Added.
+
2016-04-30 Zalan Bujtas <[email protected]>
Some content causes deep recursion.
Added: trunk/LayoutTests/fast/css/text-decoration-inheritance-pseudo-expected.html (0 => 200302)
--- trunk/LayoutTests/fast/css/text-decoration-inheritance-pseudo-expected.html (rev 0)
+++ trunk/LayoutTests/fast/css/text-decoration-inheritance-pseudo-expected.html 2016-05-01 06:07:35 UTC (rev 200302)
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<style>
+.link1, .link2 {
+ text-decoration: none;
+ color: green;
+}
+.link1::before {
+ content: "before content ";
+ text-decoration: underline;
+}
+.link1::after {
+ content: " after content";
+ text-decoration: underline;
+}
+.link2::before {
+ content: "before content ";
+ position: absolute;
+ top: 90px;
+}
+.link2::after {
+ content: " after content";
+ position: absolute;
+}
+.underline {
+ text-decoration: underline;
+}
+</style>
+<p>Test that text decoration is not inherited to a positioned :before/:after pseudo element.</p>
+
+<span class="link1"><span class="underline">normal content</span></span>
+<br>
+<span class="link2"><span class="underline">normal content</span></span>
Added: trunk/LayoutTests/fast/css/text-decoration-inheritance-pseudo.html (0 => 200302)
--- trunk/LayoutTests/fast/css/text-decoration-inheritance-pseudo.html (rev 0)
+++ trunk/LayoutTests/fast/css/text-decoration-inheritance-pseudo.html 2016-05-01 06:07:35 UTC (rev 200302)
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<style>
+:link {
+ color: green;
+}
+a::before {
+ content: "before content ";
+ text-decoration: none;
+}
+a::after {
+ content: " after content";
+ text-decoration: none;
+}
+.absolute::before {
+ position: absolute;
+ top: 90px;
+}
+.absolute::after {
+ position: absolute;
+}
+</style>
+<p>Test that text decoration is not inherited to a positioned :before/:after pseudo element.</p>
+
+<a href="" content</a>
+<br>
+<a class="absolute" href="" content</a>
Modified: trunk/Source/WebCore/ChangeLog (200301 => 200302)
--- trunk/Source/WebCore/ChangeLog 2016-05-01 05:42:25 UTC (rev 200301)
+++ trunk/Source/WebCore/ChangeLog 2016-05-01 06:07:35 UTC (rev 200302)
@@ -1,3 +1,19 @@
+2016-04-30 Antti Koivisto <[email protected]>
+
+ REGRESSION (r199640): position:absolute generated content inherits text-decoration from its element
+ https://bugs.webkit.org/show_bug.cgi?id=157199
+ <rdar://problem/26013111>
+
+ Reviewed by Zalan Bujtas.
+
+ Test: fast/css/text-decoration-inheritance-pseudo.html
+
+ * css/StyleResolver.cpp:
+ (WebCore::doesNotInheritTextDecoration):
+ (WebCore::StyleResolver::adjustRenderStyle):
+
+ There was an accidental logic change here. Even if element is null other conditions may make this test true.
+
2016-04-30 Zalan Bujtas <[email protected]>
Some content causes deep recursion.
Modified: trunk/Source/WebCore/css/StyleResolver.cpp (200301 => 200302)
--- trunk/Source/WebCore/css/StyleResolver.cpp 2016-05-01 05:42:25 UTC (rev 200301)
+++ trunk/Source/WebCore/css/StyleResolver.cpp 2016-05-01 06:07:35 UTC (rev 200302)
@@ -741,10 +741,10 @@
// CSS requires text-decoration to be reset at each DOM element for tables,
// inline blocks, inline tables, shadow DOM crossings, floating elements,
// and absolute or relatively positioned elements.
-static bool doesNotInheritTextDecoration(const RenderStyle& style, const Element& element)
+static bool doesNotInheritTextDecoration(const RenderStyle& style, const Element* element)
{
return style.display() == TABLE || style.display() == INLINE_TABLE
- || style.display() == INLINE_BLOCK || style.display() == INLINE_BOX || isAtShadowBoundary(element)
+ || style.display() == INLINE_BLOCK || style.display() == INLINE_BOX || (element && isAtShadowBoundary(*element))
|| style.isFloating() || style.hasOutOfFlowPosition();
}
@@ -912,7 +912,7 @@
}
}
- if (element && doesNotInheritTextDecoration(style, *element))
+ if (doesNotInheritTextDecoration(style, element))
style.setTextDecorationsInEffect(style.textDecoration());
else
style.addToTextDecorationsInEffect(style.textDecoration());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes