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)
Tracking
()
RESOLVED
FIXED
mozilla1.3final
People
(Reporter: dbaron, Assigned: dbaron)
References
()
Details
(Whiteboard: [patch] fixed1.3)
Attachments
(3 files, 2 obsolete files)
|
436 bytes,
text/html
|
Details | |
|
10.98 KB,
patch
|
Details | Diff | Splinter Review | |
|
7.73 KB,
patch
|
bzbarsky
:
review+
bzbarsky
:
superreview+
asa
:
approval1.3+
|
Details | Diff | Splinter Review |
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.
| Assignee | ||
Comment 1•23 years ago
|
||
| Assignee | ||
Updated•23 years ago
|
Summary: links in W3C specs don't work → links in W3C CSS3 specs don't work
Comment 2•23 years ago
|
||
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.
Comment 3•23 years ago
|
||
WFM, win98, 2003010808
probably linux specific?
Comment 4•23 years ago
|
||
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.
Comment 7•23 years ago
|
||
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....
| Assignee | ||
Comment 8•23 years ago
|
||
Maybe it's the :hover rule in my user stylesheet. I'll attach a testcase that
contains my user stylesheet as well.
| Assignee | ||
Comment 9•23 years ago
|
||
This also shows the problem on a clean profile (which my previous one didn't).
Attachment #111190 -
Attachment is obsolete: true
Comment 10•23 years ago
|
||
In the latest attachment, clicking on the link indeed fails but clicking a
second time succeeds. Odd.
Comment 11•23 years ago
|
||
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?)
Comment 12•23 years ago
|
||
David, are you still seeing this? I've never managed to reproduce it...
| Assignee | ||
Comment 13•23 years ago
|
||
I saw it yesterday, trying to use the css3-selectors spec.
| Assignee | ||
Comment 14•23 years ago
|
||
(And yes, I still see the problem with the testcase.)
Comment 15•23 years ago
|
||
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....)
| Assignee | ||
Comment 16•23 years ago
|
||
*** Bug 193006 has been marked as a duplicate of this bug. ***
| Assignee | ||
Comment 17•23 years ago
|
||
*** Bug 193034 has been marked as a duplicate of this bug. ***
Comment 18•23 years ago
|
||
This appears in 1.3b as well. There is a slightly simplified testcase in Bug
193034.
Comment 19•23 years ago
|
||
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?
Comment 20•23 years ago
|
||
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?
Comment 21•23 years ago
|
||
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...
Comment 22•23 years ago
|
||
No, the bug still persists with sloppy focus for me.
| Assignee | ||
Comment 23•23 years ago
|
||
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.
| Assignee | ||
Comment 24•23 years ago
|
||
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>
Comment 25•23 years ago
|
||
jkeiser, any idea what's up?
| Assignee | ||
Comment 26•23 years ago
|
||
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.
| Assignee | ||
Comment 27•23 years ago
|
||
(And, FWIW, the first of the duplicates may not really be a duplicate, although
I suspect it is.)
| Assignee | ||
Comment 28•23 years ago
|
||
The counter content can be replaced by having no 'content' declaration at all.
Attachment #111203 -
Attachment is obsolete: true
| Assignee | ||
Comment 29•23 years ago
|
||
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?
| Assignee | ||
Comment 30•23 years ago
|
||
| Assignee | ||
Comment 31•23 years ago
|
||
| Assignee | ||
Updated•23 years ago
|
Attachment #115144 -
Flags: superreview?(bzbarsky)
Attachment #115144 -
Flags: review?(bzbarsky)
Attachment #115144 -
Flags: approval1.3?
| Assignee | ||
Comment 32•23 years ago
|
||
Taking.
Assignee: bzbarsky → dbaron
Priority: -- → P1
Whiteboard: [patch]
Target Milestone: --- → mozilla1.3final
Comment 33•23 years ago
|
||
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 34•23 years ago
|
||
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. :(
| Assignee | ||
Comment 35•23 years ago
|
||
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 36•23 years ago
|
||
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 37•23 years ago
|
||
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+
| Assignee | ||
Comment 38•23 years ago
|
||
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
| Assignee | ||
Comment 39•23 years ago
|
||
Filed bug 194776 about the general problem of processing events between the
reframe and the reflow.
Updated•23 years ago
|
Whiteboard: [patch] → [patch] fixed1.3
You need to log in
before you can comment on or make changes to this bug.
Description
•