Reviewed by Hyatt
authorkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 21 Feb 2005 22:01:07 +0000 (22:01 +0000)
committerkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 21 Feb 2005 22:01:07 +0000 (22:01 +0000)
commit4f50babd117b22ecb92040da88b6c9e747c81631
tree4d73b1b2122f8665781bcc7dc5629bcbf7ab4368
parenta4a76dcbe65aa3b9ad4ffa15c845646f4af80d54
    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/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@8651 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/editing/execCommand/modifyForeColorByCharacter-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