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 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1077 StyleResolver* styleResolver = document().styleResolver(); | 1077 StyleResolver* styleResolver = document().styleResolver(); |
1078 bool testShouldInvalidateStyle = inActiveDocument() && styleResolver && styl
eChangeType() < SubtreeStyleChange; | 1078 bool testShouldInvalidateStyle = inActiveDocument() && styleResolver && styl
eChangeType() < SubtreeStyleChange; |
1079 | 1079 |
1080 ASSERT(elementData()); | 1080 ASSERT(elementData()); |
1081 if (classStringHasClassName(newClassString)) { | 1081 if (classStringHasClassName(newClassString)) { |
1082 const bool shouldFoldCase = document().inQuirksMode(); | 1082 const bool shouldFoldCase = document().inQuirksMode(); |
1083 const SpaceSplitString oldClasses = elementData()->classNames(); | 1083 const SpaceSplitString oldClasses = elementData()->classNames(); |
1084 elementData()->setClass(newClassString, shouldFoldCase); | 1084 elementData()->setClass(newClassString, shouldFoldCase); |
1085 const SpaceSplitString& newClasses = elementData()->classNames(); | 1085 const SpaceSplitString& newClasses = elementData()->classNames(); |
1086 if (testShouldInvalidateStyle) | 1086 if (testShouldInvalidateStyle) |
1087 styleResolver->ensureUpdatedRuleFeatureSet().scheduleStyleInvalidati
onForClassChange(oldClasses, newClasses, this); | 1087 styleResolver->ensureUpdatedRuleFeatureSet().scheduleStyleInvalidati
onForClassChange(oldClasses, newClasses, *this); |
1088 } else { | 1088 } else { |
1089 const SpaceSplitString& oldClasses = elementData()->classNames(); | 1089 const SpaceSplitString& oldClasses = elementData()->classNames(); |
1090 if (testShouldInvalidateStyle) | 1090 if (testShouldInvalidateStyle) |
1091 styleResolver->ensureUpdatedRuleFeatureSet().scheduleStyleInvalidati
onForClassChange(oldClasses, this); | 1091 styleResolver->ensureUpdatedRuleFeatureSet().scheduleStyleInvalidati
onForClassChange(oldClasses, *this); |
1092 elementData()->clearClass(); | 1092 elementData()->clearClass(); |
1093 } | 1093 } |
1094 | 1094 |
1095 if (hasRareData()) | 1095 if (hasRareData()) |
1096 elementRareData()->clearClassListValueForQuirksMode(); | 1096 elementRareData()->clearClassListValueForQuirksMode(); |
1097 } | 1097 } |
1098 | 1098 |
1099 bool Element::shouldInvalidateDistributionWhenAttributeChanged(ElementShadow* el
ementShadow, const QualifiedName& name, const AtomicString& newValue) | 1099 bool Element::shouldInvalidateDistributionWhenAttributeChanged(ElementShadow* el
ementShadow, const QualifiedName& name, const AtomicString& newValue) |
1100 { | 1100 { |
1101 ASSERT(elementShadow); | 1101 ASSERT(elementShadow); |
(...skipping 1766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2868 } else if (name == HTMLNames::nameAttr) { | 2868 } else if (name == HTMLNames::nameAttr) { |
2869 updateName(oldValue, newValue); | 2869 updateName(oldValue, newValue); |
2870 } else if (name == HTMLNames::forAttr && isHTMLLabelElement(*this)) { | 2870 } else if (name == HTMLNames::forAttr && isHTMLLabelElement(*this)) { |
2871 TreeScope& scope = treeScope(); | 2871 TreeScope& scope = treeScope(); |
2872 if (scope.shouldCacheLabelsByForAttribute()) | 2872 if (scope.shouldCacheLabelsByForAttribute()) |
2873 updateLabel(scope, oldValue, newValue); | 2873 updateLabel(scope, oldValue, newValue); |
2874 } | 2874 } |
2875 | 2875 |
2876 if (oldValue != newValue) { | 2876 if (oldValue != newValue) { |
2877 if (inActiveDocument()) | 2877 if (inActiveDocument()) |
2878 document().ensureStyleResolver().ensureUpdatedRuleFeatureSet().sched
uleStyleInvalidationForAttributeChange(name, this); | 2878 document().ensureStyleResolver().ensureUpdatedRuleFeatureSet().sched
uleStyleInvalidationForAttributeChange(name, *this); |
2879 | 2879 |
2880 if (isUpgradedCustomElement()) | 2880 if (isUpgradedCustomElement()) |
2881 CustomElement::attributeDidChange(this, name.localName(), oldValue,
newValue); | 2881 CustomElement::attributeDidChange(this, name.localName(), oldValue,
newValue); |
2882 } | 2882 } |
2883 | 2883 |
2884 if (OwnPtr<MutationObserverInterestGroup> recipients = MutationObserverInter
estGroup::createForAttributesMutation(*this, name)) | 2884 if (OwnPtr<MutationObserverInterestGroup> recipients = MutationObserverInter
estGroup::createForAttributesMutation(*this, name)) |
2885 recipients->enqueueMutationRecord(MutationRecord::createAttributes(this,
name, oldValue)); | 2885 recipients->enqueueMutationRecord(MutationRecord::createAttributes(this,
name, oldValue)); |
2886 | 2886 |
2887 InspectorInstrumentation::willModifyDOMAttr(this, oldValue, newValue); | 2887 InspectorInstrumentation::willModifyDOMAttr(this, oldValue, newValue); |
2888 } | 2888 } |
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3364 || isHTMLObjectElement(*this) | 3364 || isHTMLObjectElement(*this) |
3365 || isHTMLAppletElement(*this) | 3365 || isHTMLAppletElement(*this) |
3366 || isHTMLCanvasElement(*this)) | 3366 || isHTMLCanvasElement(*this)) |
3367 return false; | 3367 return false; |
3368 if (FullscreenElementStack::isActiveFullScreenElement(this)) | 3368 if (FullscreenElementStack::isActiveFullScreenElement(this)) |
3369 return false; | 3369 return false; |
3370 return true; | 3370 return true; |
3371 } | 3371 } |
3372 | 3372 |
3373 } // namespace WebCore | 3373 } // namespace WebCore |
OLD | NEW |