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

Side by Side Diff: third_party/WebKit/Source/core/editing/FrameSelection.cpp

Issue 1479923002: Enumerate the return value of dispatchEvent so it is clear. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_passive_uma_add
Patch Set: Rebase Created 5 years 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) 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 822 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 if (root) { 833 if (root) {
834 selectStartTarget = root->shadowHost(); 834 selectStartTarget = root->shadowHost();
835 } else { 835 } else {
836 root = document->documentElement(); 836 root = document->documentElement();
837 selectStartTarget = document->body(); 837 selectStartTarget = document->body();
838 } 838 }
839 } 839 }
840 if (!root) 840 if (!root)
841 return; 841 return;
842 842
843 if (selectStartTarget && !selectStartTarget->dispatchEvent(Event::createCanc elableBubble(EventTypeNames::selectstart))) 843 if (selectStartTarget && selectStartTarget->dispatchEvent(Event::createCance lableBubble(EventTypeNames::selectstart)) != WebInputEventResult::NotHandled)
844 return; 844 return;
845 845
846 VisibleSelection newSelection(VisibleSelection::selectionFromContentsOfNode( root.get())); 846 VisibleSelection newSelection(VisibleSelection::selectionFromContentsOfNode( root.get()));
847 setSelection(newSelection); 847 setSelection(newSelection);
848 selectFrameElementInParentIfFullySelected(); 848 selectFrameElementInParentIfFullySelected();
849 notifyLayoutObjectOfSelectionChange(UserTriggered); 849 notifyLayoutObjectOfSelectionChange(UserTriggered);
850 } 850 }
851 851
852 bool FrameSelection::setSelectedRange(Range* range, TextAffinity affinity, Selec tionDirectionalMode directional, SetSelectionOptions options) 852 bool FrameSelection::setSelectedRange(Range* range, TextAffinity affinity, Selec tionDirectionalMode directional, SetSelectionOptions options)
853 { 853 {
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
1401 1401
1402 void showTree(const blink::FrameSelection* sel) 1402 void showTree(const blink::FrameSelection* sel)
1403 { 1403 {
1404 if (sel) 1404 if (sel)
1405 sel->showTreeForThis(); 1405 sel->showTreeForThis();
1406 else 1406 else
1407 fprintf(stderr, "Cannot showTree for (nil) FrameSelection.\n"); 1407 fprintf(stderr, "Cannot showTree for (nil) FrameSelection.\n");
1408 } 1408 }
1409 1409
1410 #endif 1410 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698