|
|
Descriptionadd Tickmarks to aura overlay scrollbar
In this patch, I reuse the paintTickmarks implement in ScrollbarThemeAura.
It has same behavier with Tickmarks in ScrollbarThemeMac.
BUG=661392
Committed: https://crrev.com/bafa9a4a5a355f516d15f09d67fea74c91c3c42b
Cr-Commit-Position: refs/heads/master@{#432516}
Patch Set 1 #Patch Set 2 : add Tickmarks to aura overlay scrollbar #
Total comments: 2
Patch Set 3 : bokan@ comments addressed #
Total comments: 1
Patch Set 4 : add NOTREACHED check and remove useless head file #
Total comments: 1
Patch Set 5 : add commit #Patch Set 6 : ScrollbarThemeMac also use base impl #Patch Set 7 : skip ScrollbarTheme::paintTickmarks for android #Patch Set 8 : skip ScrollbarTheme::paintTickmarks for android #Patch Set 9 : test mac #Patch Set 10 : fix for mac #
Total comments: 1
Patch Set 11 : add tickmarkBorderWidth #Patch Set 12 : typo #
Messages
Total messages: 77 (48 generated)
Description was changed from ========== add Tickmarks to aura overlay scrollbar add Tickmarks to aura overlay scrollbar. In this patch, I copy the paintTickmarks implement in ScrollbarThemeAura to ScrollbarThemeOverlay. It has same behavier with Tickmarks in ScrollbarThemeMac. BUG=661392 ========== to ========== add Tickmarks to aura overlay scrollbar add Tickmarks to aura overlay scrollbar. In this patch, I copy the paintTickmarks implement in ScrollbarThemeAura to ScrollbarThemeOverlay. It has same behavier with Tickmarks in ScrollbarThemeMac. BUG=661392 ==========
chaopeng@chromium.org changed reviewers: + bokan@chromium.org
Description was changed from ========== add Tickmarks to aura overlay scrollbar add Tickmarks to aura overlay scrollbar. In this patch, I copy the paintTickmarks implement in ScrollbarThemeAura to ScrollbarThemeOverlay. It has same behavier with Tickmarks in ScrollbarThemeMac. BUG=661392 ========== to ========== add Tickmarks to aura overlay scrollbar add Tickmarks to aura overlay scrollbar. In this patch, I copy the paintTickmarks implement in ScrollbarThemeAura to ScrollbarThemeOverlay. It has same behavier with Tickmarks in ScrollbarThemeMac. BUG=661392 ==========
Description was changed from ========== add Tickmarks to aura overlay scrollbar add Tickmarks to aura overlay scrollbar. In this patch, I copy the paintTickmarks implement in ScrollbarThemeAura to ScrollbarThemeOverlay. It has same behavier with Tickmarks in ScrollbarThemeMac. BUG=661392 ========== to ========== add Tickmarks to aura overlay scrollbar add Tickmarks to aura overlay scrollbar. In this patch, I reuse the paintTickmarks implement in ScrollbarThemeAura. It has same behavier with Tickmarks in ScrollbarThemeMac. BUG=661392 ==========
PTAL. I also add some screenshot to the issue.
Description was changed from ========== add Tickmarks to aura overlay scrollbar add Tickmarks to aura overlay scrollbar. In this patch, I reuse the paintTickmarks implement in ScrollbarThemeAura. It has same behavier with Tickmarks in ScrollbarThemeMac. BUG=661392 ========== to ========== add Tickmarks to aura overlay scrollbar In this patch, I reuse the paintTickmarks implement in ScrollbarThemeAura. It has same behavier with Tickmarks in ScrollbarThemeMac. BUG=661392 ==========
Also, are there any existing tests for tickmarks? https://codereview.chromium.org/2478743003/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/platform/scroll/ScrollbarThemeAura.h (right): https://codereview.chromium.org/2478743003/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/scroll/ScrollbarThemeAura.h:42: static void paintAuraTickmarks(GraphicsContext&, Lets just move this implementation into ScrollbarTheme and just override with an empty implementation in Themes that shouldn't have it. By my count: -ScrollbarThemeMac overrides with its own impl so that's fine -ScrollbarThemeMock (and OverlayMock) previously didn't have it but if it doesn't cause any tests to break it wont hurt to leave it in. -ScrollbarThemeAndroid didn't have it either but maybe that's ok if it uses its own implementation through a different path. In any case, we should override with an empty impl and a comment describing where that happens on Android. -ScrollbarThemeOverlay and ScrollbarThemeAura can just use the base version we move into ScrollbarTheme https://codereview.chromium.org/2478743003/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlay.h (right): https://codereview.chromium.org/2478743003/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlay.h:69: void paintTickmarks(GraphicsContext&, Android uses this ScrollbarTheme, how do they draw tickmarks in Android? Presumably there's some special path?
On 2016/11/04 19:46:25, bokan wrote: > Also, are there any existing tests for tickmarks? > > https://codereview.chromium.org/2478743003/diff/20001/third_party/WebKit/Sour... > File third_party/WebKit/Source/platform/scroll/ScrollbarThemeAura.h (right): > > https://codereview.chromium.org/2478743003/diff/20001/third_party/WebKit/Sour... > third_party/WebKit/Source/platform/scroll/ScrollbarThemeAura.h:42: static void > paintAuraTickmarks(GraphicsContext&, > Lets just move this implementation into ScrollbarTheme and just override with an > empty implementation in Themes that shouldn't have it. By my count: > > -ScrollbarThemeMac overrides with its own impl so that's fine > > -ScrollbarThemeMock (and OverlayMock) previously didn't have it but if it > doesn't cause any tests to break it wont hurt to leave it in. > > -ScrollbarThemeAndroid didn't have it either but maybe that's ok if it uses its > own implementation through a different path. In any case, we should override > with an empty impl and a comment describing where that happens on Android. > > -ScrollbarThemeOverlay and ScrollbarThemeAura can just use the base version we > move into ScrollbarTheme > > https://codereview.chromium.org/2478743003/diff/20001/third_party/WebKit/Sour... > File third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlay.h (right): > > https://codereview.chromium.org/2478743003/diff/20001/third_party/WebKit/Sour... > third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlay.h:69: void > paintTickmarks(GraphicsContext&, > Android uses this ScrollbarTheme, how do they draw tickmarks in Android? > Presumably there's some special path? I will add some tests. Android tickmarks is powered by /src/chrome/android/java/src/org/chromium/chrome/browser/widget/findinpage/FindResultBar.java
Ok, no test needed since we test the basic implementation and this is just enabling on Aura overlay. The only issue I see is that Android now gets this implementation since it uses ScrollbarThemeOverlay. Could you add a NOTREACHED() inside #if OS(ANDROID) and see if that trips on Android when you do a find in page? https://codereview.chromium.org/2478743003/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlay.cpp (right): https://codereview.chromium.org/2478743003/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlay.cpp:32: #include "platform/scroll/ScrollbarThemeAura.h" This is unneeded?
On 2016/11/07 16:57:39, bokan wrote: > Ok, no test needed since we test the basic implementation and this is just > enabling on Aura overlay. > > The only issue I see is that Android now gets this implementation since it uses > ScrollbarThemeOverlay. Could you add a NOTREACHED() inside #if OS(ANDROID) and > see if that trips on Android when you do a find in page? > > https://codereview.chromium.org/2478743003/diff/40001/third_party/WebKit/Sour... > File third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlay.cpp > (right): > > https://codereview.chromium.org/2478743003/diff/40001/third_party/WebKit/Sour... > third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlay.cpp:32: #include > "platform/scroll/ScrollbarThemeAura.h" > This is unneeded? 1. add NOTREACHED check and I tested it didnot reach on Android. 2. removed PTAL. Thank you.
lgtm % comment https://codereview.chromium.org/2478743003/diff/60001/third_party/WebKit/Sour... File third_party/WebKit/Source/platform/scroll/ScrollbarTheme.cpp (right): https://codereview.chromium.org/2478743003/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/scroll/ScrollbarTheme.cpp:232: NOTREACHED(); Just add a comment here that Android paints tickmarks in the browser at FindResultBar.java.
The CQ bit was checked by chaopeng@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from bokan@chromium.org Link to the patchset: https://codereview.chromium.org/2478743003/#ps80001 (title: "add commit")
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
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presub...)
chaopeng@chromium.org changed reviewers: + jbroman@chromium.org
jbroman@ PTAL Thank you
rs lgtm on the basis of bokan's review But it does seem a little odd to have logic in ScrollbarTheme proper that doesn't logically apply to all ScrollbarTheme classes (and rely on it being overridden on Android, Mac, etc.); should this really be a common superclass or utility logic somewhere else?
On 2016/11/07 20:31:00, jbroman wrote: > rs lgtm on the basis of bokan's review > > But it does seem a little odd to have logic in ScrollbarTheme proper that > doesn't logically apply to all ScrollbarTheme classes (and rely on it being > overridden on Android, Mac, etc.); should this really be a common superclass or > utility logic somewhere else? Is it add a class: ScrollbarTickmarks with a static method paintTickmarks better?
On 2016/11/08 15:54:10, chaopeng wrote: > On 2016/11/07 20:31:00, jbroman wrote: > > rs lgtm on the basis of bokan's review > > > > But it does seem a little odd to have logic in ScrollbarTheme proper that > > doesn't logically apply to all ScrollbarTheme classes (and rely on it being > > overridden on Android, Mac, etc.); should this really be a common superclass > or > > utility logic somewhere else? > > Is it add a class: ScrollbarTickmarks with a static method paintTickmarks > better? Hmm, there's really no reason why Mac has a special implementation, it looks basically the same to me. Could you see if using the base impl on Mac works as expected? In that case I think it makes sense to keep it in ScrollbarTheme (and remove the version in ScrollbarThemeMac) since it applies to all ScrollbarThemes except Android.
On 2016/11/08 16:01:10, bokan wrote: > On 2016/11/08 15:54:10, chaopeng wrote: > > On 2016/11/07 20:31:00, jbroman wrote: > > > rs lgtm on the basis of bokan's review > > > > > > But it does seem a little odd to have logic in ScrollbarTheme proper that > > > doesn't logically apply to all ScrollbarTheme classes (and rely on it being > > > overridden on Android, Mac, etc.); should this really be a common superclass > > or > > > utility logic somewhere else? > > > > Is it add a class: ScrollbarTickmarks with a static method paintTickmarks > > better? > > Hmm, there's really no reason why Mac has a special implementation, it looks > basically the same to me. Could you see if using the base impl on Mac works as > expected? In that case I think it makes sense to keep it in ScrollbarTheme (and > remove the version in ScrollbarThemeMac) since it applies to all ScrollbarThemes > except Android. Please hold off on landing for now, I'm going to have to revert a few CLs speculatively because of crbug.com/662402
On 2016/11/08 17:00:47, bokan wrote: > On 2016/11/08 16:01:10, bokan wrote: > > On 2016/11/08 15:54:10, chaopeng wrote: > > > On 2016/11/07 20:31:00, jbroman wrote: > > > > rs lgtm on the basis of bokan's review > > > > > > > > But it does seem a little odd to have logic in ScrollbarTheme proper that > > > > doesn't logically apply to all ScrollbarTheme classes (and rely on it > being > > > > overridden on Android, Mac, etc.); should this really be a common > superclass > > > or > > > > utility logic somewhere else? > > > > > > Is it add a class: ScrollbarTickmarks with a static method paintTickmarks > > > better? > > > > Hmm, there's really no reason why Mac has a special implementation, it looks > > basically the same to me. Could you see if using the base impl on Mac works as > > expected? In that case I think it makes sense to keep it in ScrollbarTheme > (and > > remove the version in ScrollbarThemeMac) since it applies to all > ScrollbarThemes > > except Android. > > Please hold off on landing for now, I'm going to have to revert a few CLs > speculatively because of crbug.com/662402 OK. I try use base impl in Mac. It works. The different between Mac and others is Mac paint stroke for tickmark. PTAL. Thank you.
This looks fine to me, just make sure it still works with custom scrollbars: e.g. bokand.github.io/custom.html And please don't land yet due to comment above.
On 2016/11/08 17:35:49, bokan wrote: > This looks fine to me, just make sure it still works with custom scrollbars: > e.g. bokand.github.io/custom.html > > And please don't land yet due to comment above. still works with custom scrollbars.
The CQ bit was checked by chaopeng@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from bokan@chromium.org, jbroman@chromium.org Link to the patchset: https://codereview.chromium.org/2478743003/#ps100001 (title: "ScrollbarThemeMac also use base impl")
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
Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_...)
Patchset #7 (id:120001) has been deleted
The CQ bit was checked by chaopeng@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from bokan@chromium.org, jbroman@chromium.org Link to the patchset: https://codereview.chromium.org/2478743003/#ps160001 (title: "skip ScrollbarTheme::paintTickmarks for android")
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
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
The CQ bit was checked by chaopeng@chromium.org 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: Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
The CQ bit was checked by chaopeng@chromium.org 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: Try jobs failed on following builders: android_clang_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_clan...)
https://codereview.chromium.org/2478743003/diff/200001/third_party/WebKit/Sou... File third_party/WebKit/Source/platform/scroll/ScrollbarThemeMac.h (right): https://codereview.chromium.org/2478743003/diff/200001/third_party/WebKit/Sou... third_party/WebKit/Source/platform/scroll/ScrollbarThemeMac.h:57: void paintTickmarks(GraphicsContext&, Don't override paintTickmarks. Add a new method `virtual int tickmarkBorderWidth()` and call it from paintTickmarks. Then just override tickmarkBorderWidth in ScrollbarThemeMac
On 2016/11/15 02:03:28, bokan wrote: > https://codereview.chromium.org/2478743003/diff/200001/third_party/WebKit/Sou... > File third_party/WebKit/Source/platform/scroll/ScrollbarThemeMac.h (right): > > https://codereview.chromium.org/2478743003/diff/200001/third_party/WebKit/Sou... > third_party/WebKit/Source/platform/scroll/ScrollbarThemeMac.h:57: void > paintTickmarks(GraphicsContext&, > Don't override paintTickmarks. Add a new method `virtual int > tickmarkBorderWidth()` and call it from paintTickmarks. Then just override > tickmarkBorderWidth in ScrollbarThemeMac We also need to add a method "tickmarkRect" for Mac if we don't override paintTickmarks. Should we do that?
On 2016/11/15 03:54:14, chaopeng wrote: > On 2016/11/15 02:03:28, bokan wrote: > > > https://codereview.chromium.org/2478743003/diff/200001/third_party/WebKit/Sou... > > File third_party/WebKit/Source/platform/scroll/ScrollbarThemeMac.h (right): > > > > > https://codereview.chromium.org/2478743003/diff/200001/third_party/WebKit/Sou... > > third_party/WebKit/Source/platform/scroll/ScrollbarThemeMac.h:57: void > > paintTickmarks(GraphicsContext&, > > Don't override paintTickmarks. Add a new method `virtual int > > tickmarkBorderWidth()` and call it from paintTickmarks. Then just override > > tickmarkBorderWidth in ScrollbarThemeMac > > We also need to add a method "tickmarkRect" for Mac if we don't override > paintTickmarks. Should we do that? For that, it's ok to override paintTickmarks, modify the rect and call the base class.
The CQ bit was checked by chaopeng@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from bokan@chromium.org, jbroman@chromium.org Link to the patchset: https://codereview.chromium.org/2478743003/#ps200001 (title: "fix for mac")
The CQ bit was unchecked by chaopeng@chromium.org
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 chaopeng@chromium.org
The CQ bit was checked by chaopeng@chromium.org 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...
On 2016/11/15 12:31:42, bokan wrote: > On 2016/11/15 03:54:14, chaopeng wrote: > > On 2016/11/15 02:03:28, bokan wrote: > > > > > > https://codereview.chromium.org/2478743003/diff/200001/third_party/WebKit/Sou... > > > File third_party/WebKit/Source/platform/scroll/ScrollbarThemeMac.h (right): > > > > > > > > > https://codereview.chromium.org/2478743003/diff/200001/third_party/WebKit/Sou... > > > third_party/WebKit/Source/platform/scroll/ScrollbarThemeMac.h:57: void > > > paintTickmarks(GraphicsContext&, > > > Don't override paintTickmarks. Add a new method `virtual int > > > tickmarkBorderWidth()` and call it from paintTickmarks. Then just override > > > tickmarkBorderWidth in ScrollbarThemeMac > > > > We also need to add a method "tickmarkRect" for Mac if we don't override > > paintTickmarks. Should we do that? > > For that, it's ok to override paintTickmarks, modify the rect and call the base > class. PTAL. Thank you.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
The CQ bit was checked by chaopeng@chromium.org 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: Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linu...)
The CQ bit was checked by chaopeng@chromium.org 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: Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linu...)
The CQ bit was checked by chaopeng@chromium.org 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.
Sorry about the delay, didn't realize you were still waiting on me. still lgtm
The CQ bit was checked by bokan@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from jbroman@chromium.org Link to the patchset: https://codereview.chromium.org/2478743003/#ps240001 (title: "typo")
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 ========== add Tickmarks to aura overlay scrollbar In this patch, I reuse the paintTickmarks implement in ScrollbarThemeAura. It has same behavier with Tickmarks in ScrollbarThemeMac. BUG=661392 ========== to ========== add Tickmarks to aura overlay scrollbar In this patch, I reuse the paintTickmarks implement in ScrollbarThemeAura. It has same behavier with Tickmarks in ScrollbarThemeMac. BUG=661392 ==========
Message was sent while issue was closed.
Committed patchset #12 (id:240001)
Message was sent while issue was closed.
Description was changed from ========== add Tickmarks to aura overlay scrollbar In this patch, I reuse the paintTickmarks implement in ScrollbarThemeAura. It has same behavier with Tickmarks in ScrollbarThemeMac. BUG=661392 ========== to ========== add Tickmarks to aura overlay scrollbar In this patch, I reuse the paintTickmarks implement in ScrollbarThemeAura. It has same behavier with Tickmarks in ScrollbarThemeMac. BUG=661392 Committed: https://crrev.com/bafa9a4a5a355f516d15f09d67fea74c91c3c42b Cr-Commit-Position: refs/heads/master@{#432516} ==========
Message was sent while issue was closed.
Patchset 12 (id:??) landed as https://crrev.com/bafa9a4a5a355f516d15f09d67fea74c91c3c42b Cr-Commit-Position: refs/heads/master@{#432516} |