| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2009, 2010, 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2009, 2010, 2011 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 removeInterchangeNodes(holder); | 246 removeInterchangeNodes(holder); |
| 247 removeUnrenderedNodes(holder); | 247 removeUnrenderedNodes(holder); |
| 248 restoreAndRemoveTestRenderingNodesToFragment(holder); | 248 restoreAndRemoveTestRenderingNodesToFragment(holder); |
| 249 | 249 |
| 250 // Give the root a chance to change the text. | 250 // Give the root a chance to change the text. |
| 251 BeforeTextInsertedEvent* evt = BeforeTextInsertedEvent::create(text); | 251 BeforeTextInsertedEvent* evt = BeforeTextInsertedEvent::create(text); |
| 252 editableRoot->dispatchEvent(evt); | 252 editableRoot->dispatchEvent(evt); |
| 253 if (text != evt->text() || !hasRichlyEditableStyle(*editableRoot)) { | 253 if (text != evt->text() || !hasRichlyEditableStyle(*editableRoot)) { |
| 254 restoreAndRemoveTestRenderingNodesToFragment(holder); | 254 restoreAndRemoveTestRenderingNodesToFragment(holder); |
| 255 | 255 |
| 256 // TODO(editing-dev): Use of updateStyleAndLayoutIgnorePendingStylesheets |
| 257 // needs to be audited. See http://crbug.com/590369 for more details. |
| 258 document->updateStyleAndLayoutIgnorePendingStylesheets(); |
| 259 |
| 256 m_fragment = createFragmentFromText(selection.toNormalizedEphemeralRange(), | 260 m_fragment = createFragmentFromText(selection.toNormalizedEphemeralRange(), |
| 257 evt->text()); | 261 evt->text()); |
| 258 if (!m_fragment->hasChildren()) | 262 if (!m_fragment->hasChildren()) |
| 259 return; | 263 return; |
| 260 | 264 |
| 261 holder = insertFragmentForTestRendering(editableRoot); | 265 holder = insertFragmentForTestRendering(editableRoot); |
| 262 removeInterchangeNodes(holder); | 266 removeInterchangeNodes(holder); |
| 263 removeUnrenderedNodes(holder); | 267 removeUnrenderedNodes(holder); |
| 264 restoreAndRemoveTestRenderingNodesToFragment(holder); | 268 restoreAndRemoveTestRenderingNodesToFragment(holder); |
| 265 } | 269 } |
| (...skipping 1754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2020 visitor->trace(m_startOfInsertedContent); | 2024 visitor->trace(m_startOfInsertedContent); |
| 2021 visitor->trace(m_endOfInsertedContent); | 2025 visitor->trace(m_endOfInsertedContent); |
| 2022 visitor->trace(m_insertionStyle); | 2026 visitor->trace(m_insertionStyle); |
| 2023 visitor->trace(m_documentFragment); | 2027 visitor->trace(m_documentFragment); |
| 2024 visitor->trace(m_startOfInsertedRange); | 2028 visitor->trace(m_startOfInsertedRange); |
| 2025 visitor->trace(m_endOfInsertedRange); | 2029 visitor->trace(m_endOfInsertedRange); |
| 2026 CompositeEditCommand::trace(visitor); | 2030 CompositeEditCommand::trace(visitor); |
| 2027 } | 2031 } |
| 2028 | 2032 |
| 2029 } // namespace blink | 2033 } // namespace blink |
| OLD | NEW |