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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSStyleSheet.cpp

Issue 1876843002: Introduce few const getters for dom classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2006, 2007, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2006, 2007, 2012 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 364
365 CSSRuleList* CSSStyleSheet::cssRules() 365 CSSRuleList* CSSStyleSheet::cssRules()
366 { 366 {
367 if (!canAccessRules()) 367 if (!canAccessRules())
368 return nullptr; 368 return nullptr;
369 if (!m_ruleListCSSOMWrapper) 369 if (!m_ruleListCSSOMWrapper)
370 m_ruleListCSSOMWrapper = StyleSheetCSSRuleList::create(this); 370 m_ruleListCSSOMWrapper = StyleSheetCSSRuleList::create(this);
371 return m_ruleListCSSOMWrapper.get(); 371 return m_ruleListCSSOMWrapper.get();
372 } 372 }
373 373
374 CSSRuleList* CSSStyleSheet::maybeCssRules() const
375 {
376 return m_ruleListCSSOMWrapper.get();
377 }
378
374 String CSSStyleSheet::href() const 379 String CSSStyleSheet::href() const
375 { 380 {
376 return m_contents->originalURL(); 381 return m_contents->originalURL();
377 } 382 }
378 383
379 KURL CSSStyleSheet::baseURL() const 384 KURL CSSStyleSheet::baseURL() const
380 { 385 {
381 return m_contents->baseURL(); 386 return m_contents->baseURL();
382 } 387 }
383 388
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 visitor->trace(m_mediaQueries); 460 visitor->trace(m_mediaQueries);
456 visitor->trace(m_ownerNode); 461 visitor->trace(m_ownerNode);
457 visitor->trace(m_ownerRule); 462 visitor->trace(m_ownerRule);
458 visitor->trace(m_mediaCSSOMWrapper); 463 visitor->trace(m_mediaCSSOMWrapper);
459 visitor->trace(m_childRuleCSSOMWrappers); 464 visitor->trace(m_childRuleCSSOMWrappers);
460 visitor->trace(m_ruleListCSSOMWrapper); 465 visitor->trace(m_ruleListCSSOMWrapper);
461 StyleSheet::trace(visitor); 466 StyleSheet::trace(visitor);
462 } 467 }
463 468
464 } // namespace blink 469 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSStyleSheet.h ('k') | third_party/WebKit/Source/core/css/StyleSheetList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698