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

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

Issue 2502413004: WTF/std normalization: replace WTF::Vector::last with ::back (Closed)
Patch Set: rebase Created 4 years, 1 month 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 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * Copyright (C) 2008, 2009, 2010, 2011 Google Inc. All rights reserved. 4 * Copyright (C) 2008, 2009, 2010, 2011 Google Inc. All rights reserved.
5 * Copyright (C) 2011 Igalia S.L. 5 * Copyright (C) 2011 Igalia S.L.
6 * Copyright (C) 2011 Motorola Mobility. All rights reserved. 6 * Copyright (C) 2011 Motorola Mobility. All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 } 371 }
372 372
373 // If we didn't insert open tag and there's no more siblings or we're at the 373 // If we didn't insert open tag and there's no more siblings or we're at the
374 // end of the traversal, take care of ancestors. 374 // end of the traversal, take care of ancestors.
375 // FIXME: What happens if we just inserted open tag and reached the end? 375 // FIXME: What happens if we just inserted open tag and reached the end?
376 if (Strategy::nextSibling(*n) && next != pastEnd) 376 if (Strategy::nextSibling(*n) && next != pastEnd)
377 continue; 377 continue;
378 378
379 // Close up the ancestors. 379 // Close up the ancestors.
380 while (!ancestorsToClose.isEmpty()) { 380 while (!ancestorsToClose.isEmpty()) {
381 ContainerNode* ancestor = ancestorsToClose.last(); 381 ContainerNode* ancestor = ancestorsToClose.back();
382 DCHECK(ancestor); 382 DCHECK(ancestor);
383 if (next && next != pastEnd && Strategy::isDescendantOf(*next, *ancestor)) 383 if (next && next != pastEnd && Strategy::isDescendantOf(*next, *ancestor))
384 break; 384 break;
385 // Not at the end of the range, close ancestors up to sibling of next 385 // Not at the end of the range, close ancestors up to sibling of next
386 // node. 386 // node.
387 appendEndMarkup(*ancestor); 387 appendEndMarkup(*ancestor);
388 lastClosed = ancestor; 388 lastClosed = ancestor;
389 ancestorsToClose.pop_back(); 389 ancestorsToClose.pop_back();
390 } 390 }
391 391
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 if (element.isHTMLElement() && shouldAnnotate()) 538 if (element.isHTMLElement() && shouldAnnotate())
539 inlineStyle->mergeStyleFromRulesForSerialization(&toHTMLElement(element)); 539 inlineStyle->mergeStyleFromRulesForSerialization(&toHTMLElement(element));
540 540
541 return inlineStyle; 541 return inlineStyle;
542 } 542 }
543 543
544 template class StyledMarkupSerializer<EditingStrategy>; 544 template class StyledMarkupSerializer<EditingStrategy>;
545 template class StyledMarkupSerializer<EditingInFlatTreeStrategy>; 545 template class StyledMarkupSerializer<EditingInFlatTreeStrategy>;
546 546
547 } // namespace blink 547 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698