Allow SVG images to be drawn into canvas without tainting.
https://bugs.webkit.org/show_bug.cgi?id=119492

Reviewed by Darin Adler.

Source/WebCore:

Tests: svg/as-image/svg-canvas-not-tainted.html
       svg/as-image/svg-canvas-link-not-colored.html
       svg/as-image/svg-canvas-xhtml-tainted.html

* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::parseAttribute): Call shouldProhibitLinks.
(WebCore::shouldProhibitLinks): Added.
* html/HTMLAnchorElement.h:
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseAttribute): Call shouldProhibitLinks.
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::isEmbeddedThroughSVGImage): Use isInSVGImage.
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::svgAttributeChanged): Call shouldProhibitLinks.
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::hasSingleSecurityOrigin): Added.
(WebCore::isInSVGImage): Added.
* svg/graphics/SVGImage.h:

LayoutTests:

* fast/canvas/svg-taint-expected.txt: Removed.
* fast/canvas/svg-taint.html: Removed. Obsolete.
* http/tests/security/canvas-remote-read-data-url-svg-image-expected.txt: Removed.
* http/tests/security/canvas-remote-read-data-url-svg-image.html: Removed. Obsolete.
* http/tests/security/canvas-remote-read-svg-image-expected.txt: Removed.
* http/tests/security/canvas-remote-read-svg-image.html: Removed. Obsolete.
* svg/as-image/resources/link-xhtml-svg.svg: Added.
* svg/as-image/resources/link-xhtml.svg: Added.
* svg/as-image/resources/link.svg: Added.
* svg/as-image/svg-canvas-link-not-colored-expected.txt: Added.
* svg/as-image/svg-canvas-link-not-colored.html: Added.
* svg/as-image/svg-canvas-not-tainted-expected.txt: Added.
* svg/as-image/svg-canvas-not-tainted.html: Added.
* svg/as-image/svg-canvas-xhtml-tainted-expected.txt: Added.
* svg/as-image/svg-canvas-xhtml-tainted.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153876 268f45cc-cd09-0410-ab3c-d52691b4dbfc
navigator.plugins has plugins in it when plugins are disabled
https://bugs.webkit.org/show_bug.cgi?id=119607
<rdar://problem/14678030>

Reviewed by Anders Carlsson.

Test: plugins/navigator-plugins-disabled.html

* page/Settings.cpp:
(WebCore::Settings::setPluginsEnabled):
Refresh the plugin database when plugins are enabled or disabled.
This is necessary to ensure that navigator.plugins will have the
correct set of plugins after dynamically changing whether plugins
are enabled, which makes the test for this patch possible (but it
makes sense in the browser as well).

* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::getPlugins):
Return a list of all plugins, and a list of only application plugins.

* UIProcess/WebProcessProxy.h:
* UIProcess/WebProcessProxy.messages.in:
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::getPluginInfo):
Add applicationPlugin parameter to getPlugins, and storage for the returned list.

(WebKit::WebPlatformStrategies::populatePluginCache):
If plugins are disabled for the given page, give WebCore the list that
only includes application plugins. Otherwise, give it the whole list
as we are doing currently.

* WebCoreSupport/WebPlatformStrategies.mm:
(WebPlatformStrategies::getPluginInfo):
If plugins are disabled for the given page, give WebCore an empty list of
plugins. If WebKit1 had any application plugins, we'd return just them
instead.

Add a test that ensures that navigator.plugins only contains
application plugins when plugins are disabled.

* plugins/navigator-plugins-disabled-expected.txt: Added.
* plugins/navigator-plugins-disabled.html: Added.


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