Range shouldn't bloatCharacters()

StringBuilder is smarter than you'd think.

R=eseidel@chromium.org
BUG=254708

Review URL: https://codereview.chromium.org/18029015

git-svn-id: svn://svn.chromium.org/blink/trunk@153259 bbb929c8-8fbe-4397-9dbb-9b2b20218538
V8StringResource shouldn't bloatCharacters()

This call to bloatCharacters() is actually harmless because the string is
always 16 bits wide. We can just call characters16(). I've also added some
ASSERTs to catch any future bugs earlier.

R=eseidel@chromium.org
BUG=254708

Review URL: https://codereview.chromium.org/18120004

git-svn-id: svn://svn.chromium.org/blink/trunk@153260 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Stop using deprecatedCharactersWithNullTermination in SQLite code

Merge of http://trac.webkit.org/changeset/152134
https://bugs.webkit.org/show_bug.cgi?id=118146

Reviewed by Filip Pizlo.

Turns out SQLite uses UTF-8 internally so we might just as well use the SQLite functions
that take UTF-8 strings and do the conversion ourselves. This has the added advantage that we can
use String::utf8() which returns a null-terminated string.

Require a version of SQLite newer than 3.6.16 so we can remove two workarounds. 3.6.16 was released
4 years ago so supported port is likely to have it.

* platform/sql/SQLiteFileSystem.cpp:
(WebCore::SQLiteFileSystem::openDatabase):
Use sqlite3_open instead of sqlite3_open16.

* platform/sql/SQLiteFileSystem.h:
Fix parameter name capitalization.

* platform/sql/SQLiteStatement.cpp:
(WebCore::SQLiteStatement::prepare):
Use sqlite3_prepare_v2. Also, pass the length of the string (including the null character), since
that lets SQLite avoid a buffer copy. Remove a workaround for versions of SQLite older than 3.6.16.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/18176008

git-svn-id: svn://svn.chromium.org/blink/trunk@153261 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Remove call to deprecatedCharactersWithNullTermination() in WebGL code

Merge http://trac.webkit.org/changeset/152137
https://bugs.webkit.org/show_bug.cgi?id=118154

Reviewed by Dean Jackson.

Remove an unneeded call to deprecatedCharactersWithNullTermination(). Ultimately,
the string we used to call it on gets converted to an UTF-8 CString that has a null character anyway.

* html/canvas/WebGLProgram.cpp:
(WebCore::WebGLProgram::cacheActiveAttribLocations):

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/18089018

git-svn-id: svn://svn.chromium.org/blink/trunk@153262 bbb929c8-8fbe-4397-9dbb-9b2b20218538
XMLDocumentParser shouldn't use bloatedCharacters()

libxml can take input in a number of different encodings. Rather than
upconverting to UTF-16 just to call libxml, we can instead give the input to
libxml in Latin-1 directly.

R=eseidel@chromium.org
BUG=254708

Review URL: https://codereview.chromium.org/18232002

git-svn-id: svn://svn.chromium.org/blink/trunk@153263 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Fix mess in ImageDecoder::setRGB* methods after r153004

I was acidentally changed the order of alpha tests (0, 255).
Also my asserts are adding more noise than value so remove them.

R=noel@chromium.org

Review URL: https://chromiumcodereview.appspot.com/17906002

git-svn-id: svn://svn.chromium.org/blink/trunk@153264 bbb929c8-8fbe-4397-9dbb-9b2b20218538