Title: [165830] branches/safari-537.75-branch/Source/WebCore
- Revision
- 165830
- Author
- matthew_han...@apple.com
- Date
- 2014-03-18 12:30:39 -0700 (Tue, 18 Mar 2014)
Log Message
Follow-up fix for the merge of r163579.
Modified Paths
Diff
Modified: branches/safari-537.75-branch/Source/WebCore/ChangeLog (165829 => 165830)
--- branches/safari-537.75-branch/Source/WebCore/ChangeLog 2014-03-18 19:16:01 UTC (rev 165829)
+++ branches/safari-537.75-branch/Source/WebCore/ChangeLog 2014-03-18 19:30:39 UTC (rev 165830)
@@ -1,3 +1,20 @@
+2014-03-18 Matthew Hanson <matthew_han...@apple.com>
+
+ Follow-up fix for the merge of r163579.
+
+ 2014-03-17 Jeffrey Pfau <jp...@apple.com>
+
+ Merge parts from Blink CLs 169865acce3b6bc85ac1adf07b2798aaf9aad67a and 04f613e7f0c35f444d5a9bd42da55c69df65cf64 that weren't merged to trunk
+ <rdar://problem/16307742>
+
+ Unreviewed Layout Test fix.
+
+ * html/parser/HTMLConstructionSite.cpp:
+ (WebCore::insert):
+ (WebCore::executeInsertTask):
+ (WebCore::executeReparentTask):
+ (WebCore::executeInsertAlreadyParsedChildTask):
+
2014-03-17 Matthew Hanson <matthew_han...@apple.com>
Merge r165753.
Modified: branches/safari-537.75-branch/Source/WebCore/html/parser/HTMLConstructionSite.cpp (165829 => 165830)
--- branches/safari-537.75-branch/Source/WebCore/html/parser/HTMLConstructionSite.cpp 2014-03-18 19:16:01 UTC (rev 165829)
+++ branches/safari-537.75-branch/Source/WebCore/html/parser/HTMLConstructionSite.cpp 2014-03-18 19:30:39 UTC (rev 165830)
@@ -86,8 +86,11 @@
{
return string.isAllSpecialCharacters<isHTMLSpace>();
}
-
-static inline void insert(HTMLConstructionSiteTask& task)
+// The |lazyAttach| parameter to this function exists for historical reasons.
+// There used to be two code paths, one that used lazyAttach and one that
+// didn't. We should make the two code paths consistent and either use
+// lazyAttach or non-lazyAttach, but we wanted to make that change separately.
+static inline void insert(HTMLConstructionSiteTask& task, bool lazyAttach)
{
#if ENABLE(TEMPLATE_ELEMENT)
if (task.parent->hasTagName(templateTag))
@@ -105,15 +108,19 @@
// _javascript_ run from beforeload (or DOM Mutation or event handlers)
// might have removed the child, in which case we should not attach it.
- if (task.child->parentNode() && task.parent->attached() && !task.child->attached())
- task.child->attach();
+ if (task.child->parentNode() && task.parent->attached() && !task.child->attached()) {
+ if (lazyAttach)
+ task.child->lazyAttach();
+ else
+ task.child->attach();
+ }
}
static inline void executeInsertTask(HTMLConstructionSiteTask& task)
{
ASSERT(task.operation == HTMLConstructionSiteTask::Insert);
- insert(task);
+ insert(task, false);
task.child->beginParsingChildren();
@@ -129,13 +136,16 @@
parent->parserRemoveChild(task.child.get());
task.parent->parserAppendChild(task.child);
+
+ if (task.child->parentElement()->attached() && !task.child->attached())
+ task.child->lazyAttach();
}
static inline void executeInsertAlreadyParsedChildTask(HTMLConstructionSiteTask& task)
{
ASSERT(task.operation == HTMLConstructionSiteTask::InsertAlreadyParsedChild);
- insert(task);
+ insert(task, true);
}
static inline void executeTakeAllChildrenTask(HTMLConstructionSiteTask& task)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes