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 179c42293ac068b106321168aaac0d7ce5566771..8d9182d5f42d7311877d1e103fb516a397394af8 100644 |
--- a/third_party/WebKit/Source/core/dom/Document.cpp |
+++ b/third_party/WebKit/Source/core/dom/Document.cpp |
@@ -1991,12 +1991,12 @@ bool Document::isPageBoxVisible(int pageIndex) |
return styleForPage(pageIndex)->visibility() != HIDDEN; // display property doesn't apply to @page. |
} |
-void Document::pageSizeAndMarginsInPixels(int pageIndex, IntSize& pageSize, int& marginTop, int& marginRight, int& marginBottom, int& marginLeft) |
+void Document::pageSizeAndMarginsInPixels(int pageIndex, FloatSize& pageSize, int& marginTop, int& marginRight, int& marginBottom, int& marginLeft) |
{ |
RefPtr<ComputedStyle> style = styleForPage(pageIndex); |
- int width = pageSize.width(); |
- int height = pageSize.height(); |
+ float width = pageSize.width(); |
eae
2016/07/12 22:26:39
This does not look right. Pages are always in full
rhogan
2016/07/13 18:27:13
The main user of this API is print_web_view_helper
eae
2016/07/13 20:42:26
In that case we need to use either LayoutUnits or
|
+ float height = pageSize.height(); |
switch (style->getPageSizeType()) { |
case PAGE_SIZE_AUTO: |
break; |
@@ -2017,7 +2017,7 @@ void Document::pageSizeAndMarginsInPixels(int pageIndex, IntSize& pageSize, int& |
default: |
ASSERT_NOT_REACHED(); |
} |
- pageSize = IntSize(width, height); |
+ pageSize = FloatSize(width, height); |
// 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 |