Standardize or remove APIs StaticRange#setEnd, setStart |
|||||||
Issue descriptionsetEnd and setStart are found in Range.idl, but not yet standardized in StaticRange. Should we standardize them?
,
Feb 17 2017
garykac@ I think we can close this. As I recall we wanted StaticRange to be immutable so I think we don't want setters on the StaticRange. That is correct right?
,
Feb 17 2017
We do define setStart/setEnd methods on StaticRange in blink: https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/dom/StaticRange.idl?q=file:%5C.idl++StaticRange&dr=C&l=19 I don't see these in any spec. So we do want to remove them, right? These are RuntimeEnabled=InputEvent which is still status=experimental so should be simple to just remove. Nice catch Luna! Also, looks like the comment in StaticRange.idl should be updated to point to the spec: https://w3c.github.io/input-events/#dom-staticrange
,
Feb 17 2017
I'm pleased the IDL conformance tool found this BTW - despite not having the correct spec URL in this idl file (it must appear in some other file).
,
Feb 17 2017
chongz@ please correct StaticRange to match the input events spec.
,
Feb 17 2017
Here is a summarized timeline of StaticRange: 1. garykac@ proposed interface IDL (which is Blink's current implementation) * https://github.com/garykac/staticrange/issues/2#issuecomment-217272202 2. Resolution from TPAC wants to change it to a dictionary (current spec) * https://github.com/w3c/input-events/issues/38 3. However esprehn@ believes we should stick with interface approach * https://github.com/w3c/input-events/issues/38#issuecomment-254328757 4. Discussion inside Google was raised but haven't reached clearly agreement * https://groups.google.com/a/google.com/d/msg/google-parkour/0lS0-x8kmFQ/T3Jfb2dcBAAJ Current Situation: Spec: dictionary StaticRange { Node startContainer; unsigned long startOffset; Node endContainer; unsigned long endOffset; }; Webkit: [ EnabledAtRuntime=InputEvents, ImplementationLacksVTable, ] interface StaticRange { readonly attribute unsigned long startOffset; readonly attribute unsigned long endOffset; readonly attribute Node startContainer; readonly attribute Node endContainer; readonly attribute boolean collapsed; }; Blink: [ Constructor, ConstructorCallWith=Document, Exposed=Window, RuntimeEnabled=InputEvent, ] interface StaticRange { attribute Node startContainer; attribute long startOffset; attribute Node endContainer; attribute long endOffset; readonly attribute boolean collapsed; void setStart(Node node, long offset); void setEnd(Node node, long offset); [NewObject, RaisesException] Range toRange(); }; Should we 1. Match spec and ask Webkit to change, or 2. Match Webkit and change spec?
,
Feb 27 2017
garykac@ is working on the spec, see https://github.com/w3c/input-events/issues/38#issuecomment-281710402
,
Mar 9 2017
,
May 2 2017
StaticRange#setEnd, setStart has been removed from Spec and Blink. Also see issue 707913 . Spec: https://w3c.github.io/staticrange/index.html#interface-staticrange Blink: https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/dom/StaticRange.idl WebKit: https://github.com/WebKit/webkit/blob/master/Source/WebCore/dom/StaticRange.idl |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by tkent@chromium.org
, Feb 17 2017