Open
Bug 759996
Opened 13 years ago
Updated 3 years ago
simplify border-image nsImageLoader code now that border-image doesn't cause border-width changes
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
NEW
People
(Reporter: dbaron, Unassigned)
Details
(Keywords: css3)
nsFrame::DidSetStyleContext has the following code:
// For border-images, we can't be as conservative (we need to set the
// new loaders if there has been any change) since the CalcDifference
// call depended on the result of GetComputedBorder() and that result
// depends on whether the image has loaded, start the image load now
// so that we'll get notified when it completes loading and can do a
// restyle. Otherwise, the image might finish loading from the
// network before we start listening to its notifications, and then
// we'll never know that it's finished loading. Likewise, we want to
// do this for freshly-created frames to prevent a similar race if the
// image loads between reflow (which can depend on whether the image
// is loaded) and paint. We also don't really care about any callers
// who try to paint borders with a different style context, because
// they won't have the correct size for the border either.
if (!EqualImages(oldBorderImage, GetStyleBorder()->GetBorderImage())) {
// stop and restart the image loading/notification
PresContext()->SetupBorderImageLoaders(this, GetStyleBorder());
}
I believe this can be removed or replaced with something more similar to what background-images do now that border-images don't trigger layout changes. We need to do a bit of poking around to figure out exactly what and think through whether it's ok, though.
![]() |
||
Comment 1•13 years ago
|
||
Kyle, beware bitrot. ;)
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•