| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 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 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 return !noDefaultProcessing; | 553 return !noDefaultProcessing; |
| 554 } | 554 } |
| 555 | 555 |
| 556 bool Editor::canSmartReplaceWithPasteboard(Pasteboard* pasteboard) | 556 bool Editor::canSmartReplaceWithPasteboard(Pasteboard* pasteboard) |
| 557 { | 557 { |
| 558 return smartInsertDeleteEnabled() && pasteboard->canSmartReplace(); | 558 return smartInsertDeleteEnabled() && pasteboard->canSmartReplace(); |
| 559 } | 559 } |
| 560 | 560 |
| 561 void Editor::replaceSelectionWithFragment(DocumentFragment* fragment, bool selec
tReplacement, bool smartReplace, bool matchStyle) | 561 void Editor::replaceSelectionWithFragment(DocumentFragment* fragment, bool selec
tReplacement, bool smartReplace, bool matchStyle) |
| 562 { | 562 { |
| 563 frame().document()->updateStyleAndLayoutIgnorePendingStylesheets(); |
| 563 if (frame().selection().isNone() || !frame().selection().isContentEditable()
|| !fragment) | 564 if (frame().selection().isNone() || !frame().selection().isContentEditable()
|| !fragment) |
| 564 return; | 565 return; |
| 565 | 566 |
| 566 ReplaceSelectionCommand::CommandOptions options = ReplaceSelectionCommand::P
reventNesting | ReplaceSelectionCommand::SanitizeFragment; | 567 ReplaceSelectionCommand::CommandOptions options = ReplaceSelectionCommand::P
reventNesting | ReplaceSelectionCommand::SanitizeFragment; |
| 567 if (selectReplacement) | 568 if (selectReplacement) |
| 568 options |= ReplaceSelectionCommand::SelectReplacement; | 569 options |= ReplaceSelectionCommand::SelectReplacement; |
| 569 if (smartReplace) | 570 if (smartReplace) |
| 570 options |= ReplaceSelectionCommand::SmartReplace; | 571 options |= ReplaceSelectionCommand::SmartReplace; |
| 571 if (matchStyle) | 572 if (matchStyle) |
| 572 options |= ReplaceSelectionCommand::MatchStyle; | 573 options |= ReplaceSelectionCommand::MatchStyle; |
| (...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1430 } | 1431 } |
| 1431 | 1432 |
| 1432 DEFINE_TRACE(Editor) | 1433 DEFINE_TRACE(Editor) |
| 1433 { | 1434 { |
| 1434 visitor->trace(m_frame); | 1435 visitor->trace(m_frame); |
| 1435 visitor->trace(m_lastEditCommand); | 1436 visitor->trace(m_lastEditCommand); |
| 1436 visitor->trace(m_mark); | 1437 visitor->trace(m_mark); |
| 1437 } | 1438 } |
| 1438 | 1439 |
| 1439 } // namespace blink | 1440 } // namespace blink |
| OLD | NEW |