01:35:38 https://brr.fyi/posts/laundry-at-the-end-of-the-world uh... why the images appear backwards here? 01:35:46 (images render fine on FF91ESR) 01:36:09 https://brr.fyi/ in fact, many of the photos on this blog render upside down in SeaMonkey 07:44:08 I smell CSS 07:44:16 given that "view image" renders them correctly 07:47:30 ... no, that's at the http level, no CSS involved 10:49:12 same, pictures render upside down in pale moon 12:32:09 franstam: Ibet thisis pictures taken froma cellphone and depending on wich orientationyou had the phone in the actual image might be upside down but is something in the metadata for the image file that tells you how to l it to account for this we seem to incorrectly ignoring. 12:33:39 franstam: I bet this is pictures taken from a cellphone and depending on which orientation you had the phone in the actual image might be upside down but is something in the metadata for the image file that tells you how to account for this we seem to be incorrectly ignoring. 12:34:25 Mind you, not all pics render upside-down, just some (and yes, the blog author is using a cellphone, but from the screenshots I've seen it's not an iPhone) 12:35:09 but weirdly enough, Modern Browsers™ do render them OK, so may be some EXIF shenanigans then? 12:35:49 so pictures taken with the camera on top if you havethe phone hoizontal will be right side up if camera is on the bottom might be upside down and anything using the front facing camera will be mirror imaged 12:36:58 to,mman does not matter depens on which way you hold the camera if you have the camera upside down then pic will be upside dows but I bet there is meata data that says image should be dliped vertically which we ignore. 12:38:05 I should bring that theory to test with my cellphones, would be a interesting experiment indeed 12:38:13 if camera is in top left when you take tha shot I bet it displays correclty if the camera is in bottom right I bet it dispalys upside down 12:38:19 take photos, load on SeaMonkey, check 12:41:20 my guess is also that the person whose blog thes pictures are on is left handed bcause he takes pictures woth the pne on bottom firght becuase that makes the wcontrols be on the left. 12:42:20 if u download the pics lemme check the exif info is that possible? 12:42:50 i am just guessing here I would have no idea what to look for 12:43:55 but i know i can take pictures with my phone in what I would consider to be upside down but the phone reveres the image so it looks ok when I take the picture but I bet those would be what we render upside down 12:44:25 WG9s if you pick the orginal url not upside down so something website 12:44:36 there must be something we are ignoring that says invert this image verticaly for display 12:45:10 aha.... i download the image, and disable auto image flip using exif info, and the image is upside down 12:45:19 lol seems we are onto something here 12:45:34 frg_Away: but then that does not esplain wy it displays correctly with latest firefox. 12:46:06 so seems issue is we do not support auto image flip 12:46:47 https://brr.fyi/media/wastewater-plant/wastewater-plant-icon.jpg this one seems to be edited and yet it's flipped 12:46:58 download, open with a standalone viewer, renders OK 12:47:45 EXIF metadata says: Orientation: down-right 12:49:30 ...my Alcatel cellphone doesn't tag orientation 12:49:52 tomman: so seems if camera is down right image shows upside down so we ignore the metadata orientation 12:50:50 it seems so 12:51:04 that means sometime in the future, Mozilla started obeying EXIF orientation metadata 12:51:06 probably a later mozilla patch we need to take to fix this or perhaps a later third party image decoder 12:52:09 OK, my Redmi Note 11 indeed uses EXIF orientation tags 12:52:19 a normal image says Top-left 12:52:35 so I guess we do things fine if camera is at top edge of the orintation we used to take the picture otherwise it is shown incorrectly 12:54:59 and for things taken on an iphone for videos issue is if camera is on the top volume controls are on the bottom so perhaps inaccessible during the video because of camera stand. 12:55:57 so if you orient the phone so you can get to audio controls the entire video might end up upside-down. 13:08:47 aAAAAAAAAAAAAAAAAAA 13:23:45 Thank you Beela for your input! 13:25:38 https://www.clicktorelease.com/tmp/texImage2D/ 13:25:40 Bug 1367251 ? 14:21:41 oooh, it's SeaFox indeed 14:22:19 it enforces a margin and aligns images to the left 14:22:47 Old Default Image Style not only counters that, it also let you customize backgrounds, and even abuse it to inject custom CSS 14:23:47 and it works fine except that sites enforcing CSP break it, and that addon has been unmaintained for nearly 8 years 14:25:06 and from SeaFox addon page: 14:25:08 "- Old Default Image Style: Sea Fox uses a different method to restore the old top level images look." 14:27:00 doesn't help that Sea Fox development also ended years ago 14:28:29 options: either fix Old Default Image Style to deal with CSP crap (I really like my margin and white backgrounds!), or fix Sea Fox to actually center images (also OK) 15:10:27 ...found it 15:10:34 it's not even JavaScript but CSS! 15:11:05 seafox/chrome/skin/TopLevelImageDocument.css 15:11:48 that's the one that fixes the background color, adds the margin... and forces the stupid left alignment 15:13:24 now I have two possible courses: 1) kill those and rebuild the addon, or 2) counter a hack with another hack: what about userChrome.css? 15:23:13 oh, it's not userChrome but userContent.css, D'OH! 15:32:51 tomman: 3) make an addon that overrides TopLevelImageDocument.css with your hacks (or perhaps that's 1)?) 15:33:31 I'm kinda close to it 15:34:14 if I disable a couple rules (text-align:right, position: static), I get centered images but lose the margin I want 15:34:17 oh, it's resource://, not chrome://, so IIRC not overridable :-( 15:34:39 how's the margin you want? 15:35:31 8px is enough 15:35:44 wat, I can't override it with userContent? 15:35:58 not even if I use !reallyImportantAndIMeanIt? :D 15:36:26 no, I was saying that for an extension 15:37:01 chrome.manifest has an override directive, but it doesn't work with resource:// 15:37:13 in the case of Sea Fox, it overrides resource://gre/res/TopLevelImageDocument.css with chrome://global/skin/media/TopLevelImageDocument.css 15:38:02 the naive option would be to zap the contents of the latter 15:40:01 injecting CSS elsewhere requires dealing with CSP crapola 15:40:07 but... Palefill does deal with CSP crapola 15:41:38 override chrome://global/skin/media/TopLevelImageDocument.css chrome://seafox/skin/TopLevelImageDocument.css 15:41:57 (from the seafox chrome.manifest) 15:42:45 (that's a different file than the resource: one, isn't it?) 15:47:42 gah, this CSP junk is way over my paygrade :D 15:48:31 (also Palefill deals with SCRIPTS, not stylesheets) 15:50:06 but really the proper way would be to fix Old Default Image Style, as it actually allows for customizing stuff 15:53:32 And here comes to Ye Olde Centering Junk On CSS aka "Welcome to Hell" 15:53:53 you're supposed to place your element to be centered (that is our ) inside a
or something else 15:54:29 a inside a won't do because HTML GAAAAH! 15:55:35 I can get my image centered with just position:absolute, margin: auto, and top/left/right/bottom: 0, but lose the margin 15:57:32 with padding I can get the margin and keep things centered, but then I introudce unwanted scrollbars 15:57:46 at this stage it has become your traditional CSS challenge 16:02:24 ...and now I've just discovered the joys of CSS flexbox! 17:10:19 why aren't all the directory provider directories simply mapped to resource uris.. that way simple read doesn't require using the dir provider service 17:10:49 i mean other than the issue with the resource uri 17:11:00 but they could map it into the chrome url as well 20:18:16 GAAAAH CSS! 20:18:29 I can center my image perfectly in so many ways, but not with a border 20:18:55 either at least one of the borders gets eaten, or I get scrollbars instead of image+border fitting to height 20:19:23 why the W3C hates centering stuff so hard?! This shit is not new, y'know... 20:20:01 Anyway it seems I gonna give up on the margin idea, as I value more centering than padding/margin/border/whatever 20:24:12 any chance you could set margin and border on body, not img? 20:25:56 ah, I see, that probably is only possible without position: auto 20:27:31 tomman: what about box-sizing: border-box? https://developer.mozilla.org/en-US/docs/Web/CSS/box-sizing 20:28:21 seems to get rid at least of the scrollbars when I use width: 100%; height: 100% 20:35:38 njsg: OK, border-box seems to indeed help! 20:38:26 So basically here is what I got so far: 20:38:43 1) forget about messing with , no CSS flex, no width/height set 20:40:16 2) Leave the default centering stuff on built-in TopLevelImageDocument.css (text-align: center; position: absolute; margin: auto; top/right/left/bottom: 0) since that actually works for centering 20:40:42 3) Add a fake transparent border to and set box-sizing: border-box; 20:42:08 now need to figure out where to place all this: either hijack Sea Fox's TopLevelImageDocument.css (since it has some weird ideas there), or abuse !ReallyImportantAndIMeanItOrElseTaiwanBlowsUp on userContent.css 20:55:30 had to go the way of editing Sea Fox's TopLevelImageDocument, of course 20:55:49 doing stuff the userContent.css would break the Internet in very... artistic ways 20:56:23 now I get my centered images plus margins, save for a marginal case *ba-dum-tss* 20:56:51 if the image is ALMOST the size of the viewport, the browser won't let me zoom it out or in at all 20:57:23 and I lose like half of my top border (I ended with 16px, lose like 8 pixels) for whatever weird reason 20:57:36 for all other cases it works OK 20:58:44 I still insist that the proper way would be fixing Old Document Image Style to cope with CSP, but that's a hell I'm not THAT interested to get into 20:58:55 at least not without good help, and a exorcism or two! 21:00:37 Regarding the flipped images on brr.fyi: while messing with my image margin stuff, I noticed something 21:01:45 if the image is opened in a standalone tab, browser applies image-orientation: from-image (from resource://gre/res/TopLevelImageDocument.css) 21:02:04 but on the blogpost that rule appears nowhere on the default stylesheets 21:02:07 yes, the default used to be something else and was changed to be from-image in bug 1607667 21:02:43 "Chrome is shipping the change to make from-image the initial value in Chrome 81 https://twitter.com/argyleink/status/1214616780200562690 so now may be a good time for us to make that change too." 21:02:44 not sure it's that, could be something else, but at least sounds like it could be that 21:02:48 the very first comment depresses me 21:03:19 one moment 21:03:23 there was also a site compatibility note that now links to a dead website 21:03:57 I'll quote again «The only consolation is that, someday, the spec will become the standard and stop changing.» from http://marc.merlins.org/htmlearn/netscape/tables.html 21:04:22 "It turned out Chrome 81 already shipped this change (and broke Slack) so there’s no reason for Mozilla to stop shipping." 21:04:39 heh, a change broke broken web junk, lovely~ 21:05:00 I guess I'll be adding image-orientation: from-image; to my userContent.css in the meanwhile~ 21:08:34 if that is the problem, then img {image-orientation: from-image;} in userContent.css would make sense as a workaround. I suppose there are cases where it won't be enough (image-orientation: initial?), but hopefully that's not something used often? 21:09:51 What site would rely on different defaults? 21:10:21 at least I'm not enforcing it via !important, so if a site for whatever weirdass reason wants to flip images on its own, so be it 21:10:51 in any case this was a very weird issue that nobody noticed because it's so niche... 21:19:52 https://brr.fyi/posts/credit-card-shenanigans no, THIS is a niche bug :D 21:20:58 :-D 21:22:24 try explaining that to your bank, that Antarctica are like many separate countries on the same road 21:24:57 wonder if Wells Fargo still run that couple ATMs down there 21:26:03 shouldn't really be a far-fetched idea, they probably already need to have something for bank card transactions across borders, a question is why they didn't have that in this case, but I'm guessing it was too much trouble and this was the solution people running services there could deploy 21:44:15 https://bugzilla.mozilla.org/show_bug.cgi?id=298619 21:44:42 http://softov.org/oria/image-orientation/index.html 21:51:30 the only one that works is the with explicit image-orientation: from-image; (and in my case, the very first after adding that rule to userContent.css) 21:51:47 everything else ignores both EXIF metadata _and_ the rule, yay~! 21:52:31 FF91ESR does everything right, as expected 21:54:39 "I really think producing JPEGs that use the EXIF orientation is a bad idea. And I worry that importing EXIF orientation as a Web feature adds complexity and will create more problems." 21:54:52 tomman: i want you to think about your statement that esr91 does everything right 21:54:54 that ship has sailed the day Apple and camera OEMs started using it, dude 21:58:47 tomman: could that be bug 1650715? 21:58:58 the background-image, not Apple 22:06:55 njsg: this is one of those cases where metadata actually matters 22:07:25 if the metadata says "the image is flipped, unflip it when rendering", then the user agent is supposed to unflip it 22:08:20 I took a photo with my camera, I don't care how the camera stores it as long as it is in standards-compliant formats (and EXIF metadata is clearly part of it), hence I see no point to argument that 22:08:31 display my photo as intended, full stop. 22:09:39 if your tools produce broken images, fix your tools, don't impose more brokenness on web browsers! 22:10:23 at least this was one of the rare cases where the answer isn't "Chrome did it first" :D 22:11:14 no, wait, someone at Google figured out that his/her/its iPhone were generating images that "flipped" on Chrome and Apple sure as hell won't "fix" what it isn't broken 23:18:46 Meanwhile, at Stately Wayne Manor..