Get rid of OpaqueJSString::deprecatedCharacters()
https://bugs.webkit.org/show_bug.cgi?id=127161

Reviewed by Sam Weinig.

Handle OpaqueJSString::m_string being either 8-bit or 16-bit and add extra
code paths for the 8-bit cases.

Unfortunately, JSStringGetCharactersPtr is still expected to return a 16-bit character pointer.
Handle this by storing a separate 16-bit string and initializing it on demand when JSStringGetCharactersPtr
is called. This has the nice side effect of making JSStringGetCharactersPtr thread-safe when it wasn't before.
(In theory, someone could have a JSStringRef backed by an 8-bit string and call JSStringGetCharactersPtr on it
causing an unsafe upconversion to a 16-bit string).

* API/JSStringRef.cpp:
(JSStringGetCharactersPtr):
Call OpaqueJSString::characters.

(JSStringGetUTF8CString):
Add a code path that handles 8-bit strings.

(JSStringIsEqual):
Call OpaqueJSString::equal.

* API/JSStringRefCF.cpp:
(JSStringCreateWithCFString):
Reformat the code to use an early return instead of putting most of the code inside the body of an if statement.

(JSStringCopyCFString):
Create an 8-bit CFStringRef if possible.

* API/OpaqueJSString.cpp:
(OpaqueJSString::create):
Use nullptr.

(OpaqueJSString::~OpaqueJSString):
Free m_characters.

(OpaqueJSString::characters):
Do the up-conversion and store the result in m_characters.

(OpaqueJSString::equal):
New helper function.

* API/OpaqueJSString.h:
(OpaqueJSString::is8Bit):
New function that returns whether a string is 8-bit or not.

(OpaqueJSString::characters8):
(OpaqueJSString::characters16):
Add getters.

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

* API/OpaqueJSString.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162186 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Export OpaqueJSString destructor.

* API/OpaqueJSString.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162187 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Remove the weak pointer added to the web view in WebKitPrintOperation
https://bugs.webkit.org/show_bug.cgi?id=127098

Reviewed by Martin Robinson.

If the print operation finishes and the web view is still alive,
the weak pointer added to the view should be removed.

* UIProcess/API/gtk/WebKitPrintOperation.cpp:
(_WebKitPrintOperationPrivate::~_WebKitPrintOperationPrivate):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162188 268f45cc-cd09-0410-ab3c-d52691b4dbfc
On iOS, zooming in with a TileController-backed main frame makes hundreds of tiles
https://bugs.webkit.org/show_bug.cgi?id=126531
<rdar://problem/15745862>

Reviewed by Anders Carlsson.

Source/WebCore:

* platform/graphics/ca/mac/TileController.h:
* platform/graphics/ca/mac/TileController.mm:
(WebCore::TileController::tilesWouldChangeForVisibleRect):
(WebCore::TileController::scaledExposedRect):
(WebCore::TileController::computeTileCoverageRect):
(WebCore::TileController::revalidateTiles):
(WebCore::TileController::updateTileCoverageMap):
Scale the FrameView-space exposedRect into document space, to match the visibleRect.

Flipping on WKView's clipsToExposedRect now works correctly even in Safari
or MiniBrowser with zooming.

Source/WebKit2:

* UIProcess/API/ios/WKContentView.mm:
(-[WKContentView _updateViewExposedRect]):
(-[WKContentView setViewportSize:]):
(-[WKContentView didFinishScrollTo:]):
(-[WKContentView didScrollTo:]):
(-[WKContentView didZoomToScale:]):
Because zooming is performed by the UIScrollView, we need to transform
the exposedRect's offset in order to get it in FrameView-relative coordinates.

* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::didFinishZooming):
Save the pageScaleFactor when it changes.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162189 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[SOUP] Add stubs for CustomProtocol classes
https://bugs.webkit.org/show_bug.cgi?id=126343

Reviewed by Gustavo Noronha Silva.

* CMakeLists.txt:
* GNUmakefile.am:
* GNUmakefile.list.am:
* PlatformGTK.cmake:
* Shared/Network/CustomProtocols/soup/CustomProtocolManagerSoup.cpp: Added.
(WebKit::generateCustomProtocolID):
(WebKit::WebSoupRequestAsyncData::WebSoupRequestAsyncData):
(WebKit::WebSoupRequestAsyncData::~WebSoupRequestAsyncData):
(WebKit::WebSoupRequestAsyncData::requestFailed):
(WebKit::WebSoupRequestAsyncData::releaseTask):
(WebKit::CustomProtocolManager::supplementName):
(WebKit::CustomProtocolManager::CustomProtocolManager):
(WebKit::CustomProtocolManager::initializeConnection):
(WebKit::CustomProtocolManager::initialize):
* Shared/Network/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode): Move
urlSchemesRegisteredForCustomProtocols encoding out of platform
ifdefs, since it's already guarded by ENABLE(CUSTOM_PROTOCOLS).
(WebKit::NetworkProcessCreationParameters::decode): Ditto.
* Shared/Network/NetworkProcessCreationParameters.h: Ditto.
* UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp: Added.
(WebKit::CustomProtocolManagerProxy::CustomProtocolManagerProxy):
(WebKit::CustomProtocolManagerProxy::startLoading):
(WebKit::CustomProtocolManagerProxy::stopLoading):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162190 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Test results popovers at http://build.webkit.org/dashboard should link to stderr
https://bugs.webkit.org/show_bug.cgi?id=126929

Reviewed by Timothy Hatcher.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Buildbot.js:
(Buildbot.prototype.layoutTestCrashLogURLForIteration): Renamed for consistency.
(Buildbot.prototype.layoutTestStderrURLForIteration): Added.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js:
(BuildbotIteration.prototype.loadLayoutTestResults): Store has_stderr attribute.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotTesterQueueView.js:
(BuildbotTesterQueueView.prototype._popoverContentForLayoutTestRegressions):
Add a link to stderr output if present.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/QueueView.css:
(.test-results-popover .additional-link): Style with light grey (will use the same style
for diff links).



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162191 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r162185, r162186, and r162187.
http://trac.webkit.org/changeset/162185
http://trac.webkit.org/changeset/162186
http://trac.webkit.org/changeset/162187
https://bugs.webkit.org/show_bug.cgi?id=127164

Broke JSStringCreateWithCharactersNoCopy, as evidenced by a
JSC API test (Requested by ap on #webkit).

* API/JSStringRef.cpp:
(JSStringGetCharactersPtr):
(JSStringGetUTF8CString):
(JSStringIsEqual):
* API/JSStringRefCF.cpp:
(JSStringCreateWithCFString):
(JSStringCopyCFString):
* API/OpaqueJSString.cpp:
(OpaqueJSString::create):
(OpaqueJSString::identifier):
* API/OpaqueJSString.h:
(OpaqueJSString::create):
(OpaqueJSString::characters):
(OpaqueJSString::deprecatedCharacters):
(OpaqueJSString::OpaqueJSString):

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