Microdata: fast/dom/MicroData/itemid-attribute-test.html assertion failure in Element...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Nov 2011 19:35:28 +0000 (19:35 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Nov 2011 19:35:28 +0000 (19:35 +0000)
https://bugs.webkit.org/show_bug.cgi?id=71510

Patch by Arko Saha <arko@motorola.com> 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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99742 268f45cc-cd09-0410-ab3c-d52691b4dbfc

29 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/dom/MicroData/itemid-attribute-test-001-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/MicroData/itemid-attribute-test-001.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLAnchorElement.cpp
Source/WebCore/html/HTMLBaseElement.cpp
Source/WebCore/html/HTMLBodyElement.cpp
Source/WebCore/html/HTMLButtonElement.cpp
Source/WebCore/html/HTMLElement.cpp
Source/WebCore/html/HTMLElement.h
Source/WebCore/html/HTMLEmbedElement.cpp
Source/WebCore/html/HTMLFormElement.cpp
Source/WebCore/html/HTMLFrameElementBase.cpp
Source/WebCore/html/HTMLHtmlElement.cpp
Source/WebCore/html/HTMLIFrameElement.cpp
Source/WebCore/html/HTMLIFrameElement.h
Source/WebCore/html/HTMLImageElement.cpp
Source/WebCore/html/HTMLInputElement.cpp
Source/WebCore/html/HTMLLinkElement.cpp
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLModElement.cpp
Source/WebCore/html/HTMLObjectElement.cpp
Source/WebCore/html/HTMLParamElement.cpp
Source/WebCore/html/HTMLQuoteElement.cpp
Source/WebCore/html/HTMLScriptElement.cpp
Source/WebCore/html/HTMLSourceElement.cpp
Source/WebCore/html/HTMLTableCellElement.cpp
Source/WebCore/html/HTMLTableElement.cpp
Source/WebCore/html/HTMLTrackElement.cpp

index 8a5a2fd..388d09a 100755 (executable)
@@ -1,3 +1,13 @@
+2011-11-09  Arko Saha  <arko@motorola.com>
+
+        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  <cfleizach@apple.com>
 
         AX: crash when accessing selectedTab in a tab list
diff --git a/LayoutTests/fast/dom/MicroData/itemid-attribute-test-001-expected.txt b/LayoutTests/fast/dom/MicroData/itemid-attribute-test-001-expected.txt
new file mode 100644 (file)
index 0000000..d3550b1
--- /dev/null
@@ -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
+
diff --git a/LayoutTests/fast/dom/MicroData/itemid-attribute-test-001.html b/LayoutTests/fast/dom/MicroData/itemid-attribute-test-001.html
new file mode 100644 (file)
index 0000000..1ff6cb1
--- /dev/null
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../js/resources/js-test-pre.js"></script>
+<script src="resources/microdata-common.js"></script>
+</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="../../js/resources/js-test-post.js"></script>
+</body>
+</html>
index 1f696c0..6b68f81 100755 (executable)
@@ -1,3 +1,64 @@
+2011-11-09  Arko Saha  <arko@motorola.com>
+
+        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  <cfleizach@apple.com>
 
         AX: crash when accessing selectedTab in a tab list
index 5d75cd2..f82936b 100644 (file)
@@ -238,7 +238,7 @@ void HTMLAnchorElement::accessKeyAction(bool sendToAnyElement)
 
 bool HTMLAnchorElement::isURLAttribute(Attribute *attr) const
 {
-    return attr->name() == hrefAttr;
+    return attr->name() == hrefAttr || HTMLElement::isURLAttribute(attr);
 }
 
 bool HTMLAnchorElement::canStartSelection() const
index 0dd16fa..9df2ad7 100644 (file)
@@ -64,7 +64,7 @@ void HTMLBaseElement::removedFromDocument()
 
 bool HTMLBaseElement::isURLAttribute(Attribute* attribute) const
 {
-    return attribute->name() == hrefAttr;
+    return attribute->name() == hrefAttr || HTMLElement::isURLAttribute(attribute);
 }
 
 String HTMLBaseElement::target() const
index 214df6a..6558d46 100644 (file)
@@ -189,7 +189,7 @@ void HTMLBodyElement::insertedIntoDocument()
 
 bool HTMLBodyElement::isURLAttribute(Attribute *attr) const
 {
-    return attr->name() == backgroundAttr;
+    return attr->name() == backgroundAttr || HTMLElement::isURLAttribute(attr);
 }
 
 bool HTMLBodyElement::supportsFocus() const
index 686790d..f16c5b4 100644 (file)
@@ -171,7 +171,7 @@ void HTMLButtonElement::accessKeyAction(bool sendToAnyElement)
 
 bool HTMLButtonElement::isURLAttribute(Attribute* attr) const
 {
-    return attr->name() == formactionAttr;
+    return attr->name() == formactionAttr || HTMLFormControlElement::isURLAttribute(attr);
 }
 
 String HTMLButtonElement::value() const
index 622c78f..9225d96 100644 (file)
@@ -994,6 +994,16 @@ void HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged(Node* beforeC
     }
 }
 
+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
 {
index d3c627c..100b37f 100644 (file)
@@ -110,6 +110,8 @@ protected:
     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;
 
index 76f72f7..8eb668b 100644 (file)
@@ -262,7 +262,7 @@ void HTMLEmbedElement::attributeChanged(Attribute* attr, bool preserveDecls)
 
 bool HTMLEmbedElement::isURLAttribute(Attribute* attr) const
 {
-    return attr->name() == srcAttr;
+    return attr->name() == srcAttr || HTMLPlugInImageElement::isURLAttribute(attr);
 }
 
 const QualifiedName& HTMLEmbedElement::imageSourceAttributeName() const
index 88ef962..556bf21 100644 (file)
@@ -497,7 +497,7 @@ void HTMLFormElement::removeFormElement(FormAssociatedElement* e)
 
 bool HTMLFormElement::isURLAttribute(Attribute* attr) const
 {
-    return attr->name() == actionAttr;
+    return attr->name() == actionAttr || HTMLElement::isURLAttribute(attr);
 }
 
 void HTMLFormElement::registerImgElement(HTMLImageElement* e)
index 2526acc..f5d22a4 100644 (file)
@@ -259,7 +259,7 @@ void HTMLFrameElementBase::setFocus(bool received)
 
 bool HTMLFrameElementBase::isURLAttribute(Attribute *attr) const
 {
-    return attr->name() == srcAttr;
+    return attr->name() == srcAttr || HTMLFrameOwnerElement::isURLAttribute(attr);
 }
 
 int HTMLFrameElementBase::width()
index 3515a29..a27b0df 100644 (file)
@@ -53,7 +53,7 @@ PassRefPtr<HTMLHtmlElement> HTMLHtmlElement::create(const QualifiedName& tagName
 
 bool HTMLHtmlElement::isURLAttribute(Attribute* attribute) const
 {
-    return attribute->name() == manifestAttr;
+    return attribute->name() == manifestAttr || HTMLElement::isURLAttribute(attribute);
 }
 
 void HTMLHtmlElement::insertedByParser()
index 7c4d110..ae60a1e 100644 (file)
@@ -122,11 +122,6 @@ void HTMLIFrameElement::removedFromDocument()
     HTMLFrameElementBase::removedFromDocument();
 }
 
-bool HTMLIFrameElement::isURLAttribute(Attribute* attr) const
-{
-    return attr->name() == srcAttr;
-}
-
 #if ENABLE(MICRODATA)
 String HTMLIFrameElement::itemValueText() const
 {
index 0f26312..a7aecf8 100644 (file)
@@ -43,9 +43,7 @@ private:
     
     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;
index 9b0819c..42a4e78 100644 (file)
@@ -313,7 +313,8 @@ bool HTMLImageElement::isURLAttribute(Attribute* attr) const
     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
index 667118b..0f6f415 100644 (file)
@@ -1292,7 +1292,7 @@ void HTMLInputElement::defaultEventHandler(Event* evt)
 
 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
index ed8ad2d..2818bdb 100644 (file)
@@ -370,7 +370,7 @@ void HTMLLinkElement::startLoadingDynamicSheet()
 
 bool HTMLLinkElement::isURLAttribute(Attribute *attr) const
 {
-    return attr->name() == hrefAttr;
+    return attr->name() == hrefAttr || HTMLElement::isURLAttribute(attr);
 }
 
 KURL HTMLLinkElement::href() const
index c9065f6..c00c640 100644 (file)
@@ -2982,7 +2982,7 @@ void HTMLMediaElement::mediaCanStart()
 
 bool HTMLMediaElement::isURLAttribute(Attribute* attribute) const
 {
-    return attribute->name() == srcAttr;
+    return attribute->name() == srcAttr || HTMLElement::isURLAttribute(attribute);
 }
 
 void HTMLMediaElement::setShouldDelayLoadEvent(bool shouldDelay)
index 2d409b0..9d0961c 100644 (file)
@@ -41,7 +41,7 @@ PassRefPtr<HTMLModElement> HTMLModElement::create(const QualifiedName& tagName,
 
 bool HTMLModElement::isURLAttribute(Attribute* attribute) const
 {
-    return attribute->name() == citeAttr;
+    return attribute->name() == citeAttr || HTMLElement::isURLAttribute(attribute);
 }
 
 }
index 0bef939..bc66db2 100644 (file)
@@ -384,7 +384,7 @@ void HTMLObjectElement::childrenChanged(bool changedByParser, Node* beforeChange
 
 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
index 45a74b2..d1f53a1 100644 (file)
@@ -73,7 +73,7 @@ bool HTMLParamElement::isURLAttribute(Attribute* attr) const
                 return true;
         }
     }
-    return false;
+    return HTMLElement::isURLAttribute(attr);
 }
 
 void HTMLParamElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) const
index ee9b835..dfc14cb 100644 (file)
@@ -51,7 +51,7 @@ void HTMLQuoteElement::insertedIntoDocument()
 
 bool HTMLQuoteElement::isURLAttribute(Attribute* attribute) const
 {
-    return attribute->name() == citeAttr;
+    return attribute->name() == citeAttr || HTMLElement::isURLAttribute(attribute);
 }
 
 }
index caf734e..9b18ec5 100644 (file)
@@ -49,7 +49,7 @@ PassRefPtr<HTMLScriptElement> HTMLScriptElement::create(const QualifiedName& tag
 
 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)
index eaf611a..99f211a 100644 (file)
@@ -118,7 +118,7 @@ void HTMLSourceElement::errorEventTimerFired(Timer<HTMLSourceElement>*)
 
 bool HTMLSourceElement::isURLAttribute(Attribute* attribute) const
 {
-    return attribute->name() == srcAttr;
+    return attribute->name() == srcAttr || HTMLElement::isURLAttribute(attribute);
 }
 
 #if ENABLE(MICRODATA)
index e7630e5..7e205d9 100644 (file)
@@ -131,7 +131,7 @@ void HTMLTableCellElement::additionalAttributeStyleDecls(Vector<CSSMutableStyleD
 
 bool HTMLTableCellElement::isURLAttribute(Attribute *attr) const
 {
-    return attr->name() == backgroundAttr;
+    return attr->name() == backgroundAttr || HTMLTablePartElement::isURLAttribute(attr);
 }
 
 String HTMLTableCellElement::abbr() const
index 6b8328e..3e25f5a 100644 (file)
@@ -640,7 +640,7 @@ void HTMLTableElement::attach()
 
 bool HTMLTableElement::isURLAttribute(Attribute *attr) const
 {
-    return attr->name() == backgroundAttr;
+    return attr->name() == backgroundAttr || HTMLElement::isURLAttribute(attr);
 }
 
 PassRefPtr<HTMLCollection> HTMLTableElement::rows()
index 051e980..25b4b0d 100644 (file)
@@ -154,7 +154,7 @@ TextTrack* HTMLTrackElement::track() const
 
 bool HTMLTrackElement::isURLAttribute(Attribute* attribute) const
 {
-    return attribute->name() == srcAttr;
+    return attribute->name() == srcAttr || HTMLElement::isURLAttribute(attribute);
 }
 
 void HTMLTrackElement::load(ScriptExecutionContext* context, TextTrackClient* trackClient)