Closed
Bug 13944
Opened 25 years ago
Closed 15 years ago
Rounded Borders dont support a dashed/dotted style
Categories
(Core Graveyard :: GFX, defect, P5)
Core Graveyard
GFX
Tracking
(Not tracked)
RESOLVED
FIXED
Future
People
(Reporter: christinehoff4, Assigned: kae)
References
()
Details
(Keywords: css-moz)
Attachments
(1 file)
(deleted),
text/html
|
Details |
Using 9/15 build on Win 95, Win 98, Win NT, Mac8.5 and Linux Red Hat 6.0. Bug is
across platform.
Open the attached file. Style assigned to input element is "border: green dashed
1px; padding: 50px"
Expected result: border should be dashed.
Actual result: border is solid.
Reporter | ||
Comment 1•25 years ago
|
||
Updated•25 years ago
|
Status: NEW → ASSIGNED
Updated•25 years ago
|
Summary: Border style not displaying properly on radio button → {css-moz} -moz-border-radius and border-style:dashed don't work
Comment 2•25 years ago
|
||
This isn't anything to do with radio buttons especially. It is a clash of the
border styles and the -moz-border-radius property.
For example, the following border is solid, not dashed:
<div style="border: dashed; -moz-border-radius: 10px;">
Hello World...
</div>
The same problem occurs with some other types of border. Changing the width has
some effect too. For example, the divs in the following test snippet all show
problems:
<style type="text/css">
div { -moz-border-radius:50px; padding: 10px; margin: 10px; }
</style>
<div style="border: inset 1px">inset 1px</div>
<div style="border: dotted 1px">dotted 1px</div>
<div style="border: dotted 2px">dotted 2px</div>
<div style="border: dashed 20px">dashed 20px</div>
(In fact, the last two don't draw at all!)
This should probably be assigned to whoever wrote the border drawing code.
Updated•25 years ago
|
Summary: {css-moz} -moz-border-radius and border-style:dashed don't work → Rounded Borders dont support a dashed style
Updated•25 years ago
|
Summary: Rounded Borders dont support a dashed style → {css-moz} Rounded Borders dont support a dashed style
Comment 4•25 years ago
|
||
[Reinstating {css-moz} radar. I use this to keep track of all bugs related to
CSS issues.]
Updated•25 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → REMIND
Comment 5•25 years ago
|
||
This is true... and probably will at a later time. Currently the rounded
attribute is not a fully supported feature for use with all border styles.
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
Comment 6•25 years ago
|
||
Okiedokie.
Updated•25 years ago
|
Status: VERIFIED → REOPENED
Summary: {css-moz} Rounded Borders dont support a dashed style → {css-moz} Rounded Borders dont support a dashed/dotted style
Comment 8•25 years ago
|
||
Don: Could you change the logic so that dotted/dashed borders just draw a solid
line, instead of nothing? According to CSS2, interpreting 'dotted' and 'dashed'
as 'none' or 'transparent' is wrong, but interpreting them as 'solid' is ok:
# Conforming HTML user agents may interpret 'dotted', 'dashed', 'double',
# 'groove', 'ridge', 'inset', and 'outset' to be 'solid'.
(Section 8.5.3)
This would involve changing nsCSSRendering::RenderSide, which is in:
layout/html/style/src/nsCSSRendering.cpp
Just move these two lines:
(~2562) case NS_STYLE_BORDER_STYLE_DOTTED:
(~2563) case NS_STYLE_BORDER_STYLE_DASHED:
...to just above this line:
(~2515) case NS_STYLE_BORDER_STYLE_SOLID:
I'm reopening the bug to track this quick issue, then we can move it back to
VERIFIED REMIND.
Updated•25 years ago
|
Resolution: REMIND → ---
Updated•25 years ago
|
Status: REOPENED → RESOLVED
Closed: 25 years ago → 25 years ago
Resolution: --- → REMIND
Comment 9•25 years ago
|
||
It now will default to solid for those styles until I get to putting in dotted
and dashed styles. Thanks for the info!!!!
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
Comment 10•25 years ago
|
||
Verified with:
http://www.bath.ac.uk/%7Epy8ieh/m/border-radius-dotted.html
Behaviour: dotted and dashed styles use solid style for now.
Comment 11•23 years ago
|
||
REMIND is deprecated per bug 35839.
Status: VERIFIED → REOPENED
Resolution: REMIND → ---
Comment 12•23 years ago
|
||
->default
Assignee: dcone → dbaron
Status: REOPENED → NEW
QA Contact: chrisd → ian
Comment 13•23 years ago
|
||
->GFX
Assignee: dbaron → kmcclusk
Component: Style System → GFX Compositor
QA Contact: ian → petersen
Comment 14•23 years ago
|
||
Reassigning to Don.
Assignee: kmcclusk → dcone
Priority: P3 → P5
Target Milestone: --- → Future
Comment 15•22 years ago
|
||
*** Bug 153322 has been marked as a duplicate of this bug. ***
Updated•22 years ago
|
Summary: {css-moz} Rounded Borders dont support a dashed/dotted style → Rounded Borders dont support a dashed/dotted style
Comment 16•21 years ago
|
||
*** Bug 207902 has been marked as a duplicate of this bug. ***
Comment 17•21 years ago
|
||
*** Bug 224244 has been marked as a duplicate of this bug. ***
Comment 18•20 years ago
|
||
*** Bug 266099 has been marked as a duplicate of this bug. ***
Comment 19•20 years ago
|
||
*** Bug 271372 has been marked as a duplicate of this bug. ***
Comment 20•20 years ago
|
||
*** Bug 288672 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 21•19 years ago
|
||
I'm almost finished writing code which can handle dashed curves. All I need now
is to figure out a formula for finding the various angles of the beginnings and
endings of the dashes. I've been searching various maths sites, but cannot find
the information - does anyone have a useful URL?
Assignee | ||
Comment 22•19 years ago
|
||
I found a page with the required maths:
http://en.wikipedia.org/wiki/Elliptic_integral
now I need to learn how to read the maths....
Assignee | ||
Comment 23•19 years ago
|
||
The math is too hard for me to follow :(
To explain the problem - to draw dashes on a curved line, I need to know where
each dash begins and ends. For that, I need the angles, so I can get the Tan
of those angles to figure out the intersection areas.
That is simple, where pure circles are concerned. However, I am working on
providing the full elliptical curve, as proposed in the W3C's CSS3 draft.
Getting the exact start angle of a dash on an ellipse is very complex. Even
just getting the length of the diameter involves integral calculus. Getting
the angle, though, involves figuring out exactly what point is x far from
another point, following the elliptic route. There be dragons!
So, unless anyone out there in mozilla-land is a maths genius and can hand me
a useful formula to solve this, I think I'll solve it by approximating - I'll
count the pixels (twips, actually) around the ellipse, and use that to guess
where the angles might be.
I should be ready with this in a few days.
Comment 24•19 years ago
|
||
cc'ing some maths geeks. See comment 23.
Comment 25•19 years ago
|
||
How bad are the results if you just use dashlength/current_radius for the angle
(in radians)? For dashes that are short compared to the size of the corner and
for corners that are close to circular that should work well. For
|border-radius: 1px 3px| it might not work so great, though....
Assignee | ||
Comment 26•19 years ago
|
||
Boris - it may work fine for ellipses that are close to circular, but we all
know that when people realise that they can create elliptical corners, they
will, so correct-length dashes will be important.
Besides - dashes that vary in length would not matter too much, but would look
just plain wrong in the case of dots.
I'm working on dashed code at the moment - I'm going to count the twips and work
it out that way - I think it may look acceptable.
I hope to have a fully-working example in a few days - I have managed to produce
dashed curves already by hard-coding some start/end angles - just need to
generate the angles automatically now.
Assignee | ||
Comment 27•19 years ago
|
||
I have an example of a dashed curve now.
http://verens.com/demos/borders/dashed-curve.html
Once I've ironed out some kinks in that, and applied the same algorithm to all
the other corners, I can do doubled borders and then convert to C++ for
firefox.
Note that it is anti-aliased. Just an added bonus. That also needs a little
work.
Oh - could someone assign this bug to me? I seem to be the only one active on
it.
Updated•19 years ago
|
Assignee: dcone → kae
Maybe the right way to approach this, given that we're going to be using cairo,
is to get cairo to flatten the curve to line segments and then apply dashing to
those line segments.
Assignee | ||
Comment 29•19 years ago
|
||
According to the following URL, the new API will be available soon:
http://weblogs.mozillazine.org/roc/archives/2005/07/gecko_19.html
Does anyone know if it handles anti-aliasing automatically, or would I need to
port my anti-aliasing code from my JavaScript as well? The anti-aliasing is the
most difficult part of my algorithm.
cairo does some antialiasing automatically. It may not work right for multiple
borders. See http://wiki.mozilla.org/Mozilla2:Antialiasing
Comment 32•17 years ago
|
||
This has changed significantly with bug 368247: only the corner is solid. Adding dependency of bug 382721 (corners are always solid).
Depends on: 382721
OS: Windows 95 → All
Comment 33•17 years ago
|
||
Actually it's not only corners that are solid. With the latest SeaMonkey nightly build, I still get some solid borders. See bug 380549 comment #8 .
Comment 34•16 years ago
|
||
FWIW, I was reading into C++0x recently, and TR1 introduced some new mathematics libraries into C++, including methods for complete and incomplete elliptic integrals.
But I doubt any of that is supported in Visual Studio, or possibly even recent versions of GCC.
Comment 35•16 years ago
|
||
What's the version for your Firefox? In the latest non-beta Firefox, the bug is gone
Updated•16 years ago
|
Product: Core → Core Graveyard
Comment 36•16 years ago
|
||
Comment 37•15 years ago
|
||
Yes, let's close this out and do the remaining piece in bug 382721.
Status: NEW → RESOLVED
Closed: 25 years ago → 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•