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

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: Add comments for dependent constants Created 3 years, 9 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 ae50013ff9ecb3b817429f21eccb38bf6018c019..59f699bdabe82f41bbcb9f7e49e3f4b5448fc72c 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,
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutMedia.h ('k') | third_party/WebKit/Source/core/paint/MediaControlsPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698