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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 m_pageLogicalHeightChanged = false; | 221 m_pageLogicalHeightChanged = false; |
222 | 222 |
223 layoutContent(); | 223 layoutContent(); |
224 | 224 |
225 #if ENABLE(ASSERT) | 225 #if ENABLE(ASSERT) |
226 checkLayoutState(); | 226 checkLayoutState(); |
227 #endif | 227 #endif |
228 clearNeedsLayout(); | 228 clearNeedsLayout(); |
229 } | 229 } |
230 | 230 |
231 void RenderView::mapLocalToContainer(const LayoutLayerModelObject* paintInvalida
tionContainer, TransformState& transformState, MapCoordinatesFlags mode, bool* w
asFixed, const PaintInvalidationState* paintInvalidationState) const | 231 void RenderView::mapLocalToContainer(const LayoutBoxModelObject* paintInvalidati
onContainer, TransformState& transformState, MapCoordinatesFlags mode, bool* was
Fixed, const PaintInvalidationState* paintInvalidationState) const |
232 { | 232 { |
233 ASSERT_UNUSED(wasFixed, !wasFixed || *wasFixed == static_cast<bool>(mode & I
sFixed)); | 233 ASSERT_UNUSED(wasFixed, !wasFixed || *wasFixed == static_cast<bool>(mode & I
sFixed)); |
234 | 234 |
235 if (!paintInvalidationContainer && mode & UseTransforms && shouldUseTransfor
mFromContainer(0)) { | 235 if (!paintInvalidationContainer && mode & UseTransforms && shouldUseTransfor
mFromContainer(0)) { |
236 TransformationMatrix t; | 236 TransformationMatrix t; |
237 getTransformFromContainer(0, LayoutSize(), t); | 237 getTransformFromContainer(0, LayoutSize(), t); |
238 transformState.applyTransform(t); | 238 transformState.applyTransform(t); |
239 } | 239 } |
240 | 240 |
241 if ((mode & IsFixed) && m_frameView) { | 241 if ((mode & IsFixed) && m_frameView) { |
242 transformState.move(m_frameView->scrollOffsetForViewportConstrainedObjec
ts()); | 242 transformState.move(m_frameView->scrollOffsetForViewportConstrainedObjec
ts()); |
243 // IsFixed flag is only applicable within this RenderView. | 243 // IsFixed flag is only applicable within this RenderView. |
244 mode &= ~IsFixed; | 244 mode &= ~IsFixed; |
245 } | 245 } |
246 | 246 |
247 if (paintInvalidationContainer == this) | 247 if (paintInvalidationContainer == this) |
248 return; | 248 return; |
249 | 249 |
250 if (mode & TraverseDocumentBoundaries) { | 250 if (mode & TraverseDocumentBoundaries) { |
251 if (LayoutObject* parentDocRenderer = frame()->ownerRenderer()) { | 251 if (LayoutObject* parentDocRenderer = frame()->ownerRenderer()) { |
252 transformState.move(-frame()->view()->scrollOffset()); | 252 transformState.move(-frame()->view()->scrollOffset()); |
253 if (parentDocRenderer->isBox()) | 253 if (parentDocRenderer->isBox()) |
254 transformState.move(toRenderBox(parentDocRenderer)->contentBoxOf
fset()); | 254 transformState.move(toRenderBox(parentDocRenderer)->contentBoxOf
fset()); |
255 parentDocRenderer->mapLocalToContainer(paintInvalidationContainer, t
ransformState, mode, wasFixed, paintInvalidationState); | 255 parentDocRenderer->mapLocalToContainer(paintInvalidationContainer, t
ransformState, mode, wasFixed, paintInvalidationState); |
256 return; | 256 return; |
257 } | 257 } |
258 } | 258 } |
259 } | 259 } |
260 | 260 |
261 const LayoutObject* RenderView::pushMappingToContainer(const LayoutLayerModelObj
ect* ancestorToStopAt, LayoutGeometryMap& geometryMap) const | 261 const LayoutObject* RenderView::pushMappingToContainer(const LayoutBoxModelObjec
t* ancestorToStopAt, LayoutGeometryMap& geometryMap) const |
262 { | 262 { |
263 LayoutSize offsetForFixedPosition; | 263 LayoutSize offsetForFixedPosition; |
264 LayoutSize offset; | 264 LayoutSize offset; |
265 LayoutObject* container = 0; | 265 LayoutObject* container = 0; |
266 | 266 |
267 if (m_frameView) | 267 if (m_frameView) |
268 offsetForFixedPosition = LayoutSize(m_frameView->scrollOffsetForViewport
ConstrainedObjects()); | 268 offsetForFixedPosition = LayoutSize(m_frameView->scrollOffsetForViewport
ConstrainedObjects()); |
269 | 269 |
270 if (geometryMap.mapCoordinatesFlags() & TraverseDocumentBoundaries) { | 270 if (geometryMap.mapCoordinatesFlags() & TraverseDocumentBoundaries) { |
271 if (LayoutPart* parentDocRenderer = frame()->ownerRenderer()) { | 271 if (LayoutPart* parentDocRenderer = frame()->ownerRenderer()) { |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 } | 321 } |
322 | 322 |
323 void RenderView::invalidateTreeIfNeeded(const PaintInvalidationState& paintInval
idationState) | 323 void RenderView::invalidateTreeIfNeeded(const PaintInvalidationState& paintInval
idationState) |
324 { | 324 { |
325 ASSERT(!needsLayout()); | 325 ASSERT(!needsLayout()); |
326 | 326 |
327 // We specifically need to issue paint invalidations for the viewRect since
other renderers | 327 // We specifically need to issue paint invalidations for the viewRect since
other renderers |
328 // short-circuit on full-paint invalidation. | 328 // short-circuit on full-paint invalidation. |
329 LayoutRect dirtyRect = viewRect(); | 329 LayoutRect dirtyRect = viewRect(); |
330 if (doingFullPaintInvalidation() && !dirtyRect.isEmpty()) { | 330 if (doingFullPaintInvalidation() && !dirtyRect.isEmpty()) { |
331 const LayoutLayerModelObject* paintInvalidationContainer = &paintInvalid
ationState.paintInvalidationContainer(); | 331 const LayoutBoxModelObject* paintInvalidationContainer = &paintInvalidat
ionState.paintInvalidationContainer(); |
332 Layer::mapRectToPaintInvalidationBacking(this, paintInvalidationContaine
r, dirtyRect, &paintInvalidationState); | 332 Layer::mapRectToPaintInvalidationBacking(this, paintInvalidationContaine
r, dirtyRect, &paintInvalidationState); |
333 invalidatePaintUsingContainer(paintInvalidationContainer, dirtyRect, Pai
ntInvalidationFull); | 333 invalidatePaintUsingContainer(paintInvalidationContainer, dirtyRect, Pai
ntInvalidationFull); |
334 } | 334 } |
335 RenderBlock::invalidateTreeIfNeeded(paintInvalidationState); | 335 RenderBlock::invalidateTreeIfNeeded(paintInvalidationState); |
336 } | 336 } |
337 | 337 |
338 void RenderView::invalidatePaintForRectangle(const LayoutRect& paintInvalidation
Rect, PaintInvalidationReason invalidationReason) const | 338 void RenderView::invalidatePaintForRectangle(const LayoutRect& paintInvalidation
Rect, PaintInvalidationReason invalidationReason) const |
339 { | 339 { |
340 ASSERT(!paintInvalidationRect.isEmpty()); | 340 ASSERT(!paintInvalidationRect.isEmpty()); |
341 | 341 |
(...skipping 13 matching lines...) Expand all Loading... |
355 { | 355 { |
356 setShouldDoFullPaintInvalidation(); | 356 setShouldDoFullPaintInvalidation(); |
357 | 357 |
358 // The only way we know how to hit these ASSERTS below this point is via the
Chromium OS login screen. | 358 // The only way we know how to hit these ASSERTS below this point is via the
Chromium OS login screen. |
359 DisableCompositingQueryAsserts disabler; | 359 DisableCompositingQueryAsserts disabler; |
360 | 360 |
361 if (compositor()->inCompositingMode()) | 361 if (compositor()->inCompositingMode()) |
362 compositor()->fullyInvalidatePaint(); | 362 compositor()->fullyInvalidatePaint(); |
363 } | 363 } |
364 | 364 |
365 void RenderView::mapRectToPaintInvalidationBacking(const LayoutLayerModelObject*
paintInvalidationContainer, LayoutRect& rect, const PaintInvalidationState* inv
alidationState) const | 365 void RenderView::mapRectToPaintInvalidationBacking(const LayoutBoxModelObject* p
aintInvalidationContainer, LayoutRect& rect, const PaintInvalidationState* inval
idationState) const |
366 { | 366 { |
367 mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect, IsNotFix
edPosition, invalidationState); | 367 mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect, IsNotFix
edPosition, invalidationState); |
368 } | 368 } |
369 | 369 |
370 void RenderView::mapRectToPaintInvalidationBacking(const LayoutLayerModelObject*
paintInvalidationContainer, LayoutRect& rect, ViewportConstrainedPosition viewp
ortConstraint, const PaintInvalidationState* state) const | 370 void RenderView::mapRectToPaintInvalidationBacking(const LayoutBoxModelObject* p
aintInvalidationContainer, LayoutRect& rect, ViewportConstrainedPosition viewpor
tConstraint, const PaintInvalidationState* state) const |
371 { | 371 { |
372 if (document().printing()) | 372 if (document().printing()) |
373 return; | 373 return; |
374 | 374 |
375 if (style()->isFlippedBlocksWritingMode()) { | 375 if (style()->isFlippedBlocksWritingMode()) { |
376 // We have to flip by hand since the view's logical height has not been
determined. We | 376 // We have to flip by hand since the view's logical height has not been
determined. We |
377 // can use the viewport width and height. | 377 // can use the viewport width and height. |
378 if (style()->isHorizontalWritingMode()) | 378 if (style()->isHorizontalWritingMode()) |
379 rect.setY(viewHeight() - rect.maxY()); | 379 rect.setY(viewHeight() - rect.maxY()); |
380 else | 380 else |
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
983 } | 983 } |
984 | 984 |
985 void RenderView::invalidateDisplayItemClients(DisplayItemList* displayItemList)
const | 985 void RenderView::invalidateDisplayItemClients(DisplayItemList* displayItemList)
const |
986 { | 986 { |
987 RenderBlockFlow::invalidateDisplayItemClients(displayItemList); | 987 RenderBlockFlow::invalidateDisplayItemClients(displayItemList); |
988 if (m_frameView) | 988 if (m_frameView) |
989 displayItemList->invalidate(m_frameView->displayItemClient()); | 989 displayItemList->invalidate(m_frameView->displayItemClient()); |
990 } | 990 } |
991 | 991 |
992 } // namespace blink | 992 } // namespace blink |
OLD | NEW |