| 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 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights |
| 5 * reserved. | 5 * reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 &hreflangAttr, &http_equivAttr, &langAttr, &languageAttr, | 203 &hreflangAttr, &http_equivAttr, &langAttr, &languageAttr, |
| 204 &linkAttr, &mediaAttr, &methodAttr, &multipleAttr, | 204 &linkAttr, &mediaAttr, &methodAttr, &multipleAttr, |
| 205 &nohrefAttr, &noresizeAttr, &noshadeAttr, &nowrapAttr, | 205 &nohrefAttr, &noresizeAttr, &noshadeAttr, &nowrapAttr, |
| 206 &readonlyAttr, &relAttr, &revAttr, &rulesAttr, | 206 &readonlyAttr, &relAttr, &revAttr, &rulesAttr, |
| 207 &scopeAttr, &scrollingAttr, &selectedAttr, &shapeAttr, | 207 &scopeAttr, &scrollingAttr, &selectedAttr, &shapeAttr, |
| 208 &targetAttr, &textAttr, &typeAttr, &valignAttr, | 208 &targetAttr, &textAttr, &typeAttr, &valignAttr, |
| 209 &valuetypeAttr, &vlinkAttr}; | 209 &valuetypeAttr, &vlinkAttr}; |
| 210 | 210 |
| 211 attrSet->reserveCapacityForSize(WTF_ARRAY_LENGTH(caseInsensitiveAttributes)); | 211 attrSet->reserveCapacityForSize(WTF_ARRAY_LENGTH(caseInsensitiveAttributes)); |
| 212 for (const QualifiedName* attr : caseInsensitiveAttributes) | 212 for (const QualifiedName* attr : caseInsensitiveAttributes) |
| 213 attrSet->add(attr->localName().impl()); | 213 attrSet->insert(attr->localName().impl()); |
| 214 | 214 |
| 215 return attrSet; | 215 return attrSet; |
| 216 } | 216 } |
| 217 | 217 |
| 218 bool HTMLDocument::isCaseSensitiveAttribute( | 218 bool HTMLDocument::isCaseSensitiveAttribute( |
| 219 const QualifiedName& attributeName) { | 219 const QualifiedName& attributeName) { |
| 220 static HashSet<StringImpl*>* htmlCaseInsensitiveAttributesSet = | 220 static HashSet<StringImpl*>* htmlCaseInsensitiveAttributesSet = |
| 221 createHtmlCaseInsensitiveAttributesSet(); | 221 createHtmlCaseInsensitiveAttributesSet(); |
| 222 bool isPossibleHTMLAttr = | 222 bool isPossibleHTMLAttr = |
| 223 !attributeName.hasPrefix() && (attributeName.namespaceURI() == nullAtom); | 223 !attributeName.hasPrefix() && (attributeName.namespaceURI() == nullAtom); |
| 224 return !isPossibleHTMLAttr || | 224 return !isPossibleHTMLAttr || |
| 225 !htmlCaseInsensitiveAttributesSet->contains( | 225 !htmlCaseInsensitiveAttributesSet->contains( |
| 226 attributeName.localName().impl()); | 226 attributeName.localName().impl()); |
| 227 } | 227 } |
| 228 | 228 |
| 229 } // namespace blink | 229 } // namespace blink |
| OLD | NEW |