Closed
Bug 1078337
Opened 10 years ago
Closed 10 years ago
Line next to find button in menu
Categories
(Core :: Graphics: ImageLib, defect)
Tracking
()
RESOLVED
FIXED
mozilla36
Tracking | Status | |
---|---|---|
firefox34 | --- | unaffected |
firefox35 | + | fixed |
firefox36 | --- | fixed |
People
(Reporter: wesj, Assigned: mattwoodrow)
References
Details
(Keywords: regression)
Attachments
(2 files, 2 obsolete files)
37.11 KB,
image/png
|
Details | |
6.37 KB,
patch
|
seth
:
review+
lsblakk
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
Theres a tiny thin line next to the find button.
Comment 1•10 years ago
|
||
If this regressed recently, it's probably due to bug 1044702.
Comment 2•10 years ago
|
||
I can reproduce this, and yes, I'm fairly sure this is a recent regression.
Component: Theme → Untriaged
Keywords: regression,
regressionwindow-wanted
Product: Firefox → Core
Version: unspecified → Trunk
Comment 3•10 years ago
|
||
Comment 4•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=a61ddc0c62fd&tochange=6fb508e952b1
6fb508e952b1 Matt Woodrow — Bug 1070722 - Use the imagelib high quality downscaler on OSX instead of the quartz one. r=jrmuizel
Comment 5•10 years ago
|
||
[Tracking Requested - why for this release]: regression
tracking-firefox35:
--- → ?
Updated•10 years ago
|
Assignee | ||
Comment 6•10 years ago
|
||
I had a chat with seth about this.
It looks like we're using a spritesheet for these images, and the xul image box has crazy subpixel positioning and sizing.
The combination of these things mean that we end up resizing the image slightly, and sampling from some of the pixels of the next image in the sheet, leaving these grey lines.
The best solution is probably just to change the spritesheet to have slightly larger gaps between images.
Assignee | ||
Updated•10 years ago
|
Component: Untriaged → Theme
Product: Core → Firefox
Comment 7•10 years ago
|
||
(In reply to Matt Woodrow (:mattwoodrow) from comment #6)
> I had a chat with seth about this.
>
> It looks like we're using a spritesheet for these images, and the xul image
> box has crazy subpixel positioning and sizing.
>
> The combination of these things mean that we end up resizing the image
> slightly, and sampling from some of the pixels of the next image in the
> sheet, leaving these grey lines.
>
> The best solution is probably just to change the spritesheet to have
> slightly larger gaps between images.
That doesn't sound right at all. We should be able to specify exactly the area we need. Are you saying we're doing this incorrectly? Or is Gecko not doing what it's being told?
Flags: needinfo?(seth)
Flags: needinfo?(matt.woodrow)
Comment 8•10 years ago
|
||
Concurring with Dão, we should be able to specify the region and have it "just work". It's not clear to me why the positioning or sizing of the box even matters - we specify the image file and a source region in that image file, and that's what it should use for rendering the background, nothing outside that region (irrespective of the size, antialiasing or otherwise of the box that we happen to use the background image on).
I'd also note that updating all our sprites across platforms and updating all the image regions in the CSS for those sprites would be a considerable task, likely with fallout and regressions, that I wouldn't really want to have to land with less than a week to go until uplift...
Assignee | ||
Comment 9•10 years ago
|
||
Ah, I didn't realize that the xul imagebox element let you explicitly specify a subrect to use. That's nice, and makes it more likely a gecko bug.
Component: Theme → ImageLib
Flags: needinfo?(matt.woodrow)
Product: Firefox → Core
Assignee | ||
Comment 10•10 years ago
|
||
Looks like we basically entirely ignore the source rect that xul is specifying. We use it to create an ClippedImage, and then don't use that.
This seems to work, what do you think seth?
Assignee: nobody → matt.woodrow
Attachment #8502361 -
Flags: review?(seth)
Assignee | ||
Comment 11•10 years ago
|
||
seth, I also notice that ClippedImage won't take advantage of source clipping through Moz2D. Is there a plan to change that?
Updated•10 years ago
|
Flags: needinfo?(seth)
Comment 12•10 years ago
|
||
Comment on attachment 8502361 [details] [diff] [review]
Use the source rect
Review of attachment 8502361 [details] [diff] [review]:
-----------------------------------------------------------------
Oh wow, facepalm. Thanks for tracking this down.
Attachment #8502361 -
Flags: review?(seth) → review+
Comment 13•10 years ago
|
||
(In reply to Matt Woodrow (:mattwoodrow) from comment #11)
> seth, I also notice that ClippedImage won't take advantage of source
> clipping through Moz2D. Is there a plan to change that?
We definitely should change that. I have some questions before I make the change, so I'll hold off on filing the bug until we can talk and I know exactly what bug to file.
Assignee | ||
Comment 14•10 years ago
|
||
Comment 15•10 years ago
|
||
Backed out for reftest failure and mochitest-bc crashes. Please make sure this is green on Try before pushing again. Especially given that this is the weekend before the uplift and tree closures and bustage can be rather disruptive.
https://hg.mozilla.org/integration/mozilla-inbound/rev/f547cf19d104
https://treeherder.mozilla.org/ui/logviewer.html#?job_id=2948117&repo=mozilla-inbound
https://treeherder.mozilla.org/ui/logviewer.html#?job_id=2947705&repo=mozilla-inbound
Assignee | ||
Comment 16•10 years ago
|
||
This version passes try.
Attachment #8504472 -
Flags: review?(seth)
Assignee | ||
Updated•10 years ago
|
Attachment #8502361 -
Attachment is obsolete: true
Comment 17•10 years ago
|
||
Comment on attachment 8504472 [details] [diff] [review]
Use the source rect v2
Review of attachment 8504472 [details] [diff] [review]:
-----------------------------------------------------------------
This approach is an option if we can't do better, but I have the feeling this can be made cleaner.
Specifically...
::: layout/base/nsLayoutUtils.h
@@ +1599,5 @@
> + * aImageSourceArea and the original image size.
> + */
> + static nsRect GetClippedImageDestination(const nsIntSize& aWholeImageSize,
> + const nsRect& aImageSourceArea,
> + const nsRect& aDestArea);
I'd prefer not to add this. Can't we get the same effect by munging |source| and |imageSize| in |DrawSingleImage|? Both of those variables only exist to serve as arguments for |GetWholeImageDestination|, so it's fine to adjust them as needed to make |GetWholeImageDestination| happy.
Attachment #8504472 -
Flags: review?(seth) → review-
Assignee | ||
Comment 18•10 years ago
|
||
Ok, how about this then?
Attachment #8504472 -
Attachment is obsolete: true
Attachment #8508475 -
Flags: review?(seth)
Comment 19•10 years ago
|
||
Comment on attachment 8508475 [details] [diff] [review]
Use the source rect v3
Review of attachment 8508475 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks, this looks good!
::: layout/base/nsLayoutUtils.cpp
@@ +5328,5 @@
> + imageSize.width*appUnitsPerCSSPixel,
> + imageSize.height*appUnitsPerCSSPixel);
> + nsRect clippedSource = imageRect.Intersect(source);
> +
> + source -= clippedSource.TopLeft();
You only need to do this clipping if |aSourceArea| is non-null, so you could move this into the |if (aSourceArea)| block and change the value of |imageSize| directly. The common case is that |aSourceArea| is null (I think only XUL uses this parameter?) so it might be nice to move this work out of the main path.
Attachment #8508475 -
Flags: review?(seth) → review+
Assignee | ||
Comment 20•10 years ago
|
||
Comment 21•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
Comment 23•10 years ago
|
||
I think this should be uplifted to aurora because of bug 1077997
Comment 24•10 years ago
|
||
Matt, can this be uplifted to aurora please? See comment 23
Flags: needinfo?(matt.woodrow)
Assignee | ||
Comment 25•10 years ago
|
||
Comment on attachment 8508475 [details] [diff] [review]
Use the source rect v3
Approval Request Comment
[Feature/regressing bug #]: Bug 1044702.
[User impact if declined]: Incorrect clipping of some XUL images, visible lines shown at edges.
[Describe test coverage new/current, TBPL]: Tested manually.
[Risks and why]: Low risk, fairly simple patch in the end, only affects XUL.
[String/UUID change made/needed]: None.
Flags: needinfo?(matt.woodrow)
Attachment #8508475 -
Flags: approval-mozilla-aurora?
Updated•10 years ago
|
Attachment #8508475 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Updated•10 years ago
|
status-firefox34:
--- → unaffected
status-firefox36:
--- → fixed
Comment 26•10 years ago
|
||
Updated•10 years ago
|
QA Whiteboard: [good first verify]
You need to log in
before you can comment on or make changes to this bug.
Description
•