| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 | 8 |
| 9 MSVC_PUSH_WARNING_LEVEL(0); | 9 MSVC_PUSH_WARNING_LEVEL(0); |
| 10 #include "Cursor.h" | 10 #include "Cursor.h" |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 return true; | 182 return true; |
| 183 | 183 |
| 184 case WebInputEvent::MouseDown: | 184 case WebInputEvent::MouseDown: |
| 185 MouseDown(*static_cast<const WebMouseEvent*>(input_event)); | 185 MouseDown(*static_cast<const WebMouseEvent*>(input_event)); |
| 186 return true; | 186 return true; |
| 187 | 187 |
| 188 case WebInputEvent::MouseUp: | 188 case WebInputEvent::MouseUp: |
| 189 MouseUp(*static_cast<const WebMouseEvent*>(input_event)); | 189 MouseUp(*static_cast<const WebMouseEvent*>(input_event)); |
| 190 return true; | 190 return true; |
| 191 | 191 |
| 192 // In Windows, RawKeyDown only has information about the physical key, but |
| 193 // for "selection", we need the information about the character the key |
| 194 // translated into. For English, the physical key value and the character |
| 195 // value are the same, hence, "selection" works for English. But for other |
| 196 // languages, such as Hebrew, the character value is different from the |
| 197 // physical key value. Thus, without accepting Char event type which |
| 198 // contains the key's character value, the "selection" won't work for |
| 199 // non-English languages, such as Hebrew. |
| 192 case WebInputEvent::RawKeyDown: | 200 case WebInputEvent::RawKeyDown: |
| 193 case WebInputEvent::KeyDown: | 201 case WebInputEvent::KeyDown: |
| 194 case WebInputEvent::KeyUp: | 202 case WebInputEvent::KeyUp: |
| 203 case WebInputEvent::Char: |
| 195 return KeyEvent(*static_cast<const WebKeyboardEvent*>(input_event)); | 204 return KeyEvent(*static_cast<const WebKeyboardEvent*>(input_event)); |
| 196 | 205 |
| 197 default: | 206 default: |
| 198 break; | 207 break; |
| 199 } | 208 } |
| 200 return false; | 209 return false; |
| 201 } | 210 } |
| 202 | 211 |
| 203 void WebWidgetImpl::MouseCaptureLost() { | 212 void WebWidgetImpl::MouseCaptureLost() { |
| 204 } | 213 } |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 // WebCore::FramelessScrollViewClient | 285 // WebCore::FramelessScrollViewClient |
| 277 | 286 |
| 278 void WebWidgetImpl::popupClosed(WebCore::FramelessScrollView* widget) { | 287 void WebWidgetImpl::popupClosed(WebCore::FramelessScrollView* widget) { |
| 279 DCHECK(widget == widget_); | 288 DCHECK(widget == widget_); |
| 280 if (widget_) { | 289 if (widget_) { |
| 281 widget_->setClient(NULL); | 290 widget_->setClient(NULL); |
| 282 widget_ = NULL; | 291 widget_ = NULL; |
| 283 } | 292 } |
| 284 delegate_->CloseWidgetSoon(this); | 293 delegate_->CloseWidgetSoon(this); |
| 285 } | 294 } |
| OLD | NEW |