Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: Source/web/WebLocalFrameImpl.cpp

Issue 328243004: Change a FrameSelection::setSelectedRange argument type from bool to enum. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/page/DOMSelection.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 1253 matching lines...) Expand 10 before | Expand all | Expand 10 after
1264 } 1264 }
1265 1265
1266 void WebLocalFrameImpl::selectRange(const WebPoint& base, const WebPoint& extent ) 1266 void WebLocalFrameImpl::selectRange(const WebPoint& base, const WebPoint& extent )
1267 { 1267 {
1268 moveRangeSelection(base, extent); 1268 moveRangeSelection(base, extent);
1269 } 1269 }
1270 1270
1271 void WebLocalFrameImpl::selectRange(const WebRange& webRange) 1271 void WebLocalFrameImpl::selectRange(const WebRange& webRange)
1272 { 1272 {
1273 if (RefPtrWillBeRawPtr<Range> range = static_cast<PassRefPtrWillBeRawPtr<Ran ge> >(webRange)) 1273 if (RefPtrWillBeRawPtr<Range> range = static_cast<PassRefPtrWillBeRawPtr<Ran ge> >(webRange))
1274 frame()->selection().setSelectedRange(range.get(), WebCore::VP_DEFAULT_A FFINITY, false, NotUserTriggered); 1274 frame()->selection().setSelectedRange(range.get(), WebCore::VP_DEFAULT_A FFINITY, FrameSelection::NonDirectional, NotUserTriggered);
1275 } 1275 }
1276 1276
1277 void WebLocalFrameImpl::moveRangeSelection(const WebPoint& base, const WebPoint& extent) 1277 void WebLocalFrameImpl::moveRangeSelection(const WebPoint& base, const WebPoint& extent)
1278 { 1278 {
1279 VisiblePosition basePosition = visiblePositionForWindowPoint(base); 1279 VisiblePosition basePosition = visiblePositionForWindowPoint(base);
1280 VisiblePosition extentPosition = visiblePositionForWindowPoint(extent); 1280 VisiblePosition extentPosition = visiblePositionForWindowPoint(extent);
1281 VisibleSelection newSelection = VisibleSelection(basePosition, extentPositio n); 1281 VisibleSelection newSelection = VisibleSelection(basePosition, extentPositio n);
1282 frame()->selection().setSelection(newSelection, CharacterGranularity); 1282 frame()->selection().setSelection(newSelection, CharacterGranularity);
1283 } 1283 }
1284 1284
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
1956 1956
1957 void WebLocalFrameImpl::invalidateAll() const 1957 void WebLocalFrameImpl::invalidateAll() const
1958 { 1958 {
1959 ASSERT(frame() && frame()->view()); 1959 ASSERT(frame() && frame()->view());
1960 FrameView* view = frame()->view(); 1960 FrameView* view = frame()->view();
1961 view->invalidateRect(view->frameRect()); 1961 view->invalidateRect(view->frameRect());
1962 invalidateScrollbar(); 1962 invalidateScrollbar();
1963 } 1963 }
1964 1964
1965 } // namespace blink 1965 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/page/DOMSelection.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698