diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-06-05 17:27:05 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-06-18 08:33:46 +0000 |
commit | 9f4560b1027ae06fdb497023cdcaf91b8511fa74 (patch) | |
tree | f9789c1b2941956c5cc104cf03c6b6cc93759152 /chromium/ui/views | |
parent | d17ea114e5ef69ad5d5d7413280a13e6428098aa (diff) | |
download | qtwebengine-chromium-9f4560b1027ae06fdb497023cdcaf91b8511fa74.tar.gz |
BASELINE: Update Chromium to 67.0.3396.76
Change-Id: I9a14af4efb092ab203e9364f0779fca781909a38
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'chromium/ui/views')
6 files changed, 19 insertions, 8 deletions
diff --git a/chromium/ui/views/animation/ink_drop_host_view.cc b/chromium/ui/views/animation/ink_drop_host_view.cc index 8a60f37c9fb..922600f1375 100644 --- a/chromium/ui/views/animation/ink_drop_host_view.cc +++ b/chromium/ui/views/animation/ink_drop_host_view.cc @@ -297,9 +297,12 @@ InkDrop* InkDropHostView::GetInkDrop() { } void InkDropHostView::InstallInkDropMask(ui::Layer* ink_drop_layer) { +// Layer masks don't work on Windows. See crbug.com/713359 +#if !defined(OS_WIN) ink_drop_mask_ = CreateInkDropMask(); if (ink_drop_mask_) ink_drop_layer->SetMaskLayer(ink_drop_mask_->layer()); +#endif } void InkDropHostView::ResetInkDropMask() { diff --git a/chromium/ui/views/controls/native/native_view_host_aura.cc b/chromium/ui/views/controls/native/native_view_host_aura.cc index 420b005a433..28033ad99d5 100644 --- a/chromium/ui/views/controls/native/native_view_host_aura.cc +++ b/chromium/ui/views/controls/native/native_view_host_aura.cc @@ -149,12 +149,17 @@ void NativeViewHostAura::RemovedFromWidget() { } bool NativeViewHostAura::SetCornerRadius(int corner_radius) { +#if defined(OS_WIN) + // Layer masks don't work on Windows. See crbug.com/713359 + return false; +#else mask_ = views::Painter::CreatePaintedLayer( views::Painter::CreateSolidRoundRectPainter(SK_ColorBLACK, corner_radius)); mask_->layer()->SetFillsBoundsOpaquely(false); InstallMask(); return true; +#endif } void NativeViewHostAura::InstallClip(int x, int y, int w, int h) { diff --git a/chromium/ui/views/controls/textfield/textfield.cc b/chromium/ui/views/controls/textfield/textfield.cc index 6cd683a7ee9..82cdf5b8669 100644 --- a/chromium/ui/views/controls/textfield/textfield.cc +++ b/chromium/ui/views/controls/textfield/textfield.cc @@ -1749,8 +1749,8 @@ gfx::RenderText* Textfield::GetRenderText() const { return model_->render_text(); } -gfx::Point Textfield::GetLastClickLocation() const { - return selection_controller_.last_click_location(); +gfx::Point Textfield::GetLastClickRootLocation() const { + return selection_controller_.last_click_root_location(); } base::string16 Textfield::GetSelectionClipboardText() const { diff --git a/chromium/ui/views/controls/textfield/textfield.h b/chromium/ui/views/controls/textfield/textfield.h index 9c4b28d689f..8f26353fa19 100644 --- a/chromium/ui/views/controls/textfield/textfield.h +++ b/chromium/ui/views/controls/textfield/textfield.h @@ -366,7 +366,8 @@ class VIEWS_EXPORT Textfield : public View, // Returns the TextfieldModel's text/cursor/selection rendering model. gfx::RenderText* GetRenderText() const; - gfx::Point GetLastClickLocation() const; + // Returns the last click root location (relative to the root window). + gfx::Point GetLastClickRootLocation() const; // Get the text from the selection clipboard. virtual base::string16 GetSelectionClipboardText() const; diff --git a/chromium/ui/views/selection_controller.cc b/chromium/ui/views/selection_controller.cc index b4a3a403932..61d83ff3750 100644 --- a/chromium/ui/views/selection_controller.cc +++ b/chromium/ui/views/selection_controller.cc @@ -165,7 +165,7 @@ void SelectionController::TrackMouseClicks(const ui::MouseEvent& event) { if (!last_click_time_.is_null() && time_delta.InMilliseconds() <= GetDoubleClickInterval() && !View::ExceededDragThreshold(event.root_location() - - last_click_location_)) { + last_click_root_location_)) { // Upon clicking after a triple click, the count should go back to // double click and alternate between double and triple. This assignment // maps 0 to 1, 1 to 2, 2 to 1. @@ -174,7 +174,7 @@ void SelectionController::TrackMouseClicks(const ui::MouseEvent& event) { aggregated_clicks_ = 0; } last_click_time_ = event.time_stamp(); - last_click_location_ = event.root_location(); + last_click_root_location_ = event.root_location(); } } diff --git a/chromium/ui/views/selection_controller.h b/chromium/ui/views/selection_controller.h index cb929fdd621..46ec0607d11 100644 --- a/chromium/ui/views/selection_controller.h +++ b/chromium/ui/views/selection_controller.h @@ -49,8 +49,10 @@ class VIEWS_EXPORT SelectionController { void OnMouseReleased(const ui::MouseEvent& event); void OnMouseCaptureLost(); - // Returns the latest click location. - const gfx::Point& last_click_location() const { return last_click_location_; } + // Returns the latest click location in root coordinates. + const gfx::Point& last_click_root_location() const { + return last_click_root_location_; + } // Sets whether the SelectionController should update or paste the // selection clipboard on middle-click. Default is false. @@ -86,7 +88,7 @@ class VIEWS_EXPORT SelectionController { // State variables used to track the last click time and location. base::TimeTicks last_click_time_; - gfx::Point last_click_location_; + gfx::Point last_click_root_location_; // Used to track double and triple clicks. Can take the values 0, 1 and 2 // which specify a single, double and triple click respectively. Alternates |