| 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 void Init(WebCore::HTMLInputElement* text_field, | 143 void Init(WebCore::HTMLInputElement* text_field, |
| 144 const std::vector<std::wstring>& suggestions, | 144 const std::vector<std::wstring>& suggestions, |
| 145 int default_suggestion_index) { | 145 int default_suggestion_index) { |
| 146 DCHECK(default_suggestion_index < static_cast<int>(suggestions.size())); | 146 DCHECK(default_suggestion_index < static_cast<int>(suggestions.size())); |
| 147 text_field_ = text_field; | 147 text_field_ = text_field; |
| 148 selected_index_ = default_suggestion_index; | 148 selected_index_ = default_suggestion_index; |
| 149 SetSuggestions(suggestions); | 149 SetSuggestions(suggestions); |
| 150 | 150 |
| 151 FontDescription font_description; | 151 FontDescription font_description; |
| 152 #if defined(OS_WIN) | 152 #if defined(OS_WIN) |
| 153 theme()->systemFont(CSSValueWebkitControl, text_field->document(), | 153 theme()->systemFont(CSSValueWebkitControl, font_description); |
| 154 font_description); | |
| 155 #else | 154 #else |
| 156 NOTIMPLEMENTED(); | 155 NOTIMPLEMENTED(); |
| 157 #endif | 156 #endif |
| 158 // Use a smaller font size to match IE/Firefox. | 157 // Use a smaller font size to match IE/Firefox. |
| 159 // TODO(jcampan): http://crbug.com/7376 use the system size instead of a | 158 // TODO(jcampan): http://crbug.com/7376 use the system size instead of a |
| 160 // fixed font size value. | 159 // fixed font size value. |
| 161 font_description.setComputedSize(12.0); | 160 font_description.setComputedSize(12.0); |
| 162 Font font(font_description, 0, 0); | 161 Font font(font_description, 0, 0); |
| 163 font.update(text_field->document()->styleSelector()->fontSelector()); | 162 font.update(text_field->document()->styleSelector()->fontSelector()); |
| 164 style_.reset(new PopupMenuStyle(Color::black, Color::white, font, true, | 163 style_.reset(new PopupMenuStyle(Color::black, Color::white, font, true, |
| (...skipping 1690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1855 | 1854 |
| 1856 return document->focusedNode(); | 1855 return document->focusedNode(); |
| 1857 } | 1856 } |
| 1858 | 1857 |
| 1859 HitTestResult WebViewImpl::HitTestResultForWindowPos(const IntPoint& pos) { | 1858 HitTestResult WebViewImpl::HitTestResultForWindowPos(const IntPoint& pos) { |
| 1860 IntPoint doc_point( | 1859 IntPoint doc_point( |
| 1861 page_->mainFrame()->view()->windowToContents(pos)); | 1860 page_->mainFrame()->view()->windowToContents(pos)); |
| 1862 return page_->mainFrame()->eventHandler()-> | 1861 return page_->mainFrame()->eventHandler()-> |
| 1863 hitTestResultAtPoint(doc_point, false); | 1862 hitTestResultAtPoint(doc_point, false); |
| 1864 } | 1863 } |
| OLD | NEW |