Add StorageStrategy member functions to WebKit2
https://bugs.webkit.org/show_bug.cgi?id=108105

Reviewed by Tim Horton.

Source/WebCore:

StorageStrategy::sessionStorageNamespace should be virtual, not static...

* WebCore.exp.in:
* storage/StorageStrategy.h:
(StorageStrategy):

Source/WebKit2:

Add default implementations that just chain up to the base class for now.

* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::localStorageNamespace):
(WebKit::WebPlatformStrategies::sessionStorageNamespace):
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
(WebPlatformStrategies):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140995 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Revert 130950
BUG=163593

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140996 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shaders] Parse @-webkit-filter
https://bugs.webkit.org/show_bug.cgi?id=106837

Reviewed by Dean Jackson.

Source/WebCore:

The new CSS Custom Filters syntax includes an @filter rule:
@filter IDENT { <custom-filter-description> }

IDENT is the filter name. For example:
@filter my-filter { ... }

<custom-filter-description> is a set of CSS properties, which are still under discussion in
the CSSWG.

This patch adds parsing and JS bindings for the prefixed at-rule. It does not add parsing
for any of the at-rule's internal properties.

Spec: https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html#the-atfilter-rule

Tests: css3/filters/custom/custom-filter-parsing-at-rule-invalid.html
       css3/filters/custom/custom-filter-parsing-at-rule-valid.html

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSCSSRuleCustom.cpp:
(WebCore::toJS):
* bindings/objc/DOMCSS.mm:
(kitClass):
* bindings/v8/custom/V8CSSRuleCustom.cpp:
(WebCore::wrap):
* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParser::createFilterRule):
(WebCore::CSSParser::detectAtToken):
* css/CSSParser.h:
* css/CSSPropertySourceData.h:
* css/CSSRule.h:
* css/CSSRule.idl:
    Only contains a CSSStyleDeclaration "style" property, like the other at-rules that are
    supposed to contain properties (e.g. CSSStyleRule, CSSFontFaceRule, CSSPageRule).
    Eventually, when it's specified, we should expose the filter name as well.
    Other at-rules IDL Spec: http://www.w3.org/TR/DOM-Level-2-Style/idl-definitions.html
* css/StyleRule.cpp:
(WebCore::StyleRuleBase::reportMemoryUsage):
(WebCore::StyleRuleBase::destroy):
(WebCore::StyleRuleBase::copy):
(WebCore::StyleRuleBase::createCSSOMWrapper):
(WebCore::StyleRuleFilter::StyleRuleFilter):
(WebCore::StyleRuleFilter::~StyleRuleFilter):
(WebCore::StyleRuleFilter::mutableProperties):
(WebCore::StyleRuleFilter::setProperties):
(WebCore::StyleRuleFilter::reportDescendantMemoryUsage):
* css/StyleRule.h:
(StyleRuleBase):
(WebCore::StyleRuleBase::isFilterRule):
(StyleRuleFilter):
(WebCore::StyleRuleFilter::create):
(WebCore::StyleRuleFilter::filterName):
(WebCore::StyleRuleFilter::properties):
(WebCore::StyleRuleFilter::copy):
* css/StyleSheetContents.cpp:
(WebCore::childRulesHaveFailedOrCanceledSubresources):
* css/WebKitCSSFilterRule.cpp: Added.
    WebKitCSSFilterRule is implemented similar to CSSFontFaceRule.
(WebCore::WebKitCSSFilterRule::WebKitCSSFilterRule):
(WebCore::WebKitCSSFilterRule::~WebKitCSSFilterRule):
(WebCore::WebKitCSSFilterRule::style):
(WebCore::WebKitCSSFilterRule::cssText):
    The CSS text implementation for WebKitCSSFilterRule is almost the same as
    CSSFontFaceRule. WebKitCSSFilterRule additionally needs to output the filter name in its
    syntax (e.g. @-webkit-filter my-filter { }).
(WebCore::WebKitCSSFilterRule::reattach):
(WebCore::WebKitCSSFilterRule::reportMemoryUsage):
* css/WebKitCSSFilterRule.h: Added.
(WebKitCSSFilterRule):
(WebCore::WebKitCSSFilterRule::create):
* css/WebKitCSSFilterRule.idl: Added.

LayoutTests:

Add positive and negative tests for parsing the @-webkit-filter rule.

Factored out common helper functions between the existing CSS Custom Filters parsing tests
and the new tests into custom-filter-parsing-common.js.

* css3/filters/custom/custom-filter-parsing-at-rule-invalid-expected.txt: Added.
* css3/filters/custom/custom-filter-parsing-at-rule-invalid.html: Added.
* css3/filters/custom/custom-filter-parsing-at-rule-valid-expected.txt: Added.
* css3/filters/custom/custom-filter-parsing-at-rule-valid.html: Added.
* css3/filters/custom/custom-filter-property-parsing-invalid.html:
* css3/filters/custom/custom-filter-property-parsing.html:
* css3/filters/script-tests/custom-filter-parsing-at-rule-invalid.js: Added.
(testInvalidFilterAtRule):
* css3/filters/script-tests/custom-filter-parsing-at-rule-valid.js: Added.
(testFilterAtRule):
    Tests @-webkit-filter rule parsing and its ability to hold CSS properties.
(testNestedRules):
    Tests nesting between at-rules, involving @-webkit-filter rules.
(checkRule):
    Factor out common rule checking functionality into its own helper function, so it can be
    reused.
* css3/filters/script-tests/custom-filter-parsing-common.js: Added.
(jsWrapperClass):
    Moved.
(shouldBeType):
    Moved.
* css3/filters/script-tests/custom-filter-property-parsing-invalid.js:
* css3/filters/script-tests/custom-filter-property-parsing.js:
* platform/chromium/css3/filters/custom/custom-filter-parsing-at-rule-valid-expected.txt:
    V8 represents WebKitCSSFilterRule a little differently.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140997 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Revert 140996
> Revert 130950
> BUG=163593

TBR=cevans@google.com

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140998 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Promote composited-scrolling layers to stacking containers.
https://bugs.webkit.org/show_bug.cgi?id=106142

Reviewed by Simon Fraser.

With this patch, RenderLayers that use composited scrolling are
treated as stacking contexts. Since isStackingContainer now depends on
the value of m_needsCompositedScrolling, special care needed to be
taken to ensure that the value of isStackingContainer is not used when
updating m_needsCompositedScrolling. In particular, the code for
rebuilding the layer lists needed to be generalized so that we could
build the layer lists using the value of isStackingContext rather than
isStackingContainer when building the layer lists used to determine if
the descendants are contiguous in stacking order. Also, updating
m_needsCompositedScrolling can now affect stacking container status
and can therefore dirty layer lists.

Source/WebCore:

Test: compositing/overflow/composited-scrolling-creates-a-stacking-container.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateDescendantsAreContiguousInStackingOrder):
  Modified to use layer lists built based on isStackingContext rather
  than isStackingContainer.
(WebCore::RenderLayer::updateNeedsCompositedScrolling):
  This function can now affect stacking container status and layer
  lists.
(WebCore::RenderLayer::rebuildZOrderLists):
  Refactored to generalize layer list building.
(WebCore::RenderLayer::collectLayers):
  This function can now stop at either stacking containers or
  contexts.
(WebCore::RenderLayer::updateLayerListsIfNeeded):
  Layer lists may need to be built a 2nd time if we opt into
  composited scrolling.
* rendering/RenderLayer.h:
(RenderLayer):
(WebCore::RenderLayer::isStackingContainer):
  Returns true if we use composited scrolling.

LayoutTests:

* compositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt: Added.
* compositing/overflow/composited-scrolling-creates-a-stacking-container.html: Added.
* platform/chromium/TestExpectations:
* platform/mac/compositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt: Added.


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