⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 283290 in webkit


Ignore:
Timestamp:
Sep 29, 2021, 5:57:35 PM (5 years ago)
Author:
Alan Coon
Message:

Cherry-pick r283087. rdar://problem/83697121

Line iterator firstRun/lastRun may return runs from wrong lines
https://bugs.webkit.org/show_bug.cgi?id=230770
<rdar://problem/83509753>

Reviewed by Alan Bujtas.

Source/WebCore:

In some situation line iterator firstRun/lastRun could return runs from different lines.
This could lead to inconsistencies like firstRun being non-null while lastRun is null.

Test: editing/iterator-line-start-end.html

  • layout/integration/LayoutIntegrationLineIteratorModernPath.h: (WebCore::LayoutIntegration::LineIteratorModernPath::firstRun const): (WebCore::LayoutIntegration::LineIteratorModernPath::lastRun const):

Take care to only return runs from this line.

LayoutTests:

  • editing/iterator-line-start-end-expected.txt: Added.
  • editing/iterator-line-start-end.html: Added.

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

Location:
branches/safari-613.1.3-branch
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-613.1.3-branch/LayoutTests/ChangeLog

    r283079 r283290  
     12021-09-29  Alan Coon  <alancoon@apple.com>
     2
     3        Cherry-pick r283087. rdar://problem/83697121
     4
     5    Line iterator firstRun/lastRun may return runs from wrong lines
     6    https://bugs.webkit.org/show_bug.cgi?id=230770
     7    <rdar://problem/83509753>
     8   
     9    Reviewed by Alan Bujtas.
     10   
     11    Source/WebCore:
     12   
     13    In some situation line iterator firstRun/lastRun could return runs from different lines.
     14    This could lead to inconsistencies like firstRun being non-null while lastRun is null.
     15   
     16    Test: editing/iterator-line-start-end.html
     17   
     18    * layout/integration/LayoutIntegrationLineIteratorModernPath.h:
     19    (WebCore::LayoutIntegration::LineIteratorModernPath::firstRun const):
     20    (WebCore::LayoutIntegration::LineIteratorModernPath::lastRun const):
     21   
     22    Take care to only return runs from this line.
     23   
     24    LayoutTests:
     25   
     26    * editing/iterator-line-start-end-expected.txt: Added.
     27    * editing/iterator-line-start-end.html: Added.
     28   
     29   
     30    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@283087 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     31
     32    2021-09-26  Antti Koivisto  <antti@apple.com>
     33
     34            Line iterator firstRun/lastRun may return runs from wrong lines
     35            https://bugs.webkit.org/show_bug.cgi?id=230770
     36            <rdar://problem/83509753>
     37
     38            Reviewed by Alan Bujtas.
     39
     40            * editing/iterator-line-start-end-expected.txt: Added.
     41            * editing/iterator-line-start-end.html: Added.
     42
    1432021-09-23  Tim Nguyen  <ntim@apple.com>
    244
  • branches/safari-613.1.3-branch/Source/WebCore/ChangeLog

    r283084 r283290  
     12021-09-29  Alan Coon  <alancoon@apple.com>
     2
     3        Cherry-pick r283087. rdar://problem/83697121
     4
     5    Line iterator firstRun/lastRun may return runs from wrong lines
     6    https://bugs.webkit.org/show_bug.cgi?id=230770
     7    <rdar://problem/83509753>
     8   
     9    Reviewed by Alan Bujtas.
     10   
     11    Source/WebCore:
     12   
     13    In some situation line iterator firstRun/lastRun could return runs from different lines.
     14    This could lead to inconsistencies like firstRun being non-null while lastRun is null.
     15   
     16    Test: editing/iterator-line-start-end.html
     17   
     18    * layout/integration/LayoutIntegrationLineIteratorModernPath.h:
     19    (WebCore::LayoutIntegration::LineIteratorModernPath::firstRun const):
     20    (WebCore::LayoutIntegration::LineIteratorModernPath::lastRun const):
     21   
     22    Take care to only return runs from this line.
     23   
     24    LayoutTests:
     25   
     26    * editing/iterator-line-start-end-expected.txt: Added.
     27    * editing/iterator-line-start-end.html: Added.
     28   
     29   
     30    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@283087 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     31
     32    2021-09-26  Antti Koivisto  <antti@apple.com>
     33
     34            Line iterator firstRun/lastRun may return runs from wrong lines
     35            https://bugs.webkit.org/show_bug.cgi?id=230770
     36            <rdar://problem/83509753>
     37
     38            Reviewed by Alan Bujtas.
     39
     40            In some situation line iterator firstRun/lastRun could return runs from different lines.
     41            This could lead to inconsistencies like firstRun being non-null while lastRun is null.
     42
     43            Test: editing/iterator-line-start-end.html
     44
     45            * layout/integration/LayoutIntegrationLineIteratorModernPath.h:
     46            (WebCore::LayoutIntegration::LineIteratorModernPath::firstRun const):
     47            (WebCore::LayoutIntegration::LineIteratorModernPath::lastRun const):
     48
     49            Take care to only return runs from this line.
     50
    1512021-09-25  Alan Bujtas  <zalan@apple.com>
    252
  • branches/safari-613.1.3-branch/Source/WebCore/layout/integration/LayoutIntegrationLineIteratorModernPath.h

    r282961 r283290  
    103103        auto runIterator = RunIteratorModernPath { *m_inlineContent, line().firstBoxIndex() };
    104104        if (runIterator.box().isInlineBox())
    105             runIterator.traverseNextLeaf();
     105            runIterator.traverseNextOnLine();
    106106        return runIterator;
    107107    }
     
    114114        auto runIterator = RunIteratorModernPath { *m_inlineContent, line().firstBoxIndex() + boxCount - 1 };
    115115        if (runIterator.box().isInlineBox())
    116             runIterator.traversePreviousLeaf();
     116            runIterator.traversePreviousOnLine();
    117117        return runIterator;
    118118    }
Note: See TracChangeset for help on using the changeset viewer.