Setting any of the <object> element plugin controlling attributes does not have any...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Mar 2015 18:44:33 +0000 (18:44 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Mar 2015 18:44:33 +0000 (18:44 +0000)
commit1a6d4d1d9187a936ba02a8b952c6245886fb085d
tree95171259632efc6eb6aee64f95d6ab159b9def11
parent9b86a426aa53edc4e92437c28cabff87ded1ad26
Setting any of the <object> element plugin controlling attributes does not have any affect.
https://bugs.webkit.org/show_bug.cgi?id=141936.

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-03-06
Reviewed by Simon Fraser.
Source/WebCore:

When setting any of the <object> element plugin controlling attributes
dynamically we need to mark the the element to be dirty by calling
setNeedsStyleRecalc(), so it has to recreate its renderer when needed.

Tests: fast/css/image-object-hover-inherit.html
       svg/as-object/svg-in-object-dynamic-attribute-change.html

* dom/Element.h: Delete unimplemented function.

* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::parseAttribute): Mark the element dirty by
calling setNeedsStyleRecalc() when one of the plugin controlling attributes
gets changed. We have to clear m_useFallbackContent because the attribute's
new value might fix the object rendering.

* html/HTMLObjectElement.h: Add a function to clear m_useFallbackContent.

LayoutTests:

* fast/css/image-object-hover-inherit-expected.html: Added.
* fast/css/image-object-hover-inherit.html: Added.
A guarding test to catch the case of reconstructing the image <object>
renderer while performing a synchronous resolveTree() followed by page
rendering or dump render tree.

* svg/as-object/resources/lime100x100.html: Added.
* svg/as-object/resources/lime100x100.png: Added.
* svg/as-object/resources/lime100x100.svg: Added.
* svg/as-object/resources/red100x100.svg: Added.
* svg/as-object/svg-in-object-dynamic-attribute-change-expected.html: Added.
* svg/as-object/svg-in-object-dynamic-attribute-change.html: Added.
Ensure that changing the 'type' and the 'data' attributes of the <object>
element will have the expected outcome. Also make sure that the <object>
element renderer falls back correctly when setting any of the attributes
to some unexpected value.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181168 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/css/image-object-hover-inherit-expected.html [new file with mode: 0644]
LayoutTests/fast/css/image-object-hover-inherit.html [new file with mode: 0644]
LayoutTests/svg/as-object/resources/lime100x100.html [new file with mode: 0644]
LayoutTests/svg/as-object/resources/lime100x100.png [new file with mode: 0644]
LayoutTests/svg/as-object/resources/lime100x100.svg [new file with mode: 0644]
LayoutTests/svg/as-object/resources/red100x100.svg [new file with mode: 0644]
LayoutTests/svg/as-object/svg-in-object-dynamic-attribute-change-expected.html [new file with mode: 0644]
LayoutTests/svg/as-object/svg-in-object-dynamic-attribute-change.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/dom/Element.h
Source/WebCore/html/HTMLObjectElement.cpp
Source/WebCore/html/HTMLObjectElement.h