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

Issue 1956583002: Clamp Mac theme painting to reasonable large bounds. (Closed)

Created:
4 years, 7 months ago by wkorman
Modified:
4 years, 7 months ago
Reviewers:
chrishtr
CC:
blink-reviews, blink-reviews-layout_chromium.org, blink-reviews-paint_chromium.org, chromium-reviews, dshwang, eae+blinkwatch, jchaffraix+rendering, kinuko+watch, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, slimming-paint-reviews_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Clamp Mac theme painting to reasonable large bounds. Previously we aimed to clip to the interest rect of the graphics layer in LocalCurrentGraphicsContext. However, in some cases the rect we clip to is the clip inherited from an overflow clip ancestor, which can lead to complexity w.r.t. caching. Rather than reworking interest rect and cache skipping logic across the code base for Mac theme specific painting purposes, we choose to clamp Mac theme painting to a reasonable bounding size. This means huge elements requiring native element painting will no longer render correctly, but in such cases we may already have been performing poorly. BUG=592915 Committed: https://crrev.com/ec218fb8a6013ab21b83590acf77530cbbce1097 Cr-Commit-Position: refs/heads/master@{#392468}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Rework clamping. #

Patch Set 3 : Add tests. #

Patch Set 4 : Increase max dirty pixel size to 10K. #

Total comments: 6

Patch Set 5 : Integrate feedback. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+48 lines, -23 lines) Patch
M third_party/WebKit/LayoutTests/TestExpectations View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/forms/huge-mac-input-clamped-height.html View 1 2 3 4 1 chunk +11 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/forms/huge-mac-input-clamped-width.html View 1 2 3 4 1 chunk +11 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutThemeMac.mm View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/paint/ThemePainterMac.mm View 7 chunks +7 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/platform/mac/LocalCurrentGraphicsContext.h View 1 chunk +1 line, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/mac/LocalCurrentGraphicsContext.mm View 1 2 3 4 2 chunks +15 lines, -12 lines 0 comments Download

Messages

Total messages: 18 (6 generated)
wkorman
Minimal change, open to fancier business as you think warranted. Perhaps I've overlooked complexity and ...
4 years, 7 months ago (2016-05-05 22:09:27 UTC) #3
chrishtr
https://codereview.chromium.org/1956583002/diff/1/third_party/WebKit/Source/platform/mac/LocalCurrentGraphicsContext.mm File third_party/WebKit/Source/platform/mac/LocalCurrentGraphicsContext.mm (right): https://codereview.chromium.org/1956583002/diff/1/third_party/WebKit/Source/platform/mac/LocalCurrentGraphicsContext.mm#newcode47 third_party/WebKit/Source/platform/mac/LocalCurrentGraphicsContext.mm:47: if (!clampRect.contains(m_inflatedDirtyRect)) { I think you need to adjust ...
4 years, 7 months ago (2016-05-05 23:50:58 UTC) #4
wkorman
Can't find a way to turn off the default layout mock theme. Do you know ...
4 years, 7 months ago (2016-05-06 22:42:56 UTC) #5
chrishtr
Maybe put a RELEASE_ASSERT(false) in ThemPainterMac and run the layout tests?
4 years, 7 months ago (2016-05-06 23:02:53 UTC) #6
wkorman
Added tests. AFAICT Mac LayoutTests just run with Mac theme, at least locally. Most of ...
4 years, 7 months ago (2016-05-06 23:36:27 UTC) #7
wkorman
On 2016/05/06 23:36:27, wkorman wrote: > Added tests. AFAICT Mac LayoutTests just run with Mac ...
4 years, 7 months ago (2016-05-06 23:54:41 UTC) #8
wkorman
PTAL, updated to 10K from 5K for max dirty pixel size.
4 years, 7 months ago (2016-05-09 21:11:58 UTC) #9
chrishtr
lgtm https://codereview.chromium.org/1956583002/diff/60001/third_party/WebKit/LayoutTests/fast/forms/huge-mac-input-clamped-height.html File third_party/WebKit/LayoutTests/fast/forms/huge-mac-input-clamped-height.html (right): https://codereview.chromium.org/1956583002/diff/60001/third_party/WebKit/LayoutTests/fast/forms/huge-mac-input-clamped-height.html#newcode2 third_party/WebKit/LayoutTests/fast/forms/huge-mac-input-clamped-height.html:2: <p>Test passes if the input element is truncated ...
4 years, 7 months ago (2016-05-09 21:42:20 UTC) #10
wkorman
https://codereview.chromium.org/1956583002/diff/60001/third_party/WebKit/LayoutTests/fast/forms/huge-mac-input-clamped-height.html File third_party/WebKit/LayoutTests/fast/forms/huge-mac-input-clamped-height.html (right): https://codereview.chromium.org/1956583002/diff/60001/third_party/WebKit/LayoutTests/fast/forms/huge-mac-input-clamped-height.html#newcode2 third_party/WebKit/LayoutTests/fast/forms/huge-mac-input-clamped-height.html:2: <p>Test passes if the input element is truncated beyond ...
4 years, 7 months ago (2016-05-09 22:14:24 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1956583002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1956583002/80001
4 years, 7 months ago (2016-05-09 22:15:10 UTC) #14
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 7 months ago (2016-05-09 23:19:33 UTC) #16
commit-bot: I haz the power
4 years, 7 months ago (2016-05-09 23:22:26 UTC) #18
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/ec218fb8a6013ab21b83590acf77530cbbce1097
Cr-Commit-Position: refs/heads/master@{#392468}

Powered by Google App Engine
This is Rietveld 408576698