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

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

Issue 1314843009: Add DocumentTiming metrics for "time to first text paint" (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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 1897 matching lines...) Expand 10 before | Expand all | Expand 10 after
1908 // The layout system may perform layouts with pending stylesheets. When 1908 // The layout system may perform layouts with pending stylesheets. When
1909 // recording first layout time, we ignore these layouts, since painting is 1909 // recording first layout time, we ignore these layouts, since painting is
1910 // suppressed for them. We're interested in tracking the time of the 1910 // suppressed for them. We're interested in tracking the time of the
1911 // first real or 'paintable' layout. 1911 // first real or 'paintable' layout.
1912 if (isRenderingReady() && body() && !styleEngine().hasPendingSheets()) { 1912 if (isRenderingReady() && body() && !styleEngine().hasPendingSheets()) {
1913 if (!m_documentTiming.firstLayout()) 1913 if (!m_documentTiming.firstLayout())
1914 m_documentTiming.markFirstLayout(); 1914 m_documentTiming.markFirstLayout();
1915 } 1915 }
1916 } 1916 }
1917 1917
1918 void Document::markFirstCustomFontText()
1919 {
1920 if (!m_documentTiming.firstCustomFontText())
1921 m_documentTiming.markFirstCustomFontText();
1922 }
1923
1924 void Document::markFirstNonBlankText()
1925 {
1926 if (!m_documentTiming.firstNonBlankText())
1927 m_documentTiming.markFirstNonBlankText();
1928 }
kinuko 2015/09/15 05:25:08 (If we start to feel these are too annoying let's
1929
1918 void Document::setNeedsFocusedElementCheck() 1930 void Document::setNeedsFocusedElementCheck()
1919 { 1931 {
1920 setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::createWit hExtraData(StyleChangeReason::PseudoClass, StyleChangeExtraData::Focus)); 1932 setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::createWit hExtraData(StyleChangeReason::PseudoClass, StyleChangeExtraData::Focus));
1921 } 1933 }
1922 1934
1923 void Document::clearFocusedElementSoon() 1935 void Document::clearFocusedElementSoon()
1924 { 1936 {
1925 if (!m_clearFocusedElementTimer.isActive()) 1937 if (!m_clearFocusedElementTimer.isActive())
1926 m_clearFocusedElementTimer.startOneShot(0, FROM_HERE); 1938 m_clearFocusedElementTimer.startOneShot(0, FROM_HERE);
1927 } 1939 }
(...skipping 3808 matching lines...) Expand 10 before | Expand all | Expand 10 after
5736 #ifndef NDEBUG 5748 #ifndef NDEBUG
5737 using namespace blink; 5749 using namespace blink;
5738 void showLiveDocumentInstances() 5750 void showLiveDocumentInstances()
5739 { 5751 {
5740 Document::WeakDocumentSet& set = Document::liveDocumentSet(); 5752 Document::WeakDocumentSet& set = Document::liveDocumentSet();
5741 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 5753 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
5742 for (Document* document : set) 5754 for (Document* document : set)
5743 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data()); 5755 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data());
5744 } 5756 }
5745 #endif 5757 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698