Commit d0ea0291 authored by edchin's avatar edchin Committed by Commit Bot

[ios pointer support] Findbar

find-in-page previous, next, close buttons.

Test: iPad-only. Enable pointer support flag. Check hover effect on
Bug: 1073961
Change-Id: I4096ef63930a1b788c1ee56760c3150cc984b352
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2166413Reviewed-by: default avatarStepan Khapugin <stkhapugin@chromium.org>
Commit-Queue: edchin <edchin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#762862}
parent 58c20e2a
......@@ -28,6 +28,7 @@ source_set("find_bar") {
"//ios/chrome/browser/browser_state",
"//ios/chrome/browser/find_in_page",
"//ios/chrome/browser/main",
"//ios/chrome/browser/ui:feature_flags",
"//ios/chrome/browser/ui/commands",
"//ios/chrome/browser/ui/coordinators:chrome_coordinators",
"//ios/chrome/browser/ui/image_util",
......
......@@ -4,9 +4,11 @@
#import "ios/chrome/browser/ui/find_bar/find_bar_view.h"
#include "base/feature_list.h"
#include "components/strings/grit/components_strings.h"
#import "ios/chrome/browser/ui/find_bar/find_bar_constants.h"
#import "ios/chrome/browser/ui/toolbar/public/toolbar_constants.h"
#include "ios/chrome/browser/ui/ui_feature_flags.h"
#import "ios/chrome/browser/ui/util/uikit_ui_util.h"
#import "ios/chrome/common/ui/colors/UIColor+cr_semantic_colors.h"
#import "ios/chrome/common/ui/colors/dynamic_color_util.h"
......@@ -242,6 +244,13 @@ const CGFloat kButtonLength = 44;
SetA11yLabelAndUiAutomationName(_previousButton,
IDS_FIND_IN_PAGE_PREVIOUS_TOOLTIP,
kFindInPagePreviousButtonId);
#if defined(__IPHONE_13_4)
if (@available(iOS 13.4, *)) {
if (base::FeatureList::IsEnabled(kPointerSupport)) {
_previousButton.pointerInteractionEnabled = YES;
}
}
#endif // defined(__IPHONE_13_4)
}
return _previousButton;
......@@ -258,6 +267,13 @@ const CGFloat kButtonLength = 44;
_nextButton.translatesAutoresizingMaskIntoConstraints = NO;
SetA11yLabelAndUiAutomationName(_nextButton, IDS_FIND_IN_PAGE_NEXT_TOOLTIP,
kFindInPageNextButtonId);
#if defined(__IPHONE_13_4)
if (@available(iOS 13.4, *)) {
if (base::FeatureList::IsEnabled(kPointerSupport)) {
_nextButton.pointerInteractionEnabled = YES;
}
}
#endif // defined(__IPHONE_13_4)
}
return _nextButton;
......@@ -272,6 +288,13 @@ const CGFloat kButtonLength = 44;
_closeButton.translatesAutoresizingMaskIntoConstraints = NO;
_closeButton.accessibilityIdentifier = kFindInPageCloseButtonId;
_closeButton.titleLabel.font = [UIFont systemFontOfSize:kButtonFontSize];
#if defined(__IPHONE_13_4)
if (@available(iOS 13.4, *)) {
if (base::FeatureList::IsEnabled(kPointerSupport)) {
_closeButton.pointerInteractionEnabled = YES;
}
}
#endif // defined(__IPHONE_13_4)
}
return _closeButton;
......
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