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 1608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1619 // RemoveParaFormat (not supported) | 1619 // RemoveParaFormat (not supported) |
1620 // SaveAs (not supported) | 1620 // SaveAs (not supported) |
1621 // SizeToControl (not supported) | 1621 // SizeToControl (not supported) |
1622 // SizeToControlHeight (not supported) | 1622 // SizeToControlHeight (not supported) |
1623 // SizeToControlWidth (not supported) | 1623 // SizeToControlWidth (not supported) |
1624 // Stop (not supported) | 1624 // Stop (not supported) |
1625 // StopImage (not supported) | 1625 // StopImage (not supported) |
1626 // Unbookmark (not supported) | 1626 // Unbookmark (not supported) |
1627 | 1627 |
1628 CommandMap& commandMap = *new CommandMap; | 1628 CommandMap& commandMap = *new CommandMap; |
1629 #if !ASSERT_DISABLED | 1629 #if ASSERT_ENABLED |
1630 HashSet<int> idSet; | 1630 HashSet<int> idSet; |
1631 #endif | 1631 #endif |
1632 for (size_t i = 0; i < WTF_ARRAY_LENGTH(commands); ++i) { | 1632 for (size_t i = 0; i < WTF_ARRAY_LENGTH(commands); ++i) { |
1633 const CommandEntry& command = commands[i]; | 1633 const CommandEntry& command = commands[i]; |
1634 ASSERT(!commandMap.get(command.name)); | 1634 ASSERT(!commandMap.get(command.name)); |
1635 commandMap.set(command.name, &command.command); | 1635 commandMap.set(command.name, &command.command); |
1636 #if !ASSERT_DISABLED | 1636 #if ASSERT_ENABLED |
1637 ASSERT(!idSet.contains(command.command.idForUserMetrics)); | 1637 ASSERT(!idSet.contains(command.command.idForUserMetrics)); |
1638 idSet.add(command.command.idForUserMetrics); | 1638 idSet.add(command.command.idForUserMetrics); |
1639 #endif | 1639 #endif |
1640 } | 1640 } |
1641 | 1641 |
1642 return commandMap; | 1642 return commandMap; |
1643 } | 1643 } |
1644 | 1644 |
1645 static const EditorInternalCommand* internalCommand(const String& commandName) | 1645 static const EditorInternalCommand* internalCommand(const String& commandName) |
1646 { | 1646 { |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1734 { | 1734 { |
1735 return m_command && m_command->isTextInsertion; | 1735 return m_command && m_command->isTextInsertion; |
1736 } | 1736 } |
1737 | 1737 |
1738 int Editor::Command::idForHistogram() const | 1738 int Editor::Command::idForHistogram() const |
1739 { | 1739 { |
1740 return isSupported() ? m_command->idForUserMetrics : 0; | 1740 return isSupported() ? m_command->idForUserMetrics : 0; |
1741 } | 1741 } |
1742 | 1742 |
1743 } // namespace WebCore | 1743 } // namespace WebCore |
OLD | NEW |