Closed
Bug 102860
Opened 24 years ago
Closed 24 years ago
insertBefore inserts after
Categories
(Core :: Layout, defect, P4)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla0.9.9
People
(Reporter: vva, Assigned: waterson)
Details
Attachments
(6 files)
Nodes inserted w. the insertBefore() -method are mostly appended and placed
inconsistently. Applies to mozillas up to the current milestone. See attached
source and compare w. Internet Explorer 5.5+.
Comment 2•24 years ago
|
||
I don't see the problem, please attach a simplified testcase and explain what
the difference is between how Mozilla and IE 5.5+ handle it.
Ok, sorry. That's a simplified testcase from something rather more complex I've
been doing w. IE.
From the interface point of view:
When you click on "section" in the "Insert [ section ]" -link, a new section
should be created just above and a new "Insert [ section ]" -link above that so
sections always have one "Insert" -link between them. The sections are numbered
for illustation putposes. The section w. the next number should appear above
the "Insert [ section ]" -link you click. Looks like below as it pushes the
others down, but it is above.
The problem on my 0.9.4 and before that on 0.9.3 is that while IE does just
that, mozilla appends the section to the end (or right next to another one near
the end) and the "Insert" -link in different places depending a bit on which
one I click.
I'll upload a gif (clipboard.gif) to illustate what approximately (can't really
figure out which is which after a while) the same sequence of clicks produces
on the two browsers...
If this is due to abug in my code, I apologise for the bother. I've tried this
with cloning HTML-nodes before I went to creating DOM-nodes. Trying to move the
sections up and down is even more of a mess...
Comment 5•24 years ago
|
||
The problem here seems to be that Mozilla is not accurately displaying the
content model. Forcing a refresh of the display (setting .style.display to
'none' then back to 'block') causes it to be correctly drawn.
I've seen this in some of my own work before; I'll try to hack up a simple
testcase that reproduces the bug.
Confirming on win2K build 2001100203.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 6•24 years ago
|
||
Comment 7•24 years ago
|
||
The problem lies in the "position: relative", as far as I can tell. Attaching a
testcase that's much simpler. (commenting out the position = "relative" part in
the original testcase makes it work, by the way).
Seeing this on current linux trunk. Is this layout, perhaps?
OS: Windows 2000 → All
Hardware: PC → All
Comment 8•24 years ago
|
||
Comment 9•24 years ago
|
||
Over to layout per Jason's comments.
Assignee: jst → attinasi
Component: DOM Core → Layout
QA Contact: stummala → petersen
Comment 10•24 years ago
|
||
Nice call on the position:relative, Boris. Nice testcase too. Attaching
another one that shows that this problem is not dependent on the elements being
created from script.
Comment 11•24 years ago
|
||
Comment 12•24 years ago
|
||
The content model is correct, but we are not adding the frames correctly
(checked in Viewer). Assigning to Waterson since he is far more adept in the
FrameConstructor than I am (and less swamped too).
Assignee: attinasi → waterson
| Assignee | ||
Updated•24 years ago
|
Status: NEW → ASSIGNED
Priority: -- → P4
Target Milestone: --- → mozilla0.9.6
| Assignee | ||
Updated•24 years ago
|
Target Milestone: mozilla0.9.6 → mozilla0.9.7
| Assignee | ||
Updated•24 years ago
|
Target Milestone: mozilla0.9.7 → mozilla0.9.8
| Assignee | ||
Updated•24 years ago
|
Target Milestone: mozilla0.9.8 → mozilla0.9.9
| Assignee | ||
Comment 13•24 years ago
|
||
This bug was in the code that looked around for prev-in-flow and next-in-flow:
a relatively positioned frame _doesn't_ have a placeholder frame (since it
impacts the normal flow).
Comment 14•24 years ago
|
||
Since placeholder frames are created for both IsAbsolutelyPositioned() and
IsFixePositioned(), is it necessarty to test both too in your changes?
| Assignee | ||
Comment 15•24 years ago
|
||
nsStyleDisplay::IsAbsolutelyPositioned actually checks for either absolute of
fixed positioning. :-/
<http://lxr.mozilla.org/mozilla/source/content/shared/public/nsStyleStruct.h#788>
Comment on attachment 66536 [details] [diff] [review]
fix
r=dbaron
Attachment #66536 -
Flags: review+
Comment 17•24 years ago
|
||
sr=hyatt
| Assignee | ||
Comment 18•24 years ago
|
||
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•