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

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

Issue 2734793002: Expand FrameSelection::isInPasswordFiled() into call sites (Closed)
Patch Set: 2017-03-07T11:24:31 Created 3 years, 9 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) 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 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 SelectionDirectionalMode::Directional) 675 SelectionDirectionalMode::Directional)
676 .build(), 676 .build(),
677 options); 677 options);
678 return true; 678 return true;
679 } 679 }
680 680
681 Range* FrameSelection::firstRange() const { 681 Range* FrameSelection::firstRange() const {
682 return m_selectionEditor->firstRange(); 682 return m_selectionEditor->firstRange();
683 } 683 }
684 684
685 bool FrameSelection::isInPasswordField() const {
686 // TODO(editing-dev): The use of updateStyleAndLayoutIgnorePendingStylesheets
687 // needs to be audited. See http://crbug.com/590369 for more details.
688 document().updateStyleAndLayoutIgnorePendingStylesheets();
689 return blink::isInPasswordField(computeVisibleSelectionInDOMTree().start());
690 }
691
692 void FrameSelection::notifyAccessibilityForSelectionChange() { 685 void FrameSelection::notifyAccessibilityForSelectionChange() {
693 if (selectionInDOMTree().isNone()) 686 if (selectionInDOMTree().isNone())
694 return; 687 return;
695 AXObjectCache* cache = document().existingAXObjectCache(); 688 AXObjectCache* cache = document().existingAXObjectCache();
696 if (!cache) 689 if (!cache)
697 return; 690 return;
698 const Position& start = selectionInDOMTree().computeStartPosition(); 691 const Position& start = selectionInDOMTree().computeStartPosition();
699 cache->selectionChanged(start.computeContainerNode()); 692 cache->selectionChanged(start.computeContainerNode());
700 } 693 }
701 694
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
1175 } 1168 }
1176 1169
1177 void showTree(const blink::FrameSelection* sel) { 1170 void showTree(const blink::FrameSelection* sel) {
1178 if (sel) 1171 if (sel)
1179 sel->showTreeForThis(); 1172 sel->showTreeForThis();
1180 else 1173 else
1181 LOG(INFO) << "Cannot showTree for <null> FrameSelection."; 1174 LOG(INFO) << "Cannot showTree for <null> FrameSelection.";
1182 } 1175 }
1183 1176
1184 #endif 1177 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/FrameSelection.h ('k') | third_party/WebKit/Source/core/input/MouseEventManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698