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

Unified Diff: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp

Issue 2553103004: Refactor IntersectionGeometry class and move it to core/layout. (Closed)
Patch Set: rebase Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
index 305368b74d43dc40c721e0b3854ad16d98db40d2..7a4dc811af646fb9ee82c446376b6a0975a0887a 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
@@ -39,7 +39,6 @@
#include "core/dom/ElementTraversal.h"
#include "core/dom/ElementVisibilityObserver.h"
#include "core/dom/Fullscreen.h"
-#include "core/dom/IntersectionGeometry.h"
#include "core/dom/TaskRunnerHelper.h"
#include "core/dom/shadow/ShadowRoot.h"
#include "core/events/Event.h"
@@ -66,6 +65,7 @@
#include "core/html/track/VideoTrack.h"
#include "core/html/track/VideoTrackList.h"
#include "core/inspector/ConsoleMessage.h"
+#include "core/layout/IntersectionGeometry.h"
#include "core/layout/LayoutMedia.h"
#include "core/layout/api/LayoutViewItem.h"
#include "core/layout/compositing/PaintLayerCompositor.h"
@@ -4026,9 +4026,7 @@ DEFINE_TRACE(HTMLMediaElement::AudioSourceProviderImpl) {
void HTMLMediaElement::checkViewportIntersectionChanged() {
// TODO(xjz): Early return if we not in tab mirroring.
- IntersectionGeometry geometry(
- document().frame()->localFrameRoot()->document(), this, Vector<Length>(),
- IntersectionGeometry::ReportRootBounds::kShouldReportRootBounds);
+ IntersectionGeometry geometry(nullptr, *this, Vector<Length>(), true);
ojan 2016/12/10 01:18:26 This "true" was the reason I asked for it to be an
szager1 2016/12/10 01:47:10 OK, I added a local variable here to clarify.
geometry.computeGeometry();
IntRect intersectRect = geometry.intersectionIntRect();
if (m_currentIntersectRect == intersectRect)

Powered by Google App Engine
This is Rietveld 408576698