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

Side by Side Diff: sky/engine/core/dom/Document.cpp

Issue 814173005: The Sky parser should yield before start tags (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « sky/engine/core/dom/Document.h ('k') | sky/engine/core/dom/DocumentParser.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 Document::Document(const DocumentInit& initializer, DocumentClassFlags documentC lasses) 240 Document::Document(const DocumentInit& initializer, DocumentClassFlags documentC lasses)
241 : ContainerNode(0, CreateDocument) 241 : ContainerNode(0, CreateDocument)
242 , TreeScope(*this) 242 , TreeScope(*this)
243 , m_module(nullptr) 243 , m_module(nullptr)
244 , m_evaluateMediaQueriesOnStyleRecalc(false) 244 , m_evaluateMediaQueriesOnStyleRecalc(false)
245 , m_pendingSheetLayout(NoLayoutWithPendingSheets) 245 , m_pendingSheetLayout(NoLayoutWithPendingSheets)
246 , m_frame(initializer.frame()) 246 , m_frame(initializer.frame())
247 , m_domWindow(m_frame ? m_frame->domWindow() : 0) 247 , m_domWindow(m_frame ? m_frame->domWindow() : 0)
248 , m_importsController(initializer.importsController()) 248 , m_importsController(initializer.importsController())
249 , m_activeParserCount(0) 249 , m_activeParserCount(0)
250 , m_executeScriptsWaitingForResourcesTimer(this, &Document::executeScriptsWa itingForResourcesTimerFired) 250 , m_resumeParserWaitingForResourcesTimer(this, &Document::resumeParserWaitin gForResourcesTimerFired)
251 , m_clearFocusedElementTimer(this, &Document::clearFocusedElementTimerFired) 251 , m_clearFocusedElementTimer(this, &Document::clearFocusedElementTimerFired)
252 , m_listenerTypes(0) 252 , m_listenerTypes(0)
253 , m_mutationObserverTypes(0) 253 , m_mutationObserverTypes(0)
254 , m_readyState(Complete) 254 , m_readyState(Complete)
255 , m_isParsing(false) 255 , m_isParsing(false)
256 , m_containsValidityStyleRules(false) 256 , m_containsValidityStyleRules(false)
257 , m_markers(adoptPtr(new DocumentMarkerController)) 257 , m_markers(adoptPtr(new DocumentMarkerController))
258 , m_loadEventProgress(LoadEventNotRun) 258 , m_loadEventProgress(LoadEventNotRun)
259 , m_startTime(currentTime()) 259 , m_startTime(currentTime())
260 , m_documentClasses(documentClasses) 260 , m_documentClasses(documentClasses)
(...skipping 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after
1519 m_baseURL = m_url; 1519 m_baseURL = m_url;
1520 1520
1521 if (!m_baseURL.isValid()) 1521 if (!m_baseURL.isValid())
1522 m_baseURL = KURL(); 1522 m_baseURL = KURL();
1523 } 1523 }
1524 1524
1525 void Document::didLoadAllImports() 1525 void Document::didLoadAllImports()
1526 { 1526 {
1527 if (!importLoader()) 1527 if (!importLoader())
1528 styleResolverChanged(); 1528 styleResolverChanged();
1529 didLoadAllScriptBlockingResources(); 1529 didLoadAllParserBlockingResources();
1530 } 1530 }
1531 1531
1532 void Document::didRemoveAllPendingStylesheet() 1532 void Document::didRemoveAllPendingStylesheet()
1533 { 1533 {
1534 styleResolverChanged(); 1534 styleResolverChanged();
1535 1535
1536 // Only imports on master documents can trigger rendering. 1536 // Only imports on master documents can trigger rendering.
1537 if (HTMLImportLoader* import = importLoader()) 1537 if (HTMLImportLoader* import = importLoader())
1538 import->didRemoveAllPendingStylesheet(); 1538 import->didRemoveAllPendingStylesheet();
1539 if (!haveImportsLoaded()) 1539 if (!haveImportsLoaded())
1540 return; 1540 return;
1541 didLoadAllScriptBlockingResources(); 1541 didLoadAllParserBlockingResources();
1542 } 1542 }
1543 1543
1544 void Document::didLoadAllScriptBlockingResources() 1544 void Document::didLoadAllParserBlockingResources()
1545 { 1545 {
1546 m_executeScriptsWaitingForResourcesTimer.startOneShot(0, FROM_HERE); 1546 m_resumeParserWaitingForResourcesTimer.startOneShot(0, FROM_HERE);
1547 } 1547 }
1548 1548
1549 void Document::executeScriptsWaitingForResourcesTimerFired(Timer<Document>*) 1549 void Document::resumeParserWaitingForResourcesTimerFired(Timer<Document>*)
1550 { 1550 {
1551 if (!isRenderingReady()) 1551 if (!isRenderingReady())
1552 return; 1552 return;
1553 if (m_parser) 1553 if (m_parser)
1554 m_parser->executeScriptsWaitingForResources(); 1554 m_parser->resumeAfterWaitingForImports();
1555 } 1555 }
1556 1556
1557 TextPosition Document::parserPosition() const 1557 TextPosition Document::parserPosition() const
1558 { 1558 {
1559 if (m_parser) 1559 if (m_parser)
1560 m_parser->textPosition(); 1560 m_parser->textPosition();
1561 return TextPosition::belowRangePosition(); 1561 return TextPosition::belowRangePosition();
1562 } 1562 }
1563 1563
1564 CSSStyleSheet& Document::elementSheet() 1564 CSSStyleSheet& Document::elementSheet()
(...skipping 1147 matching lines...) Expand 10 before | Expand all | Expand 10 after
2712 using namespace blink; 2712 using namespace blink;
2713 void showLiveDocumentInstances() 2713 void showLiveDocumentInstances()
2714 { 2714 {
2715 WeakDocumentSet& set = liveDocumentSet(); 2715 WeakDocumentSet& set = liveDocumentSet();
2716 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 2716 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
2717 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it ) { 2717 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it ) {
2718 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut f8().data()); 2718 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut f8().data());
2719 } 2719 }
2720 } 2720 }
2721 #endif 2721 #endif
OLDNEW
« no previous file with comments | « sky/engine/core/dom/Document.h ('k') | sky/engine/core/dom/DocumentParser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698