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.
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.
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.
back to your end of the court...
*** Bug 1546 has been marked as a duplicate of this bug. ***
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.
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
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.
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.
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.
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
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.
David says that nows its a stacking-of-floats issues (probably yet-another margin/flaoter interaction)
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?
Testing the waters with a dogfood marker...
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.
Fixed. See the updated GetFrameForPoint method in nsContainerFrame for some commentary that hopefully explains the fix...
Reopening this bug and reassigning it to email@example.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.
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. firstname.lastname@example.org
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