| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Peter Kelly (pmk@post.com) | 4 * (C) 2001 Peter Kelly (pmk@post.com) |
| 5 * (C) 2001 Dirk Mueller (mueller@kde.org) | 5 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 6 * (C) 2007 David Smith (catfish.man@gmail.com) | 6 * (C) 2007 David Smith (catfish.man@gmail.com) |
| 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
All rights reserved. | 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
All rights reserved. |
| 8 * (C) 2007 Eric Seidel (eric@webkit.org) | 8 * (C) 2007 Eric Seidel (eric@webkit.org) |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 3612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3623 | 3623 |
| 3624 void Element::styleAttributeChanged(const AtomicString& newStyleString, Attribut
eModificationReason modificationReason) | 3624 void Element::styleAttributeChanged(const AtomicString& newStyleString, Attribut
eModificationReason modificationReason) |
| 3625 { | 3625 { |
| 3626 DCHECK(isStyledElement()); | 3626 DCHECK(isStyledElement()); |
| 3627 WTF::OrdinalNumber startLineNumber = WTF::OrdinalNumber::beforeFirst(); | 3627 WTF::OrdinalNumber startLineNumber = WTF::OrdinalNumber::beforeFirst(); |
| 3628 if (document().scriptableDocumentParser() && !document().isInDocumentWrite()
) | 3628 if (document().scriptableDocumentParser() && !document().isInDocumentWrite()
) |
| 3629 startLineNumber = document().scriptableDocumentParser()->lineNumber(); | 3629 startLineNumber = document().scriptableDocumentParser()->lineNumber(); |
| 3630 | 3630 |
| 3631 if (newStyleString.isNull()) { | 3631 if (newStyleString.isNull()) { |
| 3632 ensureUniqueElementData().m_inlineStyle.clear(); | 3632 ensureUniqueElementData().m_inlineStyle.clear(); |
| 3633 } else if (modificationReason == ModifiedByCloning || ContentSecurityPolicy:
:shouldBypassMainWorld(&document()) || document().contentSecurityPolicy()->allow
InlineStyle(document().url(), String(), startLineNumber, newStyleString)) { | 3633 } else if (modificationReason == ModifiedByCloning || ContentSecurityPolicy:
:shouldBypassMainWorld(&document()) || (containingShadowRoot() && containingShad
owRoot()->type() == ShadowRootType::UserAgent) || document().contentSecurityPoli
cy()->allowInlineStyle(document().url(), String(), startLineNumber, newStyleStri
ng)) { |
| 3634 setInlineStyleFromString(newStyleString); | 3634 setInlineStyleFromString(newStyleString); |
| 3635 } | 3635 } |
| 3636 | 3636 |
| 3637 elementData()->m_styleAttributeIsDirty = false; | 3637 elementData()->m_styleAttributeIsDirty = false; |
| 3638 | 3638 |
| 3639 setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::create(St
yleChangeReason::StyleSheetChange)); | 3639 setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::create(St
yleChangeReason::StyleSheetChange)); |
| 3640 InspectorInstrumentation::didInvalidateStyleAttr(this); | 3640 InspectorInstrumentation::didInvalidateStyleAttr(this); |
| 3641 } | 3641 } |
| 3642 | 3642 |
| 3643 void Element::inlineStyleChanged() | 3643 void Element::inlineStyleChanged() |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3841 | 3841 |
| 3842 DEFINE_TRACE_WRAPPERS(Element) | 3842 DEFINE_TRACE_WRAPPERS(Element) |
| 3843 { | 3843 { |
| 3844 if (hasRareData()) { | 3844 if (hasRareData()) { |
| 3845 visitor->traceWrappers(elementRareData()); | 3845 visitor->traceWrappers(elementRareData()); |
| 3846 } | 3846 } |
| 3847 ContainerNode::traceWrappers(visitor); | 3847 ContainerNode::traceWrappers(visitor); |
| 3848 } | 3848 } |
| 3849 | 3849 |
| 3850 } // namespace blink | 3850 } // namespace blink |
| OLD | NEW |