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

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

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
« no previous file with comments | « third_party/WebKit/Source/core/dom/StyleElement.h ('k') | third_party/WebKit/Source/core/dom/StyleEngine.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/StyleElement.cpp
diff --git a/third_party/WebKit/Source/core/dom/StyleElement.cpp b/third_party/WebKit/Source/core/dom/StyleElement.cpp
index 247c28a978d7d40a52596a11b8f33646bcb2de35..269d5048f0d04d18b9afb8ec0efc4db4bf7d675f 100644
--- a/third_party/WebKit/Source/core/dom/StyleElement.cpp
+++ b/third_party/WebKit/Source/core/dom/StyleElement.cpp
@@ -146,7 +146,7 @@ void StyleElement::clearSheet(Element* ownerElement)
DCHECK(m_sheet);
if (ownerElement && m_sheet->isLoading())
- ownerElement->document().styleEngine().removePendingSheet(ownerElement);
+ ownerElement->document().styleEngine().removePendingSheet(ownerElement, m_styleEngineContext);
m_sheet.release()->clearOwnerNode();
}
@@ -191,7 +191,7 @@ StyleElement::ProcessingResult StyleElement::createSheet(Element* e, const Strin
if (screenEval.eval(mediaQueries) || printEval.eval(mediaQueries)) {
m_loading = true;
TextPosition startPosition = m_startPosition == TextPosition::belowRangePosition() ? TextPosition::minimumPosition() : m_startPosition;
- newSheet = document.styleEngine().createSheet(e, text, startPosition);
+ newSheet = document.styleEngine().createSheet(e, text, startPosition, m_styleEngineContext);
newSheet->setMediaQueries(mediaQueries);
m_loading = false;
}
@@ -219,13 +219,13 @@ bool StyleElement::sheetLoaded(Document& document)
if (isLoading())
return false;
- document.styleEngine().removePendingSheet(m_sheet->ownerNode());
+ document.styleEngine().removePendingSheet(m_sheet->ownerNode(), m_styleEngineContext);
return true;
}
void StyleElement::startLoadingDynamicSheet(Document& document)
{
- document.styleEngine().addPendingSheet();
+ document.styleEngine().addPendingSheet(m_styleEngineContext);
}
DEFINE_TRACE(StyleElement)
« no previous file with comments | « third_party/WebKit/Source/core/dom/StyleElement.h ('k') | third_party/WebKit/Source/core/dom/StyleEngine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698