RESOLVED FIXED 88475
Optimize FrameView::scrollXForFixedPosition() / scrollYForFixedPosition()
https://bugs.webkit.org/show_bug.cgi?id=88475
Summary Optimize FrameView::scrollXForFixedPosition() / scrollYForFixedPosition()
Simon Fraser (smfr)
Reported 2012-06-06 17:36:20 PDT
Optimize FrameView::scrollXForFixedPosition() / scrollYForFixedPosition()
Attachments
Patch (11.79 KB, patch)
2012-06-06 17:44 PDT, Simon Fraser (smfr)
sam: review+
Simon Fraser (smfr)
Comment 1 2012-06-06 17:44:07 PDT
Radar WebKit Bug Importer
Comment 2 2012-06-06 17:48:16 PDT
Sam Weinig
Comment 3 2012-06-06 18:14:05 PDT
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.
Pratik Solanki
Comment 4 2012-06-06 18:25:03 PDT
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.
Pratik Solanki
Comment 5 2012-06-06 18:27:26 PDT
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.
mitz
Comment 6 2012-06-06 18:36:13 PDT
(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.
Simon Fraser (smfr)
Comment 7 2012-06-07 10:57:22 PDT
Antti Koivisto
Comment 8 2012-06-07 14:10:59 PDT
We should probably cache the platform scroll position so that it is queried only once during a single layout/style recalc.
Note You need to log in before you can comment on or make changes to this bug.