Open Bug 1699924 Opened 3 years ago Updated 3 years ago

The patch for bug 1174332 doesn't seem correct to me.

Categories

(Core :: Web Painting, defect, P3)

defect

Tracking

()

People

(Reporter: emilio, Unassigned)

References

Details

See data:text/html,<input style="box-shadow: 0 0 5px blue">. When you focus the input then the shadow moves to be outside the outline, which I think is incorrect and bad.

Markus, should we revert that? Leave that only when the mac native theme is in use somehow? Thanks.

Flags: needinfo?(mstange.moz)

It seems Safari avoids painting shadows on native buttons altogether for example.

So the expectation of that patch was that, whenever we hit the nativeTheme == true path, box-shadow drawing ignores the rect and the border-radius and instead acts like a filter on the appearance drawing. And the patch adjusted the rects so that the output of that "filter" wasn't clipped. Even before the patch, we would include the focus ring in the input of the box-shadow "filter" because the focus ring is drawn as part of the appearance drawing.
So all that patch changed (if the expectation was correct) was that the output was no longer clipped.

Oh, I just found bug 1327935 comment 2 which basically said the same thing.

I think it would be good to remove our special "native theme box-shadow" path. The other options are:

  • Draw no box-shadow, like Safari. But then we need to change our invalid form styling which currently makes use of red box-shadows, IIRC.
  • Draw a box-shadow around a (rounded?) rectangle that is somehow tight around the form control. For example, when there's a checkbox whose border box has an aspect ratio of 2:1, the checkbox drawing itself is square and centered in that box, and we shouldn't draw a shadow based on a 2:1 box.
Flags: needinfo?(mstange.moz)

The special native theme box-shadow drawing is from bug 581222.

Depends on: 1699937
Severity: -- → S3
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.