OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 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 * Copyright (C) 2009 Igalia S.L. | 4 * Copyright (C) 2009 Igalia S.L. |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 static bool executeInsertBacktab(Frame& frame, Event* event, EditorCommandSource
, const String&) | 482 static bool executeInsertBacktab(Frame& frame, Event* event, EditorCommandSource
, const String&) |
483 { | 483 { |
484 return targetFrame(frame, event)->eventHandler().handleTextInputEvent("\t",
event, TextEventInputBackTab); | 484 return targetFrame(frame, event)->eventHandler().handleTextInputEvent("\t",
event, TextEventInputBackTab); |
485 } | 485 } |
486 | 486 |
487 static bool executeInsertHorizontalRule(Frame& frame, Event*, EditorCommandSourc
e, const String& value) | 487 static bool executeInsertHorizontalRule(Frame& frame, Event*, EditorCommandSourc
e, const String& value) |
488 { | 488 { |
489 ASSERT(frame.document()); | 489 ASSERT(frame.document()); |
490 RefPtr<HTMLHRElement> rule = HTMLHRElement::create(*frame.document()); | 490 RefPtr<HTMLHRElement> rule = HTMLHRElement::create(*frame.document()); |
491 if (!value.isEmpty()) | 491 if (!value.isEmpty()) |
492 rule->setIdAttribute(value); | 492 rule->setIdAttribute(AtomicString(value)); |
493 return executeInsertNode(frame, rule.release()); | 493 return executeInsertNode(frame, rule.release()); |
494 } | 494 } |
495 | 495 |
496 static bool executeInsertHTML(Frame& frame, Event*, EditorCommandSource, const S
tring& value) | 496 static bool executeInsertHTML(Frame& frame, Event*, EditorCommandSource, const S
tring& value) |
497 { | 497 { |
498 ASSERT(frame.document()); | 498 ASSERT(frame.document()); |
499 return executeInsertFragment(frame, createFragmentFromMarkup(*frame.document
(), value, "")); | 499 return executeInsertFragment(frame, createFragmentFromMarkup(*frame.document
(), value, "")); |
500 } | 500 } |
501 | 501 |
502 static bool executeInsertImage(Frame& frame, Event*, EditorCommandSource, const
String& value) | 502 static bool executeInsertImage(Frame& frame, Event*, EditorCommandSource, const
String& value) |
(...skipping 1220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1723 return m_command->state(*m_frame, triggeringEvent) == TrueTriState ? "tr
ue" : "false"; | 1723 return m_command->state(*m_frame, triggeringEvent) == TrueTriState ? "tr
ue" : "false"; |
1724 return m_command->value(*m_frame, triggeringEvent); | 1724 return m_command->value(*m_frame, triggeringEvent); |
1725 } | 1725 } |
1726 | 1726 |
1727 bool Editor::Command::isTextInsertion() const | 1727 bool Editor::Command::isTextInsertion() const |
1728 { | 1728 { |
1729 return m_command && m_command->isTextInsertion; | 1729 return m_command && m_command->isTextInsertion; |
1730 } | 1730 } |
1731 | 1731 |
1732 } // namespace WebCore | 1732 } // namespace WebCore |
OLD | NEW |