1f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles)/* 2f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved. 3f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) * Copyright (C) 2013 Intel Corporation. All rights reserved. 4f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) * 5f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) * Portions are Copyright (C) 1998 Netscape Communications Corporation. 6f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) * 7f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) * Other contributors: 8f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) * Robert O'Callahan <roc+@cs.cmu.edu> 9f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) * David Baron <dbaron@fas.harvard.edu> 10f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) * Christian Biesinger <cbiesinger@web.de> 11f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) * Randall Jesup <rjesup@wgate.com> 12f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) * Roland Mainz <roland.mainz@informatik.med.uni-giessen.de> 13f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) * Josh Soref <timeless@mac.com> 14f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) * Boris Zbarsky <bzbarsky@mit.edu> 15f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) * 16f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) * This library is free software; you can redistribute it and/or 17f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) * modify it under the terms of the GNU Lesser General Public 18f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) * License as published by the Free Software Foundation; either 19f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) * version 2.1 of the License, or (at your option) any later version. 20f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) * 21f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) * This library is distributed in the hope that it will be useful, 22f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) * but WITHOUT ANY WARRANTY; without even the implied warranty of 23f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 24f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) * Lesser General Public License for more details. 25f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) * 26f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) * You should have received a copy of the GNU Lesser General Public 27f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) * License along with this library; if not, write to the Free Software 28f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 29f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) * 30f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) * Alternatively, the contents of this file may be used under the terms 31f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) * of either the Mozilla Public License Version 1.1, found at 32f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) * http://www.mozilla.org/MPL/ (the "MPL") or the GNU General Public 33f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) * License Version 2.0, found at http://www.fsf.org/copyleft/gpl.html 34f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) * (the "GPL"), in which case the provisions of the MPL or the GPL are 35f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) * applicable instead of those above. If you wish to allow use of your 36f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) * version of this file only under the terms of one of those two 37f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) * licenses (the MPL or the GPL) and not to allow others to use your 38f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) * version of this file under the LGPL, indicate your decision by 39f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) * deletingthe provisions above and replace them with the notice and 40f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) * other provisions required by the MPL or the GPL, as the case may be. 41f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) * If you do not delete the provisions above, a recipient may use your 42f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) * version of this file under any of the LGPL, the MPL or the GPL. 43f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) */ 44f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) 45f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles)#ifndef RenderLayerReflectionInfo_h 46f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles)#define RenderLayerReflectionInfo_h 47f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) 48f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles)#include "core/rendering/LayerPaintingInfo.h" 49f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles)#include "core/rendering/RenderLayerModelObject.h" 50f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles)#include "wtf/Noncopyable.h" 51f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) 52c1847b1379d12d0e05df27436bf19a9b1bf12deaTorne (Richard Coles)namespace blink { 53f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) 54f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles)class RenderLayer; 55f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles)class RenderReplica; 56f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) 57e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles)class RenderLayerReflectionInfo : public NoBaseWillBeGarbageCollected<RenderLayerReflectionInfo> { 58f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) WTF_MAKE_NONCOPYABLE(RenderLayerReflectionInfo); 59f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles)public: 60f91f5fa1608c2cdd9af1842fb5dadbe78275be2aBo Liu explicit RenderLayerReflectionInfo(RenderBox&); 61e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) void destroy(); 62e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) void trace(Visitor*); 63f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) 64f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) RenderReplica* reflection() const { return m_reflection; } 65f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) RenderLayer* reflectionLayer() const; 66f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) 67f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) bool isPaintingInsideReflection() const { return m_isPaintingInsideReflection; } 68f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) 69f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) void updateAfterStyleChange(const RenderStyle* oldStyle); 70f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) 71f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) void paint(GraphicsContext*, const LayerPaintingInfo&, PaintLayerFlags); 72f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) 73f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) String debugName() const; 74f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) 75f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles)private: 76e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) RenderBox& box() { return *m_box; } 77e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) const RenderBox& box() const { return *m_box; } 78e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) 79e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) RawPtrWillBeMember<RenderBox> m_box; 80e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) RawPtrWillBeMember<RenderReplica> m_reflection; 81f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) 82f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) // A state bit tracking if we are painting inside a replica. 83f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) unsigned m_isPaintingInsideReflection : 1; 84f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles)}; 85f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) 86c1847b1379d12d0e05df27436bf19a9b1bf12deaTorne (Richard Coles)} // namespace blink 87f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles) 88f79f16f17ddc4f842d7b7a38603e280e94be826aTorne (Richard Coles)#endif // RenderLayerReflectinInfo_h 89