Closed
Bug 1275966
Opened 8 years ago
Closed 8 years ago
background-repeat:space doesn't fit an image that fits exactly
Categories
(Core :: Web Painting, defect)
Core
Web Painting
Tracking
()
RESOLVED
FIXED
mozilla49
Tracking | Status | |
---|---|---|
firefox49 | --- | fixed |
People
(Reporter: dbaron, Assigned: ethlin)
References
Details
(Keywords: dev-doc-complete)
Attachments
(4 files, 2 obsolete files)
525 bytes,
text/html
|
Details | |
3.14 KB,
patch
|
mstange
:
review+
|
Details | Diff | Splinter Review |
7.57 KB,
patch
|
mstange
:
review+
|
Details | Diff | Splinter Review |
10.83 KB,
image/png
|
Details |
background-repeat: space doesn't fit an image that fits exactly. In the attached testcase, you should see the image tiled 4 times horizontally (with spacing) and 2 times vertically (without spacing). Firefox incorrectly shows only 1 vertical tile. Chromium and Edge get it correct.
Flags: needinfo?(ethlin)
Reporter | ||
Comment 1•8 years ago
|
||
Reporter | ||
Updated•8 years ago
|
Attachment #8756918 -
Attachment mime type: text/plain → text/html
Updated•8 years ago
|
Keywords: dev-doc-needed
Assignee | ||
Comment 2•8 years ago
|
||
I will write a test case for it.
Assignee: nobody → ethlin
Status: NEW → ASSIGNED
Flags: needinfo?(ethlin)
Assignee | ||
Updated•8 years ago
|
Attachment #8757102 -
Attachment is obsolete: true
Assignee | ||
Comment 3•8 years ago
|
||
Comment 4•8 years ago
|
||
I'd like the repeat size to keep its meaning. You could add a bool outparam to ComputeSpacedRepeatSize that determines whether we should repeat in that dimension, and then you set the ExtendMode to the right value based on that, and also check the extend mode in nsLayoutUtils::DrawBackgroundImage.
Assignee | ||
Comment 5•8 years ago
|
||
(In reply to Markus Stange [:mstange] from comment #4) > I'd like the repeat size to keep its meaning. You could add a bool outparam > to ComputeSpacedRepeatSize that determines whether we should repeat in that > dimension, and then you set the ExtendMode to the right value based on that, > and also check the extend mode in nsLayoutUtils::DrawBackgroundImage. Okay, that wip is just one possible way to fix it. I will add a bool outparam for that.
Assignee | ||
Comment 6•8 years ago
|
||
Add a bool parameter to determine whether the image is repeated.
Attachment #8757111 -
Attachment is obsolete: true
Attachment #8757631 -
Flags: review?(mstange)
Assignee | ||
Comment 7•8 years ago
|
||
I added two test cases to check if space works fine while the image x or y fits exactly.
Attachment #8757632 -
Flags: review?(mstange)
Updated•8 years ago
|
Attachment #8757631 -
Flags: review?(mstange) → review+
Comment 8•8 years ago
|
||
Comment on attachment 8757632 [details] [diff] [review] Part2. Add reftests. Review of attachment 8757632 [details] [diff] [review]: ----------------------------------------------------------------- Did you forget to refresh this patch before you attached it? The tests don't look like they're testing this bug, and I think both reftests are the same.
Attachment #8757632 -
Flags: review?(mstange)
Assignee | ||
Comment 9•8 years ago
|
||
(In reply to Markus Stange [:mstange] from comment #8) > Comment on attachment 8757632 [details] [diff] [review] > Part2. Add reftests. > > Review of attachment 8757632 [details] [diff] [review]: > ----------------------------------------------------------------- > > Did you forget to refresh this patch before you attached it? The tests don't > look like they're testing this bug, and I think both reftests are the same. I think the patch should be correct. For "background-repeat-space-9-ref.html", the background position size is 106x96, and the image is 32x32, so the image fix exactly on Y direction. And "background-repeat-space-10-ref.html" size is 96x106, which is for testing X direction. I will upload the snapshot of the test.
Comment 10•8 years ago
|
||
Oh, nevermind then.
Updated•8 years ago
|
Attachment #8757632 -
Flags: review+
Assignee | ||
Comment 11•8 years ago
|
||
This is the before/after result of background-repeat-space-10-ref.html.
Assignee | ||
Comment 12•8 years ago
|
||
try server: https://treeherder.mozilla.org/#/jobs?repo=try&revision=a8179e3d5306&selectedJob=21699567
Assignee | ||
Updated•8 years ago
|
Keywords: checkin-needed
Comment 13•8 years ago
|
||
Pushed by cbook@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/25fb10028068 Part 1. Fix wrong rendering of background-repeat:space. r=mstange https://hg.mozilla.org/integration/mozilla-inbound/rev/005a02a60fbd Part 2. Add reftests for background-repeat: space. r=mstange
Keywords: checkin-needed
Comment 14•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/25fb10028068 https://hg.mozilla.org/mozilla-central/rev/005a02a60fbd
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox49:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
Updated•8 years ago
|
Comment 15•8 years ago
|
||
I've removed the note about this bug from https://developer.mozilla.org/en-US/docs/Web/CSS/background-repeat. Sebastian
Keywords: dev-doc-needed → dev-doc-complete
Updated•6 years ago
|
Component: Layout: View Rendering → Layout: Web Painting
You need to log in
before you can comment on or make changes to this bug.
Description
•