Closed
Bug 948377
Opened 12 years ago
Closed 11 years ago
FrameMetrics::CalculateCompositedRectInCssPixels should not be rounding anything
Categories
(Core :: Panning and Zooming, defect)
Tracking
()
People
(Reporter: kats, Assigned: kats)
References
Details
(Whiteboard: [caf priority: p2][CR 674614])
Attachments
(2 files)
19.70 KB,
patch
|
botond
:
review+
|
Details | Diff | Splinter Review |
19.78 KB,
patch
|
Details | Diff | Splinter Review |
See bug 929432 comment 51 and on. That roudning always looked suspicious to me, and I don't think we should ever really be rounding an intermediate value like that. Callers of the function can round it if they so desire; we should just take out the rounding.
Comment 1•12 years ago
|
||
My patch for bug 935219 changes CalculateCompositedRectInCssPixels() to return CSSIntRect instead of CSSRect, since it rounds the value anyways and some consumers want a CSSIntRect.
Maybe I should update the patch to remove the rounding and keep the return value as CSSRect? That would probably make the patch simpler, in fact.
Assignee | ||
Comment 2•12 years ago
|
||
Yeah I would prefer that.
Assignee | ||
Comment 3•11 years ago
|
||
I take back comment 2. We can do the rounding cleanup afterwards to reduce the risk of unexpected regressions from bug 935219 - that patch is already fairly large and I don't want to sneak more changes into it.
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → bugmail.mozilla
Assignee | ||
Comment 4•11 years ago
|
||
Most of the call sites only care about the width and height properties so I also added a function to just get the size.
Try run pending at https://tbpl.mozilla.org/?tree=Try&rev=e9c1211f6c86
Assignee | ||
Updated•11 years ago
|
Attachment #8397908 -
Flags: review?(botond)
Comment 5•11 years ago
|
||
Comment on attachment 8397908 [details] [diff] [review]
Patch
Review of attachment 8397908 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/layers/ipc/Axis.cpp
@@ +273,5 @@
> }
>
> float Axis::GetCompositionLength() {
> const FrameMetrics& metrics = mAsyncPanZoomController->GetFrameMetrics();
> + return GetRectLength(metrics.CalculateCompositedRectInCssPixels());
Why not just get the size here?
Attachment #8397908 -
Flags: review?(botond) → review+
Assignee | ||
Comment 6•11 years ago
|
||
(In reply to Botond Ballo [:botond] from comment #5)
> > float Axis::GetCompositionLength() {
> > const FrameMetrics& metrics = mAsyncPanZoomController->GetFrameMetrics();
> > + return GetRectLength(metrics.CalculateCompositedRectInCssPixels());
>
> Why not just get the size here?
I didn't want to add a GetSizeDimension function or equivalent to Axis. I guess I could but if this is the only thing using it it didn't really seem worthwhile.
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 7•11 years ago
|
||
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
Comment 9•11 years ago
|
||
Nominate to "b2g-v1.4". This bug blocks 1.4+ bug.
blocking-b2g: --- → 1.4?
Flags: needinfo?
Updated•11 years ago
|
Flags: needinfo?
Assignee | ||
Comment 11•11 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #9)
> Nominate to "b2g-v1.4". This bug blocks 1.4+ bug.
I duped that bug to this one, so the 1.4+ flag should just carry over.
No longer blocks: 1019300
Updated•11 years ago
|
blocking-b2g: 1.4? → 1.4+
Assignee | ||
Comment 12•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
status-b2g-v1.4:
--- → affected
status-b2g-v2.0:
--- → fixed
Comment 13•11 years ago
|
||
Updated•11 years ago
|
Whiteboard: [CR 674614] → [caf priority: p2][CR 674614]
You need to log in
before you can comment on or make changes to this bug.
Description
•