Closed Bug 470250 Opened 17 years ago Closed 17 years ago

Middle part of border-image doesn't show when all border-widths are 0

Categories

(Core :: Web Painting, defect, P2)

defect

Tracking

()

VERIFIED FIXED
mozilla1.9.2a1

People

(Reporter: mstange, Assigned: zwol)

References

Details

(Keywords: testcase, verified1.9.1, Whiteboard: [fixed1.9.1b3])

Attachments

(3 files, 2 obsolete files)

Attached file testcase
The attached testcase should show 3x3green-1DD813.png scaled to 50x50 pixels. But it doesn't.
Attached file reference
In the reference I added a column of transparent pixels to the left of the image and set the left border width to 1px.
Mine. Will fix as part of the work currently being done in bug 455364.
Assignee: nobody → zweinberg
Status: NEW → ASSIGNED
Depends on: 455364
Attached patch partial fix (obsolete) — Splinter Review
Here's a fix for the primary symptom. nsFrame was assuming that a zero-width border on all four sides meant it didn't need to bother drawing the border at all, but if there's a border-image that's not true. If applied to trunk, the reftest (based on mstange's test case) will fail on two counts: <img> isn't scaled up the same way border-image is, and the upper left hand corner of the <img> is not in the same place as the upper left hand corner of the <div>. These will both be fixed in bug 455364. The patches there right now don't quite do it but I'm working on it.
Attachment #354330 - Flags: superreview?(dbaron)
Attachment #354330 - Flags: review?(dbaron)
I think all three callers of HasBorder want this change, so I think you should just change the semantics of HasBorder instead.
Attachment #354330 - Flags: superreview?(dbaron)
Attachment #354330 - Flags: superreview-
Attachment #354330 - Flags: review?(dbaron)
Attachment #354330 - Flags: review-
Attached patch fix (obsolete) — Splinter Review
Yeah, it does look like all callers want that. Changed. Also fixed an error in the test case which was causing the "upper left hand corner of the img is not in the same place as the div" problem. This + all three patches in bug 455364 passes reftests on Linux.
Attachment #354330 - Attachment is obsolete: true
Attachment #354357 - Flags: superreview?(dbaron)
Attachment #354357 - Flags: review?(dbaron)
Attachment #354357 - Flags: approval1.9.1?
Comment on attachment 354357 [details] [diff] [review] fix r+sr=dbaron Maybe even add a test for the issues with the other callers of HasBorder? (No need to ask for re-review for that.)
Attachment #354357 - Flags: superreview?(dbaron)
Attachment #354357 - Flags: superreview+
Attachment #354357 - Flags: review?(dbaron)
Attachment #354357 - Flags: review+
Flags: blocking1.9.1?
Zack, should this have checkin-needed?
Not yet; the patches for bug 455364 need to land first. I'm hoping to get those done by the end of the day.
Flags: blocking1.9.1? → blocking1.9.1+
Priority: -- → P2
Rediffed, and I tried to write tests for the other callers of HasBorder as suggested in comment 6. I wasn't entirely successful. The new 470250-2 reftest tries to test the nsTableCellFrame::BuildDisplayList code that calls HasBorder, but gdb says it never actually goes in there. I have no idea how to write a test for nsFrame::ComputeSimpleTightBounds.
Attachment #354357 - Attachment is obsolete: true
Attachment #356653 - Flags: superreview+
Attachment #356653 - Flags: review+
Attachment #356653 - Flags: approval1.9.1?
Attachment #354357 - Flags: approval1.9.1?
Whiteboard: [needs landing] → [depends on 455364]
Whiteboard: [depends on 455364] → [needs landing]
tagging for checkin, since it looks like 455364 has stuck.
Keywords: checkin-needed
Attachment #356653 - Flags: approval1.9.1?
Comment on attachment 356653 [details] [diff] [review] fix v2: with tests for the table case, sorta [Checkin: See comment 12 & 13] blocker, so canceling a191 request.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Whiteboard: [needs landing] → [needs 191 landing]
Target Milestone: --- → mozilla1.9.2a1
Comment on attachment 356653 [details] [diff] [review] fix v2: with tests for the table case, sorta [Checkin: See comment 12 & 13] http://hg.mozilla.org/releases/mozilla-1.9.1/rev/b8573b63ff87 after fixing context for { patching file layout/reftests/border-image/reftest.list Hunk #1 FAILED at 2 1 out of 1 hunks FAILED }
Attachment #356653 - Attachment description: fix v2: with tests for the table case, sorta → fix v2: with tests for the table case, sorta [Checkin: See comment 12 & 13]
Flags: in-testsuite+
Whiteboard: [needs 191 landing] → [fixed1.9.1b3]
(In reply to comment #13) > http://hg.mozilla.org/releases/mozilla-1.9.1/rev/b8573b63ff87 The tests are failing: this should probably not have landed before bug 455364 ! :-<
I preferred to land bug 455364 and bug 477732, after asking Zack.
verified FIXED on builds: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1pre) Gecko/20090618 Shiretoko/3.5pre ID:20090618042848 and Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1pre) Gecko/20090618 Shiretoko/3.5pre ID:20090618031205 and Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2a1pre) Gecko/20090618 Minefield/3.6a1pre ID:20090618031143
Status: RESOLVED → VERIFIED
Component: Layout: View Rendering → Layout: Web Painting
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: