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

Side by Side Diff: Source/core/dom/custom/CustomElementMicrotaskQueue.cpp

Issue 288323004: HTML Imports: Get rid of needsProcessOrStop() from dom/custom/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Renamed to isWaitingForCustomElementMicrosteps() Created 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 break; 96 break;
97 } 97 }
98 98
99 for (++i; i < m_queue.size(); ++i) 99 for (++i; i < m_queue.size(); ++i)
100 remaining.append(m_queue[i].release()); 100 remaining.append(m_queue[i].release());
101 m_queue.swap(remaining); 101 m_queue.swap(remaining);
102 102
103 return accumulatedResult; 103 return accumulatedResult;
104 } 104 }
105 105
106 bool CustomElementMicrotaskQueue::needsProcessOrStop() const
107 {
108 for (size_t i = 0; i < m_queue.size(); ++i) {
109 if (m_queue[i]->needsProcessOrStop())
110 return true;
111 }
112
113 return false;
114 }
115
116 #if !defined(NDEBUG) 106 #if !defined(NDEBUG)
117 void CustomElementMicrotaskQueue::show(unsigned indent) 107 void CustomElementMicrotaskQueue::show(unsigned indent)
118 { 108 {
119 for (unsigned q = 0; q < m_queue.size(); ++q) { 109 for (unsigned q = 0; q < m_queue.size(); ++q) {
120 if (m_queue[q]) 110 if (m_queue[q])
121 m_queue[q]->show(indent); 111 m_queue[q]->show(indent);
122 else 112 else
123 fprintf(stderr, "%*snull\n", indent, ""); 113 fprintf(stderr, "%*snull\n", indent, "");
124 } 114 }
125 } 115 }
126 #endif 116 #endif
127 117
128 } // namespace WebCore 118 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698