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

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

Issue 2280153002: Refactoring out the code in LayoutTreeAsText::writeLayoutObject. (Closed)
Patch Set: Revert to Original Impl Created 4 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 * (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 13 matching lines...) Expand all
24 24
25 #include "core/layout/LayoutText.h" 25 #include "core/layout/LayoutText.h"
26 26
27 #include "core/dom/AXObjectCache.h" 27 #include "core/dom/AXObjectCache.h"
28 #include "core/dom/Text.h" 28 #include "core/dom/Text.h"
29 #include "core/editing/VisiblePosition.h" 29 #include "core/editing/VisiblePosition.h"
30 #include "core/editing/iterators/TextIterator.h" 30 #include "core/editing/iterators/TextIterator.h"
31 #include "core/frame/FrameView.h" 31 #include "core/frame/FrameView.h"
32 #include "core/frame/Settings.h" 32 #include "core/frame/Settings.h"
33 #include "core/layout/LayoutBlock.h" 33 #include "core/layout/LayoutBlock.h"
34 #include "core/layout/LayoutTableCell.h"
34 #include "core/layout/LayoutTextCombine.h" 35 #include "core/layout/LayoutTextCombine.h"
35 #include "core/layout/LayoutView.h" 36 #include "core/layout/LayoutView.h"
36 #include "core/layout/api/LineLayoutBox.h" 37 #include "core/layout/api/LineLayoutBox.h"
37 #include "core/layout/line/AbstractInlineTextBox.h" 38 #include "core/layout/line/AbstractInlineTextBox.h"
38 #include "core/layout/line/EllipsisBox.h" 39 #include "core/layout/line/EllipsisBox.h"
39 #include "core/layout/line/GlyphOverflow.h" 40 #include "core/layout/line/GlyphOverflow.h"
40 #include "core/layout/line/InlineTextBox.h" 41 #include "core/layout/line/InlineTextBox.h"
41 #include "platform/fonts/CharacterRange.h" 42 #include "platform/fonts/CharacterRange.h"
42 #include "platform/geometry/FloatQuad.h" 43 #include "platform/geometry/FloatQuad.h"
43 #include "platform/text/BidiResolver.h" 44 #include "platform/text/BidiResolver.h"
(...skipping 1722 matching lines...) Expand 10 before | Expand all | Expand 10 after
1766 1767
1767 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) { 1768 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) {
1768 paintInvalidator.invalidateDisplayItemClient(*box, invalidationReason); 1769 paintInvalidator.invalidateDisplayItemClient(*box, invalidationReason);
1769 if (box->truncation() != cNoTruncation) { 1770 if (box->truncation() != cNoTruncation) {
1770 if (EllipsisBox* ellipsisBox = box->root().ellipsisBox()) 1771 if (EllipsisBox* ellipsisBox = box->root().ellipsisBox())
1771 paintInvalidator.invalidateDisplayItemClient(*ellipsisBox, inval idationReason); 1772 paintInvalidator.invalidateDisplayItemClient(*ellipsisBox, inval idationReason);
1772 } 1773 }
1773 } 1774 }
1774 } 1775 }
1775 1776
1777 // TODO(lunalu): Would be better to dump the bounding box x and y rather than
1778 // the first run's x and y, but that would involve updating many test results.
1779 LayoutRect LayoutText::debugRect() const
1780 {
1781 IntRect linesBox = enclosingIntRect(linesBoundingBox());
1782 LayoutRect rect =
1783 LayoutRect(IntRect(firstRunX(), firstRunY(), linesBox.width(), linesBox. height()));
1784 LayoutBlock* block = containingBlock();
1785 if (block && hasTextBoxes())
1786 block->adjustChildDebugRect(rect);
1787
1788 return rect;
1789 }
1790
1776 } // namespace blink 1791 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698