OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 | 450 |
451 static void writeLayers(TextStream& ts, const RenderLayer* rootLayer, RenderLaye
r* l, | 451 static void writeLayers(TextStream& ts, const RenderLayer* rootLayer, RenderLaye
r* l, |
452 const IntRect& paintDirtyRect, int indent) | 452 const IntRect& paintDirtyRect, int indent) |
453 { | 453 { |
454 // Calculate the clip rects we should use. | 454 // Calculate the clip rects we should use. |
455 IntRect layerBounds, damageRect, clipRectToApply, outlineRect; | 455 IntRect layerBounds, damageRect, clipRectToApply, outlineRect; |
456 l->calculateRects(rootLayer, paintDirtyRect, layerBounds, damageRect, clipRe
ctToApply, outlineRect, true); | 456 l->calculateRects(rootLayer, paintDirtyRect, layerBounds, damageRect, clipRe
ctToApply, outlineRect, true); |
457 | 457 |
458 // Ensure our lists are up-to-date. | 458 // Ensure our lists are up-to-date. |
459 l->updateZOrderLists(); | 459 l->updateZOrderLists(); |
460 l->updateOverflowList(); | 460 l->updateNormalFlowList(); |
461 | 461 |
462 bool shouldPaint = l->intersectsDamageRect(layerBounds, damageRect, rootLaye
r); | 462 bool shouldPaint = l->intersectsDamageRect(layerBounds, damageRect, rootLaye
r); |
463 Vector<RenderLayer*>* negList = l->negZOrderList(); | 463 Vector<RenderLayer*>* negList = l->negZOrderList(); |
464 if (shouldPaint && negList && negList->size() > 0) | 464 if (shouldPaint && negList && negList->size() > 0) |
465 write(ts, *l, layerBounds, damageRect, clipRectToApply, outlineRect, -1,
indent); | 465 write(ts, *l, layerBounds, damageRect, clipRectToApply, outlineRect, -1,
indent); |
466 | 466 |
467 if (negList) { | 467 if (negList) { |
468 for (unsigned i = 0; i != negList->size(); ++i) | 468 for (unsigned i = 0; i != negList->size(); ++i) |
469 writeLayers(ts, rootLayer, negList->at(i), paintDirtyRect, indent); | 469 writeLayers(ts, rootLayer, negList->at(i), paintDirtyRect, indent); |
470 } | 470 } |
471 | 471 |
472 if (shouldPaint) | 472 if (shouldPaint) |
473 write(ts, *l, layerBounds, damageRect, clipRectToApply, outlineRect, neg
List && negList->size() > 0, indent); | 473 write(ts, *l, layerBounds, damageRect, clipRectToApply, outlineRect, neg
List && negList->size() > 0, indent); |
474 | 474 |
475 Vector<RenderLayer*>* overflowList = l->overflowList(); | 475 Vector<RenderLayer*>* overflowList = l->normalFlowList(); |
476 if (overflowList) { | 476 if (overflowList) { |
477 for (unsigned i = 0; i != overflowList->size(); ++i) | 477 for (unsigned i = 0; i != overflowList->size(); ++i) |
478 writeLayers(ts, rootLayer, overflowList->at(i), paintDirtyRect, inde
nt); | 478 writeLayers(ts, rootLayer, overflowList->at(i), paintDirtyRect, inde
nt); |
479 } | 479 } |
480 | 480 |
481 Vector<RenderLayer*>* posList = l->posZOrderList(); | 481 Vector<RenderLayer*>* posList = l->posZOrderList(); |
482 if (posList) { | 482 if (posList) { |
483 for (unsigned i = 0; i != posList->size(); ++i) | 483 for (unsigned i = 0; i != posList->size(); ++i) |
484 writeLayers(ts, rootLayer, posList->at(i), paintDirtyRect, indent); | 484 writeLayers(ts, rootLayer, posList->at(i), paintDirtyRect, indent); |
485 } | 485 } |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
540 o->view()->frameView()->layout(); | 540 o->view()->frameView()->layout(); |
541 if (o->hasLayer()) { | 541 if (o->hasLayer()) { |
542 RenderLayer* l = toRenderBox(o)->layer(); | 542 RenderLayer* l = toRenderBox(o)->layer(); |
543 writeLayers(ts, l, l, IntRect(l->x(), l->y(), l->width(), l->height())); | 543 writeLayers(ts, l, l, IntRect(l->x(), l->y(), l->width(), l->height())); |
544 writeSelection(ts, o); | 544 writeSelection(ts, o); |
545 } | 545 } |
546 return ts.release(); | 546 return ts.release(); |
547 } | 547 } |
548 | 548 |
549 } // namespace WebCore | 549 } // namespace WebCore |
OLD | NEW |