- Revision
- 285638
- Author
- [email protected]
- Date
- 2021-11-11 10:27:30 -0800 (Thu, 11 Nov 2021)
Log Message
Drop support for <object usemap> making <object> interactive
https://bugs.webkit.org/show_bug.cgi?id=222642
LayoutTests/imported/w3c:
Reviewed by Antti Koivisto.
As per https://github.com/whatwg/html/pull/6283, <object usemap> should no longer be supported.
IDL support is kept per spec like other obsolete attributes.
* web-platform-tests/html/semantics/forms/the-label-element/clicking-noninteractive-unlabelable-content-expected.txt:
Source/WebCore:
Reviewed by Antti Koivisto.
As per https://github.com/whatwg/html/pull/6283, <object usemap> should no longer be supported.
IDL support is kept per spec like other obsolete attributes.
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::isURLAttribute const):
(WebCore::HTMLObjectElement::addSubresourceAttributeURLs const):
(WebCore::HTMLObjectElement::isInteractiveContent const): Deleted.
* html/HTMLObjectElement.h:
Source/WebKit:
Patch by Carlos Garcia Campos <[email protected]> on 2021-11-11
Reviewed by Antti Koivisto.
Remove support for usemap attribute in GTK DOM API adding a warning message instead.
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElement.cpp:
(webkit_dom_html_object_element_get_use_map):
(webkit_dom_html_object_element_set_use_map):
LayoutTests:
Reviewed by Antti Koivisto.
As per https://github.com/whatwg/html/pull/6283, <object usemap> should no longer be supported.
IDL support is kept per spec like other obsolete attributes.
* imported/blink/fast/forms/label/label-contains-other-interactive-content-expected.txt:
* imported/blink/fast/forms/label/label-contains-other-interactive-content.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (285637 => 285638)
--- trunk/LayoutTests/ChangeLog 2021-11-11 18:19:41 UTC (rev 285637)
+++ trunk/LayoutTests/ChangeLog 2021-11-11 18:27:30 UTC (rev 285638)
@@ -1,3 +1,17 @@
+2021-11-11 Tim Nguyen <[email protected]>
+
+ Drop support for <object usemap> making <object> interactive
+ https://bugs.webkit.org/show_bug.cgi?id=222642
+
+ Reviewed by Antti Koivisto.
+
+ As per https://github.com/whatwg/html/pull/6283, <object usemap> should no longer be supported.
+
+ IDL support is kept per spec like other obsolete attributes.
+
+ * imported/blink/fast/forms/label/label-contains-other-interactive-content-expected.txt:
+ * imported/blink/fast/forms/label/label-contains-other-interactive-content.html:
+
2021-11-11 Sam Weinig <[email protected]>
Factor platform specific code out of HTMLModelElement
Modified: trunk/LayoutTests/imported/blink/fast/forms/label/label-contains-other-interactive-content-expected.txt (285637 => 285638)
--- trunk/LayoutTests/imported/blink/fast/forms/label/label-contains-other-interactive-content-expected.txt 2021-11-11 18:19:41 UTC (rev 285637)
+++ trunk/LayoutTests/imported/blink/fast/forms/label/label-contains-other-interactive-content-expected.txt 2021-11-11 18:27:30 UTC (rev 285638)
@@ -27,10 +27,6 @@
PASS document.activeElement.id is "control"
img[usemap]
PASS document.activeElement.id is not "control"
-object
-PASS document.activeElement.id is "control"
-object[usemap]
-PASS document.activeElement.id is not "control"
input
PASS document.activeElement.id is not "control"
PASS successfullyParsed is true
Modified: trunk/LayoutTests/imported/blink/fast/forms/label/label-contains-other-interactive-content.html (285637 => 285638)
--- trunk/LayoutTests/imported/blink/fast/forms/label/label-contains-other-interactive-content.html 2021-11-11 18:19:41 UTC (rev 285637)
+++ trunk/LayoutTests/imported/blink/fast/forms/label/label-contains-other-interactive-content.html 2021-11-11 18:27:30 UTC (rev 285638)
@@ -9,7 +9,6 @@
['audio', 'controls'],
['video', 'controls'],
['img', 'usemap'],
- ['object', 'usemap'],
];
var label = document.createElement('label');
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (285637 => 285638)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2021-11-11 18:19:41 UTC (rev 285637)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2021-11-11 18:27:30 UTC (rev 285638)
@@ -1,3 +1,16 @@
+2021-11-11 Tim Nguyen <[email protected]>
+
+ Drop support for <object usemap> making <object> interactive
+ https://bugs.webkit.org/show_bug.cgi?id=222642
+
+ Reviewed by Antti Koivisto.
+
+ As per https://github.com/whatwg/html/pull/6283, <object usemap> should no longer be supported.
+
+ IDL support is kept per spec like other obsolete attributes.
+
+ * web-platform-tests/html/semantics/forms/the-label-element/clicking-noninteractive-unlabelable-content-expected.txt:
+
2021-11-11 Antoine Quint <[email protected]>
Improve additivity support when animating the transform property
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-label-element/clicking-noninteractive-unlabelable-content-expected.txt (285637 => 285638)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-label-element/clicking-noninteractive-unlabelable-content-expected.txt 2021-11-11 18:19:41 UTC (rev 285637)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-label-element/clicking-noninteractive-unlabelable-content-expected.txt 2021-11-11 18:27:30 UTC (rev 285638)
@@ -43,7 +43,7 @@
PASS noninteractive unlabelable content <object tabindex=""></object> as second child under <label>
PASS noninteractive unlabelable content <object usemap="" as first child of <label>
PASS noninteractive unlabelable content <object usemap="" deeply nested under <label>
-FAIL noninteractive unlabelable content <object usemap="" as second child under <label> assert_equals: clicking noninteractive unlabelable content should click button expected 1 but got 0
+PASS noninteractive unlabelable content <object usemap="" as second child under <label>
PASS noninteractive unlabelable content <video tabindex=""></video> as first child of <label>
PASS noninteractive unlabelable content <video tabindex=""></video> deeply nested under <label>
PASS noninteractive unlabelable content <video tabindex=""></video> as second child under <label>
Modified: trunk/Source/WebCore/ChangeLog (285637 => 285638)
--- trunk/Source/WebCore/ChangeLog 2021-11-11 18:19:41 UTC (rev 285637)
+++ trunk/Source/WebCore/ChangeLog 2021-11-11 18:27:30 UTC (rev 285638)
@@ -1,3 +1,20 @@
+2021-11-11 Tim Nguyen <[email protected]>
+
+ Drop support for <object usemap> making <object> interactive
+ https://bugs.webkit.org/show_bug.cgi?id=222642
+
+ Reviewed by Antti Koivisto.
+
+ As per https://github.com/whatwg/html/pull/6283, <object usemap> should no longer be supported.
+
+ IDL support is kept per spec like other obsolete attributes.
+
+ * html/HTMLObjectElement.cpp:
+ (WebCore::HTMLObjectElement::isURLAttribute const):
+ (WebCore::HTMLObjectElement::addSubresourceAttributeURLs const):
+ (WebCore::HTMLObjectElement::isInteractiveContent const): Deleted.
+ * html/HTMLObjectElement.h:
+
2021-11-11 Sam Weinig <[email protected]>
Factor platform specific code out of HTMLModelElement
Modified: trunk/Source/WebCore/html/HTMLObjectElement.cpp (285637 => 285638)
--- trunk/Source/WebCore/html/HTMLObjectElement.cpp 2021-11-11 18:19:41 UTC (rev 285637)
+++ trunk/Source/WebCore/html/HTMLObjectElement.cpp 2021-11-11 18:27:30 UTC (rev 285638)
@@ -321,14 +321,9 @@
bool HTMLObjectElement::isURLAttribute(const Attribute& attribute) const
{
- return attribute.name() == dataAttr || attribute.name() == codebaseAttr || (attribute.name() == usemapAttr && attribute.value().string()[0] != '#') || HTMLPlugInImageElement::isURLAttribute(attribute);
+ return attribute.name() == dataAttr || attribute.name() == codebaseAttr || HTMLPlugInImageElement::isURLAttribute(attribute);
}
-bool HTMLObjectElement::isInteractiveContent() const
-{
- return hasAttributeWithoutSynchronization(usemapAttr);
-}
-
const AtomString& HTMLObjectElement::imageSourceURL() const
{
return attributeWithoutSynchronization(dataAttr);
@@ -459,12 +454,6 @@
HTMLPlugInImageElement::addSubresourceAttributeURLs(urls);
addSubresourceURL(urls, document().completeURL(attributeWithoutSynchronization(dataAttr)));
-
- // FIXME: Passing a string that starts with "#" to the completeURL function does
- // not seem like it would work. The image element has similar but not identical code.
- const AtomString& useMap = ""
- if (useMap.startsWith('#'))
- addSubresourceURL(urls, document().completeURL(useMap));
}
void HTMLObjectElement::didMoveToNewDocument(Document& oldDocument, Document& newDocument)
Modified: trunk/Source/WebCore/html/HTMLObjectElement.h (285637 => 285638)
--- trunk/Source/WebCore/html/HTMLObjectElement.h 2021-11-11 18:19:41 UTC (rev 285637)
+++ trunk/Source/WebCore/html/HTMLObjectElement.h 2021-11-11 18:27:30 UTC (rev 285638)
@@ -96,8 +96,6 @@
HTMLObjectElement& asHTMLElement() final { return *this; }
const HTMLObjectElement& asHTMLElement() const final { return *this; }
- bool isInteractiveContent() const final;
-
bool isFormControlElement() const final { return false; }
bool isEnumeratable() const final { return true; }
Modified: trunk/Source/WebKit/ChangeLog (285637 => 285638)
--- trunk/Source/WebKit/ChangeLog 2021-11-11 18:19:41 UTC (rev 285637)
+++ trunk/Source/WebKit/ChangeLog 2021-11-11 18:27:30 UTC (rev 285638)
@@ -1,3 +1,16 @@
+2021-11-11 Carlos Garcia Campos <[email protected]>
+
+ Drop support for <object usemap> making <object> interactive
+ https://bugs.webkit.org/show_bug.cgi?id=222642
+
+ Reviewed by Antti Koivisto.
+
+ Remove support for usemap attribute in GTK DOM API adding a warning message instead.
+
+ * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElement.cpp:
+ (webkit_dom_html_object_element_get_use_map):
+ (webkit_dom_html_object_element_set_use_map):
+
2021-11-11 Sam Weinig <[email protected]>
Factor platform specific code out of HTMLModelElement
Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElement.cpp (285637 => 285638)
--- trunk/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElement.cpp 2021-11-11 18:19:41 UTC (rev 285637)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElement.cpp 2021-11-11 18:27:30 UTC (rev 285638)
@@ -689,23 +689,15 @@
item->setAttributeWithoutSynchronization(WebCore::HTMLNames::typeAttr, convertedValue);
}
-gchar* webkit_dom_html_object_element_get_use_map(WebKitDOMHTMLObjectElement* self)
+gchar* webkit_dom_html_object_element_get_use_map(WebKitDOMHTMLObjectElement*)
{
- WebCore::JSMainThreadNullState state;
- g_return_val_if_fail(WEBKIT_DOM_IS_HTML_OBJECT_ELEMENT(self), 0);
- WebCore::HTMLObjectElement* item = WebKit::core(self);
- gchar* result = convertToUTF8String(item->attributeWithoutSynchronization(WebCore::HTMLNames::usemapAttr));
- return result;
+ g_warning("%s: <object usemap> has been removed from HTML spec, this function does nothing.", __func__);
+ return nullptr;
}
-void webkit_dom_html_object_element_set_use_map(WebKitDOMHTMLObjectElement* self, const gchar* value)
+void webkit_dom_html_object_element_set_use_map(WebKitDOMHTMLObjectElement*, const gchar*)
{
- WebCore::JSMainThreadNullState state;
- g_return_if_fail(WEBKIT_DOM_IS_HTML_OBJECT_ELEMENT(self));
- g_return_if_fail(value);
- WebCore::HTMLObjectElement* item = WebKit::core(self);
- WTF::String convertedValue = WTF::String::fromUTF8(value);
- item->setAttributeWithoutSynchronization(WebCore::HTMLNames::usemapAttr, convertedValue);
+ g_warning("%s: <object usemap> has been removed from HTML spec, this function does nothing.", __func__);
}
glong webkit_dom_html_object_element_get_vspace(WebKitDOMHTMLObjectElement* self)