Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1124)

Unified Diff: Source/core/html/parser/HTMLConstructionSite.h

Issue 14759017: callTheAdoptionAgency should work asynchronously (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixenate tests Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/html/parser/HTMLConstructionSite.h
diff --git a/Source/core/html/parser/HTMLConstructionSite.h b/Source/core/html/parser/HTMLConstructionSite.h
index e541bd05591fd559ab21b87e380b9b2df4b56371..fb2e5e755f2346a98cf72e77f816c1c570373ed4 100644
--- a/Source/core/html/parser/HTMLConstructionSite.h
+++ b/Source/core/html/parser/HTMLConstructionSite.h
@@ -41,7 +41,9 @@ namespace WebCore {
struct HTMLConstructionSiteTask {
enum Operation {
Insert,
+ InsertAlreadyParsedChild,
Reparent,
+ TakeAllChildren,
};
explicit HTMLConstructionSiteTask(Operation op)
@@ -50,6 +52,14 @@ struct HTMLConstructionSiteTask {
{
}
+ ContainerNode* oldParent()
+ {
+ // It's sort of ugly, but we store the |oldParent| in the |child| field
+ // of the task so that we don't bloat the HTMLConstructionSiteTask
+ // object in the common case of the Insert operation.
+ return toContainerNode(child.get());
+ }
+
Operation operation;
RefPtr<ContainerNode> parent;
RefPtr<Node> nextChild;
@@ -108,6 +118,12 @@ public:
void insertHTMLBodyStartTagInBody(AtomicHTMLToken*);
void reparent(HTMLElementStack::ElementRecord* newParent, HTMLElementStack::ElementRecord* child);
+ void reparent(HTMLElementStack::ElementRecord* newParent, HTMLStackItem* child);
+ // insertAlreadyParsedChild assumes that |child| has already been parsed (i.e., we're just
+ // moving it around in the tree rather than parsing it for the first time). That means
+ // this function doesn't call beginParsingChildren / finishParsingChildren.
+ void insertAlreadyParsedChild(HTMLStackItem* newParent, HTMLElementStack::ElementRecord* child);
+ void takeAllChildren(HTMLStackItem* newParent, HTMLElementStack::ElementRecord* oldParent);
PassRefPtr<HTMLStackItem> createElementFromSavedToken(HTMLStackItem*);
« no previous file with comments | « LayoutTests/fast/parser/adoption-agency-crash-03-expected.txt ('k') | Source/core/html/parser/HTMLConstructionSite.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698