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

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 1707473002: Remove document.defaultCharset (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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 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 1089 matching lines...) Expand 10 before | Expand all | Expand 10 after
1100 } 1100 }
1101 1101
1102 AtomicString Document::encodingName() const 1102 AtomicString Document::encodingName() const
1103 { 1103 {
1104 // TextEncoding::name() returns a char*, no need to allocate a new 1104 // TextEncoding::name() returns a char*, no need to allocate a new
1105 // String for it each time. 1105 // String for it each time.
1106 // FIXME: We should fix TextEncoding to speak AtomicString anyway. 1106 // FIXME: We should fix TextEncoding to speak AtomicString anyway.
1107 return AtomicString(encoding().name()); 1107 return AtomicString(encoding().name());
1108 } 1108 }
1109 1109
1110 String Document::defaultCharset() const
1111 {
1112 if (Settings* settings = this->settings())
1113 return settings->defaultTextEncodingName();
1114 return String();
1115 }
1116
1117 void Document::setContentLanguage(const AtomicString& language) 1110 void Document::setContentLanguage(const AtomicString& language)
1118 { 1111 {
1119 if (m_contentLanguage == language) 1112 if (m_contentLanguage == language)
1120 return; 1113 return;
1121 m_contentLanguage = language; 1114 m_contentLanguage = language;
1122 1115
1123 // Document's style depends on the content language. 1116 // Document's style depends on the content language.
1124 setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create( StyleChangeReason::Language)); 1117 setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create( StyleChangeReason::Language));
1125 } 1118 }
1126 1119
(...skipping 4818 matching lines...) Expand 10 before | Expand all | Expand 10 after
5945 #ifndef NDEBUG 5938 #ifndef NDEBUG
5946 using namespace blink; 5939 using namespace blink;
5947 void showLiveDocumentInstances() 5940 void showLiveDocumentInstances()
5948 { 5941 {
5949 Document::WeakDocumentSet& set = Document::liveDocumentSet(); 5942 Document::WeakDocumentSet& set = Document::liveDocumentSet();
5950 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 5943 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
5951 for (Document* document : set) 5944 for (Document* document : set)
5952 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data()); 5945 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data());
5953 } 5946 }
5954 #endif 5947 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | third_party/WebKit/Source/core/dom/Document.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698