Chromium Code Reviews| Index: third_party/WebKit/Source/core/dom/Document.cpp |
| diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp |
| index 374a789280c627edd7f617122ad712d32f2e9966..959173e1d32458864841ffdc64fd1de05824d8a9 100644 |
| --- a/third_party/WebKit/Source/core/dom/Document.cpp |
| +++ b/third_party/WebKit/Source/core/dom/Document.cpp |
| @@ -2084,10 +2084,10 @@ void Document::pageSizeAndMarginsInPixels(int pageIndex, IntSize& pageSize, int& |
| // The percentage is calculated with respect to the width even for margin top and bottom. |
| // http://www.w3.org/TR/CSS2/box.html#margin-properties |
| - marginTop = style->marginTop().isAuto() ? marginTop : intValueForLength(style->marginTop(), width); |
| - marginRight = style->marginRight().isAuto() ? marginRight : intValueForLength(style->marginRight(), width); |
| - marginBottom = style->marginBottom().isAuto() ? marginBottom : intValueForLength(style->marginBottom(), width); |
| - marginLeft = style->marginLeft().isAuto() ? marginLeft : intValueForLength(style->marginLeft(), width); |
| + marginTop = style->marginTop().isAuto() ? marginTop : intValueForLength(style->marginTop(), LayoutUnit(width)); |
|
eae
2016/02/12 01:14:59
How about adding a version of intValueForLength th
|
| + marginRight = style->marginRight().isAuto() ? marginRight : intValueForLength(style->marginRight(), LayoutUnit(width)); |
| + marginBottom = style->marginBottom().isAuto() ? marginBottom : intValueForLength(style->marginBottom(), LayoutUnit(width)); |
| + marginLeft = style->marginLeft().isAuto() ? marginLeft : intValueForLength(style->marginLeft(), LayoutUnit(width)); |
| } |
| void Document::setIsViewSource(bool isViewSource) |