haikuwebkit/LayoutTests/geometry/DOMRect-001-expected.txt

28 lines
920 B
Plaintext
Raw Permalink Normal View History

Implement DOMRect/DOMRectReadOnly https://bugs.webkit.org/show_bug.cgi?id=163464 Reviewed by Darin Adler. Source/WebCore: Implement the DOMRectInit/DOMRectReadOnly/DOMRect interfaces specified in https://dev.w3.org/fxtf/geometry/ DOMRects allow negative height/width and require double storage, so we can't just use FloatRect for storage. They also require handling of NaN and Infinity. To have the left/right/top/bottom accessors follow IEEE NaN rules, we need to use custom min/max functions that return NaN if either argument is NaN, so add nanPropagatingMin/nanPropagatingMax helpers to MathExtras.h. Test: fast/dom/domrect.html * CMakeLists.txt: * DerivedSources.make: * WebCore.xcodeproj/project.pbxproj: * dom/DOMRect.h: Added. (WebCore::DOMRect::create): (WebCore::DOMRect::fromRect): (WebCore::DOMRect::setX): (WebCore::DOMRect::setY): (WebCore::DOMRect::setWidth): (WebCore::DOMRect::setHeight): (WebCore::DOMRect::DOMRect): * dom/DOMRect.idl: Added. * dom/DOMRectInit.h: Added. * dom/DOMRectInit.idl: Added. * dom/DOMRectReadOnly.h: Added. (WebCore::DOMRectReadOnly::create): (WebCore::DOMRectReadOnly::fromRect): (WebCore::DOMRectReadOnly::x): (WebCore::DOMRectReadOnly::y): (WebCore::DOMRectReadOnly::width): (WebCore::DOMRectReadOnly::height): (WebCore::DOMRectReadOnly::top): (WebCore::DOMRectReadOnly::right): (WebCore::DOMRectReadOnly::bottom): (WebCore::DOMRectReadOnly::left): (WebCore::DOMRectReadOnly::DOMRectReadOnly): * dom/DOMRectReadOnly.idl: Added. Source/WTF: Implement min()/max() in a way that follows Math.min/Math.max, which return NaN if either argument is NaN. * wtf/MathExtras.h: (WTF::nanPropagatingMin): (WTF::nanPropagatingMax): LayoutTests: New test and new results for global constructor tests. * geometry/DOMRect-001-expected.txt: Added. * geometry/DOMRect-001.html: Added. * js/dom/global-constructors-attributes-dedicated-worker-expected.txt: * js/dom/global-constructors-attributes-expected.txt: * platform/efl/js/dom/global-constructors-attributes-expected.txt: * platform/gtk/js/dom/global-constructors-attributes-expected.txt: * platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt: * platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt: * platform/mac/js/dom/global-constructors-attributes-expected.txt: * platform/win/js/dom/global-constructors-attributes-expected.txt: Canonical link: https://commits.webkit.org/181356@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@207438 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-10-17 22:30:34 +00:00
Test DOMRect and DOMRectReadOnly interfaces
PASS testDOMRectReadOnlyConstructor0
PASS testDOMRectReadOnlyConstructor4Args
PASS testDOMRectReadOnlyConstructor1Arg
PASS testDOMRectReadOnlyConstructor2Args
PASS testDOMRectReadOnlyConstructor3Args
PASS testDOMRectReadOnlyConstructorDoublePrecision
PASS testDOMRectReadOnlyConstructorNegativeWidth
PASS testDOMRectReadOnlyConstructorNegativeHeight
PASS testDOMRectReadOnlyConstructorNaN1
PASS testDOMRectReadOnlyConstructorNaN2
PASS testDOMRectReadOnlyConstructorInf1
PASS testDOMRectReadOnlyConstructorInf2
PASS testDOMRectReadOnlyIsReadOnly
PASS testDOMRectReadOnlyFromRect
PASS testFromRectReturnsDOMRectReadOnly
PASS testDOMRectReadOnlyFromRectPartial
PASS testDOMRectReadOnlySerialization
PASS testDOMRectConstructor0
PASS testDOMRectIsWritable
PASS testDOMRectIsWritableWithNaN
PASS testFromRectReturnsDOMRect
PASS testDOMRectFromRect
PASS testDOMRectSerialization
Implement DOMRect/DOMRectReadOnly https://bugs.webkit.org/show_bug.cgi?id=163464 Reviewed by Darin Adler. Source/WebCore: Implement the DOMRectInit/DOMRectReadOnly/DOMRect interfaces specified in https://dev.w3.org/fxtf/geometry/ DOMRects allow negative height/width and require double storage, so we can't just use FloatRect for storage. They also require handling of NaN and Infinity. To have the left/right/top/bottom accessors follow IEEE NaN rules, we need to use custom min/max functions that return NaN if either argument is NaN, so add nanPropagatingMin/nanPropagatingMax helpers to MathExtras.h. Test: fast/dom/domrect.html * CMakeLists.txt: * DerivedSources.make: * WebCore.xcodeproj/project.pbxproj: * dom/DOMRect.h: Added. (WebCore::DOMRect::create): (WebCore::DOMRect::fromRect): (WebCore::DOMRect::setX): (WebCore::DOMRect::setY): (WebCore::DOMRect::setWidth): (WebCore::DOMRect::setHeight): (WebCore::DOMRect::DOMRect): * dom/DOMRect.idl: Added. * dom/DOMRectInit.h: Added. * dom/DOMRectInit.idl: Added. * dom/DOMRectReadOnly.h: Added. (WebCore::DOMRectReadOnly::create): (WebCore::DOMRectReadOnly::fromRect): (WebCore::DOMRectReadOnly::x): (WebCore::DOMRectReadOnly::y): (WebCore::DOMRectReadOnly::width): (WebCore::DOMRectReadOnly::height): (WebCore::DOMRectReadOnly::top): (WebCore::DOMRectReadOnly::right): (WebCore::DOMRectReadOnly::bottom): (WebCore::DOMRectReadOnly::left): (WebCore::DOMRectReadOnly::DOMRectReadOnly): * dom/DOMRectReadOnly.idl: Added. Source/WTF: Implement min()/max() in a way that follows Math.min/Math.max, which return NaN if either argument is NaN. * wtf/MathExtras.h: (WTF::nanPropagatingMin): (WTF::nanPropagatingMax): LayoutTests: New test and new results for global constructor tests. * geometry/DOMRect-001-expected.txt: Added. * geometry/DOMRect-001.html: Added. * js/dom/global-constructors-attributes-dedicated-worker-expected.txt: * js/dom/global-constructors-attributes-expected.txt: * platform/efl/js/dom/global-constructors-attributes-expected.txt: * platform/gtk/js/dom/global-constructors-attributes-expected.txt: * platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt: * platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt: * platform/mac/js/dom/global-constructors-attributes-expected.txt: * platform/win/js/dom/global-constructors-attributes-expected.txt: Canonical link: https://commits.webkit.org/181356@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@207438 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-10-17 22:30:34 +00:00