Permalink
Commits on Feb 25, 2017
  1. Only fire select events when selection changes

    This resolves a web-compatibility problem with code that would change
    the selection in response to select events, getting into an infinite
    loop. The two implementers of the select event, Blink and Gecko, both
    already have some mitigations for this, but not exactly this one.
    
    Closes #2328.
    domenic committed with foolip Feb 10, 2017
  2. Editorial: deduplicate selection-setting algorithm

    This makes the algorithm for select() use the "set the selection range"
    algorithm, like all the other selection-causing APIs.
    domenic committed with foolip Feb 10, 2017
Commits on Feb 24, 2017
  1. Fix event callback invocation to set entry/incumbent correctly

    This fixes #2248 by ensuring that we convert the created JavaScript
    Function object to a Web IDL callback, with the appropriate callback
    context.
    
    While in the area, it also straightens out and clarifies some confusion
    around what exactly the event listener's "callback" is; it is now always
    a Web IDL callback, instead of sometimes being just an algorithm.
    
    It also adds a clarifying note as to why we go through the JavaScript
    stack-pushing steps.
    
    Tests: w3c/web-platform-tests#4988
    domenic committed on GitHub Feb 24, 2017
  2. Editorial: Fix inconsistent use of <kbd> when denoting keys

    The spec (https://html.spec.whatwg.org/#the-kbd-element) states that
    the kbd element, used on its own, generically represents user input,
    "typically keyboard input, although it may also be used to represent
    other input, such as voice commands."
    
    A kbd element nested inside a kbd element represents "an actual key or
    other single unit of input as appropriate for the input mechanism."
    
    In all but three cases, the spec's own markup adheres to this
    distinction: one kbd element for input, two kbd elements for specific
    button presses.
    
    This commit resolves those three inconsistencies.
    callahad committed with domenic Feb 24, 2017
  3. Remove appcache from shared workers

    This was never implemented anywhere, and since appcache is deprecated,
    it never will be.
    domenic committed with foolip Feb 23, 2017
Commits on Feb 23, 2017
Commits on Feb 22, 2017
  1. Define document.domain in terms of a reusable algorithm

    This commit introduces a new primitive that enables document.domain, HTTP cookies, and Web Authentication to share their interaction with the Public Suffix List.
    
    No tests have been written since this is a only exposing a new hook and refactoring existing text in the process.
    jcjones committed with annevk Feb 22, 2017
  2. Tweak [CEReactions] definition and usage

    This fixes #2362, by:
    
    * Making it clearer that the steps inserted by [CEReactions] apply
      before/after what Web IDL calls "the actions listed in the description
      of" a given construct.
    * Removing [CEReactions] from [PutForwards]-decorated readonly
      attributes, as it is redundant there.
    domenic committed Feb 21, 2017
  3. Remove javascript URL case from <a>/<area>/Location hash setter

    It makes no sense to just special case them in this IDL attribute
    anymore, if it ever did.
    
    Javascript URLs might come up again for the Location object 
    per #1565, but for now they cannot be represented there and
    the other case should be aligned with the URL Standard, which
    changes per whatwg/url#254.
    annevk committed on GitHub Feb 22, 2017
Commits on Feb 21, 2017
Commits on Feb 15, 2017
  1. Add <link rel=serviceworker>+associated attributes

    This change defines the <link rel=serviceworker> link type and its
    associated “scope”, “workertype”, and “usecache” content attributes, as
    well as adding the corresponding “scope”, “workerType”, and “useCache”
    IDL attributes to the HTMLLinkElement interface definition.
    sideshowbarker committed with domenic Feb 15, 2017
Commits on Feb 14, 2017
  1. Fix onbeforeunload event handler processing

    There are two particular fixes:
    
    * null should *not* cancel the event. This has been flipped ever since
      it was introduced in 7612afe. It
      appears the mistake occurred between
      https://www.w3.org/Bugs/Public/show_bug.cgi?id=19713#c11 (includes
      "not") and https://www.w3.org/Bugs/Public/show_bug.cgi?id=19713#c12
      (which elides it).
    * Only applies the special behavior to BeforeUnloadEvents, not to any
      Event with the name "beforeunload". This is especially important since
      such events could be non-cancelable, in which case the previous text
      could potentially cancel them anyway.
    
    This also modernizes the surrounding section, style-wise.
    
    Fixes #2297.
    domenic committed on GitHub Feb 14, 2017
  2. Make <menuitem> parse like an unknown element

    This partially reverts commits:
    2999aa0
    5e49a20
    
    Fixes #2308.
    zcorpan committed Feb 3, 2017
  3. Make Location's toString() work and drop its toJSON()

    I mistakenly copied all boilerplate from IDL’s unforgeable interfaces concept (which was only ever used for Location) and thereby turned the toString() fallback behavior into the actual behavior (or an exception arguably, as [[Configurable]] is false).
    
    We also determined that only Firefox supports an unforgeable toJSON() and nobody really has a use for it, so that is dropped.
    
    Tests: w3c/web-platform-tests#4623.
    
    Fixes #2284.
    annevk committed on GitHub Feb 14, 2017
Commits on Feb 11, 2017
  1. Define encoder failure actions for toDataURL/toBlob

    Define the proper behaviors of image file serialization APIs in the event of an encoder error. For toDataURL(), the behavior is to return the string "data:,". For toBlob(), the behavior is to invoke the callback with null. For OffscreenCanvas's convertToBlob(), the behavior is to reject the promise with a DOMException "EncodingError".
    
    Test tracking issue (since no cross-browser tests can be created): w3c/web-platform-tests#4802.
    junov committed with annevk Feb 11, 2017
Commits on Feb 10, 2017
Commits on Feb 9, 2017
  1. Interrupt autoplay when video element becomes invisible

    This also changes the autoplaying flag to the can autoplay flag for clarity.
    xxyzzzq committed with foolip Feb 9, 2017
  2. Make input.select() never throw

    Fixes #2275 by making it do nothing, instead of throwing, when it does
    not apply. This matches all browsers.
    
    In the process, this inlines the "does not apply" behavior (which was
    previously in a prelude that readers often missed; see e.g. #2175), and
    makes all the setters, getters, and methods into algorithms with steps
    instead of just paragraphs.
    domenic committed on GitHub Feb 9, 2017
  3. Remove <button type=menu>

    This removes the type="menu" option for buttons, which has wide-reaching
    consequences for the menu infrastructure.
    
    It was intended that <menu type="context"> (originally <menu
    type="popup">) would be used both for context menus, and for popup menus
    triggered by buttons. Only the context menu case was ever implemented
    (in Gecko and, behind a flag, in Blink). As such, removing support for
    the triggered-by-button case allows us to remove a lot of
    now-unnecessary abstraction; for example, we can rename the "popup menu
    state" to the "context menu state" to match the type="context" content
    attribute. And we can relocate all of the processing model for
    constructing menus into the context menu processing model section.
    Finally, we can clearly state for authors that the <menu> element has
    two distinct uses: for customizing the context menu (type="context"),
    and as a semantic alternative to <ul> for a list of commands
    (type="toolbar").
    
    This fixes #237, although we still need to keep an eye on the entire
    context menu feature since its cross-browser support is on the low side.
    domenic committed on GitHub Feb 9, 2017
  4. Editorial: "used of" -> "used for"

    xfq committed with annevk Feb 8, 2017
Commits on Feb 8, 2017
  1. Align with URL API changes for file and non-special URLs

    This change builds on whatwg/url#224.
    
    Tests: w3c/web-platform-tests#4696.
    
    Location API bits are not tested since we generally treat loading from file URLs as out-of-scope for the web platform, but accounting for it standards-wise seemed trivial enough.
    annevk committed on GitHub Feb 8, 2017
  2. Remove never-reached list item ordinal value condition

    It is in fact impossible for a list item to not have a list owner, as
    there is always at least one ancestor that produces a CSS box. This was
    discovered in w3c/web-platform-tests#4754. The
    original algorithm was introduced in
    5fe3dbb.
    domenic committed on GitHub Feb 8, 2017
  3. Drop requirement to register <meta name> extensions

    The original spirit behind the requirement to register meta name extensions was good, but in practice it has ended up costing a large of maintenance time without it being clear how much real benefit to end users it has provided.
    
    Many values listed at https://wiki.whatwg.org/wiki/MetaExtensions appear to be essentially for private use for only the people/organizations who minted them, without it being clear how much general utility they might have, and without any evidence of public applications that consume them.
    
    So this change drops the requirement to formally register new meta names, while still retaining a reference to https://wiki.whatwg.org/wiki/MetaExtensions informatively — in order to encourage authors to consult that before creating and using any new meta names.
    sideshowbarker committed with annevk Feb 8, 2017
  4. Editorial: use more terms from the Infra Standard

    In particular:
    
    * ASCII whitespace
    * ASCII digit
    * ASCII hex digit (and lower/upper)
    * ASCII alpha (and lower/upper)
    * ASCII alphanumeric
    * strip newlines
    * strip leading and trailing ASCII whitespace
    * strip and collapse ASCII whitespace
    * collect a sequence of code points
    * skip ASCII whitespace
    * strictly split a string (not actually used in HTML)
    * split a string on ASCII whitespace
    * split a string on commas
    annevk committed on GitHub Feb 8, 2017