With a non-1 page scale, scrolling to reveal selection fails
<rdar://problem/9095366>
Created attachment 90474 [details] Patch
Comment on attachment 90474 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=90474&action=review r=me > Source/WebCore/rendering/RenderObject.cpp:1164 > if (!v->hasLayer() || !v->layer()->isComposited() || v->layer()->backing()->paintingGoesToWindow()) { > - v->repaintViewRectangle(r, immediate); > + IntRect repaintRectangle = r; > + if (v->hasLayer() && v->layer()->transform() && v->layer()->isComposited() && v->layer()->backing()->paintingGoesToWindow()) > + repaintRectangle = v->layer()->transform()->mapRect(r); > + v->repaintViewRectangle(repaintRectangle, immediate); The logic here is a bit squarely. You test some conditions and then similar or opposite looking ones right inside that if. I wonder if this can be refactored to be more clear, though I have no specific suggestions.
(In reply to comment #3) > (From update of attachment 90474 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=90474&action=review > > r=me > > > Source/WebCore/rendering/RenderObject.cpp:1164 > > if (!v->hasLayer() || !v->layer()->isComposited() || v->layer()->backing()->paintingGoesToWindow()) { > > - v->repaintViewRectangle(r, immediate); > > + IntRect repaintRectangle = r; > > + if (v->hasLayer() && v->layer()->transform() && v->layer()->isComposited() && v->layer()->backing()->paintingGoesToWindow()) > > + repaintRectangle = v->layer()->transform()->mapRect(r); > > + v->repaintViewRectangle(repaintRectangle, immediate); > > The logic here is a bit squarely. You test some conditions and then similar or opposite looking ones right inside that if. I wonder if this can be refactored to be more clear, though I have no specific suggestions. I can (and will) remove the “ && v->layer()->backing()->paintingGoesToWindow()” part, because it’s redundant, and add a local boolean variable for v->hasLayer() && v->layer()->isComposited()
Fixed in r84454. <http://trac.webkit.org/changeset/84454>
http://trac.webkit.org/changeset/84454 might have broken Qt Linux Release The following tests are not passing: fast/transforms/selection-bounds-in-transformed-view.html