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

Side by Side Diff: sky/engine/core/rendering/compositing/CompositedLayerMapping.cpp

Issue 701663002: Remove HTMLVideoElement. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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) 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010, 2011 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 23 matching lines...) Expand all
34 #include "core/html/canvas/CanvasRenderingContext.h" 34 #include "core/html/canvas/CanvasRenderingContext.h"
35 #include "core/inspector/InspectorNodeIds.h" 35 #include "core/inspector/InspectorNodeIds.h"
36 #include "core/inspector/InspectorTraceEvents.h" 36 #include "core/inspector/InspectorTraceEvents.h"
37 #include "core/page/Chrome.h" 37 #include "core/page/Chrome.h"
38 #include "core/page/ChromeClient.h" 38 #include "core/page/ChromeClient.h"
39 #include "core/page/Page.h" 39 #include "core/page/Page.h"
40 #include "core/page/scrolling/ScrollingCoordinator.h" 40 #include "core/page/scrolling/ScrollingCoordinator.h"
41 #include "core/rendering/FilterEffectRenderer.h" 41 #include "core/rendering/FilterEffectRenderer.h"
42 #include "core/rendering/RenderImage.h" 42 #include "core/rendering/RenderImage.h"
43 #include "core/rendering/RenderLayerStackingNodeIterator.h" 43 #include "core/rendering/RenderLayerStackingNodeIterator.h"
44 #include "core/rendering/RenderVideo.h"
45 #include "core/rendering/RenderView.h" 44 #include "core/rendering/RenderView.h"
46 #include "core/rendering/compositing/RenderLayerCompositor.h" 45 #include "core/rendering/compositing/RenderLayerCompositor.h"
47 #include "core/rendering/style/KeyframeList.h" 46 #include "core/rendering/style/KeyframeList.h"
48 #include "platform/LengthFunctions.h" 47 #include "platform/LengthFunctions.h"
49 #include "platform/RuntimeEnabledFeatures.h" 48 #include "platform/RuntimeEnabledFeatures.h"
50 #include "platform/fonts/FontCache.h" 49 #include "platform/fonts/FontCache.h"
51 #include "platform/geometry/TransformState.h" 50 #include "platform/geometry/TransformState.h"
52 #include "platform/graphics/GraphicsContext.h" 51 #include "platform/graphics/GraphicsContext.h"
53 #include "wtf/CurrentTime.h" 52 #include "wtf/CurrentTime.h"
54 #include "wtf/text/StringBuilder.h" 53 #include "wtf/text/StringBuilder.h"
55 54
56 namespace blink { 55 namespace blink {
57 56
58 static IntRect clipBox(RenderBox* renderer); 57 static IntRect clipBox(RenderBox* renderer);
59 58
60 static IntRect contentsRect(const RenderObject* renderer) 59 static IntRect contentsRect(const RenderObject* renderer)
61 { 60 {
62 if (!renderer->isBox()) 61 if (!renderer->isBox())
63 return IntRect(); 62 return IntRect();
64 63
65 return renderer->isVideo() ? 64 return pixelSnappedIntRect(toRenderBox(renderer)->contentBoxRect());
66 toRenderVideo(renderer)->videoBox() :
67 pixelSnappedIntRect(toRenderBox(renderer)->contentBoxRect());
68 } 65 }
69 66
70 static IntRect backgroundRect(const RenderObject* renderer) 67 static IntRect backgroundRect(const RenderObject* renderer)
71 { 68 {
72 if (!renderer->isBox()) 69 if (!renderer->isBox())
73 return IntRect(); 70 return IntRect();
74 71
75 LayoutRect rect; 72 LayoutRect rect;
76 const RenderBox* box = toRenderBox(renderer); 73 const RenderBox* box = toRenderBox(renderer);
77 EFillBox clip = box->style()->backgroundClip(); 74 EFillBox clip = box->style()->backgroundClip();
(...skipping 1552 matching lines...) Expand 10 before | Expand all | Expand 10 after
1630 1627
1631 bool CompositedLayerMapping::containsPaintedContent() const 1628 bool CompositedLayerMapping::containsPaintedContent() const
1632 { 1629 {
1633 if (paintsIntoCompositedAncestor()) 1630 if (paintsIntoCompositedAncestor())
1634 return false; 1631 return false;
1635 1632
1636 if (renderer()->isImage() && isDirectlyCompositedImage()) 1633 if (renderer()->isImage() && isDirectlyCompositedImage())
1637 return false; 1634 return false;
1638 1635
1639 RenderObject* renderObject = renderer(); 1636 RenderObject* renderObject = renderer();
1640 // FIXME: we could optimize cases where the image, video or canvas is known to fill the border box entirely,
1641 // and set background color on the layer in that case, instead of allocating backing store and painting.
1642 if (renderObject->isVideo() && toRenderVideo(renderer())->shouldDisplayVideo ())
1643 return m_owningLayer.hasBoxDecorationsOrBackground();
1644 1637
1645 if (m_owningLayer.hasVisibleBoxDecorations()) 1638 if (m_owningLayer.hasVisibleBoxDecorations())
1646 return true; 1639 return true;
1647 1640
1648 if (renderObject->hasMask()) // masks require special treatment 1641 if (renderObject->hasMask()) // masks require special treatment
1649 return true; 1642 return true;
1650 1643
1651 if (renderObject->isReplaced()) 1644 if (renderObject->isReplaced())
1652 return true; 1645 return true;
1653 1646
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
2210 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { 2203 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) {
2211 name = "Scrolling Block Selection Layer"; 2204 name = "Scrolling Block Selection Layer";
2212 } else { 2205 } else {
2213 ASSERT_NOT_REACHED(); 2206 ASSERT_NOT_REACHED();
2214 } 2207 }
2215 2208
2216 return name; 2209 return name;
2217 } 2210 }
2218 2211
2219 } // namespace blink 2212 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderVideo.cpp ('k') | sky/engine/core/rendering/compositing/RenderLayerCompositor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698