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

Side by Side Diff: Source/core/editing/DeleteSelectionCommand.cpp

Issue 420603002: Use tighter typing in editing/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/editing/CompositeEditCommand.cpp ('k') | Source/core/editing/EditingStyle.cpp » ('j') | 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) 2005 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2005 Apple Computer, 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 , m_selectionToDelete(selection) 91 , m_selectionToDelete(selection)
92 , m_startBlock(nullptr) 92 , m_startBlock(nullptr)
93 , m_endBlock(nullptr) 93 , m_endBlock(nullptr)
94 , m_typingStyle(nullptr) 94 , m_typingStyle(nullptr)
95 , m_deleteIntoBlockquoteStyle(nullptr) 95 , m_deleteIntoBlockquoteStyle(nullptr)
96 { 96 {
97 } 97 }
98 98
99 void DeleteSelectionCommand::initializeStartEnd(Position& start, Position& end) 99 void DeleteSelectionCommand::initializeStartEnd(Position& start, Position& end)
100 { 100 {
101 Node* startSpecialContainer = 0; 101 HTMLElement* startSpecialContainer = 0;
102 Node* endSpecialContainer = 0; 102 HTMLElement* endSpecialContainer = 0;
103 103
104 start = m_selectionToDelete.start(); 104 start = m_selectionToDelete.start();
105 end = m_selectionToDelete.end(); 105 end = m_selectionToDelete.end();
106 106
107 // For HRs, we'll get a position at (HR,1) when hitting delete from the begi nning of the previous line, or (HR,0) when forward deleting, 107 // For HRs, we'll get a position at (HR,1) when hitting delete from the begi nning of the previous line, or (HR,0) when forward deleting,
108 // but in these cases, we want to delete it, so manually expand the selectio n 108 // but in these cases, we want to delete it, so manually expand the selectio n
109 if (isHTMLHRElement(*start.deprecatedNode())) 109 if (isHTMLHRElement(*start.deprecatedNode()))
110 start = positionBeforeNode(start.deprecatedNode()); 110 start = positionBeforeNode(start.deprecatedNode());
111 else if (isHTMLHRElement(*end.deprecatedNode())) 111 else if (isHTMLHRElement(*end.deprecatedNode()))
112 end = positionAfterNode(end.deprecatedNode()); 112 end = positionAfterNode(end.deprecatedNode());
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after
884 visitor->trace(m_deleteIntoBlockquoteStyle); 884 visitor->trace(m_deleteIntoBlockquoteStyle);
885 visitor->trace(m_startRoot); 885 visitor->trace(m_startRoot);
886 visitor->trace(m_endRoot); 886 visitor->trace(m_endRoot);
887 visitor->trace(m_startTableRow); 887 visitor->trace(m_startTableRow);
888 visitor->trace(m_endTableRow); 888 visitor->trace(m_endTableRow);
889 visitor->trace(m_temporaryPlaceholder); 889 visitor->trace(m_temporaryPlaceholder);
890 CompositeEditCommand::trace(visitor); 890 CompositeEditCommand::trace(visitor);
891 } 891 }
892 892
893 } // namespace blink 893 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/editing/CompositeEditCommand.cpp ('k') | Source/core/editing/EditingStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698