Bug 15371 - white-space:nowrap makes <td> expand to fit <marquee> content
Summary: white-space:nowrap makes <td> expand to fit <marquee> content
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 523.x (Safari 3)
Hardware: PC Windows XP
: P2 Normal
Assignee: Nobody
URL: http://auto.qianlong.com/
Keywords:
Depends on: 15218
Blocks:
  Show dependency treegraph
 
Reported: 2007-10-04 08:13 PDT by Anantha Keesara
Modified: 2008-01-17 14:42 PST (History)
1 user (show)

See Also:


Attachments
white-space:nowrap causes marquee to extend outside the border (1.38 KB, text/html)
2007-10-04 08:14 PDT, Anantha Keesara
no flags Details
reduced test case (262 bytes, text/html)
2008-01-17 03:50 PST, Eric Seidel (no email)
no flags Details
even more reduced case (FF2 "passes", FF3 "fails", Safari3 "fails") (198 bytes, text/html)
2008-01-17 13:13 PST, Eric Seidel (no email)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anantha Keesara 2007-10-04 08:13:08 PDT
I .Steps:
-----------
1. Go to: http://auto.qianlong.com/


II. Issue:
-----------------
Notice the heading of the sections outside the border. Also the marquee extends outside the border.

III. Other browsers:
-----------------
IE, FF, Opera: NO issue.
Safari: has above mentioned issue.
Comment 1 Anantha Keesara 2007-10-04 08:14:28 PDT
Created attachment 16533 [details]
white-space:nowrap causes marquee to extend outside the border
Comment 2 Eric Seidel (no email) 2008-01-11 15:53:44 PST
I wonder if this is relate to or even a duplicate of bug 15218.
Comment 3 Eric Seidel (no email) 2008-01-17 03:50:00 PST
Ok, I've reduced this further.  It looks like we don't correctly "disconnect" the <marquee> block from its parent, and thus allow it to force its parent cell to wider than it should be.
Comment 4 Eric Seidel (no email) 2008-01-17 03:50:16 PST
Created attachment 18498 [details]
reduced test case
Comment 5 Eric Seidel (no email) 2008-01-17 13:13:28 PST
Created attachment 18508 [details]
even more reduced case (FF2 "passes", FF3 "fails", Safari3 "fails")

Bah!  It looks like FF3 changed FF's behavior here to match ours.  I've reduced the test case to remove any whitespace from the marquee.
Comment 6 Eric Seidel (no email) 2008-01-17 13:17:09 PST
I've confirmed with the original page.  FF3 renders the <marquee> on the original page exactly like Safari3 does.  FF2 renders the marquee as the author intended.  To fix this, we'll need to understand why FF3 changed their <td>/<marquee> sizing behavior.
Comment 7 Eric Seidel (no email) 2008-01-17 14:42:57 PST
This was also interesting.  From Marquee::updateMarqueeStyle():

        // Hack alert: Set the white-space value to nowrap for horizontal marquees with inline children, thus ensuring
        // all the text ends up on one line by default.  Limit this hack to the <marquee> element to emulate
        // WinIE's behavior.  Someone using CSS3 can use white-space: nowrap on their own to get this effect.
        // Second hack alert: Set the text-align back to auto.  WinIE completely ignores text-align on the
        // marquee element.
        // FIXME: Bring these up with the CSS WG.
        if (isHorizontal() && m_layer->renderer()->childrenInline()) {
            s->setWhiteSpace(NOWRAP);
            s->setTextAlign(TAAUTO);
        }