WebTextCheckerClient doesn't initialize output arguments.
https://bugs.webkit.org/show_bug.cgi?id=83683

Patch by Simon Pena <simon.pena@samsung.com> on 2013-07-03
Reviewed by Martin Robinson.

Source/WebKit2:

Callers of checkSpellingOfString and checkGrammarOfString expect
certain default values when no misspelled (or bad grammar) string
is found. They try to do that by initialising the reply arguments
that go into the IPC calls, but these values are ultimately ignored (see
HandleMessage.h, where the replyArguments are declared).

In the past, this seems to have led to various issues, (see
TextCheckingHelper::findFirstMisspelling in TextCheckingHelper.cpp),
where these return values are asserted and checked to be in the right range.

This patch initialises the values, so even if no available client
implements the methods (or if the implementation forgets to do it) the callers
will have their expected output.

However, and for a general case, we probably need a way to tell the caller
that any existing value in the output arguments will be ignored.

* UIProcess/WebTextCheckerClient.cpp:
(WebKit::WebTextCheckerClient::checkSpellingOfString):
(WebKit::WebTextCheckerClient::checkGrammarOfString):

LayoutTests:

Unskip editing/pasteboard/pasting-empty-html-falls-back-to-text.html, which no longer
crashes after the fix.

* platform/gtk-wk2/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152369 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[ATK] Leak: more leaks in AccessibilityUIElement
https://bugs.webkit.org/show_bug.cgi?id=118362

Patch by Brian Holt <brian.holt@samsung.com> on 2013-07-03
Reviewed by Christophe Dumez.

Free the memory created by g_strdup_printf.

* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(AccessibilityUIElement::language):
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::language):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152371 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add Makefile to WebKitLauncher
https://bugs.webkit.org/show_bug.cgi?id=118365

Reviewed by Mark Rowe.

* WebKitLauncher/Makefile: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152373 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Ran update-webkit-localizable-strings.

Rubber-stamped by Joseph Pecoraro.

* Localizations/en.lproj/localizedStrings.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152374 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        <rdar://problem/14271105> Flash Player: deny ipc-posix-sem 59918130
        <rdar://problem/14349560> Flash Player: deny ipc-posix-sem MacromediaSemaphoreDig on many sites

        Reviewed by Sam Weinig.

        * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:
        semaphore-owner doesn't appear to work the way we need it to, removing it (at least for now).



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152375 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Guard remaining calls to decodeURIComponent with a try/catch.

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

Reviewed by Joseph Pecoraro.

* UserInterface/Main.js:
(WebInspector.displayNameForURL):
(WebInspector.updateWindowTitle):
* UserInterface/Utilities.js:
(arrayResult):
(queryString):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152380 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] Unreviewed build correction.

* WTF.vcxproj/copy-files.cmd: Limit path (for this file) to DOS-only to avoid
the Cygwin variant of rmdir from being used.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152381 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Implement mechanism to detect (partially) hidden blocked plugins.
https://bugs.webkit.org/show_bug.cgi?id=117998

Patch by Gordon Sheridan <gordon_sheridan@apple.com> on 2013-07-03
Reviewed by Dean Jackson.

Source/WebCore:

* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::replacementTextRect):
Added private method for calculating the size of the replacement text for blocked plugins.

(WebCore::RenderEmbeddedObject::isReplacementObscured):
Added public method to determine if the EMBED element used for a blocked plugin is inaccessible to the user.
* rendering/RenderEmbeddedObject.h:
Declare the two new methods mentioned above.

* WebCore.exp.in:
Export RenderEmbeddedObject::isReplacementObscured().

Source/WebKit2:

* Shared/Plugins/Netscape/PluginInformation.h:
* Shared/Plugins/Netscape/PluginInformation.cpp:
(WebKit::plugInInformationReplacementObscuredKey):
Add key for plugInInformation dictionaries.

(WebKit::createPluginInformationDictionary):
Add boolean parameter identifying whether the replacement for a blocked plugin is obscured, and add it to the dictionary.

* Shared/API/c/WKPluginInformation.h:
* Shared/API/c/WKPluginInformation.cpp:
(WKPluginInformationReplacementObscuredKey):
Provide the C API for the plugInInformationReplacementObscuredKey().

* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didBlockInsecurePluginVersion):
Add bool replacementObscured parameter to pass on argument to createPluginInformationDictionary().

* UIProcess/WebPageProxy.messages.in:
Add bool replacementObscured parameter to DidBlockInsecurePluginVersion() message.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createPlugin):
Invoke isReplacementObscured() method for blocked plugins.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152382 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] Updates to support changes in CoreGraphics libraries.
https://bugs.webkit.org/show_bug.cgi?id=118373

Reviewed by Anders Carlsson.

* WebCorePrefix.h: Include definitions for isnan/round/roundf for versions of
Visual Studio that do not provide them natively.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152383 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Simplify PageThrottler ownership.
https://bugs.webkit.org/show_bug.cgi?id=118372

Reviewed by Sam Weinig.

* page/Page.cpp:
(WebCore::Page::~Page):
    - 'clearPage' method removed - just clear the own pointer.
* page/Page.h:
    - make m_pageThrottler an OwnPtr.
* page/PageThrottler.cpp:
(WebCore::PageThrottler::~PageThrottler):
    - moved 'setThrottled(false)' from 'clearPage' (removed).
(WebCore::PageThrottler::throttlePage):
(WebCore::PageThrottler::unthrottlePage):
    - no need to check 'm_page'
* page/PageThrottler.h:
(WebCore::PageThrottler::create):
    - create a PassOwnPtr, not PassRefPtr.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152384 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] Exclude unsupported QuartzCore Features.
https://bugs.webkit.org/show_bug.cgi?id=118374

Reviewed by Anders Carlsson.

* WebCore.vcxproj/WebCoreCG.props: Exclude a few non-Windows
concepts from the QuartzCore headers.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152385 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] Unreviewed build correction after r15283.

* WebCorePrefix.h: Remove include directive for CGFloat.h, as it
is not present in all Windows build environments.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152386 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Adopt is/toHTMLMapElement for code cleanup
https://bugs.webkit.org/show_bug.cgi?id=118235

Reviewed by Andreas Kling.

To enhance readability, this patch adopts is/toHTMLMapElement.
This also helps out to reduce duplicated use of static_cast.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::getDocumentLinks):
(WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest):
* dom/DocumentOrderedMap.cpp:
(WebCore::keyMatchesMapName):
(WebCore::keyMatchesLowercasedMapName):
* dom/TreeScope.cpp:
(WebCore::TreeScope::getImageMap):
* html/HTMLAreaElement.cpp:
(WebCore::HTMLAreaElement::imageElement):
* html/HTMLMapElement.h:
(WebCore::isHTMLMapElement):
(WebCore::toHTMLMapElement):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152387 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: Items the img aria role aren't inserting an object replacement character
https://bugs.webkit.org/show_bug.cgi?id=118259

Source/WebCore: 

Reviewed by Tim Horton.

VoiceOver relies on object replacement characters being emitted when asking for selected text.
This has worked if a real <img> is used, but if role="img" is used on a <div>, for example,
no emission is performed, which leads to missed elements in text.

Test: platform/mac/accessibility/aria-image-emits-object-replacement.html

* editing/TextIterator.cpp:
(WebCore::isRendererReplacedElement):
(WebCore::TextIterator::advance):

LayoutTests: 

Reviewed by Reviewed by Tim Horton.

* accessibility/non-native-image-crash-expected.txt:
* platform/mac/accessibility/aria-image-emits-object-replacement-expected.txt: Added.
* platform/mac/accessibility/aria-image-emits-object-replacement.html: Added.
* platform/mac/accessibility/img-fallsback-to-title-expected.txt:
     Update expected tests where role="img" now emits replacement character.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152388 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Support some more editing keyboard events
https://bugs.webkit.org/show_bug.cgi?id=118346

Patch by KyungTae Kim <ktf.kim@samsung.com> on 2013-07-03
Reviewed by Gyuyoung Kim.

For editable contents, support the shortcuts for copy, page, cut, select all, undo and redo.

* platform/efl/EflKeyboardUtilities.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152389 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Coordinated Graphics] Don't use && operator in ASSERT
https://bugs.webkit.org/show_bug.cgi?id=118377

Patch by Jae Hyun Park <jae.park@company100.net> on 2013-07-03
Reviewed by Noam Rosenthal.

We don't use && opeartor in ASSERT because it's impossible to know which
condition caused the assertion.

* platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp:
(WebCore::CoordinatedBackingStoreTile::swapBuffers):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::~CoordinatedGraphicsLayer):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152390 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GStreamer] support preload="metadata"
https://bugs.webkit.org/show_bug.cgi?id=116817

Reviewed by Eric Carlson.

Source/WebCore:

Add appropriate behavior for preload="metadata". Delay enabling download buffering
until playback is started in this case. This behavior fits with the standard quite
well and this is the most exact match we can get (at least without adding too much
extra complexity). What matters mostly is that we can avoid loading the media
before playback but we have the first frame and the metadata.

Test: media/video-load-preload-metadata.html

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::prepareToPlay): Set |m_preload| to |Auto|
so we will start download buffering if we did not start it yet.
(WebCore::MediaPlayerPrivateGStreamer::play): Ditto.
(MediaPlayerPrivateGStreamer::setDownloadBuffering): Only start download
buffering if |m_preload == Auto|. Also make sure we don't clear the download
flag once we started downloading because it would result in not well defined
behavior and it does not really makes sense.
(MediaPlayerPrivateGStreamer::setPreload): Set download buffering accordingly.

LayoutTests:

* media/video-load-preload-metadata.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152391 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Port FileSystemWin.cpp to WinCE
https://bugs.webkit.org/show_bug.cgi?id=117935

Reviewed by Brent Fulgham.

Add #if !OS(WINCE) around a few lines of the code, so it can be used by the WinCE port too.

* PlatformWinCE.cmake:
* platform/win/FileSystemWin.cpp:
(WebCore::storageDirectory):
* platform/wince/FileSystemWinCE.cpp: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152392 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CMake] Add STATICALLY_LINKED_WITH_WTF to JavaScriptCore project
https://bugs.webkit.org/show_bug.cgi?id=118120

Reviewed by Gyuyoung Kim.

Since WTF is a static library linked to JavaScriptCore on all CMake ports
we need to define STATICALLY_LINKED_WITH_WTF for all of them.
This makes only a difference for Windows, since WTF_EXPORT and WTF_IMPORT
are the same on all other platforms.

* CMakeLists.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152393 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Gardening. Unskip tests related with editing
https://bugs.webkit.org/show_bug.cgi?id=118379

Unreviewed gardening.

Patch by KyungTae Kim <ktf.kim@samsung.com> on 2013-07-04

* platform/efl-wk2/TestExpectations:
  Unskip editing/selection/doubleclick-beside-cr-span.html and
  editing/selection/doubleclick-whitespace.html, which are passed after r150289
* platform/efl/editing/style/5065910-expected.txt: Removed (wrong expected result).
* platform/efl/editing/style/5065910-expected.png: Removed (wrong expected result).

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