WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
17767
frameborder="no" on frameset is ignored if border attribute set
https://bugs.webkit.org/show_bug.cgi?id=17767
Summary
frameborder="no" on frameset is ignored if border attribute set
Gavin Sherlock
Reported
2008-03-11 07:46:36 PDT
Everything on the page is shifted down, with the main content of the page being in a tiny frame on the bottom right. Renders correctly in Firefox. Tested with
r30939
and release Safari on 10.5.2. Have not tested if it is a regression from Safari 2.
Attachments
Reduction
(756 bytes, text/html)
2012-06-25 16:12 PDT
,
Elliott Sprehn
no flags
Details
Patch
(4.10 KB, patch)
2012-06-25 17:55 PDT
,
Elliott Sprehn
no flags
Details
Formatted Diff
Diff
Patch
(16.43 KB, patch)
2012-06-28 13:50 PDT
,
Elliott Sprehn
no flags
Details
Formatted Diff
Diff
Patch
(16.41 KB, patch)
2012-06-28 14:19 PDT
,
Elliott Sprehn
no flags
Details
Formatted Diff
Diff
Patch for landing
(16.37 KB, patch)
2012-06-28 15:06 PDT
,
Elliott Sprehn
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Marcus
Comment 1
2008-04-07 06:21:26 PDT
The page has two framesets with these attributes: framespacing="0" frameborder="NO" border="800" IE 7 prefers framespacing="0" over border="800" and draws no border between the frames. Safari 3.1 ignores the framespacing attribute and draws a 800-pixel wide border. Firefox 3 also ignores the framespacing attribute but interprets frameborder="NO" to signify that no border should be drawn.
Jon@Chromium
Comment 2
2008-10-14 13:23:28 PDT
Also see Chromium bug
http://code.google.com/p/chromium/issues/detail?id=1365
Elliott Sprehn
Comment 3
2012-06-25 16:12:17 PDT
Created
attachment 149383
[details]
Reduction
Elliott Sprehn
Comment 4
2012-06-25 17:55:03 PDT
Created
attachment 149410
[details]
Patch
Julien Chaffraix
Comment 5
2012-06-26 09:54:39 PDT
Comment on
attachment 149410
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=149410&action=review
How good is our coverage of |frameborder| and |border|? I had a hard time understanding why you wouldn't break any case: checking |m_frameborder| would normally be dependent on the attribute ordering but here works because it defaults to true. If something changes, some of cases will break which why I would like you to point out or provide more coverage for those.
> Source/WebCore/html/HTMLFrameSetElement.cpp:113 > if (!m_border) > m_frameborder = false;
This should go into the "if (m_frameborder)".
Tony Chang
Comment 6
2012-06-26 10:03:10 PDT
Comment on
attachment 149410
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=149410&action=review
> LayoutTests/fast/frames/frame-frameborder-overides-border.html:5 > + WebKit doesn't ignore border="..." when frameborder is NO while all other > + browsers will.
I would probably use a dumpAsText test instead. It's slightly easier to maintain than a reftest. Also, for dumpAsText or reftests, I would include the description text in the generated output. It might also be nice to add tests for frameborder={0,1,yes}.
Tony Chang
Comment 7
2012-06-26 11:42:42 PDT
Ah, I didn't realize order matters. Seems like we need more test cases!
Elliott Sprehn
Comment 8
2012-06-26 13:36:55 PDT
Comment on
attachment 149410
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=149410&action=review
>> LayoutTests/fast/frames/frame-frameborder-overides-border.html:5 >> + browsers will. > > I would probably use a dumpAsText test instead. It's slightly easier to maintain than a reftest. Also, for dumpAsText or reftests, I would include the description text in the generated output. It might also be nice to add tests for frameborder={0,1,yes}.
So I should dump the borders using getComputedStyle?
Elliott Sprehn
Comment 9
2012-06-26 13:39:38 PDT
(In reply to
comment #7
)
> Ah, I didn't realize order matters. Seems like we need more test cases!
Yeah it works because the default is true as required by IE compatibility behavior. I'll add more tests since this might not be obvious.
Tony Chang
Comment 10
2012-06-26 13:48:28 PDT
Comment on
attachment 149410
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=149410&action=review
>>> LayoutTests/fast/frames/frame-frameborder-overides-border.html:5 >>> + browsers will. >> >> I would probably use a dumpAsText test instead. It's slightly easier to maintain than a reftest. Also, for dumpAsText or reftests, I would include the description text in the generated output. It might also be nice to add tests for frameborder={0,1,yes}. > > So I should dump the borders using getComputedStyle?
Yeah, that's what I was thinking. Maybe that doesn't work for framesets or frames? You could also get the clientWidth of the frames and make sure they're the right size.
Elliott Sprehn
Comment 11
2012-06-26 14:51:12 PDT
(In reply to
comment #5
)
> (From update of
attachment 149410
[details]
) > ... > > Source/WebCore/html/HTMLFrameSetElement.cpp:113 > > if (!m_border) > > m_frameborder = false; > > This should go into the "if (m_frameborder)".
They logically have the same effect but that's more nesting. Is there a reason?
Julien Chaffraix
Comment 12
2012-06-26 15:11:20 PDT
Comment on
attachment 149410
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=149410&action=review
>>> Source/WebCore/html/HTMLFrameSetElement.cpp:113 >>> m_frameborder = false; >> >> This should go into the "if (m_frameborder)". > > They logically have the same effect but that's more nesting. Is there a reason?
I don't see what the issue with more nesting is. With the new logic, we don't need to run this check if m_frameborder is false (in which case m_border will be false anyway).
> LayoutTests/fast/frames/frame-frameborder-overides-border.html:14 > + but instead you see the above with lots of white spaces around it because > + the frameborder still renders. > +-->
Also this description should be dumped in the output if it doesn't make your test platform dependent (which is the case for ref-tests and dumpAsText). I also advise to add the bug title and number but other reviewers have other opinions on that. That makes tests whose output are easier to read and maintain.
Elliott Sprehn
Comment 13
2012-06-28 13:50:27 PDT
Created
attachment 150005
[details]
Patch
Elliott Sprehn
Comment 14
2012-06-28 13:59:46 PDT
It turns out there was more brokeness in there like frameborder actually being parsed to an int making frameborder=yes the same as frameborder=no. I've done a bunch of fix up on the parsing and handling of inheritance and added lots of tests.
Elliott Sprehn
Comment 15
2012-06-28 14:19:24 PDT
Created
attachment 150013
[details]
Patch Fix funky whitespace
Tony Chang
Comment 16
2012-06-28 14:35:02 PDT
Comment on
attachment 150013
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=150013&action=review
> Source/WebCore/html/HTMLFrameSetElement.cpp:101 > + } else if (equalIgnoringCase(value, "yes") || equalIgnoringCase(value, "1")) { > + // Default is true.
I think this comment is confusing (it's not obvious we're talking about m_border). I would just remove it.
Elliott Sprehn
Comment 17
2012-06-28 15:06:21 PDT
Created
attachment 150021
[details]
Patch for landing
WebKit Review Bot
Comment 18
2012-06-28 17:56:02 PDT
Comment on
attachment 150021
[details]
Patch for landing Clearing flags on attachment: 150021 Committed
r121494
: <
http://trac.webkit.org/changeset/121494
>
WebKit Review Bot
Comment 19
2012-06-28 17:56:08 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug