angler-fishThe Vulnerability History Project

2011-03-01 Ryosuke Niwa <rniwa@webkit.org>

      Reviewed by Darin Adler.

        WebKit does not merge text decorations in the typing style and the selected element properly
        https://bugs.webkit.org/show_bug.cgi?id=55349

        Added a test to ensure WebKit merges text decorations in the typing style and the inline style
        of the element around the caret when computing the style at the selection start.

        * editing/execCommand/merge-text-decoration-with-typing-style-expected.txt: Added.
        * editing/execCommand/merge-text-decoration-with-typing-style.html: Added.
        * editing/style/push-down-inline-styles-expected.txt: Rebaselined due to the change in which text decoration
        values appear.
        * editing/style/script-tests/push-down-inline-styles.js: Ditto.
2011-03-01  Ryosuke Niwa  <rniwa@webkit.org>

        Reviewed by Darin Adler.

        WebKit does not merge text decorations in the typing style and the selected element properly
        https://bugs.webkit.org/show_bug.cgi?id=55349

        The bug was caused by EditingStyle::mergeTypingStyle's not properly merging text decoration property.
        Fixed the bug by extracting a function from ApplyStyleCommand::pushDownInlineStyleAroundNode and
        calling it in pushDownInlineStyleAroundNode and in mergeTypingStyle.

        Test: editing/execCommand/merge-text-decoration-with-typing-style.html

        * editing/ApplyStyleCommand.cpp:
        (WebCore::ApplyStyleCommand::applyInlineStyleToPushDown): Takes EditingStyle*;
        calls mergeInlineStyleOfElement.
        (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode): Calls applyInlineStyleToPushDown.
        (WebCore::ApplyStyleCommand::removeInlineStyle): Ditto.
        * editing/ApplyStyleCommand.h:
        * editing/EditingStyle.cpp:
        (WebCore::EditingStyle::mergeTypingStyle): Added; calls mergeStyle.
        (WebCore::EditingStyle::mergeInlineStyleOfElement): Ditto.
        (WebCore::Editi
    
commit 3404893f208a8fe55d2f137d240ea3901b951757
-16
-10
-43
+3 -3
+2 -2
-25
+39 -10
+1 -1
+6 -48
-2
expand_less