Closed
Bug 256990
Opened 20 years ago
Closed 19 years ago
highlight breaks pages that style <span> elements
Categories
(Toolkit :: Find Toolbar, defect)
Toolkit
Find Toolbar
Tracking
()
VERIFIED
FIXED
mozilla1.8final
People
(Reporter: ian, Assigned: bugzilla)
References
()
Details
(Keywords: fixed1.8, testcase, Whiteboard: [has patch])
Attachments
(2 files)
553 bytes,
text/html
|
Details | |
1.47 KB,
patch
|
mconnor
:
review+
asa
:
approval1.8b4+
|
Details | Diff | Splinter Review |
STEPS TO REPRODUCE
1. Click the URL link above.
2. Press "/".
3. Press the space bar.
4. Press "highlight.
ACTUAL RESULTS
Suddenly page is full of red boxes.
EXPECTED RESULTS
A few yellow highlights for the spaces, and that's all.
Comment 1•20 years ago
|
||
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.2) Gecko/20040826
Firefox/0.9.1+
WFM
Comment 2•20 years ago
|
||
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040802
Firefox/0.9.1+
WFM also
Comment 3•20 years ago
|
||
Hixie: you've got the testcase URL from bug 256989 (breaking form fields) in
this one too: do you remember what you intended, to have it breaking pages with
styled <span>s?
Can reproduce with 0.10.1 e.g. on
http://www.mozilla.org/products/firefox/releases/0.10.html. Search for 'FA' and
press highlight.
Comment 5•20 years ago
|
||
*** Bug 270809 has been marked as a duplicate of this bug. ***
Comment 6•20 years ago
|
||
*** Bug 267676 has been marked as a duplicate of this bug. ***
Comment 7•20 years ago
|
||
Changing URL to something that breaks the right way: search/highlight "t" and
Projects in the nav menu becomes
Projec
t
s
then unhighlight and it remains as
Project
s
(which is probably a separate reflow bug).
Updated•20 years ago
|
OS: Windows 2000 → All
Whiteboard: see comment 7
Version: 1.0 Branch → Trunk
Assignee | ||
Comment 8•19 years ago
|
||
This is really two bugs:
1. If Firefox is adding <span> elements on the assumption
that they will be visible, it should explicity specify
this with style="display: inline;". There are other
desirable properties we can set too.
2. Firefox doesn't clean up after itself. I don't think
there are page reflow bugs here, it seems that the
<span> elements simply aren't removed after use. This
should probably be filed as a new bug.
This should be an easy fix.
Assignee | ||
Updated•19 years ago
|
Assignee: firefox → cusser.bugs
Status: NEW → ASSIGNED
Assignee | ||
Comment 9•19 years ago
|
||
This fixes the bug, but probably needs better testing than I've given it. I
found three problems with the existing code that caused things to break when
inserting the <span> elements:
1. FAYT doesn't specify "padding: 0", meaning that CSS padding for
span elements was respected.
2. FAYT doesn't specify "display: inline", meaning that "display: none"
for span elements was respected. This also had another side-effect
of respecting "display: block", leading to other aesthetically nasty
results.
3. When the span was removed, text nodes were not joined back togther.
I've fixed this by calling parent.normalize(), which is necessary
to remove a further display bug that I found.
Fixing this exposes another bug, which I'll file dependent on this one being
fixed.
Assignee | ||
Updated•19 years ago
|
Attachment #191202 -
Flags: review?(mconnor)
Assignee | ||
Comment 10•19 years ago
|
||
(In reply to comment #9)
> Fixing this exposes another bug, which I'll file dependent on this one being
> fixed.
The bug is reproducable without this fix, therefore is not dependent.
Assignee | ||
Comment 11•19 years ago
|
||
Sorry for bugspam, I filed Bug 302933 for a case where highlighting wasn't
removed as per comment 8 part 2. This doesn't appear to be the norm (in nearly
all cases, the span is removed correctly).
Until it stops messing with the DOM at all and starts using the selection code
it will always break some pages.
Assignee | ||
Comment 13•19 years ago
|
||
You're right, but this fix would work as a stopgap measure until then which
should deal with the more common problems that I can spot.
You should make sure there's a bug open on that before closing this one. (I
remember commenting on one, but I can't find it, so it may have been resolved
for some reason.)
Assignee | ||
Comment 15•19 years ago
|
||
David, you filed bug 256773 for that ;) This bug should probably depend on it,
since your suggestion is the true fix. Marking as such.
Looks like my bug 302933 is a dupe of bug 273304 (which I somehow missed when
searching). I'll go sort that out, too.
Depends on: 256773
Updated•19 years ago
|
Attachment #191202 -
Flags: review?(mconnor) → review+
Assignee | ||
Comment 16•19 years ago
|
||
Comment on attachment 191202 [details] [diff] [review]
Patch v0.1
Requestiong approval - this is low risk and fixes a handful of edge-cases where
the Findbar highlighter either fails to work or breaks the page.
Attachment #191202 -
Flags: approval1.8b4?
Updated•19 years ago
|
Flags: blocking1.8b4+
Updated•19 years ago
|
Attachment #191202 -
Flags: approval1.8b4? → approval1.8b4+
Comment 17•19 years ago
|
||
Trunk:
/cvsroot/mozilla/toolkit/components/typeaheadfind/content/findBar.js;
new revision: 1.22;
1.8 Branch:
/cvsroot/mozilla/toolkit/components/typeaheadfind/content/findBar.js;
new revision: 1.21.2.1;
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Keywords: fixed1.8
Hardware: PC → All
Resolution: --- → FIXED
Target Milestone: --- → Firefox1.5
Updated•16 years ago
|
Product: Firefox → Toolkit
You need to log in
before you can comment on or make changes to this bug.
Description
•