https://bugs.webkit.org/show_bug.cgi?id=61900
Reviewed by Anders Carlsson.
This is not testable in run-webkit-tests because unless the test is the first to run in an instance
of DumpRenderTree, it is not guaranteed that the full default style sheet has not been initialized.
* css/CSSStyleSelector.cpp:
(WebCore::loadFullDefaultStyle): Replace the simple default print style, which is now equal to the
simple default style, with a new RuleSet before adding the style rules from the full default sheet.
(WebCore::loadSimpleDefaultStyle): Set defaultPrintStyle to point to the default style. They are
equal in the simple case.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@87882
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2011-06-01 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Incorrect UA style when printing a simple document
+ https://bugs.webkit.org/show_bug.cgi?id=61900
+
+ This is not testable in run-webkit-tests because unless the test is the first to run in an instance
+ of DumpRenderTree, it is not guaranteed that the full default style sheet has not been initialized.
+
+ * css/CSSStyleSelector.cpp:
+ (WebCore::loadFullDefaultStyle): Replace the simple default print style, which is now equal to the
+ simple default style, with a new RuleSet before adding the style rules from the full default sheet.
+ (WebCore::loadSimpleDefaultStyle): Set defaultPrintStyle to point to the default style. They are
+ equal in the simple case.
+
2011-06-01 Kent Tamura <tkent@chromium.org>
Reviewed by Dimitri Glazkov.
{
if (simpleDefaultStyleSheet) {
ASSERT(defaultStyle);
+ ASSERT(defaultPrintStyle == defaultStyle);
delete defaultStyle;
simpleDefaultStyleSheet->deref();
defaultStyle = new RuleSet;
+ defaultPrintStyle = new RuleSet;
simpleDefaultStyleSheet = 0;
} else {
ASSERT(!defaultStyle);
ASSERT(!simpleDefaultStyleSheet);
defaultStyle = new RuleSet;
- defaultPrintStyle = new RuleSet;
+ // There are no media-specific rules in the simple default style.
+ defaultPrintStyle = defaultStyle;
defaultQuirksStyle = new RuleSet;
simpleDefaultStyleSheet = parseUASheet(simpleUserAgentStyleSheet, strlen(simpleUserAgentStyleSheet));