WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
43921
Window size changes + resources on absolute sized content leads to pixelation
https://bugs.webkit.org/show_bug.cgi?id=43921
Summary
Window size changes + resources on absolute sized content leads to pixelation
Nikolas Zimmermann
Reported
2010-08-12 08:38:38 PDT
Resizing a SVG document containing an absolute sized object where a resources is applied leads to pixelation (for masks, atm.) The resource is not being invalidated. When using a target object with relative lengths everything works fine.
Attachments
Patch
(114.29 KB, patch)
2010-08-12 08:50 PDT
,
Nikolas Zimmermann
no flags
Details
Formatted Diff
Diff
Patch v2
(142.05 KB, patch)
2010-08-13 02:05 PDT
,
Nikolas Zimmermann
krit
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Nikolas Zimmermann
Comment 1
2010-08-12 08:50:20 PDT
Created
attachment 64229
[details]
Patch
Dirk Schulze
Comment 2
2010-08-12 11:52:06 PDT
Comment on
attachment 64229
[details]
Patch
> void SVGRenderSupport::layoutChildren(RenderObject* start, bool selfNeedsLayout) > { > bool layoutSizeChanged = svgRootTreeObject(start)->isLayoutSizeChanged(); > + HashSet<RenderObject*> notlayoutedObjects; > > for (RenderObject* child = start->firstChild(); child; child = child->nextSibling()) { > bool needsLayout = selfNeedsLayout; > @@ -252,11 +263,25 @@ void SVGRenderSupport::layoutChildren(Re > if (needsLayout) { > child->setNeedsLayout(true, false); > child->layout(); > - } else > - child->layoutIfNeeded(); > + } else { > + if (child->needsLayout()) > + child->layout(); > + else if (layoutSizeChanged) > + notlayoutedObjects.add(child); > + } > > ASSERT(!child->needsLayout()); > } > + > + if (!layoutSizeChanged) { > + ASSERT(notlayoutedObjects.isEmpty()); > + return; > + } > + > + // If the layout size changed, invalidate all resources of all children that didn't go through the layout() code path. > + HashSet<RenderObject*>::iterator end = notlayoutedObjects.end(); > + for (HashSet<RenderObject*>::iterator it = notlayoutedObjects.begin(); it != end; ++it) > + invalidateResourcesOfChildren(*it); > } >
I'm not sure about the last loop here. You store the objects, because they don't need a relayout. But when you call invalidateResourcesOfChildren, the resources want the objects to relayout at least the boundaries. Seems unneccessary to me, because we already know, that they don't need a relayout.
Nikolas Zimmermann
Comment 3
2010-08-12 13:18:13 PDT
(In reply to
comment #2
)
> > + // If the layout size changed, invalidate all resources of all children that didn't go through the layout() code path. > > + HashSet<RenderObject*>::iterator end = notlayoutedObjects.end(); > > + for (HashSet<RenderObject*>::iterator it = notlayoutedObjects.begin(); it != end; ++it) > > + invalidateResourcesOfChildren(*it); > > } > > > > I'm not sure about the last loop here. You store the objects, because they don't need a relayout. But when you call invalidateResourcesOfChildren, the resources want the objects to relayout at least the boundaries. Seems unneccessary to me, because we already know, that they don't need a relayout.
You mixed up something. They call setNeedsBoundariesUpdate(), but not do any relayouting. It just marks for a boundaries update, next time it relayouts. But this relayout doesn't happen, so there's no problem.
Dirk Schulze
Comment 4
2010-08-12 22:40:19 PDT
(In reply to
comment #3
)
> (In reply to
comment #2
) > > > + // If the layout size changed, invalidate all resources of all children that didn't go through the layout() code path. > > > + HashSet<RenderObject*>::iterator end = notlayoutedObjects.end(); > > > + for (HashSet<RenderObject*>::iterator it = notlayoutedObjects.begin(); it != end; ++it) > > > + invalidateResourcesOfChildren(*it); > > > } > > > > > > > I'm not sure about the last loop here. You store the objects, because they don't need a relayout. But when you call invalidateResourcesOfChildren, the resources want the objects to relayout at least the boundaries. Seems unneccessary to me, because we already know, that they don't need a relayout. > > You mixed up something. They call setNeedsBoundariesUpdate(), but not do any relayouting. > It just marks for a boundaries update, next time it relayouts. But this relayout doesn't happen, so there's no problem.
Yes, I know it's just a flag. This makes still no sense. Why should we mark something for realyouting, but never relayout it? And even if we call layout sometime later, we have to update the boundaries, independent why we call layout. An expensive operation for RenderPath.
Nikolas Zimmermann
Comment 5
2010-08-13 02:05:57 PDT
Created
attachment 64313
[details]
Patch v2 New approach after discussing with Dirk.
Dirk Schulze
Comment 6
2010-08-13 02:56:22 PDT
Comment on
attachment 64313
[details]
Patch v2 LGTM. r=me
Nikolas Zimmermann
Comment 7
2010-08-13 03:06:17 PDT
Landed in
r65310
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug