Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1118)

Unified Diff: ui/views/corewm/tooltip_aura.cc

Issue 2556083002: Don't subtract border from max size for display rect. (Closed)
Patch Set: update test Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/corewm/tooltip_aura.h ('k') | ui/views/corewm/tooltip_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/corewm/tooltip_aura.cc
diff --git a/ui/views/corewm/tooltip_aura.cc b/ui/views/corewm/tooltip_aura.cc
index 256a4fbfebb78e00a78dce44c0024e6939d722ad..4cce40b0498e12288c56ed6de286764cf6585096 100644
--- a/ui/views/corewm/tooltip_aura.cc
+++ b/ui/views/corewm/tooltip_aura.cc
@@ -141,11 +141,11 @@ class TooltipAura::TooltipView : public views::View {
ResetDisplayRect();
}
+ gfx::RenderText* render_text_for_test() { return render_text_.get(); }
+
private:
void ResetDisplayRect() {
- gfx::Insets insets = border()->GetInsets();
- int max_text_width = max_width_ - insets.width();
- render_text_->SetDisplayRect(gfx::Rect(0, 0, max_text_width, 100000));
+ render_text_->SetDisplayRect(gfx::Rect(0, 0, max_width_, 100000));
}
std::unique_ptr<gfx::RenderText> render_text_;
@@ -164,6 +164,10 @@ TooltipAura::~TooltipAura() {
DestroyWidget();
}
+gfx::RenderText* TooltipAura::GetRenderTextForTest() {
+ return tooltip_view_->render_text_for_test();
+}
+
void TooltipAura::SetTooltipBounds(const gfx::Point& mouse_pos,
const gfx::Size& tooltip_size) {
gfx::Rect tooltip_rect(mouse_pos, tooltip_size);
« no previous file with comments | « ui/views/corewm/tooltip_aura.h ('k') | ui/views/corewm/tooltip_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698