Changeset 53845 in webkit
- Timestamp:
- Jan 26, 2010 2:04:15 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r53844 r53845 1 2010-01-26 Simon Hausmann <simon.hausmann@nokia.com> 2 3 Reviewed by Holger Freyther. 4 5 REGRESSION(r53835): Fix editing/pasteboard/paste-noscript-xhtml.xhtml 6 https://bugs.webkit.org/show_bug.cgi?id=34157 7 8 Add Qt specific result for this test that differs from the cross-platform 9 result in only one character: In htmlcontent.html the href attribute value 10 is http://www.cnn.com, which somehow becomes http://www.cnn.com/ in the cross 11 platform result. With the Qt xml parser that attribute is somehow preserved 12 and so our result does not have the trailing slash. 13 14 * platform/qt/editing/pasteboard/paste-noscript-xhtml-expected.txt: Added. 15 1 16 2010-01-26 Kent Tamura <tkent@chromium.org> 2 17 -
trunk/WebCore/ChangeLog
r53843 r53845 1 2010-01-26 Simon Hausmann <simon.hausmann@nokia.com> 2 3 Reviewed by Holger Freyther. 4 5 REGRESSION(r53835): Fix editing/pasteboard/paste-noscript-xhtml.xhtml 6 https://bugs.webkit.org/show_bug.cgi?id=34157 7 8 Pass the FragmentScriptingPermission correctly through to the DOM 9 and disallow scripting elements in parseEndElement(), similar to 10 the libxml tokenizer change in r53835. 11 12 * dom/XMLTokenizerQt.cpp: 13 (WebCore::handleElementNamespaces): 14 (WebCore::handleElementAttributes): 15 (WebCore::XMLTokenizer::parseStartElement): 16 (WebCore::XMLTokenizer::parseEndElement): 17 1 18 2010-01-26 Garret Kelly <gdk@chromium.org> 2 19 -
trunk/WebCore/dom/XMLTokenizerQt.cpp
r53842 r53845 325 325 326 326 static inline void handleElementNamespaces(Element* newElement, const QXmlStreamNamespaceDeclarations &ns, 327 ExceptionCode& ec )327 ExceptionCode& ec, FragmentScriptingPermission scriptingPermission) 328 328 { 329 329 for (int i = 0; i < ns.count(); ++i) { … … 331 331 String namespaceURI = decl.namespaceUri(); 332 332 String namespaceQName = decl.prefix().isEmpty() ? String("xmlns") : String("xmlns:") + decl.prefix(); 333 newElement->setAttributeNS("http://www.w3.org/2000/xmlns/", namespaceQName, namespaceURI, ec );333 newElement->setAttributeNS("http://www.w3.org/2000/xmlns/", namespaceQName, namespaceURI, ec, scriptingPermission); 334 334 if (ec) // exception setting attributes 335 335 return; … … 337 337 } 338 338 339 static inline void handleElementAttributes(Element* newElement, const QXmlStreamAttributes &attrs, ExceptionCode& ec) 339 static inline void handleElementAttributes(Element* newElement, const QXmlStreamAttributes &attrs, ExceptionCode& ec, 340 FragmentScriptingPermission scriptingPermission) 340 341 { 341 342 for (int i = 0; i < attrs.count(); ++i) { … … 345 346 String attrURI = attr.namespaceUri().isEmpty() ? String() : String(attr.namespaceUri()); 346 347 String attrQName = attr.qualifiedName(); 347 newElement->setAttributeNS(attrURI, attrQName, attrValue, ec );348 newElement->setAttributeNS(attrURI, attrQName, attrValue, ec, scriptingPermission); 348 349 if (ec) // exception setting attributes 349 350 return; … … 505 506 506 507 ExceptionCode ec = 0; 507 handleElementNamespaces(newElement.get(), m_stream.namespaceDeclarations(), ec );508 handleElementNamespaces(newElement.get(), m_stream.namespaceDeclarations(), ec, m_scriptingPermission); 508 509 if (ec) { 509 510 stopParsing(); … … 511 512 } 512 513 513 handleElementAttributes(newElement.get(), m_stream.attributes(), ec );514 handleElementAttributes(newElement.get(), m_stream.attributes(), ec, m_scriptingPermission); 514 515 if (ec) { 515 516 stopParsing(); … … 540 541 Node* n = m_currentNode; 541 542 n->finishParsingChildren(); 543 544 if (m_scriptingPermission == FragmentScriptingNotAllowed && n->isElementNode() && toScriptElement(static_cast<Element*>(n))) { 545 popCurrentNode(); 546 ExceptionCode ec; 547 n->remove(ec); 548 return; 549 } 542 550 543 551 if (!n->isElementNode() || !m_view) {
Note: See TracChangeset
for help on using the changeset viewer.