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

Side by Side Diff: third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp

Issue 2920733002: Rename VisibleSelection::end() to End() (Closed)
Patch Set: 2017-06-01T18:31:38 Created 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 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 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 frame->GetDocument()->UpdateStyleAndLayoutIgnorePendingStylesheets(); 647 frame->GetDocument()->UpdateStyleAndLayoutIgnorePendingStylesheets();
648 648
649 FrameSelection& selection = frame->Selection(); 649 FrameSelection& selection = frame->Selection();
650 if (selection.ComputeVisibleSelectionInDOMTree() 650 if (selection.ComputeVisibleSelectionInDOMTree()
651 .ToNormalizedEphemeralRange() 651 .ToNormalizedEphemeralRange()
652 .IsNull()) 652 .IsNull())
653 return false; 653 return false;
654 start = ToWebTextDirection(PrimaryDirectionOf( 654 start = ToWebTextDirection(PrimaryDirectionOf(
655 *selection.ComputeVisibleSelectionInDOMTree().Start().AnchorNode())); 655 *selection.ComputeVisibleSelectionInDOMTree().Start().AnchorNode()));
656 end = ToWebTextDirection(PrimaryDirectionOf( 656 end = ToWebTextDirection(PrimaryDirectionOf(
657 *selection.ComputeVisibleSelectionInDOMTree().end().AnchorNode())); 657 *selection.ComputeVisibleSelectionInDOMTree().End().AnchorNode()));
658 return true; 658 return true;
659 } 659 }
660 660
661 // TODO(ekaramad):This method is almost duplicated in WebViewImpl as well. This 661 // TODO(ekaramad):This method is almost duplicated in WebViewImpl as well. This
662 // code needs to be refactored (http://crbug.com/629721). 662 // code needs to be refactored (http://crbug.com/629721).
663 bool WebFrameWidgetImpl::IsSelectionAnchorFirst() const { 663 bool WebFrameWidgetImpl::IsSelectionAnchorFirst() const {
664 if (const LocalFrame* frame = FocusedLocalFrameInWidget()) { 664 if (const LocalFrame* frame = FocusedLocalFrameInWidget()) {
665 return frame->Selection() 665 return frame->Selection()
666 .ComputeVisibleSelectionInDOMTreeDeprecated() 666 .ComputeVisibleSelectionInDOMTreeDeprecated()
667 .IsBaseFirst(); 667 .IsBaseFirst();
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
1195 : nullptr; 1195 : nullptr;
1196 } 1196 }
1197 1197
1198 LocalFrame* WebFrameWidgetImpl::FocusedLocalFrameAvailableForIme() const { 1198 LocalFrame* WebFrameWidgetImpl::FocusedLocalFrameAvailableForIme() const {
1199 if (!ime_accept_events_) 1199 if (!ime_accept_events_)
1200 return nullptr; 1200 return nullptr;
1201 return FocusedLocalFrameInWidget(); 1201 return FocusedLocalFrameInWidget();
1202 } 1202 }
1203 1203
1204 } // namespace blink 1204 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698