Skip to content
  • ojan@chromium.org's avatar
    WebCore: · 7ae729be
    ojan@chromium.org authored
    2009-06-23  Ojan Vafai  <ojan@chromium.org>
    
            Reviewed by Dan Bernstein.
    
            Add logic to CSSStyleDeclaration::diff to deal with font-sizes that are
            keyword values. When diff is called on a CSSStyleDeclaration, we check
            the keywordSize to see if font-size matches a keyword value.
    
            This ensures that when we diff a CSSMutableStyleDeclaration returned from
            copyInheritableProperties on a CSSComputedStyleDeclaration that we
            correctly identify matching font-sizes.
    
            https://bugs.webkit.org/show_bug.cgi?id=26279
    
            Test: editing/inserting/font-size-clears-from-typing-style.html
    
            * css/CSSComputedStyleDeclaration.cpp:
            (WebCore::CSSComputedStyleDeclaration::cssPropertyMatches):
            * css/CSSComputedStyleDeclaration.h:
            * css/CSSStyleDeclaration.cpp:
            (WebCore::CSSStyleDeclaration::cssPropertyMatches):
            (WebCore::CSSStyleDeclaration::diff):
            * css/CSSStyleDeclaration.h:
    
    LayoutTests:
    
    2009-06-23  Ojan Vafai  <ojan@chromium.org>
    
            Reviewed by Dan Bernstein.
    
            This test hits an edge case where typingStyle would never get cleared.
            In addition to making every text insertion go into its own text node,
            this caused large performance problems.
    
            https://bugs.webkit.org/show_bug.cgi?id=26279
    
            * editing/execCommand/5770834-1-expected.txt:
                These results match how they were before r43243. It's not clear to me
                why changes to font-size are affecting text-align styling though.
            * editing/inserting/font-size-clears-from-typing-style-expected.txt: Added.
            * editing/inserting/font-size-clears-from-typing-style.html: Added.
            * editing/inserting/resources/TEMPLATE.html: Copied from LayoutTests/editing/execCommand/resources/TEMPLATE.html.
            * editing/inserting/resources/font-size-clears-from-typing-style.js: Added.
            * platform/mac/editing/execCommand/remove-formatting-2-expected.txt:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@45014 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    7ae729be