OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 #endif | 294 #endif |
295 m_layoutState = 0; | 295 m_layoutState = 0; |
296 setNeedsLayout(false); | 296 setNeedsLayout(false); |
297 | 297 |
298 if (isSeamlessAncestorInFlowThread) | 298 if (isSeamlessAncestorInFlowThread) |
299 flowThreadController()->setCurrentRenderFlowThread(0); | 299 flowThreadController()->setCurrentRenderFlowThread(0); |
300 } | 300 } |
301 | 301 |
302 void RenderView::mapLocalToContainer(const RenderLayerModelObject* repaintContai
ner, TransformState& transformState, MapCoordinatesFlags mode, bool* wasFixed) c
onst | 302 void RenderView::mapLocalToContainer(const RenderLayerModelObject* repaintContai
ner, TransformState& transformState, MapCoordinatesFlags mode, bool* wasFixed) c
onst |
303 { | 303 { |
304 // If a container was specified, and was not 0 or the RenderView, | |
305 // then we should have found it by now. | |
306 ASSERT_ARG(repaintContainer, !repaintContainer || repaintContainer == this); | |
307 ASSERT_UNUSED(wasFixed, !wasFixed || *wasFixed == (mode & IsFixed)); | 304 ASSERT_UNUSED(wasFixed, !wasFixed || *wasFixed == (mode & IsFixed)); |
308 | 305 |
309 if (!repaintContainer && mode & UseTransforms && shouldUseTransformFromConta
iner(0)) { | 306 if (!repaintContainer && mode & UseTransforms && shouldUseTransformFromConta
iner(0)) { |
310 TransformationMatrix t; | 307 TransformationMatrix t; |
311 getTransformFromContainer(0, LayoutSize(), t); | 308 getTransformFromContainer(0, LayoutSize(), t); |
312 transformState.applyTransform(t); | 309 transformState.applyTransform(t); |
313 } | 310 } |
314 | 311 |
315 if (mode & IsFixed && m_frameView) | 312 if (mode & IsFixed && m_frameView) |
316 transformState.move(m_frameView->scrollOffsetForFixedPosition()); | 313 transformState.move(m_frameView->scrollOffsetForFixedPosition()); |
| 314 |
| 315 if (repaintContainer == this) |
| 316 return; |
| 317 |
| 318 if (mode & TraverseDocumentBoundaries) { |
| 319 if (RenderObject* parentDocRenderer = frame()->ownerRenderer()) { |
| 320 transformState.move(-frame()->view()->scrollOffset()); |
| 321 if (parentDocRenderer->isBox()) |
| 322 transformState.move(toLayoutSize(toRenderBox(parentDocRenderer)-
>contentBoxRect().location())); |
| 323 parentDocRenderer->mapLocalToContainer(repaintContainer, transformSt
ate, mode, wasFixed); |
| 324 return; |
| 325 } |
| 326 } |
| 327 |
| 328 // If a container was specified, and was not 0 or the RenderView, |
| 329 // then we should have found it by now. |
| 330 ASSERT_ARG(repaintContainer, !repaintContainer); |
317 } | 331 } |
318 | 332 |
319 const RenderObject* RenderView::pushMappingToContainer(const RenderLayerModelObj
ect* ancestorToStopAt, RenderGeometryMap& geometryMap) const | 333 const RenderObject* RenderView::pushMappingToContainer(const RenderLayerModelObj
ect* ancestorToStopAt, RenderGeometryMap& geometryMap) const |
320 { | 334 { |
321 // If a container was specified, and was not 0 or the RenderView, | 335 // If a container was specified, and was not 0 or the RenderView, |
322 // then we should have found it by now. | 336 // then we should have found it by now. |
323 ASSERT_ARG(ancestorToStopAt, !ancestorToStopAt || ancestorToStopAt == this); | 337 ASSERT_ARG(ancestorToStopAt, !ancestorToStopAt || ancestorToStopAt == this); |
324 | 338 |
325 LayoutSize scrollOffset; | 339 LayoutSize scrollOffset; |
326 | 340 |
(...skipping 15 matching lines...) Expand all Loading... |
342 if (mode & IsFixed && m_frameView) | 356 if (mode & IsFixed && m_frameView) |
343 transformState.move(m_frameView->scrollOffsetForFixedPosition()); | 357 transformState.move(m_frameView->scrollOffsetForFixedPosition()); |
344 | 358 |
345 if (mode & UseTransforms && shouldUseTransformFromContainer(0)) { | 359 if (mode & UseTransforms && shouldUseTransformFromContainer(0)) { |
346 TransformationMatrix t; | 360 TransformationMatrix t; |
347 getTransformFromContainer(0, LayoutSize(), t); | 361 getTransformFromContainer(0, LayoutSize(), t); |
348 transformState.applyTransform(t); | 362 transformState.applyTransform(t); |
349 } | 363 } |
350 } | 364 } |
351 | 365 |
| 366 void RenderView::computeSelfHitTestRects(Vector<LayoutRect>& rects, const Layout
Point&) const |
| 367 { |
| 368 // Record the entire size of the contents of the frame. Note that we don't j
ust |
| 369 // use the viewport size (containing block) here because we want to ensure t
his includes |
| 370 // all children (so we can avoid walking them explicitly). |
| 371 rects.append(LayoutRect(LayoutPoint::zero(), frameView()->contentsSize())); |
| 372 } |
| 373 |
352 bool RenderView::requiresColumns(int desiredColumnCount) const | 374 bool RenderView::requiresColumns(int desiredColumnCount) const |
353 { | 375 { |
354 if (m_frameView) | 376 if (m_frameView) |
355 return m_frameView->pagination().mode != Pagination::Unpaginated; | 377 return m_frameView->pagination().mode != Pagination::Unpaginated; |
356 | 378 |
357 return RenderBlock::requiresColumns(desiredColumnCount); | 379 return RenderBlock::requiresColumns(desiredColumnCount); |
358 } | 380 } |
359 | 381 |
360 void RenderView::calcColumnWidth() | 382 void RenderView::calcColumnWidth() |
361 { | 383 { |
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1126 #endif | 1148 #endif |
1127 | 1149 |
1128 if (layoutState) | 1150 if (layoutState) |
1129 layoutState->m_isPaginated = m_fragmenting; | 1151 layoutState->m_isPaginated = m_fragmenting; |
1130 | 1152 |
1131 if (m_flowThreadState != RenderObject::NotInsideFlowThread) | 1153 if (m_flowThreadState != RenderObject::NotInsideFlowThread) |
1132 m_root->setFlowThreadStateIncludingDescendants(m_flowThreadState); | 1154 m_root->setFlowThreadStateIncludingDescendants(m_flowThreadState); |
1133 } | 1155 } |
1134 | 1156 |
1135 } // namespace WebCore | 1157 } // namespace WebCore |
OLD | NEW |