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

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

Issue 816683002: [New Multicolumn] Minimal support for nested multicol in RenderLayer. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: code review - more links. Created 5 years, 11 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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 208
209 bool canUseConvertToLayerCoords() const 209 bool canUseConvertToLayerCoords() const
210 { 210 {
211 // These RenderObjects have an impact on their layers without the render ers knowing about it. 211 // These RenderObjects have an impact on their layers without the render ers knowing about it.
212 return !renderer()->hasColumns() && !renderer()->hasTransformRelatedProp erty() && !renderer()->isSVGRoot(); 212 return !renderer()->hasColumns() && !renderer()->hasTransformRelatedProp erty() && !renderer()->isSVGRoot();
213 } 213 }
214 214
215 void convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutPoint&) co nst; 215 void convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutPoint&) co nst;
216 void convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutRect&) con st; 216 void convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutRect&) con st;
217 217
218 // Does the same as convertToLayerCoords() when not in multicol. For multico l, however,
219 // convertToLayerCoords() calculates the offset in flow-thread coordinates ( what the layout
220 // engine uses internally), while this method calculates the visual coordina tes; i.e. it figures
221 // out which column the layer starts in and adds in the offset. See
222 // http://www.chromium.org/developers/design-documents/multi-column-layout f or more info.
218 LayoutPoint visualOffsetFromAncestor(const RenderLayer* ancestorLayer) const ; 223 LayoutPoint visualOffsetFromAncestor(const RenderLayer* ancestorLayer) const ;
219 224
220 // The hitTest() method looks for mouse events by walking layers that inters ect the point from front to back. 225 // The hitTest() method looks for mouse events by walking layers that inters ect the point from front to back.
221 bool hitTest(const HitTestRequest&, HitTestResult&); 226 bool hitTest(const HitTestRequest&, HitTestResult&);
222 bool hitTest(const HitTestRequest&, const HitTestLocation&, HitTestResult&); 227 bool hitTest(const HitTestRequest&, const HitTestLocation&, HitTestResult&);
223 228
224 // Pass offsetFromRoot if known. 229 // Pass offsetFromRoot if known.
225 bool intersectsDamageRect(const LayoutRect& layerBounds, const LayoutRect& d amageRect, const RenderLayer* rootLayer, const LayoutPoint* offsetFromRoot = 0) const; 230 bool intersectsDamageRect(const LayoutRect& layerBounds, const LayoutRect& d amageRect, const RenderLayer* rootLayer, const LayoutPoint* offsetFromRoot = 0) const;
226 231
227 // Bounding box relative to some ancestor layer. Pass offsetFromRoot if know n. 232 // Bounding box relative to some ancestor layer. Pass offsetFromRoot if know n.
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 // The layer's width/height 674 // The layer's width/height
670 IntSize m_size; 675 IntSize m_size;
671 676
672 // Cached normal flow values for absolute positioned elements with static le ft/top values. 677 // Cached normal flow values for absolute positioned elements with static le ft/top values.
673 LayoutUnit m_staticInlinePosition; 678 LayoutUnit m_staticInlinePosition;
674 LayoutUnit m_staticBlockPosition; 679 LayoutUnit m_staticBlockPosition;
675 680
676 OwnPtr<TransformationMatrix> m_transform; 681 OwnPtr<TransformationMatrix> m_transform;
677 682
678 // Pointer to the enclosing RenderLayer that caused us to be paginated. It i s 0 if we are not paginated. 683 // Pointer to the enclosing RenderLayer that caused us to be paginated. It i s 0 if we are not paginated.
684 //
685 // See RenderMultiColumnFlowThread and
686 // https://sites.google.com/a/chromium.org/dev/developers/design-documents/m ulti-column-layout
687 // for more information about the multicol implementation. It's important to understand the
688 // difference between flow thread coordinates and visual coordinates when wo rking with multicol
689 // in RenderLayer, since RenderLayer is one of the few places where we have to worry about the
690 // visual ones. Internally we try to use flow-thread coordinates whenever po ssible.
679 RenderLayer* m_enclosingPaginationLayer; 691 RenderLayer* m_enclosingPaginationLayer;
680 692
681 // These compositing reasons are updated whenever style changes, not while u pdating compositing layers. 693 // These compositing reasons are updated whenever style changes, not while u pdating compositing layers.
682 // They should not be used to infer the compositing state of this layer. 694 // They should not be used to infer the compositing state of this layer.
683 CompositingReasons m_potentialCompositingReasonsFromStyle; 695 CompositingReasons m_potentialCompositingReasonsFromStyle;
684 696
685 // Once computed, indicates all that a layer needs to become composited usin g the CompositingReasons enum bitfield. 697 // Once computed, indicates all that a layer needs to become composited usin g the CompositingReasons enum bitfield.
686 CompositingReasons m_compositingReasons; 698 CompositingReasons m_compositingReasons;
687 699
688 DescendantDependentCompositingInputs m_descendantDependentCompositingInputs; 700 DescendantDependentCompositingInputs m_descendantDependentCompositingInputs;
(...skipping 15 matching lines...) Expand all
704 716
705 } // namespace blink 717 } // namespace blink
706 718
707 #ifndef NDEBUG 719 #ifndef NDEBUG
708 // Outside the WebCore namespace for ease of invocation from gdb. 720 // Outside the WebCore namespace for ease of invocation from gdb.
709 void showLayerTree(const blink::RenderLayer*); 721 void showLayerTree(const blink::RenderLayer*);
710 void showLayerTree(const blink::RenderObject*); 722 void showLayerTree(const blink::RenderObject*);
711 #endif 723 #endif
712 724
713 #endif // RenderLayer_h 725 #endif // RenderLayer_h
OLDNEW
« no previous file with comments | « LayoutTests/fast/multicol/inner-multicol-in-second-column-expected.html ('k') | Source/core/rendering/RenderLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698