|
|
Created:
4 years, 4 months ago by MuVen Modified:
4 years, 3 months ago CC:
chromium-reviews, szager+layoutwatch_chromium.org, zoltan1, blink-reviews-layout_chromium.org, pdr+renderingwatchlist_chromium.org, eae+blinkwatch, leviw+renderwatch, jchaffraix+rendering, blink-reviews Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionDraw main frame custom scrollbars in root layer scrolling mode.
Draw main frame custom scrollbars in root layer scrolling mode. On RLS custom
scrollbars are picked from CompositedLayerMapping, Non-RLS custom scrollbars
are picked from PaintLayerCompositor.
BUG=623853
Committed: https://crrev.com/7dbeb9e5f11913900a9560691a60510376b6dc73
Cr-Commit-Position: refs/heads/master@{#417203}
Patch Set 1 #Patch Set 2 : Modified as per the discussion in the bug #Patch Set 3 : modified as per review comments #
Total comments: 2
Patch Set 4 : Addressed Review comments #Patch Set 5 : modified as per review comments #Patch Set 6 : cleanup #
Total comments: 8
Patch Set 7 : addressed review comments #Patch Set 8 : adding if check. as without which it will crash in the webkit_unit_tests #Patch Set 9 : addressed review comments #
Messages
Total messages: 53 (34 generated)
Description was changed from ========== done BUG= ========== to ========== MainFrame CustomScrollbars are not drawn on RLS. BUG=623853 ==========
bokan@chromium.org changed reviewers: + bokan@chromium.org, skobes@chromium.org
You'll also want to add a test https://codereview.chromium.org/2198853002/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/2198853002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/core/frame/FrameView.cpp:2642: if (!layoutViewItem().isNull() && layoutViewItem().layer()->hasCompositedLayerMapping()) { IMO, instead of doing this, we should fix FrameView::layerForHozizontalScrollbar and friends to return the appropriate layer and use that above. +skobes@: Is it true that if LayoutView has a CompositedLayerMapping then we in root-layer-scrolls? If so, then layerForHorizontalScrollbar can check that and return the CLM scrollbar layer, otherwise the PLC scrollbar layer. Otherwise, I guess you could just key off settings()->rootLayerScrolls(). Does that sound ok?
https://codereview.chromium.org/2198853002/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/2198853002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/core/frame/FrameView.cpp:2642: if (!layoutViewItem().isNull() && layoutViewItem().layer()->hasCompositedLayerMapping()) { On 2016/08/11 14:34:29, bokan wrote: > IMO, instead of doing this, we should fix FrameView::layerForHozizontalScrollbar > and friends to return the appropriate layer and use that above. > > +skobes@: Is it true that if LayoutView has a CompositedLayerMapping then we in > root-layer-scrolls? If so, then layerForHorizontalScrollbar can check that and > return the CLM scrollbar layer, otherwise the PLC scrollbar layer. Otherwise, I > guess you could just key off settings()->rootLayerScrolls(). Does that sound ok? That's a great idea to fix in layerForHorizontalScrollbar. I shall add tests, and modified patch, if skobes is ok with this.
On 2016/08/11 14:34:29, bokan wrote: > IMO, instead of doing this, we should fix FrameView::layerForHozizontalScrollbar > and friends to return the appropriate layer and use that above. I don't think we should change FrameView::layerForHozizontalScrollbar; I am trying to be careful about maintaining the separation between FrameView and root layer scrollable area paths. How about adding a RLS-aware layerForHozizontalScrollbar() on VisualViewport? > +skobes@: Is it true that if LayoutView has a CompositedLayerMapping then we in > root-layer-scrolls? I don't think this is true, but you may be able to query CLM::hasScrollingLayer().
Can we do like this ? If(RLS) pass horizontalScrollbar Layer from CLM to VisualViewport; else pass horizontalScrollbar Layer from PLC to VisualViewport; During Frameview synchronizedPaint; get the scrollbar layers from VisualViewport.
On 2016/08/11 19:03:59, skobes wrote: > On 2016/08/11 14:34:29, bokan wrote: > > IMO, instead of doing this, we should fix > FrameView::layerForHozizontalScrollbar > > and friends to return the appropriate layer and use that above. > > I don't think we should change FrameView::layerForHozizontalScrollbar; I am > trying to be careful about maintaining the separation between FrameView and root > layer scrollable area paths. > > How about adding a RLS-aware layerForHozizontalScrollbar() on VisualViewport? That sounds fine, though probably on RootFrameViewport in that case.
The CQ bit was checked by sataya.m@samsung.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by sataya.m@samsung.com
The CQ bit was checked by sataya.m@samsung.com to run a CQ dry run
PTAL. Thanks,
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by sataya.m@samsung.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Patchset #5 (id:80001) has been deleted
Patchset #4 (id:60001) has been deleted
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
I think the RLS / non-RLS decision branch should be in RootFrameViewport as bokan suggested, not in VisualViewport as I initially wrote. VisualViewport owns scrollbar layers, so it's weird for it to have getters that return something else.
The CQ bit was checked by sataya.m@samsung.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by sataya.m@samsung.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
PTAL.
https://codereview.chromium.org/2198853002/diff/140001/third_party/WebKit/Lay... File third_party/WebKit/LayoutTests/scrollbars/custom-scrollbar-display-on-root-layer-scrolls.html (right): https://codereview.chromium.org/2198853002/diff/140001/third_party/WebKit/Lay... third_party/WebKit/LayoutTests/scrollbars/custom-scrollbar-display-on-root-layer-scrolls.html:26: <body> Nit: No body tags https://codereview.chromium.org/2198853002/diff/140001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/2198853002/diff/140001/third_party/WebKit/Sou... third_party/WebKit/Source/core/frame/FrameView.cpp:2682: if (m_viewportScrollableArea) { This can be a DCHECK since we're the main frame. https://codereview.chromium.org/2198853002/diff/140001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/frame/RootFrameViewport.cpp (right): https://codereview.chromium.org/2198853002/diff/140001/third_party/WebKit/Sou... third_party/WebKit/Source/core/frame/RootFrameViewport.cpp:330: LocalFrame* frame = mainFrame(); I don't think you need any of the changes in this file. If root layer scrolls is enabled, layoutViewport() is the PLSA belonging to the root frame in which case PaintLayerScrollableArea::layerForHorizontalScrollbar() does what you're doing here. If root layer scrolls is disabled, layoutViewport() is the FrameView so FrameView::layerForHorizontalScrollbar is what you return here as well. I think you only really need to add the scroll corner method but that can also delegate to layoutViewport(). Or amy I missing something?
https://codereview.chromium.org/2198853002/diff/140001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/frame/RootFrameViewport.cpp (right): https://codereview.chromium.org/2198853002/diff/140001/third_party/WebKit/Sou... third_party/WebKit/Source/core/frame/RootFrameViewport.cpp:330: LocalFrame* frame = mainFrame(); On 2016/09/02 16:01:54, bokan wrote: > I don't think you need any of the changes in this file. If root layer scrolls is > enabled, layoutViewport() is the PLSA belonging to the root frame in which case > PaintLayerScrollableArea::layerForHorizontalScrollbar() does what you're doing > here. > > If root layer scrolls is disabled, layoutViewport() is the FrameView so > FrameView::layerForHorizontalScrollbar is what you return here as well. > > I think you only really need to add the scroll corner method but that can also > delegate to layoutViewport(). Or amy I missing something? so as i understand its better to retain the old definition layoutViewport().layerForHorizontalScrollbar()(correct me if im wrong); here layoutViewport will vary based on the RLS enabled or disabled. if(RLS -> enabled) PLSA->layerForHorizontalScrollbar() ; will be invoked else FrameView->layerForHorizontalScrollbar(); will be invoked. we need to add scrollcorner method delegating to layoutViewport(); as scrollcorner method is not overridden.
On 2016/09/02 16:36:13, MuVen wrote: > https://codereview.chromium.org/2198853002/diff/140001/third_party/WebKit/Sou... > File third_party/WebKit/Source/core/frame/RootFrameViewport.cpp (right): > > https://codereview.chromium.org/2198853002/diff/140001/third_party/WebKit/Sou... > third_party/WebKit/Source/core/frame/RootFrameViewport.cpp:330: LocalFrame* > frame = mainFrame(); > On 2016/09/02 16:01:54, bokan wrote: > > I don't think you need any of the changes in this file. If root layer scrolls > is > > enabled, layoutViewport() is the PLSA belonging to the root frame in which > case > > PaintLayerScrollableArea::layerForHorizontalScrollbar() does what you're doing > > here. > > > > If root layer scrolls is disabled, layoutViewport() is the FrameView so > > FrameView::layerForHorizontalScrollbar is what you return here as well. > > > > I think you only really need to add the scroll corner method but that can also > > delegate to layoutViewport(). Or amy I missing something? > > so as i understand its better to retain the old definition > layoutViewport().layerForHorizontalScrollbar()(correct me if im wrong); here > layoutViewport will vary based on the RLS enabled or disabled. > > if(RLS -> enabled) > PLSA->layerForHorizontalScrollbar() ; will be invoked > else > FrameView->layerForHorizontalScrollbar(); will be invoked. > > we need to add scrollcorner method delegating to layoutViewport(); as > scrollcorner method is not overridden. that's correct.
Patchset #7 (id:160001) has been deleted
The CQ bit was checked by sataya.m@samsung.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by sataya.m@samsung.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
PTAL. https://codereview.chromium.org/2198853002/diff/140001/third_party/WebKit/Lay... File third_party/WebKit/LayoutTests/scrollbars/custom-scrollbar-display-on-root-layer-scrolls.html (right): https://codereview.chromium.org/2198853002/diff/140001/third_party/WebKit/Lay... third_party/WebKit/LayoutTests/scrollbars/custom-scrollbar-display-on-root-layer-scrolls.html:26: <body> On 2016/09/02 16:01:54, bokan wrote: > Nit: No body tags Done. https://codereview.chromium.org/2198853002/diff/140001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/2198853002/diff/140001/third_party/WebKit/Sou... third_party/WebKit/Source/core/frame/FrameView.cpp:2682: if (m_viewportScrollableArea) { On 2016/09/02 16:01:54, bokan wrote: > This can be a DCHECK since we're the main frame. Need if(m_viewportScrollableArea) check as without which webkit_unit_tests will crash ex: FrameThrottlingTest.cpp. https://codereview.chromium.org/2198853002/diff/140001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/frame/RootFrameViewport.cpp (right): https://codereview.chromium.org/2198853002/diff/140001/third_party/WebKit/Sou... third_party/WebKit/Source/core/frame/RootFrameViewport.cpp:330: LocalFrame* frame = mainFrame(); On 2016/09/02 16:01:54, bokan wrote: > I don't think you need any of the changes in this file. If root layer scrolls is > enabled, layoutViewport() is the PLSA belonging to the root frame in which case > PaintLayerScrollableArea::layerForHorizontalScrollbar() does what you're doing > here. > > If root layer scrolls is disabled, layoutViewport() is the FrameView so > FrameView::layerForHorizontalScrollbar is what you return here as well. > > I think you only really need to add the scroll corner method but that can also > delegate to layoutViewport(). Or amy I missing something? Done.
Code changes look good. We already have a number of layout tests that render custom scrollbars. Aren't any of them fixed by this patch? If so we should just update the expectations instead of adding a new one.
On 2016/09/06 18:44:07, skobes wrote: > Code changes look good. > > We already have a number of layout tests that render custom scrollbars. Aren't > any of them fixed by this patch? If so we should just update the expectations > instead of adding a new one. I have checked the test expectations, i think all the tests passed because they are ref tests, as the test cases behave same in the actual and the expected test case. If its a image based test then we would have encountered a failure.
lgtm but please file the bug mentioned below https://codereview.chromium.org/2198853002/diff/140001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/2198853002/diff/140001/third_party/WebKit/Sou... third_party/WebKit/Source/core/frame/FrameView.cpp:2682: if (m_viewportScrollableArea) { On 2016/09/06 10:07:29, MuVen wrote: > On 2016/09/02 16:01:54, bokan wrote: > > This can be a DCHECK since we're the main frame. > > Need if(m_viewportScrollableArea) check as without which webkit_unit_tests will > crash ex: FrameThrottlingTest.cpp. Interesting, those tests need to be fixed. Please file a bug (cc me) and list all the tests that break. The problem is that "Main frame doesn't create RootFrameViewport in some webkit_unit_tests". Please add a TODO here linked to that bug.
lgtm w/ two nits: - commit message should state the effect of the change, e.g. "Draw main frame custom scrollbars in root layer scrolling mode." - don't put "root-layer-scrolls" in the test filename (the test is not really specific to the feature)
Description was changed from ========== MainFrame CustomScrollbars are not drawn on RLS. BUG=623853 ========== to ========== Draw main frame custom scrollbars in root layer scrolling mode. Draw main frame custom scrollbars in root layer scrolling mode. On RLS custom scrollbars are picked from CompositedLayerMapping, Non-RLS custom scrollbars are picked from PaintLayerCompositor. BUG=623853 ==========
The CQ bit was checked by sataya.m@samsung.com to run a CQ dry run
The CQ bit was checked by sataya.m@samsung.com
The patchset sent to the CQ was uploaded after l-g-t-m from bokan@chromium.org, skobes@chromium.org Link to the patchset: https://codereview.chromium.org/2198853002/#ps220001 (title: "addressed review comments")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== Draw main frame custom scrollbars in root layer scrolling mode. Draw main frame custom scrollbars in root layer scrolling mode. On RLS custom scrollbars are picked from CompositedLayerMapping, Non-RLS custom scrollbars are picked from PaintLayerCompositor. BUG=623853 ========== to ========== Draw main frame custom scrollbars in root layer scrolling mode. Draw main frame custom scrollbars in root layer scrolling mode. On RLS custom scrollbars are picked from CompositedLayerMapping, Non-RLS custom scrollbars are picked from PaintLayerCompositor. BUG=623853 ==========
Message was sent while issue was closed.
Committed patchset #9 (id:220001)
Message was sent while issue was closed.
Description was changed from ========== Draw main frame custom scrollbars in root layer scrolling mode. Draw main frame custom scrollbars in root layer scrolling mode. On RLS custom scrollbars are picked from CompositedLayerMapping, Non-RLS custom scrollbars are picked from PaintLayerCompositor. BUG=623853 ========== to ========== Draw main frame custom scrollbars in root layer scrolling mode. Draw main frame custom scrollbars in root layer scrolling mode. On RLS custom scrollbars are picked from CompositedLayerMapping, Non-RLS custom scrollbars are picked from PaintLayerCompositor. BUG=623853 Committed: https://crrev.com/7dbeb9e5f11913900a9560691a60510376b6dc73 Cr-Commit-Position: refs/heads/master@{#417203} ==========
Message was sent while issue was closed.
Patchset 9 (id:??) landed as https://crrev.com/7dbeb9e5f11913900a9560691a60510376b6dc73 Cr-Commit-Position: refs/heads/master@{#417203} |