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

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

Issue 2640143005: Support subpixel layout for borders. (Closed)
Patch Set: Created 3 years, 11 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/LayoutTableCell.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutTableCell.h b/third_party/WebKit/Source/core/layout/LayoutTableCell.h
index e3d500a15056ef00d81c6a6346f137c3ce4e9d44..df2dfb7010d415453be2f2fcbfc4cd0975b5cbae 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTableCell.h
+++ b/third_party/WebKit/Source/core/layout/LayoutTableCell.h
@@ -157,10 +157,11 @@ class CORE_EXPORT LayoutTableCell final : public LayoutBlockFlow {
// add in the border and padding.
// Call computedCSSPadding* directly to avoid including implicitPadding.
if (!document().inQuirksMode() &&
- style()->boxSizing() != EBoxSizing::kBorderBox)
+ style()->boxSizing() != EBoxSizing::kBorderBox) {
styleLogicalHeight +=
(computedCSSPaddingBefore() + computedCSSPaddingAfter()).floor() +
- borderBefore() + borderAfter();
+ (borderBefore() + borderAfter()).floor();
+ }
return styleLogicalHeight;
}
@@ -176,14 +177,14 @@ class CORE_EXPORT LayoutTableCell final : public LayoutBlockFlow {
void setCellLogicalWidth(int constrainedLogicalWidth, SubtreeLayoutScope&);
- int borderLeft() const override;
- int borderRight() const override;
- int borderTop() const override;
- int borderBottom() const override;
- int borderStart() const override;
- int borderEnd() const override;
- int borderBefore() const override;
- int borderAfter() const override;
+ LayoutUnit borderLeft() const override;
+ LayoutUnit borderRight() const override;
+ LayoutUnit borderTop() const override;
+ LayoutUnit borderBottom() const override;
+ LayoutUnit borderStart() const override;
+ LayoutUnit borderEnd() const override;
+ LayoutUnit borderBefore() const override;
+ LayoutUnit borderAfter() const override;
void collectBorderValues(LayoutTable::CollapsedBorderValues&);
static void sortBorderValues(LayoutTable::CollapsedBorderValues&);
@@ -377,15 +378,15 @@ class CORE_EXPORT LayoutTableCell final : public LayoutBlockFlow {
LayoutSize offsetFromContainer(const LayoutObject*) const override;
LayoutRect localVisualRect() const override;
- int borderHalfLeft(bool outer) const;
- int borderHalfRight(bool outer) const;
- int borderHalfTop(bool outer) const;
- int borderHalfBottom(bool outer) const;
+ LayoutUnit borderHalfLeft(bool outer) const;
+ LayoutUnit borderHalfRight(bool outer) const;
+ LayoutUnit borderHalfTop(bool outer) const;
+ LayoutUnit borderHalfBottom(bool outer) const;
- int borderHalfStart(bool outer) const;
- int borderHalfEnd(bool outer) const;
- int borderHalfBefore(bool outer) const;
- int borderHalfAfter(bool outer) const;
+ LayoutUnit borderHalfStart(bool outer) const;
+ LayoutUnit borderHalfEnd(bool outer) const;
+ LayoutUnit borderHalfBefore(bool outer) const;
+ LayoutUnit borderHalfAfter(bool outer) const;
void setIntrinsicPaddingBefore(int p) { m_intrinsicPaddingBefore = p; }
void setIntrinsicPaddingAfter(int p) { m_intrinsicPaddingAfter = p; }

Powered by Google App Engine
This is Rietveld 408576698