Beginning on October 25th, 2016, Persona will no longer be an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 208872 - cloneNode doesn't copy style attribute correctly
: cloneNode doesn't copy style attribute correctly
Product: Core
Classification: Components
Component: CSS Parsing and Computation (show other bugs)
: Trunk
: x86 Linux
: P1 normal (vote)
: mozilla1.5alpha
Assigned To: David Baron :dbaron: ⌚️UTC-7
: Hixie (not reading bugmail)
: Jet Villegas (:jet)
Depends on:
Blocks: 208868 208892
  Show dependency treegraph
Reported: 2003-06-09 19:02 PDT by mikol
Modified: 2003-06-10 16:34 PDT (History)
1 user (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Expected Layout (Mozilla 1.3.1) (31.21 KB, image/png)
2003-06-09 19:03 PDT, mikol
no flags Details
Actual Layout (Gecko/20030609 Mozilla Firebird/0.6) (31.98 KB, image/png)
2003-06-09 19:05 PDT, mikol
no flags Details
Test Case (3.49 KB, application/gzip)
2003-06-10 09:27 PDT, mikol
no flags Details
simplified testcase (505 bytes, text/html; charset=iso-8859-1)
2003-06-10 11:39 PDT, David Baron :dbaron: ⌚️UTC-7
no flags Details
patch (4.09 KB, patch)
2003-06-10 12:06 PDT, David Baron :dbaron: ⌚️UTC-7
bzbarsky: review+
bzbarsky: superreview+
Details | Diff | Splinter Review
more thorough testcase (568 bytes, text/html; charset=iso-8859-1)
2003-06-10 12:10 PDT, David Baron :dbaron: ⌚️UTC-7
no flags Details

Description mikol 2003-06-09 19:02:15 PDT
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">
    <span style="font-weight:normal;float:right;">
      <span id="remDevLink"><a id="rem" href="">Remove...</a> | </span>
      <a id="mod" href="">Edit...</a>
    <span id="dev">Floppy Drive</span>

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.
Comment 1 mikol 2003-06-09 19:03:29 PDT
Created attachment 125269 [details]
Expected Layout (Mozilla 1.3.1)
Comment 2 mikol 2003-06-09 19:05:07 PDT
Created attachment 125271 [details]
Actual Layout (Gecko/20030609 Mozilla Firebird/0.6)
Comment 3 Boris Zbarsky [:bz] (still a bit busy) 2003-06-09 21:06:56 PDT
So... how do I load this page the screenshots are of?  Would it be possible to
save it and attach it to this bug?
Comment 4 mikol 2003-06-10 09:09:56 PDT
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.
Comment 5 mikol 2003-06-10 09:27:22 PDT
Created attachment 125316 [details]
Test Case
Comment 6 mikol 2003-06-10 09:29:06 PDT
The problem in question can be seen by clicking "Demonstrate Problem" on the
index.html page contained in the Test Case attachement.
Comment 7 David Baron :dbaron: ⌚️UTC-7 2003-06-10 11:39:33 PDT
Created attachment 125326 [details]
simplified testcase
Comment 8 David Baron :dbaron: ⌚️UTC-7 2003-06-10 11:40:40 PDT
This is a regression from my bug 125246 landing.
Comment 9 David Baron :dbaron: ⌚️UTC-7 2003-06-10 12:06:50 PDT
Created attachment 125329 [details] [diff] [review]

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.
Comment 10 David Baron :dbaron: ⌚️UTC-7 2003-06-10 12:10:24 PDT
Created attachment 125330 [details]
more thorough testcase
Comment 11 Boris Zbarsky [:bz] (still a bit busy) 2003-06-10 14:42:04 PDT
Comment on attachment 125329 [details] [diff] [review]

r+sr=me., thanks for the bug report and the testcase!
Comment 12 mikol 2003-06-10 14:50:19 PDT, not a problem. Thanks for the quick response.
Comment 13 David Baron :dbaron: ⌚️UTC-7 2003-06-10 15:15:06 PDT
Fix checked in to trunk, 2003-06-10 15:08 -0700.

Note You need to log in before you can comment on or make changes to this bug.