haikuwebkit/LayoutTests/printing/page-rule-css-text-expected...

25 lines
784 B
Plaintext
Raw Permalink Normal View History

2010-04-27 Yuzo Fujishima <yuzo@google.com> Reviewed by Eric Seidel. Enhance CSS parser for Paged Media (Iteration 2) Parse and hold paged media rules in CSSStyleSelector. fast/dom/script-tests/prototype-inheritance-2.js is rebaselined because it assumes @page is ignored. https://bugs.webkit.org/show_bug.cgi?id=35782 * fast/dom/prototype-inheritance-2-expected.txt: * fast/dom/script-tests/prototype-inheritance-2.js: * printing/page-rule-css-text-expected.txt: Added. * printing/page-rule-css-text.html: Added. 2010-04-27 Yuzo Fujishima <yuzo@google.com> Reviewed by Eric Seidel. Enhance CSS parser for Paged Media (Iteration 2) Parse and hold paged media rules in CSSStyleSelector. https://bugs.webkit.org/show_bug.cgi?id=35782 Test: printing/page-rule-css-text.html * css/CSSGrammar.y: * css/CSSPageRule.cpp: (WebCore::CSSPageRule::CSSPageRule): (WebCore::CSSPageRule::selectorText): * css/CSSPageRule.h: (WebCore::CSSPageRule::create): (WebCore::CSSPageRule::isPageRule): * css/CSSParser.cpp: (WebCore::CSSParser::createPageRule): * css/CSSStyleRule.h: * css/CSSStyleSelector.cpp: (WebCore::CSSRuleSet::getPageRules): (WebCore::CSSRuleSet::CSSRuleSet): (WebCore::CSSRuleSet::~CSSRuleSet): (WebCore::CSSRuleSet::addPageRule): (WebCore::CSSRuleSet::addRulesFromSheet): * css/CSSStyleSelector.h: * css/StyleBase.h: (WebCore::StyleBase::isPageRule): Canonical link: https://commits.webkit.org/49653@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@58383 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-04-28 06:19:36 +00:00
@page { margin-top: 5cm; margin-bottom: 10cm; }
@page :left { margin-right: 3cm; }
@page :right { margin-left: 3cm; }
REGRESSION(r112177): listStyleType CSS property gets converted into listStyle https://bugs.webkit.org/show_bug.cgi?id=83026 Reviewed by Darin Adler. Source/WebCore: Fixed the bug by not using shorthand notations when some values are missing. However, we still want to return a value when shorthand border property is explicitly requested so extract borderPropertyValue with a flag to support both behaviors. * css/StylePropertySet.cpp: (WebCore::borderPropertyValue): Extracted from getPropertyValue. (WebCore::StylePropertySet::getPropertyValue): (WebCore::StylePropertySet::get4Values): Don't return values when priority don't match. (WebCore::StylePropertySet::getShorthandValue): (WebCore::StylePropertySet::getCommonValue): Don't return null string for initial values to disambiguate missing values and "initial" in getPropertyValue. Also check propriety. (WebCore::StylePropertySet::asText): Support emitting border-width, border-style, and border-color when border doesn't work but the former properties do. LayoutTests: Added test cases to cssText-shorthand.html and rebaselined some tests. * fast/css/cssText-shorthand-expected.txt: * fast/css/cssText-shorthand.html: Added more test cases. * fast/css/remove-shorthand-expected.txt: Correctly adds both border-width and border-style when border-color is missing. * printing/page-rule-css-text-expected.txt: Correctly uses border-width instead of border. Canonical link: https://commits.webkit.org/102379@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@115227 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-04-25 17:44:29 +00:00
@page :first { border-width: 1px; }
2010-04-27 Yuzo Fujishima <yuzo@google.com> Reviewed by Eric Seidel. Enhance CSS parser for Paged Media (Iteration 2) Parse and hold paged media rules in CSSStyleSelector. fast/dom/script-tests/prototype-inheritance-2.js is rebaselined because it assumes @page is ignored. https://bugs.webkit.org/show_bug.cgi?id=35782 * fast/dom/prototype-inheritance-2-expected.txt: * fast/dom/script-tests/prototype-inheritance-2.js: * printing/page-rule-css-text-expected.txt: Added. * printing/page-rule-css-text.html: Added. 2010-04-27 Yuzo Fujishima <yuzo@google.com> Reviewed by Eric Seidel. Enhance CSS parser for Paged Media (Iteration 2) Parse and hold paged media rules in CSSStyleSelector. https://bugs.webkit.org/show_bug.cgi?id=35782 Test: printing/page-rule-css-text.html * css/CSSGrammar.y: * css/CSSPageRule.cpp: (WebCore::CSSPageRule::CSSPageRule): (WebCore::CSSPageRule::selectorText): * css/CSSPageRule.h: (WebCore::CSSPageRule::create): (WebCore::CSSPageRule::isPageRule): * css/CSSParser.cpp: (WebCore::CSSParser::createPageRule): * css/CSSStyleRule.h: * css/CSSStyleSelector.cpp: (WebCore::CSSRuleSet::getPageRules): (WebCore::CSSRuleSet::CSSRuleSet): (WebCore::CSSRuleSet::~CSSRuleSet): (WebCore::CSSRuleSet::addPageRule): (WebCore::CSSRuleSet::addRulesFromSheet): * css/CSSStyleSelector.h: * css/StyleBase.h: (WebCore::StyleBase::isPageRule): Canonical link: https://commits.webkit.org/49653@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@58383 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-04-28 06:19:36 +00:00
@page hello { color: green; }
@page world:right { background-color: green; }
cssText should use shorthand notations https://bugs.webkit.org/show_bug.cgi?id=81737 Reviewed by Enrica Casucci. Source/JavaScriptCore: Export symbols of BitVector on Windows. * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Source/WebCore: Use shorthand properties to serialize style properties for cssText. The overall algorithm is to look for any property that has a shorthand, and then check if the shorthand value could be obtained (the condition is quite complicated for border properties). If it could, then append that value to the string builder, and set the corresponding entries in shorthandPropertyAppeared and shorthandPropertyUsed. If not, only turn on the bit in shorthandPropertyAppeared on to avoid calling getPropertyValue again for longhand properties that use the same shorthand property when we cannot use the shorthand. Test: fast/css/cssText-shorthand.html * css/StylePropertySet.cpp: (WebCore::StylePropertySet::asText): Source/WTF: * wtf/BitVector.h: (BitVector): (WTF::BitVector::ensureSizeAndSet): Added. LayoutTests: Rebaseline existing tests and add a regression test for unprefixed CSS properties with the exception of -webkit-border-horizontal/vertical-spacing (the shorthand version of these properties (border-spacing) is unprefixed. * editing/pasteboard/paste-and-sanitize-expected.txt: Uses border instead of longhand properties as desired. * editing/pasteboard/paste-and-sanitize.html: * editing/style/non-inheritable-styles-expected.txt: Ditto. * fast/css/background-position-serialize-expected.txt: No longer emits "background-*: initial" as desired. * fast/css/cssText-shorthand-expected.txt: Added. * fast/css/cssText-shorthand.html: Added. * fast/css/remove-shorthand-expected.txt: * fast/css/remove-shorthand.html: Modified to do elaborative comparison of the lists of properties before and after removing a shorthand since now removing a shorthand property may end up adding new longhand property. * fast/css/uri-token-parsing-expected.txt: * fast/css/uri-token-parsing.html: Uses shorthand properties instead of longhand equivalents. * inspector/styles/styles-update-from-js-expected.txt: Ditto. * printing/page-rule-css-text-expected.txt: Ditto. Canonical link: https://commits.webkit.org/99614@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@112177 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-03-26 23:59:27 +00:00
@media print { @page somepage:first { margin: 3cm; } }
@page auto_page { size: auto; }
@page square_page { size: 4in; }
@page letter_page { size: letter; }
@page page_widht_height { size: 10cm 15cm; }
@page page_size_orientation { size: ledger landscape; }
@page page_orientation_size { size: a4 portrait; }
@page err_empty_size { }
@page err_unknow_page_size { }
@page err_length_and_page_size { }
@page err_length_and_orientation { }
@page err_orientations { }
@page err_too_many_params { }
table { page: Rotated; }
div { page: auto; }
pre { }
p { }
2010-04-27 Yuzo Fujishima <yuzo@google.com> Reviewed by Eric Seidel. Enhance CSS parser for Paged Media (Iteration 2) Parse and hold paged media rules in CSSStyleSelector. fast/dom/script-tests/prototype-inheritance-2.js is rebaselined because it assumes @page is ignored. https://bugs.webkit.org/show_bug.cgi?id=35782 * fast/dom/prototype-inheritance-2-expected.txt: * fast/dom/script-tests/prototype-inheritance-2.js: * printing/page-rule-css-text-expected.txt: Added. * printing/page-rule-css-text.html: Added. 2010-04-27 Yuzo Fujishima <yuzo@google.com> Reviewed by Eric Seidel. Enhance CSS parser for Paged Media (Iteration 2) Parse and hold paged media rules in CSSStyleSelector. https://bugs.webkit.org/show_bug.cgi?id=35782 Test: printing/page-rule-css-text.html * css/CSSGrammar.y: * css/CSSPageRule.cpp: (WebCore::CSSPageRule::CSSPageRule): (WebCore::CSSPageRule::selectorText): * css/CSSPageRule.h: (WebCore::CSSPageRule::create): (WebCore::CSSPageRule::isPageRule): * css/CSSParser.cpp: (WebCore::CSSParser::createPageRule): * css/CSSStyleRule.h: * css/CSSStyleSelector.cpp: (WebCore::CSSRuleSet::getPageRules): (WebCore::CSSRuleSet::CSSRuleSet): (WebCore::CSSRuleSet::~CSSRuleSet): (WebCore::CSSRuleSet::addPageRule): (WebCore::CSSRuleSet::addRulesFromSheet): * css/CSSStyleSelector.h: * css/StyleBase.h: (WebCore::StyleBase::isPageRule): Canonical link: https://commits.webkit.org/49653@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@58383 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-04-28 06:19:36 +00:00