Changeset 221281 in webkit


Ignore:
Timestamp:
Aug 28, 2017 4:56:25 PM (7 years ago)
Author:
Megan Gardner
Message:

Fix incorrect enum in atBoundaryOfGranularity call
https://bugs.webkit.org/show_bug.cgi?id=176004

Reviewed by Wenson Hsieh and Enrica Casucci

Enum that was being used was incorrect, as that case in not covered in called function.
Resulted in a no-op. Should now have correct behavior around line boundaries.

Not possible to add tests for selections with velocity. Will attempt to add this behavior later.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::rangeAtWordBoundaryForPosition):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r221279 r221281  
     12017-08-28  Megan Gardner  <megan_gardner@apple.com>
     2
     3        Fix incorrect enum in atBoundaryOfGranularity call
     4        https://bugs.webkit.org/show_bug.cgi?id=176004
     5
     6        Reviewed by Wenson Hsieh and Enrica Casucci
     7
     8        Enum that was being used was incorrect, as that case in not covered in called function.
     9        Resulted in a no-op. Should now have correct behavior around line boundaries.
     10       
     11        Not possible to add tests for selections with velocity. Will attempt to add this behavior later.
     12
     13        * WebProcess/WebPage/ios/WebPageIOS.mm:
     14        (WebKit::rangeAtWordBoundaryForPosition):
     15
    1162017-08-28  Stephan Szabo  <stephan.szabo@sony.com>
    217
  • trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm

    r221233 r221281  
    12471247    // If this is where the extent was initially, then iterate in the other direction in the document until we hit the next word.
    12481248    while (extent.isNotNull()
    1249            && !atBoundaryOfGranularity(extent, WordGranularity, sameDirection)
    1250            && extent != base
    1251            && !atBoundaryOfGranularity(extent, LineBoundary, sameDirection)
    1252            && !atBoundaryOfGranularity(extent, LineBoundary, oppositeDirection)) {
     1249        && !atBoundaryOfGranularity(extent, WordGranularity, sameDirection)
     1250        && extent != base
     1251        && !atBoundaryOfGranularity(extent, LineGranularity, sameDirection)
     1252        && !atBoundaryOfGranularity(extent, LineGranularity, oppositeDirection)) {
    12531253        extent = baseIsStart ? extent.next() : extent.previous();
    12541254    }
Note: See TracChangeset for help on using the changeset viewer.