Closed Bug 1413 Opened 26 years ago Closed 25 years ago

[EVENTTARG] [DOGFOOD] event handling on right-floating images causes links not to work

Categories

(Core :: Layout, defect, P3)

x86
Windows 95
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: dbaron, Assigned: kinmoz)

References

()

Details

(Whiteboard: [PDT-][M12 STAY])

Attachments

(1 file)

Clicking on a link in one of the non-floating parts of this document causes the text to reflow over top of some of the nearby floating elements, and moves the link so that it has not been clicked (and one has to find it in the mess). This is when I have the environment variable NG_REQUEST_VER=5.0 . Also, (I think I reported this before, but I can't find it), none of the links in the floating sections actually work. The cursor doesn't change and clicking doesn't do anything.
Status: NEW → ASSIGNED
so I've checked in fixes so that (a) the links work in the floating sections and (b) if you float an image and it's in an <A...> tag that the cursor will change properly. It's still a mystery as to why the page changes shape when a link is clicked and it's also a mystery as to why the link isn't loading.
Assignee: kipp → michaelp
Status: ASSIGNED → NEW
I figured out what is causing this weirdness. Basically, when we click on a link we start a new document load. Sometime in there we reflow the document *without the scrollbar*. The result is that the document shifts slightly, and depending on the layout (dbaron's page is hosed for other reasons) you get strange results. I'm reassigning to michaelp to own this one and request that he own the issue (even if troy ends up doing all the work :-) michael: please reassign to me after the link clicking issue is done because there are still some serious layout problems on this page.
Assignee: michaelp → kipp
back to your end of the court...
*** Bug 1546 has been marked as a duplicate of this bug. ***
Status: NEW → ASSIGNED
After furthur investigations, I've determined that it is an incremental reflow bug caused by the event state manager triggering content-changed reflows for the frames contained by the A tag that was clicked on. The reflow is correct: in order to reapply style in this situation and switch to the "active" state we need to do this; however, we need more data to get the reflow right. peter/tom: how do we express this properly for notification purposes so that the layout code knows what to do? Should we just funnel this into the style-changed system somehow?
Yes, we should and the code that's in there now is incorrect. I'd been meaning to change all that but hadn't gotten around to it. I didn't realize it was causing a problem as is. It also isn't working at the moment so I'm going to clip it for now.
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
I'm going to close this bug since I already have a bug for the non-active link issue. For the moment I've #ifdef'd the offending code since it wasn't working anyway. For anyone interested the non-active link bug number is 577
Status: RESOLVED → REOPENED
I wanted the bug left open after the event issue was resolved so I'm re-opening it - the page has other layout issues on it, not just the event issue.
Resolution: FIXED → ---
The floated images that are links still aren't treated as links... I thought I heard a comment that that was fixed, but I guess not...
Okay, there are two problems which cause the image links not to work. One, I messed up one of the coordinate transforms in the frame hierarchy. This is fixed. Two, the P's overlap the floating images and are currently stealing the events. This isn't yet fixed.
There is now a band at the top of each of the two floats where the links work. That is, the links work for the upper 2/3 of the first and second images, since the second through fourth images are in the same float.
Yes, that's the same behavior I'm seeing. When running a debug build you can turn on Debug | Visual Debugging and see exactly where the paragraph overlaps the floats and steals the events.
Summary: Clicking on link causes reflow over floats → event handling on right-floating images causes links not to work
I think the area where the clicking is working is in the margin between the paragraphs. It's not working where the float has the parapgraph underneath it. I'm changing this bug title from "Clicking on link causes reflow over floats" to "event handling on right-floating images causes links not to work", since the original bug title was fixed. I may try and make a test case to see if this specific to being an image, floating right, or both.
I made testcases showing this bug at: http://www.fas.harvard.edu/~dbaron/tests/nglayout/floatevent.html http://www.fas.harvard.edu/~dbaron/tests/nglayout/floatevent2.html The second of those is the better one (it is simplified), while the first one was my scratchwork to figure out under what conditions it occurred. The problem is that there are 2 DIV's, and the inner one is floating. The reason I do that is to control the vertical alignment (otherwise the images *should* be higher.) If I take out the outer DIV then the event handling works. It has nothing to do with left or right or with images or text.
BTW, I just figured out that for most of the other "serious layout problems" on this page, NGLayout is correct. (Although you could argue that the spec is wrong...) There are only two problems other than the events 1) an error in the vertical alignment of the floating DIV and 2) the headers that aren't floating causing a stripe to their left. The list margins and bullet issues are my mistakes. The bullets show up in the correct places and there should be no left margins on the non-floating list items. I don't see any way to handle this that would not introduce serious spec compliance issues in other places.
All issues in this page other than the event issue (the subject of this bug) and the problems with the lists that are my fault are covered in the following bugs: 1060, 1277, 1583. If you don't want to find a workaround for the list problems (and I think you should not bother), then this bug should be closed, with kipp's approval, once the event issue is finished.
Status: REOPENED → ASSIGNED
See my comments in bug 2010 regarding the layout. Fixing that in a good way might fix this problem.
Sorry, 2007, not 2010. (1910 is also related)
Setting all current Open Critical and Major to M3
This seems related to 1277.
per leger, assigning QA contacts to all open bugs without QA contacts according to list at http://bugzilla.mozilla.org/describecomponents.cgi?product=Browser
Status: ASSIGNED → NEW
Target Milestone: M3 → M5
Status: NEW → RESOLVED
Closed: 26 years ago26 years ago
Resolution: --- → FIXED
QA Contact: 4144 → 4110
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Kipp - I find no sign that this is fixed (99-03-23 build). However, it may be related to the stacking issues in bug 1277 and 1910 and 2007. Reopening bug.
Status: REOPENED → ASSIGNED
Severity: major → minor
Priority: P2 → P4
Summary: event handling on right-floating images causes links not to work → {inc} event handling on right-floating images causes links not to work
Target Milestone: M5 → M6
Summary: {inc} event handling on right-floating images causes links not to work → event handling on right-floating images causes links not to work
David says that nows its a stacking-of-floats issues (probably yet-another margin/flaoter interaction)
Severity: minor → normal
Priority: P4 → P3
If you put STYLE="background-color: black" on the P element after the three images, you see what's going on. The drawing/stacking/event order is (as sec5525c(?) shows), float background, parent background, float inline content, parent inline content (the last 2 might be switched). The order should be parent background/border, float (background/border, then inline content), then parent inline content. I describe that in more detail (citing the spec) in one of the other 5 or so bugs on this - I could dig up numbers if you want.
You've now fixed the drawing order but not the event-handling order.
The event handling issue is covered by bug 5693. Should this be marked a dup?
Target Milestone: M17 → M12
Summary: event handling on right-floating images causes links not to work → [dogfood] event handling on right-floating images causes links not to work
Testing the waters with a dogfood marker...
Attached file a simple test case showing the bug (deleted) —
Whiteboard: [PDT-]
Not for dogfood...marking [PDT-]. Unless his is common for everyday work.
It's not incredibly common, but I imagine I could find it on some major sites if I looked around a bit.
Status: ASSIGNED → RESOLVED
Closed: 26 years ago25 years ago
Resolution: --- → FIXED
Fixed. See the updated GetFrameForPoint method in nsContainerFrame for some commentary that hopefully explains the fix...
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Reopening this bug and reassigning it to kin@netscape.com. With kipp and chofmann's approval, I checked in a change to mozilla/layout/html/base/src/nsContainerFrame.cpp revision 1.69 that backs out Kipp's fix for bug #1413 temporarily. This allows us to get around 2 dogfood blocker bugs (#18002 and #18006) so that we can get M11 out the door. I will reenable his fix after M11 branches, and then get joki or hyatt to help fix 18002 and 18006 properly.
Clearing fixed resolution.
Assignee: kipp → kin
Status: REOPENED → NEW
Status: NEW → ASSIGNED
Accepting bug.
Whiteboard: [PDT-] → [M12 STAY][PDT-]
QA Contact: chrisd → petersen
Whiteboard: [M12 STAY][PDT-] → [PDT-][M12 STAY]
Status: ASSIGNED → RESOLVED
Closed: 25 years ago25 years ago
Resolution: --- → FIXED
Summary: [dogfood] event handling on right-floating images causes links not to work → [DOGFOOD] event handling on right-floating images causes links not to work
Fix checked into tip: mozilla/layout/html/base/src/nsContainerFrame.cpp revision: 1.73 Modified Kipp's original fix so that nsContainerFrame::GetFrameForPointUsing() looks through any outside children even if it finds a normal child containing aPoint. r=joki@netscape.com
Status: RESOLVED → VERIFIED
With the Dec 01 build, I'm not seeing the problem described. Marking as verified fixed.
This bug may have regressed. See bug 21678.
Adding EVENTTARG to summary so it'll show up for event regression testing
Summary: [DOGFOOD] event handling on right-floating images causes links not to work → [EVENTTARG] [DOGFOOD] event handling on right-floating images causes links not to work
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: