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 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
622 RefPtrWillBeRawPtr<EditingStyle> selectionStyle = EditingStyle::styleAtSelec
tionStart(m_frame.selection().selection(), | 622 RefPtrWillBeRawPtr<EditingStyle> selectionStyle = EditingStyle::styleAtSelec
tionStart(m_frame.selection().selection(), |
623 propertyID == CSSPropertyBackgroundColor); | 623 propertyID == CSSPropertyBackgroundColor); |
624 if (!selectionStyle || !selectionStyle->style()) | 624 if (!selectionStyle || !selectionStyle->style()) |
625 return String(); | 625 return String(); |
626 | 626 |
627 if (propertyID == CSSPropertyFontSize) | 627 if (propertyID == CSSPropertyFontSize) |
628 return String::number(selectionStyle->legacyFontSize(m_frame.document())
); | 628 return String::number(selectionStyle->legacyFontSize(m_frame.document())
); |
629 return selectionStyle->style()->getPropertyValue(propertyID); | 629 return selectionStyle->style()->getPropertyValue(propertyID); |
630 } | 630 } |
631 | 631 |
632 void Editor::indent() | |
633 { | |
634 ASSERT(m_frame.document()); | |
635 IndentOutdentCommand::create(*m_frame.document(), IndentOutdentCommand::Inde
nt)->apply(); | |
636 } | |
637 | |
638 void Editor::outdent() | |
639 { | |
640 ASSERT(m_frame.document()); | |
641 IndentOutdentCommand::create(*m_frame.document(), IndentOutdentCommand::Outd
ent)->apply(); | |
642 } | |
643 | |
644 static void dispatchEditableContentChangedEvents(PassRefPtrWillBeRawPtr<Element>
startRoot, PassRefPtrWillBeRawPtr<Element> endRoot) | 632 static void dispatchEditableContentChangedEvents(PassRefPtrWillBeRawPtr<Element>
startRoot, PassRefPtrWillBeRawPtr<Element> endRoot) |
645 { | 633 { |
646 if (startRoot) | 634 if (startRoot) |
647 startRoot->dispatchEvent(Event::create(EventTypeNames::webkitEditableCon
tentChanged), IGNORE_EXCEPTION); | 635 startRoot->dispatchEvent(Event::create(EventTypeNames::webkitEditableCon
tentChanged), IGNORE_EXCEPTION); |
648 if (endRoot && endRoot != startRoot) | 636 if (endRoot && endRoot != startRoot) |
649 endRoot->dispatchEvent(Event::create(EventTypeNames::webkitEditableConte
ntChanged), IGNORE_EXCEPTION); | 637 endRoot->dispatchEvent(Event::create(EventTypeNames::webkitEditableConte
ntChanged), IGNORE_EXCEPTION); |
650 } | 638 } |
651 | 639 |
652 void Editor::appliedEditing(PassRefPtrWillBeRawPtr<CompositeEditCommand> cmd) | 640 void Editor::appliedEditing(PassRefPtrWillBeRawPtr<CompositeEditCommand> cmd) |
653 { | 641 { |
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1271 frame().selection().setShouldShowBlockCursor(m_overwriteModeEnabled); | 1259 frame().selection().setShouldShowBlockCursor(m_overwriteModeEnabled); |
1272 } | 1260 } |
1273 | 1261 |
1274 void Editor::trace(Visitor* visitor) | 1262 void Editor::trace(Visitor* visitor) |
1275 { | 1263 { |
1276 visitor->trace(m_lastEditCommand); | 1264 visitor->trace(m_lastEditCommand); |
1277 visitor->trace(m_mark); | 1265 visitor->trace(m_mark); |
1278 } | 1266 } |
1279 | 1267 |
1280 } // namespace WebCore | 1268 } // namespace WebCore |
OLD | NEW |