Closed Bug 1042423 Opened 10 years ago Closed 10 years ago

Do css background clipping using DisplayItemClip

Categories

(Core :: Layout, defect)

29 Branch
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla34

People

(Reporter: mattwoodrow, Assigned: mattwoodrow)

References

Details

Attachments

(5 files)

Having background painting do it's own clipping causes issues with bug 1039020, and it also stops us from being able to convert backgrounds into color/image layers in many cases. We already have the all infrastructure to represent all the clips needed, so we might as well use it.
Just moves some duplicated code into this function and makes it publicly accessible.
Attachment #8460725 - Flags: review?(roc)
Attachment #8460727 - Flags: review?(roc)
Attachment #8460725 - Attachment description: Tidy up GetBackgroundClip and expose it → Part 1: Tidy up GetBackgroundClip and expose it
This no longer does anything useful, and duplicated a lot of code from PaintBackground.
Attachment #8460730 - Flags: review?(roc)
Comment on attachment 8460728 [details] [diff] [review] Part 4: Clip background display items using DisplayItemClip Review of attachment 8460728 [details] [diff] [review]: ----------------------------------------------------------------- ::: layout/base/nsCSSRendering.cpp @@ +2853,5 @@ > // renderer draw the background and bail out. > const nsStyleDisplay* displayData = aForFrame->StyleDisplay(); > if (displayData->mAppearance) { > + nsITheme *theme = aForFrame->PresContext()->GetTheme(); > + if (theme && theme->ThemeSupportsWidget(aForFrame->PresContext(), aForFrame, create a local variable for PresContext(). it's not free. ::: layout/base/nsDisplayList.cpp @@ +1896,5 @@ > > + bool willPaintBorder = !isThemed && > + (!aFrame->StyleBorder()->mBoxShadow || > + !aFrame->StyleBorder()->mBoxShadow->HasShadowWithInset(true)) && > + aFrame->StyleBorder()->HasBorder(); fix indent
Attachment #8460728 - Flags: review?(roc) → review+
Comment on attachment 8460730 [details] [diff] [review] Part 5: Remove PaintBackgroundColor Review of attachment 8460730 [details] [diff] [review]: ----------------------------------------------------------------- ::: layout/base/nsDisplayList.cpp @@ +2634,2 @@ > nsRect borderBox = nsRect(ToReferenceFrame(), mFrame->GetSize()); > + trailing whitespace
Attachment #8460730 - Flags: review?(roc) → review+
Blocks: 1042536
Depends on: 1042777
Depends on: 1056171
Depends on: 1067286
Depends on: 1086723
Depends on: 1095699
No longer blocks: 1009306
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: