The default bug view has changed. See this FAQ.

cloneNode doesn't copy style attribute correctly

RESOLVED FIXED in mozilla1.5alpha

Status

()

Core
CSS Parsing and Computation
P1
normal
RESOLVED FIXED
14 years ago
14 years ago

People

(Reporter: mikol, Assigned: dbaron)

Tracking

Trunk
mozilla1.5alpha
x86
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [patch])

Attachments

(6 attachments)

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4b) Gecko/20030609 Mozilla Firebird/0.6
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4b) Gecko/20030609 Mozilla Firebird/0.6

Here's the HTML code in question:

<td colspan="2" nowrap="1">
  <div>
    <span style="font-weight:normal;float:right;">
      <span id="remDevLink"><a id="rem" href="">Remove...</a> | </span>
      <a id="mod" href="">Edit...</a>
    </span>
    <span id="dev">Floppy Drive</span>
  </div>
</td>

The float and font-weight style in td.div.span is not honored.

Reproducible: Always

Steps to Reproduce:
I don't have a small test case, but it happens every time for the page you'll
find in the attached screenshots.


Expected Results:  
See the expected results (Mozilla 1.3.1) screenshot.
(Reporter)

Comment 1

14 years ago
Created attachment 125269 [details]
Expected Layout (Mozilla 1.3.1)
(Reporter)

Comment 2

14 years ago
Created attachment 125271 [details]
Actual Layout (Gecko/20030609 Mozilla Firebird/0.6)
So... how do I load this page the screenshots are of?  Would it be possible to
save it and attach it to this bug?
(Reporter)

Comment 4

14 years ago
I'm afraid not. The problem being that the page is constructed from a template
using the DOM to clone sections of interest. I did load the template in
Gecko/20030609 Mozilla Firebird/0.6 by itself. The float and font-weight
specifications are honored in the template, but (obviously) not after the parts
have been replicated in the DOM. Might be a DOM problem. I will try to create a
self-contained example to demonstrate the problem.
(Reporter)

Comment 5

14 years ago
Created attachment 125316 [details]
Test Case
(Reporter)

Comment 6

14 years ago
The problem in question can be seen by clicking "Demonstrate Problem" on the
index.html page contained in the Test Case attachement.
(Assignee)

Comment 7

14 years ago
Created attachment 125326 [details]
simplified testcase
(Assignee)

Comment 8

14 years ago
This is a regression from my bug 125246 landing.
Assignee: float → dbaron
Status: UNCONFIRMED → NEW
Component: Layout: Floats → Style System
Ever confirmed: true
Summary: Specified float and font-weight are not honored in spans → cloneNode doesn't copy style attribute correctly
(Assignee)

Comment 9

14 years ago
Created attachment 125329 [details] [diff] [review]
patch

This fixes it.	The copying of mStyleBits is the fix.  The other three changes
are two potential UMR/crash fixes and a warning fix that I'd already attached
to another bug.
(Assignee)

Updated

14 years ago
Attachment #125329 - Flags: superreview?(bz-bugspam)
Attachment #125329 - Flags: review?(bz-bugspam)
(Assignee)

Updated

14 years ago
Status: NEW → ASSIGNED
Priority: -- → P1
Whiteboard: [patch]
Target Milestone: --- → mozilla1.5alpha
(Assignee)

Comment 10

14 years ago
Created attachment 125330 [details]
more thorough testcase
Comment on attachment 125329 [details] [diff] [review]
patch

r+sr=me.  mikol@vmware.com, thanks for the bug report and the testcase!
Attachment #125329 - Flags: superreview?(bz-bugspam)
Attachment #125329 - Flags: superreview+
Attachment #125329 - Flags: review?(bz-bugspam)
Attachment #125329 - Flags: review+
(Reporter)

Comment 12

14 years ago
bz-bugspam@mit.edu, not a problem. Thanks for the quick response.
(Assignee)

Comment 13

14 years ago
Fix checked in to trunk, 2003-06-10 15:08 -0700.
Status: ASSIGNED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED
(Assignee)

Updated

14 years ago
Blocks: 208868
(Assignee)

Updated

14 years ago
Blocks: 208892
You need to log in before you can comment on or make changes to this bug.