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

Changeset 248345 in webkit


Ignore:
Timestamp:
Aug 6, 2019, 11:52:19 PM (7 years ago)
Author:
Kocsen Chung
Message:

Cherry-pick r247730. rdar://problem/54017873

Long press hint of AirPods buy buttons are tall and narrow during animation
https://bugs.webkit.org/show_bug.cgi?id=200036
<rdar://problem/53145697>

Reviewed by Wenson Hsieh.

Source/WebCore:

New test: fast/text-indicator/text-indicator-with-tiny-child.html

  • dom/Range.cpp: (WebCore::Range::borderAndTextRects const):
  • dom/Range.h: Add a BoundingRectBehavior that ignores 1x1 and smaller rects.
  • page/TextIndicator.cpp: (WebCore::absoluteBoundingRectForRange): Enable IgnoreTinyRects.

LayoutTests:

  • fast/text-indicator/text-indicator-with-tiny-child-expected.txt: Added.
  • fast/text-indicator/text-indicator-with-tiny-child.html: Added.

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

Location:
branches/safari-608.1-branch
Files:
2 added
5 edited

Legend:

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

    r248344 r248345  
     12019-08-06  Kocsen Chung  <kocsen_chung@apple.com>
     2
     3        Cherry-pick r247730. rdar://problem/54017873
     4
     5    Long press hint of AirPods buy buttons are tall and narrow during animation
     6    https://bugs.webkit.org/show_bug.cgi?id=200036
     7    <rdar://problem/53145697>
     8   
     9    Reviewed by Wenson Hsieh.
     10   
     11    Source/WebCore:
     12   
     13    New test: fast/text-indicator/text-indicator-with-tiny-child.html
     14   
     15    * dom/Range.cpp:
     16    (WebCore::Range::borderAndTextRects const):
     17    * dom/Range.h:
     18    Add a BoundingRectBehavior that ignores 1x1 and smaller rects.
     19   
     20    * page/TextIndicator.cpp:
     21    (WebCore::absoluteBoundingRectForRange):
     22    Enable IgnoreTinyRects.
     23   
     24    LayoutTests:
     25   
     26    * fast/text-indicator/text-indicator-with-tiny-child-expected.txt: Added.
     27    * fast/text-indicator/text-indicator-with-tiny-child.html: Added.
     28   
     29   
     30    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247730 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     31
     32    2019-07-23  Tim Horton  <timothy_horton@apple.com>
     33
     34            Long press hint of AirPods buy buttons are tall and narrow during animation
     35            https://bugs.webkit.org/show_bug.cgi?id=200036
     36            <rdar://problem/53145697>
     37
     38            Reviewed by Wenson Hsieh.
     39
     40            * fast/text-indicator/text-indicator-with-tiny-child-expected.txt: Added.
     41            * fast/text-indicator/text-indicator-with-tiny-child.html: Added.
     42
    1432019-08-06  Kocsen Chung  <kocsen_chung@apple.com>
    244
  • branches/safari-608.1-branch/Source/WebCore/ChangeLog

    r248344 r248345  
     12019-08-06  Kocsen Chung  <kocsen_chung@apple.com>
     2
     3        Cherry-pick r247730. rdar://problem/54017873
     4
     5    Long press hint of AirPods buy buttons are tall and narrow during animation
     6    https://bugs.webkit.org/show_bug.cgi?id=200036
     7    <rdar://problem/53145697>
     8   
     9    Reviewed by Wenson Hsieh.
     10   
     11    Source/WebCore:
     12   
     13    New test: fast/text-indicator/text-indicator-with-tiny-child.html
     14   
     15    * dom/Range.cpp:
     16    (WebCore::Range::borderAndTextRects const):
     17    * dom/Range.h:
     18    Add a BoundingRectBehavior that ignores 1x1 and smaller rects.
     19   
     20    * page/TextIndicator.cpp:
     21    (WebCore::absoluteBoundingRectForRange):
     22    Enable IgnoreTinyRects.
     23   
     24    LayoutTests:
     25   
     26    * fast/text-indicator/text-indicator-with-tiny-child-expected.txt: Added.
     27    * fast/text-indicator/text-indicator-with-tiny-child.html: Added.
     28   
     29   
     30    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247730 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     31
     32    2019-07-23  Tim Horton  <timothy_horton@apple.com>
     33
     34            Long press hint of AirPods buy buttons are tall and narrow during animation
     35            https://bugs.webkit.org/show_bug.cgi?id=200036
     36            <rdar://problem/53145697>
     37
     38            Reviewed by Wenson Hsieh.
     39
     40            New test: fast/text-indicator/text-indicator-with-tiny-child.html
     41
     42            * dom/Range.cpp:
     43            (WebCore::Range::borderAndTextRects const):
     44            * dom/Range.h:
     45            Add a BoundingRectBehavior that ignores 1x1 and smaller rects.
     46
     47            * page/TextIndicator.cpp:
     48            (WebCore::absoluteBoundingRectForRange):
     49            Enable IgnoreTinyRects.
     50
    1512019-08-06  Kocsen Chung  <kocsen_chung@apple.com>
    252
  • branches/safari-608.1-branch/Source/WebCore/dom/Range.cpp

    r246695 r248345  
    18541854    }
    18551855
     1856    if (rectOptions.contains(BoundingRectBehavior::IgnoreTinyRects)) {
     1857        rects.removeAllMatching([&] (const FloatRect& rect) -> bool {
     1858            return rect.area() <= 1;
     1859        });
     1860    }
     1861
    18561862    return rects;
    18571863}
  • branches/safari-608.1-branch/Source/WebCore/dom/Range.h

    r246695 r248345  
    120120        RespectClipping = 1 << 0,
    121121        UseVisibleBounds = 1 << 1,
     122        IgnoreTinyRects = 1 << 2,
    122123    };
    123124
  • branches/safari-608.1-branch/Source/WebCore/page/TextIndicator.cpp

    r246948 r248345  
    227227    return range.absoluteBoundingRect({
    228228        Range::BoundingRectBehavior::RespectClipping,
    229         Range::BoundingRectBehavior::UseVisibleBounds
     229        Range::BoundingRectBehavior::UseVisibleBounds,
     230        Range::BoundingRectBehavior::IgnoreTinyRects,
    230231    });
    231232}
Note: See TracChangeset for help on using the changeset viewer.