RESOLVED FIXED 187556
Keep Selections within Shadow DOM boundaries
https://bugs.webkit.org/show_bug.cgi?id=187556
Summary Keep Selections within Shadow DOM boundaries
Megan Gardner
Reported 2018-07-11 10:42:36 PDT
Keep Selections within Shadow Dom boundries
Attachments
Patch (9.22 KB, patch)
2018-07-11 10:50 PDT, Megan Gardner
no flags
Patch (9.19 KB, patch)
2018-07-11 11:35 PDT, Megan Gardner
no flags
Archive of layout-test-results from ews204 for win-future (12.78 MB, application/zip)
2018-07-11 13:28 PDT, EWS Watchlist
no flags
Patch for landing (9.11 KB, patch)
2018-07-12 12:08 PDT, Megan Gardner
no flags
Megan Gardner
Comment 1 2018-07-11 10:50:54 PDT
Tim Horton
Comment 2 2018-07-11 11:14:47 PDT
Comment on attachment 344771 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=344771&action=review > Source/WebCore/ChangeLog:3 > + Keep Selections within Shadow Dom boundries DOM is usually 'DOM' > Source/WebCore/editing/VisibleSelection.h:110 > + WEBCORE_EXPORT Position adjustPositionForEnd(const Position& currentPosition, Node* startContainerNode) const; > + WEBCORE_EXPORT Position adjustPositionForStart(const Position& currentPosition, Node* startContainerNode) const; IF it's right to expose these (no idea), I think they should be static (and thus not const).
Megan Gardner
Comment 3 2018-07-11 11:35:51 PDT
EWS Watchlist
Comment 4 2018-07-11 13:28:35 PDT
Comment on attachment 344773 [details] Patch Attachment 344773 [details] did not pass win-ews (win): Output: https://webkit-queues.webkit.org/results/8506962 New failing tests: http/tests/security/canvas-remote-read-remote-video-blocked-no-crossorigin.html
EWS Watchlist
Comment 5 2018-07-11 13:28:46 PDT
Created attachment 344781 [details] Archive of layout-test-results from ews204 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews204 Port: win-future Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Megan Gardner
Comment 6 2018-07-11 16:21:30 PDT
Ryosuke Niwa
Comment 7 2018-07-11 18:18:11 PDT
Comment on attachment 344773 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=344773&action=review > Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:1221 > + VisiblePosition position = frame->visiblePositionForPoint(pointInDocument); Why do we need this? Can't we simply call deepEquivalent() on it directly? > Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:1231 > + > + > + Remove redundant blank lines? > Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:1232 > + Position selectionStart = frame->selection().selection().visibleStart().deepEquivalent(); Seems like we should store frame->selection().selection() in a local temporary variable. > Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:1236 > + bool wouldFlip = comparePositions(result, selectionStart) <= 0; Instead of wouldFlip. We should probably call it resultIsBeforeStart > Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:1237 > + Nit: Whitespace. > Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:1240 > + Ditto. > Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:1243 > + Ditto. > Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:1247 > + bool wouldFlip = comparePositions(selectionEnd, result) <= 0; Ditto. > Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:1248 > + Nit: Whitespace. > Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:1254 > + Nit: Whitespace.
Megan Gardner
Comment 8 2018-07-12 12:08:14 PDT
Created attachment 344867 [details] Patch for landing
WebKit Commit Bot
Comment 9 2018-07-12 12:46:29 PDT
Comment on attachment 344867 [details] Patch for landing Clearing flags on attachment: 344867 Committed r233778: <https://trac.webkit.org/changeset/233778>
WebKit Commit Bot
Comment 10 2018-07-12 12:46:31 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.