2010-06-25 Yuzo Fujishima <yuzo@google.com>
Reviewed by Shinichiro Hamaji.
Improve default value handling for page format properties.
https://bugs.webkit.org/show_bug.cgi?id=41150
* printing/page-format-data-expected.txt:
* printing/page-format-data.html:
* printing/page-rule-selection-expected.txt:
* printing/page-rule-selection.html:
2010-06-25 Yuzo Fujishima <yuzo@google.com>
Reviewed by Shinichiro Hamaji.
Improve default value handling for page format properties.
Default page size and orientation have been hard-coded.
Instead, pass default page size and margins to
WebCore::Document::pageSizeAndMarginsInPixels to handle auto page size
and margins specified as percentages.
Return margins instead of page rect.
https://bugs.webkit.org/show_bug.cgi?id=41150
* WebCore.base.exp:
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyPageSizeProperty):
(WebCore::CSSStyleSelector::pageSizeFromName):
* css/html.css:
(@page):
* dom/Document.cpp:
(WebCore::Document::pageSizeAndMarginsInPixels):
* dom/Document.h:
* page/PrintContext.cpp:
(WebCore::PrintContext::pageProperty):
(WebCore::PrintContext::pageSizeAndMarginsInPixels):
* page/PrintContext.h:
* rendering/style/RenderStyle.h:
(WebCore::InheritedFlags::pageSizeType):
(WebCore::InheritedFlags::setPageSizeType):
(WebCore::InheritedFlags::resetPageSizeType):
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:
(WebCore::):
2010-06-25 Yuzo Fujishima <yuzo@google.com>
Reviewed by Shinichiro Hamaji.
Improve default value handling for page format properties.
https://bugs.webkit.org/show_bug.cgi?id=41150
* public/WebFrame.h:
* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::pageSizeAndMarginsInPixels):
* src/WebFrameImpl.h:
2010-06-25 Yuzo Fujishima <yuzo@google.com>
Reviewed by Shinichiro Hamaji.
Improve default value handling for page format properties.
https://bugs.webkit.org/show_bug.cgi?id=41150
* Misc/WebCoreStatistics.h:
* Misc/WebCoreStatistics.mm:
(-[WebFrame pageSizeAndMarginsInPixels:pageNumber:width:height:marginTop:marginRight:marginBottom:]):
2010-06-25 Yuzo Fujishima <yuzo@google.com>
Reviewed by Shinichiro Hamaji.
Improve default value handling for page format properties.
https://bugs.webkit.org/show_bug.cgi?id=41150
* DumpRenderTree/LayoutTestController.cpp:
(parsePageNumber):
(parsePageNumberSizeMarings):
(pageSizeAndMarginsInPixelsCallback):
(LayoutTestController::staticFunctions):
* DumpRenderTree/LayoutTestController.h:
* DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
(LayoutTestController::pageSizeAndMarginsInPixels):
* DumpRenderTree/mac/LayoutTestControllerMac.mm:
(LayoutTestController::pageSizeAndMarginsInPixels):
* DumpRenderTree/win/LayoutTestControllerWin.cpp:
(LayoutTestController::pageSizeAndMarginsInPixels):
git-svn-id: svn://svn.chromium.org/blink/trunk@61975 bbb929c8-8fbe-4397-9dbb-9b2b20218538
diff --git a/WebCore/css/html.css b/WebCore/css/html.css
index dc27ff8..8a7f239 100644
--- a/WebCore/css/html.css
+++ b/WebCore/css/html.css
@@ -733,7 +733,9 @@
@page {
/* FIXME: Define the right default values for page properties. */
size: auto;
- margin: 1in;
+ margin: auto;
+ padding: 0px;
+ border-width: 0px;
}
/* noscript is handled internally, as it depends on settings */