Opened 11 years ago

Closed 11 years ago

#10214 closed bug (fixed)

WebPositive: border-radius make border color overwrite background.

Reported by: dsjonny Owned by: pulkomandy
Priority: normal Milestone: R1
Component: Applications/WebPositive Version: R1/Development
Keywords: Cc:
Blocked By: #10645 Blocking: #10311, #10319, #10624
Platform: All

Description

Using WebPositive/1.2 there are many sites have drawing problem. Many html elements are not updated or drawing with gray color.

For example: Trac, Building Haiku Guide, Facebook...

Some images attached.

Attachments (3)

screenshot1.png (65.0 KB ) - added by dsjonny 11 years ago.
screenshot2.png (110.1 KB ) - added by dsjonny 11 years ago.
wp.1.2.png (21.5 KB ) - added by dsjonny 11 years ago.

Download all attachments as: .zip

Change History (13)

by dsjonny, 11 years ago

Attachment: screenshot1.png added

by dsjonny, 11 years ago

Attachment: screenshot2.png added

by dsjonny, 11 years ago

Attachment: wp.1.2.png added

comment:1 by diver, 11 years ago

Owner: changed from leavengood to pulkomandy
Status: newassigned

comment:2 by pulkomandy, 11 years ago

What happens is the CSS border color is used for the background as well. This shows mostly on things using border-radius (rounded rectangles).

comment:3 by pulkomandy, 11 years ago

Summary: WebPositive: page drawing problemWebPositive: border-radius make border color overwrite background.

comment:4 by diver, 11 years ago

Blocking: 10319 added

comment:5 by pulkomandy, 11 years ago

Blocking: 10311 added

comment:6 by pulkomandy, 11 years ago

The situation is better now, http://haiku-os.org works as expected, and so does http://whatif.xkcd.com. But not all issues are solved. It seems that a border of more than 1 pixel will still trigger the issue. Investigating...

comment:7 by pulkomandy, 11 years ago

Problem identified, I think. When the border is only 1 pixel big, it is drawn using line drawing primitives. When it is bigger, it is drawn as a BShape made of 2 parts:

  • An "outside" polygon that marks the outside limit of the border
  • An "inside" polygon that marks the inside limit (where the contents starts)

The idea is that these should "cancel" each other, so the BShape is filled with a hole in the middle, letting the contents shine through. There are two ways to do this:

  • Use the even/odd fill rule, or
  • Use the "winding"/"non-zero" rule, and make sure the two polygons are in opposite directions (one should be clockwise, and the other counter-clockwise). This way the winding of the intersection part will be 0, not 1. Note that such a polygon would also work with the even/odd rule.

In Haiku, we don't have an API for using the even/odd rule. Unfortunately, WebKit apparently expects us to use the first way.

I'll see if I can change this in WebKit. However, supporting both winding rules in Haiku will be required at some later point, anyway. (they are part of the canvas API).

comment:8 by pulkomandy, 11 years ago

Blocked By: 10645 added

comment:9 by pulkomandy, 11 years ago

Blocking: 10624 added

(In #10624) This is actually a duplicate of #10214, or close enough that the fix for them two is the same.

comment:10 by pulkomandy, 11 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.