Remove all uses of deprecatedCharacters from JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=130304

Reviewed by Anders Carlsson.

Source/JavaScriptCore:

* API/JSValueRef.cpp:
(JSValueMakeFromJSONString): Use characters16 in the 16-bit code path.
* API/OpaqueJSString.cpp:
(OpaqueJSString::~OpaqueJSString): Use characters 16 in the 16-bit code path.
(OpaqueJSString::identifier): Get rid of custom Identifier constructor, and
juse use the standard one that takes a String.
(OpaqueJSString::characters): Use getCharactersWithUpconvert instead of a
hand-written alternative.

* bindings/ScriptValue.cpp:
(Deprecated::jsToInspectorValue): Create InspectorString from String directly
instead of involving a character pointer. Use the String from Identifier
directly instead of making a new String.

* inspector/ContentSearchUtilities.cpp:
(Inspector::ContentSearchUtilities::createSearchRegexSource): Use StringBuilder
instead of building a String a character at a time. This is still a very slow
way to do this. Also use strchr to search for a character instead of building
a String every time just to use find on it.

* inspector/InspectorValues.cpp:
(Inspector::doubleQuoteString): Remove unnecessary trip through a
character pointer. This is still a really slow way to do this.
(Inspector::InspectorValue::parseJSON): Use StringView::upconvertedCharacters
instead of String::deprecatedCharacters. Still slow to always upconvert.

* runtime/DateConstructor.cpp: Removed unneeded include.
* runtime/DatePrototype.cpp: Ditto.

* runtime/Identifier.h: Removed deprecatedCharacters function.

* runtime/JSGlobalObjectFunctions.cpp:
(JSC::encode): Added a type cast to avoid ambiguity with the two character-
appending functions from JSStringBuilder. Removed unneeded code duplicating
what JSStringBuilder already does in its character append function.
(JSC::decode): Deleted code that creates a JSStringBuilder that is never used.
(JSC::parseIntOverflow): Changed lengths to unsigned. Made only the overload that
is used outside this file have external linkage. Added a new overload that takes
a StringView.
(JSC::parseInt): Use StringView::substring to call parseIntOverflow.
(JSC::globalFuncEscape): Use JSBuilder::append in a more efficient way for a
single character.

* runtime/JSGlobalObjectFunctions.h: Removed unused overloads of parseIntOverflow.

* runtime/JSStringBuilder.h: Marked this "lightly deprecated".
(JSC::JSStringBuilder::append): Overloaded for better speed with 8-bit characters.
Made one overload private. Fixed a performance bug where we would reserve capacity
in the 8-bit buffer but then append to the 16-bit buffer.

* runtime/ObjectPrototype.cpp: Removed unneeded include.

* runtime/StringPrototype.cpp:
(JSC::stringProtoFuncFontsize): Use StringView::getCharactersWithUpconvert.
(JSC::stringProtoFuncLink): Ditto.

Source/WTF:

* wtf/dtoa.h:
(WTF::parseDouble): Added an overload that takes a StringView.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165703 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: vended backend commands file should be generated as part of the build
https://bugs.webkit.org/show_bug.cgi?id=130110

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* JavaScriptCore.xcodeproj/project.pbxproj: Copy InspectorJSBackendCommands.js to the
private headers directory.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj: Copy InspectorWebBackendCommands.js to the
private headers directory.

Source/WebInspectorUI:

Copy the backend commands generated in other frameworks into our built products directory.

* Configurations/WebInspectorUIFramework.xcconfig: Set up variables so we can pull backend
commands files from the private headers directory of other frameworks.
* Scripts/copy-user-interface-resources.sh: Always ditto inspector backend commands.
* UserInterface/Protocol/InspectorJSBackendCommands.js: Removed.
* UserInterface/Protocol/InspectorWebBackendCommands.js: Removed.
* WebInspectorUI.vcxproj/WebInspectorUIPostBuild.cmd: Copy over the generated
backend commands files from the other frameworks.
* WebInspectorUI.xcodeproj/project.pbxproj: Add JavaScriptCore and WebCore as
framework dependencies so Xcode builds them first.

Source/WebKit2:

* PlatformGTK.cmake: Copy over generated inspector backend commands files.

Tools:

* Scripts/build-webkit: build WebInspectorUI after WebCore but before WebKit.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165704 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove uses of "cat" in DerivedSources.make outside platform-specific rules
https://bugs.webkit.org/show_bug.cgi?id=130307

Reviewed by Anders Carlsson.

* DerivedSources.make: Use "perl -pe ''" instead of "cat".

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165705 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Follow-up: Fix undefined behavior in WTF::equal() in StringImpl.h for i386/x86_64
<http://webkit.org/b/130283>
<rdar://problem/16281477>

Reviewed by Darin Adler.

* wtf/text/StringImpl.h:
(WTF::loadUnaligned): Restore behavior prior to r165681 for
compilers other than clang.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165706 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move GTK WebKit2 code to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=129672

Reviewed by Anders Carlsson.

Repace uses of OwnPtr and PassOwnPtr in GTK-specific WebKit2 code with std::unique_ptr.

* Shared/Downloads/Download.h:
* Shared/Downloads/soup/DownloadSoup.cpp:
(WebKit::Download::start):
(WebKit::Download::startWithHandle):
(WebKit::Download::platformInvalidate):
* UIProcess/API/gtk/PageClientImpl.cpp:
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/API/gtk/WebKitContextMenuItem.cpp:
(webkitContextMenuItemCreate):
(webkitContextMenuItemCreateForGtkItem):
(webkit_context_menu_item_new):
(webkit_context_menu_item_new_from_stock_action):
(webkit_context_menu_item_new_from_stock_action_with_label):
(webkit_context_menu_item_new_with_submenu):
(webkit_context_menu_item_new_separator):
* UIProcess/API/gtk/WebKitTextChecker.h:
* UIProcess/API/gtk/WebKitWebContext.cpp:
(createDefaultWebContext):
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseConstructed):
* WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
(WebKit::WebPrintOperationGtk::print):
* WebProcess/gtk/WebGtkExtensionManager.cpp:
(WebKit::WebGtkExtensionManager::initialize):
* WebProcess/soup/WebKitSoupRequestInputStream.cpp:
(webkitSoupRequestInputStreamPendingReadAsyncComplete):
(webkitSoupRequestInputStreamReadAsync):
* WebProcess/soup/WebSoupRequestManager.cpp:
(WebKit::WebSoupRequestManager::send):
* WebProcess/soup/WebSoupRequestManager.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165707 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove OwnPtr.h, PassOwnPtr.h header inclusions in Source/WebCore/html/parser/ code
https://bugs.webkit.org/show_bug.cgi?id=129667

Reviewed by Anders Carlsson.

Remove unnecessary inclusions of the OwnPtr.h and PassOwnPtr.h headers
in the code under Source/WebCore/html/parser/.

* html/parser/HTMLParserScheduler.h:
* html/parser/HTMLToken.h:
* html/parser/HTMLTreeBuilder.h:
* html/parser/XSSAuditor.h:
* html/parser/XSSAuditorDelegate.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165708 268f45cc-cd09-0410-ab3c-d52691b4dbfc