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

Unified Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2336693002: Rendering text to a canvas in a frame-less document. (Closed)
Patch Set: Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index 19a0e0def294cb5053921d7d5bb703e3e5fb2cef..9b3ad5b445ef9a79a18fcb8050bcbda00b180c03 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -472,6 +472,7 @@ Document::Document(const DocumentInit& initializer, DocumentClassFlags documentC
, m_parserSyncPolicy(AllowAsynchronousParsing)
, m_nodeCount(0)
, m_visibilityWasLogged(false)
+ , m_settings(Settings::create())
Justin Novosad 2016/09/12 18:44:59 This should be lazily allocated in settings() inst
zakerinasab 2016/09/12 19:47:33 Done.
{
if (m_frame) {
DCHECK(m_frame->page());
@@ -1422,7 +1423,9 @@ FrameHost* Document::frameHost() const
Settings* Document::settings() const
{
- return m_frame ? m_frame->settings() : nullptr;
+ if (m_frame)
+ return m_frame->settings();
+ return m_settings.get();
}
Range* Document::createRange()

Powered by Google App Engine
This is Rietveld 408576698