haikuwebkit/LayoutTests/svg/custom/getBoundingClientRect-expec...

39 lines
828 B
Plaintext
Raw Permalink Normal View History

2010-11-29 Cosmin Truta <ctruta@chromium.org> Reviewed by Nikolas Zimmermann. getBoundingClientRect: Do not truncate the coordinates to integers https://bugs.webkit.org/show_bug.cgi?id=48110 Enhanced some of the tests for getBoundingClientRect, and added zooming tests. * css3/zoom-coords-expected.txt: Updated. * css3/zoom-coords.xhtml: Wrapped the <svg> elements in a <div>, to avoid re-layout on zooming or resizing. Added a test for getBoundingClientRect on unzoomed elements. * fast/dom/Element/getBoundingClientRect-expected.txt: Updated. * fast/dom/Element/getBoundingClientRect.html: Accounted for non-integer coordinates; used the Ahem font for uniform results; removed the hard-coded dependencies on font metrics. * fast/dom/Range/getBoundingClientRect-expected.txt: Updated. * fast/dom/Range/getBoundingClientRect.html: Accounted for non-integer coordinates; used the Ahem font for uniform results; removed the hard-coded dependencies on font metrics. * platform/chromium-win/fast/dom/Element/getBoundingClientRect-expected.txt: Deleted. * platform/chromium-win/fast/dom/Range/getBoundingClientRect-expected.txt: Deleted. * svg/custom/getBBox-js.svg: Fixed indentation. * svg/custom/getBoundingClientRect.xhtml: Wrapped the <svg> elements in a <div>, to avoid re-layout on zooming or resizing. * svg/zoom/page/zoom-getBoundingClientRect-expected.txt: Added. * svg/zoom/page/zoom-getBoundingClientRect.xhtml: Added. * svg/zoom/page/zoom-zoom-coords-expected.txt: Added. * svg/zoom/page/zoom-zoom-coords.xhtml: Added. * svg/zoom/resources/testPageZoom.js: Added call to completeDynamicTest on post-zoom. (completeDynamicTest): Added. 2010-11-29 Cosmin Truta <ctruta@chromium.org> Reviewed by Nikolas Zimmermann. getBoundingClientRect: Do not truncate the coordinates to integers https://bugs.webkit.org/show_bug.cgi?id=48110 Remove the float-to-int coordinate conversions inside getBoundingClientRect, to comply with the CSSOM View Module API. Tests: fast/dom/Element/getBoundingClientRect.html fast/dom/Range/getBoundingClientRect.html svg/zoom/page/zoom-getBoundingClientRect.xhtml svg/zoom/page/zoom-zoom-coords.xhtml * dom/ClientRect.cpp: (WebCore::ClientRect::ClientRect): Added overload to allow a FloatRect argument. * dom/ClientRect.h: (WebCore::ClientRect::create): Ditto. * dom/Element.cpp: (Element::getBoundingClientRect): Removed conversion from FloatRect to IntRect. * dom/Range.cpp: (WebCore::Range::getBoundingClientRect): Ditto. * rendering/RenderObject.h: (adjustIntRectForAbsoluteZoom): Removed. (adjustFloatRectForAbsoluteZoom): Added. * rendering/style/RenderStyle.h: (adjustFloatForAbsoluteZoom): Added. Canonical link: https://commits.webkit.org/63285@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@72826 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-11-29 21:37:39 +00:00
This test checks getBoundingClientRect() on rectangles
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Checking a rectangle of absolute size at absolute coordinates:
PASS r1.left is 20
PASS r1.top is 30
PASS r1.width is 40
PASS r1.height is 50
PASS r1.right is 60
PASS r1.bottom is 80
Checking a resized rectangle at relative coordinates:
PASS r2.left is 180
PASS r2.top is 15
PASS r2.width is 160
PASS r2.height is 25
PASS r2.right is 340
PASS r2.bottom is 40
Checking rectangles with overflow:
PASS r3.left is 300
PASS r3.top is 0
PASS r3.width is 210
PASS r3.height is 50
PASS r3.right is 510
PASS r3.bottom is 50
PASS r4.left is 300
PASS r4.top is 50
PASS r4.width is 210
PASS r4.height is 60
PASS r4.right is 510
PASS r4.bottom is 110
PASS successfullyParsed is true
TEST COMPLETE