New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 692652 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug

Blocking:
issue 674593


Show other hotlists

Hotlists containing this issue:
Non-Standard-IDL


Sign in to add a comment

Standardize or remove APIs StaticRange#setEnd, setStart

Project Member Reported by lunalu@chromium.org, Feb 15 2017

Issue description

setEnd and setStart are found in Range.idl, but not yet standardized in StaticRange. Should we standardize them? 
 

Comment 1 by tkent@chromium.org, Feb 17 2017

Components: -Blink>DOM Blink>Input
Cc: chongz@chromium.org dtapu...@chromium.org
Owner: garykac@chromium.org
Status: Assigned (was: Untriaged)
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?

Comment 3 by rbyers@chromium.org, Feb 17 2017

Cc: -dtapu...@chromium.org garykac@chromium.org
Owner: dtapu...@chromium.org
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

Comment 4 by rbyers@chromium.org, 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).
Cc: dtapu...@chromium.org
Owner: chongz@chromium.org
chongz@ please correct StaticRange to match the input events spec.

Comment 6 by chongz@chromium.org, 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?

Comment 7 by chongz@chromium.org, Feb 27 2017

Labels: Hotlist-Input-Dev OS-All
garykac@ is working on the spec, see
https://github.com/w3c/input-events/issues/38#issuecomment-281710402
Cc: foolip@chromium.org

Sign in to add a comment