Closed
Bug 831529
Opened 12 years ago
Closed 10 years ago
PathSkia::ContainsPoint treats points on the bottom/right edges as being outside
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
mozilla21
People
(Reporter: mattwoodrow, Unassigned)
References
Details
Attachments
(1 file)
(deleted),
patch
|
jrmuizel
:
review+
|
Details | Diff | Splinter Review |
The canvas spec requires that these points are considered inside. We fail 2 tests in test_canvas.html because of this.
This was regressed by the change in bug 806780.
I don't think we can just change the behaviour of the skia method, since it's implemented on SkRect and would probably break other things.
We could add a second method to skia (SkPath::containsInclusive or something?), backout bug 806780 (which would be a shame, since the old code was horrible), or pad the input rect.
Thoughts?
Comment 1•12 years ago
|
||
Comment 2•12 years ago
|
||
(In reply to George Wright (:gw280) from comment #1)
> http://trac.webkit.org/browser/trunk/Source/WebCore/platform/graphics/skia/
> SkiaUtils.cpp#L121
We switched from this style of hit testing.
Reporter | ||
Comment 3•12 years ago
|
||
(In reply to Jeff Muizelaar [:jrmuizel] from comment #2)
> We switched from this style of hit testing.
Was this a correct change? The new behaviour doesn't match the canvas spec at least.
Comment 4•12 years ago
|
||
(In reply to Matt Woodrow (:mattwoodrow) from comment #3)
> (In reply to Jeff Muizelaar [:jrmuizel] from comment #2)
> > We switched from this style of hit testing.
>
> Was this a correct change? The new behaviour doesn't match the canvas spec
> at least.
It would be correct from the point of view of using the Skia api properly, but not correct from the point of view of the canvas spec. I have no problem with us reverting to the webkit behaviour but we should try to get this fixed upstream.
SkPath now has a native contais(x, y) method. It should be much faster than creating a region. I think it also has the min <= x < max rule, but if that is all that needs tweaking, I think we can make a version that is min <= x <= max.
Comment 6•12 years ago
|
||
(In reply to reed from comment #5)
> SkPath now has a native contais(x, y) method. It should be much faster than
> creating a region. I think it also has the min <= x < max rule, but if that
> is all that needs tweaking, I think we can make a version that is min <= x
> <= max.
Great, it seems to me that we would need that tweak. Would this change break much in other parts of Skia/Chrome (and thus would it be best to use Matt's suggestion of adding a containsInclusive(x,y) instead of changing the behaviour of contains)?
I would definitely make this new bahavior optional (either via a parameter or a different entry-point).
Reporter | ||
Comment 8•12 years ago
|
||
Great, thanks Mike.
Lets back out the change to use SkPath::contains() for now, since it's stopping us from enabling skia.
We should get a bug filed on the skia bug tracker for adding the new functionality.
Attachment #707999 -
Flags: review?(jmuizelaar)
Comment 9•12 years ago
|
||
Updated•12 years ago
|
Attachment #707999 -
Flags: review?(jmuizelaar) → review+
Reporter | ||
Comment 10•12 years ago
|
||
Comment 11•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
Comment 12•12 years ago
|
||
Let's leave this open for now so we can track a real fix. For now, only a temporary solution is in place.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Whiteboard: [leave open]
Comment 13•10 years ago
|
||
Doesn't seem like anybody is tracking anything here, so if you still care about a real fix open a new bug?
Status: REOPENED → RESOLVED
Closed: 12 years ago → 10 years ago
Resolution: --- → FIXED
Whiteboard: [leave open]
Updated•9 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•