Commit aefaa7a7 authored by Ewann's avatar Ewann Committed by Commit Bot

[iOS] Fixes TOS tap responding on iOS13

On iOS 13.1 the whole  TOS string  responds to a TAP.
On iOS 13.5, it works as expected.

Bug: 1102996
Change-Id: I8f72200964ed28dad7de52d9029fb14f97725e01
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2336609Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Reviewed-by: default avatarSylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Ewann Pellé <ewannpv@chromium.org>
Cr-Commit-Position: refs/heads/master@{#794938}
parent bab525e8
...@@ -341,7 +341,7 @@ const char kTermsOfServiceUrl[] = "internal://terms-of-service"; ...@@ -341,7 +341,7 @@ const char kTermsOfServiceUrl[] = "internal://terms-of-service";
[self addSubview:self.containerView]; [self addSubview:self.containerView];
[self.containerView addSubview:self.titleLabel]; [self.containerView addSubview:self.titleLabel];
[self.containerView addSubview:self.imageView]; [self.containerView addSubview:self.imageView];
if (@available(iOS 13.0, *)) { if (@available(iOS 13.5, *)) {
[self.containerView addSubview:self.TOSTextView]; [self.containerView addSubview:self.TOSTextView];
} else { } else {
[self.containerView addSubview:self.legacyTOSLabel]; [self.containerView addSubview:self.legacyTOSLabel];
...@@ -361,7 +361,7 @@ const char kTermsOfServiceUrl[] = "internal://terms-of-service"; ...@@ -361,7 +361,7 @@ const char kTermsOfServiceUrl[] = "internal://terms-of-service";
[super layoutSubviews]; [super layoutSubviews];
[self layoutTitleLabel]; [self layoutTitleLabel];
[self layoutImageView]; [self layoutImageView];
if (@available(iOS 13.0, *)) { if (@available(iOS 13.5, *)) {
[self layoutTOSTextView]; [self layoutTOSTextView];
} else { } else {
[self layoutLegacyTOSLabel]; [self layoutLegacyTOSLabel];
...@@ -472,7 +472,7 @@ const char kTermsOfServiceUrl[] = "internal://terms-of-service"; ...@@ -472,7 +472,7 @@ const char kTermsOfServiceUrl[] = "internal://terms-of-service";
kOptInLabelPadding[[self heightSizeClassIdiom]]; kOptInLabelPadding[[self heightSizeClassIdiom]];
CGFloat optInLabelOriginX = CGFloat optInLabelOriginX =
base::i18n::IsRTL() ? 0.0f : optInLabelSidePadding; base::i18n::IsRTL() ? 0.0f : optInLabelSidePadding;
if (@available(iOS 13.0, *)) { if (@available(iOS 13.5, *)) {
self.optInLabel.frame = AlignRectOriginAndSizeToPixels( self.optInLabel.frame = AlignRectOriginAndSizeToPixels(
CGRectMake(optInLabelOriginX, CGRectMake(optInLabelOriginX,
CGRectGetMaxY(self.TOSTextView.frame) + optInLabelTopPadding, CGRectGetMaxY(self.TOSTextView.frame) + optInLabelTopPadding,
...@@ -554,7 +554,7 @@ const char kTermsOfServiceUrl[] = "internal://terms-of-service"; ...@@ -554,7 +554,7 @@ const char kTermsOfServiceUrl[] = "internal://terms-of-service";
[self configureContainerView]; [self configureContainerView];
[self configureTitleLabel]; [self configureTitleLabel];
[self configureImageView]; [self configureImageView];
if (@available(iOS 13.0, *)) { if (@available(iOS 13.5, *)) {
[self configureTOSTextView]; [self configureTOSTextView];
} else { } else {
[self configureLegacyTOSLabel]; [self configureLegacyTOSLabel];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment