WebCore: https://bugs.webkit.org/show_bug.cgi?id=30132, make beforeload work with <link> elements and
XML processing instructions.
Reviewed by Adam Roben.
Fix up ProcessingInstruction's setData call so that it actually updates a stylesheet when the
data gets changed.
Move dispatchBeforeLoadedEvent to ContainerNode so all Elements (and ProcessingInstruction) can
access it.
Added fast/dom/beforeload/link-before-load.html
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::dispatchBeforeLoadEvent):
* dom/ContainerNode.h:
* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::checkStyleSheet):
(WebCore::ProcessingInstruction::setData):
* dom/ScriptElement.cpp:
(WebCore::ScriptElementData::requestScript):
* dom/ScriptElement.h:
* dom/XMLTokenizerLibxml2.cpp:
(WebCore::XMLTokenizer::endElementNs):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::parseMappedAttribute):
(WebCore::HTMLLinkElement::process):
* html/HTMLScriptElement.cpp:
(WebCore::HTMLScriptElement::forAttributeValue):
* html/HTMLScriptElement.h:
* svg/SVGScriptElement.cpp:
* svg/SVGScriptElement.h:
LayoutTests: https://bugs.webkit.org/show_bug.cgi?id=30132, make beforeload work with CSS stylesheets loaded from
<link> elements and XML processing instructions.
Reviewed by Adam Roben.
* fast/dom/beforeload/link-before-load-expected.txt: Added.
* fast/dom/beforeload/link-before-load.html: Added.
* fast/dom/beforeload/pi-before-load-expected.txt: Added.
* fast/dom/beforeload/pi-before-load.xhtml: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49208 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed