OLD | NEW |
---|---|
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 Loading... | |
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 Loading... | |
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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
361 } | 361 } |
362 currentBlock->flipForWritingMode(blockRect); | 362 currentBlock->flipForWritingMode(blockRect); |
363 } | 363 } |
364 blockRect.moveBy(currentBlockLocation); | 364 blockRect.moveBy(currentBlockLocation); |
365 currentBlock = containerBlock; | 365 currentBlock = containerBlock; |
366 } | 366 } |
367 | 367 |
368 return currentBlock->isHorizontalWritingMode() ? blockRect.y() : blockRect.x (); | 368 return currentBlock->isHorizontalWritingMode() ? blockRect.y() : blockRect.x (); |
369 } | 369 } |
370 | 370 |
371 void RenderFlowThread::RegionSearchAdapter::collectIfNeeded(const MultiColumnSet Interval& interval) | |
mstensho (USE GERRIT)
2014/10/02 07:15:17
Still need this.
| |
372 { | |
373 if (m_result) | |
374 return; | |
375 if (interval.low() <= m_offset && interval.high() > m_offset) | |
376 m_result = interval.data(); | |
377 } | |
378 | |
379 CurrentRenderFlowThreadMaintainer::CurrentRenderFlowThreadMaintainer(RenderFlowT hread* renderFlowThread) | 371 CurrentRenderFlowThreadMaintainer::CurrentRenderFlowThreadMaintainer(RenderFlowT hread* renderFlowThread) |
380 : m_renderFlowThread(renderFlowThread) | 372 : m_renderFlowThread(renderFlowThread) |
381 , m_previousRenderFlowThread(0) | 373 , m_previousRenderFlowThread(0) |
382 { | 374 { |
383 if (!m_renderFlowThread) | 375 if (!m_renderFlowThread) |
384 return; | 376 return; |
385 RenderView* view = m_renderFlowThread->view(); | 377 RenderView* view = m_renderFlowThread->view(); |
386 m_previousRenderFlowThread = view->flowThreadController()->currentRenderFlow Thread(); | 378 m_previousRenderFlowThread = view->flowThreadController()->currentRenderFlow Thread(); |
387 view->flowThreadController()->setCurrentRenderFlowThread(m_renderFlowThread) ; | 379 view->flowThreadController()->setCurrentRenderFlowThread(m_renderFlowThread) ; |
388 } | 380 } |
389 | 381 |
390 CurrentRenderFlowThreadMaintainer::~CurrentRenderFlowThreadMaintainer() | 382 CurrentRenderFlowThreadMaintainer::~CurrentRenderFlowThreadMaintainer() |
391 { | 383 { |
392 if (!m_renderFlowThread) | 384 if (!m_renderFlowThread) |
393 return; | 385 return; |
394 RenderView* view = m_renderFlowThread->view(); | 386 RenderView* view = m_renderFlowThread->view(); |
395 ASSERT(view->flowThreadController()->currentRenderFlowThread() == m_renderFl owThread); | 387 ASSERT(view->flowThreadController()->currentRenderFlowThread() == m_renderFl owThread); |
396 view->flowThreadController()->setCurrentRenderFlowThread(m_previousRenderFlo wThread); | 388 view->flowThreadController()->setCurrentRenderFlowThread(m_previousRenderFlo wThread); |
397 } | 389 } |
398 | 390 |
399 | 391 |
400 } // namespace blink | 392 } // namespace blink |
OLD | NEW |