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

Unified Diff: Source/core/rendering/RenderView.cpp

Issue 570763003: Remove unneeded bool from RenderView::selectionBounds (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaselined (again and again) Created 6 years, 3 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/core/rendering/RenderView.h ('k') | Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderView.cpp
diff --git a/Source/core/rendering/RenderView.cpp b/Source/core/rendering/RenderView.cpp
index eda92f97087ca2568f29798a8de4cf078ec55ae4..d9ca487d28bc251715eac61c948f74af25ee66b8 100644
--- a/Source/core/rendering/RenderView.cpp
+++ b/Source/core/rendering/RenderView.cpp
@@ -508,7 +508,7 @@ static RenderObject* rendererAfterPosition(RenderObject* object, unsigned offset
return child ? child : object->nextInPreOrderAfterChildren();
}
-IntRect RenderView::selectionBounds(bool clipToVisibleContent) const
+IntRect RenderView::selectionBounds() const
{
typedef WillBeHeapHashMap<RawPtrWillBeMember<RenderObject>, OwnPtrWillBeMember<RenderSelectionInfo> > SelectionMap;
SelectionMap selectedObjects;
@@ -518,13 +518,13 @@ IntRect RenderView::selectionBounds(bool clipToVisibleContent) const
while (os && os != stop) {
if ((os->canBeSelectionLeaf() || os == m_selectionStart || os == m_selectionEnd) && os->selectionState() != SelectionNone) {
// Blocks are responsible for painting line gaps and margin gaps. They must be examined as well.
- selectedObjects.set(os, adoptPtrWillBeNoop(new RenderSelectionInfo(os, clipToVisibleContent)));
+ selectedObjects.set(os, adoptPtrWillBeNoop(new RenderSelectionInfo(os)));
RenderBlock* cb = os->containingBlock();
while (cb && !cb->isRenderView()) {
OwnPtrWillBeMember<RenderSelectionInfo>& blockInfo = selectedObjects.add(cb, nullptr).storedValue->value;
if (blockInfo)
break;
- blockInfo = adoptPtrWillBeNoop(new RenderSelectionInfo(cb, clipToVisibleContent));
+ blockInfo = adoptPtrWillBeNoop(new RenderSelectionInfo(cb));
cb = cb->containingBlock();
}
}
@@ -563,13 +563,13 @@ void RenderView::invalidatePaintForSelection() const
if (o->selectionState() == SelectionNone)
continue;
- RenderSelectionInfo(o, true).invalidatePaint();
+ RenderSelectionInfo(o).invalidatePaint();
// 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.add(block).isNewEntry)
break;
- RenderSelectionInfo(block, true).invalidatePaint();
+ RenderSelectionInfo(block).invalidatePaint();
}
}
}
@@ -636,7 +636,7 @@ void RenderView::setSelection(RenderObject* start, int startPos, RenderObject* e
while (continueExploring) {
if ((os->canBeSelectionLeaf() || os == m_selectionStart || os == m_selectionEnd) && os->selectionState() != SelectionNone) {
// Blocks are responsible for painting line gaps and margin gaps. They must be examined as well.
- oldSelectedObjects.set(os, adoptPtrWillBeNoop(new RenderSelectionInfo(os, true)));
+ oldSelectedObjects.set(os, adoptPtrWillBeNoop(new RenderSelectionInfo(os)));
if (blockPaintInvalidationMode == PaintInvalidationNewXOROld) {
RenderBlock* cb = os->containingBlock();
while (cb && !cb->isRenderView()) {
@@ -692,7 +692,7 @@ void RenderView::setSelection(RenderObject* start, int startPos, RenderObject* e
continueExploring = o && (o != stop);
while (continueExploring) {
if ((o->canBeSelectionLeaf() || o == start || o == end) && o->selectionState() != SelectionNone) {
- newSelectedObjects.set(o, adoptPtrWillBeNoop(new RenderSelectionInfo(o, true)));
+ newSelectedObjects.set(o, adoptPtrWillBeNoop(new RenderSelectionInfo(o)));
RenderBlock* cb = o->containingBlock();
while (cb && !cb->isRenderView()) {
OwnPtrWillBeMember<RenderBlockSelectionInfo>& blockInfo = newSelectedBlocks.add(cb, nullptr).storedValue->value;
« no previous file with comments | « Source/core/rendering/RenderView.h ('k') | Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698