Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/ng/ng_physical_fragment.cc |
| diff --git a/third_party/WebKit/Source/core/layout/ng/ng_physical_fragment.cc b/third_party/WebKit/Source/core/layout/ng/ng_physical_fragment.cc |
| index d10fbb7b454e0c493a09a3dee0bac3b10d63ef13..4e1b7022abe62cbc50d731fd0aa69ac5508f429d 100644 |
| --- a/third_party/WebKit/Source/core/layout/ng/ng_physical_fragment.cc |
| +++ b/third_party/WebKit/Source/core/layout/ng/ng_physical_fragment.cc |
| @@ -46,10 +46,14 @@ const ComputedStyle& NGPhysicalFragment::Style() const { |
| NGPixelSnappedPhysicalBoxStrut NGPhysicalFragment::BorderWidths() const { |
| unsigned edges = BorderEdges(); |
| NGPhysicalBoxStrut box_strut( |
| - LayoutUnit((edges & kTopBorder) ? Style().BorderTopWidth() : .0f), |
| - LayoutUnit((edges & kRightBorder) ? Style().BorderRightWidth() : .0f), |
| - LayoutUnit((edges & kBottomBorder) ? Style().BorderBottomWidth() : .0f), |
| - LayoutUnit((edges & kLeftBorder) ? Style().BorderLeftWidth() : .0f)); |
| + LayoutUnit((edges & NGBorderEdges::kTop) ? Style().BorderTopWidth() |
| + : .0f), |
| + LayoutUnit((edges & NGBorderEdges::kRight) ? Style().BorderRightWidth() |
| + : .0f), |
| + LayoutUnit((edges & NGBorderEdges::kBottom) ? Style().BorderBottomWidth() |
| + : .0f), |
| + LayoutUnit((edges & NGBorderEdges::kLeft) ? Style().BorderLeftWidth() |
| + : .0f)); |
|
kojii
2017/05/31 04:41:25
Can move to ng_border_edges.cc to avoid wrapping?
|
| return box_strut.SnapToDevicePixels(); |
| } |