Nothing Special »
Address
:
[go:
up one dir
,
main page
]
Include Form
Remove Scripts
Accept Cookies
Show Images
Show Referer
Rotate13
Base64
Strip Meta
Strip Title
Session Cookies
Bugzilla
Quick Search
Browse
Advanced Search
Reports
Quick Search Help
Documentation
New Account
Log In
Login with GitHub
Remember
Forgot Password
Mozilla Home
Privacy
Cookies
Legal
Attachment 807616 Details for
Bug 918189
[patch]
Part 3: Refactor getBoxQuads test so it can test convertPoint/Rect/Quad as well
918189-refactor-test (text/plain), 21.57 KB, created by
Robert O'Callahan (:roc) (email my personal email if necessary)
(
hide
)
Description:
Part 3: Refactor getBoxQuads test so it can test convertPoint/Rect/Quad as well
Filename:
MIME Type:
Creator:
Robert O'Callahan (:roc) (email my personal email if necessary)
Size:
21.57 KB
patch
obsolete
>From: Robert O'Callahan <robert@ocallahan.org> >Bug 918189. Part 3: Refactor getBoxQuads test so it can test convertPoint/Rect/Quad as well. r=mats > >diff --git a/layout/base/tests/Makefile.in b/layout/base/tests/Makefile.in >--- a/layout/base/tests/Makefile.in >+++ b/layout/base/tests/Makefile.in >@@ -140,17 +140,17 @@ MOCHITEST_FILES = \ > file_bug842853.html \ > test_bug849219.html \ > test_bug851485.html \ > test_bug851445.html \ > bug851445_helper.html \ > test_emulateMedium.html \ > enableTestPlugin.js \ > test_getClientRects_emptytext.html \ >- test_getBoxQuads.html \ >+ test_getBoxQuads_convertPointRectQuad.html \ > $(NULL) > > ifeq (,$(filter gonk,$(MOZ_WIDGET_TOOLKIT))) > # THESE TESTS (BELOW) DO NOT RUN ON B2G > MOCHITEST_FILES += \ > test_bug858459.html \ > $(NULL) > # THESE TESTS (ABOVE) DO NOT RUN ON B2G >diff --git a/layout/base/tests/test_getBoxQuads.html b/layout/base/tests/test_getBoxQuads_convertPointRectQuad.html >rename from layout/base/tests/test_getBoxQuads.html >rename to layout/base/tests/test_getBoxQuads_convertPointRectQuad.html >--- a/layout/base/tests/test_getBoxQuads.html >+++ b/layout/base/tests/test_getBoxQuads_convertPointRectQuad.html >@@ -14,60 +14,76 @@ var text; > var suppressedText; > var notInDocument = document.createElement('div'); > > function isEval(expr, b) { > is(eval(expr), b, expr); > } > > function isApprox(a, b, msg, options) { >- if (a != b && options && 'tolerance' in options && >+ if (a != b && 'tolerance' in options && > Math.abs(a - b) < options.tolerance) { > ok(true, msg + "(" + a + " within " + options.tolerance + " of " + b + ")"); > return; > } > is(a, b, msg); > } > >-function checkQuadIsRect(expr, x, y, w, h, options) { >- var quads = eval(expr); >- is(quads.length, 1, expr + " checking quad count"); >- var q = quads[0]; >- isApprox(q.p1.x, x, expr + " checking quad.p1.x", options); >- isApprox(q.p1.y, y, expr + " checking quad.p1.y", options); >- isApprox(q.p2.x, x + w, expr + " checking quad.p2.x", options); >- isApprox(q.p2.y, y, expr + " checking quad.p2.y", options); >- isApprox(q.p3.x, x + w, expr + " checking quad.p3.x", options); >- isApprox(q.p3.y, y + h, expr + " checking quad.p3.y", options); >- isApprox(q.p4.x, x, expr + " checking quad.p4.x", options); >- isApprox(q.p4.y, y + h, expr + " checking quad.p4.y", options); >- >- isApprox(q.bounds.left, x, expr + " checking quad.bounds.left", options); >- isApprox(q.bounds.top, y, expr + " checking quad.bounds.top", options); >- isApprox(q.bounds.width, w, expr + " checking quad.bounds.width", options); >- isApprox(q.bounds.height, h, expr + " checking quad.bounds.height", options); >+function makeQuadsExpr(fromStr, options) { >+ var getBoxQuadsOptionParts = []; >+ if ('box' in options) { >+ getBoxQuadsOptionParts.push("box:'" + options.box + "'"); >+ } >+ if ('toStr' in options) { >+ getBoxQuadsOptionParts.push("relativeTo:" + options.toStr); >+ } >+ if ('toBox' in options) { >+ getBoxQuadsOptionParts.push("relativeToBox:'" + options.toBox + "'"); >+ } >+ return fromStr + ".getBoxQuads({" + getBoxQuadsOptionParts.join(',') + "})"; > } > >-function checkQuadIsQuad(expr, x1, y1, x2, y2, x3, y3, x4, y4, options) { >- var quads = eval(expr); >- is(quads.length, 1, expr + " checking quad count"); >+function checkQuadIsRect(fromStr, options, x, y, w, h) { >+ var quadsExpr = makeQuadsExpr(fromStr, options); >+ var quads = eval(quadsExpr); >+ is(quads.length, 1, quadsExpr + " checking quad count"); > var q = quads[0]; >- isApprox(q.p1.x, x1, expr + " checking quad.p1.x", options); >- isApprox(q.p1.y, y1, expr + " checking quad.p1.y", options); >- isApprox(q.p2.x, x2, expr + " checking quad.p2.x", options); >- isApprox(q.p2.y, y2, expr + " checking quad.p2.y", options); >- isApprox(q.p3.x, x3, expr + " checking quad.p3.x", options); >- isApprox(q.p3.y, y3, expr + " checking quad.p3.y", options); >- isApprox(q.p4.x, x4, expr + " checking quad.p4.x", options); >- isApprox(q.p4.y, y4, expr + " checking quad.p4.y", options); >+ isApprox(q.p1.x, x, quadsExpr + " checking quad.p1.x", options); >+ isApprox(q.p1.y, y, quadsExpr + " checking quad.p1.y", options); >+ isApprox(q.p2.x, x + w, quadsExpr + " checking quad.p2.x", options); >+ isApprox(q.p2.y, y, quadsExpr + " checking quad.p2.y", options); >+ isApprox(q.p3.x, x + w, quadsExpr + " checking quad.p3.x", options); >+ isApprox(q.p3.y, y + h, quadsExpr + " checking quad.p3.y", options); >+ isApprox(q.p4.x, x, quadsExpr + " checking quad.p4.x", options); >+ isApprox(q.p4.y, y + h, quadsExpr + " checking quad.p4.y", options); > >- isApprox(q.bounds.left, Math.min(x1,x2,x3,x4), expr + " checking quad.bounds.left", options); >- isApprox(q.bounds.top, Math.min(y1,y2,y3,y4), expr + " checking quad.bounds.top", options); >- isApprox(q.bounds.right, Math.max(x1,x2,x3,x4), expr + " checking quad.bounds.right", options); >- isApprox(q.bounds.bottom, Math.max(y1,y2,y3,y4), expr + " checking quad.bounds.bottom", options); >+ isApprox(q.bounds.left, x, quadsExpr + " checking quad.bounds.left", options); >+ isApprox(q.bounds.top, y, quadsExpr + " checking quad.bounds.top", options); >+ isApprox(q.bounds.width, w, quadsExpr + " checking quad.bounds.width", options); >+ isApprox(q.bounds.height, h, quadsExpr + " checking quad.bounds.height", options); >+} >+ >+function checkQuadIsQuad(fromStr, options, x1, y1, x2, y2, x3, y3, x4, y4) { >+ var quadsExpr = makeQuadsExpr(fromStr, options); >+ var quads = eval(quadsExpr); >+ is(quads.length, 1, quadsExpr + " checking quad count"); >+ var q = quads[0]; >+ isApprox(q.p1.x, x1, quadsExpr + " checking quad.p1.x", options); >+ isApprox(q.p1.y, y1, quadsExpr + " checking quad.p1.y", options); >+ isApprox(q.p2.x, x2, quadsExpr + " checking quad.p2.x", options); >+ isApprox(q.p2.y, y2, quadsExpr + " checking quad.p2.y", options); >+ isApprox(q.p3.x, x3, quadsExpr + " checking quad.p3.x", options); >+ isApprox(q.p3.y, y3, quadsExpr + " checking quad.p3.y", options); >+ isApprox(q.p4.x, x4, quadsExpr + " checking quad.p4.x", options); >+ isApprox(q.p4.y, y4, quadsExpr + " checking quad.p4.y", options); >+ >+ isApprox(q.bounds.left, Math.min(x1,x2,x3,x4), quadsExpr + " checking quad.bounds.left", options); >+ isApprox(q.bounds.top, Math.min(y1,y2,y3,y4), quadsExpr + " checking quad.bounds.top", options); >+ isApprox(q.bounds.right, Math.max(x1,x2,x3,x4), quadsExpr + " checking quad.bounds.right", options); >+ isApprox(q.bounds.bottom, Math.max(y1,y2,y3,y4), quadsExpr + " checking quad.bounds.bottom", options); > } > </script> > <style> > em { > display:inline-block; height:10px; background:gray; > } > </style> > <div id="dContainer" >@@ -207,86 +223,86 @@ function runTest() { > suppressedText = suppressedTextContainer.firstChild; > > // Test basic BoxQuadOptions.box. > var dX = d.getBoundingClientRect().left; > var dY = d.getBoundingClientRect().top; > var dW = d.getBoundingClientRect().width; > var dH = d.getBoundingClientRect().height; > >- checkQuadIsRect("d.getBoxQuads({box:'content'})", >+ checkQuadIsRect("d", {box:"content"}, > dX + 4 + 8, dY + 1 + 5, 120, 90); >- checkQuadIsRect("d.getBoxQuads({box:'padding'})", >+ checkQuadIsRect("d", {box:"padding"}, > dX + 8, dY + 5, 120 + 2 + 4, 90 + 1 + 3); >- checkQuadIsRect("d.getBoxQuads({box:'border'})", >+ checkQuadIsRect("d", {box:"border"}, > dX, dY, dW, dH); >- checkQuadIsRect("d.getBoxQuads()", >+ checkQuadIsRect("d", {}, > dX, dY, 120 + 2 + 4 + 6 + 8, 90 + 1 + 3 + 5 + 7); >- checkQuadIsRect("d.getBoxQuads({box:'margin'})", >+ checkQuadIsRect("d", {box:"margin"}, > dX - 12, dY - 9, 120 + 2 + 4 + 6 + 8 + 10 + 12, 90 + 1 + 3 + 5 + 7 + 9 + 11); > > // Test basic BoxQuadOptions.relativeTo and BoxQuadOptions.relativeToBox. >- checkQuadIsRect("d.getBoxQuads({relativeTo:dContainer,relativeToBox:'content'})", >+ checkQuadIsRect("d", {toStr:"dContainer",toBox:"content"}, > 12, 9, dW, dH); >- checkQuadIsRect("d.getBoxQuads({relativeTo:dContainer,relativeToBox:'padding'})", >+ checkQuadIsRect("d", {toStr:"dContainer",toBox:"padding"}, > 12 + 16, 9 + 13, dW, dH); >- checkQuadIsRect("d.getBoxQuads({relativeTo:dContainer,relativeToBox:'border'})", >+ checkQuadIsRect("d", {toStr:"dContainer",toBox:"border"}, > 12 + 16 + 20, 9 + 13 + 17, dW, dH); >- checkQuadIsRect("d.getBoxQuads({relativeTo:dContainer})", >+ checkQuadIsRect("d", {toStr:"dContainer"}, > 12 + 16 + 20, 9 + 13 + 17, dW, dH); >- checkQuadIsRect("d.getBoxQuads({relativeTo:dContainer,relativeToBox:'margin'})", >+ checkQuadIsRect("d", {toStr:"dContainer",toBox:"margin"}, > 12 + 16 + 20 + 24, 9 + 13 + 17 + 21, dW, dH); > > // Test BoxQuadOptions.relativeTo relative to this document >- checkQuadIsRect("d.getBoxQuads({relativeTo:document})", >+ checkQuadIsRect("d", {toStr:"document"}, > dX, dY, dW, dH); > // Test BoxQuadOptions.relativeTo relative to a non-ancestor. > var dUnrelatedX = dUnrelated.getBoundingClientRect().left; > var dUnrelatedY = dUnrelated.getBoundingClientRect().top; >- checkQuadIsRect("d.getBoxQuads({relativeTo:dUnrelated})", >+ checkQuadIsRect("d", {toStr:"dUnrelated"}, > dX - dUnrelatedX, dY - dUnrelatedY, dW, dH); > // Test BoxQuadOptions.relativeTo relative to an element in a different document (and the document) > var f1X = f1.getBoundingClientRect().left; > var f1Y = f1.getBoundingClientRect().top; >- checkQuadIsRect("d.getBoxQuads({relativeTo:f1.contentWindow.f1d})", >- dX - (f1X + 14), dY - (f1Y + 15), dW, dH); >- checkQuadIsRect("d.getBoxQuads({relativeTo:f1.contentDocument})", >- dX - f1X, dY - f1Y, dW, dH); >+ checkQuadIsRect("d", {toStr:"f1.contentWindow.f1d"}, >+ dX - (f1X + 14), dY - (f1Y + 15), dW, dH); >+ checkQuadIsRect("d", {toStr:"f1.contentDocument"}, >+ dX - f1X, dY - f1Y, dW, dH); > // The box type is irrelevant for a document >- checkQuadIsRect("d.getBoxQuads({relativeTo:f1.contentDocument,relativeToBox:'content'})", >- dX - f1X, dY - f1Y, dW, dH); >+ checkQuadIsRect("d", {toStr:"f1.contentDocument",toBox:"content"}, >+ dX - f1X, dY - f1Y, dW, dH); > // Test one document relative to another >- checkQuadIsRect("f1.contentDocument.getBoxQuads({relativeTo:document})", >+ checkQuadIsRect("f1.contentDocument", {toStr:"document"}, > f1X, f1Y, 50, 50); > // The box type is irrelevant for a document >- checkQuadIsRect("f1.contentDocument.getBoxQuads({box:'content',relativeTo:document})", >+ checkQuadIsRect("f1.contentDocument", {toStr:"document",box:"content"}, > f1X, f1Y, 50, 50); >- checkQuadIsRect("f1.contentDocument.getBoxQuads({box:'margin',relativeTo:document})", >+ checkQuadIsRect("f1.contentDocument", {toStr:"document",box:"margin"}, > f1X, f1Y, 50, 50); >- checkQuadIsRect("f1.contentDocument.getBoxQuads({box:'padding',relativeTo:document})", >+ checkQuadIsRect("f1.contentDocument", {toStr:"document",box:"padding"}, > f1X, f1Y, 50, 50); > > // Test that anonymous boxes are correctly ignored when building quads. > var ibSplitPart1X = ibSplitPart1.getBoundingClientRect().left; > var ibSplitY = ibSplit.getBoundingClientRect().top; > isEval("ibSplit.getBoxQuads().length", 3); > isEval("ibSplit.getBoxQuads()[0].bounds.left", ibSplitPart1X); > isEval("ibSplit.getBoxQuads()[0].bounds.width", 100); > isEval("ibSplit.getBoxQuads()[1].bounds.width", 110); > isEval("ibSplit.getBoxQuads()[2].bounds.width", 130); > isEval("table.getBoxQuads().length", 2); > isEval("table.getBoxQuads()[0].bounds.height", 50); > isEval("table.getBoxQuads()[1].bounds.height", 40); > > // Test that we skip anonymous boxes when finding the right box to be relative to. >- checkQuadIsRect("d.getBoxQuads({relativeTo:ibSplit})", >+ checkQuadIsRect("d", {toStr:"ibSplit"}, > dX - ibSplitPart1X, dY - ibSplitY, dW, dH); > var tableX = table.getClientRects()[0].left; > var tableY = table.getClientRects()[0].top; >- checkQuadIsRect("d.getBoxQuads({relativeTo:table})", >+ checkQuadIsRect("d", {toStr:"table"}, > dX - tableX, dY - tableY, dW, dH); > > // Test boxes generated by block splitting. Check for borders being placed correctly. > var colSplitY = colSplit.getClientRects()[0].top; > isEval("colSplit.getBoxQuads().length", 2); > isEval("colSplit.getBoxQuads()[0].bounds.top", colSplitY); > isEval("colSplit.getBoxQuads()[0].bounds.height", 60); > isEval("colSplit.getBoxQuads()[1].bounds.top", colSplitY - 20); >@@ -351,140 +367,136 @@ function runTest() { > > isEval("displayNone.getBoxQuads().length", 0); > isEval("notInDocument.getBoxQuads().length", 0); > > // Test an overflow:hidden version of d. overflow:hidden should not affect > // the quads, basically. > var oHX = overflowHidden.getBoundingClientRect().left; > var oHY = overflowHidden.getBoundingClientRect().top; >- checkQuadIsRect("overflowHidden.getBoxQuads({box:'content'})", >+ checkQuadIsRect("overflowHidden", {box:"content"}, > oHX + 4 + 8, oHY + 1 + 5, 120, 90); >- checkQuadIsRect("overflowHidden.getBoxQuads({box:'padding'})", >+ checkQuadIsRect("overflowHidden", {box:"padding"}, > oHX + 8, oHY + 5, 120 + 2 + 4, 90 + 1 + 3); >- checkQuadIsRect("overflowHidden.getBoxQuads({box:'border'})", >+ checkQuadIsRect("overflowHidden", {box:"border"}, > oHX, oHY, 120 + 2 + 4 + 6 + 8, 90 + 1 + 3 + 5 + 7); >- checkQuadIsRect("overflowHidden.getBoxQuads()", >+ checkQuadIsRect("overflowHidden", {}, > oHX, oHY, 120 + 2 + 4 + 6 + 8, 90 + 1 + 3 + 5 + 7); >- checkQuadIsRect("overflowHidden.getBoxQuads({box:'margin'})", >+ checkQuadIsRect("overflowHidden", {box:"margin"}, > oHX - 12, oHY - 9, 120 + 2 + 4 + 6 + 8 + 10 + 12, 90 + 1 + 3 + 5 + 7 + 9 + 11); > > // Test an overflow:scroll version of d. I assume that boxes aren't affected > // by the scrollbar although it's not clear that this is correct. > var oSX = overflowScroll.getBoundingClientRect().left; > var oSY = overflowScroll.getBoundingClientRect().top; >- checkQuadIsRect("overflowScroll.getBoxQuads({box:'content'})", >+ checkQuadIsRect("overflowScroll", {box:"content"}, > oSX + 4 + 8, oSY + 1 + 5, 120, 90); >- checkQuadIsRect("overflowScroll.getBoxQuads({box:'padding'})", >+ checkQuadIsRect("overflowScroll", {box:"padding"}, > oSX + 8, oSY + 5, 120 + 2 + 4, 90 + 1 + 3); >- checkQuadIsRect("overflowScroll.getBoxQuads({box:'border'})", >+ checkQuadIsRect("overflowScroll", {box:"border"}, > oSX, oSY, 120 + 2 + 4 + 6 + 8, 90 + 1 + 3 + 5 + 7); >- checkQuadIsRect("overflowScroll.getBoxQuads()", >+ checkQuadIsRect("overflowScroll", {}, > oSX, oSY, 120 + 2 + 4 + 6 + 8, 90 + 1 + 3 + 5 + 7); >- checkQuadIsRect("overflowScroll.getBoxQuads({box:'margin'})", >+ checkQuadIsRect("overflowScroll", {box:"margin"}, > oSX - 12, oSY - 9, 120 + 2 + 4 + 6 + 8 + 10 + 12, 90 + 1 + 3 + 5 + 7 + 9 + 11); > > // Test simple 2D transforms. > var stcX = scaleTransformContainer.getBoundingClientRect().left; > var stcY = scaleTransformContainer.getBoundingClientRect().top; >- checkQuadIsRect("scaleTransform.getBoxQuads()", >+ checkQuadIsRect("scaleTransform", {}, > stcX, stcY, 140, 160); > var ttcX = translateTransformContainer.getBoundingClientRect().left; > var ttcY = translateTransformContainer.getBoundingClientRect().top; >- checkQuadIsRect("translateTransform.getBoxQuads()", >+ checkQuadIsRect("translateTransform", {}, > ttcX + 30, ttcY + 40, 70, 80); > // Test mapping into a transformed element. >- checkQuadIsRect("scaleTransform.getBoxQuads({relativeTo:translateTransform})", >+ checkQuadIsRect("scaleTransform", {toStr:"translateTransform"}, > stcX - (ttcX + 30), stcY - (ttcY + 40), 140, 160); > // Test 90 degree rotation. > var rotatetcX = rotateTransformContainer.getBoundingClientRect().left; > var rotatetcY = rotateTransformContainer.getBoundingClientRect().top; >- checkQuadIsQuad("rotateTransform.getBoxQuads()", >+ checkQuadIsQuad("rotateTransform", {}, > rotatetcX + 75, rotatetcY + 5, > rotatetcX + 75, rotatetcY + 75, > rotatetcX - 5, rotatetcY + 75, > rotatetcX - 5, rotatetcY + 5); > // Test vertical flip. > var fliptcX = flipTransformContainer.getBoundingClientRect().left; > var fliptcY = flipTransformContainer.getBoundingClientRect().top; >- checkQuadIsQuad("flipTransform.getBoxQuads()", >+ checkQuadIsQuad("flipTransform", {}, > fliptcX, fliptcY + 80, > fliptcX + 70, fliptcY + 80, > fliptcX + 70, fliptcY, > fliptcX, fliptcY); > // Test non-90deg rotation. > var rot45tcX = rot45TransformContainer.getBoundingClientRect().left; > var rot45tcY = rot45TransformContainer.getBoundingClientRect().top; > var halfDiagonal = 100/Math.sqrt(2); >- checkQuadIsQuad("rot45Transform.getBoxQuads()", >+ checkQuadIsQuad("rot45Transform", {tolerance:0.0001}, > rot45tcX + 50, rot45tcY + 50 - halfDiagonal, > rot45tcX + 50 + halfDiagonal, rot45tcY + 50, > rot45tcX + 50, rot45tcY + 50 + halfDiagonal, >- rot45tcX + 50 - halfDiagonal, rot45tcY + 50, >- {tolerance:0.0001}); >+ rot45tcX + 50 - halfDiagonal, rot45tcY + 50); > > // Test singular transforms. > var singularTransformX = singularTransform.getBoundingClientRect().left; > var singularTransformY = singularTransform.getBoundingClientRect().top; > // They map everything to a point. >- checkQuadIsRect("singularTransform.getBoxQuads()", >+ checkQuadIsRect("singularTransform", {}, > singularTransformX, singularTransformY, 0, 0); >- checkQuadIsRect("singularTransformChild2.getBoxQuads()", >+ checkQuadIsRect("singularTransformChild2", {}, > singularTransformX, singularTransformY, 0, 0); > // Mapping into an element with a singular transform from outside sets > // everything to zero. >- checkQuadIsRect("d.getBoxQuads({relativeTo:singularTransform})", >+ checkQuadIsRect("d", {toStr:"singularTransform"}, > 0, 0, 0, 0); > // But mappings within a subtree of an element with a singular transform work. >- checkQuadIsRect("singularTransformChild2.getBoxQuads({relativeTo:singularTransformChild1})", >+ checkQuadIsRect("singularTransformChild2", {toStr:"singularTransformChild1"}, > 0, 50, 200, 50); > > // Test 3D transforms. > var t3tcX = threeDTransformContainer.getBoundingClientRect().left; > var t3tcY = threeDTransformContainer.getBoundingClientRect().top; >- checkQuadIsQuad("threeDTransform.getBoxQuads()", >+ checkQuadIsQuad("threeDTransform", {tolerance:0.0001}, > t3tcX + 59.446714, t3tcY - 18.569847, > t3tcX + 129.570778, t3tcY + 13.540874, > t3tcX + 129.570778, t3tcY + 100, >- t3tcX + 59.446714, t3tcY + 100, >- {tolerance:0.0001}); >+ t3tcX + 59.446714, t3tcY + 100); > // Test nested 3D transforms (without preserve-3d). >- checkQuadIsQuad("threeDTransformChild.getBoxQuads()", >+ checkQuadIsQuad("threeDTransformChild", {tolerance:0.0001}, > t3tcX + 89.395061, t3tcY + 2.243033, > t3tcX + 113.041727, t3tcY - 2.758530, > t3tcX + 113.041727, t3tcY + 52.985921, >- t3tcX + 89.395061, t3tcY + 47.571899, >- {tolerance:0.0001}); >+ t3tcX + 89.395061, t3tcY + 47.571899); > // Test preserve-3D. > var p3dtcX = preserve3DTransformContainer.getBoundingClientRect().left; > var p3dtcY = preserve3DTransformContainer.getBoundingClientRect().top; >- checkQuadIsRect("preserve3DTransformChild.getBoxQuads()", >+ checkQuadIsRect("preserve3DTransformChild", {tolerance:0.0001}, > p3dtcX, p3dtcY, 200, 50, > {tolerance:0.0001}); > // Test mapping back into preserve-3D. >- checkQuadIsRect("d.getBoxQuads({relativeTo:preserve3DTransformChild})", >- dX - p3dtcX, dY - p3dtcY, dW, dH, >- {tolerance:0.0001}); >+ checkQuadIsRect("d", {toStr:"preserve3DTransformChild",tolerance:0.0001}, >+ dX - p3dtcX, dY - p3dtcY, dW, dH); > > // Test SVG. > var svgContainerX = svgContainer.getBoundingClientRect().left; > var svgContainerY = svgContainer.getBoundingClientRect().top; >- checkQuadIsRect("circle.getBoxQuads()", >+ checkQuadIsRect("circle", {}, > svgContainerX + 30, svgContainerY + 30, 40, 40); > // Box types are ignored for SVG elements. >- checkQuadIsRect("circle.getBoxQuads({box:'content'})", >+ checkQuadIsRect("circle", {box:"content"}, > svgContainerX + 30, svgContainerY + 30, 40, 40); >- checkQuadIsRect("circle.getBoxQuads({box:'padding'})", >+ checkQuadIsRect("circle", {box:"padding"}, > svgContainerX + 30, svgContainerY + 30, 40, 40); >- checkQuadIsRect("circle.getBoxQuads({box:'margin'})", >+ checkQuadIsRect("circle", {box:"margin"}, > svgContainerX + 30, svgContainerY + 30, 40, 40); >- checkQuadIsRect("d.getBoxQuads({relativeTo:circle})", >+ checkQuadIsRect("d", {toStr:"circle"}, > dX - (svgContainerX + 30), dY - (svgContainerY + 30), dW, dH); > // Test foreignObject inside an SVG transform. >- checkQuadIsRect("foreign.getBoxQuads()", >+ checkQuadIsRect("foreign", {}, > svgContainerX + 100, svgContainerY + 40, 200, 120); > > // XXX Test SVG text (probably broken; unclear what the best way is to handle it) > > // Test that converting between nodes in different toplevel browsing contexts > // throws an exception. > var openedWindow = window.open("data:text/html,<div id='d'>",""); > openedWindow.addEventListener("load", function() {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
|
Review
Attachments on
bug 918189
:
807614
|
807615
|
807616
|
807617
|
8356417
|
8356418
|
8388511
|
8388513
|
8389634