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 1625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1636 // RemoveParaFormat (not supported) | 1636 // RemoveParaFormat (not supported) |
1637 // SaveAs (not supported) | 1637 // SaveAs (not supported) |
1638 // SizeToControl (not supported) | 1638 // SizeToControl (not supported) |
1639 // SizeToControlHeight (not supported) | 1639 // SizeToControlHeight (not supported) |
1640 // SizeToControlWidth (not supported) | 1640 // SizeToControlWidth (not supported) |
1641 // Stop (not supported) | 1641 // Stop (not supported) |
1642 // StopImage (not supported) | 1642 // StopImage (not supported) |
1643 // Unbookmark (not supported) | 1643 // Unbookmark (not supported) |
1644 | 1644 |
1645 CommandMap& commandMap = *new CommandMap; | 1645 CommandMap& commandMap = *new CommandMap; |
1646 #if ASSERT_ENABLED | 1646 #if ENABLE(ASSERT) |
1647 HashSet<int> idSet; | 1647 HashSet<int> idSet; |
1648 #endif | 1648 #endif |
1649 for (size_t i = 0; i < WTF_ARRAY_LENGTH(commands); ++i) { | 1649 for (size_t i = 0; i < WTF_ARRAY_LENGTH(commands); ++i) { |
1650 const CommandEntry& command = commands[i]; | 1650 const CommandEntry& command = commands[i]; |
1651 ASSERT(!commandMap.get(command.name)); | 1651 ASSERT(!commandMap.get(command.name)); |
1652 commandMap.set(command.name, &command.command); | 1652 commandMap.set(command.name, &command.command); |
1653 #if ASSERT_ENABLED | 1653 #if ENABLE(ASSERT) |
1654 ASSERT(!idSet.contains(command.command.idForUserMetrics)); | 1654 ASSERT(!idSet.contains(command.command.idForUserMetrics)); |
1655 idSet.add(command.command.idForUserMetrics); | 1655 idSet.add(command.command.idForUserMetrics); |
1656 #endif | 1656 #endif |
1657 } | 1657 } |
1658 | 1658 |
1659 return commandMap; | 1659 return commandMap; |
1660 } | 1660 } |
1661 | 1661 |
1662 static const EditorInternalCommand* internalCommand(const String& commandName) | 1662 static const EditorInternalCommand* internalCommand(const String& commandName) |
1663 { | 1663 { |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1793 { | 1793 { |
1794 return m_command && m_command->isTextInsertion; | 1794 return m_command && m_command->isTextInsertion; |
1795 } | 1795 } |
1796 | 1796 |
1797 int Editor::Command::idForHistogram() const | 1797 int Editor::Command::idForHistogram() const |
1798 { | 1798 { |
1799 return isSupported() ? m_command->idForUserMetrics : 0; | 1799 return isSupported() ? m_command->idForUserMetrics : 0; |
1800 } | 1800 } |
1801 | 1801 |
1802 } // namespace WebCore | 1802 } // namespace WebCore |
OLD | NEW |