Commit 5f506297 authored by Rob Buis's avatar Rob Buis Committed by Commit Bot

Implement HTMLOrForeignElement

Implement the interface mixin between HTML/SVG/etc as specified here:
https://html.spec.whatwg.org/multipage/dom.html#htmlorsvgelement
Note that the intention is to rename above HTMLOrSVGElement to HTMLOrForeignElement:
https://github.com/whatwg/html/issues/4702

This also removes NoncedElement.

Matches WebKit and Firefox.

Bug: 835571

Change-Id: I98c7fcf4c081bdee1a861138e03155a77ca37161
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1655789
Commit-Queue: Rob Buis <rbuis@igalia.com>
Reviewed-by: default avatarFrédéric Wang <fwang@igalia.com>
Reviewed-by: default avatarFredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#691580}
parent 3b466f8a
......@@ -535,7 +535,6 @@ core_dependency_idl_files =
"dom/document_and_element_event_handlers.idl",
"dom/document_or_shadow_root.idl",
"dom/global_event_handlers.idl",
"dom/nonced_element.idl",
"dom/non_document_type_child_node.idl",
"dom/non_element_parent_node.idl",
"dom/parent_node.idl",
......@@ -558,6 +557,7 @@ core_dependency_idl_files =
"fullscreen/document_fullscreen.idl",
"fullscreen/element_fullscreen.idl",
"html/html_hyperlink_element_utils.idl",
"html/html_or_foreign_element.idl",
"html/portal/window_portal_host.idl",
"layout/ng/custom/css_layout_worklet.idl",
"svg/svg_document.idl",
......
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// https://github.com/whatwg/html/pull/2373/
//
// TODO(mkwst): Update the link iff this lands.
interface mixin NoncedElement {
[CEReactions] attribute DOMString nonce;
};
......@@ -28,15 +28,11 @@
[CEReactions, Reflect] attribute DOMString lang;
[CEReactions] attribute boolean translate;
[CEReactions] attribute DOMString dir;
[SameObject, PerWorldBindings] readonly attribute DOMStringMap dataset;
// user interaction
[Affects=Nothing, CEReactions, Reflect] attribute boolean hidden;
[RuntimeCallStatsCounter=HTMLElementClick] void click();
[Affects=Nothing, CEReactions, CustomElementCallbacks] attribute long tabIndex;
[CEReactions, RuntimeEnabled=InertAttribute, Reflect] attribute boolean inert;
void focus(optional FocusOptions options);
void blur();
[CEReactions, Reflect] attribute DOMString accessKey;
[CEReactions, CustomElementCallbacks] attribute boolean draggable;
[CEReactions] attribute boolean spellcheck;
......@@ -72,4 +68,4 @@
HTMLElement includes GlobalEventHandlers;
HTMLElement includes DocumentAndElementEventHandlers;
HTMLElement includes NoncedElement;
HTMLElement includes HTMLOrForeignElement;
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// https://html.spec.whatwg.org/multipage/dom.html#htmlorsvgelement
// TODO(rwlbuis): update link after HTMLOrSVGElement to HTMLOrForeignElement renaming:
// https://github.com/whatwg/html/issues/4702
interface mixin HTMLOrForeignElement {
[SameObject, PerWorldBindings] readonly attribute DOMStringMap dataset;
[CEReactions] attribute DOMString nonce;
[Affects=Nothing, CEReactions, CustomElementCallbacks] attribute long tabIndex;
void focus(optional FocusOptions options);
void blur();
};
......@@ -25,18 +25,14 @@
[Exposed=Window]
interface SVGElement : Element {
[MeasureAs=SVGClassName] readonly attribute SVGAnimatedString className;
[SameObject, PerWorldBindings] readonly attribute DOMStringMap dataset;
// CSS Object Model (CSSOM)
// https://drafts.csswg.org/cssom/#the-elementcssinlinestyle-interface
[SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
readonly attribute SVGSVGElement? ownerSVGElement;
readonly attribute SVGElement? viewportElement;
[CustomElementCallbacks] attribute long tabIndex;
void focus();
void blur();
};
SVGElement includes GlobalEventHandlers;
SVGElement includes DocumentAndElementEventHandlers;
SVGElement includes NoncedElement;
SVGElement includes HTMLOrForeignElement;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment