Closed
Bug 342145
Opened 20 years ago
Closed 17 years ago
"ASSERTION: Previous Sibling is the Container's frame" involving image map
Categories
(Core :: Layout, defect, P4)
Core
Layout
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: jruderman, Assigned: MatsPalmgren_bugz)
References
Details
(Keywords: assertion, testcase, Whiteboard: [dbaron-1.9:Rs])
Attachments
(3 files, 1 obsolete file)
###!!! ASSERTION: Previous Sibling is the Container's frame: 'prevSibling != containerFrame', file /Users/admin/trunk/mozilla/layout/base/nsCSSFrameConstructor.cpp, line 8651
| Reporter | ||
Comment 1•20 years ago
|
||
| Assignee | ||
Updated•20 years ago
|
Assignee: nobody → mats.palmgren
OS: Mac OS X 10.4 → All
Hardware: Macintosh → All
| Assignee | ||
Comment 2•20 years ago
|
||
The problem is that the <area> has the ImageFrame as its primary frame,
which is also the primary frame for the <img> which is its content parent.
| Assignee | ||
Comment 3•20 years ago
|
||
An alternative would be verify that "prevSibling->GetContent()"
is actually the content we are looking at (*iter), here:
http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/layout/base/nsCSSFrameConstructor.cpp&rev=1.1237&root=/cvsroot&mark=8619#8601
But I think I prefer the attached patch... Boris?
Comment 4•20 years ago
|
||
Hmm... This patch seems to make sense, but I'd want David to give it a look too...
| Assignee | ||
Comment 5•20 years ago
|
||
Comment on attachment 226438 [details] [diff] [review]
Patch rev. 1
See comment 2 - 4, what do you think?
Attachment #226438 -
Flags: review?(dbaron)
| Reporter | ||
Comment 6•19 years ago
|
||
dbaron, ping?
So I've forgotten why we set primary frame for areas -- but whatever it is, it's broken, because multiple images can refer to the same image map. How hard is that to fix? I've forgotten.
(That's also the sole reason why we bloat the primary frame map entries by a word, unless somebody's fixed that...)
Comment 8•19 years ago
|
||
> So I've forgotten why we set primary frame for areas
I thought it had to do with tabbing.... we want to be able to tab between the <area>s within an image, and I thought the ESM needed a frame for that. Mats or Aaron might know?
Comment 9•19 years ago
|
||
Boris, the code and comments seem to disagree, and it's been a while since I've looked at that closely. But, look at this:
http://lxr.mozilla.org/seamonkey/source/content/events/src/nsEventStateManager.cpp#3587
3585 if (currentContent->Tag() == nsGkAtoms::img &&
3586 currentContent->HasAttr(kNameSpaceID_None, nsGkAtoms::usemap)) {
3587 // Must be an image w/ a map -- it's tabbable but no tabindex is specified
3588 // Special case for image maps: they don't get walked by nsIFrameTraversal
3589 nsIContent *areaContent = GetNextTabbableMapArea(forward, currentContent);
3590 if (areaContent) {
3591 NS_ADDREF(*aResultNode = areaContent);
3592 return NS_OK;
3593 }
3594 }
Comment 10•19 years ago
|
||
Ah, cool. If it just works on content, maybe we don't need this anymore...
So that means we can fix this by undoing http://bonsai.mozilla.org/cvslog.cgi?file=/mozilla/layout/base/nsFrameManager.cpp&rev=HEAD&mark=1.100#1.100 and not making the area's primary frame the frame for the first image to use that area?
Depends on: 135040
Comment on attachment 226438 [details] [diff] [review]
Patch rev. 1
In any case, this patch doesn't seem right. If we want a quick fix here, I think it would be to explicitly exclude imagemap areas (which are sometimes A elements!).
But I suspect there are bigger problems caused by what we're doing here (e.g., what happens if the area is an A element that's also displayed elsewhere, or when multiple images use the same areas). So I think the real solution is to stop setting the primary frame for imagemap areas and fix the tabbing code to deal.
Attachment #226438 -
Flags: review?(dbaron) → review-
Comment 13•19 years ago
|
||
> So that means we can fix this by undoing ...
Possibly, yes. Someone needs to check that tabbing through multiple images that use the same imagemap (e.g. on slashdot) works after that.
Flags: blocking1.9?
Comment 14•19 years ago
|
||
Er, doesn't look like slashdot does that anymore. So we'd need a testcase too.
Keywords: qawanted
I tried the testcase in the original bug about the problem, bug 115481, and it doesn't work. But I think we need to make it work.
Flags: blocking1.9? → blocking1.9+
Whiteboard: [dbaron-1.9:Rs]
| Reporter | ||
Comment 16•19 years ago
|
||
Mats, are you going to be able to fix this for Gecko 1.9? If not, please reassign to nobody so we know this bug needs a new owner. (It's blocking1.9+.)
Comment 17•19 years ago
|
||
Priority: -- → P3
Priority: P3 → P4
Flags: wanted-next+
Flags: blocking1.9-
Updated•18 years ago
|
Flags: tracking1.9+
| Reporter | ||
Comment 18•18 years ago
|
||
Moved the image into the testcase file, reduced the timeout.
I can still reproduce the bug on trunk.
Attachment #226320 -
Attachment is obsolete: true
| Reporter | ||
Comment 19•17 years ago
|
||
WFM on trunk.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → WORKSFORME
| Reporter | ||
Comment 20•17 years ago
|
||
Flags: in-testsuite+
You need to log in
before you can comment on or make changes to this bug.
Description
•