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

Changeset 179847 in webkit


Ignore:
Timestamp:
Feb 9, 2015, 3:19:20 PM (12 years ago)
Author:
enrica@apple.com
Message:

Selection flickers when trying to change size of selection.
https://bugs.webkit.org/show_bug.cgi?id=141404
rdar://problem/18824863

Reviewed by Benjamin Poulain.

When looking for the contracted range from the current range,
we were incorrectly choosing a selection whose rectangle is empty
as a best match candidate. This was throwing off all the logic
and producing a contracted range whose rectangle was bigger than the
expanded range, therefore producing a shrink threshold larger than the
growth one.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::contractedRangeFromHandle):

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r179828 r179847  
     12015-02-09  Enrica Casucci  <enrica@apple.com>
     2
     3        Selection flickers when trying to change size of selection.
     4        https://bugs.webkit.org/show_bug.cgi?id=141404
     5        rdar://problem/18824863
     6
     7        Reviewed by Benjamin Poulain.
     8
     9        When looking for the contracted range from the current range,
     10        we were incorrectly choosing a selection whose rectangle is empty
     11        as a best match candidate. This was throwing off all the logic
     12        and producing a contracted range whose rectangle was bigger than the
     13        expanded range, therefore producing a shrink threshold larger than the
     14        growth one.
     15
     16        * WebProcess/WebPage/ios/WebPageIOS.mm:
     17        (WebKit::WebPage::contractedRangeFromHandle):
     18
    1192015-02-09  Brian J. Burg  <burg@cs.washington.edu>
    220
  • trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm

    r179409 r179847  
    12751275        IntRect copyRect = selectionBoxForRange(newRange.get());
    12761276        if (copyRect.isEmpty()) {
    1277             bestRange = rangeForBlockAtPoint(testPoint);
    1278             break;
     1277            // If the new range is an empty rectangle, we try the block at the current point
     1278            // and see if that has a rectangle that is a better choice.
     1279            newRange = rangeForBlockAtPoint(testPoint);
     1280            copyRect = selectionBoxForRange(newRange.get());
    12791281        }
    12801282        bool isBetterChoice;
Note: See TracChangeset for help on using the changeset viewer.