OLD | NEW |
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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 setStartingSelectionOnSmartDelete(m_downstreamStart, m_downstreamEnd
); | 253 setStartingSelectionOnSmartDelete(m_downstreamStart, m_downstreamEnd
); |
254 } | 254 } |
255 } | 255 } |
256 | 256 |
257 // We must pass call parentAnchoredEquivalent on the positions since some ed
iting positions | 257 // We must pass call parentAnchoredEquivalent on the positions since some ed
iting positions |
258 // that appear inside their nodes aren't really inside them. [hr, 0] is one
example. | 258 // that appear inside their nodes aren't really inside them. [hr, 0] is one
example. |
259 // FIXME: parentAnchoredEquivalent should eventually be moved into enclosing
element getters | 259 // FIXME: parentAnchoredEquivalent should eventually be moved into enclosing
element getters |
260 // like the one below, since editing functions should obviously accept editi
ng positions. | 260 // like the one below, since editing functions should obviously accept editi
ng positions. |
261 // FIXME: Passing false to enclosingNodeOfType tells it that it's OK to retu
rn a non-editable | 261 // FIXME: Passing false to enclosingNodeOfType tells it that it's OK to retu
rn a non-editable |
262 // node. This was done to match existing behavior, but it seems wrong. | 262 // node. This was done to match existing behavior, but it seems wrong. |
263 m_startBlock = enclosingNodeOfType(m_downstreamStart.parentAnchoredEquivalen
t(), &isBlock, CanCrossEditingBoundary); | 263 m_startBlock = enclosingNodeOfType(m_downstreamStart.parentAnchoredEquivalen
t(), &isEnclosingBlock, CanCrossEditingBoundary); |
264 m_endBlock = enclosingNodeOfType(m_upstreamEnd.parentAnchoredEquivalent(), &
isBlock, CanCrossEditingBoundary); | 264 m_endBlock = enclosingNodeOfType(m_upstreamEnd.parentAnchoredEquivalent(), &
isEnclosingBlock, CanCrossEditingBoundary); |
265 } | 265 } |
266 | 266 |
267 // We don't want to inherit style from an element which can't have contents. | 267 // We don't want to inherit style from an element which can't have contents. |
268 static bool shouldNotInheritStyleFrom(const Node& node) | 268 static bool shouldNotInheritStyleFrom(const Node& node) |
269 { | 269 { |
270 return !node.canContainRangeEndPoint(); | 270 return !node.canContainRangeEndPoint(); |
271 } | 271 } |
272 | 272 |
273 void DeleteSelectionCommand::saveTypingStyleState() | 273 void DeleteSelectionCommand::saveTypingStyleState() |
274 { | 274 { |
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
899 visitor->trace(m_deleteIntoBlockquoteStyle); | 899 visitor->trace(m_deleteIntoBlockquoteStyle); |
900 visitor->trace(m_startRoot); | 900 visitor->trace(m_startRoot); |
901 visitor->trace(m_endRoot); | 901 visitor->trace(m_endRoot); |
902 visitor->trace(m_startTableRow); | 902 visitor->trace(m_startTableRow); |
903 visitor->trace(m_endTableRow); | 903 visitor->trace(m_endTableRow); |
904 visitor->trace(m_temporaryPlaceholder); | 904 visitor->trace(m_temporaryPlaceholder); |
905 CompositeEditCommand::trace(visitor); | 905 CompositeEditCommand::trace(visitor); |
906 } | 906 } |
907 | 907 |
908 } // namespace blink | 908 } // namespace blink |
OLD | NEW |