Legacy CSS vendor prefixes should only work for Dashboard
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 17 Mar 2013 21:39:31 +0000 (21:39 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 17 Mar 2013 21:39:31 +0000 (21:39 +0000)
commit7c78497f7214486eef2c561c1a636c051918cd8f
tree3534850eb413da95a0ee11f0ef6651748f9bf9df
parent5ac700f0fd6d1e1e6e15bfa3fe52ac3a57d376bd
Legacy CSS vendor prefixes should only work for Dashboard
https://bugs.webkit.org/show_bug.cgi?id=111890

Reviewed by Eric Seidel.

Source/WebCore:

Our experience with the Chromium port is that these legacy CSS vendor
prefixes (-apple- and -khtml-) are not needed for web compatibility.
There is reason to believe, however, that they are needed for
compatibility with Mac OS X Dashboard widgets.

This patch makes the code for these legacy CSS vendor prefixes
enabled at runtime and only enables them when running in Dashboard
compatibility mode. This is the first step towards the plan outlined in
https://lists.webkit.org/pipermail/webkit-dev/2013-March/024085.html.

This patch also removes support for ENABLE(LEGACY_CSS_VENDOR_PREFIXES)
from the V8 bindings because V8 is never used with Dashboard.

* bindings/generic/RuntimeEnabledFeatures.cpp:
(WebCore):
* bindings/generic/RuntimeEnabledFeatures.h:
(RuntimeEnabledFeatures):
(WebCore::RuntimeEnabledFeatures::setLegacyCSSVendorPrefixesEnabled):
(WebCore::RuntimeEnabledFeatures::legacyCSSVendorPrefixesEnabled):
* bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::getCSSPropertyNamePrefix):
(WebCore::cssPropertyIDForJSCSSPropertyName):
* bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
(WebCore::cssPropertyInfo):
* css/CSSParser.cpp:
(WebCore::CSSParser::rewriteSpecifiers):

Source/WebKit/mac:

Enable legacy CSS vendor prefixes when we've been asked to turn on
Dashboard compatibility mode.

* WebView/WebView.mm:
(-[WebView _setDashboardBehavior:to:]):

LayoutTests:

* inspector/styles/vendor-prefixes-expected.txt:
    - Update results to show our new behavior now that -apple- and
      -khtml- are not supported.
* platform/mac/TestExpectations:
    - Skip a test that is testing that we support -apple- prefixes.
* platform/mac/fast/css/dashboard-region-parser.html:
    - Update test to use -webkit- rather than -apple-.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@146025 268f45cc-cd09-0410-ab3c-d52691b4dbfc
31 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/css/apple-prefix.html [deleted file]
LayoutTests/inspector/styles/vendor-prefixes-expected.txt
LayoutTests/platform/chromium-linux/fast/css/apple-prefix-expected.png [deleted file]
LayoutTests/platform/chromium-mac-snowleopard/fast/css/apple-prefix-expected.png [deleted file]
LayoutTests/platform/chromium-mac/fast/css/apple-prefix-expected.png [deleted file]
LayoutTests/platform/chromium-win/fast/css/apple-prefix-expected.png [deleted file]
LayoutTests/platform/chromium-win/fast/css/apple-prefix-expected.txt [deleted file]
LayoutTests/platform/chromium/TestExpectations
LayoutTests/platform/chromium/fast/css/apple-prefix-expected.txt [deleted file]
LayoutTests/platform/efl/TestExpectations
LayoutTests/platform/efl/fast/css/apple-prefix-expected.png [deleted file]
LayoutTests/platform/efl/fast/css/apple-prefix-expected.txt [deleted file]
LayoutTests/platform/gtk/TestExpectations
LayoutTests/platform/gtk/fast/css/apple-prefix-expected.png [deleted file]
LayoutTests/platform/gtk/fast/css/apple-prefix-expected.txt [deleted file]
LayoutTests/platform/mac/fast/css/apple-prefix-expected.png [deleted file]
LayoutTests/platform/mac/fast/css/apple-prefix-expected.txt [deleted file]
LayoutTests/platform/mac/fast/css/dashboard-region-parser.html
LayoutTests/platform/qt/TestExpectations
LayoutTests/platform/qt/fast/css/apple-prefix-expected.png [deleted file]
LayoutTests/platform/qt/fast/css/apple-prefix-expected.txt [deleted file]
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp
Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h
Source/WebCore/bindings/js/JSCSSStyleDeclarationCustom.cpp
Source/WebCore/bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp
Source/WebCore/css/CSSParser.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebView.mm