| OLD | NEW |
| 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 1568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1579 autocomplete_popup_->refresh(); | 1579 autocomplete_popup_->refresh(); |
| 1580 IntRect new_bounds = autocomplete_popup_->boundsRect(); | 1580 IntRect new_bounds = autocomplete_popup_->boundsRect(); |
| 1581 // Let's resize the backing window if necessary. | 1581 // Let's resize the backing window if necessary. |
| 1582 if (old_bounds != new_bounds) { | 1582 if (old_bounds != new_bounds) { |
| 1583 WebWidgetImpl* web_widget = | 1583 WebWidgetImpl* web_widget = |
| 1584 static_cast<WebWidgetImpl*>(autocomplete_popup_->client()); | 1584 static_cast<WebWidgetImpl*>(autocomplete_popup_->client()); |
| 1585 web_widget->delegate()->SetWindowRect( | 1585 web_widget->delegate()->SetWindowRect( |
| 1586 web_widget, webkit_glue::FromIntRect(new_bounds)); | 1586 web_widget, webkit_glue::FromIntRect(new_bounds)); |
| 1587 } | 1587 } |
| 1588 } else { | 1588 } else { |
| 1589 autocomplete_popup_->show(focused_node->getRect(), | 1589 autocomplete_popup_->show(focused_node->getRect(), |
| 1590 page_->mainFrame()->view(), 0); | 1590 page_->mainFrame()->view(), 0); |
| 1591 autocomplete_popup_showing_ = true; | 1591 autocomplete_popup_showing_ = true; |
| 1592 } | 1592 } |
| 1593 } | 1593 } |
| 1594 } | 1594 } |
| 1595 | 1595 |
| 1596 void WebViewImpl::DidCommitLoad(bool* is_new_navigation) { | 1596 void WebViewImpl::DidCommitLoad(bool* is_new_navigation) { |
| 1597 if (is_new_navigation) | 1597 if (is_new_navigation) |
| 1598 *is_new_navigation = observed_new_navigation_; | 1598 *is_new_navigation = observed_new_navigation_; |
| 1599 | 1599 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1682 MessageLoop::current()->DeleteSoon(FROM_HERE, fetcher); | 1682 MessageLoop::current()->DeleteSoon(FROM_HERE, fetcher); |
| 1683 } | 1683 } |
| 1684 | 1684 |
| 1685 void WebViewImpl::HideAutoCompletePopup() { | 1685 void WebViewImpl::HideAutoCompletePopup() { |
| 1686 if (autocomplete_popup_) { | 1686 if (autocomplete_popup_) { |
| 1687 autocomplete_popup_->hidePopup(); | 1687 autocomplete_popup_->hidePopup(); |
| 1688 autocomplete_popup_showing_ = false; | 1688 autocomplete_popup_showing_ = false; |
| 1689 } | 1689 } |
| 1690 } | 1690 } |
| 1691 | 1691 |
| 1692 void WebViewImpl::HideAutofillPopup() { |
| 1693 HideAutoCompletePopup(); |
| 1694 } |
| 1695 |
| 1692 Node* WebViewImpl::GetFocusedNode() { | 1696 Node* WebViewImpl::GetFocusedNode() { |
| 1693 Frame* frame = page_->focusController()->focusedFrame(); | 1697 Frame* frame = page_->focusController()->focusedFrame(); |
| 1694 if (!frame) | 1698 if (!frame) |
| 1695 return NULL; | 1699 return NULL; |
| 1696 | 1700 |
| 1697 Document* document = frame->document(); | 1701 Document* document = frame->document(); |
| 1698 if (!document) | 1702 if (!document) |
| 1699 return NULL; | 1703 return NULL; |
| 1700 | 1704 |
| 1701 return document->focusedNode(); | 1705 return document->focusedNode(); |
| 1702 } | 1706 } |
| OLD | NEW |