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

Side by Side Diff: Tools/DumpRenderTree/chromium/TestRunner/src/EventSender.cpp

Issue 15806014: Reduce usage of WebString::data (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 snprintf(functionChars, 10, "F%d", i); 609 snprintf(functionChars, 10, "F%d", i);
610 string functionKeyName(functionChars); 610 string functionKeyName(functionChars);
611 if (functionKeyName == codeStr) { 611 if (functionKeyName == codeStr) {
612 code = VKEY_F1 + (i - 1); 612 code = VKEY_F1 + (i - 1);
613 break; 613 break;
614 } 614 }
615 } 615 }
616 if (!code) { 616 if (!code) {
617 WebString webCodeStr = WebString::fromUTF8(codeStr.data(), codeStr.s ize()); 617 WebString webCodeStr = WebString::fromUTF8(codeStr.data(), codeStr.s ize());
618 WEBKIT_ASSERT(webCodeStr.length() == 1); 618 WEBKIT_ASSERT(webCodeStr.length() == 1);
619 text = code = webCodeStr.data()[0]; 619 text = code = webCodeStr.at(0);
620 needsShiftKeyModifier = needsShiftModifier(code); 620 needsShiftKeyModifier = needsShiftModifier(code);
621 if ((code & 0xFF) >= 'a' && (code & 0xFF) <= 'z') 621 if ((code & 0xFF) >= 'a' && (code & 0xFF) <= 'z')
622 code -= 'a' - 'A'; 622 code -= 'a' - 'A';
623 generateChar = true; 623 generateChar = true;
624 } 624 }
625 625
626 if ("(" == codeStr) { 626 if ("(" == codeStr) {
627 code = '9'; 627 code = '9';
628 needsShiftKeyModifier = true; 628 needsShiftKeyModifier = true;
629 } 629 }
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after
1375 { 1375 {
1376 result->setNull(); 1376 result->setNull();
1377 } 1377 }
1378 1378
1379 void EventSender::clearKillRing(const CppArgumentList&, CppVariant* result) 1379 void EventSender::clearKillRing(const CppArgumentList&, CppVariant* result)
1380 { 1380 {
1381 result->setNull(); 1381 result->setNull();
1382 } 1382 }
1383 1383
1384 } 1384 }
OLDNEW
« no previous file with comments | « Source/core/platform/chromium/support/WebString.cpp ('k') | Tools/DumpRenderTree/chromium/TestRunner/src/SpellCheckClient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698