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

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

Issue 659983002: Block selection gaps are not invalidated (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added a TestExpectation for the new test. Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « LayoutTests/fast/repaint/selection-partial-invalidation-between-blocks-expected.txt ('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 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 for (SelectedObjectMap::iterator i = newSelectedObjects.begin(); i != newObj ectsEnd; ++i) 648 for (SelectedObjectMap::iterator i = newSelectedObjects.begin(); i != newObj ectsEnd; ++i)
649 i->value->object()->setShouldInvalidateSelection(); 649 i->value->object()->setShouldInvalidateSelection();
650 650
651 // Have any of the old blocks changed? 651 // Have any of the old blocks changed?
652 SelectedBlockMap::iterator oldBlocksEnd = oldSelectedBlocks.end(); 652 SelectedBlockMap::iterator oldBlocksEnd = oldSelectedBlocks.end();
653 for (SelectedBlockMap::iterator i = oldSelectedBlocks.begin(); i != oldBlock sEnd; ++i) { 653 for (SelectedBlockMap::iterator i = oldSelectedBlocks.begin(); i != oldBlock sEnd; ++i) {
654 RenderBlock* block = i->key; 654 RenderBlock* block = i->key;
655 RenderBlockSelectionInfo* newInfo = newSelectedBlocks.get(block); 655 RenderBlockSelectionInfo* newInfo = newSelectedBlocks.get(block);
656 RenderBlockSelectionInfo* oldInfo = i->value.get(); 656 RenderBlockSelectionInfo* oldInfo = i->value.get();
657 if (!newInfo || newInfo->hasChangedFrom(*oldInfo)) { 657 if (!newInfo || newInfo->hasChangedFrom(*oldInfo)) {
658 oldInfo->object()->setShouldInvalidateSelection(); 658 oldInfo->invalidatePaint();
659 if (newInfo) { 659 if (newInfo) {
660 newInfo->object()->setShouldInvalidateSelection(); 660 newInfo->object()->setShouldInvalidateSelection();
661 newSelectedBlocks.remove(block); 661 newSelectedBlocks.remove(block);
662 } 662 }
663 } 663 }
664 } 664 }
665 665
666 // Any new blocks that remain were not found in the old blocks dict, and so they need to be updated. 666 // Any new blocks that remain were not found in the old blocks dict, and so they need to be updated.
667 SelectedBlockMap::iterator newBlocksEnd = newSelectedBlocks.end(); 667 SelectedBlockMap::iterator newBlocksEnd = newSelectedBlocks.end();
668 for (SelectedBlockMap::iterator i = newSelectedBlocks.begin(); i != newBlock sEnd; ++i) 668 for (SelectedBlockMap::iterator i = newSelectedBlocks.begin(); i != newBlock sEnd; ++i)
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 return viewWidth(IncludeScrollbars) / scale; 872 return viewWidth(IncludeScrollbars) / scale;
873 } 873 }
874 874
875 double RenderView::layoutViewportHeight() const 875 double RenderView::layoutViewportHeight() const
876 { 876 {
877 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1; 877 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1;
878 return viewHeight(IncludeScrollbars) / scale; 878 return viewHeight(IncludeScrollbars) / scale;
879 } 879 }
880 880
881 } // namespace blink 881 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/fast/repaint/selection-partial-invalidation-between-blocks-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698