Closed
Bug 45754
Opened 25 years ago
Closed 25 years ago
[fix in hand]'hidden' borders should be treated as 'none'
Categories
(Core :: CSS Parsing and Computation, defect, P3)
Core
CSS Parsing and Computation
Tracking
()
VERIFIED
FIXED
M18
People
(Reporter: fantasai.bugs, Assigned: pierre)
Details
(Keywords: css2, testcase, Whiteboard: [fix in hand][nsbeta3+])
Attachments
(3 files)
Overview:
'hidden' borders are currently treated differently from 'none'; they
take a width. Except in tables, both 'hidden' and 'none' should behave
identically, and both should set the computed value of border-width to
'0'.
CSS2:8.5.3 - http://www.w3.org/TR/REC-CSS2/box.html#border-style-properties
Steps to Reproduce:
Open up testcase in Mozilla.
Actual Results:
Set 1 - On hover, a thick border is added around the link's box.
Set 2 - On hover, a thick border is added inside the link's box.
Set 3 - On hover, a thick border is added around the link's box.
Expected Results:
All three sets should give the same results--a thick border around
the link's box.
Tested on Mozilla nightly build (id: 2000071708) on Windows 2000
The problem only occurs when the border width remains unchanged. I think the
style change is triggering NS_STYLE_HINT_VISUAL instead of NS_STYLE_HINT_REFLOW
or something like that.
'none' works fine, though, so giving both the same treatment should fix this.
Attaching two more testcases to demonstrate.
Assignee | ||
Comment 5•25 years ago
|
||
Thanks for the investigation. It's a quick fix:
Index: nsStyleContext.cpp
===================================================================
RCS file: /m/pub/mozilla/layout/base/src/nsStyleContext.cpp,v
retrieving revision 3.132
diff -r3.132 nsStyleContext.cpp
864c864,866
< (NS_STYLE_BORDER_STYLE_NONE == aOther.mBorderStyle[ix]))) {
---
> (NS_STYLE_BORDER_STYLE_NONE == aOther.mBorderStyle[ix]) ||
> (NS_STYLE_BORDER_STYLE_HIDDEN == mBorderStyle[ix]) ||
> (NS_STYLE_BORDER_STYLE_HIDDEN == aOther.mBorderStyle[ix]))) {
Assignee | ||
Updated•25 years ago
|
Hardware: PC → All
Whiteboard: [fix in hand]
Comment 6•25 years ago
|
||
nsbeta3, correctness issue, [fix in hand], PDT please approve checkin for
nsbeta3.
Keywords: correctness
Assignee | ||
Updated•25 years ago
|
Summary: 'hidden' borders should be treated as 'none' → [fix in hand]'hidden' borders should be treated as 'none'
Assignee | ||
Comment 8•25 years ago
|
||
Fix checked in nsStyleContext.cpp
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Comment 9•25 years ago
|
||
Using 8/25 build with testcases, verified bug fixed (across platform).
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•