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

Side by Side Diff: Source/core/rendering/RenderVTTCue.cpp

Issue 335963002: Change LayoutState to be stack-allocated (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix push function to match old behavior... Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Victor Carbune (victor@rosedu.org) 2 * Copyright (C) 2012 Victor Carbune (victor@rosedu.org)
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 30 matching lines...) Expand all
41 { 41 {
42 RenderBlockFlow::layout(); 42 RenderBlockFlow::layout();
43 43
44 // If WebVTT Regions are used, the regular WebVTT layout algorithm is no 44 // If WebVTT Regions are used, the regular WebVTT layout algorithm is no
45 // longer necessary, since cues having the region parameter set do not have 45 // longer necessary, since cues having the region parameter set do not have
46 // any positioning parameters. Also, in this case, the regions themselves 46 // any positioning parameters. Also, in this case, the regions themselves
47 // have positioning information. 47 // have positioning information.
48 if (!m_cue->regionId().isEmpty()) 48 if (!m_cue->regionId().isEmpty())
49 return; 49 return;
50 50
51 LayoutStateMaintainer statePusher(*this, locationOffset()); 51 LayoutState state(*this, locationOffset());
52 52
53 if (m_cue->snapToLines()) 53 if (m_cue->snapToLines())
54 repositionCueSnapToLinesSet(); 54 repositionCueSnapToLinesSet();
55 else 55 else
56 repositionCueSnapToLinesNotSet(); 56 repositionCueSnapToLinesNotSet();
57 } 57 }
58 58
59 bool RenderVTTCue::findFirstLineBox(InlineFlowBox*& firstLineBox) 59 bool RenderVTTCue::findFirstLineBox(InlineFlowBox*& firstLineBox)
60 { 60 {
61 if (firstChild()->isRenderInline()) 61 if (firstChild()->isRenderInline())
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 } 260 }
261 } 261 }
262 262
263 void RenderVTTCue::repositionCueSnapToLinesNotSet() 263 void RenderVTTCue::repositionCueSnapToLinesNotSet()
264 { 264 {
265 // FIXME: Implement overlapping detection when snap-to-lines is not set. htt p://wkb.ug/84296 265 // FIXME: Implement overlapping detection when snap-to-lines is not set. htt p://wkb.ug/84296
266 } 266 }
267 267
268 } // namespace WebCore 268 } // namespace WebCore
269 269
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698