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

Side by Side Diff: Source/core/editing/StyledMarkupSerializer.cpp

Issue 1201403002: Make VisiblePosition constructor to canonicalize a position in composed tree (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-06-25T17:29:10 Update use-events-crash.svg expectations Created 5 years, 6 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
« no previous file with comments | « Source/core/dom/Position.cpp ('k') | Source/core/editing/VisiblePosition.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 void appendEndMarkup(Node&); 103 void appendEndMarkup(Node&);
104 RefPtrWillBeRawPtr<EditingStyle> createInlineStyle(Element&); 104 RefPtrWillBeRawPtr<EditingStyle> createInlineStyle(Element&);
105 bool needsInlineStyle(const Element&); 105 bool needsInlineStyle(const Element&);
106 bool shouldApplyWrappingStyle(const Node&) const; 106 bool shouldApplyWrappingStyle(const Node&) const;
107 107
108 StyledMarkupAccumulator* m_accumulator; 108 StyledMarkupAccumulator* m_accumulator;
109 RefPtrWillBeMember<Node> m_lastClosed; 109 RefPtrWillBeMember<Node> m_lastClosed;
110 RefPtrWillBeMember<EditingStyle> m_wrappingStyle; 110 RefPtrWillBeMember<EditingStyle> m_wrappingStyle;
111 }; 111 };
112 112
113 static Position toPositionInDOMTree(const Position& position)
114 {
115 return position;
116 }
117
118 template<typename Strategy> 113 template<typename Strategy>
119 bool StyledMarkupTraverser<Strategy>::shouldAnnotate() const 114 bool StyledMarkupTraverser<Strategy>::shouldAnnotate() const
120 { 115 {
121 return m_accumulator->shouldAnnotate(); 116 return m_accumulator->shouldAnnotate();
122 } 117 }
123 118
124 template<typename Strategy> 119 template<typename Strategy>
125 bool StyledMarkupTraverser<Strategy>::convertBlocksToInlines() const 120 bool StyledMarkupTraverser<Strategy>::convertBlocksToInlines() const
126 { 121 {
127 return m_accumulator->convertBlocksToInlines(); 122 return m_accumulator->convertBlocksToInlines();
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 if (element.isHTMLElement() && shouldAnnotate()) 485 if (element.isHTMLElement() && shouldAnnotate())
491 inlineStyle->mergeStyleFromRulesForSerialization(&toHTMLElement(element) ); 486 inlineStyle->mergeStyleFromRulesForSerialization(&toHTMLElement(element) );
492 487
493 return inlineStyle; 488 return inlineStyle;
494 } 489 }
495 490
496 template class StyledMarkupSerializer<EditingStrategy>; 491 template class StyledMarkupSerializer<EditingStrategy>;
497 template class StyledMarkupSerializer<EditingInComposedTreeStrategy>; 492 template class StyledMarkupSerializer<EditingInComposedTreeStrategy>;
498 493
499 } // namespace blink 494 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/dom/Position.cpp ('k') | Source/core/editing/VisiblePosition.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698