Title: [192976] branches/safari-601.1.46-branch

Diff

Modified: branches/safari-601.1.46-branch/LayoutTests/ChangeLog (192975 => 192976)


--- branches/safari-601.1.46-branch/LayoutTests/ChangeLog	2015-12-02 23:04:16 UTC (rev 192975)
+++ branches/safari-601.1.46-branch/LayoutTests/ChangeLog	2015-12-02 23:04:21 UTC (rev 192976)
@@ -1,5 +1,20 @@
 2015-12-01  Matthew Hanson  <matthew_han...@apple.com>
 
+        Merge r192169. rdar://problem/23189763
+
+    2015-11-09  Myles C. Maxfield  <mmaxfi...@apple.com>
+
+            Some style changes cause tatechuyoko to be drawn off center
+            https://bugs.webkit.org/show_bug.cgi?id=150986
+            <rdar://problem/20748013>
+
+            Reviewed by Darin Adler.
+
+            * fast/text/text-combine-style-change-extra-layout-expected.html: Added.
+            * fast/text/text-combine-style-change-extra-layout.html: Added.
+
+2015-12-01  Matthew Hanson  <matthew_han...@apple.com>
+
         Merge r190383. rdar://problem/23432383
 
     2015-09-30  Katlyn Graff  <kgr...@apple.com>

Added: branches/safari-601.1.46-branch/LayoutTests/fast/text/text-combine-style-change-extra-layout-expected.html (0 => 192976)


--- branches/safari-601.1.46-branch/LayoutTests/fast/text/text-combine-style-change-extra-layout-expected.html	                        (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/fast/text/text-combine-style-change-extra-layout-expected.html	2015-12-02 23:04:21 UTC (rev 192976)
@@ -0,0 +1,12 @@
+<html>
+    <head>
+        <style>
+        #w {
+            background-color: green;
+        }
+        </style>
+    </head>
+    <body style="-webkit-writing-mode: vertical-rl; font-size: 320px;">
+        <span id="w" style="-webkit-text-combine: horizontal;">39</span>
+    </body>
+</html>

Added: branches/safari-601.1.46-branch/LayoutTests/fast/text/text-combine-style-change-extra-layout.html (0 => 192976)


--- branches/safari-601.1.46-branch/LayoutTests/fast/text/text-combine-style-change-extra-layout.html	                        (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/fast/text/text-combine-style-change-extra-layout.html	2015-12-02 23:04:21 UTC (rev 192976)
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <style>
+            .asdf {
+                background-color: green;
+            }
+        </style>
+    </head>
+    <body style="-webkit-writing-mode: vertical-rl; font-size: 320px;">
+        <span id="w" style="-webkit-text-combine: horizontal;">39</span>
+		<script>
+            if (window.testRunner)
+                testRunner.waitUntilDone();
+            window.setTimeout(function() {
+                document.getElementById("w").className = "asdf";
+                if (window.testRunner)
+                    testRunner.notifyDone();
+            }, 0);
+        </script>
+    </body>
+</html>

Modified: branches/safari-601.1.46-branch/Source/WebCore/ChangeLog (192975 => 192976)


--- branches/safari-601.1.46-branch/Source/WebCore/ChangeLog	2015-12-02 23:04:16 UTC (rev 192975)
+++ branches/safari-601.1.46-branch/Source/WebCore/ChangeLog	2015-12-02 23:04:21 UTC (rev 192976)
@@ -1,5 +1,29 @@
 2015-12-01  Matthew Hanson  <matthew_han...@apple.com>
 
+        Merge r192169. rdar://problem/23189763
+
+    2015-11-09  Myles C. Maxfield  <mmaxfi...@apple.com>
+
+            Some style changes cause tatechuyoko to be drawn off center
+            https://bugs.webkit.org/show_bug.cgi?id=150986
+            <rdar://problem/20748013>
+
+            Reviewed by Darin Adler.
+
+            Layouts should be idempotent. In particular, during layout, an element should not
+            rely on a previous call to styleDidChange() with a sufficiently high StyleDifference.
+            RenderCombineText was assuming that, if a layout occurs, a previous call to
+            styleDidChange() would have reset the renderedText. However, an ancestor element might
+            cause the RenderCombineText to re-combine when it is already combined. Therefore, the
+            recombination should fully uncombine before recombining.
+
+            Test: fast/text/text-combine-style-change-extra-layout.html
+
+            * rendering/RenderCombineText.cpp:
+            (WebCore::RenderCombineText::combineText): Fully uncombine before recombining.
+
+2015-12-01  Matthew Hanson  <matthew_han...@apple.com>
+
         Merge r190383. rdar://problem/23432383
 
     2015-09-30  Katlyn Graff  <kgr...@apple.com>

Modified: branches/safari-601.1.46-branch/Source/WebCore/rendering/RenderCombineText.cpp (192975 => 192976)


--- branches/safari-601.1.46-branch/Source/WebCore/rendering/RenderCombineText.cpp	2015-12-02 23:04:16 UTC (rev 192975)
+++ branches/safari-601.1.46-branch/Source/WebCore/rendering/RenderCombineText.cpp	2015-12-02 23:04:21 UTC (rev 192976)
@@ -90,6 +90,10 @@
     if (!m_needsFontUpdate)
         return;
 
+    // An ancestor element may trigger us to lay out again, even when we're already combined.
+    if (m_isCombined)
+        RenderText::setRenderedText(originalText());
+
     m_isCombined = false;
     m_needsFontUpdate = false;
 
@@ -171,8 +175,8 @@
         m_combineFontStyle->fontCascade().update(fontSelector);
 
     if (m_isCombined) {
-        DEPRECATED_DEFINE_STATIC_LOCAL(String, objectReplacementCharacterString, (&objectReplacementCharacter, 1));
-        RenderText::setRenderedText(objectReplacementCharacterString.impl());
+        static NeverDestroyed<String> objectReplacementCharacterString(&objectReplacementCharacter, 1);
+        RenderText::setRenderedText(objectReplacementCharacterString.get());
         m_combinedTextSize = FloatSize(combinedTextWidth, glyphOverflow.bottom + glyphOverflow.top);
     }
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to