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)

defect

Tracking

()

VERIFIED FIXED

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
Attached file Testcase
Keywords: css2, testcase
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.
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]))) {
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Keywords: approval, nsbeta3
OS: Windows 2000 → All
Target Milestone: --- → M18
Hardware: PC → All
Whiteboard: [fix in hand]
nsbeta3, correctness issue, [fix in hand], PDT please approve checkin for nsbeta3.
Keywords: correctness
Summary: 'hidden' borders should be treated as 'none' → [fix in hand]'hidden' borders should be treated as 'none'
Approving for nsbeta3
Whiteboard: [fix in hand] → [fix in hand][nsbeta3+]
Fix checked in nsStyleContext.cpp
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
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.

Attachment

General

Creator:
Created:
Updated:
Size: