2010-07-01 Andreas Kling <andreas.kling@nokia.com>
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Jul 2010 21:44:33 +0000 (21:44 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Jul 2010 21:44:33 +0000 (21:44 +0000)
commite44f4c291ac76e54f518371029a586ab20bf0765
tree003df836db4820001f5a041e537dfa86259de048
parent6170e81375f3a49718b784359e04a355c2469aa2
2010-07-01  Andreas Kling  <andreas.kling@nokia.com>

        Reviewed by Darin Adler.

        Add test for checking that canvas elements can't have a negative width or height.
        https://bugs.webkit.org/show_bug.cgi?id=39149

        Unskipped 2 canvas/philip/ tests that now pass.

        Spec link:
        http://www.whatwg.org/specs/web-apps/current-work/#attr-canvas-width

        * canvas/philip/tests/size.attributes.parse.minus-expected.txt:
        * canvas/philip/tests/size.attributes.setAttribute.minus-expected.txt:
        * fast/canvas/canvas-negative-size-expected.txt: Added.
        * fast/canvas/canvas-negative-size.html: Added.
        * fast/canvas/script-tests/canvas-negative-size.js: Added.
        (createFromMarkup):
        (trySettingWidth):
        (trySettingHeight):
        (trySettingWidthAttribute):
        (trySettingHeightAttribute):
        (tryCreatingCanvasWithWidth):
        (tryCreatingCanvasWithHeight):
        (tryWidth):
        (tryHeight):
        (checkDefaultWidth):
        (checkDefaultHeight):
        * platform/mac/Skipped:
        * platform/qt/Skipped:
2010-07-01  Andreas Kling  <andreas.kling@nokia.com>

        Reviewed by Darin Adler.

        Canvas element cannot have negative width or height (HTML5 spec 4.8.11)
        https://bugs.webkit.org/show_bug.cgi?id=39149

        If assigned a negative value, it should default to 300 for width and 150 for height.

        Spec link:
        http://www.whatwg.org/specs/web-apps/current-work/#attr-canvas-width

        Test: fast/canvas/canvas-negative-size.html

        * html/HTMLCanvasElement.cpp:
        (WebCore::HTMLCanvasElement::reset):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@62299 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/canvas/philip/tests/size.attributes.parse.minus-expected.txt
LayoutTests/canvas/philip/tests/size.attributes.setAttribute.minus-expected.txt
LayoutTests/fast/canvas/canvas-negative-size-expected.txt [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-negative-size.html [new file with mode: 0644]
LayoutTests/fast/canvas/script-tests/canvas-negative-size.js [new file with mode: 0644]
LayoutTests/platform/mac/Skipped
LayoutTests/platform/qt/Skipped
WebCore/ChangeLog
WebCore/html/HTMLCanvasElement.cpp