[Qt][WK2] Compute and set cache capacities using the current CacheModel
https://bugs.webkit.org/show_bug.cgi?id=73918

Patch by Michael Brüning <michael.bruning@nokia.com> on 2012-06-11
Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

No new tests needed / applicable (using operating system functionality).

Added method to read free file system space for a path to support cache model
implementation in Qt WK 2.

* platform/FileSystem.h:
(WebCore):
* platform/qt/FileSystemQt.cpp:
(WebCore::getVolumeFreeSizeForPath): Added for Qt ports.
(WebCore):

Source/WebKit2:

Added implementation of cache model for Qt WK 2 port including supporting
functionality such as WebProcess creation parameters and default values
for disk cache directories.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
(WebProcessCreationParameters):
* UIProcess/qt/WebContextQt.cpp:
(WebKit::defaultDiskCacheDirectory):
(WebKit):
(WebKit::WebContext::platformInitializeWebProcess):
* WebProcess/qt/WebProcessQt.cpp:
(WebKit::physicalMemorySizeInBytes):
(WebKit::WebProcess::platformSetCacheModel):
(WebKit::WebProcess::platformInitializeWebProcess):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119965 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Adding a flag to show fullscreen media controls in chromium
https://bugs.webkit.org/show_bug.cgi?id=88266

Patch by Min Qin <qinmin@google.com> on 2012-06-11
Reviewed by Adam Barth.

Source/WebCore:

The default chromium shadow DOM for media element does not contain fullscreen button.
This change adds a flag to display the fullscreen button.
It will be used by the android port.

No new tests needed. We will use the same layout tests as desktop chromium.
However, new test result expections will be added later.

* html/shadow/MediaControlRootElementChromium.cpp:
(WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium):
(WebCore::MediaControlRootElementChromium::create):
(WebCore::MediaControlRootElementChromium::setMediaController):
(WebCore::MediaControlRootElementChromium::reset):
(WebCore::MediaControlRootElementChromium::reportedError):
* html/shadow/MediaControlRootElementChromium.h:
(MediaControlRootElementChromium):

Source/WebKit/chromium:

Adding a flag to the gyp file so that we can enable fullscreen media control

* features.gypi:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119966 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rect-based hittesting doesn't work in tables.
https://bugs.webkit.org/show_bug.cgi?id=86605

Patch by Allan Sandfeld Jensen <allan.jensen@nokia.com> on 2012-06-11
Reviewed by Julien Chaffraix.

Source/WebCore:

The existing code only performed a single binary lookup for the central
hit-test point. This meant area-based hit-testing did not work across
table-cell borders. All cells spanned by a hit-test area must be hit
tested.

This patch introduces three auxilary functions to help calculate rows
and columns spanned by an rect. These are intended to also be used by
repaint logic in a later patch.

For point-based hit-testing we maintain unchanged behavior and still
only hit test a single column in a single row.

Test: fast/dom/nodesFromRect-table.html

* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::logicalRectForWritingModeAndDirection):
(WebCore::RenderTableSection::spannedRows):
(WebCore::RenderTableSection::spannedColumns):
(WebCore::RenderTableSection::nodeAtPoint):
* rendering/RenderTableSection.h:
(RenderTableSection):

LayoutTests:

Test nodesFromRect on tables.

* fast/dom/nodesFromRect-table-expected.txt: Added.
* fast/dom/nodesFromRect-table.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119967 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][WK2] Compute and set cache capacities using the current CacheModel
https://bugs.webkit.org/show_bug.cgi?id=73918

Unreviewed build fix.

No new tests added as this is a build fix.

Patch by Michael Brüning <michael.bruning@nokia.com> on 2012-06-11

* platform/qt/FileSystemQt.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119968 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][Win] Fix UString related build problem in Source/WebCore/bridge/qt/qt_instance.cpp
https://bugs.webkit.org/show_bug.cgi?id=88310

Reviewed by Simon Hausmann.

* bridge/qt/qt_instance.cpp:
(JSC::Bindings::QtInstance::getPropertyNames):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119969 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][Win] Add missing includes to fix the build
https://bugs.webkit.org/show_bug.cgi?id=88538

Reviewed by Simon Hausmann.

* Api/qwebframe.cpp:
* WebCoreSupport/ChromeClientQt.cpp:
* WebCoreSupport/DumpRenderTreeSupportQt.cpp:
* WebCoreSupport/GeolocationClientQt.cpp:
* WebCoreSupport/IconDatabaseClientQt.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119970 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Skipping http/tests/security/mixedContent/filesystem-url-in-iframe.html
https://bugs.webkit.org/show_bug.cgi?id=88770

ENABLE(FILE_SYSTEM) is disabled; this test should be skipped until
that feature is enabled. Moving it up into the proper section of the
Skipped file to make sure it's enabled if and when the feature makes
it into the port.

Patch by Mike West <mkwst@chromium.org> on 2012-06-11
Reviewed by Csaba Osztrogonác.

* platform/qt/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119971 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Unreviewed: Mark track-cue-rendering-inner-timestamps.html failing on Vista

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119972 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Unreviewed: Rebaselines and updated expectations for media tests

Pixel differences are due to antialiasing and different rounded
corners on the media progress bar. The difference is not
noticeable.

* platform/chromium-win/media/audio-controls-rendering-expected.png:
* platform/chromium-win/media/audio-repaint-expected.png:
* platform/chromium-win/media/controls-after-reload-expected.png:
* platform/chromium-win/media/controls-layout-direction-expected.png:
* platform/chromium-win/media/controls-strict-expected.png:
* platform/chromium-win/media/controls-styling-expected.png:
* platform/chromium-win/media/controls-without-preload-expected.png:
* platform/chromium-win/media/media-controls-clone-expected.png:
* platform/chromium-win/media/media-document-audio-repaint-expected.png:
* platform/chromium-win/media/video-controls-rendering-expected.png:
* platform/chromium-win/media/video-display-toggle-expected.png:
* platform/chromium-win/media/video-layer-crash-expected.png:
* platform/chromium-win/media/video-no-audio-expected.png:
* platform/chromium-win/media/video-playing-and-pause-expected.png:
* platform/chromium-win/media/video-transformed-expected.png:
* platform/chromium-win/media/video-volume-slider-expected.png:
* platform/chromium-win/media/video-zoom-controls-expected.png:
* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119973 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Should call frameDetached() in WebPagePopupImpl::close()
https://bugs.webkit.org/show_bug.cgi?id=88754

Reviewed by Adam Barth.

* src/WebPagePopupImpl.cpp:
(WebKit::WebPagePopupImpl::close): Calls FrameLoader::frameDetached().


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119974 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add QML api for setting device width and height
https://bugs.webkit.org/show_bug.cgi?id=88777

Reviewed by Simon Hausmann.

Source/WebCore:

Change the default values for deviceWidth/Height to be 0 (unset). The
original values were introduced by Qt and 0 makes it possible to
detect if a value has never been set and therefore fall back.

Only Qt depended on the former values.

* page/Settings.cpp:
(WebCore::Settings::Settings):

Source/WebKit2:

Add the new API and set the default values to 0 (unset). The
current values were introduced by Qt and only Qt depends on them.

* Shared/WebPreferencesStore.h:
(WebKit):
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewExperimental::deviceWidth):
(QQuickWebViewExperimental::setDeviceWidth):
(QQuickWebViewExperimental::deviceHeight):
(QQuickWebViewExperimental::setDeviceHeight):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/qt/QtViewportHandler.cpp:
(WebKit::QtViewportHandler::viewportItemSizeChanged):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::sendViewportAttributesChanged):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119975 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Gardening after r119962. Four inspector/debugger tests still fail after they have been re-enabled.
https://bugs.webkit.org/show_bug.cgi?id=43332

Patch by János Badics <jbadics@inf.u-szeged.hu> on 2012-06-11
Reviewed by Csaba Osztrogonác.

* platform/qt/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119976 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: [Qt] Add config tests for WEBP imagedecoder library, modify HAVE(decoderlibrary) to USE(...)$
https://bugs.webkit.org/show_bug.cgi?id=87841

Reviewed by Simon Hausmann.

No new tests were needed.

* Target.pri:
* WebCore.pri:
* platform/image-decoders/ImageDecoder.cpp:
(WebCore::ImageDecoder::create):

Tools: [Qt] Add config tests for WEBP imagedecoder library, modify HAVE(decoderlibrary) to USE(...)
https://bugs.webkit.org/show_bug.cgi?id=87841

Reviewed by Simon Hausmann.

* qmake/config.tests/libwebp/libwebp.cpp: Added.
(main):
* qmake/config.tests/libwebp/libwebp.pro: Added.
* qmake/sync.profile:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119977 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reverted r119940 because it caused multiple media tests to fail on Lion.

Source/WebCore: 

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::prepareForLoad):
(WebCore):
(WebCore::HTMLMediaElement::userCancelledLoad):
* html/HTMLMediaElement.h:
(HTMLMediaElement):
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::commonMovieAttributes):

LayoutTests: 

* http/tests/media/video-src-invalid-error-expected.txt: Removed.
* http/tests/media/video-src-invalid-error.html: Removed.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119978 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Unreviewed: Rebaselines for svg/as-background-image tests on Windows.

* platform/chromium-linux/svg/as-background-image/svg-as-background-2-expected.png: Removed.
* platform/chromium-win/svg/as-background-image/svg-as-background-2-expected.png:
* platform/chromium-win/svg/as-background-image/svg-as-background-4-expected.png:
* platform/chromium-win/svg/as-background-image/svg-as-background-5-expected.png:
* platform/chromium-win/svg/as-background-image/svg-as-background-with-relative-size-expected.png:
* platform/chromium-win/svg/as-background-image/svg-background-partial-redraw-expected.png:
* platform/chromium-win/svg/as-image/animated-svg-as-image-no-fixed-intrinsic-size-expected.png:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119979 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Unreviewed: Rebaseline more SVG tests on Windows.

* platform/chromium-linux-x86/svg/batik/filters/filterRegions-expected.png: Removed.
* platform/chromium-win-vista/svg/batik/paints/gradientLimit-expected.png: Added.
* platform/chromium-win-xp/svg/batik/paints/patternPreserveAspectRatioA-expected.png: Added.
* platform/chromium-win-xp/svg/batik/text/smallFonts-expected.png: Added.
* platform/chromium-win/svg/W3C-SVG-1.1/fonts-elem-04-b-expected.png:
* platform/chromium-win/svg/W3C-SVG-1.1/fonts-elem-05-t-expected.png:
* platform/chromium-win/svg/W3C-SVG-1.1/fonts-elem-06-t-expected.png:
* platform/chromium-win/svg/W3C-SVG-1.1/fonts-elem-07-b-expected.png:
* platform/chromium-win/svg/W3C-SVG-1.1/fonts-glyph-02-t-expected.png:
* platform/chromium-win/svg/W3C-SVG-1.1/fonts-glyph-03-t-expected.png:
* platform/chromium-win/svg/W3C-SVG-1.1/fonts-glyph-04-t-expected.png:
* platform/chromium-win/svg/W3C-SVG-1.1/fonts-kern-01-t-expected.png:
* platform/chromium-win/svg/W3C-SVG-1.1/interact-cursor-01-f-expected.png:
* platform/chromium-win/svg/W3C-SVG-1.1/interact-order-01-b-expected.png:
* platform/chromium-win/svg/W3C-SVG-1.1/interact-order-02-b-expected.png:
* platform/chromium-win/svg/W3C-SVG-1.1/interact-zoom-01-t-expected.png:
* platform/chromium-win/svg/W3C-SVG-1.1/linking-a-01-b-expected.png:
* platform/chromium-win/svg/W3C-SVG-1.1/linking-a-02-b-expected.png:
* platform/chromium-win/svg/as-image/img-preserveAspectRatio-support-2-expected.png:
* platform/chromium-win/svg/as-image/same-image-two-instances-expected.png:
* platform/chromium-win/svg/as-image/svg-as-relative-image-expected.png:
* platform/chromium-win/svg/as-image/svg-image-change-content-size-expected.png:
* platform/chromium-win/svg/batik/filters/feTile-expected.png:
* platform/chromium-win/svg/batik/filters/filterRegions-expected.png:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119980 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Fix make distcheck issues.

.:

* GNUmakefile.am: Initialize jscore nosource variables.

Source/JavaScriptCore:

* GNUmakefile.list.am: Remove non existent header file.

Source/WebCore:

* GNUmakefile.am: Add idl files in editing dir to EXTRA_DIST.
* GNUmakefile.list.am: Add missing header file.

Source/WTF:

* GNUmakefile.list.am: Add missing header file.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119981 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Free texture from CCIOSurfaceLayerImpl when it is destroyed
https://bugs.webkit.org/show_bug.cgi?id=88371

Reviewed by James Robinson.

Source/WebCore:

Unit test: CCLayerTreeHostImplTest.layersFreeTextures

* platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp:
(WebCore::CCIOSurfaceLayerImpl::~CCIOSurfaceLayerImpl):
(WebCore::CCIOSurfaceLayerImpl::willDraw):

Source/WebKit/chromium:

* tests/CCLayerTreeHostImplTest.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119982 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make media (<video> and <audio>) slide draggable again https://bugs.webkit.org/show_bug.cgi?id=88742 PR #158199

Reviewed by George Staikos.
Patch by Antonio Gomes <agomes@rim.com>

First check if the element is a range type then gets its
shadow DOM ancestor.

* WebKitSupport/TouchEventHandler.cpp:
(BlackBerry::WebKit::shouldConvertTouchToMouse):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119983 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add css3-images image-resolution (dppx only)
https://bugs.webkit.org/show_bug.cgi?id=85332

Patch by David Barr <davidbarr@chromium.org> on 2012-06-11
Reviewed by Tony Chang.

The css3-images module is at candidate recommendation.
http://www.w3.org/TR/2012/CR-css3-images-20120417/#image-resolution

Source/WebCore:

Test: fast/css/image-resolution.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore):
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSGrammar.y:
* css/CSSParser.cpp:
(WebCore::CSSParser::validUnit):
(WebCore::CSSParser::createPrimitiveNumericValue):
(WebCore::unitFromString):
(WebCore::CSSParser::parseValidPrimitive):
(WebCore::CSSParser::parseValue):
(WebCore):
(WebCore::CSSParser::parseImageResolution):
(WebCore::CSSParser::detectNumberToken):
* css/CSSParser.h:
* css/CSSPrimitiveValue.cpp:
(WebCore::isValidCSSUnitTypeForDoubleConversion):
(WebCore::unitCategory):
(WebCore::CSSPrimitiveValue::canonicalUnitTypeForCategory):
(WebCore::CSSPrimitiveValue::customCssText):
(WebCore::CSSPrimitiveValue::cloneForCSSOM):
* css/CSSPrimitiveValue.h:
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyNames.in:
* css/StyleBuilder.cpp:
(WebCore):
(ApplyPropertyImageResolution):
(WebCore::ApplyPropertyImageResolution::applyInheritValue):
(WebCore::ApplyPropertyImageResolution::applyInitialValue):
(WebCore::ApplyPropertyImageResolution::applyValue):
(WebCore::ApplyPropertyImageResolution::createHandler):
(WebCore::StyleBuilder::StyleBuilder):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::collectMatchingRulesForList):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::styleDidChange):
(WebCore::RenderImage::imageDimensionsChanged):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::diff):
* rendering/style/RenderStyle.h:
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator==):
* rendering/style/StyleRareInheritedData.h:
(StyleRareInheritedData):

LayoutTests:

* fast/css/image-resolution/image-resolution-expected.txt: Added.
* fast/css/image-resolution/image-resolution.html: Added.
* platform/chromium/TestExpectations: Skip tests until image-resolution implementation lands.
* platform/efl/TestExpectations: Skip tests until image-resolution implementation lands.
* platform/gtk/TestExpectations: Skip tests until image-resolution implementation lands.
* platform/mac/TestExpectations: Skip tests until image-resolution implementation lands.
* platform/qt/TestExpectations: Skip tests until image-resolution implementation lands.

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