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

Side by Side Diff: third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.cpp

Issue 1679253002: Editing: Add EditingState* argument to EditCommand::doApply. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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) 2005, 2006, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2008, 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 } 189 }
190 190
191 Position ApplyStyleCommand::endPosition() 191 Position ApplyStyleCommand::endPosition()
192 { 192 {
193 if (m_useEndingSelection) 193 if (m_useEndingSelection)
194 return endingSelection().end(); 194 return endingSelection().end();
195 195
196 return m_end; 196 return m_end;
197 } 197 }
198 198
199 void ApplyStyleCommand::doApply() 199 void ApplyStyleCommand::doApply(EditingState*)
200 { 200 {
201 switch (m_propertyLevel) { 201 switch (m_propertyLevel) {
202 case PropertyDefault: { 202 case PropertyDefault: {
203 // Apply the block-centric properties of the style. 203 // Apply the block-centric properties of the style.
204 RefPtrWillBeRawPtr<EditingStyle> blockStyle = m_style->extractAndRemoveB lockProperties(); 204 RefPtrWillBeRawPtr<EditingStyle> blockStyle = m_style->extractAndRemoveB lockProperties();
205 if (!blockStyle->isEmpty()) 205 if (!blockStyle->isEmpty())
206 applyBlockStyle(blockStyle.get()); 206 applyBlockStyle(blockStyle.get());
207 // Apply any remaining styles to the inline elements. 207 // Apply any remaining styles to the inline elements.
208 if (!m_style->isEmpty() || m_styledInlineElement || m_isInlineElementToR emoveFunction) { 208 if (!m_style->isEmpty() || m_styledInlineElement || m_isInlineElementToR emoveFunction) {
209 applyRelativeFontStyleChange(m_style.get()); 209 applyRelativeFontStyleChange(m_style.get());
(...skipping 1375 matching lines...) Expand 10 before | Expand all | Expand 10 after
1585 DEFINE_TRACE(ApplyStyleCommand) 1585 DEFINE_TRACE(ApplyStyleCommand)
1586 { 1586 {
1587 visitor->trace(m_style); 1587 visitor->trace(m_style);
1588 visitor->trace(m_start); 1588 visitor->trace(m_start);
1589 visitor->trace(m_end); 1589 visitor->trace(m_end);
1590 visitor->trace(m_styledInlineElement); 1590 visitor->trace(m_styledInlineElement);
1591 CompositeEditCommand::trace(visitor); 1591 CompositeEditCommand::trace(visitor);
1592 } 1592 }
1593 1593
1594 } // namespace blink 1594 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698