Closed Bug 1158340 Opened 6 years ago Closed 6 years ago

Refactor RedistributeDisplayPortExcess method

Categories

(Core :: Panning and Zooming, defect)

36 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: milan, Assigned: milan)

Details

Attachments

(1 file, 1 obsolete file)

I find the code in RedistributeDisplayPortExcess a bit harder to understand, when the only thing we're doing is scaling height by one value and width by the inverse.  So, here's a patch that writes it that way, feel free to ignore as invalid if it doesn't make sense.
Attachment #8597447 - Attachment is patch: true
Attachment #8597447 - Flags: review?(bugmail.mozilla)
Assignee: nobody → milan
Comment on attachment 8597447 [details] [diff] [review]
Write RedistributeDisplayPortExcess differently.

Review of attachment 8597447 [details] [diff] [review]:
-----------------------------------------------------------------

LGTM

::: gfx/layers/apz/src/AsyncPanZoomController.cpp
@@ +2351,5 @@
> +  // we are just scaling by the ratio and its inverse.
> +  if (aDisplayPortSize.height > aScrollableRect.height) {
> +    aDisplayPortSize.width *= (aDisplayPortSize.height / aScrollableRect.height);
> +    aDisplayPortSize.height = aScrollableRect.height;
> +  } else if(aDisplayPortSize.width > aScrollableRect.width) {

nit: space after "if"
Attachment #8597447 - Flags: review?(bugmail.mozilla) → review+
Skipping the try.
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/843fbd7bc6f9
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in before you can comment on or make changes to this bug.