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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutMedia.cpp

Issue 2015503002: Move TODO(philipj) to TODO(foolip) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 seenTextTrackContainer = true; 71 seenTextTrackContainer = true;
72 else 72 else
73 ASSERT_NOT_REACHED(); 73 ASSERT_NOT_REACHED();
74 #endif 74 #endif
75 75
76 if (newRect.size() == oldSize && !child->needsLayout()) 76 if (newRect.size() == oldSize && !child->needsLayout())
77 continue; 77 continue;
78 78
79 LayoutBox* layoutBox = toLayoutBox(child); 79 LayoutBox* layoutBox = toLayoutBox(child);
80 layoutBox->setLocation(newRect.location()); 80 layoutBox->setLocation(newRect.location());
81 // TODO(philipj): Remove the mutableStyleRef() and depend on CSS 81 // TODO(foolip): Remove the mutableStyleRef() and depend on CSS
82 // width/height: inherit to match the media element size. 82 // width/height: inherit to match the media element size.
83 layoutBox->mutableStyleRef().setHeight(Length(newRect.height(), Fixed)); 83 layoutBox->mutableStyleRef().setHeight(Length(newRect.height(), Fixed));
84 layoutBox->mutableStyleRef().setWidth(Length(newRect.width(), Fixed)); 84 layoutBox->mutableStyleRef().setWidth(Length(newRect.width(), Fixed));
85 layoutBox->forceLayout(); 85 layoutBox->forceLayout();
86 } 86 }
87 87
88 clearNeedsLayout(); 88 clearNeedsLayout();
89 89
90 // Notify our MediaControls that a layout has happened. 90 // Notify our MediaControls that a layout has happened.
91 if (mediaElement() && mediaElement()->mediaControls() && newRect.width() != oldSize.width()) 91 if (mediaElement() && mediaElement()->mediaControls() && newRect.width() != oldSize.width())
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 143
144 void LayoutMedia::setRequestPositionUpdates(bool want) 144 void LayoutMedia::setRequestPositionUpdates(bool want)
145 { 145 {
146 if (want) 146 if (want)
147 view()->registerMediaForPositionChangeNotification(*this); 147 view()->registerMediaForPositionChangeNotification(*this);
148 else 148 else
149 view()->unregisterMediaForPositionChangeNotification(*this); 149 view()->unregisterMediaForPositionChangeNotification(*this);
150 } 150 }
151 151
152 } // namespace blink 152 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698