Optimize FrameView::scrollXForFixedPosition() / scrollYForFixedPosition()
Created attachment 146160 [details] Patch
<rdar://problem/11612205>
Comment on attachment 146160 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=146160&action=review > Source/WebCore/rendering/RenderLayer.h:114 > + void move(LayoutSize size) { m_rect.move(size); } This should probably be passed as a const& ref.
Comment on attachment 146160 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=146160&action=review > Source/WebCore/page/FrameView.h:204 > - int scrollXForFixedPosition() const; > - int scrollYForFixedPosition() const; > + int scrollXForFixedPosition() const { return scrollOffsetForFixedPosition().width(); } > + int scrollYForFixedPosition() const { return scrollOffsetForFixedPosition().height(); } Best to just remove scrollXForFixedPosition() and scrollYForFixedPosition() so no one does something like IntSize(scrollXForFixedPosition(), scrollYForFixedPosition()) in the future.
Comment on attachment 146160 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=146160&action=review >> Source/WebCore/page/FrameView.h:204 >> + int scrollYForFixedPosition() const { return scrollOffsetForFixedPosition().height(); } > > Best to just remove scrollXForFixedPosition() and scrollYForFixedPosition() so no one does something like IntSize(scrollXForFixedPosition(), scrollYForFixedPosition()) in the future. And if you do remove them, delete the functions from WebCore.order file as well.
(In reply to comment #5) > And if you do remove them, delete the functions from WebCore.order file as well. We usually leave the order file alone when making code changes.
I removed them. http://trac.webkit.org/changeset/119736
We should probably cache the platform scroll position so that it is queried only once during a single layout/style recalc.