Title: [99742] trunk
Revision
99742
Author
[email protected]
Date
2011-11-09 11:35:28 -0800 (Wed, 09 Nov 2011)

Log Message

Microdata: fast/dom/MicroData/itemid-attribute-test.html assertion failure in Element::getURLAttribute().
https://bugs.webkit.org/show_bug.cgi?id=71510

Patch by Arko Saha <[email protected]> on 2011-11-09
Reviewed by Darin Adler.

Source/WebCore:

Override isURLAttribute() for HTMLElement and return true if attribute is itemidAttr.
All the classes derived from HTMLElement overrides this function should return true if attribute is itemidAttr.
Removed HTMLIFrameElement::isURLAttribute() method as HTMLFrameElementBase already takes care of it.

Test: fast/dom/MicroData/itemid-attribute-test-001.html

* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::isURLAttribute):
* html/HTMLBaseElement.cpp:
(WebCore::HTMLBaseElement::isURLAttribute):
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::isURLAttribute):
* html/HTMLButtonElement.cpp:
(WebCore::HTMLButtonElement::isURLAttribute):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::isURLAttribute):
* html/HTMLElement.h:
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::isURLAttribute):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::isURLAttribute):
* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::isURLAttribute):
* html/HTMLHtmlElement.cpp:
(WebCore::HTMLHtmlElement::isURLAttribute):
* html/HTMLIFrameElement.cpp:
* html/HTMLIFrameElement.h:
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::isURLAttribute):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::isURLAttribute):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::isURLAttribute):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::isURLAttribute):
* html/HTMLModElement.cpp:
(WebCore::HTMLModElement::isURLAttribute):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::isURLAttribute):
* html/HTMLParamElement.cpp:
(WebCore::HTMLParamElement::isURLAttribute):
* html/HTMLQuoteElement.cpp:
(WebCore::HTMLQuoteElement::isURLAttribute):
* html/HTMLScriptElement.cpp:
(WebCore::HTMLScriptElement::isURLAttribute):
* html/HTMLSourceElement.cpp:
(WebCore::HTMLSourceElement::isURLAttribute):
* html/HTMLTableCellElement.cpp:
(WebCore::HTMLTableCellElement::isURLAttribute):
* html/HTMLTableElement.cpp:
(WebCore::HTMLTableElement::isURLAttribute):
* html/HTMLTrackElement.cpp:
(WebCore::HTMLTrackElement::isURLAttribute):

LayoutTests:

* fast/dom/MicroData/itemid-attribute-test-001-expected.txt: Added.
* fast/dom/MicroData/itemid-attribute-test-001.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (99741 => 99742)


--- trunk/LayoutTests/ChangeLog	2011-11-09 19:28:12 UTC (rev 99741)
+++ trunk/LayoutTests/ChangeLog	2011-11-09 19:35:28 UTC (rev 99742)
@@ -1,3 +1,13 @@
+2011-11-09  Arko Saha  <[email protected]>
+
+        Microdata: fast/dom/MicroData/itemid-attribute-test.html assertion failure in Element::getURLAttribute().
+        https://bugs.webkit.org/show_bug.cgi?id=71510
+
+        Reviewed by Darin Adler.
+
+        * fast/dom/MicroData/itemid-attribute-test-001-expected.txt: Added.
+        * fast/dom/MicroData/itemid-attribute-test-001.html: Added.
+
 2011-11-09 Chris Fleizach  <[email protected]>
 
         AX: crash when accessing selectedTab in a tab list

Added: trunk/LayoutTests/fast/dom/MicroData/itemid-attribute-test-001-expected.txt (0 => 99742)


--- trunk/LayoutTests/fast/dom/MicroData/itemid-attribute-test-001-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/dom/MicroData/itemid-attribute-test-001-expected.txt	2011-11-09 19:35:28 UTC (rev 99742)
@@ -0,0 +1,124 @@
+Test for bug: https://bugs.webkit.org/show_bug.cgi?id=71510. Assertion failure in Element::getURLAttribute() while retriving itemid of a Microdata item.
+
+Created element of type: a
+Set attribute: itemid, value: http://example.com/foo
+Set attribute: href, value: http://www.webkit.org/
+PASS createElement('a', {itemid: 'http://example.com/foo', href: 'http://www.webkit.org/'}).itemId == 'http://example.com/foo'; is true
+
+Created element of type: audio
+Set attribute: itemid, value: http://example.com/foo
+Set attribute: src, value: test.mp3
+PASS createElement('audio', {itemid: 'http://example.com/foo', src: 'test.mp3'}).itemId == 'http://example.com/foo'; is true
+
+Created element of type: base
+Set attribute: itemid, value: http://example.com/foo
+Set attribute: href, value: http://www.webkit.org/
+PASS createElement('base', {itemid: 'http://example.com/foo', href: 'http://www.webkit.org/'}).itemId == 'http://example.com/foo'; is true
+
+Created element of type: blockquote
+Set attribute: itemid, value: http://example.com/foo
+PASS createElement('blockquote', {itemid: 'http://example.com/foo'}).itemId == 'http://example.com/foo'; is true
+
+Created element of type: body
+Set attribute: itemid, value: http://example.com/foo
+PASS createElement('body', {itemid: 'http://example.com/foo'}).itemId == 'http://example.com/foo'; is true
+
+Created element of type: button
+Set attribute: itemid, value: http://example.com/foo
+Set attribute: type, value: button
+PASS createElement('button', {itemid: 'http://example.com/foo', type: 'button'}).itemId == 'http://example.com/foo'; is true
+
+Created element of type: del
+Set attribute: itemid, value: http://example.com/foo
+PASS createElement('del', {itemid: 'http://example.com/foo'}).itemId == 'http://example.com/foo'; is true
+
+Created element of type: div
+Set attribute: itemid, value: http://example.com/foo
+PASS createElement('div', {itemid: 'http://example.com/foo'}).itemId == 'http://example.com/foo'; is true
+
+Created element of type: embed
+Set attribute: itemid, value: http://example.com/foo
+Set attribute: src, value: test.swf
+PASS createElement('embed', {itemid: 'http://example.com/foo', src: 'test.swf'}).itemId == 'http://example.com/foo'; is true
+
+Created element of type: form
+Set attribute: itemid, value: http://example.com/foo
+PASS createElement('form', {itemid: 'http://example.com/foo'}).itemId == 'http://example.com/foo'; is true
+
+Created element of type: frame
+Set attribute: itemid, value: http://example.com/foo
+Set attribute: src, value: test.html
+PASS createElement('frame', {itemid: 'http://example.com/foo', src: 'test.html'}).itemId == 'http://example.com/foo'; is true
+
+Created element of type: html
+Set attribute: itemid, value: http://example.com/foo
+PASS createElement('html', {itemid: 'http://example.com/foo'}).itemId == 'http://example.com/foo'; is true
+
+Created element of type: iframe
+Set attribute: itemid, value: http://example.com/foo
+Set attribute: src, value: test.html
+PASS createElement('iframe', {itemid: 'http://example.com/foo', src: 'test.html'}).itemId == 'http://example.com/foo'; is true
+
+Created element of type: img
+Set attribute: itemid, value: http://example.com/foo
+Set attribute: src, value: image.png
+PASS createElement('img', {itemid: 'http://example.com/foo', src: 'image.png'}).itemId == 'http://example.com/foo'; is true
+
+Created element of type: input
+Set attribute: itemid, value: http://example.com/foo
+Set attribute: type, value: button
+PASS createElement('input', {itemid: 'http://example.com/foo', type: 'button'}).itemId == 'http://example.com/foo'; is true
+
+Created element of type: ins
+Set attribute: itemid, value: http://example.com/foo
+PASS createElement('ins', {itemid: 'http://example.com/foo'}).itemId == 'http://example.com/foo'; is true
+
+Created element of type: link
+Set attribute: itemid, value: http://example.com/foo
+Set attribute: type, value: text/css
+Set attribute: href, value: test.css
+PASS createElement('link', {itemid: 'http://example.com/foo', type: 'text/css', href: 'test.css'}).itemId == 'http://example.com/foo'; is true
+
+Created element of type: object
+Set attribute: itemid, value: http://example.com/foo
+Set attribute: data, value: test.swf
+PASS createElement('object', {itemid: 'http://example.com/foo', data: 'test.swf'}).itemId == 'http://example.com/foo'; is true
+
+Created element of type: param
+Set attribute: itemid, value: http://example.com/foo
+Set attribute: name, value: my_param
+PASS createElement('param', {itemid: 'http://example.com/foo', name: 'my_param'}).itemId == 'http://example.com/foo'; is true
+
+Created element of type: q
+Set attribute: itemid, value: http://example.com/foo
+PASS createElement('q', {itemid: 'http://example.com/foo'}).itemId == 'http://example.com/foo'; is true
+
+Created element of type: source
+Set attribute: itemid, value: http://example.com/foo
+Set attribute: type, value: audio/mpeg
+Set attribute: src, value: test.mp3
+PASS createElement('source', {itemid: 'http://example.com/foo', type: 'audio/mpeg', src: 'test.mp3'}).itemId == 'http://example.com/foo'; is true
+
+Created element of type: table
+Set attribute: itemid, value: http://example.com/foo
+PASS createElement('table', {itemid: 'http://example.com/foo'}).itemId == 'http://example.com/foo'; is true
+
+Created element of type: td
+Set attribute: itemid, value: http://example.com/foo
+PASS createElement('td', {itemid: 'http://example.com/foo'}).itemId == 'http://example.com/foo'; is true
+
+Created element of type: track
+Set attribute: itemid, value: http://example.com/foo
+Set attribute: type, value: audio/mpeg
+Set attribute: src, value: test.vtt
+PASS createElement('track', {itemid: 'http://example.com/foo', type: 'audio/mpeg', src: 'test.vtt'}).itemId == 'http://example.com/foo'; is true
+
+Created element of type: video
+Set attribute: itemid, value: http://example.com/foo
+Set attribute: src, value: test.mp4
+PASS createElement('video', {itemid: 'http://example.com/foo', src: 'test.mp4'}).itemId == 'http://example.com/foo'; is true
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/fast/dom/MicroData/itemid-attribute-test-001.html (0 => 99742)


--- trunk/LayoutTests/fast/dom/MicroData/itemid-attribute-test-001.html	                        (rev 0)
+++ trunk/LayoutTests/fast/dom/MicroData/itemid-attribute-test-001.html	2011-11-09 19:35:28 UTC (rev 99742)
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+<script src=""
+</head>
+<body>
+<p>Test for bug: https://bugs.webkit.org/show_bug.cgi?id=71510. Assertion failure in Element::getURLAttribute() while retriving itemid of a Microdata item.</p>
+<div id="console"></div>
+<script>
+shouldBeTrue("createElement('a', {itemid: 'http://example.com/foo', href: 'http://www.webkit.org/'}).itemId == 'http://example.com/foo';");
+debug('');
+shouldBeTrue("createElement('audio', {itemid: 'http://example.com/foo', src: 'test.mp3'}).itemId == 'http://example.com/foo';");
+debug('');
+shouldBeTrue("createElement('base', {itemid: 'http://example.com/foo', href: 'http://www.webkit.org/'}).itemId == 'http://example.com/foo';");
+debug('');
+shouldBeTrue("createElement('blockquote', {itemid: 'http://example.com/foo'}).itemId == 'http://example.com/foo';");
+debug('');
+shouldBeTrue("createElement('body', {itemid: 'http://example.com/foo'}).itemId == 'http://example.com/foo';");
+debug('');
+shouldBeTrue("createElement('button', {itemid: 'http://example.com/foo', type: 'button'}).itemId == 'http://example.com/foo';");
+debug('');
+shouldBeTrue("createElement('del', {itemid: 'http://example.com/foo'}).itemId == 'http://example.com/foo';");
+debug('');
+shouldBeTrue("createElement('div', {itemid: 'http://example.com/foo'}).itemId == 'http://example.com/foo';");
+debug('');
+shouldBeTrue("createElement('embed', {itemid: 'http://example.com/foo', src: 'test.swf'}).itemId == 'http://example.com/foo';");
+debug('');
+shouldBeTrue("createElement('form', {itemid: 'http://example.com/foo'}).itemId == 'http://example.com/foo';");
+debug('');
+shouldBeTrue("createElement('frame', {itemid: 'http://example.com/foo', src: 'test.html'}).itemId == 'http://example.com/foo';");
+debug('');
+shouldBeTrue("createElement('html', {itemid: 'http://example.com/foo'}).itemId == 'http://example.com/foo';");
+debug('');
+shouldBeTrue("createElement('iframe', {itemid: 'http://example.com/foo', src: 'test.html'}).itemId == 'http://example.com/foo';");
+debug('');
+shouldBeTrue("createElement('img', {itemid: 'http://example.com/foo', src: 'image.png'}).itemId == 'http://example.com/foo';");
+debug('');
+shouldBeTrue("createElement('input', {itemid: 'http://example.com/foo', type: 'button'}).itemId == 'http://example.com/foo';");
+debug('');
+shouldBeTrue("createElement('ins', {itemid: 'http://example.com/foo'}).itemId == 'http://example.com/foo';");
+debug('');
+shouldBeTrue("createElement('link', {itemid: 'http://example.com/foo', type: 'text/css', href: 'test.css'}).itemId == 'http://example.com/foo';");
+debug('');
+shouldBeTrue("createElement('object', {itemid: 'http://example.com/foo', data: 'test.swf'}).itemId == 'http://example.com/foo';");
+debug('');
+shouldBeTrue("createElement('param', {itemid: 'http://example.com/foo', name: 'my_param'}).itemId == 'http://example.com/foo';");
+debug('');
+shouldBeTrue("createElement('q', {itemid: 'http://example.com/foo'}).itemId == 'http://example.com/foo';");
+debug('');
+shouldBeTrue("createElement('source', {itemid: 'http://example.com/foo', type: 'audio/mpeg', src: 'test.mp3'}).itemId == 'http://example.com/foo';");
+debug('');
+shouldBeTrue("createElement('table', {itemid: 'http://example.com/foo'}).itemId == 'http://example.com/foo';");
+debug('');
+shouldBeTrue("createElement('td', {itemid: 'http://example.com/foo'}).itemId == 'http://example.com/foo';");
+debug('');
+shouldBeTrue("createElement('track', {itemid: 'http://example.com/foo', type: 'audio/mpeg', src: 'test.vtt'}).itemId == 'http://example.com/foo';");
+debug('');
+shouldBeTrue("createElement('video', {itemid: 'http://example.com/foo', src: 'test.mp4'}).itemId == 'http://example.com/foo';");
+debug('');
+
+</script>
+<script src=""
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (99741 => 99742)


--- trunk/Source/WebCore/ChangeLog	2011-11-09 19:28:12 UTC (rev 99741)
+++ trunk/Source/WebCore/ChangeLog	2011-11-09 19:35:28 UTC (rev 99742)
@@ -1,3 +1,64 @@
+2011-11-09  Arko Saha  <[email protected]>
+
+        Microdata: fast/dom/MicroData/itemid-attribute-test.html assertion failure in Element::getURLAttribute().
+        https://bugs.webkit.org/show_bug.cgi?id=71510
+
+        Reviewed by Darin Adler.
+
+        Override isURLAttribute() for HTMLElement and return true if attribute is itemidAttr.
+        All the classes derived from HTMLElement overrides this function should return true if attribute is itemidAttr.
+        Removed HTMLIFrameElement::isURLAttribute() method as HTMLFrameElementBase already takes care of it.
+
+        Test: fast/dom/MicroData/itemid-attribute-test-001.html
+
+        * html/HTMLAnchorElement.cpp:
+        (WebCore::HTMLAnchorElement::isURLAttribute):
+        * html/HTMLBaseElement.cpp:
+        (WebCore::HTMLBaseElement::isURLAttribute):
+        * html/HTMLBodyElement.cpp:
+        (WebCore::HTMLBodyElement::isURLAttribute):
+        * html/HTMLButtonElement.cpp:
+        (WebCore::HTMLButtonElement::isURLAttribute):
+        * html/HTMLElement.cpp:
+        (WebCore::HTMLElement::isURLAttribute):
+        * html/HTMLElement.h:
+        * html/HTMLEmbedElement.cpp:
+        (WebCore::HTMLEmbedElement::isURLAttribute):
+        * html/HTMLFormElement.cpp:
+        (WebCore::HTMLFormElement::isURLAttribute):
+        * html/HTMLFrameElementBase.cpp:
+        (WebCore::HTMLFrameElementBase::isURLAttribute):
+        * html/HTMLHtmlElement.cpp:
+        (WebCore::HTMLHtmlElement::isURLAttribute):
+        * html/HTMLIFrameElement.cpp:
+        * html/HTMLIFrameElement.h:
+        * html/HTMLImageElement.cpp:
+        (WebCore::HTMLImageElement::isURLAttribute):
+        * html/HTMLInputElement.cpp:
+        (WebCore::HTMLInputElement::isURLAttribute):
+        * html/HTMLLinkElement.cpp:
+        (WebCore::HTMLLinkElement::isURLAttribute):
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::isURLAttribute):
+        * html/HTMLModElement.cpp:
+        (WebCore::HTMLModElement::isURLAttribute):
+        * html/HTMLObjectElement.cpp:
+        (WebCore::HTMLObjectElement::isURLAttribute):
+        * html/HTMLParamElement.cpp:
+        (WebCore::HTMLParamElement::isURLAttribute):
+        * html/HTMLQuoteElement.cpp:
+        (WebCore::HTMLQuoteElement::isURLAttribute):
+        * html/HTMLScriptElement.cpp:
+        (WebCore::HTMLScriptElement::isURLAttribute):
+        * html/HTMLSourceElement.cpp:
+        (WebCore::HTMLSourceElement::isURLAttribute):
+        * html/HTMLTableCellElement.cpp:
+        (WebCore::HTMLTableCellElement::isURLAttribute):
+        * html/HTMLTableElement.cpp:
+        (WebCore::HTMLTableElement::isURLAttribute):
+        * html/HTMLTrackElement.cpp:
+        (WebCore::HTMLTrackElement::isURLAttribute):
+
 2011-11-09  Chris Fleizach  <[email protected]>
 
         AX: crash when accessing selectedTab in a tab list

Modified: trunk/Source/WebCore/html/HTMLAnchorElement.cpp (99741 => 99742)


--- trunk/Source/WebCore/html/HTMLAnchorElement.cpp	2011-11-09 19:28:12 UTC (rev 99741)
+++ trunk/Source/WebCore/html/HTMLAnchorElement.cpp	2011-11-09 19:35:28 UTC (rev 99742)
@@ -238,7 +238,7 @@
 
 bool HTMLAnchorElement::isURLAttribute(Attribute *attr) const
 {
-    return attr->name() == hrefAttr;
+    return attr->name() == hrefAttr || HTMLElement::isURLAttribute(attr);
 }
 
 bool HTMLAnchorElement::canStartSelection() const

Modified: trunk/Source/WebCore/html/HTMLBaseElement.cpp (99741 => 99742)


--- trunk/Source/WebCore/html/HTMLBaseElement.cpp	2011-11-09 19:28:12 UTC (rev 99741)
+++ trunk/Source/WebCore/html/HTMLBaseElement.cpp	2011-11-09 19:35:28 UTC (rev 99742)
@@ -64,7 +64,7 @@
 
 bool HTMLBaseElement::isURLAttribute(Attribute* attribute) const
 {
-    return attribute->name() == hrefAttr;
+    return attribute->name() == hrefAttr || HTMLElement::isURLAttribute(attribute);
 }
 
 String HTMLBaseElement::target() const

Modified: trunk/Source/WebCore/html/HTMLBodyElement.cpp (99741 => 99742)


--- trunk/Source/WebCore/html/HTMLBodyElement.cpp	2011-11-09 19:28:12 UTC (rev 99741)
+++ trunk/Source/WebCore/html/HTMLBodyElement.cpp	2011-11-09 19:35:28 UTC (rev 99742)
@@ -189,7 +189,7 @@
 
 bool HTMLBodyElement::isURLAttribute(Attribute *attr) const
 {
-    return attr->name() == backgroundAttr;
+    return attr->name() == backgroundAttr || HTMLElement::isURLAttribute(attr);
 }
 
 bool HTMLBodyElement::supportsFocus() const

Modified: trunk/Source/WebCore/html/HTMLButtonElement.cpp (99741 => 99742)


--- trunk/Source/WebCore/html/HTMLButtonElement.cpp	2011-11-09 19:28:12 UTC (rev 99741)
+++ trunk/Source/WebCore/html/HTMLButtonElement.cpp	2011-11-09 19:35:28 UTC (rev 99742)
@@ -171,7 +171,7 @@
 
 bool HTMLButtonElement::isURLAttribute(Attribute* attr) const
 {
-    return attr->name() == formactionAttr;
+    return attr->name() == formactionAttr || HTMLFormControlElement::isURLAttribute(attr);
 }
 
 String HTMLButtonElement::value() const

Modified: trunk/Source/WebCore/html/HTMLElement.cpp (99741 => 99742)


--- trunk/Source/WebCore/html/HTMLElement.cpp	2011-11-09 19:28:12 UTC (rev 99741)
+++ trunk/Source/WebCore/html/HTMLElement.cpp	2011-11-09 19:35:28 UTC (rev 99742)
@@ -994,7 +994,17 @@
     }
 }
 
+bool HTMLElement::isURLAttribute(Attribute* attribute) const
+{
 #if ENABLE(MICRODATA)
+    return attribute->name() == itemidAttr;
+#else
+    UNUSED_PARAM(attribute);
+    return false;
+#endif
+}
+
+#if ENABLE(MICRODATA)
 PassRefPtr<DOMSettableTokenList> HTMLElement::itemProp() const
 {
     if (!m_itemProp)

Modified: trunk/Source/WebCore/html/HTMLElement.h (99741 => 99742)


--- trunk/Source/WebCore/html/HTMLElement.h	2011-11-09 19:28:12 UTC (rev 99741)
+++ trunk/Source/WebCore/html/HTMLElement.h	2011-11-09 19:35:28 UTC (rev 99742)
@@ -110,6 +110,8 @@
     virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
     void calculateAndAdjustDirectionality();
 
+    virtual bool isURLAttribute(Attribute*) const;
+
 private:
     virtual String nodeName() const;
 

Modified: trunk/Source/WebCore/html/HTMLEmbedElement.cpp (99741 => 99742)


--- trunk/Source/WebCore/html/HTMLEmbedElement.cpp	2011-11-09 19:28:12 UTC (rev 99741)
+++ trunk/Source/WebCore/html/HTMLEmbedElement.cpp	2011-11-09 19:35:28 UTC (rev 99742)
@@ -262,7 +262,7 @@
 
 bool HTMLEmbedElement::isURLAttribute(Attribute* attr) const
 {
-    return attr->name() == srcAttr;
+    return attr->name() == srcAttr || HTMLPlugInImageElement::isURLAttribute(attr);
 }
 
 const QualifiedName& HTMLEmbedElement::imageSourceAttributeName() const

Modified: trunk/Source/WebCore/html/HTMLFormElement.cpp (99741 => 99742)


--- trunk/Source/WebCore/html/HTMLFormElement.cpp	2011-11-09 19:28:12 UTC (rev 99741)
+++ trunk/Source/WebCore/html/HTMLFormElement.cpp	2011-11-09 19:35:28 UTC (rev 99742)
@@ -497,7 +497,7 @@
 
 bool HTMLFormElement::isURLAttribute(Attribute* attr) const
 {
-    return attr->name() == actionAttr;
+    return attr->name() == actionAttr || HTMLElement::isURLAttribute(attr);
 }
 
 void HTMLFormElement::registerImgElement(HTMLImageElement* e)

Modified: trunk/Source/WebCore/html/HTMLFrameElementBase.cpp (99741 => 99742)


--- trunk/Source/WebCore/html/HTMLFrameElementBase.cpp	2011-11-09 19:28:12 UTC (rev 99741)
+++ trunk/Source/WebCore/html/HTMLFrameElementBase.cpp	2011-11-09 19:35:28 UTC (rev 99742)
@@ -259,7 +259,7 @@
 
 bool HTMLFrameElementBase::isURLAttribute(Attribute *attr) const
 {
-    return attr->name() == srcAttr;
+    return attr->name() == srcAttr || HTMLFrameOwnerElement::isURLAttribute(attr);
 }
 
 int HTMLFrameElementBase::width()

Modified: trunk/Source/WebCore/html/HTMLHtmlElement.cpp (99741 => 99742)


--- trunk/Source/WebCore/html/HTMLHtmlElement.cpp	2011-11-09 19:28:12 UTC (rev 99741)
+++ trunk/Source/WebCore/html/HTMLHtmlElement.cpp	2011-11-09 19:35:28 UTC (rev 99742)
@@ -53,7 +53,7 @@
 
 bool HTMLHtmlElement::isURLAttribute(Attribute* attribute) const
 {
-    return attribute->name() == manifestAttr;
+    return attribute->name() == manifestAttr || HTMLElement::isURLAttribute(attribute);
 }
 
 void HTMLHtmlElement::insertedByParser()

Modified: trunk/Source/WebCore/html/HTMLIFrameElement.cpp (99741 => 99742)


--- trunk/Source/WebCore/html/HTMLIFrameElement.cpp	2011-11-09 19:28:12 UTC (rev 99741)
+++ trunk/Source/WebCore/html/HTMLIFrameElement.cpp	2011-11-09 19:35:28 UTC (rev 99742)
@@ -122,11 +122,6 @@
     HTMLFrameElementBase::removedFromDocument();
 }
 
-bool HTMLIFrameElement::isURLAttribute(Attribute* attr) const
-{
-    return attr->name() == srcAttr;
-}
-
 #if ENABLE(MICRODATA)
 String HTMLIFrameElement::itemValueText() const
 {

Modified: trunk/Source/WebCore/html/HTMLIFrameElement.h (99741 => 99742)


--- trunk/Source/WebCore/html/HTMLIFrameElement.h	2011-11-09 19:28:12 UTC (rev 99741)
+++ trunk/Source/WebCore/html/HTMLIFrameElement.h	2011-11-09 19:35:28 UTC (rev 99742)
@@ -43,9 +43,7 @@
     
     virtual bool rendererIsNeeded(const NodeRenderingContext&);
     virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
-    
-    virtual bool isURLAttribute(Attribute*) const;
-
+       
 #if ENABLE(MICRODATA)
     virtual String itemValueText() const OVERRIDE;
     virtual void setItemValueText(const String&, ExceptionCode&) OVERRIDE;

Modified: trunk/Source/WebCore/html/HTMLImageElement.cpp (99741 => 99742)


--- trunk/Source/WebCore/html/HTMLImageElement.cpp	2011-11-09 19:28:12 UTC (rev 99741)
+++ trunk/Source/WebCore/html/HTMLImageElement.cpp	2011-11-09 19:35:28 UTC (rev 99742)
@@ -313,7 +313,8 @@
     return attr->name() == srcAttr
         || attr->name() == lowsrcAttr
         || attr->name() == longdescAttr
-        || (attr->name() == usemapAttr && attr->value().string()[0] != '#');
+        || (attr->name() == usemapAttr && attr->value().string()[0] != '#')
+        || HTMLElement::isURLAttribute(attr);
 }
 
 const AtomicString& HTMLImageElement::alt() const

Modified: trunk/Source/WebCore/html/HTMLInputElement.cpp (99741 => 99742)


--- trunk/Source/WebCore/html/HTMLInputElement.cpp	2011-11-09 19:28:12 UTC (rev 99741)
+++ trunk/Source/WebCore/html/HTMLInputElement.cpp	2011-11-09 19:35:28 UTC (rev 99742)
@@ -1292,7 +1292,7 @@
 
 bool HTMLInputElement::isURLAttribute(Attribute *attr) const
 {
-    return (attr->name() == srcAttr || attr->name() == formactionAttr);
+    return attr->name() == srcAttr || attr->name() == formactionAttr || HTMLTextFormControlElement::isURLAttribute(attr);
 }
 
 String HTMLInputElement::defaultValue() const

Modified: trunk/Source/WebCore/html/HTMLLinkElement.cpp (99741 => 99742)


--- trunk/Source/WebCore/html/HTMLLinkElement.cpp	2011-11-09 19:28:12 UTC (rev 99741)
+++ trunk/Source/WebCore/html/HTMLLinkElement.cpp	2011-11-09 19:35:28 UTC (rev 99742)
@@ -370,7 +370,7 @@
 
 bool HTMLLinkElement::isURLAttribute(Attribute *attr) const
 {
-    return attr->name() == hrefAttr;
+    return attr->name() == hrefAttr || HTMLElement::isURLAttribute(attr);
 }
 
 KURL HTMLLinkElement::href() const

Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (99741 => 99742)


--- trunk/Source/WebCore/html/HTMLMediaElement.cpp	2011-11-09 19:28:12 UTC (rev 99741)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp	2011-11-09 19:35:28 UTC (rev 99742)
@@ -2982,7 +2982,7 @@
 
 bool HTMLMediaElement::isURLAttribute(Attribute* attribute) const
 {
-    return attribute->name() == srcAttr;
+    return attribute->name() == srcAttr || HTMLElement::isURLAttribute(attribute);
 }
 
 void HTMLMediaElement::setShouldDelayLoadEvent(bool shouldDelay)

Modified: trunk/Source/WebCore/html/HTMLModElement.cpp (99741 => 99742)


--- trunk/Source/WebCore/html/HTMLModElement.cpp	2011-11-09 19:28:12 UTC (rev 99741)
+++ trunk/Source/WebCore/html/HTMLModElement.cpp	2011-11-09 19:35:28 UTC (rev 99742)
@@ -41,7 +41,7 @@
 
 bool HTMLModElement::isURLAttribute(Attribute* attribute) const
 {
-    return attribute->name() == citeAttr;
+    return attribute->name() == citeAttr || HTMLElement::isURLAttribute(attribute);
 }
 
 }

Modified: trunk/Source/WebCore/html/HTMLObjectElement.cpp (99741 => 99742)


--- trunk/Source/WebCore/html/HTMLObjectElement.cpp	2011-11-09 19:28:12 UTC (rev 99741)
+++ trunk/Source/WebCore/html/HTMLObjectElement.cpp	2011-11-09 19:35:28 UTC (rev 99742)
@@ -384,7 +384,7 @@
 
 bool HTMLObjectElement::isURLAttribute(Attribute *attr) const
 {
-    return (attr->name() == dataAttr || (attr->name() == usemapAttr && attr->value().string()[0] != '#'));
+    return attr->name() == dataAttr || (attr->name() == usemapAttr && attr->value().string()[0] != '#') || HTMLPlugInImageElement::isURLAttribute(attr);
 }
 
 const QualifiedName& HTMLObjectElement::imageSourceAttributeName() const

Modified: trunk/Source/WebCore/html/HTMLParamElement.cpp (99741 => 99742)


--- trunk/Source/WebCore/html/HTMLParamElement.cpp	2011-11-09 19:28:12 UTC (rev 99741)
+++ trunk/Source/WebCore/html/HTMLParamElement.cpp	2011-11-09 19:35:28 UTC (rev 99742)
@@ -73,7 +73,7 @@
                 return true;
         }
     }
-    return false;
+    return HTMLElement::isURLAttribute(attr);
 }
 
 void HTMLParamElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) const

Modified: trunk/Source/WebCore/html/HTMLQuoteElement.cpp (99741 => 99742)


--- trunk/Source/WebCore/html/HTMLQuoteElement.cpp	2011-11-09 19:28:12 UTC (rev 99741)
+++ trunk/Source/WebCore/html/HTMLQuoteElement.cpp	2011-11-09 19:35:28 UTC (rev 99742)
@@ -51,7 +51,7 @@
 
 bool HTMLQuoteElement::isURLAttribute(Attribute* attribute) const
 {
-    return attribute->name() == citeAttr;
+    return attribute->name() == citeAttr || HTMLElement::isURLAttribute(attribute);
 }
 
 }

Modified: trunk/Source/WebCore/html/HTMLScriptElement.cpp (99741 => 99742)


--- trunk/Source/WebCore/html/HTMLScriptElement.cpp	2011-11-09 19:28:12 UTC (rev 99741)
+++ trunk/Source/WebCore/html/HTMLScriptElement.cpp	2011-11-09 19:35:28 UTC (rev 99742)
@@ -49,7 +49,7 @@
 
 bool HTMLScriptElement::isURLAttribute(Attribute* attr) const
 {
-    return attr->name() == srcAttr;
+    return attr->name() == srcAttr || HTMLElement::isURLAttribute(attr);
 }
 
 void HTMLScriptElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)

Modified: trunk/Source/WebCore/html/HTMLSourceElement.cpp (99741 => 99742)


--- trunk/Source/WebCore/html/HTMLSourceElement.cpp	2011-11-09 19:28:12 UTC (rev 99741)
+++ trunk/Source/WebCore/html/HTMLSourceElement.cpp	2011-11-09 19:35:28 UTC (rev 99742)
@@ -118,7 +118,7 @@
 
 bool HTMLSourceElement::isURLAttribute(Attribute* attribute) const
 {
-    return attribute->name() == srcAttr;
+    return attribute->name() == srcAttr || HTMLElement::isURLAttribute(attribute);
 }
 
 #if ENABLE(MICRODATA)

Modified: trunk/Source/WebCore/html/HTMLTableCellElement.cpp (99741 => 99742)


--- trunk/Source/WebCore/html/HTMLTableCellElement.cpp	2011-11-09 19:28:12 UTC (rev 99741)
+++ trunk/Source/WebCore/html/HTMLTableCellElement.cpp	2011-11-09 19:35:28 UTC (rev 99742)
@@ -131,7 +131,7 @@
 
 bool HTMLTableCellElement::isURLAttribute(Attribute *attr) const
 {
-    return attr->name() == backgroundAttr;
+    return attr->name() == backgroundAttr || HTMLTablePartElement::isURLAttribute(attr);
 }
 
 String HTMLTableCellElement::abbr() const

Modified: trunk/Source/WebCore/html/HTMLTableElement.cpp (99741 => 99742)


--- trunk/Source/WebCore/html/HTMLTableElement.cpp	2011-11-09 19:28:12 UTC (rev 99741)
+++ trunk/Source/WebCore/html/HTMLTableElement.cpp	2011-11-09 19:35:28 UTC (rev 99742)
@@ -640,7 +640,7 @@
 
 bool HTMLTableElement::isURLAttribute(Attribute *attr) const
 {
-    return attr->name() == backgroundAttr;
+    return attr->name() == backgroundAttr || HTMLElement::isURLAttribute(attr);
 }
 
 PassRefPtr<HTMLCollection> HTMLTableElement::rows()

Modified: trunk/Source/WebCore/html/HTMLTrackElement.cpp (99741 => 99742)


--- trunk/Source/WebCore/html/HTMLTrackElement.cpp	2011-11-09 19:28:12 UTC (rev 99741)
+++ trunk/Source/WebCore/html/HTMLTrackElement.cpp	2011-11-09 19:35:28 UTC (rev 99742)
@@ -154,7 +154,7 @@
 
 bool HTMLTrackElement::isURLAttribute(Attribute* attribute) const
 {
-    return attribute->name() == srcAttr;
+    return attribute->name() == srcAttr || HTMLElement::isURLAttribute(attribute);
 }
 
 void HTMLTrackElement::load(ScriptExecutionContext* context, TextTrackClient* trackClient)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to