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

Side by Side Diff: Source/core/rendering/RenderFlowThread.cpp

Issue 620753006: Rendering API cleanup (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address jchaffraix remarks Created 6 years, 2 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) 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 m_pageLogicalSizeChanged = false; 132 m_pageLogicalSizeChanged = false;
133 } 133 }
134 134
135 void RenderFlowThread::computeLogicalHeight(LayoutUnit, LayoutUnit logicalTop, L ogicalExtentComputedValues& computedValues) const 135 void RenderFlowThread::computeLogicalHeight(LayoutUnit, LayoutUnit logicalTop, L ogicalExtentComputedValues& computedValues) const
136 { 136 {
137 computedValues.m_position = logicalTop; 137 computedValues.m_position = logicalTop;
138 computedValues.m_extent = 0; 138 computedValues.m_extent = 0;
139 139
140 for (RenderMultiColumnSetList::const_iterator iter = m_multiColumnSetList.be gin(); iter != m_multiColumnSetList.end(); ++iter) { 140 for (RenderMultiColumnSetList::const_iterator iter = m_multiColumnSetList.be gin(); iter != m_multiColumnSetList.end(); ++iter) {
141 RenderMultiColumnSet* columnSet = *iter; 141 RenderMultiColumnSet* columnSet = *iter;
142 computedValues.m_extent += columnSet->logicalHeightOfAllFlowThreadConten t(); 142 computedValues.m_extent += columnSet->logicalHeightInFlowThread();
143 } 143 }
144 } 144 }
145 145
146 bool RenderFlowThread::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumula tedOffset, HitTestAction hitTestAction) 146 bool RenderFlowThread::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumula tedOffset, HitTestAction hitTestAction)
147 { 147 {
148 if (hitTestAction == HitTestBlockBackground) 148 if (hitTestAction == HitTestBlockBackground)
149 return false; 149 return false;
150 return RenderBlockFlow::nodeAtPoint(request, result, locationInContainer, ac cumulatedOffset, hitTestAction); 150 return RenderBlockFlow::nodeAtPoint(request, result, locationInContainer, ac cumulatedOffset, hitTestAction);
151 } 151 }
152 152
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 void RenderFlowThread::updateRegionsFlowThreadPortionRect() 218 void RenderFlowThread::updateRegionsFlowThreadPortionRect()
219 { 219 {
220 LayoutUnit logicalHeight = 0; 220 LayoutUnit logicalHeight = 0;
221 // FIXME: Optimize not to clear the interval all the time. This implies manu ally managing the tree nodes lifecycle. 221 // FIXME: Optimize not to clear the interval all the time. This implies manu ally managing the tree nodes lifecycle.
222 m_multiColumnSetIntervalTree.clear(); 222 m_multiColumnSetIntervalTree.clear();
223 m_multiColumnSetIntervalTree.initIfNeeded(); 223 m_multiColumnSetIntervalTree.initIfNeeded();
224 for (RenderMultiColumnSetList::iterator iter = m_multiColumnSetList.begin(); iter != m_multiColumnSetList.end(); ++iter) { 224 for (RenderMultiColumnSetList::iterator iter = m_multiColumnSetList.begin(); iter != m_multiColumnSetList.end(); ++iter) {
225 RenderMultiColumnSet* columnSet = *iter; 225 RenderMultiColumnSet* columnSet = *iter;
226 226
227 LayoutUnit columnSetLogicalWidth = columnSet->pageLogicalWidth(); 227 LayoutUnit columnSetLogicalWidth = columnSet->pageLogicalWidth();
228 LayoutUnit columnSetLogicalHeight = std::min<LayoutUnit>(RenderFlowThrea d::maxLogicalHeight() - logicalHeight, columnSet->logicalHeightOfAllFlowThreadCo ntent()); 228 LayoutUnit columnSetLogicalHeight = std::min<LayoutUnit>(RenderFlowThrea d::maxLogicalHeight() - logicalHeight, columnSet->logicalHeightInFlowThread());
229 229
230 LayoutRect columnSetRect(style()->direction() == LTR ? LayoutUnit() : lo gicalWidth() - columnSetLogicalWidth, logicalHeight, columnSetLogicalWidth, colu mnSetLogicalHeight); 230 LayoutRect columnSetRect(style()->direction() == LTR ? LayoutUnit() : lo gicalWidth() - columnSetLogicalWidth, logicalHeight, columnSetLogicalWidth, colu mnSetLogicalHeight);
231 231
232 columnSet->setFlowThreadPortionRect(isHorizontalWritingMode() ? columnSe tRect : columnSetRect.transposedRect()); 232 columnSet->setFlowThreadPortionRect(isHorizontalWritingMode() ? columnSe tRect : columnSetRect.transposedRect());
233 233
234 m_multiColumnSetIntervalTree.add(MultiColumnSetIntervalTree::createInter val(logicalHeight, logicalHeight + columnSetLogicalHeight, columnSet)); 234 m_multiColumnSetIntervalTree.add(MultiColumnSetIntervalTree::createInter val(logicalHeight, logicalHeight + columnSetLogicalHeight, columnSet));
235 235
236 logicalHeight += columnSetLogicalHeight; 236 logicalHeight += columnSetLogicalHeight;
237 } 237 }
238 } 238 }
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 { 391 {
392 if (!m_renderFlowThread) 392 if (!m_renderFlowThread)
393 return; 393 return;
394 RenderView* view = m_renderFlowThread->view(); 394 RenderView* view = m_renderFlowThread->view();
395 ASSERT(view->flowThreadController()->currentRenderFlowThread() == m_renderFl owThread); 395 ASSERT(view->flowThreadController()->currentRenderFlowThread() == m_renderFl owThread);
396 view->flowThreadController()->setCurrentRenderFlowThread(m_previousRenderFlo wThread); 396 view->flowThreadController()->setCurrentRenderFlowThread(m_previousRenderFlo wThread);
397 } 397 }
398 398
399 399
400 } // namespace blink 400 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698