| 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 m_styledInlineElement(nullptr), | 138 m_styledInlineElement(nullptr), |
| 139 m_removeOnly(false), | 139 m_removeOnly(false), |
| 140 m_isInlineElementToRemoveFunction(0) {} | 140 m_isInlineElementToRemoveFunction(0) {} |
| 141 | 141 |
| 142 ApplyStyleCommand::ApplyStyleCommand(Document& document, | 142 ApplyStyleCommand::ApplyStyleCommand(Document& document, |
| 143 const EditingStyle* style, | 143 const EditingStyle* style, |
| 144 const Position& start, | 144 const Position& start, |
| 145 const Position& end) | 145 const Position& end) |
| 146 : CompositeEditCommand(document), | 146 : CompositeEditCommand(document), |
| 147 m_style(style->copy()), | 147 m_style(style->copy()), |
| 148 m_inputType(InputEvent::InputType::ChangeAttributes), | 148 m_inputType(InputEvent::InputType::None), |
| 149 m_propertyLevel(PropertyDefault), | 149 m_propertyLevel(PropertyDefault), |
| 150 m_start(start), | 150 m_start(start), |
| 151 m_end(end), | 151 m_end(end), |
| 152 m_useEndingSelection(false), | 152 m_useEndingSelection(false), |
| 153 m_styledInlineElement(nullptr), | 153 m_styledInlineElement(nullptr), |
| 154 m_removeOnly(false), | 154 m_removeOnly(false), |
| 155 m_isInlineElementToRemoveFunction(0) {} | 155 m_isInlineElementToRemoveFunction(0) {} |
| 156 | 156 |
| 157 ApplyStyleCommand::ApplyStyleCommand(Element* element, bool removeOnly) | 157 ApplyStyleCommand::ApplyStyleCommand(Element* element, bool removeOnly) |
| 158 : CompositeEditCommand(element->document()), | 158 : CompositeEditCommand(element->document()), |
| 159 m_style(EditingStyle::create()), | 159 m_style(EditingStyle::create()), |
| 160 m_inputType(InputEvent::InputType::ChangeAttributes), | 160 m_inputType(InputEvent::InputType::None), |
| 161 m_propertyLevel(PropertyDefault), | 161 m_propertyLevel(PropertyDefault), |
| 162 m_start(mostForwardCaretPosition(endingSelection().start())), | 162 m_start(mostForwardCaretPosition(endingSelection().start())), |
| 163 m_end(mostBackwardCaretPosition(endingSelection().end())), | 163 m_end(mostBackwardCaretPosition(endingSelection().end())), |
| 164 m_useEndingSelection(true), | 164 m_useEndingSelection(true), |
| 165 m_styledInlineElement(element), | 165 m_styledInlineElement(element), |
| 166 m_removeOnly(removeOnly), | 166 m_removeOnly(removeOnly), |
| 167 m_isInlineElementToRemoveFunction(0) {} | 167 m_isInlineElementToRemoveFunction(0) {} |
| 168 | 168 |
| 169 ApplyStyleCommand::ApplyStyleCommand( | 169 ApplyStyleCommand::ApplyStyleCommand( |
| 170 Document& document, | 170 Document& document, |
| (...skipping 1858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2029 | 2029 |
| 2030 DEFINE_TRACE(ApplyStyleCommand) { | 2030 DEFINE_TRACE(ApplyStyleCommand) { |
| 2031 visitor->trace(m_style); | 2031 visitor->trace(m_style); |
| 2032 visitor->trace(m_start); | 2032 visitor->trace(m_start); |
| 2033 visitor->trace(m_end); | 2033 visitor->trace(m_end); |
| 2034 visitor->trace(m_styledInlineElement); | 2034 visitor->trace(m_styledInlineElement); |
| 2035 CompositeEditCommand::trace(visitor); | 2035 CompositeEditCommand::trace(visitor); |
| 2036 } | 2036 } |
| 2037 | 2037 |
| 2038 } // namespace blink | 2038 } // namespace blink |
| OLD | NEW |