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

Side by Side Diff: Source/core/paint/DeprecatedPaintLayerReflectionInfo.cpp

Issue 1033943002: Rename LayoutStyle to papayawhip (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ensureComputedStyle 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) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 28 matching lines...) Expand all
39 * other provisions required by the MPL or the GPL, as the case may be. 39 * other provisions required by the MPL or the GPL, as the case may be.
40 * If you do not delete the provisions above, a recipient may use your 40 * If you do not delete the provisions above, a recipient may use your
41 * version of this file under any of the LGPL, the MPL or the GPL. 41 * version of this file under any of the LGPL, the MPL or the GPL.
42 */ 42 */
43 43
44 #include "config.h" 44 #include "config.h"
45 #include "core/paint/DeprecatedPaintLayerReflectionInfo.h" 45 #include "core/paint/DeprecatedPaintLayerReflectionInfo.h"
46 46
47 #include "core/frame/UseCounter.h" 47 #include "core/frame/UseCounter.h"
48 #include "core/layout/LayoutReplica.h" 48 #include "core/layout/LayoutReplica.h"
49 #include "core/layout/style/LayoutStyle.h" 49 #include "core/layout/style/ComputedStyle.h"
50 #include "core/paint/DeprecatedPaintLayer.h" 50 #include "core/paint/DeprecatedPaintLayer.h"
51 #include "core/paint/DeprecatedPaintLayerPainter.h" 51 #include "core/paint/DeprecatedPaintLayerPainter.h"
52 #include "platform/transforms/ScaleTransformOperation.h" 52 #include "platform/transforms/ScaleTransformOperation.h"
53 #include "platform/transforms/TranslateTransformOperation.h" 53 #include "platform/transforms/TranslateTransformOperation.h"
54 54
55 #include "wtf/RefPtr.h" 55 #include "wtf/RefPtr.h"
56 56
57 namespace blink { 57 namespace blink {
58 58
59 DeprecatedPaintLayerReflectionInfo::DeprecatedPaintLayerReflectionInfo(LayoutBox & renderer) 59 DeprecatedPaintLayerReflectionInfo::DeprecatedPaintLayerReflectionInfo(LayoutBox & renderer)
(...skipping 14 matching lines...) Expand all
74 m_reflection->setParent(0); 74 m_reflection->setParent(0);
75 m_reflection->destroy(); 75 m_reflection->destroy();
76 m_reflection = nullptr; 76 m_reflection = nullptr;
77 } 77 }
78 78
79 DeprecatedPaintLayer* DeprecatedPaintLayerReflectionInfo::reflectionLayer() cons t 79 DeprecatedPaintLayer* DeprecatedPaintLayerReflectionInfo::reflectionLayer() cons t
80 { 80 {
81 return m_reflection->layer(); 81 return m_reflection->layer();
82 } 82 }
83 83
84 void DeprecatedPaintLayerReflectionInfo::updateAfterStyleChange(const LayoutStyl e* oldStyle) 84 void DeprecatedPaintLayerReflectionInfo::updateAfterStyleChange(const ComputedSt yle* oldStyle)
85 { 85 {
86 RefPtr<LayoutStyle> newStyle = LayoutStyle::create(); 86 RefPtr<ComputedStyle> newStyle = ComputedStyle::create();
87 newStyle->inheritFrom(box().styleRef()); 87 newStyle->inheritFrom(box().styleRef());
88 88
89 // Map in our transform. 89 // Map in our transform.
90 TransformOperations transform; 90 TransformOperations transform;
91 switch (box().style()->boxReflect()->direction()) { 91 switch (box().style()->boxReflect()->direction()) {
92 case ReflectionBelow: 92 case ReflectionBelow:
93 transform.operations().append(TranslateTransformOperation::create(Length (0, Fixed), 93 transform.operations().append(TranslateTransformOperation::create(Length (0, Fixed),
94 Length(100., Percent), TransformOperation::Translate)); 94 Length(100., Percent), TransformOperation::Translate));
95 transform.operations().append(TranslateTransformOperation::create(Length (0, Fixed), 95 transform.operations().append(TranslateTransformOperation::create(Length (0, Fixed),
96 box().style()->boxReflect()->offset(), TransformOperation::Translate )); 96 box().style()->boxReflect()->offset(), TransformOperation::Translate ));
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 if (m_isPaintingInsideReflection) 134 if (m_isPaintingInsideReflection)
135 return; 135 return;
136 136
137 // Mark that we are now inside replica painting. 137 // Mark that we are now inside replica painting.
138 m_isPaintingInsideReflection = true; 138 m_isPaintingInsideReflection = true;
139 DeprecatedPaintLayerPainter(*reflectionLayer()).paintLayer(context, painting Info, flags); 139 DeprecatedPaintLayerPainter(*reflectionLayer()).paintLayer(context, painting Info, flags);
140 m_isPaintingInsideReflection = false; 140 m_isPaintingInsideReflection = false;
141 } 141 }
142 142
143 } // namespace blink 143 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/paint/DeprecatedPaintLayerReflectionInfo.h ('k') | Source/core/paint/DeprecatedPaintLayerScrollableArea.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698