Use type-checking FilterOperation casts in CoordinatedGraphicsArgumentCoders.cpp
<http://webkit.org/b/133203>

Reviewed by Simon Fraser.

* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
(IPC::ArgumentCoder<WebCore::FilterOperations>::encode):
- Replace static_cast<>() operators with type-checking
  FilterOperation casts.
- Replace 'default' statement with 'case' statements so new
  filters added later require an explicit decision to be made.
(IPC::ArgumentCoder<WebCore::FilterOperations>::decode):
- Replace 'default' statement with 'case' statements so new
  filters added later require an explicit decision to be made.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169319 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add type-checked casts for TransformOperations
<http://webkit.org/b/133217>

Reviewed by Simon Fraser.

Source/WebCore:

* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::validateTransformOperations):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::getTransformFunctionValue):
- Switch to type-checked casts.

* platform/graphics/transforms/IdentityTransformOperation.h:
* platform/graphics/transforms/Matrix3DTransformOperation.h:
* platform/graphics/transforms/MatrixTransformOperation.h:
* platform/graphics/transforms/PerspectiveTransformOperation.h:
* platform/graphics/transforms/RotateTransformOperation.h:
* platform/graphics/transforms/ScaleTransformOperation.h:
* platform/graphics/transforms/SkewTransformOperation.h:
* platform/graphics/transforms/TranslateTransformOperation.h:
- Add 'final' to class declaration.
- Add 'override' to overridden methods.
- Add type-checked cast via TRANSFORMOPERATION_TYPE_CASTS macro.
- Move implementation of operator==(const TransformOperation&)
  from header to source file so it is able to use a type-checked
  cast, and switch back to using a reference instead of a
  pointer.
- Add or update ASSERT in private constructor to check for
  correct OperationType in classes that represent multiple
  types.

* platform/graphics/transforms/Matrix3DTransformOperation.cpp:
(WebCore::Matrix3DTransformOperation::operator==): Added.

* platform/graphics/transforms/MatrixTransformOperation.cpp:
(WebCore::Matrix3DTransformOperation::operator==): Added.
(WebCore::MatrixTransformOperation::blend):
- Switch to type-checked casts and use a reference.

* platform/graphics/transforms/PerspectiveTransformOperation.cpp:
(WebCore::Matrix3DTransformOperation::operator==): Added.
(WebCore::PerspectiveTransformOperation::blend):
* platform/graphics/transforms/RotateTransformOperation.cpp:
(WebCore::Matrix3DTransformOperation::operator==): Added.
(WebCore::RotateTransformOperation::blend):
* platform/graphics/transforms/ScaleTransformOperation.cpp:
(WebCore::Matrix3DTransformOperation::operator==): Added.
(WebCore::ScaleTransformOperation::blend):
* platform/graphics/transforms/SkewTransformOperation.cpp:
(WebCore::Matrix3DTransformOperation::operator==): Added.
(WebCore::SkewTransformOperation::blend):
* platform/graphics/transforms/TranslateTransformOperation.cpp:
(WebCore::Matrix3DTransformOperation::operator==): Added.
(WebCore::TranslateTransformOperation::blend):
- Switch to type-checked casts.

* platform/graphics/transforms/TransformOperation.h:
(WebCore::TransformOperation::isRotateTransformOperationType):
(WebCore::TransformOperation::isScaleTransformOperationType):
(WebCore::TransformOperation::isSkewTransformOperationType):
(WebCore::TransformOperation::isTranslateTransformOperationType):
- Add type-checking methods used in constructors and type-checked
  casts.
- Define TRANSFORMOPERATION_TYPE_CASTS macro used by subclasses.

Source/WebKit2:

* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
(IPC::ArgumentCoder<TransformOperations>::encode):
- Switch to type-checked casts.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169320 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WebKit2] Rework WebPreferencesStore to allow easier overriding of defaults
https://bugs.webkit.org/show_bug.cgi?id=133258

Reviewed by Anders Carlsson.

To support changing default values of preferences based on which API you are using (either
the legacy C-SPI or the Objective-C API), overhaul the WebPreferencesStore to use a single
HashMap of String -> Value (where Value is new type that can be a String, bool, uint32_t or double)
instead of four HashMaps.  This allows us to use two of these new HashMaps, one for the actual
set values, and one for overridden defaults. This new Value class will also allow easier incremental
updating of preferences in the future.
        
Other notable changes:
- Removed Float kind of preferences. There were none.
- Move StorageBlockingPolicy preference to the correct group, it's a uint32_t, not bool.

* Shared/WebPreferencesStore.cpp:
* Shared/WebPreferencesStore.h:


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