[iOS] Tapping "Allow Website" on a restricted page does not bring up the keypad
Created attachment 235149 [details] Patch
Comment on attachment 235149 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=235149&action=review r=me > Source/WebCore/platform/mac/ContentFilterMac.mm:250 > + @try { > + if ([getWebFilterEvaluatorClass() conformsToProtocol:@protocol(NSSecureCoding)]) > + contentFilter.m_platformContentFilter = (WebFilterEvaluator *)[unarchiver decodeObjectOfClass:getWebFilterEvaluatorClass() forKey:platformContentFilterKey]; > + return true; > + } @catch (NSException *exception) { Do we really want to return true here if we fall through the if statement? Seems like we'd want something like this: if ([getWebFilterEvaluatorClass() conformsToProtocol:@protocol(NSSecureCoding)]) { contentFilter.m_platformContentFilter = (WebFilterEvaluator *)[unarchiver decodeObjectOfClass:getWebFilterEvaluatorClass() forKey:platformContentFilterKey]; return true; }
(In reply to comment #2) > (From update of attachment 235149 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=235149&action=review > > r=me > > > Source/WebCore/platform/mac/ContentFilterMac.mm:250 > > + @try { > > + if ([getWebFilterEvaluatorClass() conformsToProtocol:@protocol(NSSecureCoding)]) > > + contentFilter.m_platformContentFilter = (WebFilterEvaluator *)[unarchiver decodeObjectOfClass:getWebFilterEvaluatorClass() forKey:platformContentFilterKey]; > > + return true; > > + } @catch (NSException *exception) { > > Do we really want to return true here if we fall through the if statement? Seems like we'd want something like this: > > if ([getWebFilterEvaluatorClass() conformsToProtocol:@protocol(NSSecureCoding)]) { > contentFilter.m_platformContentFilter = (WebFilterEvaluator *)[unarchiver decodeObjectOfClass:getWebFilterEvaluatorClass() forKey:platformContentFilterKey]; > return true; > } I believe we do want to return true, because WebFilterEvaluator not conforming to NSSecureCoding does not represent a failure to decode the message, just that we are running against an older version of the framework implementing that class.
Brady also looked at this and gave me an okay on IRC.
Committed r171252: <http://trac.webkit.org/changeset/171252>
<rdar://problem/17528188>