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

Side by Side Diff: Source/core/layout/LayoutVideo.cpp

Issue 1025213002: Begin tracking why layout is invalidated (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 5 years, 8 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 | Annotate | Revision Log
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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutTextControlSingleLine.cpp ('k') | Source/core/layout/SubtreeLayoutScope.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698