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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 } | 302 } |
303 | 303 |
304 PassRefPtr<Element> Element::cloneElementWithoutAttributesAndChildren() | 304 PassRefPtr<Element> Element::cloneElementWithoutAttributesAndChildren() |
305 { | 305 { |
306 return document().createElement(tagQName(), false); | 306 return document().createElement(tagQName(), false); |
307 } | 307 } |
308 | 308 |
309 PassRefPtr<Attr> Element::detachAttribute(size_t index) | 309 PassRefPtr<Attr> Element::detachAttribute(size_t index) |
310 { | 310 { |
311 ASSERT(elementData()); | 311 ASSERT(elementData()); |
312 const Attribute* attribute = elementData()->attributeItem(index); | 312 const Attribute& attribute = elementData()->attributeItem(index); |
313 RefPtr<Attr> attrNode = attrIfExists(attribute->name()); | 313 RefPtr<Attr> attrNode = attrIfExists(attribute.name()); |
314 if (attrNode) | 314 if (attrNode) |
315 detachAttrNodeAtIndex(attrNode.get(), index); | 315 detachAttrNodeAtIndex(attrNode.get(), index); |
316 else { | 316 else { |
317 attrNode = Attr::create(document(), attribute->name(), attribute->value(
)); | 317 attrNode = Attr::create(document(), attribute.name(), attribute.value())
; |
318 removeAttributeInternal(index, NotInSynchronizationOfLazyAttribute); | 318 removeAttributeInternal(index, NotInSynchronizationOfLazyAttribute); |
319 } | 319 } |
320 return attrNode.release(); | 320 return attrNode.release(); |
321 } | 321 } |
322 | 322 |
323 void Element::detachAttrNodeAtIndex(Attr* attr, size_t index) | 323 void Element::detachAttrNodeAtIndex(Attr* attr, size_t index) |
324 { | 324 { |
325 ASSERT(attr); | 325 ASSERT(attr); |
326 ASSERT(elementData()); | 326 ASSERT(elementData()); |
327 | 327 |
328 const Attribute* attribute = elementData()->attributeItem(index); | 328 const Attribute& attribute = elementData()->attributeItem(index); |
329 ASSERT(attribute); | 329 ASSERT(attribute.name() == attr->qualifiedName()); |
330 ASSERT(attribute->name() == attr->qualifiedName()); | 330 detachAttrNodeFromElementWithValue(attr, attribute.value()); |
331 detachAttrNodeFromElementWithValue(attr, attribute->value()); | |
332 removeAttributeInternal(index, NotInSynchronizationOfLazyAttribute); | 331 removeAttributeInternal(index, NotInSynchronizationOfLazyAttribute); |
333 } | 332 } |
334 | 333 |
335 void Element::removeAttribute(const QualifiedName& name) | 334 void Element::removeAttribute(const QualifiedName& name) |
336 { | 335 { |
337 if (!elementData()) | 336 if (!elementData()) |
338 return; | 337 return; |
339 | 338 |
340 size_t index = elementData()->getAttributeItemIndex(name); | 339 size_t index = elementData()->getAttributeItemIndex(name); |
341 if (index == kNotFound) | 340 if (index == kNotFound) |
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
928 { | 927 { |
929 if (!Document::isValidName(localName)) { | 928 if (!Document::isValidName(localName)) { |
930 exceptionState.throwDOMException(InvalidCharacterError, "'" + localName
+ "' is not a valid attribute name."); | 929 exceptionState.throwDOMException(InvalidCharacterError, "'" + localName
+ "' is not a valid attribute name."); |
931 return; | 930 return; |
932 } | 931 } |
933 | 932 |
934 synchronizeAttribute(localName); | 933 synchronizeAttribute(localName); |
935 const AtomicString& caseAdjustedLocalName = shouldIgnoreAttributeCase() ? lo
calName.lower() : localName; | 934 const AtomicString& caseAdjustedLocalName = shouldIgnoreAttributeCase() ? lo
calName.lower() : localName; |
936 | 935 |
937 size_t index = elementData() ? elementData()->getAttributeItemIndex(caseAdju
stedLocalName, false) : kNotFound; | 936 size_t index = elementData() ? elementData()->getAttributeItemIndex(caseAdju
stedLocalName, false) : kNotFound; |
938 const QualifiedName& qName = index != kNotFound ? attributeItem(index)->name
() : QualifiedName(nullAtom, caseAdjustedLocalName, nullAtom); | 937 const QualifiedName& qName = index != kNotFound ? attributeItem(index).name(
) : QualifiedName(nullAtom, caseAdjustedLocalName, nullAtom); |
939 setAttributeInternal(index, qName, value, NotInSynchronizationOfLazyAttribut
e); | 938 setAttributeInternal(index, qName, value, NotInSynchronizationOfLazyAttribut
e); |
940 } | 939 } |
941 | 940 |
942 void Element::setAttribute(const QualifiedName& name, const AtomicString& value) | 941 void Element::setAttribute(const QualifiedName& name, const AtomicString& value) |
943 { | 942 { |
944 synchronizeAttribute(name); | 943 synchronizeAttribute(name); |
945 size_t index = elementData() ? elementData()->getAttributeItemIndex(name) :
kNotFound; | 944 size_t index = elementData() ? elementData()->getAttributeItemIndex(name) :
kNotFound; |
946 setAttributeInternal(index, name, value, NotInSynchronizationOfLazyAttribute
); | 945 setAttributeInternal(index, name, value, NotInSynchronizationOfLazyAttribute
); |
947 } | 946 } |
948 | 947 |
949 void Element::setSynchronizedLazyAttribute(const QualifiedName& name, const Atom
icString& value) | 948 void Element::setSynchronizedLazyAttribute(const QualifiedName& name, const Atom
icString& value) |
950 { | 949 { |
951 size_t index = elementData() ? elementData()->getAttributeItemIndex(name) :
kNotFound; | 950 size_t index = elementData() ? elementData()->getAttributeItemIndex(name) :
kNotFound; |
952 setAttributeInternal(index, name, value, InSynchronizationOfLazyAttribute); | 951 setAttributeInternal(index, name, value, InSynchronizationOfLazyAttribute); |
953 } | 952 } |
954 | 953 |
955 ALWAYS_INLINE void Element::setAttributeInternal(size_t index, const QualifiedNa
me& name, const AtomicString& newValue, SynchronizationOfLazyAttribute inSynchro
nizationOfLazyAttribute) | 954 ALWAYS_INLINE void Element::setAttributeInternal(size_t index, const QualifiedNa
me& name, const AtomicString& newValue, SynchronizationOfLazyAttribute inSynchro
nizationOfLazyAttribute) |
956 { | 955 { |
957 if (newValue.isNull()) { | 956 if (newValue.isNull()) { |
958 if (index != kNotFound) | 957 if (index != kNotFound) |
959 removeAttributeInternal(index, inSynchronizationOfLazyAttribute); | 958 removeAttributeInternal(index, inSynchronizationOfLazyAttribute); |
960 return; | 959 return; |
961 } | 960 } |
962 | 961 |
963 if (index == kNotFound) { | 962 if (index == kNotFound) { |
964 addAttributeInternal(name, newValue, inSynchronizationOfLazyAttribute); | 963 addAttributeInternal(name, newValue, inSynchronizationOfLazyAttribute); |
965 return; | 964 return; |
966 } | 965 } |
967 | 966 |
968 const Attribute* existingAttribute = attributeItem(index); | 967 const Attribute& existingAttribute = attributeItem(index); |
969 QualifiedName existingAttributeName = existingAttribute->name(); | 968 QualifiedName existingAttributeName = existingAttribute.name(); |
970 | 969 |
971 if (!inSynchronizationOfLazyAttribute) | 970 if (!inSynchronizationOfLazyAttribute) |
972 willModifyAttribute(existingAttributeName, existingAttribute->value(), n
ewValue); | 971 willModifyAttribute(existingAttributeName, existingAttribute.value(), ne
wValue); |
973 | 972 |
974 if (newValue != existingAttribute->value()) { | 973 if (newValue != existingAttribute.value()) { |
975 // If there is an Attr node hooked to this attribute, the Attr::setValue
() call below | 974 // If there is an Attr node hooked to this attribute, the Attr::setValue
() call below |
976 // will write into the ElementData. | 975 // will write into the ElementData. |
977 // FIXME: Refactor this so it makes some sense. | 976 // FIXME: Refactor this so it makes some sense. |
978 if (RefPtr<Attr> attrNode = inSynchronizationOfLazyAttribute ? nullptr :
attrIfExists(existingAttributeName)) | 977 if (RefPtr<Attr> attrNode = inSynchronizationOfLazyAttribute ? nullptr :
attrIfExists(existingAttributeName)) |
979 attrNode->setValue(newValue); | 978 attrNode->setValue(newValue); |
980 else | 979 else |
981 ensureUniqueElementData().attributeItem(index)->setValue(newValue); | 980 ensureUniqueElementData().attributeItem(index).setValue(newValue); |
982 } | 981 } |
983 | 982 |
984 if (!inSynchronizationOfLazyAttribute) | 983 if (!inSynchronizationOfLazyAttribute) |
985 didModifyAttribute(existingAttributeName, newValue); | 984 didModifyAttribute(existingAttributeName, newValue); |
986 } | 985 } |
987 | 986 |
988 static inline AtomicString makeIdForStyleResolution(const AtomicString& value, b
ool inQuirksMode) | 987 static inline AtomicString makeIdForStyleResolution(const AtomicString& value, b
ool inQuirksMode) |
989 { | 988 { |
990 if (inQuirksMode) | 989 if (inQuirksMode) |
991 return value.lower(); | 990 return value.lower(); |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1245 } | 1244 } |
1246 | 1245 |
1247 const AtomicString& Element::locateNamespacePrefix(const AtomicString& namespace
ToLocate) const | 1246 const AtomicString& Element::locateNamespacePrefix(const AtomicString& namespace
ToLocate) const |
1248 { | 1247 { |
1249 if (!prefix().isNull() && namespaceURI() == namespaceToLocate) | 1248 if (!prefix().isNull() && namespaceURI() == namespaceToLocate) |
1250 return prefix(); | 1249 return prefix(); |
1251 | 1250 |
1252 if (hasAttributes()) { | 1251 if (hasAttributes()) { |
1253 unsigned attributeCount = this->attributeCount(); | 1252 unsigned attributeCount = this->attributeCount(); |
1254 for (unsigned i = 0; i < attributeCount; ++i) { | 1253 for (unsigned i = 0; i < attributeCount; ++i) { |
1255 const Attribute* attr = attributeItem(i); | 1254 const Attribute& attr = attributeItem(i); |
1256 | 1255 |
1257 if (attr->prefix() == xmlnsAtom && attr->value() == namespaceToLocat
e) | 1256 if (attr.prefix() == xmlnsAtom && attr.value() == namespaceToLocate) |
1258 return attr->localName(); | 1257 return attr.localName(); |
1259 } | 1258 } |
1260 } | 1259 } |
1261 | 1260 |
1262 if (Element* parent = parentElement()) | 1261 if (Element* parent = parentElement()) |
1263 return parent->locateNamespacePrefix(namespaceToLocate); | 1262 return parent->locateNamespacePrefix(namespaceToLocate); |
1264 | 1263 |
1265 return nullAtom; | 1264 return nullAtom; |
1266 } | 1265 } |
1267 | 1266 |
1268 KURL Element::baseURI() const | 1267 KURL Element::baseURI() const |
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1962 exceptionState.throwDOMException(InUseAttributeError, "The node provided
is an attribute node that is already an attribute of another Element; attribute
nodes must be explicitly cloned."); | 1961 exceptionState.throwDOMException(InUseAttributeError, "The node provided
is an attribute node that is already an attribute of another Element; attribute
nodes must be explicitly cloned."); |
1963 return nullptr; | 1962 return nullptr; |
1964 } | 1963 } |
1965 | 1964 |
1966 synchronizeAllAttributes(); | 1965 synchronizeAllAttributes(); |
1967 UniqueElementData& elementData = ensureUniqueElementData(); | 1966 UniqueElementData& elementData = ensureUniqueElementData(); |
1968 | 1967 |
1969 size_t index = elementData.getAttributeItemIndex(attrNode->qualifiedName(),
shouldIgnoreAttributeCase()); | 1968 size_t index = elementData.getAttributeItemIndex(attrNode->qualifiedName(),
shouldIgnoreAttributeCase()); |
1970 if (index != kNotFound) { | 1969 if (index != kNotFound) { |
1971 if (oldAttrNode) | 1970 if (oldAttrNode) |
1972 detachAttrNodeFromElementWithValue(oldAttrNode.get(), elementData.at
tributeItem(index)->value()); | 1971 detachAttrNodeFromElementWithValue(oldAttrNode.get(), elementData.at
tributeItem(index).value()); |
1973 else | 1972 else |
1974 oldAttrNode = Attr::create(document(), attrNode->qualifiedName(), el
ementData.attributeItem(index)->value()); | 1973 oldAttrNode = Attr::create(document(), attrNode->qualifiedName(), el
ementData.attributeItem(index).value()); |
1975 } | 1974 } |
1976 | 1975 |
1977 setAttributeInternal(index, attrNode->qualifiedName(), attrNode->value(), No
tInSynchronizationOfLazyAttribute); | 1976 setAttributeInternal(index, attrNode->qualifiedName(), attrNode->value(), No
tInSynchronizationOfLazyAttribute); |
1978 | 1977 |
1979 attrNode->attachToElement(this); | 1978 attrNode->attachToElement(this); |
1980 treeScope().adoptIfNeeded(*attrNode); | 1979 treeScope().adoptIfNeeded(*attrNode); |
1981 ensureAttrNodeListForElement(this).append(attrNode); | 1980 ensureAttrNodeListForElement(this).append(attrNode); |
1982 | 1981 |
1983 return oldAttrNode.release(); | 1982 return oldAttrNode.release(); |
1984 } | 1983 } |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2034 return; | 2033 return; |
2035 setAttribute(parsedName, value); | 2034 setAttribute(parsedName, value); |
2036 } | 2035 } |
2037 | 2036 |
2038 void Element::removeAttributeInternal(size_t index, SynchronizationOfLazyAttribu
te inSynchronizationOfLazyAttribute) | 2037 void Element::removeAttributeInternal(size_t index, SynchronizationOfLazyAttribu
te inSynchronizationOfLazyAttribute) |
2039 { | 2038 { |
2040 ASSERT_WITH_SECURITY_IMPLICATION(index < attributeCount()); | 2039 ASSERT_WITH_SECURITY_IMPLICATION(index < attributeCount()); |
2041 | 2040 |
2042 UniqueElementData& elementData = ensureUniqueElementData(); | 2041 UniqueElementData& elementData = ensureUniqueElementData(); |
2043 | 2042 |
2044 QualifiedName name = elementData.attributeItem(index)->name(); | 2043 QualifiedName name = elementData.attributeItem(index).name(); |
2045 AtomicString valueBeingRemoved = elementData.attributeItem(index)->value(); | 2044 AtomicString valueBeingRemoved = elementData.attributeItem(index).value(); |
2046 | 2045 |
2047 if (!inSynchronizationOfLazyAttribute) { | 2046 if (!inSynchronizationOfLazyAttribute) { |
2048 if (!valueBeingRemoved.isNull()) | 2047 if (!valueBeingRemoved.isNull()) |
2049 willModifyAttribute(name, valueBeingRemoved, nullAtom); | 2048 willModifyAttribute(name, valueBeingRemoved, nullAtom); |
2050 } | 2049 } |
2051 | 2050 |
2052 if (RefPtr<Attr> attrNode = attrIfExists(name)) | 2051 if (RefPtr<Attr> attrNode = attrIfExists(name)) |
2053 detachAttrNodeFromElementWithValue(attrNode.get(), elementData.attribute
Item(index)->value()); | 2052 detachAttrNodeFromElementWithValue(attrNode.get(), elementData.attribute
Item(index).value()); |
2054 | 2053 |
2055 elementData.removeAttribute(index); | 2054 elementData.removeAttribute(index); |
2056 | 2055 |
2057 if (!inSynchronizationOfLazyAttribute) | 2056 if (!inSynchronizationOfLazyAttribute) |
2058 didRemoveAttribute(name); | 2057 didRemoveAttribute(name); |
2059 } | 2058 } |
2060 | 2059 |
2061 void Element::addAttributeInternal(const QualifiedName& name, const AtomicString
& value, SynchronizationOfLazyAttribute inSynchronizationOfLazyAttribute) | 2060 void Element::addAttributeInternal(const QualifiedName& name, const AtomicString
& value, SynchronizationOfLazyAttribute inSynchronizationOfLazyAttribute) |
2062 { | 2061 { |
2063 if (!inSynchronizationOfLazyAttribute) | 2062 if (!inSynchronizationOfLazyAttribute) |
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2690 document().cancelFocusAppearanceUpdate(); | 2689 document().cancelFocusAppearanceUpdate(); |
2691 } | 2690 } |
2692 | 2691 |
2693 void Element::normalizeAttributes() | 2692 void Element::normalizeAttributes() |
2694 { | 2693 { |
2695 if (!hasAttributes()) | 2694 if (!hasAttributes()) |
2696 return; | 2695 return; |
2697 // attributeCount() cannot be cached before the loop because the attributes | 2696 // attributeCount() cannot be cached before the loop because the attributes |
2698 // list is altered while iterating. | 2697 // list is altered while iterating. |
2699 for (unsigned i = 0; i < attributeCount(); ++i) { | 2698 for (unsigned i = 0; i < attributeCount(); ++i) { |
2700 if (RefPtr<Attr> attr = attrIfExists(attributeItem(i)->name())) | 2699 if (RefPtr<Attr> attr = attrIfExists(attributeItem(i).name())) |
2701 attr->normalize(); | 2700 attr->normalize(); |
2702 } | 2701 } |
2703 } | 2702 } |
2704 | 2703 |
2705 void Element::updatePseudoElement(PseudoId pseudoId, StyleRecalcChange change) | 2704 void Element::updatePseudoElement(PseudoId pseudoId, StyleRecalcChange change) |
2706 { | 2705 { |
2707 ASSERT(!needsStyleRecalc()); | 2706 ASSERT(!needsStyleRecalc()); |
2708 PseudoElement* element = pseudoElement(pseudoId); | 2707 PseudoElement* element = pseudoElement(pseudoId); |
2709 if (element && (change == UpdatePseudoElements || element->shouldCallRecalcS
tyle(change))) { | 2708 if (element && (change == UpdatePseudoElements || element->shouldCallRecalcS
tyle(change))) { |
2710 | 2709 |
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3209 ASSERT_NOT_REACHED(); | 3208 ASSERT_NOT_REACHED(); |
3210 } | 3209 } |
3211 | 3210 |
3212 void Element::detachAllAttrNodesFromElement() | 3211 void Element::detachAllAttrNodesFromElement() |
3213 { | 3212 { |
3214 AttrNodeList* attrNodeList = attrNodeListForElement(this); | 3213 AttrNodeList* attrNodeList = attrNodeListForElement(this); |
3215 ASSERT(attrNodeList); | 3214 ASSERT(attrNodeList); |
3216 | 3215 |
3217 unsigned attributeCount = this->attributeCount(); | 3216 unsigned attributeCount = this->attributeCount(); |
3218 for (unsigned i = 0; i < attributeCount; ++i) { | 3217 for (unsigned i = 0; i < attributeCount; ++i) { |
3219 const Attribute* attribute = attributeItem(i); | 3218 const Attribute& attribute = attributeItem(i); |
3220 if (RefPtr<Attr> attrNode = findAttrNodeInList(*attrNodeList, attribute-
>name())) | 3219 if (RefPtr<Attr> attrNode = findAttrNodeInList(*attrNodeList, attribute.
name())) |
3221 attrNode->detachFromElementWithValue(attribute->value()); | 3220 attrNode->detachFromElementWithValue(attribute.value()); |
3222 } | 3221 } |
3223 | 3222 |
3224 removeAttrNodeListForElement(this); | 3223 removeAttrNodeListForElement(this); |
3225 } | 3224 } |
3226 | 3225 |
3227 void Element::willRecalcStyle(StyleRecalcChange) | 3226 void Element::willRecalcStyle(StyleRecalcChange) |
3228 { | 3227 { |
3229 ASSERT(hasCustomStyleCallbacks()); | 3228 ASSERT(hasCustomStyleCallbacks()); |
3230 } | 3229 } |
3231 | 3230 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3277 && !other.m_elementData->presentationAttributeStyle()) | 3276 && !other.m_elementData->presentationAttributeStyle()) |
3278 const_cast<Element&>(other).m_elementData = static_cast<const UniqueElem
entData*>(other.m_elementData.get())->makeShareableCopy(); | 3277 const_cast<Element&>(other).m_elementData = static_cast<const UniqueElem
entData*>(other.m_elementData.get())->makeShareableCopy(); |
3279 | 3278 |
3280 if (!other.m_elementData->isUnique() && !ownerDocumentsHaveDifferentCaseSens
itivity && !needsURLResolutionForInlineStyle(other, other.document(), document()
)) | 3279 if (!other.m_elementData->isUnique() && !ownerDocumentsHaveDifferentCaseSens
itivity && !needsURLResolutionForInlineStyle(other, other.document(), document()
)) |
3281 m_elementData = other.m_elementData; | 3280 m_elementData = other.m_elementData; |
3282 else | 3281 else |
3283 m_elementData = other.m_elementData->makeUniqueCopy(); | 3282 m_elementData = other.m_elementData->makeUniqueCopy(); |
3284 | 3283 |
3285 unsigned length = m_elementData->length(); | 3284 unsigned length = m_elementData->length(); |
3286 for (unsigned i = 0; i < length; ++i) { | 3285 for (unsigned i = 0; i < length; ++i) { |
3287 const Attribute* attribute = const_cast<const ElementData*>(m_elementDat
a.get())->attributeItem(i); | 3286 const Attribute& attribute = m_elementData->attributeItem(i); |
3288 attributeChangedFromParserOrByCloning(attribute->name(), attribute->valu
e(), ModifiedByCloning); | 3287 attributeChangedFromParserOrByCloning(attribute.name(), attribute.value(
), ModifiedByCloning); |
3289 } | 3288 } |
3290 } | 3289 } |
3291 | 3290 |
3292 void Element::cloneDataFromElement(const Element& other) | 3291 void Element::cloneDataFromElement(const Element& other) |
3293 { | 3292 { |
3294 cloneAttributesFromElement(other); | 3293 cloneAttributesFromElement(other); |
3295 copyNonAttributePropertiesFromElement(other); | 3294 copyNonAttributePropertiesFromElement(other); |
3296 } | 3295 } |
3297 | 3296 |
3298 void Element::createUniqueElementData() | 3297 void Element::createUniqueElementData() |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3541 // Before doing so, we need to resolve issues in HTMLSelectElement::recalcLi
stItems | 3540 // Before doing so, we need to resolve issues in HTMLSelectElement::recalcLi
stItems |
3542 // and RenderMenuList::setText. See also https://bugs.webkit.org/show_bug.cg
i?id=88405 | 3541 // and RenderMenuList::setText. See also https://bugs.webkit.org/show_bug.cg
i?id=88405 |
3543 if (hasTagName(optionTag) || hasTagName(optgroupTag)) | 3542 if (hasTagName(optionTag) || hasTagName(optgroupTag)) |
3544 return false; | 3543 return false; |
3545 if (FullscreenElementStack::isActiveFullScreenElement(this)) | 3544 if (FullscreenElementStack::isActiveFullScreenElement(this)) |
3546 return false; | 3545 return false; |
3547 return true; | 3546 return true; |
3548 } | 3547 } |
3549 | 3548 |
3550 } // namespace WebCore | 3549 } // namespace WebCore |
OLD | NEW |