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

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

Issue 33013004: Have Document::mediaQueryMatcher() / Document::selectorQueryCache() return references (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 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
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/dom/Node.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2588 matching lines...) Expand 10 before | Expand all | Expand 10 after
2599 return 0; 2599 return 0;
2600 } 2600 }
2601 2601
2602 bool Element::webkitMatchesSelector(const String& selector, ExceptionState& es) 2602 bool Element::webkitMatchesSelector(const String& selector, ExceptionState& es)
2603 { 2603 {
2604 if (selector.isEmpty()) { 2604 if (selector.isEmpty()) {
2605 es.throwUninformativeAndGenericDOMException(SyntaxError); 2605 es.throwUninformativeAndGenericDOMException(SyntaxError);
2606 return false; 2606 return false;
2607 } 2607 }
2608 2608
2609 SelectorQuery* selectorQuery = document().selectorQueryCache()->add(selector , document(), es); 2609 SelectorQuery* selectorQuery = document().selectorQueryCache().add(selector, document(), es);
2610 if (!selectorQuery) 2610 if (!selectorQuery)
2611 return false; 2611 return false;
2612 return selectorQuery->matches(this); 2612 return selectorQuery->matches(this);
2613 } 2613 }
2614 2614
2615 DOMTokenList* Element::classList() 2615 DOMTokenList* Element::classList()
2616 { 2616 {
2617 ElementRareData& rareData = ensureElementRareData(); 2617 ElementRareData& rareData = ensureElementRareData();
2618 if (!rareData.classList()) 2618 if (!rareData.classList())
2619 rareData.setClassList(ClassList::create(this)); 2619 rareData.setClassList(ClassList::create(this));
(...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after
3427 // Before doing so, we need to resolve issues in HTMLSelectElement::recalcLi stItems 3427 // Before doing so, we need to resolve issues in HTMLSelectElement::recalcLi stItems
3428 // and RenderMenuList::setText. See also https://bugs.webkit.org/show_bug.cg i?id=88405 3428 // and RenderMenuList::setText. See also https://bugs.webkit.org/show_bug.cg i?id=88405
3429 if (hasTagName(optionTag) || hasTagName(optgroupTag)) 3429 if (hasTagName(optionTag) || hasTagName(optgroupTag))
3430 return false; 3430 return false;
3431 if (FullscreenElementStack::isActiveFullScreenElement(this)) 3431 if (FullscreenElementStack::isActiveFullScreenElement(this))
3432 return false; 3432 return false;
3433 return true; 3433 return true;
3434 } 3434 }
3435 3435
3436 } // namespace WebCore 3436 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698