Closed
Bug 805885
Opened 12 years ago
Closed 12 years ago
Set -moz-image-region on the .social-notification-icon-image class
Categories
(Firefox Graveyard :: SocialAPI, defect)
Firefox Graveyard
SocialAPI
Tracking
(firefox17+ fixed, firefox18+ fixed, firefox19 fixed)
RESOLVED
FIXED
Firefox 19
People
(Reporter: jaws, Assigned: jaws)
Details
(Whiteboard: [Fx17][qa-])
Attachments
(1 file)
3.31 KB,
patch
|
Felipe
:
review+
Gavin
:
approval-mozilla-aurora+
Gavin
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
+++ This bug was initially created as a clone of Bug #804068 +++ The .social-notification-icon-image class uses width:16px;height:16px; to try to restrict the size of the notification icons. It should use -moz-image-region:rect(0 16px 16px 0); instead.
Assignee | ||
Comment 1•12 years ago
|
||
For some reason when I set this style on the element, the buttons flicker when mousing over them. I haven't figured out why yet.
Assignee | ||
Comment 2•12 years ago
|
||
This patch uses -moz-image-region to restrict the icon size of the provider icons to 16x16 px. I had to set .style.listStyleImage on the element instead of using .src to fix the flickering when hovering over the elements. I also increased the vertical padding on the buttons in winstripe since they didn't have enough padding and the button heights were two pixels too tall.
Assignee | ||
Comment 3•12 years ago
|
||
Note that when this patch lands, the Facebook icons will be clipped on the bottom and right, since they are currently sending us 18x18 pixel icons (each has a 1px transparent border). I removed this 1px border locally and confirmed that the icons will look good once Facebook fixes the icons on their side (which they can do at any point in the future since they are web resources and aren't shipped with Firefox).
Comment 4•12 years ago
|
||
Comment on attachment 675930 [details] [diff] [review] Patch Review of attachment 675930 [details] [diff] [review]: ----------------------------------------------------------------- I don't think this is sufficient, because it still allows images that are smaller than 16x16 to mess up our layout.
Assignee | ||
Comment 5•12 years ago
|
||
(In reply to Frank Yan (:fryn) from comment #4) > I don't think this is sufficient, because it still allows images that are > smaller than 16x16 to mess up our layout. I tested this out with a local 10x10 image for all icons and it didn't affect the layout.
Assignee | ||
Updated•12 years ago
|
Attachment #675930 -
Flags: review?(felipc)
Comment 6•12 years ago
|
||
Comment on attachment 675930 [details] [diff] [review] Patch Review of attachment 675930 [details] [diff] [review]: ----------------------------------------------------------------- ::: browser/base/content/browser-social.js @@ +812,5 @@ > // Only update the value attribute if it has changed to reduce layout changes. > if (!label.hasAttribute("value") || label.getAttribute("value") != labelValue) > label.setAttribute("value", labelValue); > > + image.style.listStyleImage = "url(" + icon.iconURL + ")"; = 'url("' + encodeURI(icon.iconURL) + '")';
Attachment #675930 -
Flags: review?(felipc) → review+
Comment 7•12 years ago
|
||
(In reply to Jared Wein [:jaws] from comment #2) > I had to set .style.listStyleImage on the element instead > of using .src to fix the flickering when hovering over the elements. Can you elaborate? Why would using .src cause flickering?
Assignee | ||
Comment 8•12 years ago
|
||
I'm not sure, it only happens when mousing in and out of the icon. My guess is there is some contention between the default .toolbarbutton-icon list-style-image of Toolbar.png and the .src property. It's not so much flickering, as it is the image disappearing momentarily and collapsing the width of the button.
Comment 9•12 years ago
|
||
Comment on attachment 675930 [details] [diff] [review] Patch Review of attachment 675930 [details] [diff] [review]: ----------------------------------------------------------------- (In reply to Jared Wein [:jaws] from comment #5) > (In reply to Frank Yan (:fryn) from comment #4) > > I don't think this is sufficient, because it still allows images that are > > smaller than 16x16 to mess up our layout. > > I tested this out with a local 10x10 image for all icons and it didn't > affect the layout. Okay then. I'd like to know how exactly src behaves differently from list-style-image that this patch can fix the problem, but I'll defer to Felipe. Good catch on the encodeURI, btw.
Attachment #675930 -
Flags: review?(fryn)
Comment 10•12 years ago
|
||
(In reply to Jared Wein [:jaws] from comment #0) > The .social-notification-icon-image class uses width:16px;height:16px; to > try to restrict the size of the notification icons. It should use > -moz-image-region:rect(0 16px 16px 0); instead. If the icon is too large, why is cutting it better than scaling it? I don't understand this bug.
Comment 11•12 years ago
|
||
Scaling images is inefficient and generally results in worse quality. By truncating the image, we make the issue of improperly sized icons immediately obvious to people developing a provider, so they won't ship that to users, ideally. A provider accidentally shipping an improperly sized icon to some users but not all seems improbable, but if that ends up being a problem, we can revert this change.
Comment 12•12 years ago
|
||
Comment on attachment 675930 [details] [diff] [review] Patch [Triage Comment] a=me for the first social release
Attachment #675930 -
Flags: approval-mozilla-beta+
Attachment #675930 -
Flags: approval-mozilla-aurora+
Comment 13•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/37412cc39dde
Target Milestone: --- → Firefox 19
Updated•12 years ago
|
tracking-firefox17:
--- → +
tracking-firefox18:
--- → +
Comment 15•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/37412cc39dde
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Comment 16•12 years ago
|
||
https://hg.mozilla.org/releases/mozilla-aurora/rev/18d116f5ceda
status-firefox19:
--- → fixed
Comment 17•12 years ago
|
||
Please remove [qa-] whiteboard tag and add verifyme keyword if there's some QA testing needed here. Otherwise we will skip verification.
Whiteboard: [Fx17] → [Fx17][qa-]
Updated•5 years ago
|
Product: Firefox → Firefox Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•