Title: [290925] branches/safari-613-branch/Source/WebCore
Revision
290925
Author
[email protected]
Date
2022-03-07 14:09:33 -0800 (Mon, 07 Mar 2022)

Log Message

Cherry-pick r289859. rdar://problem/88491516

    Skip positioned objects and line break boxes as they have no affect on width
    https://bugs.webkit.org/show_bug.cgi?id=236514

    Patch by Brandon Stewart <[email protected]> on 2022-02-15
    Reviewed by Myles C. Maxfield.

    Align computeInlineDirectionPositionsForSegment() and computeExpansionForJustifiedText() logic.
    Skipping positioned objects and line break boxes as they will not affect the width.

    * rendering/LegacyLineLayout.cpp:
    (WebCore::LegacyLineLayout::computeExpansionForJustifiedText):

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

Modified Paths

Diff

Modified: branches/safari-613-branch/Source/WebCore/ChangeLog (290924 => 290925)


--- branches/safari-613-branch/Source/WebCore/ChangeLog	2022-03-07 22:09:30 UTC (rev 290924)
+++ branches/safari-613-branch/Source/WebCore/ChangeLog	2022-03-07 22:09:33 UTC (rev 290925)
@@ -1,5 +1,36 @@
 2022-03-07  Russell Epstein  <[email protected]>
 
+        Cherry-pick r289859. rdar://problem/88491516
+
+    Skip positioned objects and line break boxes as they have no affect on width
+    https://bugs.webkit.org/show_bug.cgi?id=236514
+    
+    Patch by Brandon Stewart <[email protected]> on 2022-02-15
+    Reviewed by Myles C. Maxfield.
+    
+    Align computeInlineDirectionPositionsForSegment() and computeExpansionForJustifiedText() logic.
+    Skipping positioned objects and line break boxes as they will not affect the width.
+    
+    * rendering/LegacyLineLayout.cpp:
+    (WebCore::LegacyLineLayout::computeExpansionForJustifiedText):
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289859 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2022-02-15  Brandon Stewart  <[email protected]>
+
+            Skip positioned objects and line break boxes as they have no affect on width
+            https://bugs.webkit.org/show_bug.cgi?id=236514
+
+            Reviewed by Myles C. Maxfield.
+
+            Align computeInlineDirectionPositionsForSegment() and computeExpansionForJustifiedText() logic.
+            Skipping positioned objects and line break boxes as they will not affect the width.
+
+            * rendering/LegacyLineLayout.cpp:
+            (WebCore::LegacyLineLayout::computeExpansionForJustifiedText):
+
+2022-03-07  Russell Epstein  <[email protected]>
+
         Cherry-pick r289814. rdar://problem/83101090
 
     Do not update the fragmented flow state while internally mutating the render tree

Modified: branches/safari-613-branch/Source/WebCore/rendering/LegacyLineLayout.cpp (290924 => 290925)


--- branches/safari-613-branch/Source/WebCore/rendering/LegacyLineLayout.cpp	2022-03-07 22:09:30 UTC (rev 290924)
+++ branches/safari-613-branch/Source/WebCore/rendering/LegacyLineLayout.cpp	2022-03-07 22:09:33 UTC (rev 290925)
@@ -607,7 +607,12 @@
     for (BidiRun* run = firstRun; run; run = run->next()) {
         if (!run->box() || run == trailingSpaceRun)
             continue;
-        
+
+        // Positioned objects are only participating to figure out their correct static x position.
+        // They have no affect on the width. Similarly, line break boxes have no affect on the width.
+        if (run->renderer().isOutOfFlowPositioned() || run->box()->isLineBreak())
+            continue;
+
         if (is<RenderText>(run->renderer())) {
             unsigned opportunitiesInRun = expansionOpportunities[i++];
             
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to