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

Side by Side Diff: Source/core/rendering/compositing/RenderLayerCompositor.cpp

Issue 399703002: Find the current fullscreen video element rather than the one on top of stack (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix test expectations Created 6 years, 5 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
« no previous file with comments | « LayoutTests/platform/linux/virtual/android/fullscreen/video-fail-to-enter-full-screen-expected.png ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010 Apple 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 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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 return true; 158 return true;
159 } 159 }
160 160
161 bool RenderLayerCompositor::acceleratedCompositingForOverflowScrollEnabled() con st 161 bool RenderLayerCompositor::acceleratedCompositingForOverflowScrollEnabled() con st
162 { 162 {
163 return m_compositingReasonFinder.hasOverflowScrollTrigger(); 163 return m_compositingReasonFinder.hasOverflowScrollTrigger();
164 } 164 }
165 165
166 static RenderVideo* findFullscreenVideoRenderer(Document& document) 166 static RenderVideo* findFullscreenVideoRenderer(Document& document)
167 { 167 {
168 // Recursively find the document that is in fullscreen.
168 Element* fullscreenElement = FullscreenElementStack::fullscreenElementFrom(d ocument); 169 Element* fullscreenElement = FullscreenElementStack::fullscreenElementFrom(d ocument);
170 Document* contentDocument = &document;
169 while (fullscreenElement && fullscreenElement->isFrameOwnerElement()) { 171 while (fullscreenElement && fullscreenElement->isFrameOwnerElement()) {
170 Document* contentDocument = toHTMLFrameOwnerElement(fullscreenElement)-> contentDocument(); 172 contentDocument = toHTMLFrameOwnerElement(fullscreenElement)->contentDoc ument();
171 if (!contentDocument) 173 if (!contentDocument)
172 return 0; 174 return 0;
173 fullscreenElement = FullscreenElementStack::fullscreenElementFrom(*conte ntDocument); 175 fullscreenElement = FullscreenElementStack::fullscreenElementFrom(*conte ntDocument);
174 } 176 }
177 // Get the current fullscreen element from the document.
178 fullscreenElement = FullscreenElementStack::currentFullScreenElementFrom(*co ntentDocument);
175 if (!isHTMLVideoElement(fullscreenElement)) 179 if (!isHTMLVideoElement(fullscreenElement))
176 return 0; 180 return 0;
177 RenderObject* renderer = fullscreenElement->renderer(); 181 RenderObject* renderer = fullscreenElement->renderer();
178 if (!renderer) 182 if (!renderer)
179 return 0; 183 return 0;
180 return toRenderVideo(renderer); 184 return toRenderVideo(renderer);
181 } 185 }
182 186
183 void RenderLayerCompositor::updateIfNeededRecursive() 187 void RenderLayerCompositor::updateIfNeededRecursive()
184 { 188 {
(...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after
1167 } else if (graphicsLayer == m_scrollLayer.get()) { 1171 } else if (graphicsLayer == m_scrollLayer.get()) {
1168 name = "LocalFrame Scrolling Layer"; 1172 name = "LocalFrame Scrolling Layer";
1169 } else { 1173 } else {
1170 ASSERT_NOT_REACHED(); 1174 ASSERT_NOT_REACHED();
1171 } 1175 }
1172 1176
1173 return name; 1177 return name;
1174 } 1178 }
1175 1179
1176 } // namespace blink 1180 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/platform/linux/virtual/android/fullscreen/video-fail-to-enter-full-screen-expected.png ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698