Implement month picking to calendar picker
https://bugs.webkit.org/show_bug.cgi?id=101333

Reviewed by Kent Tamura.

.:

* ManualTests/forms/calendar-picker.html: Added test for month picker.

Source/WebCore:

This adds month picker mode to CalendarPicker.

No new tests. Tests will be added later when this feature is enabled in DRT.

* Resources/pagepopups/calendarPicker.css:
(.month-mode .day): Remove rounded corners when in month mode.
* Resources/pagepopups/calendarPicker.js:
(Month.createFromToday): Creates month containing today.
(CalendarPicker): Set this.selectionConstructor to Day or Month depending on the mode. Create DayTables or MonthPickerDaysTable depending on the mode.
(CalendarPicker.prototype.handleToday):
(CalendarPicker.prototype._layoutButtons):
(DaysTable.prototype._renderMonth): Set element.dataset.monthValue for all date nodes.
(DaysTable.prototype._markRangeAsSelected): Marks all day nodes in range as selected.
(DaysTable.prototype.selectRange): Selects a day.
(DaysTable.prototype.selectRangeAndShowEntireRange): Same as selectRange.
(DaysTable.prototype._selectRangeContainingNode):
(DaysTable.prototype._rangeForNode): Returns Day for node.
(DaysTable.prototype.startDate): Start datetime of visible date range. This value is inclusive.
(DaysTable.prototype.endDate): End datetime of visible date range. This value is exclusive.
(DaysTable.prototype._handleKey):
(MonthPickerDaysTable):
(MonthPickerDaysTable.prototype._markRangeAsSelected): Marks all day nodes in range as selected.
(MonthPickerDaysTable.prototype.selectRange): Selects month. If month is not visible, navigates to that month.
(MonthPickerDaysTable.prototype.selectRangeAndShowEntireRange): Selects month. Navigates to the month.
(MonthPickerDaysTable.prototype._rangeForNode): Returns Month for node.
(MonthPickerDaysTable.prototype._handleKey): Arrow keys simply move the selection forwards or backwards.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133722 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] API test crash with accelerated compositing on.
https://bugs.webkit.org/show_bug.cgi?id=101384

Patch by Viatcheslav Ostapenko <v.ostapenko@samsung.com> on 2012-11-06
Reviewed by Gyuyoung Kim.

If accelerated compositing is enabled API tests should create GL evas engine
instead of default one.
Also, in API tests first window resize and display often comes earlier
than enterAcceleratedCompositingMode call, so let's create GL surface in
_ewk_view_smart_calculate on first window resize.

* UIProcess/API/efl/ewk_view.cpp:
(_ewk_view_smart_calculate):
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
(EWK2UnitTest::EWK2UnitTestBase::SetUp):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133723 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move DrawingAreaImpl methods graphicsLayerFactory, setRootCompositingLayer & scheduleCompositingLayerSync under ACCELERATED_COMPOSITING
https://bugs.webkit.org/show_bug.cgi?id=101427

Patch by Vivek Galatage <vivekgalatage@gmail.com> on 2012-11-06
Reviewed by Anders Carlsson.

Moving these methods under the ACCELERATED_COMPOSITING flag.
This fixes broken wincairo due to use of override specifier.

* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit):
* WebProcess/WebPage/DrawingAreaImpl.h:
(DrawingAreaImpl):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133724 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] media/media-continues-playing-after-replace-source.html fails
https://bugs.webkit.org/show_bug.cgi?id=101429

Unreviewed, EFL gardening.

media-continues-playing-after-replace-source.html test case crashes in WK2 only.

Patch by Kangil Han <kangil.han@samsung.com> on 2012-11-06

* platform/efl-wk2/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133725 268f45cc-cd09-0410-ab3c-d52691b4dbfc
StringBuilder::append(UChar) with an 8 bit quantity shouldn't change the contents to 16 bits
https://bugs.webkit.org/show_bug.cgi?id=101421

Reviewed by Anders Carlsson.

If the string builder contains only 8 bit data, check if the character being appended contains
8 bit data.  If so, append it to the 8 bit buffer instead of converting the buffer to 16 bits.

* wtf/text/StringBuilder.cpp:
(WTF::StringBuilder::append):
* wtf/text/StringBuilder.h:
(WTF::StringBuilder::append):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133726 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Console not displaying all properties of an Object once native Constructor overwritten
https://bugs.webkit.org/show_bug.cgi?id=101320

Reviewed by Pavel Feldman.

Source/WebCore:

Use Object instance from {}.constructor when formatting inspector messages in the
injected script. Otherwise inspected page may overwrite Object value and break inspector.

Test: inspector/console/console-Object-overwritten.html

* inspector/InjectedScriptSource.js:

LayoutTests:

Check that Web Inspector's console works fine if Object is overwritten in the inspected
page.

* inspector/console/console-Object-overwritten-expected.txt: Added.
* inspector/console/console-Object-overwritten.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133727 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Fix execution of exif-orientation-image-document.html on EFL Wk2 bot
https://bugs.webkit.org/show_bug.cgi?id=101343

Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

Add Cairo to the list of backends that support shouldRespectImageOrientation.

No new tests, fixes exif-orientation-image-document.html.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::shouldRespectImageOrientation):

LayoutTests:

Unskipping exif-orientation-image-document.html now that respecting
orientation is default enabled for image documents.

* platform/efl-wk2/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133728 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove support for "desktop-width" in the viewport meta tag
https://bugs.webkit.org/show_bug.cgi?id=101217

Reviewed by Gyuyoung Kim.

Source/WebCore:

This has been removed from the CSS Device Adaptation spec, and
should be safe to remove as it is not documented anywhere (neither
in blog posts).

The viewport meta should only support the legacy features.

* dom/ViewportArguments.cpp:
(WebCore::computeViewportAttributes):
(WebCore::findSizeValue):
(WebCore::findScaleValue):
(WebCore::findUserScalableValue):
* dom/ViewportArguments.h:

Source/WebKit/blackberry:

Sync WebViewportArguments enum with the one in
WebCore::ViewportArguments

* Api/WebViewportArguments.h:

Source/WebKit/chromium:

Remove some code trying to use the set desktop width (say 980) for
sites not using a viewport meta element.

Removing this code should have no effect as it ends up being set
to desktop width in that case anyway, by the ViewportArguments
algorithm.

* src/ChromeClientImpl.cpp:
(WebKit::ChromeClientImpl::dispatchViewportPropertiesDidChange):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133729 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Fix build of modules depending on QtWebKit when using prefix
https://bugs.webkit.org/show_bug.cgi?id=101437

Patch by Oswald Buddenhagen <oswald.buddenhagen@nokia.com> on 2012-11-07
Reviewed by Simon Hausmann.

.:

.qmake.conf loads qt_build_config.prf, which nowadays is responsible for
adding the path to .qmake.super (before it was done by default_pre.prf,
so having setting the path in our default_pre wrapper was sufficient).

* .qmake.conf:

Tools:

Remove setting of MODULE_QMAKE_OUTDIR from here, it's been moved to .qmake.conf.

* qmake/mkspecs/features/default_pre.prf:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133730 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add replaceWithLiteral() method to WTF::String
https://bugs.webkit.org/show_bug.cgi?id=101257

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-11-07
Reviewed by Benjamin Poulain.

Source/WebCore:

Substitute String::replace() calls by String::replaceWithLiteral() where
adequate, for efficiency.

No new tests, no behavior change.

* dom/Node.cpp:
(WebCore::Node::showNode):
* editing/EditingStyle.cpp:
(WebCore::StyleChange::extractTextStyles):
* editing/MarkupAccumulator.cpp:
(WebCore::MarkupAccumulator::appendQuotedURLAttributeValue):
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::setSearch):
* loader/FormSubmission.cpp:
(WebCore::appendMailtoPostFormDataToURL):
* platform/network/soup/ProxyResolverSoup.cpp:
(soupProxyResolverWkSetProperty):
* plugins/PluginView.cpp:
(WebCore::makeURL):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::showBox):
* xml/XSLTProcessor.cpp:
(WebCore::transformTextStringToXHTMLDocumentString):

Source/WebKit/blackberry:

Substitute String::replace() calls by String::replaceWithLiteral() where
adequate, for efficiency.

* WebCoreSupport/SelectPopupClient.cpp:
(WebCore::SelectPopupClient::generateHTML):

Source/WebKit2:

Substitute String::replace() calls by String::replaceWithLiteral() where
adequate, for efficiency.

* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::makeURLString):

Source/WTF:

Add replaceWithLiteral() method to WTF::String that takes
replacement string as a literal to avoid uselessly constructing
a String object.

* wtf/text/StringImpl.cpp:
(WTF::StringImpl::replace):
(WTF):
* wtf/text/StringImpl.h:
(WTF::StringImpl::replace):
(StringImpl):
* wtf/text/WTFString.h:
(String):
(WTF::String::replaceWithLiteral):

Tools:

Add API tests for String::replaceWithLiteral() and corresponding
StringImpl methods.

* TestWebKitAPI/CMakeLists.txt: Add WTFString API tests to CMake.
* TestWebKitAPI/Tests/WTF/StringImpl.cpp:
(TestWebKitAPI::TEST):
(TestWebKitAPI):
* TestWebKitAPI/Tests/WTF/WTFString.cpp:
(TestWebKitAPI::TEST):

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

Marking new test media/progress-events-generated-correctly.html as failing on EFL.

* platform/efl/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133732 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed trivial build fix adapting to QtMultimedia API changes

The QtMultimedia namespace is now called QMultimedia and
QtMultimedia::MetaData is now QMediaMetaData.

* platform/graphics/qt/MediaPlayerPrivateQt.cpp:
(WebCore::MediaPlayerPrivateQt::supportsType):
(WebCore::MediaPlayerPrivateQt::totalBytes):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133733 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] Cleanup V8DOMWrapper::getCachedWrapper
https://bugs.webkit.org/show_bug.cgi?id=100853

Patch by Dan Carney <dcarney@google.com> on 2012-11-07
Reviewed by Adam Barth.

Slight cleanup. Removed redundant branch.

No new tests. No change in functionality.

* bindings/v8/V8DOMWrapper.h:
(WebCore::V8DOMWrapper::getCachedWrapper):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133734 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Switch the efl-linux-slave-2 to Wk2 Release
https://bugs.webkit.org/show_bug.cgi?id=101345

Reviewed by Gyuyoung Kim.

Switching efl-linux-slave-2 to Wk2 Release.

* BuildSlaveSupport/build.webkit.org-config/config.json:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133735 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2: WebKitTestRunner needs to turn on 'setContinuousSpellCheckingEnabled'
https://bugs.webkit.org/show_bug.cgi?id=93611

Reviewed by Gyuyoung Kim.

When WebKitTestRunner turns on the spelling feature with the resetStateToConsistentValues() method,
it happens that the WebProcess is still not launched (although it is already created).
In this case, isValid() method returns false.

This fix sends a message to the WebProcess messages queue, and the message
will be handled once the WebProcess is ready.

* Target.pri:
Adds missing files to compile spellcheking feature for WebKit2-Qt
to use WebKit C API from WKTextChecker.h.

* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::updateTextCheckerState):
Uses canSendMessage() method instead of isValid() to check whether the message to
the WebProcess can be sent.

* UIProcess/efl/TextCheckerEfl.cpp:
(WebKit::TextChecker::continuousSpellCheckingEnabledStateChanged):
Calls TextChecker::setContinuousSpellCheckingEnabled which additionaly invokes the client's method.
WK2-EFL settings for text checker (ewk_settings.cpp) set the default language (if it wasn't set earlier) to
perform the spelling. It allows to pass the tests from editing/spelling directory.

Tools: WebKitTestRunner needs to turn on 'setContinuousSpellCheckingEnabled'
https://bugs.webkit.org/show_bug.cgi?id=93611

Reviewed by Gyuyoung Kim.

WebKitTestRunner enables spelling feature to pass the layout tests from editing/spelling.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues):
Enables spelling by WebKit2 C API.

LayoutTests: [EFL] WebKitTestRunner needs to turn on 'setContinuousSpellCheckingEnabled'
https://bugs.webkit.org/show_bug.cgi?id=93611

Reviewed by Gyuyoung Kim.

Unskip the spelling tests from efl-wk2/TestExpectations to run them for WebKit2-EFL.
Add new missing baselines for two spelling tests for EFL platform.

* platform/efl-wk2/TestExpectations:
* platform/efl/TestExpectations:
* platform/efl/editing/spelling/inline_spelling_markers-expected.txt: Added.
* platform/efl/editing/spelling/spelling-expected.txt: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133736 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Now that it no longer produces image results, remove unnecessary
PNGs for crash-hw-sw-switch.html.  Unreviewed.

* platform/chromium-android/css3/filters/crash-hw-sw-switch-expected.png: Removed.
* platform/chromium-linux/css3/filters/crash-hw-sw-switch-expected.png: Removed.
* platform/chromium-mac-snowleopard/css3/filters/crash-hw-sw-switch-expected.png: Removed.
* platform/chromium-mac/css3/filters/crash-hw-sw-switch-expected.png: Removed.
* platform/chromium-win/css3/filters/crash-hw-sw-switch-expected.png: Removed.
* platform/mac-snowleopard/css3/filters/crash-hw-sw-switch-expected.png: Removed.
* platform/qt/css3/filters/crash-hw-sw-switch-expected.png: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133737 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed. Add Qt EWS bots to the watchers list.

* Scripts/webkitpy/tool/commands/earlywarningsystem.py:
(QtEWS):
(QtWK2EWS):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133738 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Gardening. Add or fix a few pixel expectations.

* platform/efl/compositing/plugins/composited-plugin-expected.png:
* platform/efl/compositing/repaint/composited-document-element-expected.png: Added.
* platform/efl/fast/writing-mode/japanese-ruby-horizontal-bt-expected.png:
* platform/efl/fast/writing-mode/japanese-ruby-horizontal-bt-expected.txt:
* platform/efl/fast/writing-mode/japanese-ruby-vertical-lr-expected.png:
* platform/efl/fast/writing-mode/japanese-ruby-vertical-lr-expected.txt:
* platform/efl/fast/writing-mode/japanese-ruby-vertical-rl-expected.png:
* platform/efl/fast/writing-mode/japanese-ruby-vertical-rl-expected.txt:
* platform/efl/plugins/iframe-plugin-bgcolor-expected.png: Added.
* platform/efl/plugins/mouse-click-plugin-clears-selection-expected.png: Added.
* platform/efl/plugins/netscape-dom-access-expected.png: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133739 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Change encoding detector API names
https://bugs.webkit.org/show_bug.cgi?id=101450

Patch by Kangil Han <kangil.han@samsung.com> on 2012-11-07
Reviewed by Gyuyoung Kim.

To make settings API name consistent, we need to change two APIs with respect to encoding detector.

* UIProcess/API/efl/ewk_settings.cpp:
(ewk_settings_encoding_detector_enabled_set):
(ewk_settings_encoding_detector_enabled_get):
* UIProcess/API/efl/ewk_settings.h:
* UIProcess/API/efl/tests/test_ewk2_settings.cpp:
(TEST_F):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133740 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] Return earlier if a plugin snapshot cannot be created.
https://bugs.webkit.org/show_bug.cgi?id=101445

Reviewed by Kenneth Rohde Christiansen.

Currently only the Mac port has support for creating snapshots of
Netscape plugins. Return earlier in PluginProxy::snapshot() so
that we do not pass a null handler to ShareableBitmap::create()
and avoid crashing when running pixel tests with plugins.

* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::snapshot):


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