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

Side by Side Diff: Source/core/rendering/InlineBox.cpp

Issue 620753006: Rendering API cleanup (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address jchaffraix remarks Created 6 years, 2 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) 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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 { 310 {
311 if (!renderer().style()->isFlippedBlocksWritingMode()) 311 if (!renderer().style()->isFlippedBlocksWritingMode())
312 return FloatPoint(x(), y()); 312 return FloatPoint(x(), y());
313 RenderBlockFlow& block = root().block(); 313 RenderBlockFlow& block = root().block();
314 if (block.style()->isHorizontalWritingMode()) 314 if (block.style()->isHorizontalWritingMode())
315 return FloatPoint(x(), block.height() - height() - y()); 315 return FloatPoint(x(), block.height() - height() - y());
316 316
317 return FloatPoint(block.width() - width() - x(), y()); 317 return FloatPoint(block.width() - width() - x(), y());
318 } 318 }
319 319
320 void InlineBox::flipForWritingMode(FloatRect& rect)
321 {
322 if (!renderer().style()->isFlippedBlocksWritingMode())
323 return;
324 root().block().flipForWritingMode(rect);
325 }
326
327 FloatPoint InlineBox::flipForWritingMode(const FloatPoint& point) 320 FloatPoint InlineBox::flipForWritingMode(const FloatPoint& point)
328 { 321 {
329 if (!renderer().style()->isFlippedBlocksWritingMode()) 322 if (!renderer().style()->isFlippedBlocksWritingMode())
330 return point; 323 return point;
331 return root().block().flipForWritingMode(point); 324 return root().block().flipForWritingMode(point);
332 } 325 }
333 326
334 void InlineBox::flipForWritingMode(LayoutRect& rect) 327 void InlineBox::flipForWritingMode(LayoutRect& rect)
335 { 328 {
336 if (!renderer().style()->isFlippedBlocksWritingMode()) 329 if (!renderer().style()->isFlippedBlocksWritingMode())
(...skipping 18 matching lines...) Expand all
355 b->showTreeForThis(); 348 b->showTreeForThis();
356 } 349 }
357 350
358 void showLineTree(const blink::InlineBox* b) 351 void showLineTree(const blink::InlineBox* b)
359 { 352 {
360 if (b) 353 if (b)
361 b->showLineTreeForThis(); 354 b->showLineTreeForThis();
362 } 355 }
363 356
364 #endif 357 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698