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

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

Issue 1456883002: Move paint-related timings out of DocumentTiming (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 1935 matching lines...) Expand 10 before | Expand all | Expand 10 after
1946 // TODO(esprehn): This doesn't really make sense, why not track the first 1946 // TODO(esprehn): This doesn't really make sense, why not track the first
1947 // beginFrame? This will catch the first layout in a page that does lots 1947 // beginFrame? This will catch the first layout in a page that does lots
1948 // of layout thrashing even though that layout might not be followed by 1948 // of layout thrashing even though that layout might not be followed by
1949 // a paint for many seconds. 1949 // a paint for many seconds.
1950 if (isRenderingReady() && body() && !styleEngine().hasPendingSheets()) { 1950 if (isRenderingReady() && body() && !styleEngine().hasPendingSheets()) {
1951 if (!m_documentTiming.firstLayout()) 1951 if (!m_documentTiming.firstLayout())
1952 m_documentTiming.markFirstLayout(); 1952 m_documentTiming.markFirstLayout();
1953 } 1953 }
1954 } 1954 }
1955 1955
1956 void Document::markFirstPaint()
1957 {
1958 if (m_documentTiming.firstPaint() == 0)
1959 m_documentTiming.markFirstPaint();
1960 }
1961
1962 void Document::markFirstTextPaint()
1963 {
1964 if (m_documentTiming.firstTextPaint() == 0)
1965 m_documentTiming.markFirstTextPaint();
1966 }
1967
1968 void Document::markFirstImagePaint()
1969 {
1970 if (m_documentTiming.firstImagePaint() == 0)
1971 m_documentTiming.markFirstImagePaint();
1972 }
1973
1974 void Document::setNeedsFocusedElementCheck() 1956 void Document::setNeedsFocusedElementCheck()
1975 { 1957 {
1976 setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::createWit hExtraData(StyleChangeReason::PseudoClass, StyleChangeExtraData::Focus)); 1958 setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::createWit hExtraData(StyleChangeReason::PseudoClass, StyleChangeExtraData::Focus));
1977 } 1959 }
1978 1960
1979 void Document::clearFocusedElementSoon() 1961 void Document::clearFocusedElementSoon()
1980 { 1962 {
1981 if (!m_clearFocusedElementTimer.isActive()) 1963 if (!m_clearFocusedElementTimer.isActive())
1982 m_clearFocusedElementTimer.startOneShot(0, BLINK_FROM_HERE); 1964 m_clearFocusedElementTimer.startOneShot(0, BLINK_FROM_HERE);
1983 } 1965 }
(...skipping 3860 matching lines...) Expand 10 before | Expand all | Expand 10 after
5844 #ifndef NDEBUG 5826 #ifndef NDEBUG
5845 using namespace blink; 5827 using namespace blink;
5846 void showLiveDocumentInstances() 5828 void showLiveDocumentInstances()
5847 { 5829 {
5848 Document::WeakDocumentSet& set = Document::liveDocumentSet(); 5830 Document::WeakDocumentSet& set = Document::liveDocumentSet();
5849 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 5831 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
5850 for (Document* document : set) 5832 for (Document* document : set)
5851 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data()); 5833 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data());
5852 } 5834 }
5853 #endif 5835 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | third_party/WebKit/Source/core/dom/DocumentTiming.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698