-
rniwa@webkit.org authored
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::EditingStyle::mergeStyle): Extracted from applyInlineStyleToPushDown. * editing/EditingStyle.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@80060 268f45cc-cd09-0410-ab3c-d52691b4dbfc
b249876e