| 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 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 LayoutRect currRect = info->rect(); | 357 LayoutRect currRect = info->rect(); |
| 358 if (const RenderLayerModelObject* paintInvalidationContainer = info->pai
ntInvalidationContainer()) { | 358 if (const RenderLayerModelObject* paintInvalidationContainer = info->pai
ntInvalidationContainer()) { |
| 359 FloatQuad absQuad = paintInvalidationContainer->localToAbsoluteQuad(
FloatRect(currRect)); | 359 FloatQuad absQuad = paintInvalidationContainer->localToAbsoluteQuad(
FloatRect(currRect)); |
| 360 currRect = absQuad.enclosingBoundingBox(); | 360 currRect = absQuad.enclosingBoundingBox(); |
| 361 } | 361 } |
| 362 selRect.unite(currRect); | 362 selRect.unite(currRect); |
| 363 } | 363 } |
| 364 return pixelSnappedIntRect(selRect); | 364 return pixelSnappedIntRect(selRect); |
| 365 } | 365 } |
| 366 | 366 |
| 367 void RenderView::invalidatePaintForSelection() const | |
| 368 { | |
| 369 HashSet<RenderBlock*> processedBlocks; | |
| 370 | |
| 371 RenderObject* end = rendererAfterPosition(m_selectionEnd, m_selectionEndPos)
; | |
| 372 for (RenderObject* o = m_selectionStart; o && o != end; o = o->nextInPreOrde
r()) { | |
| 373 if (!o->canBeSelectionLeaf() && o != m_selectionStart && o != m_selectio
nEnd) | |
| 374 continue; | |
| 375 if (o->selectionState() == SelectionNone) | |
| 376 continue; | |
| 377 | |
| 378 RenderSelectionInfo(o, true).invalidatePaint(); | |
| 379 | |
| 380 // Blocks are responsible for painting line gaps and margin gaps. They m
ust be examined as well. | |
| 381 for (RenderBlock* block = o->containingBlock(); block && !block->isRende
rView(); block = block->containingBlock()) { | |
| 382 if (!processedBlocks.add(block).isNewEntry) | |
| 383 break; | |
| 384 RenderSelectionInfo(block, true).invalidatePaint(); | |
| 385 } | |
| 386 } | |
| 387 } | |
| 388 | |
| 389 // When exploring the RenderTree looking for the nodes involved in the Selection
, sometimes it's | 367 // When exploring the RenderTree looking for the nodes involved in the Selection
, sometimes it's |
| 390 // required to change the traversing direction because the "start" position is b
elow the "end" one. | 368 // required to change the traversing direction because the "start" position is b
elow the "end" one. |
| 391 static inline RenderObject* getNextOrPrevRenderObjectBasedOnDirection(const Rend
erObject* o, const RenderObject* stop, bool& continueExploring, bool& exploringB
ackwards) | 369 static inline RenderObject* getNextOrPrevRenderObjectBasedOnDirection(const Rend
erObject* o, const RenderObject* stop, bool& continueExploring, bool& exploringB
ackwards) |
| 392 { | 370 { |
| 393 RenderObject* next; | 371 RenderObject* next; |
| 394 if (exploringBackwards) { | 372 if (exploringBackwards) { |
| 395 next = o->previousInPreOrder(); | 373 next = o->previousInPreOrder(); |
| 396 continueExploring = next && !(next)->isRenderView(); | 374 continueExploring = next && !(next)->isRenderView(); |
| 397 } else { | 375 } else { |
| 398 next = o->nextInPreOrder(); | 376 next = o->nextInPreOrder(); |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 702 m_iframes.remove(iframe); | 680 m_iframes.remove(iframe); |
| 703 } | 681 } |
| 704 | 682 |
| 705 void RenderView::updateIFramesAfterLayout() | 683 void RenderView::updateIFramesAfterLayout() |
| 706 { | 684 { |
| 707 for (auto& iframe: m_iframes) | 685 for (auto& iframe: m_iframes) |
| 708 iframe->updateWidgetBounds(); | 686 iframe->updateWidgetBounds(); |
| 709 } | 687 } |
| 710 | 688 |
| 711 } // namespace blink | 689 } // namespace blink |
| OLD | NEW |