Title: [122596] branches/chromium/1132
- Revision
- 122596
- Author
- [email protected]
- Date
- 2012-07-13 10:06:51 -0700 (Fri, 13 Jul 2012)
Log Message
Merging r118589 into 1132
Modified Paths
Added Paths
Diff
Copied: branches/chromium/1132/LayoutTests/svg/custom/svg-self-closing-use-expected.html (from rev 118589, trunk/LayoutTests/svg/custom/svg-self-closing-use-expected.html) (0 => 122596)
--- branches/chromium/1132/LayoutTests/svg/custom/svg-self-closing-use-expected.html (rev 0)
+++ branches/chromium/1132/LayoutTests/svg/custom/svg-self-closing-use-expected.html 2012-07-13 17:06:51 UTC (rev 122596)
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body>
+<!-- Test for WK87504 that <use/> and <use></use> are equivalent -->
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<defs>
+ <rect id="rect" width="100" height="100" fill="green"/>
+</defs>
+<use xlink:href=""
+</svg>
+</body>
Copied: branches/chromium/1132/LayoutTests/svg/custom/svg-self-closing-use.html (from rev 118589, trunk/LayoutTests/svg/custom/svg-self-closing-use.html) (0 => 122596)
--- branches/chromium/1132/LayoutTests/svg/custom/svg-self-closing-use.html (rev 0)
+++ branches/chromium/1132/LayoutTests/svg/custom/svg-self-closing-use.html 2012-07-13 17:06:51 UTC (rev 122596)
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body>
+<!-- Test for WK87504 that <use/> and <use></use> are equivalent -->
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<defs>
+ <rect id="rect" width="100" height="100" fill="green"/>
+</defs>
+<use xlink:href=""
+</svg>
+</body>
Modified: branches/chromium/1132/Source/WebCore/html/parser/HTMLConstructionSite.cpp (122595 => 122596)
--- branches/chromium/1132/Source/WebCore/html/parser/HTMLConstructionSite.cpp 2012-07-13 16:53:20 UTC (rev 122595)
+++ branches/chromium/1132/Source/WebCore/html/parser/HTMLConstructionSite.cpp 2012-07-13 17:06:51 UTC (rev 122596)
@@ -106,11 +106,12 @@
task.child->finishParsingChildren();
}
-void HTMLConstructionSite::attachLater(ContainerNode* parent, PassRefPtr<Node> prpChild)
+void HTMLConstructionSite::attachLater(ContainerNode* parent, PassRefPtr<Node> prpChild, bool selfClosing)
{
HTMLConstructionSiteTask task;
task.parent = parent;
task.child = prpChild;
+ task.selfClosing = selfClosing;
if (shouldFosterParent()) {
fosterParent(task.child);
@@ -315,11 +316,10 @@
void HTMLConstructionSite::insertSelfClosingHTMLElement(AtomicHTMLToken& token)
{
ASSERT(token.type() == HTMLTokenTypes::StartTag);
- attachLater(currentNode(), createHTMLElement(token));
// Normally HTMLElementStack is responsible for calling finishParsingChildren,
// but self-closing elements are never in the element stack so the stack
// doesn't get a chance to tell them that we're done parsing their children.
- m_attachmentQueue.last().selfClosing = true;
+ attachLater(currentNode(), createHTMLElement(token), true);
// FIXME: Do we want to acknowledge the token's self-closing flag?
// http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#acknowledge-self-closing-flag
}
@@ -348,9 +348,7 @@
notImplemented(); // parseError when xmlns or xmlns:xlink are wrong.
RefPtr<Element> element = createElement(token, namespaceURI);
- attachLater(currentNode(), element);
- // FIXME: Don't we need to set the selfClosing flag on the task if we're
- // not going to push the element on to the stack of open elements?
+ attachLater(currentNode(), element, token.selfClosing());
if (!token.selfClosing())
m_openElements.push(element.release());
}
Modified: branches/chromium/1132/Source/WebCore/html/parser/HTMLConstructionSite.h (122595 => 122596)
--- branches/chromium/1132/Source/WebCore/html/parser/HTMLConstructionSite.h 2012-07-13 16:53:20 UTC (rev 122595)
+++ branches/chromium/1132/Source/WebCore/html/parser/HTMLConstructionSite.h 2012-07-13 17:06:51 UTC (rev 122596)
@@ -155,7 +155,7 @@
// tokens produce only one DOM mutation.
typedef Vector<HTMLConstructionSiteTask, 1> AttachmentQueue;
- void attachLater(ContainerNode* parent, PassRefPtr<Node> child);
+ void attachLater(ContainerNode* parent, PassRefPtr<Node> child, bool selfClosing = false);
void findFosterSite(HTMLConstructionSiteTask&);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes