|
Use nine-patch resource for drawing Aura overlay scrollbar thumb.
This patch factors out the nine-patch generation from NinePatchLayer
into a NinePatchGenerator and uses it to create a nine-patch scrollbar
layer that can change size without a repaint. This is used only in the
compositor. Scrollbars painted in Blink paint to the full required size.
The new scrollbar type is implemented in OverlayScrollbarLayer and Impl.
We add methods to NativeTheme to draw 9-patch versions of a theme part,
currently implemented for the scrollbar thumb for overlays in
NativeThemeAura. The NativeTheme provides two methods:
NinePatchCanvasSize() returns the size of the smallest canvas onto which
a nine patch part can be drawn.
NinePatchAperture() returns the rect in the canvas, whose size is
provided by the method above, which will be used as the middle patch in
the resource. Resizing the part will stretch only the middle patch in
both directions.
This is used mainly for the thinning animation in Aura overlay
scrollbars. We still need to repaint due to hover and pressed effects.
Technically, we could avoid repainting on size changes too but this would
require some additional work.
BUG= 669670
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel
Review-Url: https://codereview.chromium.org/2591863003
Cr-Commit-Position: refs/heads/master@{#454413}
Committed: https://chromium.googlesource.com/chromium/src/+/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6
Total comments: 1
Total comments: 13
Total comments: 8
Total comments: 10
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+1602 lines, -437 lines) |
Patch |
 |
M |
cc/BUILD.gn
|
View
|
1
2
3
4
5
6
7
|
3 chunks |
+7 lines, -0 lines |
0 comments
|
Download
|
 |
M |
cc/blink/scrollbar_impl.h
|
View
|
1
2
3
4
5
6
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
cc/blink/scrollbar_impl.cc
|
View
|
1
2
3
4
5
6
|
1 chunk |
+12 lines, -0 lines |
0 comments
|
Download
|
 |
M |
cc/blink/web_compositor_support_impl.h
|
View
|
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
cc/blink/web_compositor_support_impl.cc
|
View
|
|
1 chunk |
+9 lines, -0 lines |
0 comments
|
Download
|
 |
M |
cc/blink/web_scrollbar_layer_impl.h
|
View
|
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
M |
cc/blink/web_scrollbar_layer_impl.cc
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+13 lines, -0 lines |
0 comments
|
Download
|
 |
M |
cc/input/scrollbar.h
|
View
|
1
2
3
4
5
6
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
cc/layers/nine_patch_layer_impl.h
|
View
|
1
2
3
4
5
6
7
8
9
|
3 chunks |
+3 lines, -71 lines |
0 comments
|
Download
|
 |
M |
cc/layers/nine_patch_layer_impl.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
5 chunks |
+15 lines, -319 lines |
0 comments
|
Download
|
 |
A |
cc/layers/painted_overlay_scrollbar_layer.h
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+77 lines, -0 lines |
0 comments
|
Download
|
 |
A |
cc/layers/painted_overlay_scrollbar_layer.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+173 lines, -0 lines |
0 comments
|
Download
|
 |
A |
cc/layers/painted_overlay_scrollbar_layer_impl.h
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+82 lines, -0 lines |
0 comments
|
Download
|
 |
A |
cc/layers/painted_overlay_scrollbar_layer_impl.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
1 chunk |
+167 lines, -0 lines |
0 comments
|
Download
|
 |
A + |
cc/quads/nine_patch_generator.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
3 chunks |
+40 lines, -41 lines |
0 comments
|
Download
|
 |
A |
cc/quads/nine_patch_generator.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
1 chunk |
+396 lines, -0 lines |
0 comments
|
Download
|
 |
A |
cc/quads/nine_patch_generator_unittest.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+237 lines, -0 lines |
0 comments
|
Download
|
 |
A |
cc/test/data/overlay_scrollbar_scaled_down.png
|
View
|
1
2
3
4
5
6
7
8
|
Binary file |
0 comments
|
Download
|
 |
A |
cc/test/data/overlay_scrollbar_scaled_up.png
|
View
|
1
2
3
4
5
6
7
8
|
Binary file |
0 comments
|
Download
|
 |
M |
cc/test/fake_scrollbar.h
|
View
|
1
2
3
4
5
6
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
cc/test/fake_scrollbar.cc
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+12 lines, -0 lines |
0 comments
|
Download
|
 |
M |
cc/trees/layer_tree_host_pixeltest_scrollbars.cc
|
View
|
1
2
3
4
5
6
7
8
|
3 chunks |
+113 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/child/webthemeengine_impl_default.h
|
View
|
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/child/webthemeengine_impl_default.cc
|
View
|
|
1 chunk |
+15 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
1 chunk |
+10 lines, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/exported/WebScrollbarThemeGeometryNative.h
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/exported/WebScrollbarThemeGeometryNative.cpp
|
View
|
|
1 chunk |
+14 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/exported/WebScrollbarThemePainter.cpp
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/scroll/ScrollbarTheme.h
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+18 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlay.h
|
View
|
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlay.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+34 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/testing/TestingPlatformSupport.h
|
View
|
1
2
3
4
5
6
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/testing/TestingPlatformSupport.cpp
|
View
|
1
2
3
4
5
6
|
1 chunk |
+8 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/public/platform/WebCompositorSupport.h
|
View
|
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/public/platform/WebScrollbarThemeGeometry.h
|
View
|
|
2 chunks |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/public/platform/WebScrollbarThemePainter.h
|
View
|
|
2 chunks |
+4 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/public/platform/WebThemeEngine.h
|
View
|
|
2 chunks |
+5 lines, -2 lines |
0 comments
|
Download
|
 |
M |
ui/native_theme/native_theme.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+16 lines, -0 lines |
0 comments
|
Download
|
 |
M |
ui/native_theme/native_theme_aura.h
|
View
|
1
2
3
4
5
6
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
ui/native_theme/native_theme_aura.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
2 chunks |
+29 lines, -0 lines |
0 comments
|
Download
|
 |
M |
ui/native_theme/native_theme_base.h
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
ui/native_theme/native_theme_base.cc
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+14 lines, -0 lines |
0 comments
|
Download
|
 |
M |
ui/native_theme/native_theme_win.h
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
ui/native_theme/native_theme_win.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
1 chunk |
+16 lines, -0 lines |
0 comments
|
Download
|
 |
M |
ui/views/view_unittest.cc
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+8 lines, -0 lines |
0 comments
|
Download
|
Total messages: 78 (47 generated)
|