| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 2182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2193 // If the selection was cleared while the WebView was not | 2193 // If the selection was cleared while the WebView was not |
| 2194 // focused, then the focus element shows with a focus ring but | 2194 // focused, then the focus element shows with a focus ring but |
| 2195 // no caret and does respond to keyboard inputs. | 2195 // no caret and does respond to keyboard inputs. |
| 2196 if (element->isTextFormControl()) { | 2196 if (element->isTextFormControl()) { |
| 2197 element->updateFocusAppearance(true); | 2197 element->updateFocusAppearance(true); |
| 2198 } else if (element->isContentEditable()) { | 2198 } else if (element->isContentEditable()) { |
| 2199 // updateFocusAppearance() selects all the text of | 2199 // updateFocusAppearance() selects all the text of |
| 2200 // contentseditable DIVs. So we set the selection explicitly | 2200 // contentseditable DIVs. So we set the selection explicitly |
| 2201 // instead. Note that this has the side effect of moving the | 2201 // instead. Note that this has the side effect of moving the |
| 2202 // caret back to the beginning of the text. | 2202 // caret back to the beginning of the text. |
| 2203 Position position(element, 0, Position::PositionIsOffsetInAn
chor); | 2203 Position position(element, 0); |
| 2204 localFrame->selection().setSelection(VisibleSelection(positi
on, SEL_DEFAULT_AFFINITY)); | 2204 localFrame->selection().setSelection(VisibleSelection(positi
on, SEL_DEFAULT_AFFINITY)); |
| 2205 } | 2205 } |
| 2206 } | 2206 } |
| 2207 } | 2207 } |
| 2208 m_imeAcceptEvents = true; | 2208 m_imeAcceptEvents = true; |
| 2209 } else { | 2209 } else { |
| 2210 hidePopups(); | 2210 hidePopups(); |
| 2211 | 2211 |
| 2212 // Clear focus on the currently focused frame if any. | 2212 // Clear focus on the currently focused frame if any. |
| 2213 if (!m_page) | 2213 if (!m_page) |
| (...skipping 2183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4397 { | 4397 { |
| 4398 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); | 4398 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); |
| 4399 } | 4399 } |
| 4400 | 4400 |
| 4401 void WebViewImpl::forceNextDrawingBufferCreationToFail() | 4401 void WebViewImpl::forceNextDrawingBufferCreationToFail() |
| 4402 { | 4402 { |
| 4403 DrawingBuffer::forceNextDrawingBufferCreationToFail(); | 4403 DrawingBuffer::forceNextDrawingBufferCreationToFail(); |
| 4404 } | 4404 } |
| 4405 | 4405 |
| 4406 } // namespace blink | 4406 } // namespace blink |
| OLD | NEW |