Closed Bug 820131 Opened 13 years ago Closed 13 years ago

nsDisplayBoxShadowOuter's bounds aren't very accurate

Categories

(Core :: Layout, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla20

People

(Reporter: mattwoodrow, Unassigned)

References

Details

Attachments

(1 file)

This is causing the fixed-position header layer on nzherald.co.nz to be much bigger than necessary. This switches the bounds calculation to compute the actual pixels touched by the shadow, and caches them on display item creation.
Attachment #690546 - Flags: review?(roc)
Comment on attachment 690546 [details] [diff] [review] Compute the actual bounds Review of attachment 690546 [details] [diff] [review]: ----------------------------------------------------------------- ::: layout/base/nsDisplayList.cpp @@ +2406,5 @@ > + tmpRect.Inflate(shadow->mSpread); > + tmpRect.Inflate( > + nsContextBoxBlur::GetBlurRadiusMargin(shadow->mRadius, A2D)); > + shadows.UnionRect(shadows, tmpRect); > + } This code is identical to code in ComputeOutlineAndEffectsRect. Please share it via a helper function (could be in nsLayoutUtils).
Attachment #690546 - Flags: review?(roc) → review+
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
Depends on: 1212823
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: