OLD | NEW |
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 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
538 LayoutRect currRect = info->rect(); | 538 LayoutRect currRect = info->rect(); |
539 if (RenderLayerModelObject* repaintContainer = info->repaintContainer())
{ | 539 if (RenderLayerModelObject* repaintContainer = info->repaintContainer())
{ |
540 FloatQuad absQuad = repaintContainer->localToAbsoluteQuad(FloatRect(
currRect)); | 540 FloatQuad absQuad = repaintContainer->localToAbsoluteQuad(FloatRect(
currRect)); |
541 currRect = absQuad.enclosingBoundingBox(); | 541 currRect = absQuad.enclosingBoundingBox(); |
542 } | 542 } |
543 selRect.unite(currRect); | 543 selRect.unite(currRect); |
544 } | 544 } |
545 return pixelSnappedIntRect(selRect); | 545 return pixelSnappedIntRect(selRect); |
546 } | 546 } |
547 | 547 |
| 548 void RenderView::repaintSelection() const |
| 549 { |
| 550 document()->updateStyleIfNeeded(); |
| 551 |
| 552 HashSet<RenderBlock*> processedBlocks; |
| 553 |
| 554 RenderObject* end = rendererAfterPosition(m_selectionEnd, m_selectionEndPos)
; |
| 555 for (RenderObject* o = m_selectionStart; o && o != end; o = o->nextInPreOrde
r()) { |
| 556 if (!o->canBeSelectionLeaf() && o != m_selectionStart && o != m_selectio
nEnd) |
| 557 continue; |
| 558 if (o->selectionState() == SelectionNone) |
| 559 continue; |
| 560 |
| 561 RenderSelectionInfo(o, true).repaint(); |
| 562 |
| 563 // Blocks are responsible for painting line gaps and margin gaps. They m
ust be examined as well. |
| 564 for (RenderBlock* block = o->containingBlock(); block && !block->isRende
rView(); block = block->containingBlock()) { |
| 565 if (processedBlocks.contains(block)) |
| 566 break; |
| 567 processedBlocks.add(block); |
| 568 RenderSelectionInfo(block, true).repaint(); |
| 569 } |
| 570 } |
| 571 } |
| 572 |
548 #if USE(ACCELERATED_COMPOSITING) | 573 #if USE(ACCELERATED_COMPOSITING) |
549 // Compositing layer dimensions take outline size into account, so we have to re
compute layer | 574 // Compositing layer dimensions take outline size into account, so we have to re
compute layer |
550 // bounds when it changes. | 575 // bounds when it changes. |
551 // FIXME: This is ugly; it would be nice to have a better way to do this. | 576 // FIXME: This is ugly; it would be nice to have a better way to do this. |
552 void RenderView::setMaximalOutlineSize(int o) | 577 void RenderView::setMaximalOutlineSize(int o) |
553 { | 578 { |
554 if (o != m_maximalOutlineSize) { | 579 if (o != m_maximalOutlineSize) { |
555 m_maximalOutlineSize = o; | 580 m_maximalOutlineSize = o; |
556 | 581 |
557 // maximalOutlineSize affects compositing layer dimensions. | 582 // maximalOutlineSize affects compositing layer dimensions. |
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1026 #endif | 1051 #endif |
1027 #if ENABLE(CSS_SHADERS) && USE(3D_GRAPHICS) | 1052 #if ENABLE(CSS_SHADERS) && USE(3D_GRAPHICS) |
1028 info.addMember(m_customFilterGlobalContext); | 1053 info.addMember(m_customFilterGlobalContext); |
1029 #endif | 1054 #endif |
1030 info.addMember(m_flowThreadController); | 1055 info.addMember(m_flowThreadController); |
1031 info.addMember(m_intervalArena); | 1056 info.addMember(m_intervalArena); |
1032 info.addWeakPointer(m_renderQuoteHead); | 1057 info.addWeakPointer(m_renderQuoteHead); |
1033 } | 1058 } |
1034 | 1059 |
1035 } // namespace WebCore | 1060 } // namespace WebCore |
OLD | NEW |