| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 | 74 |
| 75 // Never set the element size to zero when in a media document. | 75 // Never set the element size to zero when in a media document. |
| 76 if (size.isEmpty() && node()->ownerDocument() && node()->ownerDocument()->is
MediaDocument()) | 76 if (size.isEmpty() && node()->ownerDocument() && node()->ownerDocument()->is
MediaDocument()) |
| 77 return; | 77 return; |
| 78 | 78 |
| 79 if (size == intrinsicSize()) | 79 if (size == intrinsicSize()) |
| 80 return; | 80 return; |
| 81 | 81 |
| 82 setIntrinsicSize(size); | 82 setIntrinsicSize(size); |
| 83 setPreferredLogicalWidthsDirty(); | 83 setPreferredLogicalWidthsDirty(); |
| 84 setNeedsLayoutAndFullRepaint(); | 84 setNeedsLayoutAndFullPaintInvalidation(); |
| 85 } | 85 } |
| 86 | 86 |
| 87 LayoutSize RenderVideo::calculateIntrinsicSize() | 87 LayoutSize RenderVideo::calculateIntrinsicSize() |
| 88 { | 88 { |
| 89 HTMLVideoElement* video = videoElement(); | 89 HTMLVideoElement* video = videoElement(); |
| 90 | 90 |
| 91 // Spec text from 4.8.6 | 91 // Spec text from 4.8.6 |
| 92 // | 92 // |
| 93 // The intrinsic width of a video element's playback area is the intrinsic w
idth | 93 // The intrinsic width of a video element's playback area is the intrinsic w
idth |
| 94 // of the video resource, if that is available; otherwise it is the intrinsi
c | 94 // of the video resource, if that is available; otherwise it is the intrinsi
c |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 return CompositingReasonVideo; | 282 return CompositingReasonVideo; |
| 283 } | 283 } |
| 284 | 284 |
| 285 if ((triggers & VideoTrigger) && shouldDisplayVideo() && supportsAccelerated
Rendering()) | 285 if ((triggers & VideoTrigger) && shouldDisplayVideo() && supportsAccelerated
Rendering()) |
| 286 return CompositingReasonVideo; | 286 return CompositingReasonVideo; |
| 287 | 287 |
| 288 return CompositingReasonNone; | 288 return CompositingReasonNone; |
| 289 } | 289 } |
| 290 | 290 |
| 291 } // namespace WebCore | 291 } // namespace WebCore |
| OLD | NEW |