Index: third_party/WebKit/Source/core/page/PrintContext.cpp |
diff --git a/third_party/WebKit/Source/core/page/PrintContext.cpp b/third_party/WebKit/Source/core/page/PrintContext.cpp |
index c02388f1138db5181ddd587d29afcf8c53c5824f..e62a2d2cefcc08afda9dd5c3b930c1c77984733d 100644 |
--- a/third_party/WebKit/Source/core/page/PrintContext.cpp |
+++ b/third_party/WebKit/Source/core/page/PrintContext.cpp |
@@ -259,7 +259,9 @@ String PrintContext::pageProperty(LocalFrame* frame, const char* propertyName, i |
{ |
Document* document = frame->document(); |
PrintContext printContext(frame); |
- printContext.begin(800); // Any width is OK here. |
+ // Any non-zero size is OK here. We don't care about actual layout. We just want to collect |
+ // @page rules and figure out what declarations apply on a given page (that may or may not exist). |
+ printContext.begin(800, 1000); |
document->updateLayout(); |
rune
2015/12/10 09:44:50
printContext.begin() will update the style/layout.
mstensho (USE GERRIT)
2015/12/10 09:45:58
Done.
|
RefPtr<ComputedStyle> style = document->styleForPage(pageNumber); |