WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
97903
Make RenderLayerCompositor::requiresCompositingForScrollableFrame scrollbars agnostic
https://bugs.webkit.org/show_bug.cgi?id=97903
Summary
Make RenderLayerCompositor::requiresCompositingForScrollableFrame scrollbars ...
Antonio Gomes
Reported
2012-09-28 06:19:38 PDT
The way it is implemented now, ports that disable scrollbars creation at FrameView creation time, won't benefit from it.
Attachments
patch
(3.98 KB, patch)
2012-09-28 10:17 PDT
,
Antonio Gomes
simon.fraser
: review-
Details
Formatted Diff
Diff
patch 2
(7.26 KB, patch)
2012-09-28 14:21 PDT
,
Antonio Gomes
buildbot
: commit-queue-
Details
Formatted Diff
Diff
patch 2 - actual
(7.26 KB, patch)
2012-09-28 14:37 PDT
,
Antonio Gomes
simon.fraser
: review-
Details
Formatted Diff
Diff
patch 3 - addressed simon's comments
(7.19 KB, patch)
2012-12-12 07:44 PST
,
Antonio Gomes
webkit.review.bot
: commit-queue-
Details
Formatted Diff
Diff
(landed r138183, r=smfr) patch 3 (actual) - addressed simon's comments
(7.41 KB, patch)
2012-12-12 08:18 PST
,
Antonio Gomes
simon.fraser
: review+
simon.fraser
: commit-queue-
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Antonio Gomes
Comment 1
2012-09-28 10:17:42 PDT
Created
attachment 166272
[details]
patch
Simon Fraser (smfr)
Comment 2
2012-09-28 10:49:54 PDT
Comment on
attachment 166272
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=166272&action=review
> Source/WebCore/rendering/RenderLayerCompositor.cpp:1675 > + // FIXME: Make FrameView::parentFrameView public to simplify this. > + if (!view->parent() || !view->parent()->isFrameView()) > + return false; > + > + m_reevaluateCompositingAfterLayout = true; > + > + return static_cast<FrameView*>(view->parent())->containsScrollableArea(view);
I don't get why this is any better, or why it makes sense to ask our parent if it contains us? Why not just invent a way to ask about scrollability that doesn't involve scrollbars?
Antonio Gomes
Comment 3
2012-09-28 10:54:45 PDT
> > + return static_cast<FrameView*>(view->parent())->containsScrollableArea(view); > > I don't get why this is any better, or why it makes sense to ask our parent if it contains us?
Because FrameView caches all ScrollableArea "under" it (including other child frames, block elements (e.g. scrollable divs), etc).
> Why not just invent a way to ask about scrollability that doesn't involve scrollbars?
The way this patch provides is a way. Would you have something in mind specifically?
Simon Fraser (smfr)
Comment 4
2012-09-28 11:01:07 PDT
(In reply to
comment #3
)
> > > + return static_cast<FrameView*>(view->parent())->containsScrollableArea(view); > > > > I don't get why this is any better, or why it makes sense to ask our parent if it contains us? > > Because FrameView caches all ScrollableArea "under" it (including other child frames, block elements (e.g. scrollable divs), etc).
Why not factor the code in FrameView::updateScrollableAreaSet() so you can just ask a FrameView if it's scrollable?
Antonio Gomes
Comment 5
2012-09-28 11:14:48 PDT
> > > I don't get why this is any better, or why it makes sense to ask our parent if it contains us? > > > > Because FrameView caches all ScrollableArea "under" it (including other child frames, block elements (e.g. scrollable divs), etc). > > Why not factor the code in FrameView::updateScrollableAreaSet() so you can just ask a FrameView if it's scrollable?
A simple bool to FrameView? If so, we would have to do something about the main frame though, since it does not go through updateScrollableArea
Simon Fraser (smfr)
Comment 6
2012-09-28 11:38:15 PDT
Do you need this to be stateful? Can't you just run the same code that updateScrollableAreaSet() does?
Antonio Gomes
Comment 7
2012-09-28 12:11:48 PDT
(In reply to
comment #6
)
> Do you need this to be stateful? Can't you just run the same code that updateScrollableAreaSet() does?
The long term plan was: 1) fix this bug 2) remove the existing but now unneeded Settings::acceleratedCompositingForScrollableFramesEnabled 3) make requiresCompositingForScrollableFrame a criteria to promote a layer to be composited, just like requiresCompositingForXXX So _3_ would be a rather hotter path than it is now. That said, stateful cache would be of more value. What do you think?
Simon Fraser (smfr)
Comment 8
2012-09-28 12:41:08 PDT
The code in updateScrollableAreaSet() looks pretty cheap. You should just call it each time.
Antonio Gomes
Comment 9
2012-09-28 14:21:52 PDT
Created
attachment 166310
[details]
patch 2 Simon, does it get closer to what you had in mind?
Build Bot
Comment 10
2012-09-28 14:30:13 PDT
Comment on
attachment 166310
[details]
patch 2
Attachment 166310
[details]
did not pass mac-ews (mac): Output:
http://queues.webkit.org/results/14056550
Gyuyoung Kim
Comment 11
2012-09-28 14:30:46 PDT
Comment on
attachment 166310
[details]
patch 2
Attachment 166310
[details]
did not pass efl-ews (efl): Output:
http://queues.webkit.org/results/14070381
WebKit Review Bot
Comment 12
2012-09-28 14:33:14 PDT
Comment on
attachment 166310
[details]
patch 2
Attachment 166310
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/14064410
Early Warning System Bot
Comment 13
2012-09-28 14:35:56 PDT
Comment on
attachment 166310
[details]
patch 2
Attachment 166310
[details]
did not pass qt-ews (qt): Output:
http://queues.webkit.org/results/14068375
Antonio Gomes
Comment 14
2012-09-28 14:37:19 PDT
Created
attachment 166312
[details]
patch 2 - actual
Simon Fraser (smfr)
Comment 15
2012-09-28 14:43:32 PDT
Comment on
attachment 166312
[details]
patch 2 - actual View in context:
https://bugs.webkit.org/attachment.cgi?id=166312&action=review
> Source/WebCore/page/FrameView.cpp:2794 > +bool FrameView::isScrollableChildFrameView()
I don't think this should have the "child frame" part. It's up to the caller to determine whether it's a child frame. Just do the scrolling-related tests.
> Source/WebCore/page/FrameView.cpp:2834 > + if (!parentFrameView()) > + return; > + > + if (isScrollableChildFrameView()) { > + parentFrameView()->addScrollableArea(this); > return; > } > > - parentFrameView()->addScrollableArea(this); > + parentFrameView()->removeScrollableArea(this);
This fetches parentFrameView 3 times, and isScrollableChildFrameView() does so once. You should use a local.
Antonio Gomes
Comment 16
2012-12-07 07:34:01 PST
(In reply to
comment #15
)
> (From update of
attachment 166312
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=166312&action=review
> > > Source/WebCore/page/FrameView.cpp:2794 > > +bool FrameView::isScrollableChildFrameView() > > I don't think this should have the "child frame" part. It's up to the caller to determine whether it's a child frame. Just do the scrolling-related tests. > > > Source/WebCore/page/FrameView.cpp:2834 > > + if (!parentFrameView()) > > + return; > > + > > + if (isScrollableChildFrameView()) { > > + parentFrameView()->addScrollableArea(this); > > return; > > } > > > > - parentFrameView()->addScrollableArea(this); > > + parentFrameView()->removeScrollableArea(this); > > This fetches parentFrameView 3 times, and isScrollableChildFrameView() does so once. You should use a local.
Getting back to this bug.
Antonio Gomes
Comment 17
2012-12-12 07:44:39 PST
Created
attachment 179041
[details]
patch 3 - addressed simon's comments
WebKit Review Bot
Comment 18
2012-12-12 08:00:17 PST
Comment on
attachment 179041
[details]
patch 3 - addressed simon's comments
Attachment 179041
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/15282533
Early Warning System Bot
Comment 19
2012-12-12 08:00:45 PST
Comment on
attachment 179041
[details]
patch 3 - addressed simon's comments
Attachment 179041
[details]
did not pass qt-ews (qt): Output:
http://queues.webkit.org/results/15281531
Early Warning System Bot
Comment 20
2012-12-12 08:08:49 PST
Comment on
attachment 179041
[details]
patch 3 - addressed simon's comments
Attachment 179041
[details]
did not pass qt-wk2-ews (qt): Output:
http://queues.webkit.org/results/15296150
Antonio Gomes
Comment 21
2012-12-12 08:18:57 PST
Created
attachment 179049
[details]
(landed
r138183
, r=smfr) patch 3 (actual) - addressed simon's comments
Antonio Gomes
Comment 22
2012-12-18 14:21:39 PST
Kindly ping reviewer.
Antonio Gomes
Comment 23
2012-12-19 03:56:05 PST
(In reply to
comment #22
)
> Kindly ping reviewers.
Added some potential reviewers.
Simon Fraser (smfr)
Comment 24
2012-12-19 08:59:58 PST
Comment on
attachment 179049
[details]
(landed
r138183
, r=smfr) patch 3 (actual) - addressed simon's comments View in context:
https://bugs.webkit.org/attachment.cgi?id=179049&action=review
> Source/WebCore/page/FrameView.h:313 > + bool isScrollable();
This should be const.
Antonio Gomes
Comment 25
2012-12-19 09:12:10 PST
(In reply to
comment #24
)
> (From update of
attachment 179049
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=179049&action=review
> > > Source/WebCore/page/FrameView.h:313 > > + bool isScrollable(); > > This should be const.
Thanks Simon. Since FrameView::isScrollable calls calculateScrollbarModesForLayout, which is non-const, it can not be const. Maybe we can name it differently?
Simon Fraser (smfr)
Comment 26
2012-12-19 09:55:38 PST
No, you can leave it as is.
Antonio Gomes
Comment 27
2012-12-19 11:32:50 PST
https://trac.webkit.org/changeset/138183
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