| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2008, 2009, 2010 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 alignment = (align == CursorAlignOnScroll::Always) | 269 alignment = (align == CursorAlignOnScroll::Always) |
| 270 ? ScrollAlignment::alignTopAlways | 270 ? ScrollAlignment::alignTopAlways |
| 271 : ScrollAlignment::alignToEdgeIfNeeded; | 271 : ScrollAlignment::alignToEdgeIfNeeded; |
| 272 | 272 |
| 273 revealSelection(alignment, RevealExtent); | 273 revealSelection(alignment, RevealExtent); |
| 274 } | 274 } |
| 275 | 275 |
| 276 notifyAccessibilityForSelectionChange(); | 276 notifyAccessibilityForSelectionChange(); |
| 277 notifyCompositorForSelectionChange(); | 277 notifyCompositorForSelectionChange(); |
| 278 notifyEventHandlerForSelectionChange(); | 278 notifyEventHandlerForSelectionChange(); |
| 279 m_frame->localDOMWindow()->enqueueDocumentEvent( | 279 m_frame->domWindow()->enqueueDocumentEvent( |
| 280 Event::create(EventTypeNames::selectionchange)); | 280 Event::create(EventTypeNames::selectionchange)); |
| 281 } | 281 } |
| 282 | 282 |
| 283 // TODO(yosin): We will make |selectionInDOMTree| version of |SetSelection()| | 283 // TODO(yosin): We will make |selectionInDOMTree| version of |SetSelection()| |
| 284 // as primary function instead of wrapper. | 284 // as primary function instead of wrapper. |
| 285 void FrameSelection::setSelection(const SelectionInDOMTree& newSelection, | 285 void FrameSelection::setSelection(const SelectionInDOMTree& newSelection, |
| 286 SetSelectionOptions options, | 286 SetSelectionOptions options, |
| 287 CursorAlignOnScroll align, | 287 CursorAlignOnScroll align, |
| 288 TextGranularity granularity) { | 288 TextGranularity granularity) { |
| 289 if (!newSelection.isNone()) { | 289 if (!newSelection.isNone()) { |
| (...skipping 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1406 } | 1406 } |
| 1407 | 1407 |
| 1408 void showTree(const blink::FrameSelection* sel) { | 1408 void showTree(const blink::FrameSelection* sel) { |
| 1409 if (sel) | 1409 if (sel) |
| 1410 sel->showTreeForThis(); | 1410 sel->showTreeForThis(); |
| 1411 else | 1411 else |
| 1412 LOG(INFO) << "Cannot showTree for <null> FrameSelection."; | 1412 LOG(INFO) << "Cannot showTree for <null> FrameSelection."; |
| 1413 } | 1413 } |
| 1414 | 1414 |
| 1415 #endif | 1415 #endif |
| OLD | NEW |