Closed
Bug 310124
Opened 19 years ago
Closed 19 years ago
Double border is incorrectly compressed when rendered; regression.
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha1
People
(Reporter: mbolin, Assigned: masayuki)
References
()
Details
(Keywords: fixed1.8.1, regression, testcase)
Attachments
(4 files, 1 obsolete file)
1.40 KB,
text/html
|
Details | |
11.99 KB,
patch
|
roc
:
review+
roc
:
superreview+
darin.moz
:
approval-branch-1.8.1+
|
Details | Diff | Splinter Review |
1.89 KB,
text/html
|
Details | |
12.00 KB,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050908 Firefox/1.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050908 Firefox/1.4
In Firefox 1.0.7, a double border was given its correct spacing. In Firefox
1.5b1, this is not the case. The provided URL demonstrates this problem where a
double border is compressed into a single line for certain screen resizings.
Reproducible: Always
Steps to Reproduce:
1. Go to http://www.bolinfest.com/mozilla/missing_border.html
2. Click the link to show the page at the specified size
Actual Results:
Look at the 4th border and note it is compressed.
Expected Results:
Should have been a double border with a visible space between the two lines.
Comment 1•19 years ago
|
||
Somewhere in March 2005.
Build with double line: 1.8b2_2005032807
Build with single line: 1.8b2_2005032906
Comment 2•19 years ago
|
||
I get the same regression range (although it's not clear to me what is causing it)
http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2005-03-28+07%3A00%3A00&maxdate=2005-03-29+07%3A00%3A00&cvsroot=%2Fcvsroot
Status: UNCONFIRMED → NEW
Component: General → Layout
Ever confirmed: true
Keywords: regression,
testcase
OS: Windows XP → All
Product: Firefox → Core
QA Contact: general → layout
Version: unspecified → Trunk
Comment 3•19 years ago
|
||
Assignee | ||
Comment 5•19 years ago
|
||
same problem is occured with "groove" and "ridge".
See this groove case.
http://bugzilla.mozilla.gr.jp/attachment.cgi?id=2982&action=view
Status: NEW → ASSIGNED
Hardware: PC → All
Target Milestone: --- → mozilla1.9alpha
Assignee | ||
Comment 6•19 years ago
|
||
testcase for all border styles:
http://bugzilla.mozilla.gr.jp/attachment.cgi?id=2981&action=view
Attachment #203691 -
Flags: superreview?(roc)
Attachment #203691 -
Flags: review?(roc)
It looks like this allows a 1px double border to be drawn 2px wide, and thus extend outside layout's border-box for the frame. Is that true?
Assignee | ||
Comment 8•19 years ago
|
||
(In reply to comment #7)
> It looks like this allows a 1px double border to be drawn 2px wide, and thus
> extend outside layout's border-box for the frame. Is that true?
>
I cannot reproduce it on comment 6's testcase.
But I can see sometimes the case in 0.5px + ridge or groove cases.
Assignee | ||
Comment 9•19 years ago
|
||
This patch has a ploblem when the border-width < 1px.
But I think that we can fix this problem by fixing bug 287624.
Assignee | ||
Comment 10•19 years ago
|
||
roc:
We don't draw 2px wide if the border-width < 1px. See:
http://lxr.mozilla.org/mozilla/source/layout/base/nsCSSRendering.cpp#1807
> 1807 // If a side needs a double border but will be less than two pixels,
> 1808 // force it to be solid (see bug 1781).
> 1809 if (aBorderStyle.GetBorderStyle(side) == NS_STYLE_BORDER_STYLE_DOUBLE) {
> 1810 nscoord widths[] = { border.top, border.right, border.bottom, border.left };
> 1811 forceSolid = (widths[side]/twipsPerPixel < 2);
> 1812 } else
> 1813 forceSolid = PR_FALSE;
Assignee | ||
Comment 11•19 years ago
|
||
Sorry.
> We don't draw 2px wide if the border-width < 1px. See:
We don't draw 2px wide if the border-width < 2px. See:
^^^
Assignee | ||
Comment 12•19 years ago
|
||
Ah... Should we expand this code as following?
> 1809 if (aBorderStyle.GetBorderStyle(side) == NS_STYLE_BORDER_STYLE_DOUBLE ||
aBorderStyle.GetBorderStyle(side) == NS_STYLE_BORDER_STYLE_GROOVE ||
aBorderStyle.GetBorderStyle(side) == NS_STYLE_BORDER_STYLE_RIDGE) {
> 1810 nscoord widths[] = { border.top, border.right, border.bottom, border.left };
> 1811 forceSolid = (widths[side]/twipsPerPixel < 2);
Assignee | ||
Comment 13•19 years ago
|
||
This patch looks better than previous patch.
Attachment #203691 -
Attachment is obsolete: true
Attachment #203758 -
Flags: superreview?(roc)
Attachment #203758 -
Flags: review?(roc)
Attachment #203691 -
Flags: superreview?(roc)
Attachment #203691 -
Flags: review?(roc)
Attachment #203758 -
Flags: superreview?(roc)
Attachment #203758 -
Flags: superreview+
Attachment #203758 -
Flags: review?(roc)
Attachment #203758 -
Flags: review+
Assignee | ||
Comment 14•19 years ago
|
||
checked-in. Thank you Ichimaru-san.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 15•19 years ago
|
||
Oops, now, the tree is closed, I backed out the patch.
I will retry to check-in after opened.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 16•19 years ago
|
||
checked-in.
Status: REOPENED → RESOLVED
Closed: 19 years ago → 19 years ago
Resolution: --- → FIXED
Comment 17•19 years ago
|
||
Masayuki Nakano, do you want to add that testcase to the layout regression tests? Or should I do it?
Assignee | ||
Comment 18•19 years ago
|
||
(In reply to comment #17)
> Masayuki Nakano, do you want to add that testcase to the layout regression
> tests? Or should I do it?
What's? I cannot understand what you say...
Does this patch make regression?
Comment 19•19 years ago
|
||
No, this didn't cause a regression. What I was saying was that if we can create a testcase for this bug that shows the problem when just loaded in a window (independently of window size), we should check the testcase into CVS at http://lxr.mozilla.org/seamonkey/source/layout/html/tests/block/bugs/ and add it to the list at http://lxr.mozilla.org/seamonkey/source/layout/html/tests/block/bugs/rtest.lst so that running the layout regression tests would catch this bug being reintroduced if that ever happens.
The problem would be writing such a testcase, I guess. I hadn't realized till I just looked at it that this testcase depends on a particular window size. :(
Assignee | ||
Comment 20•19 years ago
|
||
(In reply to comment #19)
Yes. This bug is reproduced *sometimes*. But I can see this bug in this testcase.
http://bugzilla.mozilla.gr.jp/attachment.cgi?id=2981&action=view
if "border: double 2px;", the border should be rendered as two pixel width solid line. And if "border: double 5px;" or "border: double 7px;", these twin lines should be rendered always same witdh.
And "border-width: 0.5px;", it should be rendered as 1px line. Because it means border. We should render the border, even if we ignore the width.
# but we are having this bug in dotted and dashed cases.
# This, I will file a new bug and fix it.
I think that we can make stable testcase with above cases.
Comment 21•19 years ago
|
||
Something like this? I think this is a testcase that is resolution independant.
Maybe a more elaborate testcase (like from comment 20) is needed that is also resolution independant.
Assignee | ||
Comment 22•19 years ago
|
||
looks good!
Comment 23•19 years ago
|
||
Updated•19 years ago
|
Flags: blocking1.8.1? → blocking1.8.1+
Updated•19 years ago
|
Attachment #203758 -
Flags: approval-branch-1.8.1+
Assignee | ||
Comment 25•19 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•