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 1306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1317 // set yet. | 1317 // set yet. |
1318 SelectionStrategy strategyType = SelectionStrategy::Character; | 1318 SelectionStrategy strategyType = SelectionStrategy::Character; |
1319 Settings* settings = m_frame ? m_frame->settings() : 0; | 1319 Settings* settings = m_frame ? m_frame->settings() : 0; |
1320 if (settings && settings->selectionStrategy() == SelectionStrategy::Direction) | 1320 if (settings && settings->selectionStrategy() == SelectionStrategy::Direction) |
1321 strategyType = SelectionStrategy::Direction; | 1321 strategyType = SelectionStrategy::Direction; |
1322 | 1322 |
1323 if (m_granularityStrategy && m_granularityStrategy->GetType() == strategyType) | 1323 if (m_granularityStrategy && m_granularityStrategy->GetType() == strategyType) |
1324 return m_granularityStrategy.get(); | 1324 return m_granularityStrategy.get(); |
1325 | 1325 |
1326 if (strategyType == SelectionStrategy::Direction) | 1326 if (strategyType == SelectionStrategy::Direction) |
1327 m_granularityStrategy = makeUnique<DirectionGranularityStrategy>(); | 1327 m_granularityStrategy = WTF::makeUnique<DirectionGranularityStrategy>(); |
1328 else | 1328 else |
1329 m_granularityStrategy = makeUnique<CharacterGranularityStrategy>(); | 1329 m_granularityStrategy = WTF::makeUnique<CharacterGranularityStrategy>(); |
1330 return m_granularityStrategy.get(); | 1330 return m_granularityStrategy.get(); |
1331 } | 1331 } |
1332 | 1332 |
1333 void FrameSelection::moveRangeSelectionExtent(const IntPoint& contentsPoint) { | 1333 void FrameSelection::moveRangeSelectionExtent(const IntPoint& contentsPoint) { |
1334 if (isNone()) | 1334 if (isNone()) |
1335 return; | 1335 return; |
1336 | 1336 |
1337 VisibleSelection newSelection = | 1337 VisibleSelection newSelection = |
1338 granularityStrategy()->updateExtent(contentsPoint, m_frame); | 1338 granularityStrategy()->updateExtent(contentsPoint, m_frame); |
1339 setSelection(newSelection, | 1339 setSelection(newSelection, |
(...skipping 66 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 |