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

Issue 394773003: Implement HTMLMarqueeElement's animation in private scripts (Closed)

Created:
6 years, 5 months ago by haraken
Modified:
6 years, 2 months ago
CC:
arv+blink, blink-reviews, blink-reviews-html_chromium.org, Inactive, dglazkov+blink, hajimehoshi
Project:
blink
Visibility:
Public.

Description

Implement HTMLMarqueeElement's animation in private scripts This CL completely migrates HTMLMarqueeElement's implementation to Blink-in-JS. This enables us to remove RenderMarquee.cpp and most of HTMLMarqueeElement.cpp. The only regression this migration may cause is a case where HTMLMarqueeElement's attributes are updated during an animation. If you update 'behavior', 'direction', 'loop', 'scrollAmount', 'scrollDelay' or 'trueSpeed' during the animation, the animation is expected to be continued with the new attribute setting. However, in this CL, the animation is reset with the new attribute setting. I'm not sure if this regression causes any real issue (I hope not). I think we can land this and see how it goes. This CL slightly changes the rendering of the HTMLMarqueeElement. I updated the following layout tests accordingly. [fast/block/float/marquee-shrink-to-avoid-floats.html] The old rendering is wrong, and the new rendering is correct. The old rendering matches WebKit. The new rendering matches the spec, IE and Firefox. [fast/css/MarqueeLayoutTest.html] The old rendering is wrong, and the new rendering is correct. The old rendering matches WebKit and IE. The new rendering matches the spec and Firefox. [html/marquee-scroll.html] Blink-in-JS uses Web animation APIs and it renders an animation more smoothly than the previous C++ implementation. As a result, the animation moves more quickly than before and thus makes the image result undeterministic. Thus I changed the color of characters displayed in the marquee element equal to the background color of the marquee element, just to make the image result timing-independent. [fast/inline-block/003.html] Ditto. [http/tests/activedomobject/marquee.html] Now that the HTMLMarqueeElement is not an ActiveDOMObject. Thus I changed the number of ActiveDOMObjects in the test. BUG=341031 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=183245

Patch Set 1 #

Total comments: 3

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Total comments: 9

Patch Set 6 : #

Total comments: 1

Patch Set 7 : #

Total comments: 3

Patch Set 8 : #

Total comments: 1

Patch Set 9 : #

Total comments: 2

Patch Set 10 : #

Patch Set 11 : #

Patch Set 12 : #

Patch Set 13 : #

Patch Set 14 : #

Patch Set 15 : #

Patch Set 16 : #

Patch Set 17 : #

Total comments: 4

Patch Set 18 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+141 lines, -717 lines) Patch
M LayoutTests/TestExpectations View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +6 lines, -0 lines 0 comments Download
M LayoutTests/fast/block/float/marquee-shrink-to-avoid-floats.html View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -8 lines 0 comments Download
M LayoutTests/fast/css/MarqueeLayoutTest.html View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fast/css/MarqueeLayoutTest-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fast/html/marquee-scroll.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +6 lines, -2 lines 0 comments Download
M LayoutTests/fast/inline-block/003.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +8 lines, -5 lines 0 comments Download
M LayoutTests/http/tests/activedomobject/marquee.html View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/http/tests/activedomobject/marquee-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/inspector/elements/styles/internal-properties-text-expected.txt View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -3 lines 0 comments Download
M LayoutTests/platform/linux/fast/block/float/marquee-shrink-to-avoid-floats-expected.png View 1 2 3 4 5 6 7 8 9 Binary file 0 comments Download
M LayoutTests/platform/linux/fast/block/float/marquee-shrink-to-avoid-floats-expected.txt View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -20 lines 0 comments Download
M LayoutTests/platform/linux/fast/html/marquee-scroll-expected.png View 1 2 3 4 5 6 7 8 9 10 11 12 13 Binary file 0 comments Download
M LayoutTests/platform/linux/fast/html/marquee-scroll-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +12 lines, -5 lines 0 comments Download
M LayoutTests/platform/linux/fast/html/marquee-scrollamount-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +4 lines, -2 lines 0 comments Download
M LayoutTests/platform/linux/fast/inline-block/003-expected.png View 1 2 3 4 5 6 7 8 9 10 11 12 13 Binary file 0 comments Download
M LayoutTests/platform/linux/fast/inline-block/003-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +20 lines, -11 lines 0 comments Download
M Source/core/core.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +0 lines, -2 lines 0 comments Download
M Source/core/html/HTMLMarqueeElement.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +4 lines, -26 lines 0 comments Download
M Source/core/html/HTMLMarqueeElement.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +21 lines, -115 lines 0 comments Download
M Source/core/html/HTMLMarqueeElement.idl View 1 2 3 4 5 6 2 chunks +7 lines, -2 lines 0 comments Download
M Source/core/html/HTMLMarqueeElement.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 10 chunks +41 lines, -70 lines 0 comments Download
M Source/core/rendering/RenderBlock.cpp View 1 2 3 4 5 6 7 8 2 chunks +0 lines, -5 lines 0 comments Download
D Source/core/rendering/RenderMarquee.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +0 lines, -107 lines 0 comments Download
M Source/core/rendering/RenderMarquee.cpp View 1 2 3 1 chunk +0 lines, -327 lines 0 comments Download
M Source/core/rendering/RenderObject.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 45 (4 generated)
haraken
The CL is not yet for review. https://codereview.chromium.org/394773003/diff/1/Source/core/html/HTMLMarqueeElement.js File Source/core/html/HTMLMarqueeElement.js (left): https://codereview.chromium.org/394773003/diff/1/Source/core/html/HTMLMarqueeElement.js#oldcode123 Source/core/html/HTMLMarqueeElement.js:123: defineInlineEventHandler(HTMLMarqueeElementPrototype, 'bounce'); ...
6 years, 5 months ago (2014-07-15 12:57:07 UTC) #1
arv (Not doing code reviews)
On 2014/07/15 at 12:57:07, haraken wrote: > The CL is not yet for review. > ...
6 years, 5 months ago (2014-07-15 15:01:10 UTC) #2
haraken
On 2014/07/15 15:01:10, arv wrote: > On 2014/07/15 at 12:57:07, haraken wrote: > > The ...
6 years, 5 months ago (2014-07-15 15:24:11 UTC) #3
abarth-chromium
https://codereview.chromium.org/394773003/diff/1/Source/core/html/HTMLMarqueeElement.js File Source/core/html/HTMLMarqueeElement.js (right): https://codereview.chromium.org/394773003/diff/1/Source/core/html/HTMLMarqueeElement.js#newcode95 Source/core/html/HTMLMarqueeElement.js:95: HTMLMarqueeElementPrototype.createdCallback = function() { > createCallback / detachedCallback / ...
6 years, 5 months ago (2014-07-15 17:10:07 UTC) #4
abarth-chromium
On 2014/07/15 at 15:24:11, haraken wrote: > One thing I don't yet understand is how ...
6 years, 5 months ago (2014-07-15 17:11:07 UTC) #5
haraken
I noticed that custom elements are not supported in isolated worlds. CustomElementConstructorBuilder::isFeatureAllowed is saying that ...
6 years, 5 months ago (2014-07-16 05:49:12 UTC) #6
abarth-chromium
On 2014/07/16 at 05:49:12, haraken wrote: > I noticed that custom elements are not supported ...
6 years, 5 months ago (2014-07-16 06:37:15 UTC) #7
abarth-chromium
Here's another way to think about it. Custom elements do two things: 1) They rewire ...
6 years, 5 months ago (2014-07-16 06:44:52 UTC) #8
haraken
On 2014/07/16 06:44:52, abarth wrote: > Here's another way to think about it. Custom elements ...
6 years, 5 months ago (2014-07-16 09:44:35 UTC) #9
dominicc (has gone to gerrit)
Sorry for the slow response. As haraken said, we chatted offline and we think this ...
6 years, 5 months ago (2014-07-16 11:02:33 UTC) #10
haraken
I looked at the implementation of custom elements and begin to think that we might ...
6 years, 5 months ago (2014-07-16 16:28:31 UTC) #11
abarth-chromium
On 2014/07/16 at 16:28:31, haraken wrote: > I looked at the implementation of custom elements ...
6 years, 5 months ago (2014-07-16 16:57:08 UTC) #12
haraken
On 2014/07/16 16:57:08, abarth wrote: > On 2014/07/16 at 16:28:31, haraken wrote: > > I ...
6 years, 5 months ago (2014-07-17 01:08:45 UTC) #13
dominicc (has gone to gerrit)
Just chatted to haraken, and this morning I separately synced up briefly with Adam and ...
6 years, 5 months ago (2014-07-17 01:59:35 UTC) #14
dominicc (has gone to gerrit)
Update: I talked to Kochi and he huddled with Takuya and Hayato and they have ...
6 years, 5 months ago (2014-07-17 06:57:06 UTC) #15
haraken
Thanks dominicc for the details. I'm on the same page with you. > 0. Don't ...
6 years, 5 months ago (2014-07-17 16:02:50 UTC) #16
haraken
OK. I made the HTMLMarqueeElement workable. RenderMarquee was completely gone! I verified that http://www.fillster.com/htmlcodes/marquees.html works ...
6 years, 5 months ago (2014-07-23 13:46:40 UTC) #17
arv (Not doing code reviews)
https://codereview.chromium.org/394773003/diff/80001/Source/core/html/HTMLMarqueeElement.js File Source/core/html/HTMLMarqueeElement.js (right): https://codereview.chromium.org/394773003/diff/80001/Source/core/html/HTMLMarqueeElement.js#newcode115 Source/core/html/HTMLMarqueeElement.js:115: initializeAttribute_.call(this, kPresentationalAttributes[i]); On 2014/07/23 13:46:40, haraken wrote: > > ...
6 years, 5 months ago (2014-07-23 16:51:15 UTC) #18
haraken
https://codereview.chromium.org/394773003/diff/80001/Source/core/html/HTMLMarqueeElement.js File Source/core/html/HTMLMarqueeElement.js (right): https://codereview.chromium.org/394773003/diff/80001/Source/core/html/HTMLMarqueeElement.js#newcode115 Source/core/html/HTMLMarqueeElement.js:115: initializeAttribute_.call(this, kPresentationalAttributes[i]); On 2014/07/23 16:51:15, arv wrote: > On ...
6 years, 5 months ago (2014-07-24 01:56:44 UTC) #19
haraken
https://codereview.chromium.org/394773003/diff/80001/Source/core/html/HTMLMarqueeElement.js File Source/core/html/HTMLMarqueeElement.js (right): https://codereview.chromium.org/394773003/diff/80001/Source/core/html/HTMLMarqueeElement.js#newcode115 Source/core/html/HTMLMarqueeElement.js:115: initializeAttribute_.call(this, kPresentationalAttributes[i]); On 2014/07/24 01:56:44, haraken wrote: > On ...
6 years, 5 months ago (2014-07-24 08:58:36 UTC) #20
arv (Not doing code reviews)
LGTM https://codereview.chromium.org/394773003/diff/90001/Source/core/html/HTMLMarqueeElement.cpp File Source/core/html/HTMLMarqueeElement.cpp (right): https://codereview.chromium.org/394773003/diff/90001/Source/core/html/HTMLMarqueeElement.cpp#newcode79 Source/core/html/HTMLMarqueeElement.cpp:79: ScriptForbiddenScope::AllowUserAgentScript script; Could/should this be baked into the ...
6 years, 5 months ago (2014-07-24 16:59:37 UTC) #21
haraken
Thanks. I won't land this until the remaining FIXMEs are resolved. The remaining ones are: ...
6 years, 5 months ago (2014-07-25 02:30:45 UTC) #22
hajimehoshi
https://codereview.chromium.org/394773003/diff/110001/Source/bindings/core/v8/PrivateScriptRunner.js File Source/bindings/core/v8/PrivateScriptRunner.js (right): https://codereview.chromium.org/394773003/diff/110001/Source/bindings/core/v8/PrivateScriptRunner.js#newcode85 Source/bindings/core/v8/PrivateScriptRunner.js:85: } Why are these duplicated definition needed?
6 years, 4 months ago (2014-08-25 04:32:59 UTC) #23
haraken
https://codereview.chromium.org/394773003/diff/110001/Source/bindings/core/v8/PrivateScriptRunner.js File Source/bindings/core/v8/PrivateScriptRunner.js (right): https://codereview.chromium.org/394773003/diff/110001/Source/bindings/core/v8/PrivateScriptRunner.js#newcode85 Source/bindings/core/v8/PrivateScriptRunner.js:85: } On 2014/08/25 04:32:59, hajimehoshi wrote: > Why are ...
6 years, 4 months ago (2014-08-25 04:36:43 UTC) #24
haraken
https://codereview.chromium.org/394773003/diff/110001/Source/bindings/core/v8/PrivateScriptRunner.js File Source/bindings/core/v8/PrivateScriptRunner.js (right): https://codereview.chromium.org/394773003/diff/110001/Source/bindings/core/v8/PrivateScriptRunner.js#newcode85 Source/bindings/core/v8/PrivateScriptRunner.js:85: } On 2014/08/25 04:36:43, haraken wrote: > On 2014/08/25 ...
6 years, 4 months ago (2014-08-25 04:38:05 UTC) #25
haraken
abarth@: Would you take a look at this? Now that the Web animation APIs needed ...
6 years, 2 months ago (2014-09-26 07:53:06 UTC) #26
haraken
abarth@: Ping on this? I verified that the marquee-in-JS passes http://www.fillster.com/htmlcodes/marquees.html and http://www.quackit.com/html/codes/stop_marquee.cfm for example.
6 years, 2 months ago (2014-09-27 01:29:37 UTC) #27
abarth-chromium
LGTM We might want to wait on landing this until after the branch (which I ...
6 years, 2 months ago (2014-09-28 00:52:45 UTC) #28
haraken
> We might want to wait on landing this until after the branch (which I ...
6 years, 2 months ago (2014-09-28 01:08:18 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/394773003/130001
6 years, 2 months ago (2014-09-29 07:26:38 UTC) #31
commit-bot: I haz the power
Try jobs failed on following builders: mac_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/mac_blink_rel/builds/25070) win_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/win_blink_rel/builds/29212)
6 years, 2 months ago (2014-09-29 07:41:15 UTC) #33
arv (Not doing code reviews)
LGTM Nice to get rid of this render object. https://codereview.chromium.org/394773003/diff/150001/Source/core/html/HTMLMarqueeElement.js File Source/core/html/HTMLMarqueeElement.js (right): https://codereview.chromium.org/394773003/diff/150001/Source/core/html/HTMLMarqueeElement.js#newcode112 Source/core/html/HTMLMarqueeElement.js:112: ...
6 years, 2 months ago (2014-09-29 16:16:39 UTC) #34
haraken
Thanks for review. I need to fix a couple of failing tests about marquee.
6 years, 2 months ago (2014-09-29 16:34:52 UTC) #35
haraken
abarth@: Please take a final look. Now all tests pass. Since this CL changes the ...
6 years, 2 months ago (2014-10-02 14:30:35 UTC) #36
haraken
On 2014/10/02 14:30:35, haraken wrote: > abarth@: Please take a final look. > > Now ...
6 years, 2 months ago (2014-10-02 14:32:12 UTC) #37
haraken
arv@: abarth@ looks busy. Would you mind just taking a look at changes of layout ...
6 years, 2 months ago (2014-10-04 00:59:05 UTC) #38
Mike West
The changes since arv@ and abarth@ last commented LGTM. Thanks for the quite detailed CL ...
6 years, 2 months ago (2014-10-05 19:30:03 UTC) #40
Mike West
% two C++11 nits :) https://codereview.chromium.org/394773003/diff/310001/Source/core/html/HTMLMarqueeElement.h File Source/core/html/HTMLMarqueeElement.h (right): https://codereview.chromium.org/394773003/diff/310001/Source/core/html/HTMLMarqueeElement.h#newcode30 Source/core/html/HTMLMarqueeElement.h:30: class HTMLMarqueeElement FINAL : ...
6 years, 2 months ago (2014-10-05 19:33:12 UTC) #41
haraken
Thanks for review! https://codereview.chromium.org/394773003/diff/310001/Source/core/html/HTMLMarqueeElement.h File Source/core/html/HTMLMarqueeElement.h (right): https://codereview.chromium.org/394773003/diff/310001/Source/core/html/HTMLMarqueeElement.h#newcode30 Source/core/html/HTMLMarqueeElement.h:30: class HTMLMarqueeElement FINAL : public HTMLElement ...
6 years, 2 months ago (2014-10-06 00:08:47 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/394773003/330001
6 years, 2 months ago (2014-10-06 00:10:02 UTC) #44
commit-bot: I haz the power
6 years, 2 months ago (2014-10-06 05:12:37 UTC) #45
Message was sent while issue was closed.
Committed patchset #18 (id:330001) as 183245

Powered by Google App Engine
This is Rietveld 408576698