Closed Bug 994816 Opened 9 years ago Closed 9 years ago

Use alignment of 0 instead of 1 with SetDisplayPortMargins when tiling is enabled

Categories

(Core :: Panning and Zooming, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla31

People

(Reporter: botond, Assigned: botond)

Details

Attachments

(1 file)

nsLayoutUtils::SetDisplayPortMargins (and nsIDOMWindowUtils::SetDisplayPortMarginsForElement which wraps it) take alignment arguments (one for each axis) and store them along with the margins; nsLayoutUtils::GetDisplayPort then aligns the displayport assembled from the base rect and the margins to these values.

The purpose of the alignment is to allow aligning the displayport to tile boundaries when tiling is enabled. When tiling is disabled, we pass alignment values of 1.

This is undesirable since nsLayoutUtils::GetDisplayPort expands the displayport by 1 pixel prior to aligning it to push it to the next tile boundary. We don't want this expansion when tiling is disabled.

Instead, we should use alignment values of 0 when tiling is disabled. nsLayoutUtils::GetDisplayPort already skips the alignment code if the alignment is 0, which is what we want.

[1] http://dxr.mozilla.org/mozilla-central/source/widget/xpwidgets/APZCCallbackHelper.cpp?from=APZCCallbackHelper.cpp#233
[2] http://dxr.mozilla.org/mozilla-central/source/widget/xpwidgets/APZCCallbackHelper.cpp?from=APZCCallbackHelper.cpp#288
Attached patch bug994816.patchSplinter Review
Applies on top of the patches from bug 982141, which add another call site to SetDisplayPortMargins.
Attachment #8404832 - Flags: review?(tnikkel)
Attachment #8404832 - Flags: review?(tnikkel) → review+
https://hg.mozilla.org/mozilla-central/rev/3615d2707847
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
You need to log in before you can comment on or make changes to this bug.