Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Side by Side Diff: third_party/WebKit/Source/web/WebAXObject.cpp

Issue 2017053003: Remove StringBuilder::appendLiteral. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 return WebString(); 750 return WebString();
751 751
752 DEFINE_STATIC_LOCAL(String, modifierString, ()); 752 DEFINE_STATIC_LOCAL(String, modifierString, ());
753 if (modifierString.isNull()) { 753 if (modifierString.isNull()) {
754 unsigned modifiers = EventHandler::accessKeyModifiers(); 754 unsigned modifiers = EventHandler::accessKeyModifiers();
755 // Follow the same order as Mozilla MSAA implementation: 755 // Follow the same order as Mozilla MSAA implementation:
756 // Ctrl+Alt+Shift+Meta+key. MSDN states that keyboard shortcut strings 756 // Ctrl+Alt+Shift+Meta+key. MSDN states that keyboard shortcut strings
757 // should not be localized and defines the separator as "+". 757 // should not be localized and defines the separator as "+".
758 StringBuilder modifierStringBuilder; 758 StringBuilder modifierStringBuilder;
759 if (modifiers & PlatformEvent::CtrlKey) 759 if (modifiers & PlatformEvent::CtrlKey)
760 modifierStringBuilder.appendLiteral("Ctrl+"); 760 modifierStringBuilder.append("Ctrl+");
761 if (modifiers & PlatformEvent::AltKey) 761 if (modifiers & PlatformEvent::AltKey)
762 modifierStringBuilder.appendLiteral("Alt+"); 762 modifierStringBuilder.append("Alt+");
763 if (modifiers & PlatformEvent::ShiftKey) 763 if (modifiers & PlatformEvent::ShiftKey)
764 modifierStringBuilder.appendLiteral("Shift+"); 764 modifierStringBuilder.append("Shift+");
765 if (modifiers & PlatformEvent::MetaKey) 765 if (modifiers & PlatformEvent::MetaKey)
766 modifierStringBuilder.appendLiteral("Win+"); 766 modifierStringBuilder.append("Win+");
767 modifierString = modifierStringBuilder.toString(); 767 modifierString = modifierStringBuilder.toString();
768 } 768 }
769 769
770 return String(modifierString + accessKey); 770 return String(modifierString + accessKey);
771 } 771 }
772 772
773 WebString WebAXObject::language() const 773 WebString WebAXObject::language() const
774 { 774 {
775 if (isDetached()) 775 if (isDetached())
776 return WebString(); 776 return WebString();
(...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after
1563 m_private = object; 1563 m_private = object;
1564 return *this; 1564 return *this;
1565 } 1565 }
1566 1566
1567 WebAXObject::operator AXObject*() const 1567 WebAXObject::operator AXObject*() const
1568 { 1568 {
1569 return m_private.get(); 1569 return m_private.get();
1570 } 1570 }
1571 1571
1572 } // namespace blink 1572 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698