Closed
Bug 914666
Opened 12 years ago
Closed 10 years ago
Exclude frame border when calculating composition bounds
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla39
People
(Reporter: botond, Assigned: botond)
References
Details
Attachments
(1 file, 1 obsolete file)
6.81 KB,
patch
|
tnikkel
:
review+
bajaj
:
approval-mozilla-b2g37+
|
Details | Diff | Splinter Review |
Comment 1•12 years ago
|
||
I'm sure a bit more detail in the bug won't hurt :)
Assignee | ||
Comment 2•12 years ago
|
||
(In reply to Milan Sreckovic [:milan] from comment #1)
> I'm sure a bit more detail in the bug won't hurt :)
To calculate the composition bounds for a scrollable frame, we currently use nsIFrame::GetSize(). If I understand correctly, this is not quite what we want, because it includes the borders of the frame, whereas we just want the content area.
Assignee | ||
Comment 3•10 years ago
|
||
Going to fix this, as it's needed to fix bug 1130982.
Assignee: nobody → botond
Assignee | ||
Comment 4•10 years ago
|
||
Here's a first shot at this.
As changing the composition bounds is a relatively risky change, I'm going to wait for some Try results before flagging for review:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=11b064675353
Assignee | ||
Comment 5•10 years ago
|
||
Comment on attachment 8569461 [details] [diff] [review]
Exclude the frame borders from the composition bounds
Looking green!
Attachment #8569461 -
Flags: review?(tnikkel)
Attachment #8569461 -
Flags: review?(bugmail.mozilla)
Comment 6•10 years ago
|
||
Comment on attachment 8569461 [details] [diff] [review]
Exclude the frame borders from the composition bounds
Review of attachment 8569461 [details] [diff] [review]:
-----------------------------------------------------------------
Looks sane to me but I'll defer the review to tn.
Attachment #8569461 -
Flags: review?(bugmail.mozilla) → feedback+
Comment 7•10 years ago
|
||
Comment on attachment 8569461 [details] [diff] [review]
Exclude the frame borders from the composition bounds
By going from the frame rect to the scollport rect we are also going from including the space taken up by the scrollbars (if any, overlay scrollbars take up no space) to not including that space. That means lower down where we remove this space for the scrollbars is no longer correct.
And when we change the composition bounds we need to do the composition bounds dance. When doing the composition bounds dance you must do everything three times. So don't forget about nsLayoutUtils::CalculateRootCompositionSize and nsLayoutUtils::CalculateCompositionSizeForFrame.
Attachment #8569461 -
Flags: review?(tnikkel)
Assignee | ||
Comment 8•10 years ago
|
||
I updated the patch as follows:
- Use the scroll port size for the non-RCD-RSF case in both
ComputeFrameMetrics() and CalculateCompositionSizeForFrame().
It doesn't really make sense to use it for the RCD-RSF case
because we're not using the size of a scroll frame in that
case.
- Restrict the subtract-the-scrollbar-sizes code to the
RCD-RSF case in both ComputeFrameMetrics() and
CalculateCompositionSizeForFrame().
CalculateRootCompositionSize() required no changes because it only concerns the RCD-RSF case.
Attachment #8569461 -
Attachment is obsolete: true
Attachment #8570619 -
Flags: review?(tnikkel)
Assignee | ||
Comment 9•10 years ago
|
||
Comment 10•10 years ago
|
||
Comment on attachment 8570619 [details] [diff] [review]
Exclude the frame borders from the composition bounds
Sorry for the delay.
Attachment #8570619 -
Flags: review?(tnikkel) → review+
Assignee | ||
Comment 11•10 years ago
|
||
landing |
Comment 12•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox39:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
Assignee | ||
Comment 13•10 years ago
|
||
Comment on attachment 8570619 [details] [diff] [review]
Exclude the frame borders from the composition bounds
NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings.
[Approval Request Comment]
Bug caused by (feature/regressing bug #):
Multi-FrameMetrics (bug 1055760).
User impact if declined:
Needed by bug 1130982, which is 2.2+
Testing completed:
Has been baking on m-c for a week (since 2015-03-07).
Risk to taking this patch (and alternatives if risky):
Moderate. The composition bounds is used by many things in APZ
and other rendering code, so modifying it bears a moderate
amount of risk. However, I feel like we understand this change
well, and it's been baking on m-c for a week without regressions.
String or UUID changes made by this patch:
None.
Attachment #8570619 -
Flags: approval-mozilla-b2g37?
Updated•10 years ago
|
Attachment #8570619 -
Flags: approval-mozilla-b2g37? → approval-mozilla-b2g37+
Comment 14•10 years ago
|
||
status-b2g-v2.2:
--- → fixed
status-b2g-master:
--- → fixed
status-firefox37:
--- → wontfix
status-firefox38:
--- → wontfix
You need to log in
before you can comment on or make changes to this bug.
Description
•