OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2009, 2010, 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2009, 2010, 2011 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 #include "SmartReplace.h" | 53 #include "SmartReplace.h" |
54 #include "TextIterator.h" | 54 #include "TextIterator.h" |
55 #include "htmlediting.h" | 55 #include "htmlediting.h" |
56 #include "markup.h" | 56 #include "markup.h" |
57 #include "visible_units.h" | 57 #include "visible_units.h" |
58 #include <wtf/StdLibExtras.h> | 58 #include <wtf/StdLibExtras.h> |
59 #include <wtf/Vector.h> | 59 #include <wtf/Vector.h> |
60 | 60 |
61 namespace WebCore { | 61 namespace WebCore { |
62 | 62 |
63 typedef Vector<RefPtr<Node> > NodeVector; | |
64 | |
65 using namespace HTMLNames; | 63 using namespace HTMLNames; |
66 | 64 |
67 enum EFragmentType { EmptyFragment, SingleTextNodeFragment, TreeFragment }; | 65 enum EFragmentType { EmptyFragment, SingleTextNodeFragment, TreeFragment }; |
68 | 66 |
69 // --- ReplacementFragment helper class | 67 // --- ReplacementFragment helper class |
70 | 68 |
71 class ReplacementFragment { | 69 class ReplacementFragment { |
72 WTF_MAKE_NONCOPYABLE(ReplacementFragment); | 70 WTF_MAKE_NONCOPYABLE(ReplacementFragment); |
73 public: | 71 public: |
74 ReplacementFragment(Document*, DocumentFragment*, bool matchStyle, const Vis
ibleSelection&); | 72 ReplacementFragment(Document*, DocumentFragment*, bool matchStyle, const Vis
ibleSelection&); |
(...skipping 1273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1348 removeNodeAndPruneAncestors(nodeAfterInsertionPos); | 1346 removeNodeAndPruneAncestors(nodeAfterInsertionPos); |
1349 | 1347 |
1350 VisibleSelection selectionAfterReplace(m_selectReplacement ? start : end, en
d); | 1348 VisibleSelection selectionAfterReplace(m_selectReplacement ? start : end, en
d); |
1351 | 1349 |
1352 setEndingSelection(selectionAfterReplace); | 1350 setEndingSelection(selectionAfterReplace); |
1353 | 1351 |
1354 return true; | 1352 return true; |
1355 } | 1353 } |
1356 | 1354 |
1357 } // namespace WebCore | 1355 } // namespace WebCore |
OLD | NEW |