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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutFlowThread.cpp

Issue 1516683002: Introducing LayoutObject::mapToVisibleRectInContainerSpace (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Fix flipping logic Created 5 years 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) 2011 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above 8 * 1. Redistributions of source code must retain the above
9 * copyright notice, this list of conditions and the following 9 * copyright notice, this list of conditions and the following
10 * disclaimer. 10 * disclaimer.
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 m_columnSetsInvalidated = true; 92 m_columnSetsInvalidated = true;
93 } 93 }
94 94
95 void LayoutFlowThread::validateColumnSets() 95 void LayoutFlowThread::validateColumnSets()
96 { 96 {
97 m_columnSetsInvalidated = false; 97 m_columnSetsInvalidated = false;
98 updateLogicalWidth(); // Called to get the maximum logical width for the col umnSet. 98 updateLogicalWidth(); // Called to get the maximum logical width for the col umnSet.
99 generateColumnSetIntervalTree(); 99 generateColumnSetIntervalTree();
100 } 100 }
101 101
102 void LayoutFlowThread::mapRectToPaintInvalidationBacking(const LayoutBoxModelObj ect* paintInvalidationContainer, LayoutRect& rect, const PaintInvalidationState* paintInvalidationState) const 102 void LayoutFlowThread::mapToVisibleRectInContainerSpace(const LayoutBoxModelObje ct* paintInvalidationContainer, LayoutRect& rect, const PaintInvalidationState* paintInvalidationState) const
103 { 103 {
104 ASSERT(paintInvalidationContainer != this); // A flow thread should never be an invalidation container. 104 ASSERT(paintInvalidationContainer != this); // A flow thread should never be an invalidation container.
105 // |rect| is a layout rectangle, where the block direction coordinate is fli pped for writing 105 // |rect| is a layout rectangle, where the block direction coordinate is fli pped for writing
106 // mode. fragmentsBoundingBox(), on the other hand, works on physical rectan gles, so we need to 106 // mode. fragmentsBoundingBox(), on the other hand, works on physical rectan gles, so we need to
107 // flip the rectangle before and after calling it. 107 // flip the rectangle before and after calling it.
108 flipForWritingMode(rect); 108 flipForWritingMode(rect);
109 rect = fragmentsBoundingBox(rect); 109 rect = fragmentsBoundingBox(rect);
110 flipForWritingMode(rect); 110 flipForWritingMode(rect);
111 LayoutBlockFlow::mapRectToPaintInvalidationBacking(paintInvalidationContaine r, rect, paintInvalidationState); 111 LayoutBlockFlow::mapToVisibleRectInContainerSpace(paintInvalidationContainer , rect, paintInvalidationState);
112 } 112 }
113 113
114 void LayoutFlowThread::layout() 114 void LayoutFlowThread::layout()
115 { 115 {
116 m_pageLogicalSizeChanged = m_columnSetsInvalidated && everHadLayout(); 116 m_pageLogicalSizeChanged = m_columnSetsInvalidated && everHadLayout();
117 LayoutBlockFlow::layout(); 117 LayoutBlockFlow::layout();
118 m_pageLogicalSizeChanged = false; 118 m_pageLogicalSizeChanged = false;
119 } 119 }
120 120
121 void LayoutFlowThread::computeLogicalHeight(LayoutUnit, LayoutUnit logicalTop, L ogicalExtentComputedValues& computedValues) const 121 void LayoutFlowThread::computeLogicalHeight(LayoutUnit, LayoutUnit logicalTop, L ogicalExtentComputedValues& computedValues) const
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 197
198 void LayoutFlowThread::MultiColumnSetSearchAdapter::collectIfNeeded(const MultiC olumnSetInterval& interval) 198 void LayoutFlowThread::MultiColumnSetSearchAdapter::collectIfNeeded(const MultiC olumnSetInterval& interval)
199 { 199 {
200 if (m_result) 200 if (m_result)
201 return; 201 return;
202 if (interval.low() <= m_offset && interval.high() > m_offset) 202 if (interval.low() <= m_offset && interval.high() > m_offset)
203 m_result = interval.data(); 203 m_result = interval.data();
204 } 204 }
205 205
206 } // namespace blink 206 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutFlowThread.h ('k') | third_party/WebKit/Source/core/layout/LayoutInline.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698