Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(418)

Side by Side Diff: Source/WebCore/rendering/RenderView.cpp

Issue 11886010: Merge 139282 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/WebCore/rendering/RenderView.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/RenderView.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698