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

Side by Side Diff: Source/core/layout/line/InlineBox.cpp

Issue 1261653002: Move SelectionState out of LayoutObject and into Line Layout API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 2 legit 5ever Created 5 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/line/InlineBox.h ('k') | Source/core/layout/line/InlineFlowBox.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 InlineBox* leaf = nextLeafChild(); 287 InlineBox* leaf = nextLeafChild();
288 return (leaf && leaf->isLineBreak()) ? nullptr : leaf; 288 return (leaf && leaf->isLineBreak()) ? nullptr : leaf;
289 } 289 }
290 290
291 InlineBox* InlineBox::prevLeafChildIgnoringLineBreak() const 291 InlineBox* InlineBox::prevLeafChildIgnoringLineBreak() const
292 { 292 {
293 InlineBox* leaf = prevLeafChild(); 293 InlineBox* leaf = prevLeafChild();
294 return (leaf && leaf->isLineBreak()) ? nullptr : leaf; 294 return (leaf && leaf->isLineBreak()) ? nullptr : leaf;
295 } 295 }
296 296
297 LayoutObject::SelectionState InlineBox::selectionState() const 297 SelectionState InlineBox::selectionState() const
298 { 298 {
299 return layoutObject().selectionState(); 299 return layoutObject().selectionState();
300 } 300 }
301 301
302 bool InlineBox::canAccommodateEllipsis(bool ltr, int blockEdge, int ellipsisWidt h) const 302 bool InlineBox::canAccommodateEllipsis(bool ltr, int blockEdge, int ellipsisWidt h) const
303 { 303 {
304 // Non-replaced elements can always accommodate an ellipsis. 304 // Non-replaced elements can always accommodate an ellipsis.
305 if (!layoutObject().isReplaced()) 305 if (!layoutObject().isReplaced())
306 return true; 306 return true;
307 307
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 395
396 void showLineTree(const blink::InlineBox* b) 396 void showLineTree(const blink::InlineBox* b)
397 { 397 {
398 if (b) 398 if (b)
399 b->showLineTreeForThis(); 399 b->showLineTreeForThis();
400 else 400 else
401 fprintf(stderr, "Cannot showLineTree for (nil) InlineBox.\n"); 401 fprintf(stderr, "Cannot showLineTree for (nil) InlineBox.\n");
402 } 402 }
403 403
404 #endif 404 #endif
OLDNEW
« no previous file with comments | « Source/core/layout/line/InlineBox.h ('k') | Source/core/layout/line/InlineFlowBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698