Changeset 147018 in webkit
- Timestamp:
- Mar 27, 2013 4:45:11 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r147002 r147018 1 2013-03-22 Geoffrey Garen <ggaren@apple.com> 2 3 Honor the setting for whether JavaScript markup is enabled 4 https://bugs.webkit.org/show_bug.cgi?id=113122 5 6 Reviewed by Ryosuke Niwa. 7 8 * editing/unsupported-content/script-markup-enabled-setting-expected.txt: Added. 9 * editing/unsupported-content/script-markup-enabled-setting.html: Added. 10 1 11 2013-03-27 Zan Dobersek <zdobersek@igalia.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r147012 r147018 1 2013-03-22 Geoffrey Garen <ggaren@apple.com> 2 3 Honor the setting for whether JavaScript markup is enabled 4 https://bugs.webkit.org/show_bug.cgi?id=113122 5 6 Reviewed by Ryosuke Niwa. 7 8 * dom/ScriptableDocumentParser.cpp: 9 (WebCore::ScriptableDocumentParser::ScriptableDocumentParser): Applied the 10 setting here, so all document parsing would be covered. This is similar 11 to what we do for plug-in stripping. 12 13 * html/parser/HTMLConstructionSite.cpp: 14 (WebCore::HTMLConstructionSite::insertForeignElement): Fixed a bug where 15 we would insert an SVG script element into the document even in script 16 markup disabled mode. 17 18 (This bug has existed for copy/paste for a long time, but other bugs and 19 quirks in SVG copy/paste papered over it. It's a serious issue now 20 that non-paste clients will rely on this mode.) 21 22 * html/parser/HTMLTreeBuilder.cpp: 23 (WebCore::HTMLTreeBuilder::processTokenInForeignContent): Fixed the same 24 bug -- this time in the part of the parser that executes scripts as they 25 parse. 26 27 I adopted the toScriptElement() convention for testing for a script 28 element to match the XML parser. 29 1 30 2013-03-27 Dean Jackson <dino@apple.com> 2 31 -
trunk/Source/WebCore/dom/ScriptableDocumentParser.cpp
r146264 r147018 41 41 if (!pluginContentIsAllowed(m_parserContentPolicy) && (!document->settings() || document->settings()->unsafePluginPastingEnabled())) 42 42 m_parserContentPolicy = allowPluginContent(m_parserContentPolicy); 43 44 if (scriptingContentIsAllowed(m_parserContentPolicy) && (document->settings() && !document->settings()->scriptMarkupEnabled())) 45 m_parserContentPolicy = disallowScriptingContent(m_parserContentPolicy); 43 46 } 44 47 -
trunk/Source/WebCore/html/parser/HTMLConstructionSite.cpp
r146264 r147018 42 42 #include "HTMLNames.h" 43 43 #include "HTMLParserIdioms.h" 44 #include "HTMLPlugInElement.h" 44 45 #include "HTMLScriptElement.h" 45 46 #include "HTMLStackItem.h" … … 107 108 void HTMLConstructionSite::attachLater(ContainerNode* parent, PassRefPtr<Node> prpChild, bool selfClosing) 108 109 { 110 ASSERT(scriptingContentIsAllowed(m_parserContentPolicy) || !toElement(prpChild.get()) || !toScriptElement(toElement(prpChild.get()))); 111 ASSERT(pluginContentIsAllowed(m_parserContentPolicy) || !prpChild->isPluginElement()); 112 109 113 HTMLConstructionSiteTask task; 110 114 task.parent = parent; … … 463 467 464 468 RefPtr<Element> element = createElement(token, namespaceURI); 465 attachLater(currentNode(), element, token->selfClosing()); 469 if (scriptingContentIsAllowed(m_parserContentPolicy) || !toScriptElement(element.get())) 470 attachLater(currentNode(), element, token->selfClosing()); 466 471 if (!token->selfClosing()) 467 472 m_openElements.push(HTMLStackItem::create(element.release(), token, namespaceURI)); -
trunk/Source/WebCore/html/parser/HTMLTreeBuilder.cpp
r146264 r147018 2869 2869 2870 2870 if (token->name() == SVGNames::scriptTag && m_tree.currentStackItem()->hasTagName(SVGNames::scriptTag)) { 2871 m_scriptToProcess = m_tree.currentElement(); 2871 if (scriptingContentIsAllowed(m_tree.parserContentPolicy())) 2872 m_scriptToProcess = m_tree.currentElement(); 2872 2873 m_tree.openElements()->pop(); 2873 2874 return;
Note: See TracChangeset
for help on using the changeset viewer.