OLD | NEW |
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 18 matching lines...) Expand all Loading... |
29 */ | 29 */ |
30 | 30 |
31 #ifndef CustomElementProcessingStack_h | 31 #ifndef CustomElementProcessingStack_h |
32 #define CustomElementProcessingStack_h | 32 #define CustomElementProcessingStack_h |
33 | 33 |
34 #include "core/dom/custom/CustomElementCallbackQueue.h" | 34 #include "core/dom/custom/CustomElementCallbackQueue.h" |
35 #include "wtf/Vector.h" | 35 #include "wtf/Vector.h" |
36 | 36 |
37 namespace blink { | 37 namespace blink { |
38 | 38 |
39 class CustomElementScheduler; | |
40 | |
41 class CustomElementProcessingStack { | 39 class CustomElementProcessingStack { |
42 WTF_MAKE_NONCOPYABLE(CustomElementProcessingStack); | 40 WTF_MAKE_NONCOPYABLE(CustomElementProcessingStack); |
43 public: | 41 public: |
44 // This is stack allocated in many DOM callbacks. Make it cheap. | 42 // This is stack allocated in many DOM callbacks. Make it cheap. |
45 class CallbackDeliveryScope { | 43 class CallbackDeliveryScope { |
46 public: | 44 public: |
47 CallbackDeliveryScope() | 45 CallbackDeliveryScope() |
48 : m_savedElementQueueStart(s_elementQueueStart) | 46 : m_savedElementQueueStart(s_elementQueueStart) |
49 { | 47 { |
50 s_elementQueueStart = s_elementQueueEnd; | 48 s_elementQueueStart = s_elementQueueEnd; |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 static void processElementQueueAndPop(); | 91 static void processElementQueueAndPop(); |
94 void processElementQueueAndPop(size_t start, size_t end); | 92 void processElementQueueAndPop(size_t start, size_t end); |
95 | 93 |
96 // The processing stack, flattened. Element queues lower in the | 94 // The processing stack, flattened. Element queues lower in the |
97 // stack appear toward the head of the vector. The first element | 95 // stack appear toward the head of the vector. The first element |
98 // is a null sentinel value. | 96 // is a null sentinel value. |
99 static const size_t kNumSentinels = 1; | 97 static const size_t kNumSentinels = 1; |
100 Vector<CustomElementCallbackQueue*> m_flattenedProcessingStack; | 98 Vector<CustomElementCallbackQueue*> m_flattenedProcessingStack; |
101 }; | 99 }; |
102 | 100 |
103 } | 101 } // namespace blink |
104 | 102 |
105 #endif // CustomElementProcessingStack_h | 103 #endif // CustomElementProcessingStack_h |
OLD | NEW |