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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/rendering/RenderLayer.h
diff --git a/Source/core/rendering/RenderLayer.h b/Source/core/rendering/RenderLayer.h
index 9c8e84886ffed85c0ada141630e03023e528798b..78ca5ab054993a41746332ea44d08901395f5592 100644
--- a/Source/core/rendering/RenderLayer.h
+++ b/Source/core/rendering/RenderLayer.h
@@ -215,6 +215,11 @@ public:
void convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutPoint&) const;
void convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutRect&) const;
+ // Does the same as convertToLayerCoords() when not in multicol. For multicol, however,
+ // convertToLayerCoords() calculates the offset in flow-thread coordinates (what the layout
+ // engine uses internally), while this method calculates the visual coordinates; i.e. it figures
+ // out which column the layer starts in and adds in the offset. See
+ // http://www.chromium.org/developers/design-documents/multi-column-layout for more info.
LayoutPoint visualOffsetFromAncestor(const RenderLayer* ancestorLayer) const;
// The hitTest() method looks for mouse events by walking layers that intersect the point from front to back.
@@ -676,6 +681,13 @@ private:
OwnPtr<TransformationMatrix> m_transform;
// Pointer to the enclosing RenderLayer that caused us to be paginated. It is 0 if we are not paginated.
+ //
+ // See RenderMultiColumnFlowThread and
+ // https://sites.google.com/a/chromium.org/dev/developers/design-documents/multi-column-layout
+ // for more information about the multicol implementation. It's important to understand the
+ // difference between flow thread coordinates and visual coordinates when working with multicol
+ // in RenderLayer, since RenderLayer is one of the few places where we have to worry about the
+ // visual ones. Internally we try to use flow-thread coordinates whenever possible.
RenderLayer* m_enclosingPaginationLayer;
// These compositing reasons are updated whenever style changes, not while updating compositing layers.
« 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