| Index: chrome/browser/ui/views/autocomplete/touch_autocomplete_popup_contents_view.cc
|
| diff --git a/chrome/browser/ui/views/autocomplete/touch_autocomplete_popup_contents_view.cc b/chrome/browser/ui/views/autocomplete/touch_autocomplete_popup_contents_view.cc
|
| index 773f3080bd1923e381c52118842abc7f6a2158f5..7cc2ef1eeec8a4397cdf42e80dd49d56afbe98fc 100644
|
| --- a/chrome/browser/ui/views/autocomplete/touch_autocomplete_popup_contents_view.cc
|
| +++ b/chrome/browser/ui/views/autocomplete/touch_autocomplete_popup_contents_view.cc
|
| @@ -84,9 +84,22 @@ void TouchAutocompletePopupContentsView::UpdatePopupAppearance() {
|
| Layout();
|
| }
|
|
|
| -void TouchAutocompletePopupContentsView::PaintChildren(
|
| +void TouchAutocompletePopupContentsView::LayoutChildren() {
|
| + std::vector<View*> visible_children(GetVisibleChildren());
|
| + gfx::Rect bounds(GetContentsBounds());
|
| + double child_width =
|
| + static_cast<double>(bounds.width()) / visible_children.size();
|
| + int x = bounds.x();
|
| + for (size_t i = 0; i < visible_children.size(); ++i) {
|
| + int next_x = bounds.x() + static_cast<int>(((i + 1) * child_width) + 0.5);
|
| + visible_children[i]->SetBounds(x, bounds.y(), next_x - x, bounds.height());
|
| + x = next_x;
|
| + }
|
| +}
|
| +
|
| +void TouchAutocompletePopupContentsView::PaintResultViews(
|
| gfx::CanvasSkia* canvas) {
|
| - AutocompletePopupContentsView::PaintChildren(canvas);
|
| + AutocompletePopupContentsView::PaintResultViews(canvas);
|
|
|
| // Draw divider lines.
|
| std::vector<View*> visible_children(GetVisibleChildren());
|
| @@ -102,19 +115,6 @@ void TouchAutocompletePopupContentsView::PaintChildren(
|
| }
|
| }
|
|
|
| -void TouchAutocompletePopupContentsView::LayoutChildren() {
|
| - std::vector<View*> visible_children(GetVisibleChildren());
|
| - gfx::Rect bounds(GetContentsBounds());
|
| - double child_width =
|
| - static_cast<double>(bounds.width()) / visible_children.size();
|
| - int x = bounds.x();
|
| - for (size_t i = 0; i < visible_children.size(); ++i) {
|
| - int next_x = bounds.x() + static_cast<int>(((i + 1) * child_width) + 0.5);
|
| - visible_children[i]->SetBounds(x, bounds.y(), next_x - x, bounds.height());
|
| - x = next_x;
|
| - }
|
| -}
|
| -
|
| int TouchAutocompletePopupContentsView::CalculatePopupHeight() {
|
| DCHECK_GE(static_cast<size_t>(child_count()), model_->result().size());
|
| int popup_height = 0;
|
|
|