OLD | NEW |
1 /* | 1 /* |
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) | 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r
ights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r
ights reserved. |
4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved. | 4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 23 matching lines...) Expand all Loading... |
34 #include "core/inspector/InspectorInstrumentation.h" | 34 #include "core/inspector/InspectorInstrumentation.h" |
35 | 35 |
36 using namespace std; | 36 using namespace std; |
37 | 37 |
38 namespace WebCore { | 38 namespace WebCore { |
39 | 39 |
40 namespace { | 40 namespace { |
41 | 41 |
42 class StyleAttributeMutationScope { | 42 class StyleAttributeMutationScope { |
43 WTF_MAKE_NONCOPYABLE(StyleAttributeMutationScope); | 43 WTF_MAKE_NONCOPYABLE(StyleAttributeMutationScope); |
| 44 STACK_ALLOCATED(); |
44 public: | 45 public: |
45 StyleAttributeMutationScope(AbstractPropertySetCSSStyleDeclaration* decl) | 46 StyleAttributeMutationScope(AbstractPropertySetCSSStyleDeclaration* decl) |
46 { | 47 { |
47 InspectorInstrumentation::willMutateStyle(decl); | 48 InspectorInstrumentation::willMutateStyle(decl); |
48 ++s_scopeCount; | 49 ++s_scopeCount; |
49 | 50 |
50 if (s_scopeCount != 1) { | 51 if (s_scopeCount != 1) { |
51 ASSERT(s_currentDecl == decl); | 52 ASSERT(s_currentDecl == decl); |
52 return; | 53 return; |
53 } | 54 } |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 { | 108 { |
108 s_shouldNotifyInspector = true; | 109 s_shouldNotifyInspector = true; |
109 } | 110 } |
110 | 111 |
111 private: | 112 private: |
112 static unsigned s_scopeCount; | 113 static unsigned s_scopeCount; |
113 static AbstractPropertySetCSSStyleDeclaration* s_currentDecl; | 114 static AbstractPropertySetCSSStyleDeclaration* s_currentDecl; |
114 static bool s_shouldNotifyInspector; | 115 static bool s_shouldNotifyInspector; |
115 static bool s_shouldDeliver; | 116 static bool s_shouldDeliver; |
116 | 117 |
117 OwnPtr<MutationObserverInterestGroup> m_mutationRecipients; | 118 OwnPtrWillBeMember<MutationObserverInterestGroup> m_mutationRecipients; |
118 RefPtr<MutationRecord> m_mutation; | 119 RefPtrWillBeMember<MutationRecord> m_mutation; |
119 }; | 120 }; |
120 | 121 |
121 unsigned StyleAttributeMutationScope::s_scopeCount = 0; | 122 unsigned StyleAttributeMutationScope::s_scopeCount = 0; |
122 AbstractPropertySetCSSStyleDeclaration* StyleAttributeMutationScope::s_currentDe
cl = 0; | 123 AbstractPropertySetCSSStyleDeclaration* StyleAttributeMutationScope::s_currentDe
cl = 0; |
123 bool StyleAttributeMutationScope::s_shouldNotifyInspector = false; | 124 bool StyleAttributeMutationScope::s_shouldNotifyInspector = false; |
124 bool StyleAttributeMutationScope::s_shouldDeliver = false; | 125 bool StyleAttributeMutationScope::s_shouldDeliver = false; |
125 | 126 |
126 } // namespace | 127 } // namespace |
127 | 128 |
128 void PropertySetCSSStyleDeclaration::ref() | 129 void PropertySetCSSStyleDeclaration::ref() |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 { | 379 { |
379 m_parentElement->ref(); | 380 m_parentElement->ref(); |
380 } | 381 } |
381 | 382 |
382 void InlineCSSStyleDeclaration::deref() | 383 void InlineCSSStyleDeclaration::deref() |
383 { | 384 { |
384 m_parentElement->deref(); | 385 m_parentElement->deref(); |
385 } | 386 } |
386 | 387 |
387 } // namespace WebCore | 388 } // namespace WebCore |
OLD | NEW |