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

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

Issue 723253004: Remove tons of OILPAN. (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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 Insert, 44 Insert,
45 InsertText, // Handles possible merging of text nodes. 45 InsertText, // Handles possible merging of text nodes.
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 void trace(Visitor* visitor)
55 {
56 visitor->trace(parent);
57 visitor->trace(nextChild);
58 visitor->trace(child);
59 }
60
61 Operation operation; 54 Operation operation;
62 RefPtr<ContainerNode> parent; 55 RefPtr<ContainerNode> parent;
63 RefPtr<Node> nextChild; 56 RefPtr<Node> nextChild;
64 RefPtr<Node> child; 57 RefPtr<Node> child;
65 bool selfClosing; 58 bool selfClosing;
66 }; 59 };
67 60
68 } // namespace blink 61 } // namespace blink
69 62
70 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::HTMLConstructionSiteTa sk); 63 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::HTMLConstructionSiteTa sk);
(...skipping 12 matching lines...) Expand all
83 class Document; 76 class Document;
84 class Element; 77 class Element;
85 78
86 class HTMLConstructionSite final { 79 class HTMLConstructionSite final {
87 WTF_MAKE_NONCOPYABLE(HTMLConstructionSite); 80 WTF_MAKE_NONCOPYABLE(HTMLConstructionSite);
88 DISALLOW_ALLOCATION(); 81 DISALLOW_ALLOCATION();
89 public: 82 public:
90 explicit HTMLConstructionSite(Document*); 83 explicit HTMLConstructionSite(Document*);
91 explicit HTMLConstructionSite(DocumentFragment*); 84 explicit HTMLConstructionSite(DocumentFragment*);
92 ~HTMLConstructionSite(); 85 ~HTMLConstructionSite();
93 void trace(Visitor*);
94 86
95 void detach(); 87 void detach();
96 88
97 // executeQueuedTasks empties the queue but does not flush pending text. 89 // executeQueuedTasks empties the queue but does not flush pending text.
98 // NOTE: Possible reentrancy via JavaScript execution. 90 // NOTE: Possible reentrancy via JavaScript execution.
99 void executeQueuedTasks(); 91 void executeQueuedTasks();
100 92
101 // flushPendingText turns pending text into queued Text insertions, but does not execute them. 93 // flushPendingText turns pending text into queued Text insertions, but does not execute them.
102 void flushPendingText(); 94 void flushPendingText();
103 95
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 179
188 bool isEmpty() 180 bool isEmpty()
189 { 181 {
190 // When the stringbuilder is empty, the parent and whitespace should also be "empty". 182 // When the stringbuilder is empty, the parent and whitespace should also be "empty".
191 ASSERT(stringBuilder.isEmpty() == !parent); 183 ASSERT(stringBuilder.isEmpty() == !parent);
192 ASSERT(!stringBuilder.isEmpty() || !nextChild); 184 ASSERT(!stringBuilder.isEmpty() || !nextChild);
193 ASSERT(!stringBuilder.isEmpty() || (whitespaceMode == WhitespaceUnkn own)); 185 ASSERT(!stringBuilder.isEmpty() || (whitespaceMode == WhitespaceUnkn own));
194 return stringBuilder.isEmpty(); 186 return stringBuilder.isEmpty();
195 } 187 }
196 188
197 void trace(Visitor*);
198
199 RefPtr<ContainerNode> parent; 189 RefPtr<ContainerNode> parent;
200 RefPtr<Node> nextChild; 190 RefPtr<Node> nextChild;
201 StringBuilder stringBuilder; 191 StringBuilder stringBuilder;
202 WhitespaceMode whitespaceMode; 192 WhitespaceMode whitespaceMode;
203 }; 193 };
204 194
205 PendingText m_pendingText; 195 PendingText m_pendingText;
206 }; 196 };
207 197
208 } // namespace blink 198 } // namespace blink
209 199
210 #endif 200 #endif
OLDNEW
« no previous file with comments | « sky/engine/core/html/imports/HTMLImportTreeRoot.cpp ('k') | sky/engine/core/html/parser/HTMLConstructionSite.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698