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

Unified Diff: third_party/WebKit/Source/core/dom/StyleEngineContext.h

Issue 1903803002: Do not block painting for in-body CSS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed merge conflict Created 4 years, 7 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/StyleEngineContext.h
diff --git a/third_party/WebKit/Source/core/dom/StyleEngineContext.h b/third_party/WebKit/Source/core/dom/StyleEngineContext.h
new file mode 100644
index 0000000000000000000000000000000000000000..79188c24f87241008731758118c102d984ecab23
--- /dev/null
+++ b/third_party/WebKit/Source/core/dom/StyleEngineContext.h
@@ -0,0 +1,24 @@
+// Copyright (c) 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef StyleEngineContext_h
+#define StyleEngineContext_h
+
+#include "core/dom/Document.h"
+
+namespace blink {
+
+class StyleEngineContext {
+public:
+ StyleEngineContext() : m_addedPendingSheetBeforeBody(false) {}
+ ~StyleEngineContext() {}
+ bool addedPendingSheetBeforeBody() const { return m_addedPendingSheetBeforeBody; }
+ void addingPendingSheet(const Document& document) { m_addedPendingSheetBeforeBody = m_addedPendingSheetBeforeBody || !document.body(); }
+private:
+ bool m_addedPendingSheetBeforeBody : 1;
+};
+
+} // namespace blink
+
+#endif
« no previous file with comments | « third_party/WebKit/Source/core/dom/StyleEngine.cpp ('k') | third_party/WebKit/Source/core/html/HTMLLinkElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698