| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 | 67 |
| 68 // Never set the element size to zero when in a media document. | 68 // Never set the element size to zero when in a media document. |
| 69 if (size.isEmpty() && node()->ownerDocument() && node()->ownerDocument()->is
MediaDocument()) | 69 if (size.isEmpty() && node()->ownerDocument() && node()->ownerDocument()->is
MediaDocument()) |
| 70 return; | 70 return; |
| 71 | 71 |
| 72 if (size == intrinsicSize()) | 72 if (size == intrinsicSize()) |
| 73 return; | 73 return; |
| 74 | 74 |
| 75 setIntrinsicSize(size); | 75 setIntrinsicSize(size); |
| 76 setPreferredLogicalWidthsDirty(); | 76 setPreferredLogicalWidthsDirty(); |
| 77 setNeedsLayoutAndFullPaintInvalidation(); | 77 setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReason::SizeChanged
); |
| 78 } | 78 } |
| 79 | 79 |
| 80 LayoutSize LayoutVideo::calculateIntrinsicSize() | 80 LayoutSize LayoutVideo::calculateIntrinsicSize() |
| 81 { | 81 { |
| 82 HTMLVideoElement* video = videoElement(); | 82 HTMLVideoElement* video = videoElement(); |
| 83 | 83 |
| 84 // Spec text from 4.8.6 | 84 // Spec text from 4.8.6 |
| 85 // | 85 // |
| 86 // The intrinsic width of a video element's playback area is the intrinsic w
idth | 86 // The intrinsic width of a video element's playback area is the intrinsic w
idth |
| 87 // of the video resource, if that is available; otherwise it is the intrinsi
c | 87 // of the video resource, if that is available; otherwise it is the intrinsi
c |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 return CompositingReasonVideo; | 250 return CompositingReasonVideo; |
| 251 } | 251 } |
| 252 | 252 |
| 253 if (shouldDisplayVideo() && supportsAcceleratedRendering()) | 253 if (shouldDisplayVideo() && supportsAcceleratedRendering()) |
| 254 return CompositingReasonVideo; | 254 return CompositingReasonVideo; |
| 255 | 255 |
| 256 return CompositingReasonNone; | 256 return CompositingReasonNone; |
| 257 } | 257 } |
| 258 | 258 |
| 259 } // namespace blink | 259 } // namespace blink |
| OLD | NEW |