No subject


Fri Mar 7 15:32:22 PST 2014


te
and the call site should create the string as needed.

> Source/WebKit/cf/WebCoreSupport/WebInspectorClientCF.cpp:86
>	   *setting =3D "";

Unrelated but that looks like a bad use of strings. When a value does not
exist, the return should be a null string, not an empty string.

> Source/WebKit2/Shared/mac/ChildProcessMac.mm:143
>      String path =3D String::fromUTF8(pwd.pw_dir);
> -    path.append("/Library");
> +    path.append(ASCIILiteral("/Library"));

String path =3D String::fromUTF8(pwd.pw_dir) + "/Library";

> Source/WebKit2/Shared/mac/ChildProcessMac.mm:147
> -    path.append("/Preferences");
> +    path.append(ASCIILiteral("/Preferences"));

Let's use StringOperators here, no need to create a new StringImpl for
"/Preferences"

> Source/WebKit2/WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:57
>      case NSLeftTextAlignment:
> -	   return "left";
> +	   return ASCIILiteral("left");

I hope clang only generate one constructor here.

> Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm:144
> +    map->add(ASCIILiteral("insertNewlineIgnoringFieldEditor:"),
"InsertNewline");
> +    map->add(ASCIILiteral("insertParagraphSeparator:"), "InsertNewline");
> +    map->add(ASCIILiteral("insertTabIgnoringFieldEditor:"), "InsertTab");
> +    map->add(ASCIILiteral("pageDown:"), "MovePageDown");
> +    map->add(ASCIILiteral("pageDownAndModifySelection:"),
"MovePageDownAndModifySelection");
> +    map->add(ASCIILiteral("pageUp:"), "MovePageUp");
> +    map->add(ASCIILiteral("pageUpAndModifySelection:"),
"MovePageUpAndModifySelection");

Why only the first of the two strings?=


More information about the webkit-reviews mailing list