Closed Bug 987605 Opened 10 years ago Closed 10 years ago

call MaybeReflowForInflationScreenWidthChange on SetScrollPositionClampingScrollPortSize instead of SetDisplayPortForElement

Categories

(Core :: Layout, defect)

29 Branch
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla31
Tracking Status
firefox30 --- fixed
firefox31 --- fixed
b2g-v1.4 --- fixed
b2g-v2.0 --- fixed

People

(Reporter: tnikkel, Assigned: tnikkel)

Details

Attachments

(1 file)

Attached patch patchSplinter Review
Although the displayport will be updated when the screen size changes, the scroll position clamping scroll port size is more closely related to the screen size. It is set to the area visible on screen for content (the name is outdated now and the actual rect is used for more things). It seems like the more natural place to put it to me.

This simplifies the work in bug 957668 a little.
Attachment #8396302 - Flags: review?(dbaron)
Comment on attachment 8396302 [details] [diff] [review]
patch

>+  // layout depends on the size of the screen.  Since when the size
>+  // of the screen changes, the scroll position clamping scroll port
>+  // size also changes, we hook in the needed updates here rather

As long as you're confident this is true for both Android and B2G, r=dbaron.

The thing to test is that font inflation changes take place when switching the browser between landscape and portrait mode.  (Fonts should be less inflated when the screen is wider, so having a wider screen should fit more text on each line.)
Attachment #8396302 - Flags: review?(dbaron) → review+
We depend on the scroll position clamping scroll port size for other things, for example fixed pos items are reflowed into that size instead of the viewport size, and the innerWidth/Height of the page reflect it too. So if it didn't get updated we would have other bugs, which we should fix.
https://hg.mozilla.org/mozilla-central/rev/d0fed85e8eca
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: