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

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2034363002: Update document marker rects lazily in frame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test Created 4 years, 6 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
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 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 , m_mutationObserverTypes(0) 421 , m_mutationObserverTypes(0)
422 , m_visitedLinkState(VisitedLinkState::create(*this)) 422 , m_visitedLinkState(VisitedLinkState::create(*this))
423 , m_visuallyOrdered(false) 423 , m_visuallyOrdered(false)
424 , m_readyState(Complete) 424 , m_readyState(Complete)
425 , m_parsingState(FinishedParsing) 425 , m_parsingState(FinishedParsing)
426 , m_gotoAnchorNeededAfterStylesheetsLoad(false) 426 , m_gotoAnchorNeededAfterStylesheetsLoad(false)
427 , m_containsValidityStyleRules(false) 427 , m_containsValidityStyleRules(false)
428 , m_containsPlugins(false) 428 , m_containsPlugins(false)
429 , m_updateFocusAppearanceSelectionBahavior(SelectionBehaviorOnFocus::Reset) 429 , m_updateFocusAppearanceSelectionBahavior(SelectionBehaviorOnFocus::Reset)
430 , m_ignoreDestructiveWriteCount(0) 430 , m_ignoreDestructiveWriteCount(0)
431 , m_markers(new DocumentMarkerController) 431 , m_markers(new DocumentMarkerController(*this))
432 , m_updateFocusAppearanceTimer(this, &Document::updateFocusAppearanceTimerFi red) 432 , m_updateFocusAppearanceTimer(this, &Document::updateFocusAppearanceTimerFi red)
433 , m_cssTarget(nullptr) 433 , m_cssTarget(nullptr)
434 , m_loadEventProgress(LoadEventNotRun) 434 , m_loadEventProgress(LoadEventNotRun)
435 , m_startTime(currentTime()) 435 , m_startTime(currentTime())
436 , m_scriptRunner(ScriptRunner::create(this)) 436 , m_scriptRunner(ScriptRunner::create(this))
437 , m_xmlVersion("1.0") 437 , m_xmlVersion("1.0")
438 , m_xmlStandalone(StandaloneUnspecified) 438 , m_xmlStandalone(StandaloneUnspecified)
439 , m_hasXMLDeclaration(0) 439 , m_hasXMLDeclaration(0)
440 , m_designMode(false) 440 , m_designMode(false)
441 , m_isRunningExecCommand(false) 441 , m_isRunningExecCommand(false)
(...skipping 1450 matching lines...) Expand 10 before | Expand all | Expand 10 after
1892 } 1892 }
1893 1893
1894 void Document::layoutUpdated() 1894 void Document::layoutUpdated()
1895 { 1895 {
1896 // Plugins can run script inside layout which can detach the page. 1896 // Plugins can run script inside layout which can detach the page.
1897 // TODO(esprehn): Can this still happen now that all plugins are out of 1897 // TODO(esprehn): Can this still happen now that all plugins are out of
1898 // process? 1898 // process?
1899 if (frame() && frame()->page()) 1899 if (frame() && frame()->page())
1900 frame()->page()->chromeClient().layoutUpdated(frame()); 1900 frame()->page()->chromeClient().layoutUpdated(frame());
1901 1901
1902 markers().updateRenderedRectsForMarkers(); 1902 markers().invalidateRectsForAllMarkers();
1903 1903
1904 // The layout system may perform layouts with pending stylesheets. When 1904 // The layout system may perform layouts with pending stylesheets. When
1905 // recording first layout time, we ignore these layouts, since painting is 1905 // recording first layout time, we ignore these layouts, since painting is
1906 // suppressed for them. We're interested in tracking the time of the 1906 // suppressed for them. We're interested in tracking the time of the
1907 // first real or 'paintable' layout. 1907 // first real or 'paintable' layout.
1908 // TODO(esprehn): This doesn't really make sense, why not track the first 1908 // TODO(esprehn): This doesn't really make sense, why not track the first
1909 // beginFrame? This will catch the first layout in a page that does lots 1909 // beginFrame? This will catch the first layout in a page that does lots
1910 // of layout thrashing even though that layout might not be followed by 1910 // of layout thrashing even though that layout might not be followed by
1911 // a paint for many seconds. 1911 // a paint for many seconds.
1912 if (isRenderingReady() && body() && !styleEngine().hasPendingScriptBlockingS heets()) { 1912 if (isRenderingReady() && body() && !styleEngine().hasPendingScriptBlockingS heets()) {
(...skipping 4084 matching lines...) Expand 10 before | Expand all | Expand 10 after
5997 #ifndef NDEBUG 5997 #ifndef NDEBUG
5998 using namespace blink; 5998 using namespace blink;
5999 void showLiveDocumentInstances() 5999 void showLiveDocumentInstances()
6000 { 6000 {
6001 WeakDocumentSet& set = liveDocumentSet(); 6001 WeakDocumentSet& set = liveDocumentSet();
6002 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6002 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6003 for (Document* document : set) 6003 for (Document* document : set)
6004 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data()); 6004 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data());
6005 } 6005 }
6006 #endif 6006 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698