| 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 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 980 } else if (isStyledElement() && isPresentationAttribute(name)) { | 980 } else if (isStyledElement() && isPresentationAttribute(name)) { |
| 981 elementData()->m_presentationAttributeStyleIsDirty = true; | 981 elementData()->m_presentationAttributeStyleIsDirty = true; |
| 982 setNeedsStyleRecalc(LocalStyleChange); | 982 setNeedsStyleRecalc(LocalStyleChange); |
| 983 } | 983 } |
| 984 | 984 |
| 985 if (isIdAttributeName(name)) { | 985 if (isIdAttributeName(name)) { |
| 986 AtomicString oldId = elementData()->idForStyleResolution(); | 986 AtomicString oldId = elementData()->idForStyleResolution(); |
| 987 AtomicString newId = makeIdForStyleResolution(newValue, document().inQui
rksMode()); | 987 AtomicString newId = makeIdForStyleResolution(newValue, document().inQui
rksMode()); |
| 988 if (newId != oldId) { | 988 if (newId != oldId) { |
| 989 elementData()->setIdForStyleResolution(newId); | 989 elementData()->setIdForStyleResolution(newId); |
| 990 shouldInvalidateStyle = testShouldInvalidateStyle && checkNeedsStyle
InvalidationForIdChange(oldId, newId, styleResolver->ruleFeatureSet()); | 990 shouldInvalidateStyle = testShouldInvalidateStyle && checkNeedsStyle
InvalidationForIdChange(oldId, newId, styleResolver->ensureRuleFeatureSet()); |
| 991 } | 991 } |
| 992 } else if (name == classAttr) { | 992 } else if (name == classAttr) { |
| 993 classAttributeChanged(newValue); | 993 classAttributeChanged(newValue); |
| 994 } else if (name == HTMLNames::nameAttr) { | 994 } else if (name == HTMLNames::nameAttr) { |
| 995 setHasName(!newValue.isNull()); | 995 setHasName(!newValue.isNull()); |
| 996 } else if (name == HTMLNames::pseudoAttr) { | 996 } else if (name == HTMLNames::pseudoAttr) { |
| 997 shouldInvalidateStyle |= testShouldInvalidateStyle && isInShadowTree(); | 997 shouldInvalidateStyle |= testShouldInvalidateStyle && isInShadowTree(); |
| 998 } | 998 } |
| 999 | 999 |
| 1000 invalidateNodeListCachesInAncestors(&name, this); | 1000 invalidateNodeListCachesInAncestors(&name, this); |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1088 { | 1088 { |
| 1089 StyleResolver* styleResolver = document().styleResolverIfExists(); | 1089 StyleResolver* styleResolver = document().styleResolverIfExists(); |
| 1090 bool testShouldInvalidateStyle = inActiveDocument() && styleResolver && styl
eChangeType() < SubtreeStyleChange; | 1090 bool testShouldInvalidateStyle = inActiveDocument() && styleResolver && styl
eChangeType() < SubtreeStyleChange; |
| 1091 bool shouldInvalidateStyle = false; | 1091 bool shouldInvalidateStyle = false; |
| 1092 | 1092 |
| 1093 if (classStringHasClassName(newClassString)) { | 1093 if (classStringHasClassName(newClassString)) { |
| 1094 const bool shouldFoldCase = document().inQuirksMode(); | 1094 const bool shouldFoldCase = document().inQuirksMode(); |
| 1095 const SpaceSplitString oldClasses = elementData()->classNames(); | 1095 const SpaceSplitString oldClasses = elementData()->classNames(); |
| 1096 elementData()->setClass(newClassString, shouldFoldCase); | 1096 elementData()->setClass(newClassString, shouldFoldCase); |
| 1097 const SpaceSplitString& newClasses = elementData()->classNames(); | 1097 const SpaceSplitString& newClasses = elementData()->classNames(); |
| 1098 shouldInvalidateStyle = testShouldInvalidateStyle && checkSelectorForCla
ssChange(oldClasses, newClasses, styleResolver->ruleFeatureSet()); | 1098 shouldInvalidateStyle = testShouldInvalidateStyle && checkSelectorForCla
ssChange(oldClasses, newClasses, styleResolver->ensureRuleFeatureSet()); |
| 1099 } else { | 1099 } else { |
| 1100 const SpaceSplitString& oldClasses = elementData()->classNames(); | 1100 const SpaceSplitString& oldClasses = elementData()->classNames(); |
| 1101 shouldInvalidateStyle = testShouldInvalidateStyle && checkSelectorForCla
ssChange(oldClasses, styleResolver->ruleFeatureSet()); | 1101 shouldInvalidateStyle = testShouldInvalidateStyle && checkSelectorForCla
ssChange(oldClasses, styleResolver->ensureRuleFeatureSet()); |
| 1102 elementData()->clearClass(); | 1102 elementData()->clearClass(); |
| 1103 } | 1103 } |
| 1104 | 1104 |
| 1105 if (hasRareData()) | 1105 if (hasRareData()) |
| 1106 elementRareData()->clearClassListValueForQuirksMode(); | 1106 elementRareData()->clearClassListValueForQuirksMode(); |
| 1107 | 1107 |
| 1108 if (shouldInvalidateStyle) | 1108 if (shouldInvalidateStyle) |
| 1109 setNeedsStyleRecalc(); | 1109 setNeedsStyleRecalc(); |
| 1110 } | 1110 } |
| 1111 | 1111 |
| (...skipping 2354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3466 // Before doing so, we need to resolve issues in HTMLSelectElement::recalcLi
stItems | 3466 // Before doing so, we need to resolve issues in HTMLSelectElement::recalcLi
stItems |
| 3467 // and RenderMenuList::setText. See also https://bugs.webkit.org/show_bug.cg
i?id=88405 | 3467 // and RenderMenuList::setText. See also https://bugs.webkit.org/show_bug.cg
i?id=88405 |
| 3468 if (hasTagName(optionTag) || hasTagName(optgroupTag)) | 3468 if (hasTagName(optionTag) || hasTagName(optgroupTag)) |
| 3469 return false; | 3469 return false; |
| 3470 if (FullscreenElementStack::isActiveFullScreenElement(this)) | 3470 if (FullscreenElementStack::isActiveFullScreenElement(this)) |
| 3471 return false; | 3471 return false; |
| 3472 return true; | 3472 return true; |
| 3473 } | 3473 } |
| 3474 | 3474 |
| 3475 } // namespace WebCore | 3475 } // namespace WebCore |
| OLD | NEW |