Issue metadata
Sign in to add a comment
|
Strikethrough style does not render in Omnibox in iOS 10.3 |
||||||||||||||||||||||||
Issue descriptionApp Version: 57.0.2987.96 beta iOS Version: 10.3 only Device: iPhone7 URL: https://expired.badssl.com Steps to reproduce: 1. Launch Google Chrome 2. Navigate to https://expired.badssl.com Observed results: Observe that https in the url in not in strikethrough format Note: this is only in iOS10.3 latest beta, working fine with iOS10.1.1, 10.2.1 versions. Expected results: https text should be in strikethrough format Number of times you were able to reproduce: 5/5 Bug reproducible after clean install: Yes Bug reproducible after clearing cache and cookies: Yes Bug reproducible on Chrome Mobile on Android: NA Bug reproducible on Safari/Firefox: Firefox: NA, Safari: NA Bug reproducible on current stable build (App Version, iOS Version): M56 Yes Bug reproducible on the current beta channel build (App Version, iOS Version): M57 Yes Link to video/image: https://drive.google.com/file/d/0B-xmXLQhjeKuamNCdTd3SUF0Rk0/view
,
Mar 13 2017
Alright, I verified this with Sharon's phone in person. The relevant code [1] exactly matches the Mac code [2]. I don't Some theories: 1. Bug in the iOS beta. 2. Changes in the iOS beta lead to a subtle code path change – seems unlikely, since the icon and color are correct *unless* we're accidentally getting the wrong dark mode value. [3] 2. We're using the API "wrong". justincohen@, eugenebut@: Any chance you know what might cause our code to lose the strikethrough behaviour? [1] https://cs.chromium.org/chromium/src/ios/chrome/browser/ui/omnibox/omnibox_view_ios.mm?q=%22addAttribute:NSStrikethroughStyleAttributeName%22&sq=package:chromium&l=671&dr=C [2] https://cs.chromium.org/chromium/src/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm?q=%22addAttribute:NSStrikethroughStyleAttributeName%22&sq=package:chromium&l=570&dr=C [3] https://cs.chromium.org/chromium/src/ios/chrome/browser/ui/omnibox/omnibox_view_ios.mm?type=cs&q=security_state::DANGEROUS&l=637
,
Mar 13 2017
Adding rohit for Omnibox
,
Mar 15 2017
Does this repro in Chrome 58.0.3029.6 or later? I recently did some significant refactoring of the code in https://codereview.chromium.org/2641003002/ (which landed in 59 and got ported to 58). Now the iOS code matches the Mac code. Prior to that, they were different.
,
Mar 15 2017
(badssl.com is not reachable at the moment now) Tested with url: https://tv.eurosport.com I can still reproduce this on M59.0.3042.0 canary and 58.0.3029.19 beta
,
Mar 15 2017
This was a bug in iOS8 and looks like it may have regressed again in 10.3 per: https://forums.developer.apple.com/thread/72643 This bug mentions and shows "interstitials", but is the problem limited to the interstitial, or do you see the same bug if you proceed through the interstitial to the actual page?
,
Mar 15 2017
Both https://forums.developer.apple.com/thread/72643 and http://www.nicnocquee.com/ios/2014/09/22/nsattributedstring-with-nsstrikethroughstyleattributename-bug-in-ios-8.html seem to suggest the same workaround: "To fix this you just have to assign the strikethrough attribute, NSUnderlineStyleNone to the whole string on initialization."
,
Mar 15 2017
its the same problem proceed to the page as well. https://drive.google.com/file/d/0B-xmXLQhjeKuUlRYdVlMRDlPMTg/view
,
Mar 15 2017
,
Mar 15 2017
Thanks for finding those, elawrence@! rohitrao@, could you handle the fix for this (or find someone)? I can try it if no one can, but I don't have the appropriate SDK and would prefer to avoid the overhead of installing and switching SDKs.
,
Mar 15 2017
I let the bots do my last iOS fix, but I have no idea how to test the resulting binaries. That said, given this is a non critical bug on a beta OS and the regression has a radar filed against it, does it make sense to try to workaround it if we believe Apple will fix their code before 10.3 ships?
,
Mar 17 2017
The regression was not fixed by iOS 10.3 Beta 7
,
Mar 29 2017
This regression was not fixed in the final version of iOS 10.3
,
Mar 29 2017
I have a Bling checkout, but my simulator only goes up to 10.2; what's the right way for me to upgrade to 10.3?
,
Mar 29 2017
Xcode 8.3 should have 10.3 Simulator
,
Mar 30 2017
Bug still exists in iOS 10.3.2 Beta 1.
,
Mar 30 2017
So the work here is to update OmniboxViewIOS::ApplyTextAttributes with a call like this: https://cs.chromium.org/chromium/src/ios/chrome/browser/ui/omnibox/omnibox_view_ios.mm?type=cs&q=security_state::DANGEROUS&l=692 + // Add an attribute to allow strikethough to apply later. crbug.com/699702 + [as addAttribute:NSStrikethroughStyleAttributeName + value: [NSNumber numberWithInteger:NSUnderlineStyleNone] + range: NSMakeRange(0, [as length]]; + // Cache a pointer to the attributed string to allow the superclass' // virtual method invocations to add attributes.
,
Apr 5 2017
The workaround described in Comment #18 isn't effective on iOS 10.3. Instead, adding a dummy attribute (NSBaselineOffsetAttributeName) with its default value (0) seems to work correctly. https://codereview.chromium.org/2803783002/
,
Apr 6 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2352cecca1d2738c6c6b970708286211c29cf16e commit 2352cecca1d2738c6c6b970708286211c29cf16e Author: elawrence <elawrence@chromium.org> Date: Thu Apr 06 17:11:41 2017 Ensure strikethrough font renders in omnibox on iOS 10.3 iOS 10.3 introduced a regression in rendering of strings with the attribute NSStrikethroughStyleAttributeName applied to a subrange of the string. To workaround this, apply a NSBaselineOffsetAttributeName attribute with its default value of 0. BUG= 699702 TEST=https://expired.badssl.com. Examine https: text in the omnibox, it should have a line through it. Review-Url: https://codereview.chromium.org/2803783002 Cr-Commit-Position: refs/heads/master@{#462519} [modify] https://crrev.com/2352cecca1d2738c6c6b970708286211c29cf16e/ios/chrome/browser/ui/omnibox/omnibox_view_ios.h [modify] https://crrev.com/2352cecca1d2738c6c6b970708286211c29cf16e/ios/chrome/browser/ui/omnibox/omnibox_view_ios.mm
,
Apr 6 2017
Verified in emulator. Waiting to verify in Canary.
,
Apr 11 2017
Verified on iPhone7 on M59.0.3067.0 canary https text is in strikethrough format. Based on comment#17 this bug is still in 10.3.2 beta#1, is there any chance that this is fixed in iOS10.3.2 beta#2? Because I can't repro this bug on M57 stable with iOS10.3.2 beta#2.
,
Apr 11 2017
It looks like the bug is fixed in iOS side10.3.2 beta#2. On M57 stable 10.3.2 beta#1 Issue is reproduced but M57 stable 10.3.2 beta#2 Issue is not reproduced.
,
Apr 11 2017
,
Apr 12 2017
Re: #23-- Yes, Apple appears to have corrected the regression in iOS 10.3.2 Beta #2, so our workaround should be safe to remove at some point after 10.3.2 releases broadly.
,
Apr 12 2017
Where should the removal of this workaround be tracked then? In another bug or here?
,
Apr 13 2017
RE #26: I've filed Issue 711367
,
Apr 13 2017
Thank you! |
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by sczs@chromium.org
, Mar 8 2017Status: Assigned (was: Untriaged)