| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |