Reviewed by Hyatt
authorkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Feb 2005 00:10:45 +0000 (00:10 +0000)
committerkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Feb 2005 00:10:45 +0000 (00:10 +0000)
commit612d2f97b20475cada59cd5f3e72cd82494ab601
tree7091accacda38c9ce19633fdf7b5d0fc67f9fc93
parentcaf7fed43fd1bcfb25f2c46c016f3dcc3ed6c7bd
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/4003463> Mail.app HTML uses inline styling markup not understood by Entourage and Eudora

        * khtml/editing/htmlediting.cpp:
        (khtml::isEmptyFontTag): Helper for removing <font> tags.
        (khtml::StyleChange::styleModeForParseMode): Helper to map a document parse mode to a use/don't use
        legacy-html-styles value.
        (khtml::StyleChange::checkForLegacyHTMLStyleChange): Add support for colors, font faces, and font sizes.
        (khtml::ApplyStyleCommand::isHTMLStyleNode):
        (khtml::ApplyStyleCommand::removeHTMLFontStyle):
        (khtml::ApplyStyleCommand::applyTextDecorationStyle): Now call styleModeForParseMode to determine
        whether to use legacy html styles or not.
        (khtml::ApplyStyleCommand::removeInlineStyle): Now properly removes <font> styles.
        (khtml::ApplyStyleCommand::addBlockStyleIfNeeded): Ditto.
        (khtml::ApplyStyleCommand::addInlineStyleIfNeeded): Ditto.
        (khtml::createFontElement): Helper for applying <font> elements.
        * khtml/editing/htmlediting.h: All the following support the new bits of data we need to store.
        (khtml::StyleChange::applyFontColor)
        (khtml::StyleChange::applyFontFace)
        (khtml::StyleChange::applyFontSize)
        (khtml::StyleChange::fontColor)
        (khtml::StyleChange::fontFace)
        (khtml::StyleChange::fontSize)

        Test results updated now that we will write out <font> tags for quirks mode documents.

        * layout-tests/editing/execCommand/modifyForeColorByCharacter-expected.txt
        * layout-tests/editing/style/block-style-004-expected.txt
        * layout-tests/editing/editing/pasteboard/paste-text-011-expected.txt
        * layout-tests/editing/style/block-style-005-expected.txt
        * layout-tests/editing/style/block-style-006-expected.txt
        * layout-tests/editing/style/smoosh-styles-001-expected.txt
        * layout-tests/editing/style/smoosh-styles-002-expected.txt

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8661 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/editing/execCommand/modifyForeColorByCharacter-expected.txt
LayoutTests/editing/pasteboard/paste-text-011-expected.txt
LayoutTests/editing/style/block-style-004-expected.txt
LayoutTests/editing/style/block-style-005-expected.txt
LayoutTests/editing/style/block-style-006-expected.txt
LayoutTests/editing/style/smoosh-styles-001-expected.txt
LayoutTests/editing/style/smoosh-styles-002-expected.txt
WebCore/ChangeLog-2005-08-23
WebCore/khtml/editing/htmlediting.cpp
WebCore/khtml/editing/htmlediting.h