fix hit testing for border-radius

RESOLVED FIXED in mozilla2.0b7

Status

()

defect
P3
normal
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: dbaron, Assigned: dbaron)

Tracking

(Depends on 1 bug, {css3})

Trunk
mozilla2.0b7
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(blocking2.0 betaN+)

Details

Attachments

(5 attachments, 1 obsolete attachment)

We should fix hit testing so that clicking in the area clipped off by border-radius doesn't count as clicking on an element.  The places we need to fix are commented as FIXMEs in http://hg.mozilla.org/mozilla-central/rev/6e3abe4d1d2d
blocking2.0: --- → betaN+

Comment 1

9 years ago
additional tests include :hover triggering, and CSS cursor property rendering.  Once this is fixed, I'd like to specify this detail in CSS3-UI.

http://dev.w3.org/csswg/css3-ui/#cursor
Posted patch patch (obsolete) — Splinter Review
Attachment #478052 - Flags: review?(roc)
Whiteboard: [needs review]
Whiteboard: [needs review] → [waiting to land until after 4.0b7 freeze]
Actually, I hit one of my assertions.  This makes a tiny tweak to avoid it; it disables the checking in nsDisplayBackground when mIsThemed is true.  I think that is probably the right thing to do as well, since border-radius really doesn't have an effect on the curvature when mIsThemed is true.

(I hit the assertion because nsDisplayBackground overrides GetBounds for the mIsThemed case, so HitTest can be called for points outside the frame's rect.)
Attachment #478052 - Attachment is obsolete: true
Attachment #478131 - Flags: review?(roc)
Comment on attachment 478131 [details] [diff] [review]
patch
[Checked in: See comment 11]

+      // Note that we have to check !mIsThemed here to avoid triggering
+      // the assertion in RoundedBorderIntersectsRect, since when
+      // mIsThemed, our bounds can be different from the frame bounds.

Fix indent.

Shouldn't ComputeBorderRadii return zero radii for themed elements?
Attachment #478131 - Flags: review?(roc) → review+
Landed patch 1, but still working on test failures for patch 2 (a bunch more appeared on the Mac recently, probably due to theme changes):
http://hg.mozilla.org/mozilla-central/rev/e82310ad2cba
(I should probably have had "1" and "2" the other way around in the previous comment.)
Attachment #481689 - Flags: review?(dtownsend) → review+
Attachment #481690 - Flags: review?(dtownsend) → review+
Landed remaining patches (theme patch landed earlier; see comment 7):
http://hg.mozilla.org/mozilla-central/rev/8731e64120ab
http://hg.mozilla.org/mozilla-central/rev/12bbf60c4d97
http://hg.mozilla.org/mozilla-central/rev/5631c996d14d
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Priority: -- → P3
Resolution: --- → FIXED
Whiteboard: [waiting to land until after 4.0b7 freeze]
Target Milestone: --- → mozilla2.0b8

Updated

9 years ago
Depends on: 606914
Target Milestone: mozilla2.0b8 → mozilla2.0b7
Attachment #478558 - Attachment description: report zero border radius when themed → report zero border radius when themed [Checked in: Comment 7]
Attachment #481689 - Attachment description: test fixes, part 1 (add new method) → test fixes, part 1 (add new method) [Checked in: Comment 11]
Attachment #481690 - Attachment description: test fixes, part 2 (send clicks to middle) → test fixes, part 2 (send clicks to middle) [Checked in: Comment 11]
Attachment #478131 - Attachment description: patch → patch [Checked in: See comment 11]
You need to log in before you can comment on or make changes to this bug.