Closed Bug 449324 Opened 17 years ago Closed 17 years ago

Take single-tile background path when there's a solid border

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: roc, Assigned: roc)

References

Details

Attachments

(3 files, 1 obsolete file)

Attached patch fix (obsolete) — Splinter Review
The default background-origin area is the element's padding rect, but the default background-clip area is the element's border rect. This means that any element with a repeating background which is the same size as the element's padding rect, but which has a solid opaque border, in theory should tile the background into 9 tiles even though all but the center tile are completely hidden by the border. Since repeating is the default, this could be hurting us today when Web authors design a background image to fix a px-sized element. It hurts us even more when we start using SVG backgrounds or background-size or SVG paint servers to scale the background to the size of the element. This patch detects solid opaque borders and essentially treats them as inducing background-clip:padding. I think this is a safe optimization.
Attachment #332487 - Flags: superreview?(vladimir)
Attachment #332487 - Flags: review?(vladimir)
Attached patch fix v2Splinter Review
Oops, that needed to be updated to trunk a bit more.
Attachment #332487 - Attachment is obsolete: true
Attachment #332489 - Flags: superreview?(vladimir)
Attachment #332489 - Flags: review?(vladimir)
Attachment #332487 - Flags: superreview?(vladimir)
Attachment #332487 - Flags: review?(vladimir)
Comment on attachment 332489 [details] [diff] [review] fix v2 Yep, should be safe.
Attachment #332489 - Flags: superreview?(vladimir)
Attachment #332489 - Flags: superreview+
Attachment #332489 - Flags: review?(vladimir)
Attachment #332489 - Flags: review+
Pushed 926b38cca720
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
This checkin appears to have caused the mac tbox to turn orange with the following test failures: REFTEST TEST-UNEXPECTED-PASS | file:///builds/slave/trunk_darwin_mini01/build/layout/reftests/svg/sizing/inline--float-left--01.xhtml REFTEST TEST-UNEXPECTED-PASS | file:///builds/slave/trunk_darwin_mini01/build/layout/reftests/svg/sizing/inline--float-right--01.xhtml REFTEST TEST-UNEXPECTED-PASS | file:///builds/slave/trunk_darwin_mini01/build/layout/reftests/svg/sizing/inline--position-absolute--01.xhtml REFTEST TEST-UNEXPECTED-PASS | file:///builds/slave/trunk_darwin_mini01/build/layout/reftests/svg/sizing/object--auto-auto--0-pct.html REFTEST TEST-UNEXPECTED-PASS | file:///builds/slave/trunk_darwin_mini01/build/layout/reftests/svg/sizing/object--auto-auto--0-px.html REFTEST TEST-UNEXPECTED-PASS | file:///builds/slave/trunk_darwin_mini01/build/layout/reftests/svg/sizing/object--auto-auto--pct-0.html REFTEST TEST-UNEXPECTED-PASS | file:///builds/slave/trunk_darwin_mini01/build/layout/reftests/svg/sizing/object--auto-auto--px-0.html Any clues?
Well, are these really failures? They are all tests that now pass but previously did not.
Attachment #333567 - Flags: review?(vladimir)
Why not do this for ridge, groove, inset, and outset too?
Comment on attachment 333567 [details] [diff] [review] Reenable the passing tests Sure, but would be good to know why they pass now.. I assume that the issue is some odd handling of OPERATOR_ADD on the borders (often 1-off on cocoa)?
Attachment #333567 - Flags: review?(vladimir) → review+
Yeah, on 3.0.1 the errors are 1-off drawing on the borders, but so it is on the tests that still fail, so more analysis is required. Pushed 7bb9c0bb9663.
(In reply to comment #7) > Why not do this for ridge, groove, inset, and outset too? I dunno, we probably should.
Attached patch patch for thatSplinter Review
Attachment #334742 - Flags: superreview?(vladimir)
Attachment #334742 - Flags: review?(vladimir)
Attachment #334742 - Flags: superreview?(vladimir)
Attachment #334742 - Flags: superreview+
Attachment #334742 - Flags: review?(vladimir)
Attachment #334742 - Flags: review+
The extra patch here never landed.
Whiteboard: [needs landing]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: