Bug 95904 - Remove String::operator+=() from windows platform code
Summary: Remove String::operator+=() from windows platform code
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: All Windows XP
: P2 Normal
Assignee: Patrick R. Gansterer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-05 15:37 PDT by Patrick R. Gansterer
Modified: 2012-09-06 05:54 PDT (History)
1 user (show)

See Also:


Attachments
Patch (7.21 KB, patch)
2012-09-05 15:41 PDT, Patrick R. Gansterer
benjamin: review+
benjamin: commit-queue-
Details | Formatted Diff | Diff
Patch (7.23 KB, patch)
2012-09-05 16:13 PDT, Patrick R. Gansterer
buildbot: commit-queue-
Details | Formatted Diff | Diff
Patch (7.24 KB, patch)
2012-09-06 00:01 PDT, Patrick R. Gansterer
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick R. Gansterer 2012-09-05 15:37:36 PDT
Remove String::operator+=() from windows platform code
Comment 1 Patrick R. Gansterer 2012-09-05 15:41:36 PDT
Created attachment 162354 [details]
Patch
Comment 2 Benjamin Poulain 2012-09-05 15:54:00 PDT
Comment on attachment 162354 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=162354&action=review

> Source/WebCore/platform/win/ClipboardWin.cpp:150
> -    String result(static_cast<UChar*>(fsPathBuffer));
> -    result += String(extension);
> -    return result;
> +    return String(static_cast<UChar*>(fsPathBuffer)) + extension;

I think you'd better use makeString(static_cast<UChar*>(fsPathBuffer), extension).

> Source/WebKit/win/AccessibleBase.cpp:377
> -            accessKeyModifiers += "Ctrl+";
> +            accessKeyModifiersBuilder.append("Ctrl+");
>          if (modifiers & PlatformEvent::AltKey)
> -            accessKeyModifiers += "Alt+";
> +            accessKeyModifiersBuilder.append("Alt+");
>          if (modifiers & PlatformEvent::ShiftKey)
> -            accessKeyModifiers += "Shift+";
> +            accessKeyModifiersBuilder.append("Shift+");
>          if (modifiers & PlatformEvent::MetaKey)
> -            accessKeyModifiers += "Win+";
> +            accessKeyModifiersBuilder.append("Win+");

append() -> appendLiteral()

> Source/WebKit/win/ChangeLog:15
> +        (if):

Confused prepare-ChangeLog is confused

> Source/WebKit/win/WebView.cpp:5549
> +            result.append(", "); \

appendLiteral()

> Source/WebKit/win/WebView.cpp:5550
> +        result.append(#name); \

appendLiteral()

> Source/WebKit/win/WebView.cpp:-5561
> -    if (lparam & GCS_COMPATTR) {
> -        result = "GCS_COMPATTR";
> -        needsComma = true;
> -    }

This is strange, but I can't figure why this code is there.
Maybe needsComma was not in APPEND_ARGUMENT_NAME originally.

> Source/WebKit2/UIProcess/win/WebView.cpp:1245
> +            result.append(", "); \
> +        result.append(#name); \

appendLiteral().
Comment 3 Patrick R. Gansterer 2012-09-05 16:13:52 PDT
Created attachment 162362 [details]
Patch
Comment 4 Build Bot 2012-09-05 16:45:29 PDT
Comment on attachment 162362 [details]
Patch

Attachment 162362 [details] did not pass win-ews (win):
Output: http://queues.webkit.org/results/13769123
Comment 5 Patrick R. Gansterer 2012-09-06 00:01:19 PDT
Created attachment 162431 [details]
Patch
Comment 6 WebKit Review Bot 2012-09-06 05:54:19 PDT
Comment on attachment 162431 [details]
Patch

Clearing flags on attachment: 162431

Committed r127732: <http://trac.webkit.org/changeset/127732>
Comment 7 WebKit Review Bot 2012-09-06 05:54:22 PDT
All reviewed patches have been landed.  Closing bug.