| 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 3600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3611 | 3611 |
| 3612 void Element::styleAttributeChanged(const AtomicString& newStyleString, Attribut
eModificationReason modificationReason) | 3612 void Element::styleAttributeChanged(const AtomicString& newStyleString, Attribut
eModificationReason modificationReason) |
| 3613 { | 3613 { |
| 3614 DCHECK(isStyledElement()); | 3614 DCHECK(isStyledElement()); |
| 3615 WTF::OrdinalNumber startLineNumber = WTF::OrdinalNumber::beforeFirst(); | 3615 WTF::OrdinalNumber startLineNumber = WTF::OrdinalNumber::beforeFirst(); |
| 3616 if (document().scriptableDocumentParser() && !document().isInDocumentWrite()
) | 3616 if (document().scriptableDocumentParser() && !document().isInDocumentWrite()
) |
| 3617 startLineNumber = document().scriptableDocumentParser()->lineNumber(); | 3617 startLineNumber = document().scriptableDocumentParser()->lineNumber(); |
| 3618 | 3618 |
| 3619 if (newStyleString.isNull()) { | 3619 if (newStyleString.isNull()) { |
| 3620 ensureUniqueElementData().m_inlineStyle.clear(); | 3620 ensureUniqueElementData().m_inlineStyle.clear(); |
| 3621 } else if (modificationReason == ModifiedByCloning || ContentSecurityPolicy:
:shouldBypassMainWorld(&document()) || document().contentSecurityPolicy()->allow
InlineStyle(document().url(), String(), startLineNumber, newStyleString)) { | 3621 } else if (modificationReason == ModifiedByCloning || ContentSecurityPolicy:
:shouldBypassMainWorld(&document()) || (containingShadowRoot() && containingShad
owRoot()->type() == ShadowRootType::UserAgent) || document().contentSecurityPoli
cy()->allowInlineStyle(document().url(), String(), startLineNumber, newStyleStri
ng)) { |
| 3622 setInlineStyleFromString(newStyleString); | 3622 setInlineStyleFromString(newStyleString); |
| 3623 } | 3623 } |
| 3624 | 3624 |
| 3625 elementData()->m_styleAttributeIsDirty = false; | 3625 elementData()->m_styleAttributeIsDirty = false; |
| 3626 | 3626 |
| 3627 setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::create(St
yleChangeReason::StyleSheetChange)); | 3627 setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::create(St
yleChangeReason::StyleSheetChange)); |
| 3628 InspectorInstrumentation::didInvalidateStyleAttr(this); | 3628 InspectorInstrumentation::didInvalidateStyleAttr(this); |
| 3629 } | 3629 } |
| 3630 | 3630 |
| 3631 void Element::inlineStyleChanged() | 3631 void Element::inlineStyleChanged() |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3829 | 3829 |
| 3830 DEFINE_TRACE_WRAPPERS(Element) | 3830 DEFINE_TRACE_WRAPPERS(Element) |
| 3831 { | 3831 { |
| 3832 if (hasRareData()) { | 3832 if (hasRareData()) { |
| 3833 visitor->traceWrappers(elementRareData()); | 3833 visitor->traceWrappers(elementRareData()); |
| 3834 } | 3834 } |
| 3835 ContainerNode::traceWrappers(visitor); | 3835 ContainerNode::traceWrappers(visitor); |
| 3836 } | 3836 } |
| 3837 | 3837 |
| 3838 } // namespace blink | 3838 } // namespace blink |
| OLD | NEW |