CSP blocks inline style when cloning a node
https://bugs.webkit.org/show_bug.cgi?id=112270

Patch by Felipe Zimmerle <felipe@zimmerle.org> on 2013-04-03
Reviewed by Adam Barth.

Source/WebCore:

Checks if the Element is being cloned, if so, the application of the
style is allowed otherwise it relies on default permission mechanism.

Test: http/tests/security/contentSecurityPolicy/inline-style-allowed-while-cloning-objects.html

* dom/Element.cpp:
(WebCore::Element::attributeChanged): Added parameter
AttributeModificationReason to the method signature.
(WebCore::Element::cloneAttributesFromElement): It is now calling
attributeChanged with AttributeModificationReason parameter. In this scope
it is always set to ModifiedByCloning.
(WebCode::Element::attributeChangedFromParserOrByCloning):
Added parameter AttributeModificationReason.
* dom/Element.h: Added AttributeModificationReason enum. Used to specify
whenever an attribute was set by a cloned oject or directly.
AttributeModificationReason added to attributeChanged with the default
value set to ModifiedDirectly.
* dom/StyledElement.cpp:
(WebCore::StyledElement::attributeChanged): Added
AttributeModificationReason to the method signature.
(WebCore::StyledElement::styleAttributeChanged): Now it is checking the
reason of the update, if the reason is ModifiedDirectly check CSP
before set. If ModifiedByCloning set the attribute ignoring the CSP
policy.
* dom/StyledElement.h:
(StyledElement): Added AttributeModificationReason parameter to the methods:
attributeChanged and styleAttributeChanged, attributeChanged has
ModifiedDirectly as default value.
* svg/SVGElement.cpp:
(WebCore::SVGElement::attributeChanged): Added AttributeModificationReason
parameter to the method signature.
* svg/SVGElement.h:
(SVGElement): Added AttributeModificationReason parameter to the
attributeChanged signature with the default value set to:
ModifiedDirectly.

LayoutTests:

* http/tests/security/contentSecurityPolicy/inline-style-allowed-while-cloning-objects-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/inline-style-allowed-while-cloning-objects.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147558 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK][WK2] Unskip /webkit2/WebKitWebContext/uri-scheme
https://bugs.webkit.org/show_bug.cgi?id=104779

Patch by Manuel Rego Casasnovas <rego@igalia.com> on 2013-04-03
Reviewed by Carlos Garcia Campos.

* Scripts/run-gtk-tests:
(TestRunner): Unskip /webkit2/WebKitWebContext/uri-scheme as it is
passing in current trunk.

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