LayoutTests:
authorjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Jan 2007 23:07:46 +0000 (23:07 +0000)
committerjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Jan 2007 23:07:46 +0000 (23:07 +0000)
commitb41cea40555eff68eb1604b8dc751d88ae27f9a6
tree435fa384486d53f6bbd99f970a3e0adabd2f2d82
parent3fe4745ee06774f0ece37006542b080c832fd0fe
LayoutTests:

        Reviewed by hyatt

        <rdar://problem/4875425>
        EBay, GMail, and GoogleDocs RTEs font size popups don't work

        Added to test changes:
        * editing/style/fontsize-1-expected.checksum: Added.
        * editing/style/fontsize-1-expected.png: Added.
        * editing/style/fontsize-1-expected.txt: Added.
        * editing/style/fontsize-1.html: Added.

        Removed use of "px" and "pt" values passed to
        execCommand("FontSize", ...) (other browsers don't
        support them):
        * editing/input/attributed-substring-from-range-lines.html-disabled:
        * editing/style/block-style-004-expected.checksum:
        * editing/style/block-style-004-expected.png:
        * editing/style/block-style-004-expected.txt:
        * editing/style/block-style-004.html:
        * editing/style/block-style-005-expected.checksum:
        * editing/style/block-style-005-expected.png:
        * editing/style/block-style-005-expected.txt:
        * editing/style/block-style-005.html:
        * editing/style/block-style-006-expected.checksum:
        * editing/style/block-style-006-expected.png:
        * editing/style/block-style-006-expected.txt:
        * editing/style/block-style-006.html:

WebCore:

        Reviewed by hyatt

        <rdar://problem/4875425>
        EBay, GMail, and GoogleDocs RTEs font size popups don't work

        Changed execCommand("FontSize", ...) to match the spec
        and the behavior of other browsers.  It expects a number,
        n, which, the spec says can be 1 through 7.  Other browsers
        perform the font size change by creating a font element
        wrapper with size="n".  We convert n into one of the absolute
        size CSS keywords (x-small, medium, etc.).

        * editing/JSEditor.cpp: Call cssValueFromFontSizeNumber.  If
        successful, perform the style change.
        * html/HTMLFontElement.cpp:
        (WebCore::HTMLFontElement::cssValueFromFontSizeNumber):  Added.
        Moved this code from parsedMappedAttribute so that it could be
        called from the Editor.
        (WebCore::HTMLFontElement::parseMappedAttribute): Moved code into
        cssValueFromFontSizeNumber.
        * html/HTMLFontElement.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@18820 268f45cc-cd09-0410-ab3c-d52691b4dbfc
21 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/style/block-style-004-expected.checksum
LayoutTests/editing/style/block-style-004-expected.png
LayoutTests/editing/style/block-style-004-expected.txt
LayoutTests/editing/style/block-style-004.html
LayoutTests/editing/style/block-style-005-expected.checksum
LayoutTests/editing/style/block-style-005-expected.png
LayoutTests/editing/style/block-style-005-expected.txt
LayoutTests/editing/style/block-style-005.html
LayoutTests/editing/style/block-style-006-expected.checksum
LayoutTests/editing/style/block-style-006-expected.png
LayoutTests/editing/style/block-style-006-expected.txt
LayoutTests/editing/style/block-style-006.html
LayoutTests/editing/style/fontsize-1-expected.checksum [new file with mode: 0644]
LayoutTests/editing/style/fontsize-1-expected.png [new file with mode: 0644]
LayoutTests/editing/style/fontsize-1-expected.txt [new file with mode: 0644]
LayoutTests/editing/style/fontsize-1.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/editing/JSEditor.cpp
WebCore/html/HTMLFontElement.cpp
WebCore/html/HTMLFontElement.h