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

Side by Side Diff: sky/engine/core/html/parser/HTMLConstructionSite.h

Issue 729713003: Remove parserInsertBefore. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 }; 46 };
47 47
48 explicit HTMLConstructionSiteTask(Operation op) 48 explicit HTMLConstructionSiteTask(Operation op)
49 : operation(op) 49 : operation(op)
50 , selfClosing(false) 50 , selfClosing(false)
51 { 51 {
52 } 52 }
53 53
54 Operation operation; 54 Operation operation;
55 RefPtr<ContainerNode> parent; 55 RefPtr<ContainerNode> parent;
56 RefPtr<Node> nextChild;
57 RefPtr<Node> child; 56 RefPtr<Node> child;
58 bool selfClosing; 57 bool selfClosing;
59 }; 58 };
60 59
61 } // namespace blink 60 } // namespace blink
62 61
63 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::HTMLConstructionSiteTa sk); 62 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::HTMLConstructionSiteTa sk);
64 63
65 namespace blink { 64 namespace blink {
66 65
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 TaskQueue m_taskQueue; 145 TaskQueue m_taskQueue;
147 146
148 class PendingText { 147 class PendingText {
149 DISALLOW_ALLOCATION(); 148 DISALLOW_ALLOCATION();
150 public: 149 public:
151 PendingText() 150 PendingText()
152 : whitespaceMode(WhitespaceUnknown) 151 : whitespaceMode(WhitespaceUnknown)
153 { 152 {
154 } 153 }
155 154
156 void append(PassRefPtr<ContainerNode> newParent, PassRefPtr<Node> newNex tChild, const String& newString, WhitespaceMode newWhitespaceMode) 155 void append(PassRefPtr<ContainerNode> newParent, const String& newString , WhitespaceMode newWhitespaceMode)
157 { 156 {
158 ASSERT(!parent || parent == newParent); 157 ASSERT(!parent || parent == newParent);
159 parent = newParent; 158 parent = newParent;
160 ASSERT(!nextChild || nextChild == newNextChild);
161 nextChild = newNextChild;
162 stringBuilder.append(newString); 159 stringBuilder.append(newString);
163 whitespaceMode = std::min(whitespaceMode, newWhitespaceMode); 160 whitespaceMode = std::min(whitespaceMode, newWhitespaceMode);
164 } 161 }
165 162
166 void swap(PendingText& other) 163 void swap(PendingText& other)
167 { 164 {
168 std::swap(whitespaceMode, other.whitespaceMode); 165 std::swap(whitespaceMode, other.whitespaceMode);
169 parent.swap(other.parent); 166 parent.swap(other.parent);
170 nextChild.swap(other.nextChild);
171 stringBuilder.swap(other.stringBuilder); 167 stringBuilder.swap(other.stringBuilder);
172 } 168 }
173 169
174 void discard() 170 void discard()
175 { 171 {
176 PendingText discardedText; 172 PendingText discardedText;
177 swap(discardedText); 173 swap(discardedText);
178 } 174 }
179 175
180 bool isEmpty() 176 bool isEmpty()
(...skipping 10 matching lines...) Expand all
191 StringBuilder stringBuilder; 187 StringBuilder stringBuilder;
192 WhitespaceMode whitespaceMode; 188 WhitespaceMode whitespaceMode;
193 }; 189 };
194 190
195 PendingText m_pendingText; 191 PendingText m_pendingText;
196 }; 192 };
197 193
198 } // namespace blink 194 } // namespace blink
199 195
200 #endif 196 #endif
OLDNEW
« no previous file with comments | « sky/engine/core/dom/ContainerNode.cpp ('k') | sky/engine/core/html/parser/HTMLConstructionSite.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698