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

Side by Side Diff: Source/core/rendering/RenderLayer.h

Issue 423823004: Add support for SVG Clip paths in HTML (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Changed LayoutTests and Aligned with review comments Created 6 years, 4 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) 2003, 2009, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Intel Corporation. All rights reserved. 3 * Copyright (C) 2013 Intel Corporation. All rights reserved.
4 * 4 *
5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
6 * 6 *
7 * Other contributors: 7 * Other contributors:
8 * Robert O'Callahan <roc+@cs.cmu.edu> 8 * Robert O'Callahan <roc+@cs.cmu.edu>
9 * David Baron <dbaron@fas.harvard.edu> 9 * David Baron <dbaron@fas.harvard.edu>
10 * Christian Biesinger <cbiesinger@web.de> 10 * Christian Biesinger <cbiesinger@web.de>
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 * version of this file under any of the LGPL, the MPL or the GPL. 42 * version of this file under any of the LGPL, the MPL or the GPL.
43 */ 43 */
44 44
45 #ifndef RenderLayer_h 45 #ifndef RenderLayer_h
46 #define RenderLayer_h 46 #define RenderLayer_h
47 47
48 #include "core/rendering/LayerFragment.h" 48 #include "core/rendering/LayerFragment.h"
49 #include "core/rendering/LayerPaintingInfo.h" 49 #include "core/rendering/LayerPaintingInfo.h"
50 #include "core/rendering/RenderBox.h" 50 #include "core/rendering/RenderBox.h"
51 #include "core/rendering/RenderLayerBlendInfo.h" 51 #include "core/rendering/RenderLayerBlendInfo.h"
52 #include "core/rendering/RenderLayerClipPathInfo.h"
52 #include "core/rendering/RenderLayerClipper.h" 53 #include "core/rendering/RenderLayerClipper.h"
53 #include "core/rendering/RenderLayerFilterInfo.h" 54 #include "core/rendering/RenderLayerFilterInfo.h"
54 #include "core/rendering/RenderLayerReflectionInfo.h" 55 #include "core/rendering/RenderLayerReflectionInfo.h"
55 #include "core/rendering/RenderLayerRepainter.h" 56 #include "core/rendering/RenderLayerRepainter.h"
56 #include "core/rendering/RenderLayerScrollableArea.h" 57 #include "core/rendering/RenderLayerScrollableArea.h"
57 #include "core/rendering/RenderLayerStackingNode.h" 58 #include "core/rendering/RenderLayerStackingNode.h"
58 #include "core/rendering/RenderLayerStackingNodeIterator.h" 59 #include "core/rendering/RenderLayerStackingNodeIterator.h"
59 #include "core/rendering/compositing/CompositedLayerMappingPtr.h" 60 #include "core/rendering/compositing/CompositedLayerMappingPtr.h"
60 #include "platform/graphics/CompositingReasons.h" 61 #include "platform/graphics/CompositingReasons.h"
61 #include "wtf/OwnPtr.h" 62 #include "wtf/OwnPtr.h"
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 // Returns true if the layer has a -webkit-perspective. 296 // Returns true if the layer has a -webkit-perspective.
296 // Note that this transform has the perspective-origin baked in. 297 // Note that this transform has the perspective-origin baked in.
297 TransformationMatrix perspectiveTransform() const; 298 TransformationMatrix perspectiveTransform() const;
298 FloatPoint perspectiveOrigin() const; 299 FloatPoint perspectiveOrigin() const;
299 bool preserves3D() const { return renderer()->style()->transformStyle3D() == TransformStyle3DPreserve3D; } 300 bool preserves3D() const { return renderer()->style()->transformStyle3D() == TransformStyle3DPreserve3D; }
300 bool has3DTransform() const { return m_transform && !m_transform->isAffine() ; } 301 bool has3DTransform() const { return m_transform && !m_transform->isAffine() ; }
301 302
302 // FIXME: reflections should force transform-style to be flat in the style: https://bugs.webkit.org/show_bug.cgi?id=106959 303 // FIXME: reflections should force transform-style to be flat in the style: https://bugs.webkit.org/show_bug.cgi?id=106959
303 bool shouldPreserve3D() const { return !renderer()->hasReflection() && rende rer()->style()->transformStyle3D() == TransformStyle3DPreserve3D; } 304 bool shouldPreserve3D() const { return !renderer()->hasReflection() && rende rer()->style()->transformStyle3D() == TransformStyle3DPreserve3D; }
304 305
305 void filterNeedsPaintInvalidation(); 306 void svgEffectsNeedPaintInvalidation();
306 bool hasFilter() const { return renderer()->hasFilter(); } 307 bool hasFilter() const { return renderer()->hasFilter(); }
307 308
308 bool paintsWithBlendMode() const; 309 bool paintsWithBlendMode() const;
309 310
310 void* operator new(size_t); 311 void* operator new(size_t);
311 // Only safe to call from RenderLayerModelObject::destroyLayer() 312 // Only safe to call from RenderLayerModelObject::destroyLayer()
312 void operator delete(void*); 313 void operator delete(void*);
313 314
314 CompositingState compositingState() const; 315 CompositingState compositingState() const;
315 316
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 bool childBackgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const; 637 bool childBackgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const;
637 638
638 bool shouldBeSelfPaintingLayer() const; 639 bool shouldBeSelfPaintingLayer() const;
639 640
640 // FIXME: We should only create the stacking node if needed. 641 // FIXME: We should only create the stacking node if needed.
641 bool requiresStackingNode() const { return true; } 642 bool requiresStackingNode() const { return true; }
642 void updateStackingNode(); 643 void updateStackingNode();
643 644
644 void updateReflectionInfo(const RenderStyle*); 645 void updateReflectionInfo(const RenderStyle*);
645 646
647 void updateClipPathInfo(const RenderStyle* oldStyle, const RenderStyle* newS tyle);
648
646 // FIXME: We could lazily allocate our ScrollableArea based on style propert ies ('overflow', ...) 649 // FIXME: We could lazily allocate our ScrollableArea based on style propert ies ('overflow', ...)
647 // but for now, we are always allocating it for RenderBox as it's safer. 650 // but for now, we are always allocating it for RenderBox as it's safer.
648 bool requiresScrollableArea() const { return renderBox(); } 651 bool requiresScrollableArea() const { return renderBox(); }
649 void updateScrollableArea(); 652 void updateScrollableArea();
650 653
651 void dirtyAncestorChainVisibleDescendantStatus(); 654 void dirtyAncestorChainVisibleDescendantStatus();
652 void setAncestorChainHasVisibleDescendant(); 655 void setAncestorChainHasVisibleDescendant();
653 656
654 bool attemptDirectCompositingUpdate(StyleDifference, const RenderStyle* oldS tyle); 657 bool attemptDirectCompositingUpdate(StyleDifference, const RenderStyle* oldS tyle);
655 void updateTransform(const RenderStyle* oldStyle, RenderStyle* newStyle); 658 void updateTransform(const RenderStyle* oldStyle, RenderStyle* newStyle);
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 766
764 OwnPtr<CompositedLayerMapping> m_compositedLayerMapping; 767 OwnPtr<CompositedLayerMapping> m_compositedLayerMapping;
765 OwnPtr<RenderLayerScrollableArea> m_scrollableArea; 768 OwnPtr<RenderLayerScrollableArea> m_scrollableArea;
766 769
767 CompositedLayerMapping* m_groupedMapping; 770 CompositedLayerMapping* m_groupedMapping;
768 771
769 RenderLayerRepainter m_repainter; 772 RenderLayerRepainter m_repainter;
770 RenderLayerClipper m_clipper; // FIXME: Lazily allocate? 773 RenderLayerClipper m_clipper; // FIXME: Lazily allocate?
771 OwnPtr<RenderLayerStackingNode> m_stackingNode; 774 OwnPtr<RenderLayerStackingNode> m_stackingNode;
772 OwnPtr<RenderLayerReflectionInfo> m_reflectionInfo; 775 OwnPtr<RenderLayerReflectionInfo> m_reflectionInfo;
776 OwnPtr<RenderLayerClipPathInfo> m_clipPathInfo;
773 RenderLayerBlendInfo m_blendInfo; 777 RenderLayerBlendInfo m_blendInfo;
774 778
775 LayoutSize m_subpixelAccumulation; // The accumulated subpixel offset of a c omposited layer's composited bounds compared to absolute coordinates. 779 LayoutSize m_subpixelAccumulation; // The accumulated subpixel offset of a c omposited layer's composited bounds compared to absolute coordinates.
776 }; 780 };
777 781
778 } // namespace blink 782 } // namespace blink
779 783
780 #ifndef NDEBUG 784 #ifndef NDEBUG
781 // Outside the WebCore namespace for ease of invocation from gdb. 785 // Outside the WebCore namespace for ease of invocation from gdb.
782 void showLayerTree(const blink::RenderLayer*); 786 void showLayerTree(const blink::RenderLayer*);
783 void showLayerTree(const blink::RenderObject*); 787 void showLayerTree(const blink::RenderObject*);
784 #endif 788 #endif
785 789
786 #endif // RenderLayer_h 790 #endif // RenderLayer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698