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

Unified Diff: sky/engine/core/dom/Document.cpp

Issue 834693007: Remove the remaining parts of ignorePendingStylesheets and placeholder styles. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Remove comment. Created 5 years, 11 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 | « sky/engine/core/dom/Document.h ('k') | sky/engine/core/dom/Element.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/dom/Document.cpp
diff --git a/sky/engine/core/dom/Document.cpp b/sky/engine/core/dom/Document.cpp
index 07fad49696dbe448113f4223ab7d8139f9ce29d1..6ce6ac4d34b93fe7431f6810422eba147f776b69 100644
--- a/sky/engine/core/dom/Document.cpp
+++ b/sky/engine/core/dom/Document.cpp
@@ -241,7 +241,6 @@ Document::Document(const DocumentInit& initializer, DocumentClassFlags documentC
: ContainerNode(0, CreateDocument)
, TreeScope(*this)
, m_module(nullptr)
- , m_hasNodesWithPlaceholderStyle(false)
, m_evaluateMediaQueriesOnStyleRecalc(false)
, m_pendingSheetLayout(NoLayoutWithPendingSheets)
, m_frame(initializer.frame())
@@ -1078,7 +1077,6 @@ void Document::updateStyle(StyleRecalcChange change)
// mac when accessing the resolver by what appears to be a viewport size difference.
if (change == Force) {
- m_hasNodesWithPlaceholderStyle = false;
RefPtr<RenderStyle> documentStyle = StyleResolver::styleForDocument(*this);
StyleRecalcChange localChange = RenderStyle::stylePropagationDiff(documentStyle.get(), renderView()->style());
if (localChange != NoChange)
@@ -1175,27 +1173,6 @@ void Document::clearFocusedElementTimerFired(Timer<Document>*)
m_focusedElement->blur();
}
-// FIXME: This is a bad idea and needs to be removed eventually.
-// Other browsers load stylesheets before they continue parsing the web page.
-// Since we don't, we can run JavaScript code that needs answers before the
-// stylesheets are loaded. Doing a layout ignoring the pending stylesheets
-// lets us get reasonable answers. The long term solution to this problem is
-// to instead suspend JavaScript execution.
-void Document::updateLayoutIgnorePendingStylesheets(Document::RunPostLayoutTasks runPostLayoutTasks)
-{
- StyleEngine::IgnoringPendingStylesheet ignoring(m_styleEngine.get());
- updateLayout();
- if (runPostLayoutTasks == RunPostLayoutTasksSynchronously && view())
- view()->flushAnyPendingPostLayoutTasks();
-}
-
-PassRefPtr<RenderStyle> Document::styleForElementIgnoringPendingStylesheets(Element* element)
-{
- ASSERT_ARG(element, element->document() == this);
- StyleEngine::IgnoringPendingStylesheet ignoring(m_styleEngine.get());
- return ensureStyleResolver().styleForElement(element, element->parentNode() ? element->parentNode()->computedStyle() : 0);
-}
-
StyleResolver* Document::styleResolver() const
{
if (!isActive())
« no previous file with comments | « sky/engine/core/dom/Document.h ('k') | sky/engine/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698