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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/rendering/RenderView.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/rendering/RenderView.cpp
===================================================================
--- Source/WebCore/rendering/RenderView.cpp (revision 139576)
+++ Source/WebCore/rendering/RenderView.cpp (working copy)
@@ -545,6 +545,31 @@
return pixelSnappedIntRect(selRect);
}
+void RenderView::repaintSelection() const
+{
+ document()->updateStyleIfNeeded();
+
+ HashSet<RenderBlock*> processedBlocks;
+
+ RenderObject* end = rendererAfterPosition(m_selectionEnd, m_selectionEndPos);
+ for (RenderObject* o = m_selectionStart; o && o != end; o = o->nextInPreOrder()) {
+ if (!o->canBeSelectionLeaf() && o != m_selectionStart && o != m_selectionEnd)
+ continue;
+ if (o->selectionState() == SelectionNone)
+ continue;
+
+ RenderSelectionInfo(o, true).repaint();
+
+ // Blocks are responsible for painting line gaps and margin gaps. They must be examined as well.
+ for (RenderBlock* block = o->containingBlock(); block && !block->isRenderView(); block = block->containingBlock()) {
+ if (processedBlocks.contains(block))
+ break;
+ processedBlocks.add(block);
+ RenderSelectionInfo(block, true).repaint();
+ }
+ }
+}
+
#if USE(ACCELERATED_COMPOSITING)
// Compositing layer dimensions take outline size into account, so we have to recompute layer
// bounds when it changes.
« 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