diff options
author | kenneth@webkit.org <kenneth@webkit.org@bbb929c8-8fbe-4397-9dbb-9b2b20218538> | 2012-10-23 15:15:43 +0000 |
---|---|---|
committer | kenneth@webkit.org <kenneth@webkit.org@bbb929c8-8fbe-4397-9dbb-9b2b20218538> | 2012-10-23 15:15:43 +0000 |
commit | 90a00be32a5470734b4c80694399a22ec6bb7478 (patch) | |
tree | 51913c94b8ba04e213bf8f7fb13103db2551d713 /third_party/WebKit/Tools/qmake | |
parent | 778d0393141c41e06f5119a74081228503ad1979 (diff) | |
download | chromium_src-90a00be32a5470734b4c80694399a22ec6bb7478.zip chromium_src-90a00be32a5470734b4c80694399a22ec6bb7478.tar.gz chromium_src-90a00be32a5470734b4c80694399a22ec6bb7478.tar.bz2 |
Add support for resolution media query
https://bugs.webkit.org/show_bug.cgi?id=99077
Reviewed by Antti Koivisto.
.:
* Source/cmake/OptionsEfl.cmake:
* Source/cmake/WebKitFeatures.cmake:
* Source/cmakeconfig.h.cmake:
Add support for the RESOLUTION_MEDIA_QUERY feature flag.
* Source/autotools/symbols.filter:
Export the WebCore::Settings setting.
Source/WebCore:
Add support for 'resolution' media query feature.
Background info:
http://www.w3.org/blog/CSS/2012/06/14/unprefix-webkit-device-pixel-ratio
Related spec links:
http://www.w3.org/TR/css3-mediaqueries/#resolution (recommendation)
http://www.w3.org/TR/css3-values/#resolution (candidate recommentation)
Add infrastructure to make it testable.
Test: fast/media/mq-resolution.html
* css/CSSParser.cpp:
(WebCore::CSSParser::validUnit):
(WebCore::CSSParser::createPrimitiveNumericValue):
(WebCore::CSSParser::parseValidPrimitive):
(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:
Enable dpi, dpcm and dppx units when RESOLUTION_MEDIA_QUERY
is enabled.
* WebCore.exp.in:
Export the WebCore::Settings setting.
* css/CSSPrimitiveValue.h:
(WebCore::CSSPrimitiveValue::isDotsPerInch):
(WebCore::CSSPrimitiveValue::isDotsPerPixel):
(WebCore::CSSPrimitiveValue::isDotsPerCentimeter):
(CSSPrimitiveValue):
Add function for checking the recently added density types.
* css/MediaFeatureNames.h:
(MediaFeatureNames):
Add support for resolution, min-resolution and max-resolution.
* css/MediaQueryEvaluator.cpp:
(WebCore::compareResolution): Add methods for comparing resolutions.
(WebCore):
(WebCore::resolutionMediaFeatureEval):
(WebCore::min_resolutionMediaFeatureEval):
(WebCore::max_resolutionMediaFeatureEval):
Implement the resolution method evaluation.
* css/MediaQueryExp.cpp:
(WebCore::featureWithValidPositiveDensity):
(WebCore):
(WebCore::featureWithoutValue):
(WebCore::MediaQueryExp::MediaQueryExp):
Hook up resolution with the right pre-checks.
* page/Screen.cpp:
(WebCore::Screen::horizontalDPI):
(WebCore::Screen::verticalDPI):
Check whether an override exists, and if so, uses it.
If not calculate the value given the device scale factor.
* page/Settings.cpp:
(WebCore::Settings::setResolutionOverride):
(WebCore):
* page/Settings.h:
(Settings):
(WebCore::Settings::resolutionOverride):
Add a resolution override to settings.
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setResolutionOverride):
(WebCore):
* testing/InternalSettings.h:
(Backup):
(InternalSettings):
* testing/InternalSettings.idl:
Add a new setResolutionOverride method to internals.settings.
Source/WebKit/chromium:
Add support for the RESOLUTION_MEDIA_QUERY feature flag.
* features.gypi:
Source/WebKit/mac:
Add support for the RESOLUTION_MEDIA_QUERY feature flag.
* Configurations/FeatureDefines.xcconfig:
Source/WebKit2:
* win/WebKit2.def:
Add exports for the WebCore::Settings setting.
* Configurations/FeatureDefines.xcconfig:
Add support for the RESOLUTION_MEDIA_QUERY feature flag.
Tools:
Add support for the RESOLUTION_MEDIA_QUERY feature flag.
* Scripts/webkitperl/FeatureList.pm:
* qmake/mkspecs/features/features.pri:
LayoutTests:
Test (resolution: x) media query to ensure compliance
with spec plus proposed dppx values.
* fast/media/mq-resolution-expected.txt: Added.
* fast/media/mq-resolution.html: Added.
* LayoutTests/platform/mac/TestExpectations:
* LayoutTests/platform/chromium/TestExpectations:
Skip the test as the ports do not enable CSS Image Resolution.
git-svn-id: svn://svn.chromium.org/blink/trunk@132227 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Diffstat (limited to 'third_party/WebKit/Tools/qmake')
-rw-r--r-- | third_party/WebKit/Tools/qmake/mkspecs/features/features.pri | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/third_party/WebKit/Tools/qmake/mkspecs/features/features.pri b/third_party/WebKit/Tools/qmake/mkspecs/features/features.pri index 33cc040..ae856a4 100644 --- a/third_party/WebKit/Tools/qmake/mkspecs/features/features.pri +++ b/third_party/WebKit/Tools/qmake/mkspecs/features/features.pri @@ -88,6 +88,7 @@ FEATURE_DEFAULTS = \ ENABLE_PAGE_VISIBILITY_API=1 \ ENABLE_PROGRESS_ELEMENT=1 \ ENABLE_QUOTA=0 \ + ENABLE_RESOLUTION_MEDIA_QUERY=1 \ ENABLE_REQUEST_ANIMATION_FRAME=1 \ ENABLE_SCRIPTED_SPEECH=0 \ ENABLE_SHADOW_DOM=0 \ |