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

Side by Side Diff: Source/core/html/parser/HTMLConstructionSite.cpp

Issue 23475019: The HTML parser should lazy attach. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: moar whitespace text node rebaselines Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/CharacterData.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. 2 * Copyright (C) 2010 Google, Inc. All Rights Reserved.
3 * Copyright (C) 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2011 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 if (task.nextChild) 99 if (task.nextChild)
100 task.parent->parserInsertBefore(task.child.get(), task.nextChild.get(), attachBehavior); 100 task.parent->parserInsertBefore(task.child.get(), task.nextChild.get(), attachBehavior);
101 else 101 else
102 task.parent->parserAppendChild(task.child.get(), attachBehavior); 102 task.parent->parserAppendChild(task.child.get(), attachBehavior);
103 } 103 }
104 104
105 static inline void executeInsertTask(HTMLConstructionSiteTask& task) 105 static inline void executeInsertTask(HTMLConstructionSiteTask& task)
106 { 106 {
107 ASSERT(task.operation == HTMLConstructionSiteTask::Insert); 107 ASSERT(task.operation == HTMLConstructionSiteTask::Insert);
108 108
109 insert(task, DeprecatedAttachNow); 109 insert(task);
110 110
111 task.child->beginParsingChildren(); 111 task.child->beginParsingChildren();
112 112
113 if (task.selfClosing) 113 if (task.selfClosing)
114 task.child->finishParsingChildren(); 114 task.child->finishParsingChildren();
115 } 115 }
116 116
117 static inline void executeReparentTask(HTMLConstructionSiteTask& task) 117 static inline void executeReparentTask(HTMLConstructionSiteTask& task)
118 { 118 {
119 ASSERT(task.operation == HTMLConstructionSiteTask::Reparent); 119 ASSERT(task.operation == HTMLConstructionSiteTask::Reparent);
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 { 745 {
746 HTMLConstructionSiteTask task(HTMLConstructionSiteTask::Insert); 746 HTMLConstructionSiteTask task(HTMLConstructionSiteTask::Insert);
747 findFosterSite(task); 747 findFosterSite(task);
748 task.child = node; 748 task.child = node;
749 ASSERT(task.parent); 749 ASSERT(task.parent);
750 750
751 m_taskQueue.append(task); 751 m_taskQueue.append(task);
752 } 752 }
753 753
754 } 754 }
OLDNEW
« no previous file with comments | « Source/core/dom/CharacterData.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698