Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 70 else if (child->node()->isTextTrackContainer()) | 70 else if (child->node()->isTextTrackContainer()) |
| 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 (newSize == oldSize && !child->needsLayout()) | 76 if (newSize == oldSize && !child->needsLayout()) |
| 77 continue; | 77 continue; |
| 78 | 78 |
| 79 LayoutBox* layoutBox = toLayoutBox(child); | 79 LayoutBox* layoutBox = toLayoutBox(child); |
| 80 layoutBox->setLocation(LayoutPoint(borderLeft(), borderTop()) + LayoutSi ze(paddingLeft(), paddingTop())); | 80 layoutBox->setLocation(LayoutPoint(LayoutUnit(borderLeft()), borderTop() ) + LayoutSize(paddingLeft(), paddingTop())); |
|
eae
2016/01/30 05:18:36
Isn't this exactly what contentBoxOffset() does (r
leviw_travelin_and_unemployed
2016/01/30 05:36:06
Awesome point :D
| |
| 81 // TODO(philipj): Remove the mutableStyleRef() and depend on CSS | 81 // TODO(philipj): 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(newSize.height(), Fixed)); | 83 layoutBox->mutableStyleRef().setHeight(Length(newSize.height(), Fixed)); |
| 84 layoutBox->mutableStyleRef().setWidth(Length(newSize.width(), Fixed)); | 84 layoutBox->mutableStyleRef().setWidth(Length(newSize.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. |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 |
| OLD | NEW |