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 3492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3503 | 3503 |
3504 void Element::styleAttributeChanged(const AtomicString& newStyleString, Attribut
eModificationReason modificationReason) | 3504 void Element::styleAttributeChanged(const AtomicString& newStyleString, Attribut
eModificationReason modificationReason) |
3505 { | 3505 { |
3506 DCHECK(isStyledElement()); | 3506 DCHECK(isStyledElement()); |
3507 WTF::OrdinalNumber startLineNumber = WTF::OrdinalNumber::beforeFirst(); | 3507 WTF::OrdinalNumber startLineNumber = WTF::OrdinalNumber::beforeFirst(); |
3508 if (document().scriptableDocumentParser() && !document().isInDocumentWrite()
) | 3508 if (document().scriptableDocumentParser() && !document().isInDocumentWrite()
) |
3509 startLineNumber = document().scriptableDocumentParser()->lineNumber(); | 3509 startLineNumber = document().scriptableDocumentParser()->lineNumber(); |
3510 | 3510 |
3511 if (newStyleString.isNull()) { | 3511 if (newStyleString.isNull()) { |
3512 ensureUniqueElementData().m_inlineStyle.clear(); | 3512 ensureUniqueElementData().m_inlineStyle.clear(); |
3513 } else if (modificationReason == ModifiedByCloning || ContentSecurityPolicy:
:shouldBypassMainWorld(&document()) || document().contentSecurityPolicy()->allow
InlineStyle(document().url(), startLineNumber, newStyleString)) { | 3513 } else if (modificationReason == ModifiedByCloning || ContentSecurityPolicy:
:shouldBypassMainWorld(&document()) || document().contentSecurityPolicy()->allow
InlineStyle(document().url(), String(), startLineNumber, newStyleString)) { |
3514 setInlineStyleFromString(newStyleString); | 3514 setInlineStyleFromString(newStyleString); |
3515 } | 3515 } |
3516 | 3516 |
3517 elementData()->m_styleAttributeIsDirty = false; | 3517 elementData()->m_styleAttributeIsDirty = false; |
3518 | 3518 |
3519 setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::create(St
yleChangeReason::StyleSheetChange)); | 3519 setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::create(St
yleChangeReason::StyleSheetChange)); |
3520 InspectorInstrumentation::didInvalidateStyleAttr(this); | 3520 InspectorInstrumentation::didInvalidateStyleAttr(this); |
3521 } | 3521 } |
3522 | 3522 |
3523 void Element::inlineStyleChanged() | 3523 void Element::inlineStyleChanged() |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3709 | 3709 |
3710 DEFINE_TRACE_WRAPPERS(Element) | 3710 DEFINE_TRACE_WRAPPERS(Element) |
3711 { | 3711 { |
3712 if (hasRareData()) { | 3712 if (hasRareData()) { |
3713 visitor->traceWrappers(elementRareData()); | 3713 visitor->traceWrappers(elementRareData()); |
3714 } | 3714 } |
3715 ContainerNode::traceWrappers(visitor); | 3715 ContainerNode::traceWrappers(visitor); |
3716 } | 3716 } |
3717 | 3717 |
3718 } // namespace blink | 3718 } // namespace blink |
OLD | NEW |