Unreviewed, rolling out r152598.
http://trac.webkit.org/changeset/152598
https://bugs.webkit.org/show_bug.cgi?id=118658

totally broke the web inspector (JS ERROR: SyntaxError:
Expected token '}') (Requested by thorton on #webkit).

* Tools/PrettyPrinting/CodeMirrorFormatters.js:
* Tools/PrettyPrinting/Formatter.js:
* Tools/PrettyPrinting/FormatterContentBuilder.js:
* Tools/PrettyPrinting/codemirror.css:
(.CodeMirror-scrollbar-filler):
(.CodeMirror-gutters):
(.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler):
(.CodeMirror-widget):
* Tools/PrettyPrinting/codemirror.js:
(window.CodeMirror):
(window.CodeMirror.):
(.do):
(moveVisually):
* Tools/PrettyPrinting/css.js:
(.):
(CodeMirror):
* Tools/PrettyPrinting/javascript.js:
(.):
* UserInterface/External/CodeMirror/codemirror.css:
(.CodeMirror-widget):
* UserInterface/External/CodeMirror/codemirror.js:
(window.CodeMirror):
(window.CodeMirror.):
* UserInterface/External/CodeMirror/coffeescript.js:
* UserInterface/External/CodeMirror/comment.js:
(.):
* UserInterface/External/CodeMirror/css.js:
(.):
(CodeMirror):
* UserInterface/External/CodeMirror/javascript.js:
(.):
* UserInterface/External/CodeMirror/matchbrackets.js:
(.):
* UserInterface/External/CodeMirror/sql.js:
* UserInterface/External/CodeMirror/xml.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Minor cleaning of AtomicString::addSlowCase
https://bugs.webkit.org/show_bug.cgi?id=118615

Reviewed by Geoffrey Garen.

Give the variable a proper name.
Add assertions to clarify the in and out states.

* wtf/text/AtomicString.cpp:
(WTF::AtomicString::addSlowCase):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152625 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2][GTK] SIGSEV in webkitWebViewBaseSizeAllocate
https://bugs.webkit.org/show_bug.cgi?id=118052

Patch by Alberto Garcia <berto@igalia.com> on 2013-07-15
Reviewed by Carlos Garcia Campos.

We don't need to check whether the drawing area is empty or not in
order to set needsResizeOnMap.

It can also happen that the drawing area pointer is null (if
e.g. the web process crashes), which is the reason for this
SIGSEGV.

A test to prevent this was added in r88646 but was later moved to
resizeWebKitWebViewBaseFromAllocation().

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseSizeAllocate):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152626 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] [WK2] Check if the keyEventQueue is empty in WebPageProxy::getEditorCommandsForKeyEvent
https://bugs.webkit.org/show_bug.cgi?id=118530

Patch by Simon Pena <simon.pena@samsung.com> on 2013-07-15
Reviewed by Carlos Garcia Campos.

When a key event is started in the WebProcess (e.g. in the inspector)
it doesn't have an associated GdkEvent queued. Adding a check in
WebPageProxy::getEditorCommandsForKeyEvent ensures there's always a queued
key event to process.

In GTK-WK2, inspector-protocol/input/dispatchKeyEvent.html no longer crashes once
this fix is in place.

* UIProcess/gtk/WebPageProxyGtk.cpp:
(WebKit::WebPageProxy::getEditorCommandsForKeyEvent): Ensure m_keyEventQueue is
not empty.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152627 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][WK2] Unreviewed gardening. Skipping bad pixel results.

* platform/qt-5.0-wk2/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152628 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Increase the JHBuild version of GStreamer to 1.0.7
https://bugs.webkit.org/show_bug.cgi?id=115166

Patch by Xabier Rodriguez Calvar <calvaris@igalia.com> on 2013-07-15
Reviewed by Philippe Normand.

* gtk/jhbuild.modules: Bumping GStreamer version up to 1.0.8.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152629 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][WK2] Unreviewed gardening. Skipping bad pixel results.

* platform/qt-5.0-wk2/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152630 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[ATK] Leak: Leak in WebKitAccessibleTextGetText
https://bugs.webkit.org/show_bug.cgi?id=118596

Patch by Brian Holt <brian.holt@samsung.com> on 2013-07-15
Reviewed by Carlos Garcia Campos.

Fixed memory leak.

* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(getGailTextUtilForAtk):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152631 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][WK2] Unreviewed cleanup for pixel tester bot.

* platform/qt-5.0-wk2/TestExpectations:
* platform/qt-5.0-wk2/editing/deleting/delete-image-002-expected.png:
* platform/qt-5.0-wk2/editing/selection/move-by-character-004-expected.png:
* platform/qt-5.0-wk2/fast/canvas/setWidthResetAfterForcedRender-expected.png:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152632 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Remote inspector server should send an error page if resources not found
https://bugs.webkit.org/show_bug.cgi?id=117137

Patch by Anton Obzhirov <a.obzhirov@samsung.com> on 2013-07-15
Reviewed by Gustavo Noronha Silva.

Sometimes it is difficult to understand why remote inspector fails to deliver the content.
This patch gives an option to show error page with some basic explanation.

* UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp:
(WebKit::WebInspectorServer::platformResourceForPath):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152633 268f45cc-cd09-0410-ab3c-d52691b4dbfc
check-webkit-style: Ignore false positive: Instance of 'Popen' has no 'pid' member
https://bugs.webkit.org/show_bug.cgi?id=118592

Patch by Brian Holt <brian.holt@samsung.com> on 2013-07-15
Reviewed by Martin Robinson.

Added a suppression for pylint false positives and a unit test.

* Scripts/webkitpy/style/checkers/python.py:
(Pylinter):
* Scripts/webkitpy/style/checkers/python_unittest.py:
(PythonCheckerTest.test_check):
(PythonCheckerTest):
(PythonCheckerTest.test_pylint_false_positives):
(PythonCheckerTest.test_pylint_false_positives._mock_handle_style_error):
* Scripts/webkitpy/style/checkers/python_unittest_falsepositives.py: Added.
(test_popen):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152639 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/mac: [WK2] Calling Notification.requestPermission() without a callback crashes
https://bugs.webkit.org/show_bug.cgi?id=118654
<rdar://problem/14293352>

Reviewed by Alexey Proskuryakov.

* WebCoreSupport/WebNotificationClient.mm:
(-[WebNotificationPolicyListener initWithCallback:]): The callback can be NULL, so remove the ASSERT.
(-[WebNotificationPolicyListener allow]): Check for the callback before asking it to handle the event.
(-[WebNotificationPolicyListener deny]): Ditto.

Source/WebKit2: Calling Notification.requestPermission() without a callback crashes
https://bugs.webkit.org/show_bug.cgi?id=118654
<rdar://problem/14293352>

Reviewed by Alexey Proskuryakov.

When requestPermission() is called, we short-circuit if we know the permission was already set.
The callback handler gets invoked. But now that callbacks are optional, we need to check to make
sure a callback was provided.

* WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
(WebKit::NotificationPermissionRequestManager::startRequest): Check for the callback.

LayoutTests: [WK2] Calling Notification.requestPermission() without a callback crashes
https://bugs.webkit.org/show_bug.cgi?id=118654
<rdar://problem/14293352>

Reviewed by Alexey Proskuryakov.

* http/tests/notifications/notification-request-permission-expected.txt:
* http/tests/notifications/notification-request-permission.html: Add additional subtests that check
that the call succeeds even after granting or denying permission.

* http/tests/notifications/notification-request-permission-no-callback-expected.txt: Added.
* http/tests/notifications/notification-request-permission-no-callback.html: Added. Similar test to
notification-request-permission, without the callback function.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152642 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CoordinatedGraphics] Crash at CoordinatedGraphicsScene::updateImageBacking
https://bugs.webkit.org/show_bug.cgi?id=118613

The operations of creating/removing/updating/clearing weren't in the
right sequence. Changing the order solves the issue because when an image is
replaced the old one is deleted before the new one is created, and IDs are
not unique in cairo (they're based on the image pointer).

Reviewed by Noam Rosenthal.

* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
(WebCore::CoordinatedGraphicsScene::syncImageBackings):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152647 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Curl] Download does not replace existing file.
https://bugs.webkit.org/show_bug.cgi?id=118356

Patch by peavo@outlook.com <peavo@outlook.com> on 2013-07-15
Reviewed by Brent Fulgham.

If the download target file already exists, it is not replaced after the download has finished.
At this point, the user would have already approved to replace the file, so it should be replaced.

* platform/network/curl/CurlDownload.cpp:
(CurlDownload::moveFileToDestination): Move file and replace it if it already exists.
If the new file is on a different volume, do a copy/delete operation.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152649 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Properly handle style text changes while the color popover is open.

https://bugs.webkit.org/show_bug.cgi?id=118575

Reviewed by Joseph Pecoraro.

* UserInterface/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._colorSwatchClicked.updateCodeMirror):
The original text marker might have been cleared by a style update, in this case we need to
find the new color text marker so we know the right range for the new style color text.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152651 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make sure to add main resources for sub-frames to the Network Timeline.

https://bugs.webkit.org/show_bug.cgi?id=118649

Reviewed by Joseph Pecoraro.

* UserInterface/TimelineManager.js:
(WebInspector.TimelineManager.prototype._mainResourceDidChange): Remove the
call to _clear() and early return for event.target.isMainFrame(). The _clear()
is already handled if needed by the call to _startAutoRecording(), so it was
redundant here and caused the erroneous addition of isMainFrame() early return.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152652 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Text with "text-overflow:ellipsis" and an SVG font do not render correctly
https://bugs.webkit.org/show_bug.cgi?id=118669

Patch by Antoine Quint <graouts@apple.com> on 2013-07-15
Reviewed by David Kilzer.

Source/WebCore:

Partial runs may be routed through the complex path in several Font functions. While incomplete,
we can check for a non-NULL run.renderingContext() and exempt runs that have it from being forced
down the complex path. A more thorough fix is already tracked by http://webkit.org/b/100050.

Adding a new testcase which is a copy of svg/text/text-overflow-ellipsis-svgfont.html with kerning
and ligatures turned on explicitly since DRT runs with those off by default and this option is required
to be on for the issue to reproduce.

Fix courtesy of Dan Bernstein.

Test: svg/text/text-overflow-ellipsis-svgfont-kerning-ligatures.html

* platform/graphics/Font.cpp:
(WebCore::Font::drawText):
(WebCore::Font::drawEmphasisMarks):
(WebCore::Font::selectionRectForText):

LayoutTests:

* platform/mac/svg/text/text-overflow-ellipsis-svgfont-kerning-ligatures-expected.png: Added.
* platform/mac/svg/text/text-overflow-ellipsis-svgfont-kerning-ligatures-expected.txt: Added.
* svg/text/text-overflow-ellipsis-svgfont-kerning-ligatures.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152653 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Remove unused vsprops files.

* win/tools/vsprops/FeatureDefines.vsprops: Removed.
* win/tools/vsprops/FeatureDefinesCairo.vsprops: Removed.
* win/tools/vsprops/WinCairo.vsprops: Removed.
* win/tools/vsprops/cURL.vsprops: Removed.
* win/tools/vsprops/common.vsprops: Removed.
* win/tools/vsprops/debug.vsprops: Removed.
* win/tools/vsprops/debug_all.vsprops: Removed.
* win/tools/vsprops/debug_wincairo.vsprops: Removed.
* win/tools/vsprops/production.vsprops: Removed.
* win/tools/vsprops/release.vsprops: Removed.
* win/tools/vsprops/releaseproduction.vsprops: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152654 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Replace WKCACFTypes include with d3d9 include.

Rubberstamped by Eric Carlson.

* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152655 268f45cc-cd09-0410-ab3c-d52691b4dbfc
xmlDocPtrForString shouldn't upconvert 8-bit string
https://bugs.webkit.org/show_bug.cgi?id=118693

Reviewed by Michael Saboff.

Merge https://chromium.googlesource.com/chromium/blink/+/5d9b240db74591c3689415c7b7c5180fadb379e9

Prior to this changeset, we were upconverting the entire XML document.
Let xmllib2 parse a document as iso-8859-1 when it's a 8-bit string.

* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::nativeEndianUTF16Encoding):
(WebCore::xmlDocPtrForString):


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