12010-08-26 Darin Adler <darin@apple.com>
2
3 Reviewed by NOBODY (OOPS!).
4
5 Some IDL attributes don't reflect URL content attributes properly
6 https://bugs.webkit.org/show_bug.cgi?id=43650
7
8 * dom/Document.cpp:
9 (WebCore::Document::processBaseElement): Added. Implements the rules for base elements
10 from the HTML5 specification. Handles multiple base elements in the same document.
11
12 * dom/Document.h: Removed setBaseElementURL and setBaseElementTarget, replacing them
13 with processBaseElement.
14
15 * html/HTMLBaseElement.cpp:
16 (WebCore::HTMLBaseElement::parseMappedAttribute): Call the new processBaseElement
17 function.
18 (WebCore::HTMLBaseElement::insertedIntoDocument): Ditto.
19 (WebCore::HTMLBaseElement::removedFromDocument): Ditto.
20 (WebCore::HTMLBaseElement::isURLAttribute): Added.
21 (WebCore::HTMLBaseElement::target): Moved here from the .h file and changed to not
22 realy on an m_target local variable.
23
24 * html/HTMLBaseElement.h: Added an override of the isURLAttribute function. Removed
25 unneeded process function. Removed declaration of nonexistent setHref and setTarget
26 functions. Removed unneeded m_hrefAttrValue, m_href, and m_target. Moved
27 implementation of target function into the .cpp file.
28
29 * html/HTMLBaseElement.idl: Marked the href attribute as URL.
30
31 * html/HTMLBlockquoteElement.cpp:
32 (WebCore::HTMLBlockquoteElement::isURLAttribute): Added.
33 * html/HTMLBlockquoteElement.h: Added isURLAttribute.
34 * html/HTMLBlockquoteElement.idl: Marked the cite attribute as URL.
35
36 * html/HTMLEmbedElement.idl: Marked the src attribute as URL.
37
38 * html/HTMLFormElement.cpp: Added a comment about the action function, which should
39 be removed.
40
41 * html/HTMLFormElement.idl: Marked the action attribute as URL.
42
43 * html/HTMLHtmlElement.cpp:
44 (WebCore::HTMLHtmlElement::isURLAttribute): Added.
45 (WebCore::HTMLHtmlElement::insertedIntoDocument): Tweaked a bit.
46 * html/HTMLHtmlElement.h: Added isURLAttribute.
47 * html/HTMLHtmlElement.idl: Marked the manifest attribute as URL.
48
49 * html/HTMLIFrameElement.idl: Marked the src attribute a URL.
50
51 * html/HTMLModElement.cpp:
52 (WebCore::HTMLModElement::isURLAttribute): Added.
53 * html/HTMLModElement.h: Added isURLAttribute.
54 * html/HTMLModElement.idl: Marked the cite attribute as URL.
55
56 * html/HTMLQuoteElement.cpp:
57 (WebCore::HTMLQuoteElement::isURLAttribute): Added.
58 * html/HTMLQuoteElement.h: Added isURLAttribute.
59 * html/HTMLQuoteElement.idl: Marked the cite attribute as URL.
60
61 * html/HTMLViewSourceDocument.cpp:
62 (WebCore::HTMLViewSourceDocument::processTagToken): Changed code to create a base
63 element instead of calling setBaseElementURL directly.
64 (WebCore::HTMLViewSourceDocument::addSpanWithClassName): Use AtomicString instead of String.
65 (WebCore::HTMLViewSourceDocument::addLine): Ditto.
66 (WebCore::HTMLViewSourceDocument::addText): Ditto.
67 (WebCore::HTMLViewSourceDocument::addBase): Added. Creates a base element and inserts it.
68 (WebCore::HTMLViewSourceDocument::addLink): Use AtomicString instead of String.
69
70 * html/HTMLViewSourceDocument.h: Updated function declarations as above.
71