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

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.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 * 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 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 styleEngine().clearResolver(); 675 styleEngine().clearResolver();
676 } 676 }
677 677
678 DOMImplementation& Document::implementation() 678 DOMImplementation& Document::implementation()
679 { 679 {
680 if (!m_implementation) 680 if (!m_implementation)
681 m_implementation = DOMImplementation::create(*this); 681 m_implementation = DOMImplementation::create(*this);
682 return *m_implementation; 682 return *m_implementation;
683 } 683 }
684 684
685 DOMImplementation* Document::maybeImplementation() const
686 {
687 return m_implementation.get();
688 }
689
685 bool Document::hasAppCacheManifest() const 690 bool Document::hasAppCacheManifest() const
686 { 691 {
687 return isHTMLHtmlElement(documentElement()) && documentElement()->hasAttribu te(manifestAttr); 692 return isHTMLHtmlElement(documentElement()) && documentElement()->hasAttribu te(manifestAttr);
688 } 693 }
689 694
690 Location* Document::location() const 695 Location* Document::location() const
691 { 696 {
692 if (!frame()) 697 if (!frame())
693 return 0; 698 return 0;
694 699
(...skipping 2750 matching lines...) Expand 10 before | Expand all | Expand 10 after
3445 return true; 3450 return true;
3446 } 3451 }
3447 3452
3448 StyleSheetList* Document::styleSheets() 3453 StyleSheetList* Document::styleSheets()
3449 { 3454 {
3450 if (!m_styleSheetList) 3455 if (!m_styleSheetList)
3451 m_styleSheetList = StyleSheetList::create(this); 3456 m_styleSheetList = StyleSheetList::create(this);
3452 return m_styleSheetList.get(); 3457 return m_styleSheetList.get();
3453 } 3458 }
3454 3459
3460 StyleSheetList* Document::maybeStyleSheets() const
3461 {
3462 return m_styleSheetList;
3463 }
3464
3455 String Document::preferredStylesheetSet() const 3465 String Document::preferredStylesheetSet() const
3456 { 3466 {
3457 return m_styleEngine->preferredStylesheetSetName(); 3467 return m_styleEngine->preferredStylesheetSetName();
3458 } 3468 }
3459 3469
3460 String Document::selectedStylesheetSet() const 3470 String Document::selectedStylesheetSet() const
3461 { 3471 {
3462 return m_styleEngine->selectedStylesheetSetName(); 3472 return m_styleEngine->selectedStylesheetSetName();
3463 } 3473 }
3464 3474
(...skipping 2564 matching lines...) Expand 10 before | Expand all | Expand 10 after
6029 #ifndef NDEBUG 6039 #ifndef NDEBUG
6030 using namespace blink; 6040 using namespace blink;
6031 void showLiveDocumentInstances() 6041 void showLiveDocumentInstances()
6032 { 6042 {
6033 Document::WeakDocumentSet& set = Document::liveDocumentSet(); 6043 Document::WeakDocumentSet& set = Document::liveDocumentSet();
6034 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6044 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6035 for (Document* document : set) 6045 for (Document* document : set)
6036 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data()); 6046 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data());
6037 } 6047 }
6038 #endif 6048 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | third_party/WebKit/Source/core/dom/Element.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698