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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutMedia.cpp

Issue 2701433003: Hide overlay play button if it can't be shown without clipping (Closed)
Patch Set: Refactor to use ResizeObserver Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/LayoutMedia.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutMedia.cpp b/third_party/WebKit/Source/core/layout/LayoutMedia.cpp
index 0c884a8794529ef2ba18d6d7b22becc18f7018d8..ea0ec1157792698bab6962ea1d0470fc0c845823 100644
--- a/third_party/WebKit/Source/core/layout/LayoutMedia.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutMedia.cpp
@@ -54,8 +54,6 @@ void LayoutMedia::layout() {
LayoutState state(*this);
- Optional<LayoutUnit> newPanelWidth;
-
// Iterate the children in reverse order so that the media controls are laid
// out before the text track container. This is to ensure that the text
// track rendering has an up-to-date position of the media controls for
@@ -83,7 +81,6 @@ void LayoutMedia::layout() {
LayoutUnit width = newRect.width();
if (child->node()->isMediaControls()) {
width = computePanelWidth(newRect);
- newPanelWidth = width;
}
LayoutBox* layoutBox = toLayoutBox(child);
@@ -97,18 +94,6 @@ void LayoutMedia::layout() {
}
clearNeedsLayout();
-
- // Notify our MediaControls that a layout has happened.
- if (mediaElement() && mediaElement()->mediaControls() &&
- newPanelWidth.has_value()) {
- if (!m_lastReportedPanelWidth.has_value() ||
- m_lastReportedPanelWidth.value() != newPanelWidth.value()) {
- mediaElement()->mediaControls()->notifyPanelWidthChanged(
- newPanelWidth.value());
- // Store the last value we reported, so we know if it has changed.
- m_lastReportedPanelWidth = newPanelWidth.value();
- }
- }
}
bool LayoutMedia::isChildAllowed(LayoutObject* child,

Powered by Google App Engine
This is Rietveld 408576698