Title: [267260] branches/safari-610-branch/Source/WebCore
Revision
267260
Author
[email protected]
Date
2020-09-18 12:35:45 -0700 (Fri, 18 Sep 2020)

Log Message

Cherry-pick r266375. rdar://problem/69101035

    Avoid computing metadata for idempotent text autosizing on macOS
    https://bugs.webkit.org/show_bug.cgi?id=216011

    Reviewed by Darin Adler.

    Avoids an unnecessary call to `adjustForTextAutosizing` during style resolution on macOS, where idempotent text
    autosizing is disabled. This function call populates the `AutosizeStatus` fields on `RenderStyle` that are used
    by the idempotent text autosizing heuristic. This function call appears consistently in traces taken while
    running the Multiply subtest of MotionMark, if only for a relatively small number of samples. While
    `AutosizeStatus::computeStatus` is designed to be very cheap, it ends up being called around 1.6 million times
    over the course of the subtest.

    * style/StyleAdjuster.cpp:
    (WebCore::Style::Adjuster::adjust const):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266375 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-610-branch/Source/WebCore/ChangeLog (267259 => 267260)


--- branches/safari-610-branch/Source/WebCore/ChangeLog	2020-09-18 19:35:43 UTC (rev 267259)
+++ branches/safari-610-branch/Source/WebCore/ChangeLog	2020-09-18 19:35:45 UTC (rev 267260)
@@ -1,5 +1,44 @@
 2020-09-17  Alan Coon  <[email protected]>
 
+        Cherry-pick r266375. rdar://problem/69101035
+
+    Avoid computing metadata for idempotent text autosizing on macOS
+    https://bugs.webkit.org/show_bug.cgi?id=216011
+    
+    Reviewed by Darin Adler.
+    
+    Avoids an unnecessary call to `adjustForTextAutosizing` during style resolution on macOS, where idempotent text
+    autosizing is disabled. This function call populates the `AutosizeStatus` fields on `RenderStyle` that are used
+    by the idempotent text autosizing heuristic. This function call appears consistently in traces taken while
+    running the Multiply subtest of MotionMark, if only for a relatively small number of samples. While
+    `AutosizeStatus::computeStatus` is designed to be very cheap, it ends up being called around 1.6 million times
+    over the course of the subtest.
+    
+    * style/StyleAdjuster.cpp:
+    (WebCore::Style::Adjuster::adjust const):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266375 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2020-08-31  Wenson Hsieh  <[email protected]>
+
+            Avoid computing metadata for idempotent text autosizing on macOS
+            https://bugs.webkit.org/show_bug.cgi?id=216011
+
+            Reviewed by Darin Adler.
+
+            Avoids an unnecessary call to `adjustForTextAutosizing` during style resolution on macOS, where idempotent text
+            autosizing is disabled. This function call populates the `AutosizeStatus` fields on `RenderStyle` that are used
+            by the idempotent text autosizing heuristic. This function call appears consistently in traces taken while
+            running the Multiply subtest of MotionMark, if only for a relatively small number of samples. While
+            `AutosizeStatus::computeStatus` is designed to be very cheap, it ends up being called around 1.6 million times
+            over the course of the subtest.
+
+            * style/StyleAdjuster.cpp:
+            (WebCore::Style::Adjuster::adjust const):
+
+2020-09-17  Alan Coon  <[email protected]>
+
         Cherry-pick r266344. rdar://problem/69101085
 
     Make StyleRareNonInheritedData::mask and StyleBackgroundData::background DataRefs

Modified: branches/safari-610-branch/Source/WebCore/style/StyleAdjuster.cpp (267259 => 267260)


--- branches/safari-610-branch/Source/WebCore/style/StyleAdjuster.cpp	2020-09-18 19:35:43 UTC (rev 267259)
+++ branches/safari-610-branch/Source/WebCore/style/StyleAdjuster.cpp	2020-09-18 19:35:45 UTC (rev 267260)
@@ -490,7 +490,7 @@
         style.setEventListenerRegionTypes(computeEventListenerRegionTypes(*m_element, m_parentStyle.eventListenerRegionTypes()));
 
 #if ENABLE(TEXT_AUTOSIZING)
-    if (m_element)
+    if (m_element && m_document.settings().textAutosizingUsesIdempotentMode())
         adjustForTextAutosizing(style, *m_element);
 #endif
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to