Source/WebCore: Add -webkit-overflow-scrolling CSS property
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Feb 2012 05:09:09 +0000 (05:09 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Feb 2012 05:09:09 +0000 (05:09 +0000)
commit07a2027198763ad8c32434929e30235b6e294b1e
tree04bfdaf4cf661f3bf6beba13223b4ddb1bd16fd1
parent57ddf1d0ebe5c44569b2b34882dbafe3bc9a0961
Source/WebCore: Add -webkit-overflow-scrolling CSS property
https://bugs.webkit.org/show_bug.cgi?id=78664

Patch by Sami Kyostila <skyostil@google.com> on 2012-02-15
Reviewed by Eric Seidel.

Add a CSS property indicating that an element with overflow scrolling
should follow the platform's behavior for touch scrollable user
interface objects. For instance, this property could enable momentum
scrolling for the element if that is the platform convention.

The property has two possible values: auto (default) and touch. The
former does not alter overflow scrolling behavior, while the latter
activates touch scrolling.

As a side effect, enabling touch scrolling also causes an element to
gain a stacking context. This is to allow the implementation to promote
the scrolling contents into a render layer, which can be translated more
efficiently.

This property was introduced with iOS 5 WebKit. Another implementation
is in Chrome for Android.

Test: platform/chromium/compositing/overflow/overflow-scrolling-touch-stacking-context.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore):
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyNames.in:
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::adjustRenderStyle):
(WebCore::CSSStyleSelector::applyProperty):
* css/CSSValueKeywords.in:
* rendering/style/RenderStyle.h:
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator==):
* rendering/style/StyleRareInheritedData.h:
(StyleRareInheritedData):

Source/WebKit/chromium: Enable -webkit-overflow-scrolling CSS property
https://bugs.webkit.org/show_bug.cgi?id=78664

Patch by Sami Kyostila <skyostil@google.com> on 2012-02-15
Reviewed by Eric Seidel.

* features.gypi:

LayoutTests: Add stacking context test for -webkit-overflow-scrolling CSS property
https://bugs.webkit.org/show_bug.cgi?id=78664

Patch by Sami Kyostila <skyostil@google.com> on 2012-02-15
Reviewed by Eric Seidel.

Make sure a stacking context is created for elements with touch overflow scrolling.

* platform/chromium-win/fast/css/getComputedStyle/computed-style-expected.txt: Added new property.
* platform/chromium-win/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: Ditto.
* platform/chromium-win/svg/css/getComputedStyle-basic-expected.txt: Ditto.
* platform/chromium/compositing/overflow/overflow-scrolling-touch-stacking-context-expected.png: Added.
* platform/chromium/compositing/overflow/overflow-scrolling-touch-stacking-context-expected.txt: Added.
* platform/chromium/compositing/overflow/overflow-scrolling-touch-stacking-context.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@107881 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/chromium-win/fast/css/getComputedStyle/computed-style-expected.txt
LayoutTests/platform/chromium-win/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
LayoutTests/platform/chromium-win/svg/css/getComputedStyle-basic-expected.txt
LayoutTests/platform/chromium/compositing/overflow/overflow-scrolling-touch-stacking-context-expected.png [new file with mode: 0644]
LayoutTests/platform/chromium/compositing/overflow/overflow-scrolling-touch-stacking-context-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/compositing/overflow/overflow-scrolling-touch-stacking-context.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSProperty.cpp
Source/WebCore/css/CSSPropertyNames.in
Source/WebCore/css/CSSStyleSelector.cpp
Source/WebCore/css/CSSValueKeywords.in
Source/WebCore/rendering/style/RenderStyle.h
Source/WebCore/rendering/style/StyleRareInheritedData.cpp
Source/WebCore/rendering/style/StyleRareInheritedData.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/features.gypi