[CSS Exclusions] Support outside-shape value on shape-inside
https://bugs.webkit.org/show_bug.cgi?id=101108

Patch by Bear Travis <betravis@adobe.com> on 2012-11-20
Reviewed by Dirk Schulze.

Source/WebCore:

Shape-inside can potentially be: 'auto' | 'outside-shape' | <shape> | <url>.
Webkit currently supports the value 'auto' (null) and <shape> (a BasicShape*).
This patch adds support for the value 'outside-shape.' It adds the ExclusionShapeValue
class, which may be any of the three values: 'auto', 'outside-shape', or <shape>.
Bug 102738 tracks adding <url> support.

Modifying existing tests:
LayoutTests/fast/exclusions/parsing-wrap-shape-inside.html
LayoutTests/fast/exclusions/parsing-wrap-shape-outside.html

* GNUmakefile.list.am: Adding ExclusionShapeValue.h to the build files.
* Target.pri: Ditto.
* WebCore.gypi: Ditto.
* WebCore.vcproj/WebCore.vcproj: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
(WebCore):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Modifying code to use
ExclusionShapeValue* rather than the previous BasicShape* values.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue): Handle the outside-shape value.
* css/CSSValueKeywords.in: Adding outside-shape value.
* css/StyleBuilder.cpp:
(WebCore):
(WebCore::ApplyPropertyExclusionShape::setValue): Modify code to use
ExclusionShapeValue* rather than BasicShape*.
(WebCore::ApplyPropertyExclusionShape::applyValue): Ditto.
(WebCore::ApplyPropertyExclusionShape::createHandler): Ditto.
* page/animation/CSSPropertyAnimation.cpp: Ditto.
(WebCore::blendFunc): Ditto.
(WebCore::PropertyWrapperExclusionShape::PropertyWrapperExclusionShape): Ditto.
(WebCore::CSSPropertyAnimation::ensurePropertyMap): Ditto.
* rendering/ExclusionShapeInsideInfo.cpp:
(WebCore::ExclusionShapeInsideInfo::isExclusionShapeInsideInfoEnabledForRenderBlock):
Ditto.
(WebCore::ExclusionShapeInsideInfo::computeShapeSize): Ditto.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateExclusionShapeInsideInfoAfterStyleChange): Ditto.
* rendering/RenderBlock.h:
(RenderBlock):
* rendering/style/ExclusionShapeValue.h: Added.
(WebCore):
(ExclusionShapeValue): New type to represent the possible values of shape-inside
and shape-outside. Only shape-inside can have a value of 'outside-shape.'
(WebCore::ExclusionShapeValue::~ExclusionShapeValue):
(WebCore::ExclusionShapeValue::type): Returns the value type.
(WebCore::ExclusionShapeValue::shape): Returns <shape> value's BasicShape*.
(WebCore::ExclusionShapeValue::operator==):
(WebCore::ExclusionShapeInfo::createShapeValue):
(WebCore::ExclusionShapeInfo::createOutsideValue):
(WebCore::ExclusionShapeValue::ExclusionShapeValue):
* rendering/style/RenderStyle.h:
* rendering/style/StyleRareNonInheritedData.h:
(StyleRareNonInheritedData):

LayoutTests:

Adding tests to make sure the 'outside-shape' value properly applies only to the
shape-inside property.

* fast/exclusions/parsing-wrap-shape-inside-expected.txt:
* fast/exclusions/parsing-wrap-shape-outside-expected.txt:
* fast/exclusions/script-tests/parsing-wrap-shape-inside.js:
* fast/exclusions/script-tests/parsing-wrap-shape-outside.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135314 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Provide page/window coordinates to plugin's local coordinates translation in WebPluginContainer.
https://bugs.webkit.org/show_bug.cgi?id=102339

Patch by Istiaque Ahmed <lazyboy@chromium.org> on 2012-11-20
Reviewed by Adam Barth.

This change will allow converting a page's window coordinates to plugins's local coordinates,
taking CSS transformations into account. Embedder page of the plugin can use this information
for targetting elements inside the plugin (e.g. devtools can inspect a specific element at the
local coordinate position inside plugin).

* WebKit.gyp:
* WebKit.gypi:
* public/WebNode.h:
(WebKit):
* public/WebPluginContainer.h:
(WebKit):
(WebPluginContainer):
* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::executeCommand):
(WebKit::WebFrameImpl::printBegin):
(WebKit::WebFrameImpl::isPrintScalingDisabledForPlugin):
* src/WebNode.cpp:
(WebKit::WebNode::pluginContainer):
(WebKit):
* src/WebPluginContainerImpl.cpp:
(WebKit::WebPluginContainerImpl::windowToLocalPoint):
(WebKit):
* src/WebPluginContainerImpl.h:
(WebPluginContainerImpl):
* tests/FakeWebPlugin.cpp: Added.
(WebKit):
(WebKit::FakeWebPlugin::FakeWebPlugin):
(WebKit::FakeWebPlugin::~FakeWebPlugin):
(WebKit::FakeWebPlugin::initialize):
(WebKit::FakeWebPlugin::destroy):
* tests/FakeWebPlugin.h: Added.
(WebKit):
(FakeWebPlugin):
* tests/WebPluginContainerTest.cpp: Added.
(WebKit):
(WebPluginContainerTest):
(WebKit::WebPluginContainerTest::WebPluginContainerTest):
(WebKit::WebPluginContainerTest::TearDown):
(WebKit::getWebPluginContainer):
(WebKit::TEST_F):
* tests/data/plugin_container.html: Added.

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