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

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

Issue 1675163002: Rename ComposedTree to FlatTree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: wip Created 4 years, 10 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, 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 HTMLElement* specialCommonAncestor = highestAncestorToWrapMarkup<Strategy>(s tartPosition, endPosition, shouldAnnotate, constrainingAncestor); 260 HTMLElement* specialCommonAncestor = highestAncestorToWrapMarkup<Strategy>(s tartPosition, endPosition, shouldAnnotate, constrainingAncestor);
261 StyledMarkupSerializer<Strategy> serializer(shouldResolveURLs, shouldAnnotat e, startPosition, endPosition, specialCommonAncestor, convertBlocksToInlines); 261 StyledMarkupSerializer<Strategy> serializer(shouldResolveURLs, shouldAnnotat e, startPosition, endPosition, specialCommonAncestor, convertBlocksToInlines);
262 return serializer.createMarkup(); 262 return serializer.createMarkup();
263 } 263 }
264 264
265 String createMarkup(const Position& startPosition, const Position& endPosition, EAnnotateForInterchange shouldAnnotate, ConvertBlocksToInlines convertBlocksToIn lines, EAbsoluteURLs shouldResolveURLs, Node* constrainingAncestor) 265 String createMarkup(const Position& startPosition, const Position& endPosition, EAnnotateForInterchange shouldAnnotate, ConvertBlocksToInlines convertBlocksToIn lines, EAbsoluteURLs shouldResolveURLs, Node* constrainingAncestor)
266 { 266 {
267 return CreateMarkupAlgorithm<EditingStrategy>::createMarkup(startPosition, e ndPosition, shouldAnnotate, convertBlocksToInlines, shouldResolveURLs, constrain ingAncestor); 267 return CreateMarkupAlgorithm<EditingStrategy>::createMarkup(startPosition, e ndPosition, shouldAnnotate, convertBlocksToInlines, shouldResolveURLs, constrain ingAncestor);
268 } 268 }
269 269
270 String createMarkup(const PositionInComposedTree& startPosition, const PositionI nComposedTree& endPosition, EAnnotateForInterchange shouldAnnotate, ConvertBlock sToInlines convertBlocksToInlines, EAbsoluteURLs shouldResolveURLs, Node* constr ainingAncestor) 270 String createMarkup(const PositionInFlatTree& startPosition, const PositionInFla tTree& endPosition, EAnnotateForInterchange shouldAnnotate, ConvertBlocksToInlin es convertBlocksToInlines, EAbsoluteURLs shouldResolveURLs, Node* constrainingAn cestor)
271 { 271 {
272 return CreateMarkupAlgorithm<EditingInComposedTreeStrategy>::createMarkup(st artPosition, endPosition, shouldAnnotate, convertBlocksToInlines, shouldResolveU RLs, constrainingAncestor); 272 return CreateMarkupAlgorithm<EditingInFlatTreeStrategy>::createMarkup(startP osition, endPosition, shouldAnnotate, convertBlocksToInlines, shouldResolveURLs, constrainingAncestor);
273 } 273 }
274 274
275 PassRefPtrWillBeRawPtr<DocumentFragment> createFragmentFromMarkup(Document& docu ment, const String& markup, const String& baseURL, ParserContentPolicy parserCon tentPolicy) 275 PassRefPtrWillBeRawPtr<DocumentFragment> createFragmentFromMarkup(Document& docu ment, const String& markup, const String& baseURL, ParserContentPolicy parserCon tentPolicy)
276 { 276 {
277 // We use a fake body element here to trick the HTML parser to using the InB ody insertion mode. 277 // We use a fake body element here to trick the HTML parser to using the InB ody insertion mode.
278 RefPtrWillBeRawPtr<HTMLBodyElement> fakeBody = HTMLBodyElement::create(docum ent); 278 RefPtrWillBeRawPtr<HTMLBodyElement> fakeBody = HTMLBodyElement::create(docum ent);
279 RefPtrWillBeRawPtr<DocumentFragment> fragment = DocumentFragment::create(doc ument); 279 RefPtrWillBeRawPtr<DocumentFragment> fragment = DocumentFragment::create(doc ument);
280 280
281 fragment->parseHTML(markup, fakeBody.get(), parserContentPolicy); 281 fragment->parseHTML(markup, fakeBody.get(), parserContentPolicy);
282 282
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 if (!next || !next->isTextNode()) 695 if (!next || !next->isTextNode())
696 return; 696 return;
697 697
698 RefPtrWillBeRawPtr<Text> textNext = toText(next); 698 RefPtrWillBeRawPtr<Text> textNext = toText(next);
699 textNode->appendData(textNext->data()); 699 textNode->appendData(textNext->data());
700 if (textNext->parentNode()) // Might have been removed by mutation event. 700 if (textNext->parentNode()) // Might have been removed by mutation event.
701 textNext->remove(exceptionState); 701 textNext->remove(exceptionState);
702 } 702 }
703 703
704 template class CORE_TEMPLATE_EXPORT CreateMarkupAlgorithm<EditingStrategy>; 704 template class CORE_TEMPLATE_EXPORT CreateMarkupAlgorithm<EditingStrategy>;
705 template class CORE_TEMPLATE_EXPORT CreateMarkupAlgorithm<EditingInComposedTreeS trategy>; 705 template class CORE_TEMPLATE_EXPORT CreateMarkupAlgorithm<EditingInFlatTreeStrat egy>;
706 706
707 } // namespace blink 707 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698