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

Issue 1048043002: Fix pointer-events:all when stroke="none" (Closed)

Created:
5 years, 8 months ago by dtrebbien
Modified:
5 years, 8 months ago
CC:
blink-reviews, blink-reviews-rendering, zoltan1, pdr+renderingwatchlist_chromium.org, eae+blinkwatch, leviw+renderwatch, kouhei+svg_chromium.org, Dominik Röttsches, ed+blinkwatch_opera.com, krit, f(malita), gyuyoung.kim_webkit.org, jchaffraix+rendering, Stephen Chennney, rwlbuis, pdr+svgwatchlist_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Fix pointer-events:all when stroke="none" pointer-events:all should make event processing unaffected by the values of the 'stroke' and 'fill' properties. However, when the 'stroke' of a shape was set to "none", hit detection would fail for points that would be in the shape's stroke area if the 'stroke' were not "none". On December 27 & 28, 2014, two CLs were committed implementing a fix for the issue, but they were reverted due to a 200%-225% regression of a performance test: PerformanceTests/SVG/SvgHitTesting.html The performance regression was due to the change in strokeContains() that skipped the check whether the stroke bounding box contained the point if !requiresStroke. On January 23, 2015, another CL attempt was made, but this was reverted for different performance regressions. The regressions were due to the change that the stroke bounding box would always be computed for <path>s. The modified fix implemented by this commit has four parts: 1. m_innerStrokeRect/m_outerStrokeRect are deleted from LayoutSVGRect. This is because shapeDependentStrokeContains(), which was the only user of these FloatRect objects, should ignore whether the shape actually has a stroke, but m_innerStrokeRect and m_outerStrokeRect were equal to the m_fillBoundingBox if the <rect> had no stroke. 2. The notion of the hit test stroke bounding box is introduced. The hit test stroke bounding box of a shape is considered to be the bounding box of the stroke, regardless of whether the shape has a stroke. 3. LayoutSVGShape::hitTestStrokeBoundingBox() is added to estimate the hit test stroke bounding box. 4. LayoutSVGShape::strokeContains() was changed so that if !requiresStroke, then we check whether the point is within the hit test stroke bounding box. If requiresStroke, then we check whether the point is within the stroke bounding box. BUG=350338, 445410, 452284, 435097 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=193216

Patch Set 1 #

Total comments: 3

Patch Set 2 : Addressing feedback #

Patch Set 3 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+768 lines, -23 lines) Patch
A LayoutTests/svg/hittest/pointer-events-all.html View 1 1 chunk +178 lines, -0 lines 0 comments Download
A LayoutTests/svg/hittest/pointer-events-all-expected.txt View 1 1 chunk +108 lines, -0 lines 0 comments Download
A LayoutTests/svg/hittest/pointer-events-all2.html View 1 1 chunk +136 lines, -0 lines 0 comments Download
A LayoutTests/svg/hittest/pointer-events-all2-expected.txt View 1 1 chunk +56 lines, -0 lines 0 comments Download
A LayoutTests/svg/hittest/rect-hittest.html View 1 chunk +146 lines, -0 lines 0 comments Download
A LayoutTests/svg/hittest/rect-hittest-expected.txt View 1 chunk +57 lines, -0 lines 0 comments Download
M Source/core/layout/svg/LayoutSVGPath.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/layout/svg/LayoutSVGPath.cpp View 1 2 3 chunks +37 lines, -1 line 0 comments Download
M Source/core/layout/svg/LayoutSVGRect.h View 1 chunk +0 lines, -2 lines 0 comments Download
M Source/core/layout/svg/LayoutSVGRect.cpp View 1 2 4 chunks +18 lines, -16 lines 0 comments Download
M Source/core/layout/svg/LayoutSVGShape.h View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/layout/svg/LayoutSVGShape.cpp View 1 2 2 chunks +24 lines, -4 lines 0 comments Download
M Source/core/style/SVGComputedStyle.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (4 generated)
dtrebbien
5 years, 8 months ago (2015-03-31 11:34:05 UTC) #2
dtrebbien
On 2015/03/31 11:34:05, dtrebbien wrote: This is a new CL for http://crbug.com/350338 using fs' idea ...
5 years, 8 months ago (2015-03-31 11:37:30 UTC) #3
fs
(Would've been nice to have had the old patch as PS1 so that it could ...
5 years, 8 months ago (2015-03-31 14:54:00 UTC) #4
dtrebbien
On 2015/03/31 14:54:00, fs wrote: > (Would've been nice to have had the old patch ...
5 years, 8 months ago (2015-04-05 01:20:12 UTC) #5
fs
lgtm Let's see if it sticks this time =)
5 years, 8 months ago (2015-04-05 13:38:03 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1048043002/20001
5 years, 8 months ago (2015-04-05 20:42:39 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: mac_blink_rel on tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/mac_blink_rel/builds/50548)
5 years, 8 months ago (2015-04-05 20:46:26 UTC) #10
dtrebbien
On 2015/04/05 20:46:26, I haz the power (commit-bot) wrote: > Try jobs failed on following ...
5 years, 8 months ago (2015-04-06 19:26:14 UTC) #11
fs
On 2015/04/06 19:26:14, dtrebbien wrote: > On 2015/04/05 20:46:26, I haz the power (commit-bot) wrote: ...
5 years, 8 months ago (2015-04-06 20:01:26 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1048043002/40001
5 years, 8 months ago (2015-04-06 20:02:32 UTC) #14
commit-bot: I haz the power
5 years, 8 months ago (2015-04-06 21:26:41 UTC) #15
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=193216

Powered by Google App Engine
This is Rietveld 408576698