| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2007 David Smith (catfish.man@gmail.com) | 4 * (C) 2007 David Smith (catfish.man@gmail.com) |
| 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. |
| 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 | 228 |
| 229 RenderBox::invalidateTreeIfNeeded(paintInvalidationState); | 229 RenderBox::invalidateTreeIfNeeded(paintInvalidationState); |
| 230 | 230 |
| 231 // Take care of positioned objects. This is required as PaintInvalidationSta
te keeps a single clip rect. | 231 // Take care of positioned objects. This is required as PaintInvalidationSta
te keeps a single clip rect. |
| 232 if (TrackedRendererListHashSet* positionedObjects = this->positionedObjects(
)) { | 232 if (TrackedRendererListHashSet* positionedObjects = this->positionedObjects(
)) { |
| 233 TrackedRendererListHashSet::iterator end = positionedObjects->end(); | 233 TrackedRendererListHashSet::iterator end = positionedObjects->end(); |
| 234 const RenderLayerModelObject& newPaintInvalidationContainer = *adjustCom
positedContainerForSpecialAncestors(&paintInvalidationState.paintInvalidationCon
tainer()); | 234 const RenderLayerModelObject& newPaintInvalidationContainer = *adjustCom
positedContainerForSpecialAncestors(&paintInvalidationState.paintInvalidationCon
tainer()); |
| 235 PaintInvalidationState childPaintInvalidationState(paintInvalidationStat
e, *this, newPaintInvalidationContainer); | 235 PaintInvalidationState childPaintInvalidationState(paintInvalidationStat
e, *this, newPaintInvalidationContainer); |
| 236 for (TrackedRendererListHashSet::iterator it = positionedObjects->begin(
); it != end; ++it) { | 236 for (TrackedRendererListHashSet::iterator it = positionedObjects->begin(
); it != end; ++it) { |
| 237 RenderBox* box = *it; | 237 RenderBox* box = *it; |
| 238 | |
| 239 // One of the renderers we're skipping over here may be the child's
paint invalidation container, | |
| 240 // so we can't pass our own paint invalidation container along. | |
| 241 const RenderLayerModelObject& paintInvalidationContainerForChild = *
box->containerForPaintInvalidation(); | |
| 242 | |
| 243 // If it's a new paint invalidation container, we won't have properl
y accumulated the offset into the | |
| 244 // PaintInvalidationState. | |
| 245 // FIXME: Teach PaintInvalidationState to handle this case. crbug.co
m/371485 | |
| 246 if (&paintInvalidationContainerForChild != newPaintInvalidationConta
iner) { | |
| 247 ForceHorriblySlowRectMapping slowRectMapping(&childPaintInvalida
tionState); | |
| 248 PaintInvalidationState disabledPaintInvalidationState(childPaint
InvalidationState, *this, paintInvalidationContainerForChild); | |
| 249 box->invalidateTreeIfNeeded(disabledPaintInvalidationState); | |
| 250 continue; | |
| 251 } | |
| 252 | |
| 253 // If the positioned renderer is absolutely positioned and it is ins
ide | |
| 254 // a relatively positioned inline element, we need to account for | |
| 255 // the inline elements position in PaintInvalidationState. | |
| 256 if (box->style()->position() == AbsolutePosition) { | |
| 257 RenderObject* container = box->container(&paintInvalidationConta
inerForChild, 0); | |
| 258 if (container->isRelPositioned() && container->isRenderInline())
{ | |
| 259 // FIXME: We should be able to use PaintInvalidationState fo
r this. | |
| 260 // Currently, we will place absolutely positioned elements i
nside | |
| 261 // relatively positioned inline blocks in the wrong location
. crbug.com/371485 | |
| 262 ForceHorriblySlowRectMapping slowRectMapping(&childPaintInva
lidationState); | |
| 263 PaintInvalidationState disabledPaintInvalidationState(childP
aintInvalidationState, *this, paintInvalidationContainerForChild); | |
| 264 box->invalidateTreeIfNeeded(disabledPaintInvalidationState); | |
| 265 continue; | |
| 266 } | |
| 267 } | |
| 268 | |
| 269 box->invalidateTreeIfNeeded(childPaintInvalidationState); | 238 box->invalidateTreeIfNeeded(childPaintInvalidationState); |
| 270 } | 239 } |
| 271 } | 240 } |
| 272 } | 241 } |
| 273 | 242 |
| 274 void RenderBlock::addChildIgnoringAnonymousColumnBlocks(RenderObject* newChild,
RenderObject* beforeChild) | 243 void RenderBlock::addChildIgnoringAnonymousColumnBlocks(RenderObject* newChild,
RenderObject* beforeChild) |
| 275 { | 244 { |
| 276 if (beforeChild && beforeChild->parent() != this) { | 245 if (beforeChild && beforeChild->parent() != this) { |
| 277 RenderObject* beforeChildContainer = beforeChild->parent(); | 246 RenderObject* beforeChildContainer = beforeChild->parent(); |
| 278 ASSERT(beforeChildContainer->parent() == this); | 247 ASSERT(beforeChildContainer->parent() == this); |
| (...skipping 1759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2038 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render
Object* obj) const | 2007 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render
Object* obj) const |
| 2039 { | 2008 { |
| 2040 showRenderObject(); | 2009 showRenderObject(); |
| 2041 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) | 2010 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) |
| 2042 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); | 2011 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); |
| 2043 } | 2012 } |
| 2044 | 2013 |
| 2045 #endif | 2014 #endif |
| 2046 | 2015 |
| 2047 } // namespace blink | 2016 } // namespace blink |
| OLD | NEW |