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

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

Issue 2536453002: Rename some functions about layout locations (Closed)
Patch Set: Rebase Created 4 years 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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 if (textBox->nextTextBox() && 318 if (textBox->nextTextBox() &&
319 textBox->nextTextBox()->start() > textBox->end() && text.length() && 319 textBox->nextTextBox()->start() > textBox->end() && text.length() &&
320 !text.right(1).containsOnlyWhitespace()) 320 !text.right(1).containsOnlyWhitespace())
321 plainTextBuilder.append(spaceCharacter); 321 plainTextBuilder.append(spaceCharacter);
322 } 322 }
323 return plainTextBuilder.toString(); 323 return plainTextBuilder.toString();
324 } 324 }
325 325
326 void LayoutText::absoluteRects(Vector<IntRect>& rects, 326 void LayoutText::absoluteRects(Vector<IntRect>& rects,
327 const LayoutPoint& accumulatedOffset) const { 327 const LayoutPoint& accumulatedOffset) const {
328 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) 328 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) {
329 rects.append(enclosingIntRect(LayoutRect( 329 rects.append(enclosingIntRect(LayoutRect(
330 LayoutPoint(accumulatedOffset) + box->topLeft(), box->size()))); 330 LayoutPoint(accumulatedOffset) + box->location(), box->size())));
331 }
331 } 332 }
332 333
333 static FloatRect localQuadForTextBox(InlineTextBox* box, 334 static FloatRect localQuadForTextBox(InlineTextBox* box,
334 unsigned start, 335 unsigned start,
335 unsigned end, 336 unsigned end,
336 bool useSelectionHeight) { 337 bool useSelectionHeight) {
337 unsigned realEnd = std::min(box->end() + 1, end); 338 unsigned realEnd = std::min(box->end() + 1, end);
338 LayoutRect r = box->localSelectionRect(start, realEnd); 339 LayoutRect r = box->localSelectionRect(start, realEnd);
339 if (r.height()) { 340 if (r.height()) {
340 if (!useSelectionHeight) { 341 if (!useSelectionHeight) {
(...skipping 1633 matching lines...) Expand 10 before | Expand all | Expand 10 after
1974 LayoutRect rect = LayoutRect( 1975 LayoutRect rect = LayoutRect(
1975 IntRect(firstRunX(), firstRunY(), linesBox.width(), linesBox.height())); 1976 IntRect(firstRunX(), firstRunY(), linesBox.width(), linesBox.height()));
1976 LayoutBlock* block = containingBlock(); 1977 LayoutBlock* block = containingBlock();
1977 if (block && hasTextBoxes()) 1978 if (block && hasTextBoxes())
1978 block->adjustChildDebugRect(rect); 1979 block->adjustChildDebugRect(rect);
1979 1980
1980 return rect; 1981 return rect;
1981 } 1982 }
1982 1983
1983 } // namespace blink 1984 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutInline.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutTreeAsText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698