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

VERIFIED FIXED in M12

Status

()

Core
Layout
P3
normal
VERIFIED FIXED
19 years ago
10 years ago

People

(Reporter: dbaron, Assigned: kinmoz)

Tracking

Trunk
x86
Windows 95
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

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

Attachments

(1 attachment)

(Reporter)

Description

19 years ago
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.

Updated

19 years ago
Status: NEW → ASSIGNED

Comment 1

19 years ago
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.

Updated

19 years ago
Assignee: kipp → michaelp
Status: ASSIGNED → NEW

Comment 2

19 years ago
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.

Updated

19 years ago
Assignee: michaelp → kipp

Comment 3

19 years ago
back to your end of the court...

Comment 4

19 years ago
*** Bug 1546 has been marked as a duplicate of this bug. ***

Updated

19 years ago
Status: NEW → ASSIGNED

Comment 5

19 years ago
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?

Comment 6

19 years ago
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.

Updated

19 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 19 years ago
Resolution: --- → FIXED

Comment 7

19 years ago
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

Updated

19 years ago
Status: RESOLVED → REOPENED

Comment 8

19 years ago
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.
(Reporter)

Updated

19 years ago
Resolution: FIXED → ---
(Reporter)

Comment 9

19 years ago
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...

Comment 10

19 years ago
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.
(Reporter)

Comment 11

19 years ago
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.

Comment 12

19 years ago
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.
(Reporter)

Updated

19 years ago
Summary: Clicking on link causes reflow over floats → event handling on right-floating images causes links not to work
(Reporter)

Comment 13

19 years ago
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.
(Reporter)

Comment 14

19 years ago
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.
(Reporter)

Comment 15

19 years ago
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.
(Reporter)

Comment 16

19 years ago
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.

Updated

19 years ago
Status: REOPENED → ASSIGNED
(Reporter)

Comment 17

19 years ago
See my comments in bug 2010 regarding the layout.  Fixing that in a good way
might fix this problem.
(Reporter)

Comment 18

19 years ago
Sorry, 2007, not 2010. (1910 is also related)

Comment 19

19 years ago
Setting all current Open Critical and Major to M3
(Reporter)

Comment 20

19 years ago
This seems related to 1277.

Comment 21

19 years ago
per leger, assigning QA contacts to all open bugs without QA contacts according
to list at http://bugzilla.mozilla.org/describecomponents.cgi?product=Browser

Updated

19 years ago
Status: ASSIGNED → NEW
Target Milestone: M3 → M5

Updated

19 years ago
Status: NEW → RESOLVED
Last Resolved: 19 years ago19 years ago
Resolution: --- → FIXED

Updated

18 years ago
QA Contact: 4144 → 4110
(Reporter)

Updated

18 years ago
Status: RESOLVED → REOPENED
(Reporter)

Updated

18 years ago
Resolution: FIXED → ---
(Reporter)

Comment 22

18 years ago
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.

Updated

18 years ago
Status: REOPENED → ASSIGNED

Updated

18 years ago
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

Updated

18 years ago
Summary: {inc} event handling on right-floating images causes links not to work → event handling on right-floating images causes links not to work

Comment 23

18 years ago
David says that nows its a stacking-of-floats issues (probably yet-another
margin/flaoter interaction)
Severity: minor → normal
Priority: P4 → P3
(Reporter)

Comment 24

18 years ago
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.
(Reporter)

Comment 25

18 years ago
You've now fixed the drawing order but not the event-handling order.
(Reporter)

Updated

18 years ago
The event handling issue is covered by bug 5693. Should this be marked a dup?

Updated

18 years ago
Target Milestone: M17 → M12

Updated

18 years ago
Summary: event handling on right-floating images causes links not to work → [dogfood] event handling on right-floating images causes links not to work

Comment 27

18 years ago
Testing the waters with a dogfood marker...

Comment 28

18 years ago
Created attachment 2345 [details]
a simple test case showing the bug

Updated

18 years ago
Whiteboard: [PDT-]

Comment 29

18 years ago
Not for dogfood...marking [PDT-].  Unless his is common for everyday work.
(Reporter)

Comment 30

18 years ago
It's not incredibly common, but I imagine I could find it on some major sites if
I looked around a bit.

Updated

18 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 19 years ago18 years ago
Resolution: --- → FIXED

Comment 31

18 years ago
Fixed. See the updated GetFrameForPoint method in nsContainerFrame for some
commentary that hopefully explains the fix...
(Assignee)

Updated

18 years ago
Status: RESOLVED → REOPENED
(Assignee)

Updated

18 years ago
Resolution: FIXED → ---
(Assignee)

Comment 32

18 years ago
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.
(Assignee)

Comment 33

18 years ago
Clearing fixed resolution.
(Assignee)

Updated

18 years ago
Assignee: kipp → kin
Status: REOPENED → NEW
(Assignee)

Updated

18 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 34

18 years ago
Accepting bug.

Updated

18 years ago
Whiteboard: [PDT-] → [M12 STAY][PDT-]

Updated

18 years ago
QA Contact: chrisd → petersen

Updated

18 years ago
Whiteboard: [M12 STAY][PDT-] → [PDT-][M12 STAY]
(Assignee)

Updated

18 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago18 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
(Assignee)

Comment 35

18 years ago
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

Updated

18 years ago
Status: RESOLVED → VERIFIED

Comment 36

18 years ago
With the Dec 01 build, I'm not seeing the problem described. Marking as verified
fixed.
This bug may have regressed. See bug 21678.

Comment 38

18 years ago
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.