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

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

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

Powered by Google App Engine
This is Rietveld 408576698