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

Side by Side Diff: Source/core/html/HTMLVideoElement.cpp

Issue 923953002: Move rendering/RenderImage* to layout/LayoutImage* (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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
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 19 matching lines...) Expand all
30 #include "core/CSSPropertyNames.h" 30 #include "core/CSSPropertyNames.h"
31 #include "core/HTMLNames.h" 31 #include "core/HTMLNames.h"
32 #include "core/dom/Attribute.h" 32 #include "core/dom/Attribute.h"
33 #include "core/dom/Document.h" 33 #include "core/dom/Document.h"
34 #include "core/dom/ExceptionCode.h" 34 #include "core/dom/ExceptionCode.h"
35 #include "core/dom/shadow/ShadowRoot.h" 35 #include "core/dom/shadow/ShadowRoot.h"
36 #include "core/frame/Settings.h" 36 #include "core/frame/Settings.h"
37 #include "core/html/HTMLImageLoader.h" 37 #include "core/html/HTMLImageLoader.h"
38 #include "core/html/canvas/CanvasRenderingContext.h" 38 #include "core/html/canvas/CanvasRenderingContext.h"
39 #include "core/html/parser/HTMLParserIdioms.h" 39 #include "core/html/parser/HTMLParserIdioms.h"
40 #include "core/layout/LayoutImage.h"
40 #include "core/layout/LayoutVideo.h" 41 #include "core/layout/LayoutVideo.h"
41 #include "core/rendering/RenderImage.h"
42 #include "platform/UserGestureIndicator.h" 42 #include "platform/UserGestureIndicator.h"
43 #include "platform/graphics/GraphicsContext.h" 43 #include "platform/graphics/GraphicsContext.h"
44 #include "platform/graphics/ImageBuffer.h" 44 #include "platform/graphics/ImageBuffer.h"
45 #include "platform/graphics/gpu/Extensions3DUtil.h" 45 #include "platform/graphics/gpu/Extensions3DUtil.h"
46 #include "public/platform/WebCanvas.h" 46 #include "public/platform/WebCanvas.h"
47 #include "public/platform/WebGraphicsContext3D.h" 47 #include "public/platform/WebGraphicsContext3D.h"
48 48
49 namespace blink { 49 namespace blink {
50 50
51 using namespace HTMLNames; 51 using namespace HTMLNames;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 void HTMLVideoElement::attach(const AttachContext& context) 84 void HTMLVideoElement::attach(const AttachContext& context)
85 { 85 {
86 HTMLMediaElement::attach(context); 86 HTMLMediaElement::attach(context);
87 87
88 updateDisplayState(); 88 updateDisplayState();
89 if (shouldDisplayPosterImage()) { 89 if (shouldDisplayPosterImage()) {
90 if (!m_imageLoader) 90 if (!m_imageLoader)
91 m_imageLoader = HTMLImageLoader::create(this); 91 m_imageLoader = HTMLImageLoader::create(this);
92 m_imageLoader->updateFromElement(); 92 m_imageLoader->updateFromElement();
93 if (renderer()) 93 if (renderer())
94 toRenderImage(renderer())->imageResource()->setImageResource(m_image Loader->image()); 94 toLayoutImage(renderer())->imageResource()->setImageResource(m_image Loader->image());
95 } 95 }
96 } 96 }
97 97
98 void HTMLVideoElement::collectStyleForPresentationAttribute(const QualifiedName& name, const AtomicString& value, MutableStylePropertySet* style) 98 void HTMLVideoElement::collectStyleForPresentationAttribute(const QualifiedName& name, const AtomicString& value, MutableStylePropertySet* style)
99 { 99 {
100 if (name == widthAttr) 100 if (name == widthAttr)
101 addHTMLLengthToStyle(style, CSSPropertyWidth, value); 101 addHTMLLengthToStyle(style, CSSPropertyWidth, value);
102 else if (name == heightAttr) 102 else if (name == heightAttr)
103 addHTMLLengthToStyle(style, CSSPropertyHeight, value); 103 addHTMLLengthToStyle(style, CSSPropertyHeight, value);
104 else 104 else
(...skipping 12 matching lines...) Expand all
117 if (name == posterAttr) { 117 if (name == posterAttr) {
118 // Force a poster recalc by setting m_displayMode to Unknown directly be fore calling updateDisplayState. 118 // Force a poster recalc by setting m_displayMode to Unknown directly be fore calling updateDisplayState.
119 HTMLMediaElement::setDisplayMode(Unknown); 119 HTMLMediaElement::setDisplayMode(Unknown);
120 updateDisplayState(); 120 updateDisplayState();
121 if (shouldDisplayPosterImage()) { 121 if (shouldDisplayPosterImage()) {
122 if (!m_imageLoader) 122 if (!m_imageLoader)
123 m_imageLoader = HTMLImageLoader::create(this); 123 m_imageLoader = HTMLImageLoader::create(this);
124 m_imageLoader->updateFromElement(ImageLoader::UpdateIgnorePreviousEr ror); 124 m_imageLoader->updateFromElement(ImageLoader::UpdateIgnorePreviousEr ror);
125 } else { 125 } else {
126 if (renderer()) 126 if (renderer())
127 toRenderImage(renderer())->imageResource()->setImageResource(0); 127 toLayoutImage(renderer())->imageResource()->setImageResource(0);
128 } 128 }
129 // Notify the player when the poster image URL changes. 129 // Notify the player when the poster image URL changes.
130 if (webMediaPlayer()) 130 if (webMediaPlayer())
131 webMediaPlayer()->setPoster(posterImageURL()); 131 webMediaPlayer()->setPoster(posterImageURL());
132 } else { 132 } else {
133 HTMLMediaElement::parseAttribute(name, value); 133 HTMLMediaElement::parseAttribute(name, value);
134 } 134 }
135 } 135 }
136 136
137 bool HTMLVideoElement::supportsFullscreen() const 137 bool HTMLVideoElement::supportsFullscreen() const
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 { 318 {
319 return !isMediaDataCORSSameOrigin(destinationSecurityOrigin); 319 return !isMediaDataCORSSameOrigin(destinationSecurityOrigin);
320 } 320 }
321 321
322 FloatSize HTMLVideoElement::sourceSize() const 322 FloatSize HTMLVideoElement::sourceSize() const
323 { 323 {
324 return FloatSize(videoWidth(), videoHeight()); 324 return FloatSize(videoWidth(), videoHeight());
325 } 325 }
326 326
327 } 327 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLPlugInElement.cpp ('k') | Source/core/html/canvas/CanvasRenderingContext2D.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698