| 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 13 matching lines...) Expand all Loading... |
| 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 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/CoreExport.h" |
| 34 #include "core/dom/custom/CustomElementCallbackQueue.h" | 35 #include "core/dom/custom/CustomElementCallbackQueue.h" |
| 35 #include "wtf/Vector.h" | 36 #include "wtf/Vector.h" |
| 36 | 37 |
| 37 namespace blink { | 38 namespace blink { |
| 38 | 39 |
| 39 class CustomElementProcessingStack { | 40 class CORE_EXPORT CustomElementProcessingStack { |
| 40 WTF_MAKE_NONCOPYABLE(CustomElementProcessingStack); | 41 WTF_MAKE_NONCOPYABLE(CustomElementProcessingStack); |
| 41 public: | 42 public: |
| 42 // This is stack allocated in many DOM callbacks. Make it cheap. | 43 // This is stack allocated in many DOM callbacks. Make it cheap. |
| 43 class CallbackDeliveryScope { | 44 class CallbackDeliveryScope { |
| 44 public: | 45 public: |
| 45 CallbackDeliveryScope() | 46 CallbackDeliveryScope() |
| 46 : m_savedElementQueueStart(s_elementQueueStart) | 47 : m_savedElementQueueStart(s_elementQueueStart) |
| 47 { | 48 { |
| 48 s_elementQueueStart = s_elementQueueEnd; | 49 s_elementQueueStart = s_elementQueueEnd; |
| 49 } | 50 } |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 // The processing stack, flattened. Element queues lower in the | 95 // The processing stack, flattened. Element queues lower in the |
| 95 // stack appear toward the head of the vector. The first element | 96 // stack appear toward the head of the vector. The first element |
| 96 // is a null sentinel value. | 97 // is a null sentinel value. |
| 97 static const size_t kNumSentinels = 1; | 98 static const size_t kNumSentinels = 1; |
| 98 Vector<CustomElementCallbackQueue*> m_flattenedProcessingStack; | 99 Vector<CustomElementCallbackQueue*> m_flattenedProcessingStack; |
| 99 }; | 100 }; |
| 100 | 101 |
| 101 } // namespace blink | 102 } // namespace blink |
| 102 | 103 |
| 103 #endif // CustomElementProcessingStack_h | 104 #endif // CustomElementProcessingStack_h |
| OLD | NEW |