Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(766)

Issue 135103003: Updating <object> upon changing "data", "classid", "type" attributes. (Closed)

Created:
6 years, 11 months ago by sof
Modified:
6 years, 11 months ago
CC:
blink-reviews, dglazkov+blink, adamk+blink_chromium.org, wjmaclean, esprehn
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Updating <object> upon changing "data", "classid", "type" attributes. If an HTMLObjectElement's "type", "data", or "classid" attributes are dynamically modified, trigger a refresh of the element. Following the rules given in http://www.whatwg.org/specs/web-apps/current-work/#dom-object-data (cf. "Whenever one of the following conditions occur:") R=abarth,eseidel,esprehn BUG=123536 TEST=fast/dom/HTMLObjectElement/update-data Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=165298

Patch Set 1 #

Patch Set 2 : Adjust svg test to now expect update to happen (test needs rebaselining) #

Patch Set 3 : Rebase #

Total comments: 14

Patch Set 4 : Use postMessage() to avoid potential test flakiness #

Patch Set 5 : Remove unwanted/needed renderer() + inDocument() tests #

Patch Set 6 : Rebase (another TestExpectations conflict) #

Total comments: 3

Patch Set 7 : Factor out conditions that should trigger invalidation/refresh #

Patch Set 8 : Rebased #

Total comments: 2

Patch Set 9 : Rebase + method rename #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+98 lines, -23 lines) Patch
M LayoutTests/TestExpectations View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
A LayoutTests/fast/dom/HTMLObjectElement/resources/message-ping-on-load.html View 1 chunk +4 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/HTMLObjectElement/update-data.html View 1 chunk +29 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/HTMLObjectElement/update-data-expected.txt View 1 chunk +11 lines, -0 lines 0 comments Download
M LayoutTests/svg/as-object/embedded-svg-immediate-offsetWidth-query.html View 1 2 3 2 chunks +13 lines, -6 lines 0 comments Download
M LayoutTests/svg/as-object/embedded-svg-immediate-offsetWidth-query-expected.txt View 1 1 chunk +5 lines, -5 lines 0 comments Download
M Source/core/html/HTMLObjectElement.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/html/HTMLObjectElement.cpp View 1 2 3 4 5 6 7 8 2 chunks +32 lines, -10 lines 2 comments Download

Messages

Total messages: 20 (0 generated)
sof
Please take a look when you next have a moment.
6 years, 11 months ago (2014-01-14 12:56:36 UTC) #1
abarth-chromium
Maybe eseidel should review this CL? https://codereview.chromium.org/135103003/diff/120001/LayoutTests/svg/as-object/embedded-svg-immediate-offsetWidth-query.html File LayoutTests/svg/as-object/embedded-svg-immediate-offsetWidth-query.html (right): https://codereview.chromium.org/135103003/diff/120001/LayoutTests/svg/as-object/embedded-svg-immediate-offsetWidth-query.html#newcode30 LayoutTests/svg/as-object/embedded-svg-immediate-offsetWidth-query.html:30: }, 50); This ...
6 years, 11 months ago (2014-01-14 18:11:44 UTC) #2
eseidel
https://codereview.chromium.org/135103003/diff/120001/LayoutTests/svg/as-object/embedded-svg-immediate-offsetWidth-query.html File LayoutTests/svg/as-object/embedded-svg-immediate-offsetWidth-query.html (right): https://codereview.chromium.org/135103003/diff/120001/LayoutTests/svg/as-object/embedded-svg-immediate-offsetWidth-query.html#newcode30 LayoutTests/svg/as-object/embedded-svg-immediate-offsetWidth-query.html:30: }, 50); On 2014/01/14 18:11:45, abarth wrote: > This ...
6 years, 11 months ago (2014-01-15 00:09:41 UTC) #3
esprehn
https://codereview.chromium.org/135103003/diff/120001/LayoutTests/fast/dom/HTMLObjectElement/resources/message-ping-on-load.html File LayoutTests/fast/dom/HTMLObjectElement/resources/message-ping-on-load.html (right): https://codereview.chromium.org/135103003/diff/120001/LayoutTests/fast/dom/HTMLObjectElement/resources/message-ping-on-load.html#newcode3 LayoutTests/fast/dom/HTMLObjectElement/resources/message-ping-on-load.html:3: window.parent.postMessage('got it', '*'); This is really cute. https://codereview.chromium.org/135103003/diff/120001/Source/core/html/HTMLObjectElement.cpp File ...
6 years, 11 months ago (2014-01-15 00:16:37 UTC) #4
eseidel
Renderless plugins will be landed *any day now*: https://codereview.chromium.org/23618022/ We need to assume that we ...
6 years, 11 months ago (2014-01-15 01:35:50 UTC) #5
sof
On 2014/01/15 01:35:50, eseidel wrote: > Renderless plugins will be landed *any day now*: > ...
6 years, 11 months ago (2014-01-15 06:25:33 UTC) #6
eseidel
No, but that sounds like very valid feedback to James. I suspect that we'll still ...
6 years, 11 months ago (2014-01-15 06:59:19 UTC) #7
sof
https://codereview.chromium.org/135103003/diff/120001/LayoutTests/svg/as-object/embedded-svg-immediate-offsetWidth-query.html File LayoutTests/svg/as-object/embedded-svg-immediate-offsetWidth-query.html (right): https://codereview.chromium.org/135103003/diff/120001/LayoutTests/svg/as-object/embedded-svg-immediate-offsetWidth-query.html#newcode30 LayoutTests/svg/as-object/embedded-svg-immediate-offsetWidth-query.html:30: }, 50); On 2014/01/15 00:09:41, eseidel wrote: > On ...
6 years, 11 months ago (2014-01-15 15:26:57 UTC) #8
eseidel
https://codereview.chromium.org/135103003/diff/310001/Source/core/html/HTMLObjectElement.cpp File Source/core/html/HTMLObjectElement.cpp (right): https://codereview.chromium.org/135103003/diff/310001/Source/core/html/HTMLObjectElement.cpp#newcode110 Source/core/html/HTMLObjectElement.cpp:110: m_imageLoader = adoptPtr(new HTMLImageLoader(this)); Lame that the original author ...
6 years, 11 months ago (2014-01-15 18:40:08 UTC) #9
sof
https://codereview.chromium.org/135103003/diff/310001/Source/core/html/HTMLObjectElement.cpp File Source/core/html/HTMLObjectElement.cpp (right): https://codereview.chromium.org/135103003/diff/310001/Source/core/html/HTMLObjectElement.cpp#newcode112 Source/core/html/HTMLObjectElement.cpp:112: } else if (!fastHasAttribute(classidAttr)) { On 2014/01/15 18:40:09, eseidel ...
6 years, 11 months ago (2014-01-15 19:52:53 UTC) #10
sof
Another rebase needed to avoid yet more TestExpectations conflicts. Is this close to ready?
6 years, 11 months ago (2014-01-16 06:58:27 UTC) #11
sof
(ping)
6 years, 11 months ago (2014-01-16 23:19:11 UTC) #12
esprehn
lgtm, please fix the name before landing. https://codereview.chromium.org/135103003/diff/430001/Source/core/html/HTMLObjectElement.cpp File Source/core/html/HTMLObjectElement.cpp (right): https://codereview.chromium.org/135103003/diff/430001/Source/core/html/HTMLObjectElement.cpp#newcode263 Source/core/html/HTMLObjectElement.cpp:263: void HTMLObjectElement::shouldReloadPluginOnAttributeChange(const ...
6 years, 11 months ago (2014-01-16 23:23:04 UTC) #13
sof
https://codereview.chromium.org/135103003/diff/430001/Source/core/html/HTMLObjectElement.cpp File Source/core/html/HTMLObjectElement.cpp (right): https://codereview.chromium.org/135103003/diff/430001/Source/core/html/HTMLObjectElement.cpp#newcode263 Source/core/html/HTMLObjectElement.cpp:263: void HTMLObjectElement::shouldReloadPluginOnAttributeChange(const QualifiedName& name) On 2014/01/16 23:23:05, esprehn wrote: ...
6 years, 11 months ago (2014-01-17 07:14:53 UTC) #14
sof
6 years, 11 months ago (2014-01-17 07:14:57 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sigbjornf@opera.com/135103003/500001
6 years, 11 months ago (2014-01-17 07:15:33 UTC) #16
commit-bot: I haz the power
Change committed as 165298
6 years, 11 months ago (2014-01-17 10:36:55 UTC) #17
rune
https://codereview.chromium.org/135103003/diff/500001/Source/core/html/HTMLObjectElement.cpp File Source/core/html/HTMLObjectElement.cpp (right): https://codereview.chromium.org/135103003/diff/500001/Source/core/html/HTMLObjectElement.cpp#newcode284 Source/core/html/HTMLObjectElement.cpp:284: setNeedsStyleRecalc(); What's the recalc for? Is it the right ...
6 years, 11 months ago (2014-01-17 21:12:20 UTC) #18
sof
https://codereview.chromium.org/135103003/diff/500001/Source/core/html/HTMLObjectElement.cpp File Source/core/html/HTMLObjectElement.cpp (right): https://codereview.chromium.org/135103003/diff/500001/Source/core/html/HTMLObjectElement.cpp#newcode284 Source/core/html/HTMLObjectElement.cpp:284: setNeedsStyleRecalc(); On 2014/01/17 21:12:21, rune - CET wrote: > ...
6 years, 11 months ago (2014-01-17 21:20:35 UTC) #19
rune
6 years, 11 months ago (2014-01-17 22:03:13 UTC) #20
Message was sent while issue was closed.
On 2014/01/17 21:20:35, sof wrote:
>
https://codereview.chromium.org/135103003/diff/500001/Source/core/html/HTMLOb...
> File Source/core/html/HTMLObjectElement.cpp (right):
> 
>
https://codereview.chromium.org/135103003/diff/500001/Source/core/html/HTMLOb...
> Source/core/html/HTMLObjectElement.cpp:284: setNeedsStyleRecalc();
> On 2014/01/17 21:12:21, rune - CET wrote:
> > What's the recalc for? Is it the right tool here?
> 
> That's the prevalent mechanism for elements to trigger repaint/invalidation.
Do
> you have a smaller hammer?

setNeedsRecalcStyle will cause recalculation of computed styles and changes in
computed styles will cause repaint, reflow, reattach. I was wondering if any of
these attributes actually cause a style diff or if there is some other side
effect of triggering style recalc that will cause the necessary invalidation for
you.

The default parameter to setNeedsRecalcStyle is SubtreeStyleChange which could
cause unnecessary recalcs of sibling trees of <object> if there are adjacent
selectors present.

Powered by Google App Engine
This is Rietveld 408576698