WebCore:
authorojan@chromium.org <ojan@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Jun 2009 23:35:24 +0000 (23:35 +0000)
committerojan@chromium.org <ojan@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Jun 2009 23:35:24 +0000 (23:35 +0000)
commit8498b4d27290b970e2bacd5d5282266044ceaed3
treeaac438551cedf3a4bac769aa51f833ab7e29f598
parent7ee56259961a0e7b90758d2526ea1e07147f118a
WebCore:

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: https://svn.webkit.org/repository/webkit/trunk@45014 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/execCommand/5770834-1-expected.txt
LayoutTests/editing/inserting/font-size-clears-from-typing-style-expected.txt [new file with mode: 0644]
LayoutTests/editing/inserting/font-size-clears-from-typing-style.html [new file with mode: 0644]
LayoutTests/editing/inserting/resources/TEMPLATE.html [new file with mode: 0644]
LayoutTests/editing/inserting/resources/font-size-clears-from-typing-style.js [new file with mode: 0644]
LayoutTests/platform/mac/editing/execCommand/remove-formatting-2-expected.txt
WebCore/ChangeLog
WebCore/css/CSSComputedStyleDeclaration.cpp
WebCore/css/CSSComputedStyleDeclaration.h
WebCore/css/CSSStyleDeclaration.cpp
WebCore/css/CSSStyleDeclaration.h