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 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 // If the style has unloaded images, want to notify the ResourceLoadPriority
Optimizer so that | 368 // If the style has unloaded images, want to notify the ResourceLoadPriority
Optimizer so that |
369 // network priorities can be set. | 369 // network priorities can be set. |
370 Vector<ImageResource*> images; | 370 Vector<ImageResource*> images; |
371 appendImagesFromStyle(images, *newStyle); | 371 appendImagesFromStyle(images, *newStyle); |
372 if (images.isEmpty()) | 372 if (images.isEmpty()) |
373 ResourceLoadPriorityOptimizer::resourceLoadPriorityOptimizer()->removeRe
nderObject(this); | 373 ResourceLoadPriorityOptimizer::resourceLoadPriorityOptimizer()->removeRe
nderObject(this); |
374 else | 374 else |
375 ResourceLoadPriorityOptimizer::resourceLoadPriorityOptimizer()->addRende
rObject(this); | 375 ResourceLoadPriorityOptimizer::resourceLoadPriorityOptimizer()->addRende
rObject(this); |
376 } | 376 } |
377 | 377 |
378 void RenderBlock::invalidateTreeIfNeeded(const PaintInvalidationState& paintInva
lidationState) | 378 void RenderBlock::invalidatePaintOfSubtreesIfNeeded(const PaintInvalidationState
& childPaintInvalidationState) |
379 { | 379 { |
380 // Note, we don't want to early out here using shouldCheckForInvalidationAft
erLayout as | 380 RenderBox::invalidatePaintOfSubtreesIfNeeded(childPaintInvalidationState); |
381 // we have to make sure we go through any positioned objects as they won't b
e seen in | |
382 // the normal tree walk. | |
383 | |
384 RenderBox::invalidateTreeIfNeeded(paintInvalidationState); | |
385 | 381 |
386 // Take care of positioned objects. This is required as PaintInvalidationSta
te keeps a single clip rect. | 382 // Take care of positioned objects. This is required as PaintInvalidationSta
te keeps a single clip rect. |
387 if (TrackedRendererListHashSet* positionedObjects = this->positionedObjects(
)) { | 383 if (TrackedRendererListHashSet* positionedObjects = this->positionedObjects(
)) { |
388 TrackedRendererListHashSet::iterator end = positionedObjects->end(); | 384 TrackedRendererListHashSet::iterator end = positionedObjects->end(); |
389 bool establishesNewPaintInvalidationContainer = isPaintInvalidationConta
iner(); | |
390 const RenderLayerModelObject& newPaintInvalidationContainer = *adjustCom
positedContainerForSpecialAncestors(establishesNewPaintInvalidationContainer ? t
his : &paintInvalidationState.paintInvalidationContainer()); | |
391 PaintInvalidationState childPaintInvalidationState(paintInvalidationStat
e, *this, newPaintInvalidationContainer); | |
392 for (TrackedRendererListHashSet::iterator it = positionedObjects->begin(
); it != end; ++it) { | 385 for (TrackedRendererListHashSet::iterator it = positionedObjects->begin(
); it != end; ++it) { |
393 RenderBox* box = *it; | 386 RenderBox* box = *it; |
394 | 387 |
395 // One of the renderers we're skipping over here may be the child's
paint invalidation container, | 388 // One of the renderers we're skipping over here may be the child's
paint invalidation container, |
396 // so we can't pass our own paint invalidation container along. | 389 // so we can't pass our own paint invalidation container along. |
397 const RenderLayerModelObject& paintInvalidationContainerForChild = *
box->containerForPaintInvalidation(); | 390 const RenderLayerModelObject& paintInvalidationContainerForChild = *
box->containerForPaintInvalidation(); |
398 | 391 |
399 // If it's a new paint invalidation container, we won't have properl
y accumulated the offset into the | 392 // If it's a new paint invalidation container, we won't have properl
y accumulated the offset into the |
400 // PaintInvalidationState. | 393 // PaintInvalidationState. |
401 // FIXME: Teach PaintInvalidationState to handle this case. crbug.co
m/371485 | 394 // FIXME: Teach PaintInvalidationState to handle this case. crbug.co
m/371485 |
402 if (&paintInvalidationContainerForChild != newPaintInvalidationConta
iner) { | 395 if (paintInvalidationContainerForChild != childPaintInvalidationStat
e.paintInvalidationContainer()) { |
403 ForceHorriblySlowRectMapping slowRectMapping(&childPaintInvalida
tionState); | 396 ForceHorriblySlowRectMapping slowRectMapping(&childPaintInvalida
tionState); |
404 PaintInvalidationState disabledPaintInvalidationState(childPaint
InvalidationState, *this, paintInvalidationContainerForChild); | 397 PaintInvalidationState disabledPaintInvalidationState(childPaint
InvalidationState, *this, paintInvalidationContainerForChild); |
405 box->invalidateTreeIfNeeded(disabledPaintInvalidationState); | 398 box->invalidateTreeIfNeeded(disabledPaintInvalidationState); |
406 continue; | 399 continue; |
407 } | 400 } |
408 | 401 |
409 // If the positioned renderer is absolutely positioned and it is ins
ide | 402 // If the positioned renderer is absolutely positioned and it is ins
ide |
410 // a relatively positioned inline element, we need to account for | 403 // a relatively positioned inline element, we need to account for |
411 // the inline elements position in PaintInvalidationState. | 404 // the inline elements position in PaintInvalidationState. |
412 if (box->style()->position() == AbsolutePosition) { | 405 if (box->style()->position() == AbsolutePosition) { |
(...skipping 3952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4365 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render
Object* obj) const | 4358 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render
Object* obj) const |
4366 { | 4359 { |
4367 showRenderObject(); | 4360 showRenderObject(); |
4368 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) | 4361 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) |
4369 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); | 4362 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); |
4370 } | 4363 } |
4371 | 4364 |
4372 #endif | 4365 #endif |
4373 | 4366 |
4374 } // namespace blink | 4367 } // namespace blink |
OLD | NEW |