Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(191)

Issue 2835203005: Draw the text area resizer with drawing commands (Closed)

Created:
3 years, 7 months ago by Stephen Chennney
Modified:
3 years, 7 months ago
CC:
blink-reviews, blink-reviews-api_chromium.org, blink-reviews-paint_chromium.org, chromium-reviews, darin-cc_chromium.org, dglazkov+blink, dshwang, jam, jochen+watch_chromium.org, mlamouri+watch-content_chromium.org, Peter Beverloo
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Draw the text area resizer with drawing commands We were drawing the text area resizer using an image scaled to either 100% or 200% depending on the device scale factor. This leads to a resizer that is too small at 190% DPI, for example, and seems to sometimes draw too small on standard 2x DPI devices. This patch refactors the code to paint the resizer using lines, rather than an image. This results in correct behavior for any scale. R=fmalita@chromium.org, peter@chromium.org BUG=599225 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Review-Url: https://codereview.chromium.org/2835203005 Cr-Commit-Position: refs/heads/master@{#467992} Committed: https://chromium.googlesource.com/chromium/src/+/d4c124aa6f93deabb5415b6463d8ac6c362e0eab

Patch Set 1 #

Total comments: 4

Patch Set 2 : Add test and clean up code #

Patch Set 3 : Remove more files, and README reference #

Patch Set 4 : New baselines #

Unified diffs Side-by-side diffs Delta from patch set Stats (+187 lines, -50 lines) Patch
M content/app/resources/README.txt View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M content/child/blink_platform_impl.cc View 1 chunk +0 lines, -4 lines 0 comments Download
M content/shell/BUILD.gn View 1 1 chunk +0 lines, -1 line 0 comments Download
M content/shell/common/shell_content_client.cc View 1 chunk +0 lines, -4 lines 0 comments Download
D content/shell/resources/textAreaResizeCorner.png View Binary file 0 comments Download
M content/shell/shell_resources.grd View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/fast/css/resize-corner-tracking-transformed-expected.png View 1 2 3 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/fast/css/resize-corner-tracking-transformed-iframe-expected.png View 1 2 3 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/fast/forms/textarea/textarea-appearance-basic-expected.png View 1 2 3 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/linux/scrollbars/resize-scales-with-dpi-150-expected.png View 1 2 3 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/linux/virtual/prefer_compositing_to_lcd_text/scrollbars/resize-scales-with-dpi-150-expected.png View 1 2 3 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/linux/virtual/prefer_compositing_to_lcd_text/scrollbars/resize-scales-with-dpi-150-expected.txt View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/platform/linux/virtual/rootlayerscrolls/scrollbars/resize-scales-with-dpi-150-expected.png View 1 2 3 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/linux/virtual/rootlayerscrolls/scrollbars/resize-scales-with-dpi-150-expected.txt View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/platform/linux/virtual/sharedarraybuffer/fast/css/resize-corner-tracking-transformed-expected.png View 1 2 3 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/linux/virtual/sharedarraybuffer/fast/css/resize-corner-tracking-transformed-iframe-expected.png View 1 2 3 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/textarea/textarea-appearance-basic-expected.png View 1 2 3 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/prefer_compositing_to_lcd_text/scrollbars/resize-scales-with-dpi-150-expected.png View 1 2 3 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/prefer_compositing_to_lcd_text/scrollbars/resize-scales-with-dpi-150-expected.txt View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/rootlayerscrolls/scrollbars/resize-scales-with-dpi-150-expected.png View 1 2 3 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/rootlayerscrolls/scrollbars/resize-scales-with-dpi-150-expected.txt View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/forms/textarea/textarea-appearance-basic-expected.png View 1 2 3 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac-mac10.11/virtual/prefer_compositing_to_lcd_text/scrollbars/resize-scales-with-dpi-150-expected.png View 1 2 3 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac-mac10.11/virtual/prefer_compositing_to_lcd_text/scrollbars/resize-scales-with-dpi-150-expected.txt View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac-mac10.11/virtual/rootlayerscrolls/scrollbars/resize-scales-with-dpi-150-expected.png View 1 2 3 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac-mac10.11/virtual/rootlayerscrolls/scrollbars/resize-scales-with-dpi-150-expected.txt View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/textarea/textarea-appearance-basic-expected.png View 1 2 3 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/hidpi/resize-corner-hidpi-expected.png View 1 2 3 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac-mac10.9/scrollbars/resize-scales-with-dpi-150-expected.png View 1 2 3 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac-mac10.9/virtual/prefer_compositing_to_lcd_text/scrollbars/resize-scales-with-dpi-150-expected.png View 1 2 3 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac-mac10.9/virtual/prefer_compositing_to_lcd_text/scrollbars/resize-scales-with-dpi-150-expected.txt View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac-mac10.9/virtual/rootlayerscrolls/scrollbars/resize-scales-with-dpi-150-expected.png View 1 2 3 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac-mac10.9/virtual/rootlayerscrolls/scrollbars/resize-scales-with-dpi-150-expected.txt View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/textarea/textarea-appearance-basic-expected.png View 1 2 3 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac-retina/virtual/prefer_compositing_to_lcd_text/scrollbars/resize-scales-with-dpi-150-expected.png View 1 2 3 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac-retina/virtual/prefer_compositing_to_lcd_text/scrollbars/resize-scales-with-dpi-150-expected.txt View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac-retina/virtual/rootlayerscrolls/scrollbars/resize-scales-with-dpi-150-expected.png View 1 2 3 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac-retina/virtual/rootlayerscrolls/scrollbars/resize-scales-with-dpi-150-expected.txt View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac/fast/css/resize-corner-tracking-transformed-expected.png View 1 2 3 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac/fast/css/resize-corner-tracking-transformed-iframe-expected.png View 1 2 3 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac/fast/forms/textarea/textarea-appearance-basic-expected.png View 1 2 3 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac/fast/hidpi/resize-corner-hidpi-expected.png View 1 2 3 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac/scrollbars/resize-scales-with-dpi-150-expected.png View 1 2 3 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac/virtual/prefer_compositing_to_lcd_text/scrollbars/resize-scales-with-dpi-150-expected.png View 1 2 3 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac/virtual/prefer_compositing_to_lcd_text/scrollbars/resize-scales-with-dpi-150-expected.txt View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac/virtual/rootlayerscrolls/scrollbars/resize-scales-with-dpi-150-expected.png View 1 2 3 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac/virtual/rootlayerscrolls/scrollbars/resize-scales-with-dpi-150-expected.txt View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac/virtual/sharedarraybuffer/fast/css/resize-corner-tracking-transformed-expected.png View 1 2 3 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac/virtual/sharedarraybuffer/fast/css/resize-corner-tracking-transformed-iframe-expected.png View 1 2 3 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/fast/css/resize-corner-tracking-transformed-expected.png View 1 2 3 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/fast/css/resize-corner-tracking-transformed-iframe-expected.png View 1 2 3 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/fast/forms/textarea/textarea-appearance-basic-expected.png View 1 2 3 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/win/virtual/sharedarraybuffer/fast/css/resize-corner-tracking-transformed-expected.png View 1 2 3 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/win/virtual/sharedarraybuffer/fast/css/resize-corner-tracking-transformed-iframe-expected.png View 1 2 3 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/win7/virtual/sharedarraybuffer/fast/css/resize-corner-tracking-transformed-expected.png View 1 2 3 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/win7/virtual/sharedarraybuffer/fast/css/resize-corner-tracking-transformed-iframe-expected.png View 1 2 3 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/scrollbars/resize-scales-with-dpi-150.html View 1 1 chunk +13 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/scrollbars/resize-scales-with-dpi-150-expected.png View 1 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/scrollbars/resize-scales-with-dpi-150-expected.txt View 1 1 chunk +10 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/paint/ScrollableAreaPainter.cpp View 1 1 chunk +44 lines, -38 lines 0 comments Download
M third_party/WebKit/public/blink_image_resources.grd View 1 chunk +0 lines, -1 line 0 comments Download
D third_party/WebKit/public/default_100_percent/blink/textarea_resize_corner.png View 1 2 Binary file 0 comments Download
D third_party/WebKit/public/default_200_percent/blink/textarea_resize_corner.png View 1 2 Binary file 0 comments Download

Messages

Total messages: 41 (24 generated)
Stephen Chennney
Not super clean because GraphicsContext doesn't support arbitrary oriented line drawing (despite the existence of ...
3 years, 7 months ago (2017-04-25 20:55:28 UTC) #2
Stephen Chennney
Actually, there's something wrong here. It doesn't seem to be scaling or zooming at all.
3 years, 7 months ago (2017-04-25 20:59:11 UTC) #5
f(malita)
https://codereview.chromium.org/2835203005/diff/1/third_party/WebKit/Source/core/paint/ScrollableAreaPainter.cpp File third_party/WebKit/Source/core/paint/ScrollableAreaPainter.cpp (right): https://codereview.chromium.org/2835203005/diff/1/third_party/WebKit/Source/core/paint/ScrollableAreaPainter.cpp#newcode84 third_party/WebKit/Source/core/paint/ScrollableAreaPainter.cpp:84: context.DrawPath(line_path, paint_flags); Can we use DrawLine instead? (DrawPoints would ...
3 years, 7 months ago (2017-04-26 17:56:34 UTC) #12
Stephen Chennney
On 2017/04/26 17:56:34, f(malita) wrote: > https://codereview.chromium.org/2835203005/diff/1/third_party/WebKit/Source/core/paint/ScrollableAreaPainter.cpp > File third_party/WebKit/Source/core/paint/ScrollableAreaPainter.cpp (right): > > https://codereview.chromium.org/2835203005/diff/1/third_party/WebKit/Source/core/paint/ScrollableAreaPainter.cpp#newcode84 > ...
3 years, 7 months ago (2017-04-26 18:16:16 UTC) #13
Stephen Chennney
+kinuko for chrome and blink_platform removal of the image resource Otherwise have added a test ...
3 years, 7 months ago (2017-04-27 15:22:11 UTC) #16
Peter Beverloo
lgtm I think we can also remove the following two files now: third_party/WebKit/public/default_100_percent/blink/textarea_resize_corner.png third_party/WebKit/public/default_200_percent/blink/textarea_resize_corner.png Would ...
3 years, 7 months ago (2017-04-27 15:32:49 UTC) #19
f(malita)
LGTM
3 years, 7 months ago (2017-04-27 15:41:34 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2835203005/60001
3 years, 7 months ago (2017-04-27 17:48:42 UTC) #25
commit-bot: I haz the power
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_presubmit/builds/422305)
3 years, 7 months ago (2017-04-27 18:01:20 UTC) #27
Stephen Chennney
+esprehn, who I think has the power to approve the remaining unapproved changes.
3 years, 7 months ago (2017-04-27 18:13:22 UTC) #29
esprehn
lgtm
3 years, 7 months ago (2017-04-27 18:53:20 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2835203005/60001
3 years, 7 months ago (2017-04-27 19:11:42 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm64_dbg_recipe/builds/256885) chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, ...
3 years, 7 months ago (2017-04-27 19:34:47 UTC) #34
Stephen Chennney
On 2017/04/27 19:34:47, commit-bot: I haz the power wrote: > Try jobs failed on following ...
3 years, 7 months ago (2017-04-27 19:48:32 UTC) #35
kinuko
lgtm (looks like the bot failure is unrelated)
3 years, 7 months ago (2017-04-28 13:15:48 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2835203005/60001
3 years, 7 months ago (2017-04-28 13:32:36 UTC) #38
commit-bot: I haz the power
3 years, 7 months ago (2017-04-28 14:35:24 UTC) #41
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/d4c124aa6f93deabb5415b6463d8...

Powered by Google App Engine
This is Rietveld 408576698