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

Side by Side Diff: sky/engine/core/rendering/RenderBox.h

Issue 715053004: Make paddingBoxRect less dumb. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved. 4 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 void setLocation(const LayoutPoint& location) { m_frameRect.setLocation(loca tion); } 155 void setLocation(const LayoutPoint& location) { m_frameRect.setLocation(loca tion); }
156 156
157 void setSize(const LayoutSize& size) { m_frameRect.setSize(size); } 157 void setSize(const LayoutSize& size) { m_frameRect.setSize(size); }
158 void move(LayoutUnit dx, LayoutUnit dy) { m_frameRect.move(dx, dy); } 158 void move(LayoutUnit dx, LayoutUnit dy) { m_frameRect.move(dx, dy); }
159 159
160 LayoutRect frameRect() const { return m_frameRect; } 160 LayoutRect frameRect() const { return m_frameRect; }
161 IntRect pixelSnappedFrameRect() const { return pixelSnappedIntRect(m_frameRe ct); } 161 IntRect pixelSnappedFrameRect() const { return pixelSnappedIntRect(m_frameRe ct); }
162 void setFrameRect(const LayoutRect& rect) { m_frameRect = rect; } 162 void setFrameRect(const LayoutRect& rect) { m_frameRect = rect; }
163 163
164 LayoutRect borderBoxRect() const { return LayoutRect(LayoutPoint(), size()); } 164 LayoutRect borderBoxRect() const { return LayoutRect(LayoutPoint(), size()); }
165 LayoutRect paddingBoxRect() const { return LayoutRect(borderLeft(), borderTo p(), contentWidth() + paddingLeft() + paddingRight(), contentHeight() + paddingT op() + paddingBottom()); } 165 LayoutRect paddingBoxRect() const { return LayoutRect(borderLeft(), borderTo p(), clientWidth(), clientHeight()); }
166 IntRect pixelSnappedBorderBoxRect() const { return IntRect(IntPoint(), m_fra meRect.pixelSnappedSize()); } 166 IntRect pixelSnappedBorderBoxRect() const { return IntRect(IntPoint(), m_fra meRect.pixelSnappedSize()); }
167 virtual IntRect borderBoundingBox() const override final { return pixelSnapp edBorderBoxRect(); } 167 virtual IntRect borderBoundingBox() const override final { return pixelSnapp edBorderBoxRect(); }
168 168
169 // The content area of the box (excludes padding - and intrinsic padding for table cells, etc... - and border). 169 // The content area of the box (excludes padding - and intrinsic padding for table cells, etc... - and border).
170 LayoutRect contentBoxRect() const { return LayoutRect(borderLeft() + padding Left(), borderTop() + paddingTop(), contentWidth(), contentHeight()); } 170 LayoutRect contentBoxRect() const { return LayoutRect(borderLeft() + padding Left(), borderTop() + paddingTop(), contentWidth(), contentHeight()); }
171 // The content box in absolute coords. Ignores transforms. 171 // The content box in absolute coords. Ignores transforms.
172 IntRect absoluteContentBox() const; 172 IntRect absoluteContentBox() const;
173 // The content box converted to absolute coords (taking transforms into acco unt). 173 // The content box converted to absolute coords (taking transforms into acco unt).
174 FloatQuad absoluteContentQuad() const; 174 FloatQuad absoluteContentQuad() const;
175 175
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 if (UNLIKELY(inlineBoxWrapper() != 0)) 664 if (UNLIKELY(inlineBoxWrapper() != 0))
665 deleteLineBoxWrapper(); 665 deleteLineBoxWrapper();
666 } 666 }
667 667
668 ensureRareData().m_inlineBoxWrapper = boxWrapper; 668 ensureRareData().m_inlineBoxWrapper = boxWrapper;
669 } 669 }
670 670
671 } // namespace blink 671 } // namespace blink
672 672
673 #endif // RenderBox_h 673 #endif // RenderBox_h
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698