Fix the build with a newer version of clang.

Reviewed by Dan Bernstein.

Source/WebKit/mac:

Some of the methods in WebCoreStatistics appear to have been added by someone not familiar with Objective-C.
While it's technically valid to have empty components in a selector, it's rarely done and is not consistent
with our style guidelines. In this particular case it's also done in such a manner that it's ambiguous and
therefore generates a warning in newer versions of the compiler.

Fixes <rdar://problem/12503709>.

* Misc/WebCoreStatistics.h: Remove unused methods and rename the two poorly-named methods that remain.
* Misc/WebCoreStatistics.mm: Ditto.
(-[WebFrame numberOfPagesWithPageWidth:pageHeight:]):
(-[WebFrame printToCGContext:pageWidth:pageHeight:]):

Tools:

Update to accommodate the renamed methods in WebCoreStatistics.

* DumpRenderTree/mac/PixelDumpSupportMac.mm:
(createPagedBitmapContext):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Clean up ContentData operator overloads
https://bugs.webkit.org/show_bug.cgi?id=99556

Patch by Elliott Sprehn <esprehn@chromium.org> on 2012-10-17
Reviewed by Eric Seidel.

Use virtual dispatch for checking ContentData equality instead
of a switch over the type. This the first step in getting rid
of the StyleContentType enum and all the switch statements over
the type().

No tests needed, this is just a refactor.

* rendering/style/ContentData.cpp:
* rendering/style/ContentData.h:
(ContentData):
(WebCore::operator==):
(WebCore):
(WebCore::operator!=):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131565 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [Regression] SASS sources are not saved to disk.
https://bugs.webkit.org/show_bug.cgi?id=99551

Reviewed by Yury Semikhatsky.

Added resource null checks.

* inspector/front-end/StylesSourceMapping.js:
(WebInspector.StylesSourceMapping.prototype._uiSourceCodeAddedToWorkspace):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131567 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Stylesheets saved with FileManager are not saved to disk when edited from Elements panel.
https://bugs.webkit.org/show_bug.cgi?id=99554

Reviewed by Yury Semikhatsky.

Moved saving to disk from SourceFrame to UISourceCode.

* inspector/front-end/SourceFrame.js:
(WebInspector.SourceFrame.prototype._commitEditing):
* inspector/front-end/UISourceCode.js:
(WebInspector.UISourceCode.prototype._commitContent):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131568 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2][GTK] Unneeded GError field in internal structure in WebKitFaviconDatabase.cpp
https://bugs.webkit.org/show_bug.cgi?id=99564

Reviewed by Carlos Garcia Campos.

Removed field 'error' from GetFaviconSurfaceAsyncData and updated
the code accordingly, by using g_simple_async_result_take_error().

* UIProcess/API/gtk/WebKitFaviconDatabase.cpp:
(GetFaviconSurfaceAsyncData): Removed unneeded field.
(processPendingIconsForPageURL): Avoid using g_propagate_error and
use g_simple_async_result_take_error directly instead.
(webkit_favicon_database_get_favicon_finish): Remove unneeded code.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131569 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: When dirty uiSourceCode is saved to disk from scripts navigator context menu working copy is not committed.
https://bugs.webkit.org/show_bug.cgi?id=99555

Reviewed by Yury Semikhatsky.

Save As context menu handler now commits working copy for dirty UISourceCodes.

* inspector/front-end/HandlerRegistry.js:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131570 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed Chromium rebaselines.

* platform/chromium-mac-snowleopard/ietestcenter/css3/bordersbackgrounds/border-radius-content-edge-001-expected.png:
* platform/chromium-mac/ietestcenter/css3/bordersbackgrounds/border-radius-content-edge-001-expected.png:
* platform/chromium-win-xp/ietestcenter/css3/bordersbackgrounds/border-radius-content-edge-001-expected.png: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131571 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Assertion failed on HTMLFormControlElement.cpp: updateFromElementCallback()
https://bugs.webkit.org/show_bug.cgi?id=99566

Reviewed by Kent Tamura.

Source/WebCore:

It had a too optimistic assertion. This change removes it.

Test: fast/forms/textarea/textarea-autofocus-removal-while-focusing.html

* html/HTMLFormControlElement.cpp:
(WebCore::updateFromElementCallback):

LayoutTests:

* fast/forms/textarea/textarea-autofocus-removal-while-focusing.txt: Added.
* fast/forms/textarea/textarea-autofocus-removal-while-focusing.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131572 268f45cc-cd09-0410-ab3c-d52691b4dbfc
V8 should throw a more descriptive exception when blocking 'eval' via CSP.
https://bugs.webkit.org/show_bug.cgi?id=94332

Reviewed by Adam Barth.

Source/WebCore:

Following up on https://bugs.webkit.org/show_bug.cgi?id=94331, this
patch wires up the new error message mechanism to V8, and updates the
Chromium test expectations accordingly.

* bindings/v8/ScriptController.cpp:
(WebCore::ScriptController::disableEval):
    Pass 'errorMessage' through to V8.
* bindings/v8/V8DOMWindowShell.cpp:
(WebCore::V8DOMWindowShell::initializeIfNeeded):
    Grab the error message from ContentSecurityPolicy, and pass it
    through to V8.
* bindings/v8/WorkerContextExecutionProxy.cpp:
(WebCore::WorkerContextExecutionProxy::WorkerContextExecutionProxy):
(WebCore::WorkerContextExecutionProxy::evaluate):
(WebCore::WorkerContextExecutionProxy::setEvalAllowed):
* bindings/v8/WorkerContextExecutionProxy.h:
(WorkerContextExecutionProxy):
    Convert 'm_disableEvalPending' to a string to store the current
    error message, and use it to set the eval state.
* bindings/v8/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::disableEval):
    Pass 'errorMessage' through to V8.

LayoutTests:

* platform/chromium/TestExpectations:
    Unskipping these tests, as this patch unbreaks them.
* platform/chromium/http/tests/security/contentSecurityPolicy/eval-blocked-expected.txt:
* platform/chromium/http/tests/security/contentSecurityPolicy/eval-blocked-in-about-blank-iframe-expected.txt:
* platform/chromium/http/tests/security/contentSecurityPolicy/function-constructor-blocked-expected.txt:
    Updating expectations with the new error message.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131573 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Unreviewed gardening.

Unskipping 4 cases after regression was fixed in r131229,
moving out a crash and incorrect console loggin on the wk2 bot.

* platform/efl-wk2/TestExpectations:
* platform/efl/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131574 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Ewk_Url_Scheme_Request has to be refactored
https://bugs.webkit.org/show_bug.cgi?id=99549

Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-10-17
Reviewed by Kenneth Rohde Christiansen.

Ewk_Url_Scheme_Requestis inherited from RefCounted, WKEinaSharedString is used,
removed weird _Ewk_Url_Scheme_Request.

* UIProcess/API/efl/ewk_context_private.h:
* UIProcess/API/efl/ewk_context_request_manager_client.cpp:
(didReceiveURIRequest):
* UIProcess/API/efl/ewk_url_scheme_request.cpp:
(ewk_url_scheme_request_ref):
(ewk_url_scheme_request_unref):
* UIProcess/API/efl/ewk_url_scheme_request.h:
* UIProcess/API/efl/ewk_url_scheme_request_private.h:
(Ewk_Url_Scheme_Request):
(Ewk_Url_Scheme_Request::create):
(Ewk_Url_Scheme_Request::Ewk_Url_Scheme_Request):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131575 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Add background color to the checkbox theme.
https://bugs.webkit.org/show_bug.cgi?id=98788

Patch by Byungwoo Lee <bw80.lee@samsung.com> on 2012-10-17
Reviewed by Gyuyoung Kim.

Background color is added to the checkbox theme for identifying
checkbox status easily.

Checkbox theme uses images which has transparent background, and the
theme itself doesn't have the background color.

When the background of checkbox is black, checked/unchecked status
cannot be distinguished because check mark color is black.

And it is hard to identify whether the checkbox is disabled or not,
because there is no background color in the checkbox theme.

Instead of adding background color to the edc script, background
images are added because the shape of the check box can be various.

* DefaultTheme/widget/check/check.edc:
* DefaultTheme/widget/check/img_check_bg_enabled.png: Added.
* DefaultTheme/widget/check/img_check_bg_disabled.png: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131576 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Build fix for WinCE after r131365.

* platform/graphics/GlyphBuffer.h:
(WebCore::GlyphBufferAdvance::width):
* platform/graphics/wince/FontWinCE.cpp:
(WebCore::cursorToX):
* platform/graphics/wince/GraphicsContextWinCE.cpp:
(WebCore::GraphicsContext::drawText):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Avoid style updates when retrieving the inline stylesheet text
https://bugs.webkit.org/show_bug.cgi?id=99576

Reviewed by Vsevolod Vlasov.

Avoid using innerText() to retrieve inline stylesheet text, which may result in style and layout updates.

* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyleSheet::inlineStyleSheetText):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131578 268f45cc-cd09-0410-ab3c-d52691b4dbfc
.: [WK2][EFL] Implementation of spellchecking feature.
https://bugs.webkit.org/show_bug.cgi?id=91854

Patch by Grzegorz Czajkowski  <g.czajkowski@samsung.com>, Michal Roj <m.roj@sasmung.com> on 2012-10-17
Reviewed by Gyuyoung Kim.

Define SPELLCHECK macro and enable it for WK2-Efl.
The spellchecking implementation is based on the Enchant library.
It can be used by other WebKit ports.

* Source/cmake/FindEnchant.cmake: Added.
* Source/cmake/OptionsEfl.cmake: Enable spellchecking feature for WebKit2-EFL.
* Source/cmake/WebKitFeatures.cmake: Define the SPELLCHECK macro.
* Source/cmakeconfig.h.cmake: Add the feature.

Source/WebCore: [WK2][EFL] Implementation of spellchecking feature.
https://bugs.webkit.org/show_bug.cgi?id=91854

Patch by Grzegorz Czajkowski  <g.czajkowski@samsung.com>, Michal Roj <m.roj@samsung.com> on 2012-10-17
Reviewed by Gyuyoung Kim.

* PlatformEfl.cmake:
Add enchant-related compiler flags: header paths and the library flag.

Source/WebKit2: Implementation of spellchecking feature.
https://bugs.webkit.org/show_bug.cgi?id=91854

Patch by Grzegorz Czajkowski  <g.czajkowski@samsung.com>, Michal Roj <m.roj@samsung.com> on 2012-10-17
Reviewed by Gyuyoung Kim.

Add spelling implementation for WebKit2-EFL that is based on Enchant library.

Additionally the patch provides API to overwrite the default WebKit
spellchecker implementation as Enchant library doesn't ensure grammar checking.
Application is able to overwrite it by defining its own implementation and
setting appropriate callback functions.

* PlatformEfl.cmake:
Add enchant-related compiler flags: header paths and the library flag.

* UIProcess/API/efl/EWebKit2.h:
Add ewk_text_checker.h to the main WebKit2-EFL's header to be available for applications.

* UIProcess/API/efl/WebKitTextChecker.cpp: Added.
Implement the callbacks functions of WKTextChecker.

(WebKit):
(WebKit::isContinuousSpellCheckingEnabled):
(WebKit::setContinuousSpellCheckingEnabled):
(WebKit::uniqueSpellDocumentTag):
(WebKit::closeSpellDocumentWithTag):
(WebKit::checkSpellingOfString):
(WebKit::guessesForWord):
(WebKit::learnWord):
(WebKit::ignoreWord):
Those functions are directly given as callback functions for WKTextChecker's client.
They choose between WebKit's spelling implementation and client's ones.

(WebKit::availableSpellCheckingLanguages):
(WebKit::updateSpellCheckingLanguages):
(WebKit::loadedSpellCheckingLanguages):
They are used by ewk_settings.cpp file and allow to do not
expose 'textCheckerEnchant'.

* UIProcess/API/efl/WebKitTextChecker.h: Added.
Define the functions which choose between WebKit's spelling implementation and
the client's ones.

(WebKit):
* UIProcess/API/efl/ewk_context.cpp:
(_Ewk_Context::_Ewk_Context):
Attach the spellchecker feature for the context.

* UIProcess/API/efl/ewk_text_checker.cpp: Added.
(ewk_text_checker_callbacks_get):
An internal function to get the client's callback functions.

* UIProcess/API/efl/ewk_text_checker.h: Added.
Define API to set the client's own spelling implementation.

* UIProcess/API/efl/ewk_text_checker_private.h: Added.
(_Ewk_Text_Checker):
Define the struct with the client's callbacks responisble for spelling.

* UIProcess/API/efl/ewk_settings.cpp:
(onContinuousSpellCheckingIdler):
The application is notified about the spelling setting change on idler
to do not block WebKit.
The the continuous spell checking may be changed through the context menu option.

(spellCheckingLanguagesSetUpdate):
The dictionaries are requested on 'idler' to do not block WebKit.

(spellCheckingLanguagesSet):
Set the languages.

(ewk_settings_continuous_spell_checking_change_cb_set):
Set the callback function used to notify the client when the spelling
setting was changed by WebKit.

(ewk_settings_continuous_spell_checking_enabled_get):
(ewk_settings_continuous_spell_checking_enabled_set):
API to set/get the continuous spell checking.

(ewk_settings_spell_checking_available_languages_get):
(ewk_settings_spell_checking_languages_set):
(ewk_settings_spell_checking_languages_get):
API to get/set languages to use by WebKit implementation based on Enchant library.

* UIProcess/efl/TextCheckerEfl.cpp:
(WebKit::TextChecker::state):
(WebKit::TextChecker::isContinuousSpellCheckingAllowed):
(WebKit::TextChecker::setContinuousSpellCheckingEnabled):
(WebKit::TextChecker::setGrammarCheckingEnabled):
(WebKit::TextChecker::continuousSpellCheckingEnabledStateChanged):
(WebKit::TextChecker::grammarCheckingEnabledStateChanged):
(WebKit::TextChecker::uniqueSpellDocumentTag):
(WebKit::TextChecker::closeSpellDocumentWithTag):
(WebKit::TextChecker::checkSpellingOfString):
(WebKit::TextChecker::checkGrammarOfString): Remove WebCore namaspace as it's already defined for the whole file.
(WebKit::TextChecker::spellingUIIsShowing):
(WebKit::TextChecker::toggleSpellingUIIsShowing):
(WebKit::TextChecker::updateSpellingUIWithMisspelledWord):
(WebKit::TextChecker::updateSpellingUIWithGrammarString):
(WebKit::TextChecker::getGuessesForWord):
(WebKit::TextChecker::learnWord):
(WebKit::TextChecker::ignoreWord):
Those call WKTextChecker client's methods.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131579 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed GTK gardening.

Fixing expectation for fast/forms/range/input-appearance-range-rtl.html,
it's a reftest so the failure is actually of pixel nature.

Also removing some expectations for tests that now consistently pass.

* platform/gtk/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131580 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r131421): Text baseline becomes incorrect after re-layout of input[type=time]
https://bugs.webkit.org/show_bug.cgi?id=99572

Reviewed by Kentaro Hara.

Source/WebCore:

We use flexible box since r131421, and it seems text baseline becomes
incorrect if there are text nodes in a flex container.

Test: fast/forms/time-multiple-fields/time-multiple-fields-static-relayout.html

* css/html.css:
(input::-webkit-datetime-edit-text): Added.
* html/shadow/DateTimeEditElement.cpp:
(WebCore::DateTimeEditBuilder::visitLiteral):
Wrap text with an element with ::-webkit-datetime-edit-text.

LayoutTests:

* fast/forms/time-multiple-fields/time-multiple-fields-static-relayout-expected.txt: Added.
* fast/forms/time-multiple-fields/time-multiple-fields-static-relayout.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131581 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Enable use of more AllInOne files
https://bugs.webkit.org/show_bug.cgi?id=99579

Patch by Simon Hausmann <simon.hausmann@digia.com> on 2012-10-17
Reviewed by Tor Arne Vestbø.

The AllInOne files reduce pressure during final link time because the object files contain less duplicated
symbols.

* Target.pri: Add HTMLElementsAllInOne, EditingAllInOne and RenderingAllInOne to the build
* editing/EditingAllInOne.cpp: Place a #if USE(CF) around the inclusion of SmartReplaceCF.cpp
* html/HTMLElementsAllInOne.cpp: Move HTMLPlugInElement.cpp to the top to fix builds on X11 based platforms
where the X headers get confused by the "Region" type that's also declared in WebCore.
* rendering/RenderingAllInOne.cpp: Fix build on case-sensitive file systems (Plugin -> PlugIn) and added a
#if PLATFORM(WIN) around the inclusion of RenderThemeWin.cpp.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131582 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKitTestRunner needs layoutTestController.queueReload
https://bugs.webkit.org/show_bug.cgi?id=42672

Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-10-17
Reviewed by Kenneth Rohde Christiansen.

Tools:

Added implementation of testRunner.queueReload().

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::queueReload):
(WTR):
* WebKitTestRunner/InjectedBundle/InjectedBundle.h:
(InjectedBundle):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::queueReload):
(WTR):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
(TestRunner):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
* WebKitTestRunner/WorkQueueManager.cpp:
(WTR::WorkQueueManager::queueReload):
(WTR):
* WebKitTestRunner/WorkQueueManager.h:
(WorkQueueManager):

LayoutTests:

Unskipped the related test cases for WK2.

* platform/efl-wk2/TestExpectations:
* platform/wk2/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131583 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Implement the Selector argument to RTCPeerConnection.getStats
https://bugs.webkit.org/show_bug.cgi?id=99460

Patch by Harald Alvestrand <hta@google.com> on 2012-10-17
Reviewed by Adam Barth.

Source/Platform:

* chromium/public/WebRTCStatsRequest.h:
(WebKit):
(WebRTCStatsRequest):

Source/WebCore:

The change adds two new parameters to the RTCStatsRequest object:
stream and component. Together these are enough to identify a
MediaStreamTrack.

Test: fast/mediastream/RTCPeerConnection-statsSelector.html

* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::streamDescriptor):
(WebCore):
* Modules/mediastream/MediaStreamTrack.h:
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::getStats):
* Modules/mediastream/RTCStatsRequestImpl.cpp:
(WebCore::RTCStatsRequestImpl::create):
(WebCore::RTCStatsRequestImpl::RTCStatsRequestImpl):
(WebCore::RTCStatsRequestImpl::hasSelector):
(WebCore):
(WebCore::RTCStatsRequestImpl::stream):
(WebCore::RTCStatsRequestImpl::component):
* Modules/mediastream/RTCStatsRequestImpl.h:
(RTCStatsRequestImpl):
* platform/chromium/support/WebRTCStatsRequest.cpp:
(WebKit):
(WebKit::WebRTCStatsRequest::hasSelector):
(WebKit::WebRTCStatsRequest::stream):
(WebKit::WebRTCStatsRequest::component):
* platform/mediastream/RTCStatsRequest.h:
(WebCore):
(RTCStatsRequest):

Tools:

The MockWebRTCPeerConnectionHandler will return one object only
when it gets a selector, and an even number when there is no selector.
This allows to verify that the argument is passed, but not its value.

* DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
(MockWebRTCPeerConnectionHandler::getStats):

LayoutTests:

* fast/mediastream/RTCPeerConnection-statsSelector-expected.txt: Added.
* fast/mediastream/RTCPeerConnection-statsSelector.html: Added.

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