Closed Bug 250269 Opened 20 years ago Closed 20 years ago

CSS outline property not applied to some elements

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: thomasverelst, Assigned: aaronlev)

References

Details

Attachments

(4 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a1) Gecko/20040520
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a1) Gecko/20040520

Apart from the fact that the CSS outline is rendered on the wrong side of an
element (hopefully fixed, bug #151375), some elements don't get an outline at
all.  I didn't test it for all existing HTML elements, but can confirm this for
<table>, <td> and <button>.  The latter is even given as an example of a "visual
object" this property applies to (see:
http://www.w3.org/TR/REC-CSS2/ui.html#dynamic-outlines).

I will post a testcase applying outline to DIV, P, H1, TABLE, TD and BUTTON, and
give those elements a dark border for comparison.

Reproducible: Always
Steps to Reproduce:
Attached file testcase
This may be bug 6647.
Assignee: general → dbaron
Component: Browser-General → Style System (CSS)
QA Contact: general → ian
Assignee: dbaron → nobody
Status: UNCONFIRMED → NEW
Component: Style System (CSS) → Layout: Misc Code
Ever confirmed: true
QA Contact: ian → core.layout.misc-code
Still a problem in Mozilla 1.8a5
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a5) Gecko/20041024
OS: Windows 2000 → All
Hardware: PC → All
Assignee: nobody → aaronleventhal
Attachment #165168 - Flags: superreview?(roc)
One quirk on <button> that I don't know how to fix. At least on Windows XP, the
unstyled rendering of button draws its border 1px smaller than the rect I'm
expecting. So, the outline appears to start 1px farther out than it should.
However, the button and outline appear correctly sized when a border style rule
of any kind is added, such as border-color: yellow;
Comment on attachment 165168 [details] [diff] [review]
Fix radio, checkbox, button, td and table by adding missed FinishAndStoreOverflow() and PaintOutline() calls

But what about <TR>?
Attachment #165168 - Flags: superreview?(roc) → superreview+
I didn't think about <tr>.

Would you want me to submit a new patch? Also who should I request r= from, or
can I get r+sr=roc?
New patch please, and I'll do r+sr
Attachment #165554 - Flags: superreview?(roc)
Attachment #165554 - Flags: review?(roc)
Comment on attachment 165554 [details] [diff] [review]
Also handles <tr>

I just realized that nsTableRowGroupFrame needs this too. Just throw it in.

We need some refactoring so that this code doesn't have to be duplicated.
Later.
Attachment #165554 - Flags: superreview?(roc)
Attachment #165554 - Flags: superreview+
Attachment #165554 - Flags: review?(roc)
Attachment #165554 - Flags: review+
Checking in html/forms/src/nsFormControlFrame.cpp;
/cvsroot/mozilla/layout/html/forms/src/nsFormControlFrame.cpp,v  <-- 
nsFormControlFrame.cpp
new revision: 1.174; previous revision: 1.173
done
Checking in html/forms/src/nsGfxCheckboxControlFrame.cpp;
/cvsroot/mozilla/layout/html/forms/src/nsGfxCheckboxControlFrame.cpp,v  <-- 
nsGfxCheckboxControlFrame.cpp
new revision: 1.71; previous revision: 1.70
done
Checking in html/forms/src/nsGfxRadioControlFrame.cpp;
/cvsroot/mozilla/layout/html/forms/src/nsGfxRadioControlFrame.cpp,v  <-- 
nsGfxRadioControlFrame.cpp
new revision: 1.70; previous revision: 1.69
done
Checking in html/forms/src/nsHTMLButtonControlFrame.cpp;
/cvsroot/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.cpp,v  <-- 
nsHTMLButtonControlFrame.cpp
new revision: 3.183; previous revision: 3.182
done
Checking in html/table/src/nsTableCellFrame.cpp;
/cvsroot/mozilla/layout/html/table/src/nsTableCellFrame.cpp,v  <-- 
nsTableCellFrame.cpp
new revision: 3.348; previous revision: 3.347
done
Checking in html/table/src/nsTableFrame.cpp;
/cvsroot/mozilla/layout/html/table/src/nsTableFrame.cpp,v  <--  nsTableFrame.cpp
new revision: 3.596; previous revision: 3.595
done
Checking in html/table/src/nsTableRowFrame.cpp;
/cvsroot/mozilla/layout/html/table/src/nsTableRowFrame.cpp,v  <-- 
nsTableRowFrame.cpp
new revision: 3.362; previous revision: 3.361
done
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
what about nsTableRowGroupFrame?
Almost didn't see your last comment about table row group frame:

Checking in nsTableRowGroupFrame.cpp;
/cvsroot/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp,v  <-- 
nsTableRowGroupFrame.cpp
new revision: 3.334; previous revision: 3.333
done
Product: Core → Core Graveyard
Component: Layout: Misc Code → Layout
Product: Core Graveyard → Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: