Closed Bug 188525 Opened 23 years ago Closed 23 years ago

links in W3C CSS3 specs don't work

Categories

(Core :: CSS Parsing and Computation, defect, P1)

x86
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla1.3final

People

(Reporter: dbaron, Assigned: dbaron)

References

()

Details

(Whiteboard: [patch] fixed1.3)

Attachments

(3 files, 2 obsolete files)

Clicking on links in W3C specs doesn't work anymore. Steps to reproduce: 1. load http://www.w3.org/TR/css3-box/ 2. click on any of the links Actual results: Nothing Expected results: Link followed, whether anchor, separate page, or mailto. This broke between builds 2003-01-04-21-trunk and 2003-01-05-05-trunk, which gives a range of checkins: http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2003-01-04+21%3A00&maxdate=2003-01-05+05%3A30&cvsroot=%2Fcvsroot so I'm giving the bug to bzbarsky (bug 126072). I suspect the stylesheet is doing something interesting.
Summary: links in W3C specs don't work → links in W3C CSS3 specs don't work
WFM with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3b) Gecko/20030110 on WinXP. And I read this spec every day -- newer see any trouble. Strange.
WFM, win98, 2003010808 probably linux specific?
WFM Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.3b) Gecko/20030110
WFM with a gcc3.2.1 cvs build from this morning. There are a lot of warnings though.
Sorry about the spam but I forgot to say it's a Linux build.
David, I can't reproduce this with either the 2003-01-06-05 or 2003-01-10-08 linux nightly.... both the CSS3 spec and the testcase work for me....
Maybe it's the :hover rule in my user stylesheet. I'll attach a testcase that contains my user stylesheet as well.
Attached file simplified testcase (obsolete) —
This also shows the problem on a clean profile (which my previous one didn't).
Attachment #111190 - Attachment is obsolete: true
In the latest attachment, clicking on the link indeed fails but clicking a second time succeeds. Odd.
Hmmm, I still can't reproduce, even with the new attachment.. (though I can imagine that a reframe there may confuse the ESM and not deliver the event properly?)
David, are you still seeing this? I've never managed to reproduce it...
I saw it yesterday, trying to use the css3-selectors spec.
(And yes, I still see the problem with the testcase.)
OK. I'll try to figure out how to reproduce it... (the testcase and spec both work with a nightly build from mozilla.org for me....)
*** Bug 193006 has been marked as a duplicate of this bug. ***
*** Bug 193034 has been marked as a duplicate of this bug. ***
This appears in 1.3b as well. There is a slightly simplified testcase in Bug 193034.
Yeah, I can tell that people are seeing it... I _still_ can't reproduce this with current builds or 1.3b, neither my own builds nor those from mozilla.org, with testcases from this bug, bug 193034 or bug 193006. So... time to start looking for far-fetched theories.... What focus setup are people using with their windowmanagers? Mine's sloppy-focus (focus on mouse-enter, don't blur on mouse-exit). What's yours David, Doug, Edwin?
I'm using Sawfish window manager version 1.2-4 from the Debian unstable distribution. I have it on the equivalent of strict-focus, that is I have to click before it works. What are you using, Boris?
Like I said, "sloppy-focus" (with AfterStep). I also just tried both that and click-to-focus with fvwm2 and still can't get the bug to happen. :( Does changing your focus model to focus-follows-mouse affect this bug at all? If not, then I'll keep looking for other possible differences...
No, the bug still persists with sloppy focus for me.
I stepped through this in the debugger and found that things stop following the expected codepath in nsEventStateManager::CheckForAndDispatchClick, where |aEvent->clickCount| is 0, so no click event is fired.
And that's because in nsEventStateManager::SetClickCount, mLastLeftMouseDownContent is a paragraph instead: (gdb) x/wa *(void**)mLastLeftMouseDownContent 0x41b2b708 <_ZTV22nsHTMLParagraphElement+8>: 0x416de524 <_ZN22nsHTMLParagraphElement14QueryInterfaceERK4nsIDPPv> (gdb) x/wa *(void**)mouseContent 0x41b40aa8 <_ZTV10nsTextNode+8>: 0x4199b500 <_ZN10nsTextNode14QueryInterfaceERK4nsIDPPv>
jkeiser, any idea what's up?
The reason GetFrameForPoint seems to be returning the paragraph is that the first child of the paragraph is an inline whose mContent is an nsHTMLAnchorElement (as it should be), mPseudoTag is null (indicating no :before content), mNextSibling is null (consistent with there being no :before content), and has an mRect of {0,0,0,0} with the NS_FRAME_FIRST_REFLOW bit still set.
(And, FWIW, the first of the duplicates may not really be a duplicate, although I suspect it is.)
Attached file simpler testcase
The counter content can be replaced by having no 'content' declaration at all.
Attachment #111203 - Attachment is obsolete: true
I suspect that checking in the latter part of the nsFrameManager.cpp changes that |display->mDisplay != NS_STYLE_DISPLAY_NONE && content->ContentCount() > 0| (the same checks nsCSSFrameConstructor::CreateGeneratedContentFrame makes) would fix this bug by avoiding constant reframing for every style change. Perhaps we make a function for that check (or maybe even do it in ProbePseudoStyleContext). Thoughts?
Attachment #115144 - Flags: superreview?(bzbarsky)
Attachment #115144 - Flags: review?(bzbarsky)
Attachment #115144 - Flags: approval1.3?
Taking.
Assignee: bzbarsky → dbaron
Priority: -- → P1
Whiteboard: [patch]
Target Milestone: --- → mozilla1.3final
Comment on attachment 115144 [details] [diff] [review] patch (diff -uw) >+ // XXXldb What is contentCount for |content: ""|? "1" as far as I can tell by reading the code (I could check for sure with printf, if you want). So this fixes the testcases in this bug by preventing a reframe when going from no before style to a:before { } Don't things still break if we go from no before style to a:before { content: "" } or something like that? Or are things ok then because we have an actual content object hanging around there?
Comment on attachment 115144 [details] [diff] [review] patch (diff -uw) I guess my real question is, "what was broken, and why does this patch fix it?" ;) I can try to figure this on my own, but I won't have much free time in the next week or two. :(
What was broken is that there were cases where ProbePseudoStyleContext returned a style context but we didn't generate a pseudo-element frame. This meant we reframed for every style change.
Comment on attachment 115144 [details] [diff] [review] patch (diff -uw) Right, I got that part (and this patch is good for fixing that and should go in). What I'm not seeing is why this lead to clicks failing and why clicks won't similarly fail in cases when the reframe _is_ needed (eg an :active style that adds or removes generated content).
Attachment #115144 - Flags: superreview?(bzbarsky)
Attachment #115144 - Flags: superreview+
Attachment #115144 - Flags: review?(bzbarsky)
Attachment #115144 - Flags: review+
Comment on attachment 115144 [details] [diff] [review] patch (diff -uw) a=asa (on behalf of drivers) for checkin to 1.3
Attachment #115144 - Flags: approval1.3? → approval1.3+
Fix checked in to trunk, 2003-02-23 09:28 PST. Fix checked in to MOZILLA_1_3_BRANCH, 2003-02-24 13:15 PST.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Filed bug 194776 about the general problem of processing events between the reframe and the reflow.
Whiteboard: [patch] → [patch] fixed1.3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: