| 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 | 157 |
| 158 HTMLVideoElement* LayoutVideo::videoElement() const | 158 HTMLVideoElement* LayoutVideo::videoElement() const |
| 159 { | 159 { |
| 160 return toHTMLVideoElement(node()); | 160 return toHTMLVideoElement(node()); |
| 161 } | 161 } |
| 162 | 162 |
| 163 void LayoutVideo::updateFromElement() | 163 void LayoutVideo::updateFromElement() |
| 164 { | 164 { |
| 165 LayoutMedia::updateFromElement(); | 165 LayoutMedia::updateFromElement(); |
| 166 updatePlayer(); | 166 updatePlayer(); |
| 167 |
| 168 // If the DisplayMode of the video changed, then we need to paint. |
| 169 setShouldDoFullPaintInvalidation(); |
| 167 } | 170 } |
| 168 | 171 |
| 169 void LayoutVideo::updatePlayer() | 172 void LayoutVideo::updatePlayer() |
| 170 { | 173 { |
| 171 updateIntrinsicSize(); | 174 updateIntrinsicSize(); |
| 172 | 175 |
| 173 WebMediaPlayer* mediaPlayer = mediaElement()->webMediaPlayer(); | 176 WebMediaPlayer* mediaPlayer = mediaElement()->webMediaPlayer(); |
| 174 if (!mediaPlayer) | 177 if (!mediaPlayer) |
| 175 return; | 178 return; |
| 176 | 179 |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 return CompositingReasonVideo; | 252 return CompositingReasonVideo; |
| 250 } | 253 } |
| 251 | 254 |
| 252 if (shouldDisplayVideo() && supportsAcceleratedRendering()) | 255 if (shouldDisplayVideo() && supportsAcceleratedRendering()) |
| 253 return CompositingReasonVideo; | 256 return CompositingReasonVideo; |
| 254 | 257 |
| 255 return CompositingReasonNone; | 258 return CompositingReasonNone; |
| 256 } | 259 } |
| 257 | 260 |
| 258 } // namespace blink | 261 } // namespace blink |
| OLD | NEW |