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

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

Issue 112843002: Make calls to AtomicString(const String&) explicit in dom/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years 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 2761 matching lines...) Expand 10 before | Expand all | Expand 10 after
2772 return 0; 2772 return 0;
2773 } 2773 }
2774 2774
2775 bool Element::webkitMatchesSelector(const String& selector, ExceptionState& exce ptionState) 2775 bool Element::webkitMatchesSelector(const String& selector, ExceptionState& exce ptionState)
2776 { 2776 {
2777 if (selector.isEmpty()) { 2777 if (selector.isEmpty()) {
2778 exceptionState.throwUninformativeAndGenericDOMException(SyntaxError); 2778 exceptionState.throwUninformativeAndGenericDOMException(SyntaxError);
2779 return false; 2779 return false;
2780 } 2780 }
2781 2781
2782 SelectorQuery* selectorQuery = document().selectorQueryCache().add(selector, document(), exceptionState); 2782 SelectorQuery* selectorQuery = document().selectorQueryCache().add(AtomicStr ing(selector), document(), exceptionState);
2783 if (!selectorQuery) 2783 if (!selectorQuery)
2784 return false; 2784 return false;
2785 return selectorQuery->matches(*this); 2785 return selectorQuery->matches(*this);
2786 } 2786 }
2787 2787
2788 DOMTokenList* Element::classList() 2788 DOMTokenList* Element::classList()
2789 { 2789 {
2790 ElementRareData& rareData = ensureElementRareData(); 2790 ElementRareData& rareData = ensureElementRareData();
2791 if (!rareData.classList()) 2791 if (!rareData.classList())
2792 rareData.setClassList(ClassList::create(this)); 2792 rareData.setClassList(ClassList::create(this));
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
3395 ensureElementRareData().setHasPendingResources(false); 3395 ensureElementRareData().setHasPendingResources(false);
3396 } 3396 }
3397 3397
3398 void Element::synchronizeStyleAttributeInternal() const 3398 void Element::synchronizeStyleAttributeInternal() const
3399 { 3399 {
3400 ASSERT(isStyledElement()); 3400 ASSERT(isStyledElement());
3401 ASSERT(elementData()); 3401 ASSERT(elementData());
3402 ASSERT(elementData()->m_styleAttributeIsDirty); 3402 ASSERT(elementData()->m_styleAttributeIsDirty);
3403 elementData()->m_styleAttributeIsDirty = false; 3403 elementData()->m_styleAttributeIsDirty = false;
3404 if (const StylePropertySet* inlineStyle = this->inlineStyle()) 3404 if (const StylePropertySet* inlineStyle = this->inlineStyle())
3405 const_cast<Element*>(this)->setSynchronizedLazyAttribute(styleAttr, inli neStyle->asText()); 3405 const_cast<Element*>(this)->setSynchronizedLazyAttribute(styleAttr, Atom icString(inlineStyle->asText()));
3406 } 3406 }
3407 3407
3408 CSSStyleDeclaration* Element::style() 3408 CSSStyleDeclaration* Element::style()
3409 { 3409 {
3410 if (!isStyledElement()) 3410 if (!isStyledElement())
3411 return 0; 3411 return 0;
3412 return ensureMutableInlineStyle()->ensureInlineCSSStyleDeclaration(this); 3412 return ensureMutableInlineStyle()->ensureInlineCSSStyleDeclaration(this);
3413 } 3413 }
3414 3414
3415 MutableStylePropertySet* Element::ensureMutableInlineStyle() 3415 MutableStylePropertySet* Element::ensureMutableInlineStyle()
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
3618 // Before doing so, we need to resolve issues in HTMLSelectElement::recalcLi stItems 3618 // Before doing so, we need to resolve issues in HTMLSelectElement::recalcLi stItems
3619 // and RenderMenuList::setText. See also https://bugs.webkit.org/show_bug.cg i?id=88405 3619 // and RenderMenuList::setText. See also https://bugs.webkit.org/show_bug.cg i?id=88405
3620 if (hasTagName(optionTag) || hasTagName(optgroupTag)) 3620 if (hasTagName(optionTag) || hasTagName(optgroupTag))
3621 return false; 3621 return false;
3622 if (FullscreenElementStack::isActiveFullScreenElement(this)) 3622 if (FullscreenElementStack::isActiveFullScreenElement(this))
3623 return false; 3623 return false;
3624 return true; 3624 return true;
3625 } 3625 }
3626 3626
3627 } // namespace WebCore 3627 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698