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

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: Try to correct A+ mode 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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 { 379 {
379 if (hasFilterInfo()) 380 if (hasFilterInfo())
380 RenderLayerFilterInfo::removeFilterInfoForRenderLayer(this); 381 RenderLayerFilterInfo::removeFilterInfoForRenderLayer(this);
381 } 382 }
382 383
383 bool hasFilterInfo() const { return m_hasFilterInfo; } 384 bool hasFilterInfo() const { return m_hasFilterInfo; }
384 void setHasFilterInfo(bool hasFilterInfo) { m_hasFilterInfo = hasFilterInfo; } 385 void setHasFilterInfo(bool hasFilterInfo) { m_hasFilterInfo = hasFilterInfo; }
385 386
386 void updateFilters(const RenderStyle* oldStyle, const RenderStyle* newStyle) ; 387 void updateFilters(const RenderStyle* oldStyle, const RenderStyle* newStyle) ;
387 388
389 bool hasClipPath() const
390 {
391 return renderer()->hasClipPath();
392 }
393 bool hasClipPathInfo() const
394 {
395 return m_hasClipPathInfo;
396 }
397 void setHasClipPathInfo(bool hasClipPathInfo)
398 {
399 m_hasClipPathInfo = hasClipPathInfo;
400 }
401 void updateClipPath(const RenderStyle* oldStyle, const RenderStyle* newStyle );
402 void removeClipPathInfoIfNeeded()
403 {
404 if (hasClipPathInfo())
405 RenderLayerClipPathInfo::removeClipPathInfoForRenderLayer(this);
406 }
407 RenderLayerClipPathInfo* clipPathInfo() const
408 {
409 return hasClipPathInfo() ? RenderLayerClipPathInfo::clipPathInfoForRende rLayer(this) : 0;
410 }
411 RenderLayerClipPathInfo* ensureClipPathInfo()
412 {
413 return RenderLayerClipPathInfo::createClipPathInfoForRenderLayerIfNeeded (this);
414 }
415
388 Node* enclosingElement() const; 416 Node* enclosingElement() const;
389 417
390 bool isInTopLayer() const; 418 bool isInTopLayer() const;
391 419
392 enum ViewportConstrainedNotCompositedReason { 420 enum ViewportConstrainedNotCompositedReason {
393 NoNotCompositedReason = 0, 421 NoNotCompositedReason = 0,
394 NotCompositedForBoundsOutOfView, 422 NotCompositedForBoundsOutOfView,
395 NotCompositedForNonViewContainer, 423 NotCompositedForNonViewContainer,
396 NotCompositedForNoVisibleContent, 424 NotCompositedForNoVisibleContent,
397 NotCompositedForUnscrollableAncestors, 425 NotCompositedForUnscrollableAncestors,
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 void setAncestorChainHasVisibleDescendant(); 680 void setAncestorChainHasVisibleDescendant();
653 681
654 bool attemptDirectCompositingUpdate(StyleDifference, const RenderStyle* oldS tyle); 682 bool attemptDirectCompositingUpdate(StyleDifference, const RenderStyle* oldS tyle);
655 void updateTransform(const RenderStyle* oldStyle, RenderStyle* newStyle); 683 void updateTransform(const RenderStyle* oldStyle, RenderStyle* newStyle);
656 684
657 void dirty3DTransformedDescendantStatus(); 685 void dirty3DTransformedDescendantStatus();
658 // Both updates the status, and returns true if descendants of this have 3d. 686 // Both updates the status, and returns true if descendants of this have 3d.
659 bool update3DTransformedDescendantStatus(); 687 bool update3DTransformedDescendantStatus();
660 688
661 void updateOrRemoveFilterClients(); 689 void updateOrRemoveFilterClients();
690 void updateOrRemoveClipPathClients();
662 691
663 LayoutRect paintingExtent(const RenderLayer* rootLayer, const LayoutRect& pa intDirtyRect, const LayoutSize& subPixelAccumulation, PaintBehavior); 692 LayoutRect paintingExtent(const RenderLayer* rootLayer, const LayoutRect& pa intDirtyRect, const LayoutSize& subPixelAccumulation, PaintBehavior);
664 693
665 void updatePagination(); 694 void updatePagination();
666 695
667 // FIXME: Temporary. Remove when new columns come online. 696 // FIXME: Temporary. Remove when new columns come online.
668 bool useRegionBasedColumns() const; 697 bool useRegionBasedColumns() const;
669 698
670 LayerType m_layerType; 699 LayerType m_layerType;
671 700
(...skipping 23 matching lines...) Expand all
695 unsigned m_isPaginated : 1; // If we think this layer is split by a multi-co lumn ancestor, then this bit will be set. 724 unsigned m_isPaginated : 1; // If we think this layer is split by a multi-co lumn ancestor, then this bit will be set.
696 725
697 unsigned m_3DTransformedDescendantStatusDirty : 1; 726 unsigned m_3DTransformedDescendantStatusDirty : 1;
698 // Set on a stacking context layer that has 3D descendants anywhere 727 // Set on a stacking context layer that has 3D descendants anywhere
699 // in a preserves3D hierarchy. Hint to do 3D-aware hit testing. 728 // in a preserves3D hierarchy. Hint to do 3D-aware hit testing.
700 unsigned m_has3DTransformedDescendant : 1; 729 unsigned m_has3DTransformedDescendant : 1;
701 730
702 unsigned m_containsDirtyOverlayScrollbars : 1; 731 unsigned m_containsDirtyOverlayScrollbars : 1;
703 732
704 unsigned m_hasFilterInfo : 1; 733 unsigned m_hasFilterInfo : 1;
734 unsigned m_hasClipPathInfo : 1;
705 unsigned m_needsAncestorDependentCompositingInputsUpdate : 1; 735 unsigned m_needsAncestorDependentCompositingInputsUpdate : 1;
706 unsigned m_needsDescendantDependentCompositingInputsUpdate : 1; 736 unsigned m_needsDescendantDependentCompositingInputsUpdate : 1;
707 unsigned m_childNeedsCompositingInputsUpdate : 1; 737 unsigned m_childNeedsCompositingInputsUpdate : 1;
708 738
709 // Used only while determining what layers should be composited. Applies to the tree of z-order lists. 739 // Used only while determining what layers should be composited. Applies to the tree of z-order lists.
710 unsigned m_hasCompositingDescendant : 1; 740 unsigned m_hasCompositingDescendant : 1;
711 741
712 // Applies to the real render layer tree (i.e., the tree determined by the l ayer's parent and children and 742 // Applies to the real render layer tree (i.e., the tree determined by the l ayer's parent and children and
713 // as opposed to the tree formed by the z-order and normal flow lists). 743 // as opposed to the tree formed by the z-order and normal flow lists).
714 unsigned m_hasNonCompositedChild : 1; 744 unsigned m_hasNonCompositedChild : 1;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 807
778 } // namespace blink 808 } // namespace blink
779 809
780 #ifndef NDEBUG 810 #ifndef NDEBUG
781 // Outside the WebCore namespace for ease of invocation from gdb. 811 // Outside the WebCore namespace for ease of invocation from gdb.
782 void showLayerTree(const blink::RenderLayer*); 812 void showLayerTree(const blink::RenderLayer*);
783 void showLayerTree(const blink::RenderObject*); 813 void showLayerTree(const blink::RenderObject*);
784 #endif 814 #endif
785 815
786 #endif // RenderLayer_h 816 #endif // RenderLayer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698