Closed
Bug 725426
Opened 13 years ago
Closed 13 years ago
Incorrect getBoundingClientRect() for transform-style: flat
Categories
(Core :: DOM: CSS Object Model, defect)
Tracking
()
RESOLVED
FIXED
mozilla13
People
(Reporter: ayg, Assigned: ayg)
References
Details
Attachments
(1 file)
(deleted),
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
Example:
data:text/html,<!doctype html>
<div style="-moz-transform: perspective(200px)">
<div style="-moz-transform: translatez(-100px);
width:100px;height:100px;background:blue">
<script>
var rect = document.querySelector("div>div").getBoundingClientRect();
alert(rect.top+','+rect.right+','+rect.bottom+','+rect.left)
</script>
This should alert "8,108,108,8", because in transform-style: flat mode, transforms don't accumulate. Chrome 18 dev and IE10 Developer Preview both alert this (or something slightly off in IE's case). Nightlies alert something way off, the same as transform-style: preserve-3d.
Bug 724025 and bug 718809 are related. The patch for those does not fix this. I'll attach a patch in a moment.
Assignee | ||
Updated•13 years ago
|
Whiteboard: [autoland]
Updated•13 years ago
|
Whiteboard: [autoland] → [autoland-in-queue]
Comment 2•13 years ago
|
||
Autoland Patchset:
Patches: 595470
Branch: mozilla-central => try
Destination: http://hg.mozilla.org/try/rev/8f473a21d905
Try run started, revision 8f473a21d905. To cancel or monitor the job, see: https://tbpl.mozilla.org/?tree=Try&rev=8f473a21d905
Comment on attachment 595470 [details] [diff] [review]
Patch v1
Review of attachment 595470 [details] [diff] [review]:
-----------------------------------------------------------------
Preemptive r+ from me
Attachment #595470 -
Flags: review+
Comment 4•13 years ago
|
||
You need to check Preserves3D() on the child instead here.
Preserves3DChildren() means that the parent intends to preserve-3d on it's children (has the transform-style: preserve-3d attribute), but this isn't necessarily applied. overflow:hidden clipping on the child can prevent this from happening, see the implementation of nsIFrame::Preserves3D().
Comment 5•13 years ago
|
||
Actually, ignore me, only clipping on the parent affects this. This should be fine.
Comment 6•13 years ago
|
||
Try run for 8f473a21d905 is complete.
Detailed breakdown of the results available here:
https://tbpl.mozilla.org/?tree=Try&rev=8f473a21d905
Results (out of 212 total builds):
success: 176
warnings: 22
failure: 14
Builds (or logs if builds failed) available at:
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/autolanduser@mozilla.com-8f473a21d905
Updated•13 years ago
|
Whiteboard: [autoland-in-queue]
Assignee | ||
Updated•13 years ago
|
Keywords: checkin-needed
Comment 7•13 years ago
|
||
Comment 8•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•