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

Side by Side Diff: Source/core/rendering/RenderBoxModelObject.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) 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, 2009 Apple Inc. All rights reserved. 4 * Copyright (C) 2003, 2006, 2007, 2009 Apple Inc. All rights reserved.
5 * Copyright (C) 2010 Google Inc. All rights reserved. 5 * Copyright (C) 2010 Google Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 LayoutUnit borderAndPaddingAfter() const { return borderAfter() + paddingAft er(); } 119 LayoutUnit borderAndPaddingAfter() const { return borderAfter() + paddingAft er(); }
120 120
121 LayoutUnit borderAndPaddingHeight() const { return borderTop() + borderBotto m() + paddingTop() + paddingBottom(); } 121 LayoutUnit borderAndPaddingHeight() const { return borderTop() + borderBotto m() + paddingTop() + paddingBottom(); }
122 LayoutUnit borderAndPaddingWidth() const { return borderLeft() + borderRight () + paddingLeft() + paddingRight(); } 122 LayoutUnit borderAndPaddingWidth() const { return borderLeft() + borderRight () + paddingLeft() + paddingRight(); }
123 LayoutUnit borderAndPaddingLogicalHeight() const { return borderAndPaddingBe fore() + borderAndPaddingAfter(); } 123 LayoutUnit borderAndPaddingLogicalHeight() const { return borderAndPaddingBe fore() + borderAndPaddingAfter(); }
124 LayoutUnit borderAndPaddingLogicalWidth() const { return borderStart() + bor derEnd() + paddingStart() + paddingEnd(); } 124 LayoutUnit borderAndPaddingLogicalWidth() const { return borderStart() + bor derEnd() + paddingStart() + paddingEnd(); }
125 LayoutUnit borderAndPaddingLogicalLeft() const { return style()->isHorizonta lWritingMode() ? borderLeft() + paddingLeft() : borderTop() + paddingTop(); } 125 LayoutUnit borderAndPaddingLogicalLeft() const { return style()->isHorizonta lWritingMode() ? borderLeft() + paddingLeft() : borderTop() + paddingTop(); }
126 126
127 127
128 LayoutUnit borderLogicalLeft() const { return style()->isHorizontalWritingMo de() ? borderLeft() : borderTop(); } 128 LayoutUnit borderLogicalLeft() const { return style()->isHorizontalWritingMo de() ? borderLeft() : borderTop(); }
129 LayoutUnit borderLogicalRight() const { return style()->isHorizontalWritingM ode() ? borderRight() : borderBottom(); }
130 LayoutUnit borderLogicalWidth() const { return borderStart() + borderEnd(); }
131 LayoutUnit borderLogicalHeight() const { return borderBefore() + borderAfter (); }
Julien - ping for review 2014/10/03 01:26:43 Ditto (x3).
132 129
133 LayoutUnit paddingLogicalLeft() const { return style()->isHorizontalWritingM ode() ? paddingLeft() : paddingTop(); }
134 LayoutUnit paddingLogicalRight() const { return style()->isHorizontalWriting Mode() ? paddingRight() : paddingBottom(); }
Julien - ping for review 2014/10/03 01:26:43 Ditto.
135 LayoutUnit paddingLogicalWidth() const { return paddingStart() + paddingEnd( ); } 130 LayoutUnit paddingLogicalWidth() const { return paddingStart() + paddingEnd( ); }
136 LayoutUnit paddingLogicalHeight() const { return paddingBefore() + paddingAf ter(); } 131 LayoutUnit paddingLogicalHeight() const { return paddingBefore() + paddingAf ter(); }
137 132
138 virtual LayoutUnit marginTop() const = 0; 133 virtual LayoutUnit marginTop() const = 0;
139 virtual LayoutUnit marginBottom() const = 0; 134 virtual LayoutUnit marginBottom() const = 0;
140 virtual LayoutUnit marginLeft() const = 0; 135 virtual LayoutUnit marginLeft() const = 0;
141 virtual LayoutUnit marginRight() const = 0; 136 virtual LayoutUnit marginRight() const = 0;
142 virtual LayoutUnit marginBefore(const RenderStyle* otherStyle = 0) const = 0 ; 137 virtual LayoutUnit marginBefore(const RenderStyle* otherStyle = 0) const = 0 ;
143 virtual LayoutUnit marginAfter(const RenderStyle* otherStyle = 0) const = 0; 138 virtual LayoutUnit marginAfter(const RenderStyle* otherStyle = 0) const = 0;
144 virtual LayoutUnit marginStart(const RenderStyle* otherStyle = 0) const = 0; 139 virtual LayoutUnit marginStart(const RenderStyle* otherStyle = 0) const = 0;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 private: 216 private:
222 LayoutUnit computedCSSPadding(const Length&) const; 217 LayoutUnit computedCSSPadding(const Length&) const;
223 virtual bool isBoxModelObject() const OVERRIDE FINAL { return true; } 218 virtual bool isBoxModelObject() const OVERRIDE FINAL { return true; }
224 }; 219 };
225 220
226 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBoxModelObject, isBoxModelObject()); 221 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBoxModelObject, isBoxModelObject());
227 222
228 } // namespace blink 223 } // namespace blink
229 224
230 #endif // RenderBoxModelObject_h 225 #endif // RenderBoxModelObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698