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

Side by Side Diff: Source/core/layout/Layer.h

Issue 926193003: Move rendering/RenderBox to layout/LayoutBox. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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
« no previous file with comments | « Source/core/layout/HitTestResult.cpp ('k') | Source/core/layout/Layer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #ifndef Layer_h 45 #ifndef Layer_h
46 #define Layer_h 46 #define Layer_h
47 47
48 #include "core/layout/LayerClipper.h" 48 #include "core/layout/LayerClipper.h"
49 #include "core/layout/LayerFilterInfo.h" 49 #include "core/layout/LayerFilterInfo.h"
50 #include "core/layout/LayerFragment.h" 50 #include "core/layout/LayerFragment.h"
51 #include "core/layout/LayerReflectionInfo.h" 51 #include "core/layout/LayerReflectionInfo.h"
52 #include "core/layout/LayerScrollableArea.h" 52 #include "core/layout/LayerScrollableArea.h"
53 #include "core/layout/LayerStackingNode.h" 53 #include "core/layout/LayerStackingNode.h"
54 #include "core/layout/LayerStackingNodeIterator.h" 54 #include "core/layout/LayerStackingNodeIterator.h"
55 #include "core/rendering/RenderBox.h" 55 #include "core/layout/LayoutBox.h"
56 #include "platform/graphics/CompositingReasons.h" 56 #include "platform/graphics/CompositingReasons.h"
57 #include "public/platform/WebBlendMode.h" 57 #include "public/platform/WebBlendMode.h"
58 #include "wtf/OwnPtr.h" 58 #include "wtf/OwnPtr.h"
59 59
60 namespace blink { 60 namespace blink {
61 61
62 class FilterEffectRenderer; 62 class FilterEffectRenderer;
63 class FilterOperations; 63 class FilterOperations;
64 class HitTestRequest; 64 class HitTestRequest;
65 class HitTestResult; 65 class HitTestResult;
(...skipping 21 matching lines...) Expand all
87 87
88 class Layer { 88 class Layer {
89 WTF_MAKE_NONCOPYABLE(Layer); 89 WTF_MAKE_NONCOPYABLE(Layer);
90 public: 90 public:
91 Layer(LayoutBoxModelObject*, LayerType); 91 Layer(LayoutBoxModelObject*, LayerType);
92 ~Layer(); 92 ~Layer();
93 93
94 String debugName() const; 94 String debugName() const;
95 95
96 LayoutBoxModelObject* renderer() const { return m_renderer; } 96 LayoutBoxModelObject* renderer() const { return m_renderer; }
97 RenderBox* renderBox() const { return m_renderer && m_renderer->isBox() ? to RenderBox(m_renderer) : 0; } 97 LayoutBox* layoutBox() const { return m_renderer && m_renderer->isBox() ? to LayoutBox(m_renderer) : 0; }
98 Layer* parent() const { return m_parent; } 98 Layer* parent() const { return m_parent; }
99 Layer* previousSibling() const { return m_previous; } 99 Layer* previousSibling() const { return m_previous; }
100 Layer* nextSibling() const { return m_next; } 100 Layer* nextSibling() const { return m_next; }
101 Layer* firstChild() const { return m_first; } 101 Layer* firstChild() const { return m_first; }
102 Layer* lastChild() const { return m_last; } 102 Layer* lastChild() const { return m_last; }
103 103
104 const Layer* compositingContainer() const; 104 const Layer* compositingContainer() const;
105 105
106 void addChild(Layer* newChild, Layer* beforeChild = 0); 106 void addChild(Layer* newChild, Layer* beforeChild = 0);
107 Layer* removeChild(Layer*); 107 Layer* removeChild(Layer*);
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 ASSERT(!m_hasSelfPaintingLayerDescendantDirty); 502 ASSERT(!m_hasSelfPaintingLayerDescendantDirty);
503 return m_hasSelfPaintingLayerDescendant; 503 return m_hasSelfPaintingLayerDescendant;
504 } 504 }
505 LayoutRect paintingExtent(const Layer* rootLayer, const LayoutRect& paintDir tyRect, const LayoutSize& subPixelAccumulation, PaintBehavior); 505 LayoutRect paintingExtent(const Layer* rootLayer, const LayoutRect& paintDir tyRect, const LayoutSize& subPixelAccumulation, PaintBehavior);
506 void appendSingleFragmentIgnoringPagination(LayerFragments&, const Layer* ro otLayer, const LayoutRect& dirtyRect, ClipRectsCacheSlot, OverlayScrollbarSizeRe levancy = IgnoreOverlayScrollbarSize, ShouldRespectOverflowClip = RespectOverflo wClip, const LayoutPoint* offsetFromRoot = 0, const LayoutSize& subPixelAccumula tion = LayoutSize()); 506 void appendSingleFragmentIgnoringPagination(LayerFragments&, const Layer* ro otLayer, const LayoutRect& dirtyRect, ClipRectsCacheSlot, OverlayScrollbarSizeRe levancy = IgnoreOverlayScrollbarSize, ShouldRespectOverflowClip = RespectOverflo wClip, const LayoutPoint* offsetFromRoot = 0, const LayoutSize& subPixelAccumula tion = LayoutSize());
507 void collectFragments(LayerFragments&, const Layer* rootLayer, const LayoutR ect& dirtyRect, 507 void collectFragments(LayerFragments&, const Layer* rootLayer, const LayoutR ect& dirtyRect,
508 ClipRectsCacheSlot, OverlayScrollbarSizeRelevancy inOverlayScrollbarSize Relevancy = IgnoreOverlayScrollbarSize, 508 ClipRectsCacheSlot, OverlayScrollbarSizeRelevancy inOverlayScrollbarSize Relevancy = IgnoreOverlayScrollbarSize,
509 ShouldRespectOverflowClip = RespectOverflowClip, const LayoutPoint* offs etFromRoot = 0, 509 ShouldRespectOverflowClip = RespectOverflowClip, const LayoutPoint* offs etFromRoot = 0,
510 const LayoutSize& subPixelAccumulation = LayoutSize(), const LayoutRect* layerBoundingBox = 0); 510 const LayoutSize& subPixelAccumulation = LayoutSize(), const LayoutRect* layerBoundingBox = 0);
511 511
512 LayoutPoint renderBoxLocation() const { return renderer()->isBox() ? toRende rBox(renderer())->location() : LayoutPoint(); } 512 LayoutPoint layoutBoxLocation() const { return renderer()->isBox() ? toLayou tBox(renderer())->location() : LayoutPoint(); }
513 513
514 enum TransparencyClipBoxBehavior { 514 enum TransparencyClipBoxBehavior {
515 PaintingTransparencyClipBox, 515 PaintingTransparencyClipBox,
516 HitTestingTransparencyClipBox 516 HitTestingTransparencyClipBox
517 }; 517 };
518 518
519 enum TransparencyClipBoxMode { 519 enum TransparencyClipBoxMode {
520 DescendantsOfTransparencyClipBox, 520 DescendantsOfTransparencyClipBox,
521 RootOfTransparencyClipBox 521 RootOfTransparencyClipBox
522 }; 522 };
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 576
577 bool shouldBeSelfPaintingLayer() const; 577 bool shouldBeSelfPaintingLayer() const;
578 578
579 // FIXME: We should only create the stacking node if needed. 579 // FIXME: We should only create the stacking node if needed.
580 bool requiresStackingNode() const { return true; } 580 bool requiresStackingNode() const { return true; }
581 void updateStackingNode(); 581 void updateStackingNode();
582 582
583 void updateReflectionInfo(const LayoutStyle*); 583 void updateReflectionInfo(const LayoutStyle*);
584 584
585 // FIXME: We could lazily allocate our ScrollableArea based on style propert ies ('overflow', ...) 585 // FIXME: We could lazily allocate our ScrollableArea based on style propert ies ('overflow', ...)
586 // but for now, we are always allocating it for RenderBox as it's safer. 586 // but for now, we are always allocating it for LayoutBox as it's safer.
587 bool requiresScrollableArea() const { return renderBox(); } 587 bool requiresScrollableArea() const { return layoutBox(); }
588 void updateScrollableArea(); 588 void updateScrollableArea();
589 589
590 void dirtyAncestorChainVisibleDescendantStatus(); 590 void dirtyAncestorChainVisibleDescendantStatus();
591 591
592 bool attemptDirectCompositingUpdate(StyleDifference, const LayoutStyle* oldS tyle); 592 bool attemptDirectCompositingUpdate(StyleDifference, const LayoutStyle* oldS tyle);
593 void updateTransform(const LayoutStyle* oldStyle, const LayoutStyle& newStyl e); 593 void updateTransform(const LayoutStyle* oldStyle, const LayoutStyle& newStyl e);
594 594
595 void dirty3DTransformedDescendantStatus(); 595 void dirty3DTransformedDescendantStatus();
596 // Both updates the status, and returns true if descendants of this have 3d. 596 // Both updates the status, and returns true if descendants of this have 3d.
597 bool update3DTransformedDescendantStatus(); 597 bool update3DTransformedDescendantStatus();
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 717
718 } // namespace blink 718 } // namespace blink
719 719
720 #ifndef NDEBUG 720 #ifndef NDEBUG
721 // Outside the WebCore namespace for ease of invocation from gdb. 721 // Outside the WebCore namespace for ease of invocation from gdb.
722 void showLayerTree(const blink::Layer*); 722 void showLayerTree(const blink::Layer*);
723 void showLayerTree(const blink::LayoutObject*); 723 void showLayerTree(const blink::LayoutObject*);
724 #endif 724 #endif
725 725
726 #endif // Layer_h 726 #endif // Layer_h
OLDNEW
« no previous file with comments | « Source/core/layout/HitTestResult.cpp ('k') | Source/core/layout/Layer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698