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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutText.cpp

Issue 1577433003: Statistics of LayoutBox rare data reasons Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: - Created 3 years, 9 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 * (C) 1999 Lars Knoll (knoll@kde.org) 2 * (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Dirk Mueller (mueller@kde.org) 3 * (C) 2000 Dirk Mueller (mueller@kde.org)
4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) 5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net)
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 m_text(std::move(str)), 162 m_text(std::move(str)),
163 m_firstTextBox(nullptr), 163 m_firstTextBox(nullptr),
164 m_lastTextBox(nullptr) { 164 m_lastTextBox(nullptr) {
165 ASSERT(m_text); 165 ASSERT(m_text);
166 DCHECK(!node || !node->isDocumentNode()); 166 DCHECK(!node || !node->isDocumentNode());
167 167
168 setIsText(); 168 setIsText();
169 169
170 if (node) 170 if (node)
171 frameView()->incrementVisuallyNonEmptyCharacterCount(m_text.length()); 171 frameView()->incrementVisuallyNonEmptyCharacterCount(m_text.length());
172 m_rareStat.addReason(ReasonLTAll);
172 } 173 }
173 174
174 #if DCHECK_IS_ON() 175 #if DCHECK_IS_ON()
175 176
176 LayoutText::~LayoutText() { 177 LayoutText::~LayoutText() {
177 ASSERT(!m_firstTextBox); 178 ASSERT(!m_firstTextBox);
178 ASSERT(!m_lastTextBox); 179 ASSERT(!m_lastTextBox);
179 } 180 }
180 181
181 #endif 182 #endif
(...skipping 1874 matching lines...) Expand 10 before | Expand all | Expand 10 after
2056 LayoutRect rect = LayoutRect( 2057 LayoutRect rect = LayoutRect(
2057 IntRect(firstRunX(), firstRunY(), linesBox.width(), linesBox.height())); 2058 IntRect(firstRunX(), firstRunY(), linesBox.width(), linesBox.height()));
2058 LayoutBlock* block = containingBlock(); 2059 LayoutBlock* block = containingBlock();
2059 if (block && hasTextBoxes()) 2060 if (block && hasTextBoxes())
2060 block->adjustChildDebugRect(rect); 2061 block->adjustChildDebugRect(rect);
2061 2062
2062 return rect; 2063 return rect;
2063 } 2064 }
2064 2065
2065 } // namespace blink 2066 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698