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

Side by Side Diff: third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.h

Issue 1406923009: Rename DISALLOW_ALLOCATION and ALLOW_ONLY_INLINE_ALLOCATION (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 22 matching lines...) Expand all
33 #include "core/html/parser/HTMLFormattingElementList.h" 33 #include "core/html/parser/HTMLFormattingElementList.h"
34 #include "wtf/Noncopyable.h" 34 #include "wtf/Noncopyable.h"
35 #include "wtf/PassRefPtr.h" 35 #include "wtf/PassRefPtr.h"
36 #include "wtf/RefPtr.h" 36 #include "wtf/RefPtr.h"
37 #include "wtf/Vector.h" 37 #include "wtf/Vector.h"
38 #include "wtf/text/StringBuilder.h" 38 #include "wtf/text/StringBuilder.h"
39 39
40 namespace blink { 40 namespace blink {
41 41
42 struct HTMLConstructionSiteTask { 42 struct HTMLConstructionSiteTask {
43 ALLOW_ONLY_INLINE_ALLOCATION(); 43 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
44 public: 44 public:
45 enum Operation { 45 enum Operation {
46 Insert, 46 Insert,
47 InsertText, // Handles possible merging of text nodes. 47 InsertText, // Handles possible merging of text nodes.
48 InsertAlreadyParsedChild, // Insert w/o calling begin/end parsing. 48 InsertAlreadyParsedChild, // Insert w/o calling begin/end parsing.
49 Reparent, 49 Reparent,
50 TakeAllChildren, 50 TakeAllChildren,
51 }; 51 };
52 52
53 explicit HTMLConstructionSiteTask(Operation op) 53 explicit HTMLConstructionSiteTask(Operation op)
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 FlushIfAtTextLimit, 100 FlushIfAtTextLimit,
101 }; 101 };
102 102
103 class AtomicHTMLToken; 103 class AtomicHTMLToken;
104 class Document; 104 class Document;
105 class Element; 105 class Element;
106 class HTMLFormElement; 106 class HTMLFormElement;
107 107
108 class HTMLConstructionSite final { 108 class HTMLConstructionSite final {
109 WTF_MAKE_NONCOPYABLE(HTMLConstructionSite); 109 WTF_MAKE_NONCOPYABLE(HTMLConstructionSite);
110 DISALLOW_ALLOCATION(); 110 DISALLOW_NEW();
111 public: 111 public:
112 HTMLConstructionSite(Document*, ParserContentPolicy); 112 HTMLConstructionSite(Document*, ParserContentPolicy);
113 HTMLConstructionSite(DocumentFragment*, ParserContentPolicy); 113 HTMLConstructionSite(DocumentFragment*, ParserContentPolicy);
114 ~HTMLConstructionSite(); 114 ~HTMLConstructionSite();
115 DECLARE_TRACE(); 115 DECLARE_TRACE();
116 116
117 void detach(); 117 void detach();
118 118
119 // executeQueuedTasks empties the queue but does not flush pending text. 119 // executeQueuedTasks empties the queue but does not flush pending text.
120 // NOTE: Possible reentrancy via JavaScript execution. 120 // NOTE: Possible reentrancy via JavaScript execution.
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 RawPtrWillBeMember<ContainerNode> m_attachmentRoot; 251 RawPtrWillBeMember<ContainerNode> m_attachmentRoot;
252 252
253 RefPtrWillBeMember<HTMLStackItem> m_head; 253 RefPtrWillBeMember<HTMLStackItem> m_head;
254 RefPtrWillBeMember<HTMLFormElement> m_form; 254 RefPtrWillBeMember<HTMLFormElement> m_form;
255 mutable HTMLElementStack m_openElements; 255 mutable HTMLElementStack m_openElements;
256 mutable HTMLFormattingElementList m_activeFormattingElements; 256 mutable HTMLFormattingElementList m_activeFormattingElements;
257 257
258 TaskQueue m_taskQueue; 258 TaskQueue m_taskQueue;
259 259
260 class PendingText final { 260 class PendingText final {
261 DISALLOW_ALLOCATION(); 261 DISALLOW_NEW();
262 public: 262 public:
263 PendingText() 263 PendingText()
264 : whitespaceMode(WhitespaceUnknown) 264 : whitespaceMode(WhitespaceUnknown)
265 { 265 {
266 } 266 }
267 267
268 void append(PassRefPtrWillBeRawPtr<ContainerNode> newParent, PassRefPtrW illBeRawPtr<Node> newNextChild, const String& newString, WhitespaceMode newWhite spaceMode) 268 void append(PassRefPtrWillBeRawPtr<ContainerNode> newParent, PassRefPtrW illBeRawPtr<Node> newNextChild, const String& newString, WhitespaceMode newWhite spaceMode)
269 { 269 {
270 ASSERT(!parent || parent == newParent); 270 ASSERT(!parent || parent == newParent);
271 parent = newParent; 271 parent = newParent;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 // "whenever a node would be inserted into the current node, it must instead 316 // "whenever a node would be inserted into the current node, it must instead
317 // be foster parented." This flag tracks whether we're in that state. 317 // be foster parented." This flag tracks whether we're in that state.
318 bool m_redirectAttachToFosterParent; 318 bool m_redirectAttachToFosterParent;
319 319
320 bool m_inQuirksMode; 320 bool m_inQuirksMode;
321 }; 321 };
322 322
323 } // namespace blink 323 } // namespace blink
324 324
325 #endif 325 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698