OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 // The region doesn't have scrolling text, by default. | 63 // The region doesn't have scrolling text, by default. |
64 static const bool defaultScroll = false; | 64 static const bool defaultScroll = false; |
65 | 65 |
66 // Default region line-height (vh units) | 66 // Default region line-height (vh units) |
67 static const float lineHeight = 5.33; | 67 static const float lineHeight = 5.33; |
68 | 68 |
69 // Default scrolling animation time period (s). | 69 // Default scrolling animation time period (s). |
70 static const float scrollTime = 0.433; | 70 static const float scrollTime = 0.433; |
71 | 71 |
72 TextTrackRegion::TextTrackRegion(ScriptExecutionContext* context) | 72 TextTrackRegion::TextTrackRegion(ScriptExecutionContext* context) |
73 : ContextDestructionObserver(context) | 73 : ContextLifecycleObserver(context) |
74 , m_id(emptyString()) | 74 , m_id(emptyString()) |
75 , m_width(defaultWidth) | 75 , m_width(defaultWidth) |
76 , m_heightInLines(defaultHeightInLines) | 76 , m_heightInLines(defaultHeightInLines) |
77 , m_regionAnchor(FloatPoint(defaultAnchorPointX, defaultAnchorPointY)) | 77 , m_regionAnchor(FloatPoint(defaultAnchorPointX, defaultAnchorPointY)) |
78 , m_viewportAnchor(FloatPoint(defaultAnchorPointX, defaultAnchorPointY)) | 78 , m_viewportAnchor(FloatPoint(defaultAnchorPointX, defaultAnchorPointY)) |
79 , m_scroll(defaultScroll) | 79 , m_scroll(defaultScroll) |
80 , m_regionDisplayTree(0) | 80 , m_regionDisplayTree(0) |
81 , m_cueContainer(0) | 81 , m_cueContainer(0) |
82 , m_track(0) | 82 , m_track(0) |
83 , m_currentTop(0) | 83 , m_currentTop(0) |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 { | 497 { |
498 LOG(Media, "TextTrackRegion::scrollTimerFired"); | 498 LOG(Media, "TextTrackRegion::scrollTimerFired"); |
499 | 499 |
500 stopTimer(); | 500 stopTimer(); |
501 displayLastTextTrackCueBox(); | 501 displayLastTextTrackCueBox(); |
502 } | 502 } |
503 | 503 |
504 } // namespace WebCore | 504 } // namespace WebCore |
505 | 505 |
506 #endif | 506 #endif |
OLD | NEW |