OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights | 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights |
3 * reserved. | 3 * reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 4015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4026 } | 4026 } |
4027 | 4027 |
4028 DEFINE_TRACE(HTMLMediaElement::AudioSourceProviderImpl) { | 4028 DEFINE_TRACE(HTMLMediaElement::AudioSourceProviderImpl) { |
4029 visitor->trace(m_client); | 4029 visitor->trace(m_client); |
4030 } | 4030 } |
4031 | 4031 |
4032 void HTMLMediaElement::checkViewportIntersectionChanged() { | 4032 void HTMLMediaElement::checkViewportIntersectionChanged() { |
4033 // TODO(xjz): Early return if we not in tab mirroring. | 4033 // TODO(xjz): Early return if we not in tab mirroring. |
4034 | 4034 |
4035 IntersectionGeometry geometry( | 4035 IntersectionGeometry geometry( |
4036 &document(), this, Vector<Length>(), | 4036 document().frame()->localFrameRoot()->document(), this, Vector<Length>(), |
4037 IntersectionGeometry::ReportRootBounds::kShouldReportRootBounds); | 4037 IntersectionGeometry::ReportRootBounds::kShouldReportRootBounds); |
4038 geometry.computeGeometry(); | 4038 geometry.computeGeometry(); |
4039 IntRect intersectRect = geometry.intersectionIntRect(); | 4039 IntRect intersectRect = geometry.intersectionIntRect(); |
4040 if (m_currentIntersectRect == intersectRect) | 4040 if (m_currentIntersectRect == intersectRect) |
4041 return; | 4041 return; |
4042 | 4042 |
4043 m_currentIntersectRect = intersectRect; | 4043 m_currentIntersectRect = intersectRect; |
4044 // Reset on any intersection change, since this indicates the user is | 4044 // Reset on any intersection change, since this indicates the user is |
4045 // scrolling around in the document, the document is changing layout, etc. | 4045 // scrolling around in the document, the document is changing layout, etc. |
4046 m_viewportFillDebouncerTimer.stop(); | 4046 m_viewportFillDebouncerTimer.stop(); |
(...skipping 14 matching lines...) Expand all Loading... |
4061 kMostlyFillViewportBecomeStableSeconds, BLINK_FROM_HERE); | 4061 kMostlyFillViewportBecomeStableSeconds, BLINK_FROM_HERE); |
4062 } | 4062 } |
4063 | 4063 |
4064 void HTMLMediaElement::viewportFillDebouncerTimerFired(TimerBase*) { | 4064 void HTMLMediaElement::viewportFillDebouncerTimerFired(TimerBase*) { |
4065 m_mostlyFillingViewport = true; | 4065 m_mostlyFillingViewport = true; |
4066 if (m_webMediaPlayer) | 4066 if (m_webMediaPlayer) |
4067 m_webMediaPlayer->becameDominantVisibleContent(m_mostlyFillingViewport); | 4067 m_webMediaPlayer->becameDominantVisibleContent(m_mostlyFillingViewport); |
4068 } | 4068 } |
4069 | 4069 |
4070 } // namespace blink | 4070 } // namespace blink |
OLD | NEW |