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

Side by Side Diff: webkit/glue/webview_impl.cc

Issue 55040: Fix for empty form autofill popups (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 9 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2007 Google Inc. All Rights Reserved. 2 * Copyright 2007 Google Inc. All Rights Reserved.
3 * 3 *
4 * Portions Copyright (C) 2006 Apple Computer, Inc. All rights reserved. 4 * Portions Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
5 * 5 *
6 * ***** BEGIN LICENSE BLOCK ***** 6 * ***** BEGIN LICENSE BLOCK *****
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
(...skipping 1749 matching lines...) Expand 10 before | Expand all | Expand 10 after
1760 HitTestResult result = HitTestResultForWindowPos(IntPoint(x, y)); 1760 HitTestResult result = HitTestResultForWindowPos(IntPoint(x, y));
1761 return result.innerNonSharedNode(); 1761 return result.innerNonSharedNode();
1762 } 1762 }
1763 1763
1764 void WebViewImpl::HideAutofillPopup() { 1764 void WebViewImpl::HideAutofillPopup() {
1765 HideAutoCompletePopup(); 1765 HideAutoCompletePopup();
1766 } 1766 }
1767 1767
1768 void WebViewImpl::RefreshAutofillPopup() { 1768 void WebViewImpl::RefreshAutofillPopup() {
1769 DCHECK(autocomplete_popup_showing_); 1769 DCHECK(autocomplete_popup_showing_);
1770
1771 // Hide the popup if it has become empty.
1772 if (autocomplete_popup_client_->listSize() == 0) {
1773 HideAutoCompletePopup();
1774 return;
1775 }
1776
1770 IntRect old_bounds = autocomplete_popup_->boundsRect(); 1777 IntRect old_bounds = autocomplete_popup_->boundsRect();
1771 autocomplete_popup_->refresh(); 1778 autocomplete_popup_->refresh();
1772 IntRect new_bounds = autocomplete_popup_->boundsRect(); 1779 IntRect new_bounds = autocomplete_popup_->boundsRect();
1773 // Let's resize the backing window if necessary. 1780 // Let's resize the backing window if necessary.
1774 if (old_bounds != new_bounds) { 1781 if (old_bounds != new_bounds) {
1775 WebWidgetImpl* web_widget = 1782 WebWidgetImpl* web_widget =
1776 static_cast<WebWidgetImpl*>(autocomplete_popup_->client()); 1783 static_cast<WebWidgetImpl*>(autocomplete_popup_->client());
1777 web_widget->delegate()->SetWindowRect( 1784 web_widget->delegate()->SetWindowRect(
1778 web_widget, webkit_glue::FromIntRect(new_bounds)); 1785 web_widget, webkit_glue::FromIntRect(new_bounds));
1779 } 1786 }
(...skipping 10 matching lines...) Expand all
1790 1797
1791 return document->focusedNode(); 1798 return document->focusedNode();
1792 } 1799 }
1793 1800
1794 HitTestResult WebViewImpl::HitTestResultForWindowPos(const IntPoint& pos) { 1801 HitTestResult WebViewImpl::HitTestResultForWindowPos(const IntPoint& pos) {
1795 IntPoint doc_point( 1802 IntPoint doc_point(
1796 page_->mainFrame()->view()->windowToContents(pos)); 1803 page_->mainFrame()->view()->windowToContents(pos));
1797 return page_->mainFrame()->eventHandler()-> 1804 return page_->mainFrame()->eventHandler()->
1798 hitTestResultAtPoint(doc_point, false); 1805 hitTestResultAtPoint(doc_point, false);
1799 } 1806 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698