Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(371)

Side by Side Diff: Source/core/dom/Element.cpp

Issue 150103007: Use fastGetAttribute in more places (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add more instances Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after
1262 } 1262 }
1263 1263
1264 if (Element* parent = parentElement()) 1264 if (Element* parent = parentElement())
1265 return parent->locateNamespacePrefix(namespaceToLocate); 1265 return parent->locateNamespacePrefix(namespaceToLocate);
1266 1266
1267 return nullAtom; 1267 return nullAtom;
1268 } 1268 }
1269 1269
1270 KURL Element::baseURI() const 1270 KURL Element::baseURI() const
1271 { 1271 {
1272 const AtomicString& baseAttribute = getAttribute(baseAttr); 1272 const AtomicString& baseAttribute = fastGetAttribute(baseAttr);
1273 KURL base(KURL(), baseAttribute); 1273 KURL base(KURL(), baseAttribute);
1274 if (!base.protocol().isEmpty()) 1274 if (!base.protocol().isEmpty())
1275 return base; 1275 return base;
1276 1276
1277 ContainerNode* parent = parentNode(); 1277 ContainerNode* parent = parentNode();
1278 if (!parent) 1278 if (!parent)
1279 return base; 1279 return base;
1280 1280
1281 const KURL& parentBase = parent->baseURI(); 1281 const KURL& parentBase = parent->baseURI();
1282 if (parentBase.isNull()) 1282 if (parentBase.isNull())
(...skipping 1676 matching lines...) Expand 10 before | Expand all | Expand 10 after
2959 } 2959 }
2960 2960
2961 void Element::webkitRequestPointerLock() 2961 void Element::webkitRequestPointerLock()
2962 { 2962 {
2963 if (document().page()) 2963 if (document().page())
2964 document().page()->pointerLockController().requestPointerLock(this); 2964 document().page()->pointerLockController().requestPointerLock(this);
2965 } 2965 }
2966 2966
2967 SpellcheckAttributeState Element::spellcheckAttributeState() const 2967 SpellcheckAttributeState Element::spellcheckAttributeState() const
2968 { 2968 {
2969 const AtomicString& value = getAttribute(HTMLNames::spellcheckAttr); 2969 const AtomicString& value = fastGetAttribute(HTMLNames::spellcheckAttr);
Inactive 2014/02/13 16:03:43 HTMLNames:: is likely not needed.
2970 if (value == nullAtom) 2970 if (value == nullAtom)
2971 return SpellcheckAttributeDefault; 2971 return SpellcheckAttributeDefault;
2972 if (equalIgnoringCase(value, "true") || equalIgnoringCase(value, "")) 2972 if (equalIgnoringCase(value, "true") || equalIgnoringCase(value, ""))
2973 return SpellcheckAttributeTrue; 2973 return SpellcheckAttributeTrue;
2974 if (equalIgnoringCase(value, "false")) 2974 if (equalIgnoringCase(value, "false"))
2975 return SpellcheckAttributeFalse; 2975 return SpellcheckAttributeFalse;
2976 2976
2977 return SpellcheckAttributeDefault; 2977 return SpellcheckAttributeDefault;
2978 } 2978 }
2979 2979
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
3631 // Before doing so, we need to resolve issues in HTMLSelectElement::recalcLi stItems 3631 // Before doing so, we need to resolve issues in HTMLSelectElement::recalcLi stItems
3632 // and RenderMenuList::setText. See also https://bugs.webkit.org/show_bug.cg i?id=88405 3632 // and RenderMenuList::setText. See also https://bugs.webkit.org/show_bug.cg i?id=88405
3633 if (hasTagName(optionTag) || hasTagName(optgroupTag)) 3633 if (hasTagName(optionTag) || hasTagName(optgroupTag))
3634 return false; 3634 return false;
3635 if (FullscreenElementStack::isActiveFullScreenElement(this)) 3635 if (FullscreenElementStack::isActiveFullScreenElement(this))
3636 return false; 3636 return false;
3637 return true; 3637 return true;
3638 } 3638 }
3639 3639
3640 } // namespace WebCore 3640 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | Source/core/dom/ShadowTreeStyleSheetCollection.cpp » ('j') | Source/core/html/HTMLImageElement.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698