Title: [190570] trunk
Revision
190570
Author
[email protected]
Date
2015-10-05 12:55:24 -0700 (Mon, 05 Oct 2015)

Log Message

Mark the line dirty when RenderQuote's text changes.
https://bugs.webkit.org/show_bug.cgi?id=149784
rdar://problem/22558169

Reviewed by Antti Koivisto.

When quotation mark changes ( " -> ' or empty string), we
need to mark the line dirty to ensure its content gets laid out properly.

Source/WebCore:

Test: fast/inline/quotation-text-changes-dynamically.html

* rendering/RenderQuote.cpp:
(WebCore::quoteTextRenderer):
(WebCore::RenderQuote::updateText):
(WebCore::fragmentChild): Deleted.

LayoutTests:

* fast/inline/quotation-text-changes-dynamically-expected.txt: Added.
* fast/inline/quotation-text-changes-dynamically.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (190569 => 190570)


--- trunk/LayoutTests/ChangeLog	2015-10-05 19:35:32 UTC (rev 190569)
+++ trunk/LayoutTests/ChangeLog	2015-10-05 19:55:24 UTC (rev 190570)
@@ -1,3 +1,17 @@
+2015-10-05  Zalan Bujtas  <[email protected]>
+
+        Mark the line dirty when RenderQuote's text changes.
+        https://bugs.webkit.org/show_bug.cgi?id=149784
+        rdar://problem/22558169
+
+        Reviewed by Antti Koivisto.
+
+        When quotation mark changes ( " -> ' or empty string), we
+        need to mark the line dirty to ensure its content gets laid out properly.
+
+        * fast/inline/quotation-text-changes-dynamically-expected.txt: Added.
+        * fast/inline/quotation-text-changes-dynamically.html: Added.
+
 2015-10-05  Myles C. Maxfield  <[email protected]>
 
         Unprefix -webkit-font-feature-settings

Added: trunk/LayoutTests/fast/inline/quotation-text-changes-dynamically-expected.txt (0 => 190570)


--- trunk/LayoutTests/fast/inline/quotation-text-changes-dynamically-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/inline/quotation-text-changes-dynamically-expected.txt	2015-10-05 19:55:24 UTC (rev 190570)
@@ -0,0 +1 @@
+PASS if no crash or assert in debug

Added: trunk/LayoutTests/fast/inline/quotation-text-changes-dynamically.html (0 => 190570)


--- trunk/LayoutTests/fast/inline/quotation-text-changes-dynamically.html	                        (rev 0)
+++ trunk/LayoutTests/fast/inline/quotation-text-changes-dynamically.html	2015-10-05 19:55:24 UTC (rev 190570)
@@ -0,0 +1,23 @@
+<script>
+    if (window.testRunner)
+        testRunner.dumpAsText();
+</script>
+
+<style>
+q:before { 
+  position: fixed;
+  -webkit-animation-name: name1;
+  -webkit-animation-duration: 1s;
+} 
+
+@-webkit-keyframes name1 {
+  from {
+    column-width: 10px;
+  }
+  to {
+    column-width: 20px;
+  }
+}
+</style>
+
+<q>PASS if no crash or assert in debug</q>
\ No newline at end of file

Modified: trunk/Source/WebCore/ChangeLog (190569 => 190570)


--- trunk/Source/WebCore/ChangeLog	2015-10-05 19:35:32 UTC (rev 190569)
+++ trunk/Source/WebCore/ChangeLog	2015-10-05 19:55:24 UTC (rev 190570)
@@ -1,3 +1,21 @@
+2015-10-05  Zalan Bujtas  <[email protected]>
+
+        Mark the line dirty when RenderQuote's text changes.
+        https://bugs.webkit.org/show_bug.cgi?id=149784
+        rdar://problem/22558169
+
+        Reviewed by Antti Koivisto.
+
+        When quotation mark changes ( " -> ' or empty string), we
+        need to mark the line dirty to ensure its content gets laid out properly.
+
+        Test: fast/inline/quotation-text-changes-dynamically.html
+
+        * rendering/RenderQuote.cpp:
+        (WebCore::quoteTextRenderer):
+        (WebCore::RenderQuote::updateText):
+        (WebCore::fragmentChild): Deleted.
+
 2015-10-03  Filip Pizlo  <[email protected]>
 
         Allow an object's marking state to track The Three Colors

Modified: trunk/Source/WebCore/rendering/RenderQuote.cpp (190569 => 190570)


--- trunk/Source/WebCore/rendering/RenderQuote.cpp	2015-10-05 19:35:32 UTC (rev 190569)
+++ trunk/Source/WebCore/rendering/RenderQuote.cpp	2015-10-05 19:55:24 UTC (rev 190570)
@@ -330,7 +330,7 @@
     return apostropheString;
 }
 
-static RenderTextFragment* fragmentChild(RenderObject* lastChild)
+static RenderTextFragment* quoteTextRenderer(RenderObject* lastChild)
 {
     if (!lastChild)
         return nullptr;
@@ -349,8 +349,9 @@
     m_text = text;
     // Start from the end of the child list because, if we've had a first-letter
     // renderer inserted then the remaining text will be at the end.
-    if (auto* fragment = fragmentChild(lastChild())) {
-        fragment->setContentString(m_text);
+    if (auto* renderText = quoteTextRenderer(lastChild())) {
+        renderText->setContentString(m_text);
+        renderText->dirtyLineBoxes(false);
         return;
     }
     addChild(new RenderTextFragment(document(), m_text));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to