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

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

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, 2009, 2010, 2011 Apple Inc. All r ights reserved. 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All r ights 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 // y() is the top side of the box in the containing block's coordinate syste m. 197 // y() is the top side of the box in the containing block's coordinate syste m.
198 void setY(float y) { m_topLeft.setY(y); } 198 void setY(float y) { m_topLeft.setY(y); }
199 float y() const { return m_topLeft.y(); } 199 float y() const { return m_topLeft.y(); }
200 float top() const { return m_topLeft.y(); } 200 float top() const { return m_topLeft.y(); }
201 201
202 const FloatPoint& topLeft() const { return m_topLeft; } 202 const FloatPoint& topLeft() const { return m_topLeft; }
203 203
204 float width() const { return isHorizontal() ? logicalWidth() : hasVirtualLog icalHeight() ? virtualLogicalHeight() : logicalHeight(); } 204 float width() const { return isHorizontal() ? logicalWidth() : hasVirtualLog icalHeight() ? virtualLogicalHeight() : logicalHeight(); }
205 float height() const { return isHorizontal() ? hasVirtualLogicalHeight() ? v irtualLogicalHeight() : logicalHeight() : logicalWidth(); } 205 float height() const { return isHorizontal() ? hasVirtualLogicalHeight() ? v irtualLogicalHeight() : logicalHeight() : logicalWidth(); }
206 FloatSize size() const { return FloatSize(width(), height()); } 206 FloatSize size() const { return FloatSize(width(), height()); }
207 float right() const { return left() + width(); }
208 float bottom() const { return top() + height(); }
Julien - ping for review 2014/10/03 01:26:42 I think we should keep these.
209 207
210 // The logicalLeft position is the left edge of the line box in a horizontal line and the top edge in a vertical line. 208 // The logicalLeft position is the left edge of the line box in a horizontal line and the top edge in a vertical line.
211 float logicalLeft() const { return isHorizontal() ? m_topLeft.x() : m_topLef t.y(); } 209 float logicalLeft() const { return isHorizontal() ? m_topLeft.x() : m_topLef t.y(); }
212 float logicalRight() const { return logicalLeft() + logicalWidth(); } 210 float logicalRight() const { return logicalLeft() + logicalWidth(); }
213 void setLogicalLeft(float left) 211 void setLogicalLeft(float left)
214 { 212 {
215 if (isHorizontal()) 213 if (isHorizontal())
216 setX(left); 214 setX(left);
217 else 215 else
218 setY(left); 216 setY(left);
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 278
281 // Use with caution! The type is not checked! 279 // Use with caution! The type is not checked!
282 RenderBoxModelObject* boxModelObject() const 280 RenderBoxModelObject* boxModelObject() const
283 { 281 {
284 if (!renderer().isText()) 282 if (!renderer().isText())
285 return toRenderBoxModelObject(&renderer()); 283 return toRenderBoxModelObject(&renderer());
286 return 0; 284 return 0;
287 } 285 }
288 286
289 FloatPoint locationIncludingFlipping(); 287 FloatPoint locationIncludingFlipping();
290 void flipForWritingMode(FloatRect&);
Julien - ping for review 2014/10/03 01:26:42 This is an inconsistency from my perspective as we
291 FloatPoint flipForWritingMode(const FloatPoint&); 288 FloatPoint flipForWritingMode(const FloatPoint&);
292 void flipForWritingMode(LayoutRect&); 289 void flipForWritingMode(LayoutRect&);
293 LayoutPoint flipForWritingMode(const LayoutPoint&); 290 LayoutPoint flipForWritingMode(const LayoutPoint&);
294 291
295 bool knownToHaveNoOverflow() const { return m_bitfields.knownToHaveNoOverflo w(); } 292 bool knownToHaveNoOverflow() const { return m_bitfields.knownToHaveNoOverflo w(); }
296 void clearKnownToHaveNoOverflow(); 293 void clearKnownToHaveNoOverflow();
297 294
298 bool dirOverride() const { return m_bitfields.dirOverride(); } 295 bool dirOverride() const { return m_bitfields.dirOverride(); }
299 void setDirOverride(bool dirOverride) { m_bitfields.setDirOverride(dirOverri de); } 296 void setDirOverride(bool dirOverride) { m_bitfields.setDirOverride(dirOverri de); }
300 297
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 432
436 } // namespace blink 433 } // namespace blink
437 434
438 #ifndef NDEBUG 435 #ifndef NDEBUG
439 // Outside the WebCore namespace for ease of invocation from gdb. 436 // Outside the WebCore namespace for ease of invocation from gdb.
440 void showTree(const blink::InlineBox*); 437 void showTree(const blink::InlineBox*);
441 void showLineTree(const blink::InlineBox*); 438 void showLineTree(const blink::InlineBox*);
442 #endif 439 #endif
443 440
444 #endif // InlineBox_h 441 #endif // InlineBox_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698