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

Issue 1013393004: Eliminate TextTrackCue::updateDisplayTree() (Closed)

Created:
5 years, 9 months ago by philipj_slow
Modified:
5 years, 9 months ago
Reviewers:
fs
CC:
blink-reviews, nessy, blink-reviews-style_chromium.org, blink-reviews-dom_chromium.org, eae+blinkwatch, sof, philipj_slow, gasubic, eric.carlson_apple.com, feature-media-reviews_chromium.org, dglazkov+blink, blink-reviews-html_chromium.org, vcarbune.chromium, rwlbuis
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Eliminate TextTrackCue::updateDisplayTree() updateDisplayTree() cloned and inserted a new tree every time, and was called continuously from CueTimeline::updateActiveCues(). The net effect of this was to re-layout the cue continuously, causing cues to move into areas where a cue was previously. The letter and spirit of the WebVTT spec is to have a stable layout, where cues do not move once laid out. TEST=LayoutTests/media/track/track-webvtt-two-cue-layout-after-first-end.html As the display tree is now kept intact, it becomes necessary to invalidate the style in setIsPastNode. Test coverage of past and future cues: LayoutTests/media/track/cue-style-invalidation.html LayoutTests/media/track/track-css-matching-timestamps.html LayoutTests/media/track/track-css-matching.html Note that per spec a part of the cue could match neither :past nor :future, but our implementation is mutually exclusive. It's not clear what the best behavior is, so a spec bug was filed instead: https://www.w3.org/Bugs/Public/show_bug.cgi?id=28237 BUG=322434 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=192171

Patch Set 1 #

Total comments: 4

Patch Set 2 : coerce m_isPastNode to bool #

Unified diffs Side-by-side diffs Delta from patch set Stats (+94 lines, -36 lines) Patch
A LayoutTests/media/track/track-webvtt-two-cue-layout-after-first-end.html View 1 chunk +26 lines, -0 lines 0 comments Download
A LayoutTests/media/track/track-webvtt-two-cue-layout-after-first-end-expected.html View 1 chunk +16 lines, -0 lines 0 comments Download
M Source/core/dom/StyleChangeReason.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/dom/StyleChangeReason.cpp View 2 chunks +2 lines, -0 lines 0 comments Download
M Source/core/html/track/CueTimeline.cpp View 1 chunk +7 lines, -3 lines 0 comments Download
M Source/core/html/track/TextTrackContainer.cpp View 2 chunks +2 lines, -0 lines 0 comments Download
M Source/core/html/track/TextTrackCue.h View 1 chunk +7 lines, -3 lines 0 comments Download
M Source/core/html/track/vtt/VTTCue.h View 1 chunk +2 lines, -3 lines 0 comments Download
M Source/core/html/track/vtt/VTTCue.cpp View 3 chunks +21 lines, -25 lines 0 comments Download
M Source/core/html/track/vtt/VTTElement.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/track/vtt/VTTElement.cpp View 1 1 chunk +9 lines, -1 line 0 comments Download

Messages

Total messages: 10 (3 generated)
philipj_slow
PTAL
5 years, 9 months ago (2015-03-19 11:21:37 UTC) #2
fs
lgtm https://codereview.chromium.org/1013393004/diff/1/Source/core/html/track/vtt/VTTCue.cpp File Source/core/html/track/vtt/VTTCue.cpp (right): https://codereview.chromium.org/1013393004/diff/1/Source/core/html/track/vtt/VTTCue.cpp#newcode767 Source/core/html/track/vtt/VTTCue.cpp:767: if (currentTimestamp > movieTime) Since you touched upon ...
5 years, 9 months ago (2015-03-19 12:10:02 UTC) #3
philipj_slow
Thanks for review, now hopefully the controls dodging should be one step closer... https://codereview.chromium.org/1013393004/diff/1/Source/core/html/track/vtt/VTTCue.cpp File ...
5 years, 9 months ago (2015-03-19 12:36:36 UTC) #4
philipj_slow
coerce m_isPastNode to bool
5 years, 9 months ago (2015-03-19 12:37:42 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1013393004/20001
5 years, 9 months ago (2015-03-19 12:38:23 UTC) #8
fs
On 2015/03/19 12:36:36, philipj_UTC7 wrote: > Thanks for review, now hopefully the controls dodging should ...
5 years, 9 months ago (2015-03-19 12:56:45 UTC) #9
commit-bot: I haz the power
5 years, 9 months ago (2015-03-19 14:27:33 UTC) #10
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=192171

Powered by Google App Engine
This is Rietveld 408576698