Commit d99ffed0 authored by Allen Bauer's avatar Allen Bauer Committed by Commit Bot

Removed Label::Layout(). Place ClearDisplayText() into OnBoundsChanged.

Bug: 1005568
Change-Id: I3aa86d1f9cf20eacabdc1084cecd24894e5252b5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1822019
Auto-Submit: Allen Bauer <kylixrd@chromium.org>
Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#699402}
parent fccbe172
...@@ -512,10 +512,6 @@ int Label::GetHeightForWidth(int w) const { ...@@ -512,10 +512,6 @@ int Label::GetHeightForWidth(int w) const {
return height + GetInsets().height(); return height + GetInsets().height();
} }
void Label::Layout() {
ClearDisplayText();
}
View* Label::GetTooltipHandlerForPoint(const gfx::Point& point) { View* Label::GetTooltipHandlerForPoint(const gfx::Point& point) {
if (!handles_tooltips_ || if (!handles_tooltips_ ||
(tooltip_text_.empty() && !ShouldShowDefaultTooltip())) (tooltip_text_.empty() && !ShouldShowDefaultTooltip()))
...@@ -638,6 +634,7 @@ void Label::PaintText(gfx::Canvas* canvas) { ...@@ -638,6 +634,7 @@ void Label::PaintText(gfx::Canvas* canvas) {
void Label::OnBoundsChanged(const gfx::Rect& previous_bounds) { void Label::OnBoundsChanged(const gfx::Rect& previous_bounds) {
if (previous_bounds.size() != size()) if (previous_bounds.size() != size())
InvalidateLayout(); InvalidateLayout();
ClearDisplayText();
} }
void Label::OnPaint(gfx::Canvas* canvas) { void Label::OnPaint(gfx::Canvas* canvas) {
......
...@@ -246,7 +246,6 @@ class VIEWS_EXPORT Label : public View, ...@@ -246,7 +246,6 @@ class VIEWS_EXPORT Label : public View,
gfx::Size CalculatePreferredSize() const override; gfx::Size CalculatePreferredSize() const override;
gfx::Size GetMinimumSize() const override; gfx::Size GetMinimumSize() const override;
int GetHeightForWidth(int w) const override; int GetHeightForWidth(int w) const override;
void Layout() override;
View* GetTooltipHandlerForPoint(const gfx::Point& point) override; View* GetTooltipHandlerForPoint(const gfx::Point& point) override;
bool CanProcessEventsWithinSubtree() const override; bool CanProcessEventsWithinSubtree() const override;
WordLookupClient* GetWordLookupClient() override; WordLookupClient* GetWordLookupClient() override;
......
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