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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBoxModelObject.h

Issue 2640143005: Support subpixel layout for borders. (Closed)
Patch Set: Rebaselined tests. Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/LayoutBoxModelObject.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.h b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.h
index 09662931475073ab2077ff2c2f53c418e49a8b56..c84f2b2ec1f441f316038dcb91bc42307a8f7f94 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.h
+++ b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.h
@@ -250,19 +250,39 @@ class CORE_EXPORT LayoutBoxModelObject : public LayoutObject {
LayoutUnit paddingOver() const { return computedCSSPaddingOver(); }
LayoutUnit paddingUnder() const { return computedCSSPaddingUnder(); }
- virtual int borderTop() const { return style()->borderTopWidth(); }
- virtual int borderBottom() const { return style()->borderBottomWidth(); }
- virtual int borderLeft() const { return style()->borderLeftWidth(); }
- virtual int borderRight() const { return style()->borderRightWidth(); }
- virtual int borderBefore() const { return style()->borderBeforeWidth(); }
- virtual int borderAfter() const { return style()->borderAfterWidth(); }
- virtual int borderStart() const { return style()->borderStartWidth(); }
- virtual int borderEnd() const { return style()->borderEndWidth(); }
- int borderOver() const { return style()->borderOverWidth(); }
- int borderUnder() const { return style()->borderUnderWidth(); }
-
- int borderWidth() const { return borderLeft() + borderRight(); }
- int borderHeight() const { return borderTop() + borderBottom(); }
+ virtual LayoutUnit borderTop() const {
+ return LayoutUnit(style()->borderTopWidth());
+ }
+ virtual LayoutUnit borderBottom() const {
+ return LayoutUnit(style()->borderBottomWidth());
+ }
+ virtual LayoutUnit borderLeft() const {
+ return LayoutUnit(style()->borderLeftWidth());
+ }
+ virtual LayoutUnit borderRight() const {
+ return LayoutUnit(style()->borderRightWidth());
+ }
+ virtual LayoutUnit borderBefore() const {
+ return LayoutUnit(style()->borderBeforeWidth());
+ }
+ virtual LayoutUnit borderAfter() const {
+ return LayoutUnit(style()->borderAfterWidth());
+ }
+ virtual LayoutUnit borderStart() const {
+ return LayoutUnit(style()->borderStartWidth());
+ }
+ virtual LayoutUnit borderEnd() const {
+ return LayoutUnit(style()->borderEndWidth());
+ }
+ LayoutUnit borderOver() const {
+ return LayoutUnit(style()->borderOverWidth());
+ }
+ LayoutUnit borderUnder() const {
+ return LayoutUnit(style()->borderUnderWidth());
+ }
+
+ LayoutUnit borderWidth() const { return borderLeft() + borderRight(); }
+ LayoutUnit borderHeight() const { return borderTop() + borderBottom(); }
// Insets from the border box to the inside of the border.
LayoutRectOutsets borderInsets() const {
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.h ('k') | third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698