Closed Bug 595652 Opened 14 years ago Closed 14 years ago

fix hit testing for border-radius

Categories

(Core :: Layout, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla2.0b7
Tracking Status
blocking2.0 --- betaN+

People

(Reporter: dbaron, Assigned: dbaron)

References

(Depends on 1 open bug)

Details

(Keywords: css3)

Attachments

(5 files, 1 obsolete file)

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+
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
Attached 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+
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Priority: -- → P3
Resolution: --- → FIXED
Whiteboard: [waiting to land until after 4.0b7 freeze]
Target Milestone: --- → mozilla2.0b8
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.

Attachment

General

Created:
Updated:
Size: