Closed Bug 234847 Opened 21 years ago Closed 21 years ago

"overflow:hidden" doesn't hide events

Categories

(Core :: Layout: Tables, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jlim, Assigned: bernd_mozilla)

References

Details

Attachments

(3 files, 1 obsolete file)

User-Agent: Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040113 Try the following. Click on the RHS of the text, you still get an alert. <table style="table-layout:fixed;width:50px"> <tr> <td style="overflow:hidden;white-space:nowrap" onclick="alert('hi')"> 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 </table> Reproducible: Always Steps to Reproduce: 1. Display the html shown above. 2. Click on the right side of the '0 1 2 ..' text. 3. Actual Results: An alert appears. Expected Results: No event should occur outside of the clipped area.
Attached file The testcase
Sounds like a GetFrameForPoint method somewhere is broken.... I wonder why... This doesn't happen with blocks.
Assignee: events → nobody
Component: DOM: Events → Layout: Tables
QA Contact: ian → core.layout.tables
=-= Topic for #developers was set by sipaq!~bugzilla@dsl-213-023-240-154.arcor-ip.net on Wed Feb 18 2004 23:58:25 GMT+0100 bernd bz: I just got bugspam about "overflow:hidden" doesn't hide events this because overflow:hidden is a blatant hack bz oh? bz how so? bz and why's it not for blocks? ;) bernd don't you remmeber my clash with david when he broke my hack bz doesn't..... -->| Jesse (~Jesse@entropy.ST.HMC.Edu) has joined #developers bernd bz: you did sr it :-) bernd http://bonsai.mozilla.org/cvsview2.cgi?diff_mode=context&whitespace_mode=show&file=nsTableCellFrame.cpp&branch=&root=/cvsroot&subdir=mozilla/layout/html/table/src&command=DIFF_FRAMESET&rev1=3.315&rev2=3.316 botbot SeaMonkey: 'Linux luna Depend' has changed state from Horked to Success. bernd http://bugzilla.mozilla.org/show_bug.cgi?id=221140 bernd to make the story short only row group frames encapsulate their children in a scrollable frame wehn overflow is specified bz bernd: ah, ok. And tables just clip the painting? bz bernd: or something? bz er, table cells bernd exactly bz note that we _could fix this in an evil way bz If overflow is hidden, unset the outside children flag before calling GetFrameForPoint bz then reset it if needed bz er, before calling GetFrameForPointUsing bernd bz: a hack for a hack sounds like a "good" plan to get a r- from david
Status: UNCONFIRMED → NEW
Ever confirmed: true
You could just check the overflow value in GetFrameForPoint and return if it's hidden and the point isn't in the rect.
Attached patch patch (obsolete) — Splinter Review
I can add the hack comment from http://lxr.mozilla.org/seamonkey/source/layout/html/table/src/nsTableCellFrame.cpp#471. The issue here is that cell/row/table frames should create a scrollframe if the overflow:hidden is specified. But they dont, so they will currently report a overflow area. I think the patch is correct as a scrollframe will not return overflow in this case.
Attachment #141791 - Flags: superreview?(dbaron)
Attachment #141791 - Flags: review?(dbaron)
Attachment #141791 - Attachment is obsolete: true
Attachment #141791 - Flags: superreview?(dbaron)
Attachment #141791 - Flags: review?(dbaron)
Attached patch patch rev2Splinter Review
*** Bug 237310 has been marked as a duplicate of this bug. ***
Bernd, is that patch set for review?
yeah I did not run the rtest so I forgot that thing, but now I did run them, and they remove the nonnecessary scrollbars in the overflow testcases like http://lxr.mozilla.org/seamonkey/source/layout/html/tests/table/marvin/table_overflow_hidden_table.html
Assignee: nobody → bernd_mozilla
Attachment #141796 - Flags: superreview?(dbaron)
Attachment #141796 - Flags: review?(dbaron)
Comment on attachment 141796 [details] [diff] [review] patch rev2 Please add a comment that the check for SCROLLBARS_NONE is needed only for table elements, which implement it differently, and r+sr=dbaron.
Attachment #141796 - Flags: superreview?(dbaron)
Attachment #141796 - Flags: superreview+
Attachment #141796 - Flags: review?(dbaron)
Attachment #141796 - Flags: review+
But please test that programmatic scrolling of 'overflow: hidden' elements still works correctly.
An example of what I mean in comment 12 is attachment 25609 [details]. And perhaps also try modifying that by (1) putting something with a view inside it and (2) by making the 'overflow: hidden' element 'position: absolute' as well. Also, please fix the indentation (indent an additional two spaces).
The testcase is really nifty, but ConsiderChildOverflow is used currently only by table table frames and the sibling in mind, the fieldset frame. ( http://lxr.mozilla.org/seamonkey/search?string=ConsiderChildOverflow ). So I guess I need first to modify either the testcase or the codebase to get this code tested in the way you proposed.
OK, then never mind the tests, but r+sr=dbaron with the other things addressed (comment, indentation).
I checked in the patch but referred to the wrong bug 233438
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: