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) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) | 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv
ed. |
7 * Copyright (C) 2009 Google Inc. All rights reserved. | 7 * Copyright (C) 2009 Google Inc. All rights reserved. |
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 1379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1390 return repaintContainer; | 1390 return repaintContainer; |
1391 } | 1391 } |
1392 | 1392 |
1393 void RenderObject::repaintUsingContainer(const RenderLayerModelObject* repaintCo
ntainer, const IntRect& r) const | 1393 void RenderObject::repaintUsingContainer(const RenderLayerModelObject* repaintCo
ntainer, const IntRect& r) const |
1394 { | 1394 { |
1395 if (!repaintContainer) { | 1395 if (!repaintContainer) { |
1396 view()->repaintViewRectangle(r); | 1396 view()->repaintViewRectangle(r); |
1397 return; | 1397 return; |
1398 } | 1398 } |
1399 | 1399 |
| 1400 if (repaintContainer->compositingState() == PaintsIntoGroupedBacking) { |
| 1401 ASSERT(repaintContainer->groupedMapping()); |
| 1402 |
| 1403 // Not clean, but if squashing layer does not yet exist here (e.g. repai
nt invalidation coming from within recomputing compositing requirements) |
| 1404 // then it's ok to just exit here, since the squashing layer will get re
painted when it is newly created. |
| 1405 if (!repaintContainer->groupedMapping()->squashingLayer()) |
| 1406 return; |
| 1407 |
| 1408 |
| 1409 IntRect offsetRect(r); |
| 1410 |
| 1411 // First, convert the repaint rect into the space of the repaintContaine
r |
| 1412 TransformState transformState(TransformState::ApplyTransformDirection, F
loatQuad(FloatRect(r))); |
| 1413 mapLocalToContainer(repaintContainer, transformState, ApplyContainerFlip
); |
| 1414 transformState.flatten(); |
| 1415 offsetRect = transformState.lastPlanarQuad().enclosingBoundingBox(); |
| 1416 |
| 1417 // FIXME: the repaint rect computed below could be tighter in uncommon n
ested transform cases, if we passed the quad |
| 1418 // directly to the next chunk of code. |
| 1419 |
| 1420 // Then, convert the repaint rect from repaintConainer space into the sq
uashing GraphicsLayer's coordinates. |
| 1421 if (repaintContainer->hasTransform()) |
| 1422 offsetRect = repaintContainer->layer()->transform()->mapRect(r); |
| 1423 offsetRect.move(-repaintContainer->layer()->offsetFromSquashingLayerOrig
in()); |
| 1424 repaintContainer->groupedMapping()->squashingLayer()->setNeedsDisplayInR
ect(offsetRect); |
| 1425 return; |
| 1426 } |
| 1427 |
1400 if (repaintContainer->isRenderFlowThread()) { | 1428 if (repaintContainer->isRenderFlowThread()) { |
1401 toRenderFlowThread(repaintContainer)->repaintRectangleInRegions(r); | 1429 toRenderFlowThread(repaintContainer)->repaintRectangleInRegions(r); |
1402 return; | 1430 return; |
1403 } | 1431 } |
1404 | 1432 |
1405 if (repaintContainer->hasFilter() && repaintContainer->layer()->requiresFull
LayerImageForFilters()) { | 1433 if (repaintContainer->hasFilter() && repaintContainer->layer()->requiresFull
LayerImageForFilters()) { |
1406 repaintContainer->layer()->repainter().setFilterBackendNeedsRepaintingIn
Rect(r); | 1434 repaintContainer->layer()->repainter().setFilterBackendNeedsRepaintingIn
Rect(r); |
1407 return; | 1435 return; |
1408 } | 1436 } |
1409 | 1437 |
(...skipping 1965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3375 { | 3403 { |
3376 if (object1) { | 3404 if (object1) { |
3377 const WebCore::RenderObject* root = object1; | 3405 const WebCore::RenderObject* root = object1; |
3378 while (root->parent()) | 3406 while (root->parent()) |
3379 root = root->parent(); | 3407 root = root->parent(); |
3380 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 3408 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
3381 } | 3409 } |
3382 } | 3410 } |
3383 | 3411 |
3384 #endif | 3412 #endif |
OLD | NEW |