Bug 192653

Summary: Make TextInputController.legacyAttributedString take DOM nodes and offsets
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: Tools / TestsAssignee: Ryosuke Niwa <rniwa>
Severity: Normal CC: darin, lforschler, megan_gardner, thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 192640    
Description Flags
Updates the test API
Reverted the unrelated change wenson_hsieh: review+

Description Ryosuke Niwa 2018-12-12 19:21:51 PST
Right now, TextInputController.legacyAttributedString takes a Range object
but this makes it impossible to obtain attributed strings across shadow boundaries.

Make it take DOM nodes and offsets as in DOMSelection's setBaseAndExtent
in preparation to make HTMLConverter compatible with shadow DOM.
Comment 1 Ryosuke Niwa 2018-12-12 19:26:55 PST
Created attachment 357204 [details]
Updates the test API
Comment 2 Ryosuke Niwa 2018-12-12 19:36:51 PST
Comment on attachment 357204 [details]
Updates the test API

View in context: https://bugs.webkit.org/attachment.cgi?id=357204&action=review

> Source/WebCore/editing/cocoa/HTMLConverter.mm:-2470
> -    auto range = selection.toNormalizedRange();
> -    ASSERT(range);
> -    return HTMLConverter { range->startPosition(), range->endPosition() }.convert();

Oops, this change shouldn't be here...
Comment 3 Ryosuke Niwa 2018-12-12 19:39:57 PST
Created attachment 357206 [details]
Reverted the unrelated change
Comment 4 Ryosuke Niwa 2018-12-12 19:54:15 PST
Committed r239149: <https://trac.webkit.org/changeset/239149>
Comment 5 Radar WebKit Bug Importer 2018-12-12 19:55:26 PST