Changeset 64187 in webkit
- Timestamp:
- Jul 27, 2010 8:48:36 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r64186 r64187 1 2010-07-26 Yuzo Fujishima <yuzo@google.com> 2 3 Reviewed by Shinichiro Hamaji. 4 5 @page rules in media queries should be tested. 6 Added tests for such rules. 7 https://bugs.webkit.org/show_bug.cgi?id=42971 8 9 * printing/page-rule-selection-expected.txt: 10 * printing/page-rule-selection.html: 11 1 12 2010-07-27 Daniel Bates <dbates@rim.com> 2 13 -
trunk/LayoutTests/printing/page-rule-selection-expected.txt
r61975 r64187 50 50 PASS layoutTestController.pageProperty('font-family', 0) is "Arial" 51 51 PASS layoutTestController.pageProperty('font-size', 0) is "30" 52 Check @media rules. 53 PASS layoutTestController.pageProperty('size', 0) is "100 200" 54 PASS layoutTestController.pageProperty('size', 0) is "150 250" 55 PASS layoutTestController.pageProperty('size', 0) is "150 250" 52 56 PASS successfullyParsed is true 53 57 -
trunk/LayoutTests/printing/page-rule-selection.html
r62982 r64187 85 85 shouldBeEqualToString("layoutTestController.pageProperty('font-size', 0)", "30"); 86 86 appendStyle("@page { zoom:100%; }"); 87 88 debug("Check @media rules."); 89 appendStyle("@page { size:100px 200px; }"); 90 shouldBeEqualToString("layoutTestController.pageProperty('size', 0)", "100 200"); 91 appendStyle("@media print { @page { size:150px 250px; } }"); 92 shouldBeEqualToString("layoutTestController.pageProperty('size', 0)", "150 250"); 93 appendStyle("@media screen { @page { size:300px 500px; } }"); 94 shouldBeEqualToString("layoutTestController.pageProperty('size', 0)", "150 250"); 95 87 96 } else { 88 97 testFailed("This test can be run only with window.layoutTestController"); -
trunk/WebCore/ChangeLog
r64173 r64187 1 2010-07-26 Yuzo Fujishima <yuzo@google.com> 2 3 Reviewed by Shinichiro Hamaji. 4 5 @page rules in media queries should be tested. 6 https://bugs.webkit.org/show_bug.cgi?id=42971 7 8 * page/PrintContext.cpp: 9 (WebCore::PrintContext::pageProperty): Fixed to properly begin 10 printing. Added support for size property. 11 1 12 2010-07-27 James Hawkins <jhawkins@chromium.org> 2 13 -
trunk/WebCore/page/PrintContext.cpp
r63521 r64187 203 203 { 204 204 Document* document = frame->document(); 205 PrintContext printContext(frame); 206 printContext.begin(800); // Any width is OK here. 205 207 document->updateLayout(); 206 208 RefPtr<RenderStyle> style = document->styleForPage(pageNumber); … … 218 220 if (!strcmp(propertyName, "font-family")) 219 221 return String::format("%s", style->fontDescription().family().family().string().utf8().data()); 222 if (!strcmp(propertyName, "size")) 223 return String::format("%d %d", style->pageSize().width().rawValue(), style->pageSize().height().rawValue()); 220 224 221 225 return String::format("pageProperty() unimplemented for: %s", propertyName);
Note: See TracChangeset
for help on using the changeset viewer.