| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. |
| 3 * Copyright (C) 2008, 2009, 2010, 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2008, 2009, 2010, 2011 Google Inc. All rights reserved. |
| 4 * Copyright (C) 2011 Igalia S.L. | 4 * Copyright (C) 2011 Igalia S.L. |
| 5 * Copyright (C) 2011 Motorola Mobility. All rights reserved. | 5 * Copyright (C) 2011 Motorola Mobility. All rights reserved. |
| 6 * | 6 * |
| 7 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
| 8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
| 9 * are met: | 9 * are met: |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 return fragment; | 286 return fragment; |
| 287 } | 287 } |
| 288 | 288 |
| 289 static const char fragmentMarkerTag[] = "webkit-fragment-marker"; | 289 static const char fragmentMarkerTag[] = "webkit-fragment-marker"; |
| 290 | 290 |
| 291 static bool findNodesSurroundingContext(DocumentFragment* fragment, Comment*& no
deBeforeContext, Comment*& nodeAfterContext) | 291 static bool findNodesSurroundingContext(DocumentFragment* fragment, Comment*& no
deBeforeContext, Comment*& nodeAfterContext) |
| 292 { | 292 { |
| 293 if (!fragment->firstChild()) | 293 if (!fragment->firstChild()) |
| 294 return false; | 294 return false; |
| 295 for (Node& node : NodeTraversal::startsAt(*fragment->firstChild())) { | 295 for (Node& node : NodeTraversal::startsAt(*fragment->firstChild())) { |
| 296 if (node.getNodeType() == Node::COMMENT_NODE && toComment(node).data() =
= fragmentMarkerTag) { | 296 if (node.getNodeType() == Node::kCommentNode && toComment(node).data() =
= fragmentMarkerTag) { |
| 297 if (!nodeBeforeContext) { | 297 if (!nodeBeforeContext) { |
| 298 nodeBeforeContext = &toComment(node); | 298 nodeBeforeContext = &toComment(node); |
| 299 } else { | 299 } else { |
| 300 nodeAfterContext = &toComment(node); | 300 nodeAfterContext = &toComment(node); |
| 301 return true; | 301 return true; |
| 302 } | 302 } |
| 303 } | 303 } |
| 304 } | 304 } |
| 305 return false; | 305 return false; |
| 306 } | 306 } |
| (...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 685 Text* textNext = toText(next); | 685 Text* textNext = toText(next); |
| 686 textNode->appendData(textNext->data()); | 686 textNode->appendData(textNext->data()); |
| 687 if (textNext->parentNode()) // Might have been removed by mutation event. | 687 if (textNext->parentNode()) // Might have been removed by mutation event. |
| 688 textNext->remove(exceptionState); | 688 textNext->remove(exceptionState); |
| 689 } | 689 } |
| 690 | 690 |
| 691 template class CORE_TEMPLATE_EXPORT CreateMarkupAlgorithm<EditingStrategy>; | 691 template class CORE_TEMPLATE_EXPORT CreateMarkupAlgorithm<EditingStrategy>; |
| 692 template class CORE_TEMPLATE_EXPORT CreateMarkupAlgorithm<EditingInFlatTreeStrat
egy>; | 692 template class CORE_TEMPLATE_EXPORT CreateMarkupAlgorithm<EditingInFlatTreeStrat
egy>; |
| 693 | 693 |
| 694 } // namespace blink | 694 } // namespace blink |
| OLD | NEW |