| 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 | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All |
| 4 * rights reserved. | 4 * rights reserved. |
| 5 * Copyright (C) 2011 Research In Motion Limited. All rights reserved. | 5 * Copyright (C) 2011 Research In Motion Limited. All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 return definition && definition->hasStyleAttributeChangedCallback() | 50 return definition && definition->hasStyleAttributeChangedCallback() |
| 51 ? definition | 51 ? definition |
| 52 : nullptr; | 52 : nullptr; |
| 53 } | 53 } |
| 54 | 54 |
| 55 class StyleAttributeMutationScope { | 55 class StyleAttributeMutationScope { |
| 56 WTF_MAKE_NONCOPYABLE(StyleAttributeMutationScope); | 56 WTF_MAKE_NONCOPYABLE(StyleAttributeMutationScope); |
| 57 STACK_ALLOCATED(); | 57 STACK_ALLOCATED(); |
| 58 | 58 |
| 59 public: | 59 public: |
| 60 DISABLE_CFI_PERF |
| 60 StyleAttributeMutationScope(AbstractPropertySetCSSStyleDeclaration* decl) { | 61 StyleAttributeMutationScope(AbstractPropertySetCSSStyleDeclaration* decl) { |
| 61 ++s_scopeCount; | 62 ++s_scopeCount; |
| 62 | 63 |
| 63 if (s_scopeCount != 1) { | 64 if (s_scopeCount != 1) { |
| 64 ASSERT(s_currentDecl == decl); | 65 ASSERT(s_currentDecl == decl); |
| 65 return; | 66 return; |
| 66 } | 67 } |
| 67 | 68 |
| 68 ASSERT(!s_currentDecl); | 69 ASSERT(!s_currentDecl); |
| 69 s_currentDecl = decl; | 70 s_currentDecl = decl; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 84 | 85 |
| 85 if (m_mutationRecipients) { | 86 if (m_mutationRecipients) { |
| 86 AtomicString requestedOldValue = | 87 AtomicString requestedOldValue = |
| 87 m_mutationRecipients->isOldValueRequested() ? m_oldValue : nullAtom; | 88 m_mutationRecipients->isOldValueRequested() ? m_oldValue : nullAtom; |
| 88 m_mutation = MutationRecord::createAttributes( | 89 m_mutation = MutationRecord::createAttributes( |
| 89 s_currentDecl->parentElement(), HTMLNames::styleAttr, | 90 s_currentDecl->parentElement(), HTMLNames::styleAttr, |
| 90 requestedOldValue); | 91 requestedOldValue); |
| 91 } | 92 } |
| 92 } | 93 } |
| 93 | 94 |
| 95 DISABLE_CFI_PERF |
| 94 ~StyleAttributeMutationScope() { | 96 ~StyleAttributeMutationScope() { |
| 95 --s_scopeCount; | 97 --s_scopeCount; |
| 96 if (s_scopeCount) | 98 if (s_scopeCount) |
| 97 return; | 99 return; |
| 98 | 100 |
| 99 if (s_shouldDeliver) { | 101 if (s_shouldDeliver) { |
| 100 if (m_mutation) | 102 if (m_mutation) |
| 101 m_mutationRecipients->enqueueMutationRecord(m_mutation); | 103 m_mutationRecipients->enqueueMutationRecord(m_mutation); |
| 102 | 104 |
| 103 Element* element = s_currentDecl->parentElement(); | 105 Element* element = s_currentDecl->parentElement(); |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 return m_parentElement ? &m_parentElement->document().elementSheet() | 399 return m_parentElement ? &m_parentElement->document().elementSheet() |
| 398 : nullptr; | 400 : nullptr; |
| 399 } | 401 } |
| 400 | 402 |
| 401 DEFINE_TRACE(InlineCSSStyleDeclaration) { | 403 DEFINE_TRACE(InlineCSSStyleDeclaration) { |
| 402 visitor->trace(m_parentElement); | 404 visitor->trace(m_parentElement); |
| 403 AbstractPropertySetCSSStyleDeclaration::trace(visitor); | 405 AbstractPropertySetCSSStyleDeclaration::trace(visitor); |
| 404 } | 406 } |
| 405 | 407 |
| 406 } // namespace blink | 408 } // namespace blink |
| OLD | NEW |