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

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

Issue 1156273002: Add assert that updateLayoutTree clears dirty bits. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Check the accept conditions for documents. Created 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/shadow/ElementShadow.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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 static inline bool isAllWhitespace(const String& string) 95 static inline bool isAllWhitespace(const String& string)
96 { 96 {
97 return string.isAllSpecialCharacters<isHTMLSpace<UChar>>(); 97 return string.isAllSpecialCharacters<isHTMLSpace<UChar>>();
98 } 98 }
99 99
100 static inline void insert(HTMLConstructionSiteTask& task) 100 static inline void insert(HTMLConstructionSiteTask& task)
101 { 101 {
102 if (isHTMLTemplateElement(*task.parent)) 102 if (isHTMLTemplateElement(*task.parent))
103 task.parent = toHTMLTemplateElement(task.parent.get())->content(); 103 task.parent = toHTMLTemplateElement(task.parent.get())->content();
104 104
105 if (task.parent->isDocumentNode()) {
106 Document& document = toDocument(*task.parent);
107 if (!document.canAcceptChild(*task.child, nullptr, IGNORE_EXCEPTION))
108 return;
109 }
kouhei (in TOK) 2015/05/28 03:54:53 This change lg tm. Would you like to split this up
110
105 if (task.nextChild) 111 if (task.nextChild)
106 task.parent->parserInsertBefore(task.child.get(), *task.nextChild); 112 task.parent->parserInsertBefore(task.child.get(), *task.nextChild);
107 else 113 else
108 task.parent->parserAppendChild(task.child.get()); 114 task.parent->parserAppendChild(task.child.get());
109 } 115 }
110 116
111 static inline void executeInsertTask(HTMLConstructionSiteTask& task) 117 static inline void executeInsertTask(HTMLConstructionSiteTask& task)
112 { 118 {
113 ASSERT(task.operation == HTMLConstructionSiteTask::Insert); 119 ASSERT(task.operation == HTMLConstructionSiteTask::Insert);
114 120
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 } 881 }
876 882
877 DEFINE_TRACE(HTMLConstructionSite::PendingText) 883 DEFINE_TRACE(HTMLConstructionSite::PendingText)
878 { 884 {
879 visitor->trace(parent); 885 visitor->trace(parent);
880 visitor->trace(nextChild); 886 visitor->trace(nextChild);
881 } 887 }
882 888
883 889
884 } 890 }
OLDNEW
« no previous file with comments | « Source/core/dom/shadow/ElementShadow.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698