WebCore:
authorjustin.garcia@apple.com <justin.garcia@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Mar 2008 03:15:17 +0000 (03:15 +0000)
committerjustin.garcia@apple.com <justin.garcia@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Mar 2008 03:15:17 +0000 (03:15 +0000)
commitc358b7e2e3155245c8fc856c2444091e3f156dc3
treef73c45583cb70b00f00265e225afe82fd5e28ef1
parent83fe7564a01c17a10ad2339c33ef620af6dd259b
WebCore:

2008-03-19  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Oliver.

        <rdar://problem/5780697> Copying content with CSS property values that are percentages can cause fidelity issues

        Elements with height: x%; overflow: visible; overlap what's below them when they are copied from
        a document in quirksmode and pasted into to one in standards mode.  This fix uses the computed
        the value for a property if its value is a percentage.

        * css/CSSMutableStyleDeclaration.cpp:
        (WebCore::CSSMutableStyleDeclaration::addParsedProperty): Added so that we don't have to use
        setProperty from appendStartMarkup.  We already have a parsed property value, so we shouldn't
        use setProperty, since it takes in a String.  If we did, we would have to call CSSValue::cssText()
        for a String only to re-parse it in setProperty.  This wasn't extremely important now, but it will
        be as we compute more properties to fix the rest of the copy/paste fidelity bugs.
        * css/CSSMutableStyleDeclaration.h:
        * editing/markup.cpp:
        (WebCore::appendStartMarkup): Compute values for properties that have percentage values.  We could
        perhaps narrow this special case to only include properties that are effected by quirksmode.

LayoutTests:

2008-03-19  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by Oliver.

        <rdar://problem/5780697> Copying content with CSS property values that are percentages can cause fidelity issues

        * editing/pasteboard/5780697-2-expected.txt: Added.
        * editing/pasteboard/5780697-2.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31169 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/editing/pasteboard/5780697-2-expected.txt [new file with mode: 0644]
LayoutTests/editing/pasteboard/5780697-2.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/css/CSSMutableStyleDeclaration.cpp
WebCore/css/CSSMutableStyleDeclaration.h
WebCore/editing/markup.cpp