OLD | NEW |
---|---|
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 13 matching lines...) Expand all Loading... | |
24 */ | 24 */ |
25 | 25 |
26 #ifndef LayoutVTTCue_h | 26 #ifndef LayoutVTTCue_h |
27 #define LayoutVTTCue_h | 27 #define LayoutVTTCue_h |
28 | 28 |
29 #include "core/layout/LayoutBlockFlow.h" | 29 #include "core/layout/LayoutBlockFlow.h" |
30 #include "platform/heap/Handle.h" | 30 #include "platform/heap/Handle.h" |
31 | 31 |
32 namespace blink { | 32 namespace blink { |
33 | 33 |
34 class VTTCue; | |
35 class VTTCueBox; | 34 class VTTCueBox; |
36 | 35 |
37 class LayoutVTTCue final : public LayoutBlockFlow { | 36 class LayoutVTTCue final : public LayoutBlockFlow { |
38 public: | 37 public: |
39 explicit LayoutVTTCue(VTTCueBox*); | 38 explicit LayoutVTTCue(ContainerNode*, float snapToLinesPosition); |
sof
2015/07/20 08:15:39
nit: can drop explicit now.
philipj_slow
2015/07/20 08:34:16
Done, and also added explicit to the VTTCueBox con
| |
39 | |
40 // The computed line position for snap-to-lines layout, and NaN for | |
41 // non-snap-to-lines layout where no adjustment should take place. | |
42 float snapToLinesPosition() { return m_snapToLinesPosition; } | |
fs
2015/07/17 14:31:48
Any particular reason for not doing something like
philipj_slow
2015/07/20 07:33:30
Precisely, an isVTTCueBox would require an extra v
| |
40 | 43 |
41 private: | 44 private: |
42 void layout() override; | 45 void layout() override; |
43 | 46 |
44 void adjustForTopAndBottomMarginBorderAndPadding(); | 47 void adjustForTopAndBottomMarginBorderAndPadding(); |
45 void repositionCueSnapToLinesNotSet(); | 48 void repositionCueSnapToLinesNotSet(); |
46 | 49 |
47 // VTTCue is kept alive by VTTCueBox. | 50 float m_snapToLinesPosition; |
48 GC_PLUGIN_IGNORE("http://crbug.com/509911") | |
49 VTTCue* m_cue; | |
50 }; | 51 }; |
51 | 52 |
52 } // namespace blink | 53 } // namespace blink |
53 | 54 |
54 #endif // LayoutVTTCue_h | 55 #endif // LayoutVTTCue_h |
OLD | NEW |