Skip to content
  • mitz@apple.com's avatar
    WebCore: · 5df9b802
    mitz@apple.com authored
            Reviewed by Darin Adler.
    
            - fix <rdar://problem/5760774> Replying to a Mail message that contains
              fixed width text can change the size of the text
    
            Covered by existing tests: editing/pasteboard/5027857.html
                                       editing/pasteboard/paste-pre-002.html
    
            * css/CSSComputedStyleDeclaration.cpp:
            (WebCore::CSSComputedStyleDeclaration::getFontSizeCSSValuePreferringKeyword):
            Added. If the font-size is keyword-based, returns the keyword value
            instead of the pixel size.
            (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): If
            font-family is a generic family, return the generic family instead of
            the the internal string -webkit-[serif|sans-serif|cursive|fantasy
            |monospace].
            (WebCore::CSSComputedStyleDeclaration::copyInheritableProperties):
            For the font-size property, prefer a keyword value over a pixel size.
            * css/CSSComputedStyleDeclaration.h:
            * editing/ApplyStyleCommand.cpp:
            (WebCore::StyleChange::currentlyHasStyle): For the font-size property,
            call getFontSizeCSSValuePreferringKeyword().
            * platform/graphics/FontDescription.h:
            (WebCore::FontDescription::keywordSize): Changed the return type to
            unsigned.
            (WebCore::FontDescription::setKeywordSize): Changed the parameter type
            to unsigned.
            (WebCore::FontDescription::m_keywordSize): Changed the type of this
            4-bit field to unsigned, because it takes values as high as 8.
    
    LayoutTests:
    
            Reviewed by Darin Adler.
    
            - updated results for <rdar://problem/5760774> Replying to a Mail
              message that contains fixed width text can change the size of the text
    
            * editing/execCommand/19089-expected.txt:
            * editing/execCommand/5770834-1-expected.txt:
            * platform/mac/editing/deleting/delete-br-011-expected.txt:
            * platform/mac/editing/deleting/delete-select-all-001-expected.txt:
            * platform/mac/editing/execCommand/remove-formatting-2-expected.txt:
            * platform/mac/editing/pasteboard/5027857-expected.checksum:
            * platform/mac/editing/pasteboard/5027857-expected.png:
            * platform/mac/editing/pasteboard/5027857-expected.txt:
            * platform/mac/editing/pasteboard/paste-pre-002-expected.checksum:
            * platform/mac/editing/pasteboard/paste-pre-002-expected.png:
            * platform/mac/editing/pasteboard/paste-pre-002-expected.txt:
            * platform/mac/editing/style/block-style-004-expected.txt:
            * platform/mac/editing/style/block-style-005-expected.txt:
            * platform/mac/editing/style/block-style-006-expected.txt:
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43243 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    5df9b802