Title: [207942] releases/WebKitGTK/webkit-2.14
- Revision
- 207942
- Author
- [email protected]
- Date
- 2016-10-26 23:46:27 -0700 (Wed, 26 Oct 2016)
Log Message
Merge r206821 - Missing quotation mark when <q> gets reparented.
https://bugs.webkit.org/show_bug.cgi?id=162940
Reviewed by Darin Adler.
Source/WebCore:
When an opening RenderQuote gets removed due to some change in the render tree,
we notify the closing RenderQuote so that it can update its content (") accordingly (and vice versa).
However when the same RenderQuote is added back to the render tree (aka reparenting), we fail to
let the other RenderQuote know about it and its content becomes stale.
This patch ensures that when either the opening or closing part of the quotation mark gets reparented,
we inform the other, corresponding opening/closing renderer about it.
Test: fast/css-generated-content/missing-quotes-with-dynamic-content.html
* dom/PseudoElement.cpp:
(WebCore::PseudoElement::didAttachRenderers):
* rendering/RenderQuote.cpp:
(WebCore::RenderQuote::insertedIntoTree):
* rendering/RenderQuote.h:
LayoutTests:
The position of the closing quotation mark is driven by the multicolumn code hence the cover div.
* fast/css-generated-content/missing-quotes-with-dynamic-content-expected.html: Added.
* fast/css-generated-content/missing-quotes-with-dynamic-content.html: Added.
Modified Paths
Added Paths
Diff
Modified: releases/WebKitGTK/webkit-2.14/LayoutTests/ChangeLog (207941 => 207942)
--- releases/WebKitGTK/webkit-2.14/LayoutTests/ChangeLog 2016-10-27 06:40:26 UTC (rev 207941)
+++ releases/WebKitGTK/webkit-2.14/LayoutTests/ChangeLog 2016-10-27 06:46:27 UTC (rev 207942)
@@ -1,3 +1,15 @@
+2016-10-05 Zalan Bujtas <[email protected]>
+
+ Missing quotation mark when <q> gets reparented.
+ https://bugs.webkit.org/show_bug.cgi?id=162940
+
+ Reviewed by Darin Adler.
+
+ The position of the closing quotation mark is driven by the multicolumn code hence the cover div.
+
+ * fast/css-generated-content/missing-quotes-with-dynamic-content-expected.html: Added.
+ * fast/css-generated-content/missing-quotes-with-dynamic-content.html: Added.
+
2016-10-03 Brent Fulgham <[email protected]>
Avoid null dereference when changing focus in design mode.
Added: releases/WebKitGTK/webkit-2.14/LayoutTests/fast/css-generated-content/missing-quotes-with-dynamic-content-expected.html (0 => 207942)
--- releases/WebKitGTK/webkit-2.14/LayoutTests/fast/css-generated-content/missing-quotes-with-dynamic-content-expected.html (rev 0)
+++ releases/WebKitGTK/webkit-2.14/LayoutTests/fast/css-generated-content/missing-quotes-with-dynamic-content-expected.html 2016-10-27 06:46:27 UTC (rev 207942)
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<title>This tests that we render both quotation marks.</title>
+<style>
+</style>
+</head>
+<body>
+<div style="font-size: 10px; width: 40px;">"</div>
+<div style="margin-left: 8px; margin-top: -20px; width: 20px; height: 20px; background-color: black;"></div>
+</body>
+</html>
Added: releases/WebKitGTK/webkit-2.14/LayoutTests/fast/css-generated-content/missing-quotes-with-dynamic-content.html (0 => 207942)
--- releases/WebKitGTK/webkit-2.14/LayoutTests/fast/css-generated-content/missing-quotes-with-dynamic-content.html (rev 0)
+++ releases/WebKitGTK/webkit-2.14/LayoutTests/fast/css-generated-content/missing-quotes-with-dynamic-content.html 2016-10-27 06:46:27 UTC (rev 207942)
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<title>This tests that we render both quotation marks.</title>
+<style>
+ q::before {
+ column-count: 2;
+ float: right;
+ }
+</style>
+</head>
+<body>
+<div style="font-size: 10px; width: 40px;"><q></q></div>
+<div style="margin-left: 8px; margin-top: -20px; width: 20px; height: 20px; background-color: black;"></div>
+</body>
+</html>
Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog (207941 => 207942)
--- releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog 2016-10-27 06:40:26 UTC (rev 207941)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog 2016-10-27 06:46:27 UTC (rev 207942)
@@ -1,3 +1,25 @@
+2016-10-05 Zalan Bujtas <[email protected]>
+
+ Missing quotation mark when <q> gets reparented.
+ https://bugs.webkit.org/show_bug.cgi?id=162940
+
+ Reviewed by Darin Adler.
+
+ When an opening RenderQuote gets removed due to some change in the render tree,
+ we notify the closing RenderQuote so that it can update its content (") accordingly (and vice versa).
+ However when the same RenderQuote is added back to the render tree (aka reparenting), we fail to
+ let the other RenderQuote know about it and its content becomes stale.
+ This patch ensures that when either the opening or closing part of the quotation mark gets reparented,
+ we inform the other, corresponding opening/closing renderer about it.
+
+ Test: fast/css-generated-content/missing-quotes-with-dynamic-content.html
+
+ * dom/PseudoElement.cpp:
+ (WebCore::PseudoElement::didAttachRenderers):
+ * rendering/RenderQuote.cpp:
+ (WebCore::RenderQuote::insertedIntoTree):
+ * rendering/RenderQuote.h:
+
2016-10-03 Zalan Bujtas <[email protected]>
[ListItems] Render tree should be all clean by the end of FrameView::layout().
Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/dom/PseudoElement.cpp (207941 => 207942)
--- releases/WebKitGTK/webkit-2.14/Source/WebCore/dom/PseudoElement.cpp 2016-10-27 06:40:26 UTC (rev 207941)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/dom/PseudoElement.cpp 2016-10-27 06:46:27 UTC (rev 207942)
@@ -96,12 +96,8 @@
for (const ContentData* content = style.contentData(); content; content = content->next()) {
auto child = content->createContentRenderer(document(), style);
- if (renderer->isChildAllowed(*child, style)) {
- auto* childPtr = child.get();
+ if (renderer->isChildAllowed(*child, style))
renderer->addChild(child.leakPtr());
- if (is<RenderQuote>(*childPtr))
- downcast<RenderQuote>(*childPtr).attachQuote();
- }
}
}
Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderQuote.cpp (207941 => 207942)
--- releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderQuote.cpp 2016-10-27 06:40:26 UTC (rev 207941)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderQuote.cpp 2016-10-27 06:46:27 UTC (rev 207942)
@@ -47,6 +47,12 @@
ASSERT(!m_previous);
}
+void RenderQuote::insertedIntoTree()
+{
+ RenderInline::insertedIntoTree();
+ attachQuote();
+}
+
void RenderQuote::willBeRemovedFromTree()
{
RenderInline::willBeRemovedFromTree();
Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderQuote.h (207941 => 207942)
--- releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderQuote.h 2016-10-27 06:40:26 UTC (rev 207941)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderQuote.h 2016-10-27 06:46:27 UTC (rev 207942)
@@ -40,6 +40,7 @@
const char* renderName() const override { return "RenderQuote"; }
bool isQuote() const override { return true; }
void styleDidChange(StyleDifference, const RenderStyle*) override;
+ void insertedIntoTree() override;
void willBeRemovedFromTree() override;
String computeText() const;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes