Changeset 87882 in webkit


Ignore:
Timestamp:
Jun 2, 2011 12:21:12 AM (13 years ago)
Author:
mitz@apple.com
Message:

Incorrect UA style when printing a simple document
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.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r87881 r87882  
     12011-06-01  Dan Bernstein  <mitz@apple.com>
     2
     3        Reviewed by Anders Carlsson.
     4
     5        Incorrect UA style when printing a simple document
     6        https://bugs.webkit.org/show_bug.cgi?id=61900
     7
     8        This is not testable in run-webkit-tests because unless the test is the first to run in an instance
     9        of DumpRenderTree, it is not guaranteed that the full default style sheet has not been initialized.
     10
     11        * css/CSSStyleSelector.cpp:
     12        (WebCore::loadFullDefaultStyle): Replace the simple default print style, which is now equal to the
     13        simple default style, with a new RuleSet before adding the style rules from the full default sheet.
     14        (WebCore::loadSimpleDefaultStyle): Set defaultPrintStyle to point to the default style. They are
     15        equal in the simple case.
     16
    1172011-06-01  Kent Tamura  <tkent@chromium.org>
    218
  • trunk/Source/WebCore/css/CSSStyleSelector.cpp

    r87660 r87882  
    559559    if (simpleDefaultStyleSheet) {
    560560        ASSERT(defaultStyle);
     561        ASSERT(defaultPrintStyle == defaultStyle);
    561562        delete defaultStyle;
    562563        simpleDefaultStyleSheet->deref();
    563564        defaultStyle = new RuleSet;
     565        defaultPrintStyle = new RuleSet;
    564566        simpleDefaultStyleSheet = 0;
    565567    } else {
     
    588590   
    589591    defaultStyle = new RuleSet;
    590     defaultPrintStyle = new RuleSet;
     592    // There are no media-specific rules in the simple default style.
     593    defaultPrintStyle = defaultStyle;
    591594    defaultQuirksStyle = new RuleSet;
    592595
Note: See TracChangeset for help on using the changeset viewer.