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

Issue 882023003: Refactor RenderVTTCue/SnapToLinesLayouter (Closed)

Created:
5 years, 10 months ago by fs
Modified:
5 years, 10 months ago
Reviewers:
philipj_slow
CC:
blink-reviews, blink-reviews-rendering, zoltan1, pdr+renderingwatchlist_chromium.org, eae+blinkwatch, leviw+renderwatch, Dominik Röttsches, jchaffraix+rendering
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Refactor RenderVTTCue/SnapToLinesLayouter Simplify RenderVTTCue::findFirstLineBox, and have it return the flow box instead of using an out parameter. Stop mutating the 'switched' bool in the helper methods, getting the logic more out "in the open" (in the step loop). For the same reason remove the switchDirection method to expose the interaction with the 'switched' flag. Split SnapToLinesLayouter::initializeLayoutParameters into one part that determines the 'step' and one that computes the initial position adjustment. Move the first part into SnapToLinesLayouter::layout, and the second into the new method SnapToLinesLayouter::computeInitialPositionAdjustment. Generalize moveBoxesByStep to moveBoxesBy and use it for computing the default/initial position as well. Hoist the call for the latter into SnapToLinesLayouter::layout and rename placeBoxInDefaultPosition to initializeFallbackPositioningState. BUG=301580 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=189128

Patch Set 1 #

Total comments: 8

Patch Set 2 : Additional touches. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+72 lines, -96 lines) Patch
M Source/core/rendering/RenderVTTCue.cpp View 1 7 chunks +72 lines, -96 lines 0 comments Download

Messages

Total messages: 8 (2 generated)
fs
Adding conflicts for myself while waiting for Godot...
5 years, 10 months ago (2015-01-28 10:15:49 UTC) #2
philipj_slow
lgtm https://codereview.chromium.org/882023003/diff/1/Source/core/rendering/RenderVTTCue.cpp File Source/core/rendering/RenderVTTCue.cpp (right): https://codereview.chromium.org/882023003/diff/1/Source/core/rendering/RenderVTTCue.cpp#newcode84 Source/core/rendering/RenderVTTCue.cpp:84: ASSERT(m_cueBox.firstChild()); This was moved from elsewhere and now ...
5 years, 10 months ago (2015-01-28 16:35:58 UTC) #3
fs
https://codereview.chromium.org/882023003/diff/1/Source/core/rendering/RenderVTTCue.cpp File Source/core/rendering/RenderVTTCue.cpp (right): https://codereview.chromium.org/882023003/diff/1/Source/core/rendering/RenderVTTCue.cpp#newcode84 Source/core/rendering/RenderVTTCue.cpp:84: ASSERT(m_cueBox.firstChild()); On 2015/01/28 16:35:58, philipj_UTC7 wrote: > This was ...
5 years, 10 months ago (2015-01-28 17:03:05 UTC) #4
philipj_slow
https://codereview.chromium.org/882023003/diff/1/Source/core/rendering/RenderVTTCue.cpp File Source/core/rendering/RenderVTTCue.cpp (right): https://codereview.chromium.org/882023003/diff/1/Source/core/rendering/RenderVTTCue.cpp#newcode106 Source/core/rendering/RenderVTTCue.cpp:106: position -= m_cueBox.size().width(); On 2015/01/28 17:03:05, fs wrote: > ...
5 years, 10 months ago (2015-01-28 17:21:07 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/882023003/20001
5 years, 10 months ago (2015-01-28 17:27:21 UTC) #7
commit-bot: I haz the power
5 years, 10 months ago (2015-01-28 18:39:06 UTC) #8
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=189128

Powered by Google App Engine
This is Rietveld 408576698