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

Unified Diff: Source/core/layout/LayoutBlockFlow.cpp

Issue 1047893002: Turn off selection gap painting, but allow toggling via a runtime flag (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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
Index: Source/core/layout/LayoutBlockFlow.cpp
diff --git a/Source/core/layout/LayoutBlockFlow.cpp b/Source/core/layout/LayoutBlockFlow.cpp
index eefe84afaa54d6ede41a6162b7669b3f7f2d46f3..4732f30cb50061626e9b58c02a5b0869fb164b9a 100644
--- a/Source/core/layout/LayoutBlockFlow.cpp
+++ b/Source/core/layout/LayoutBlockFlow.cpp
@@ -2843,7 +2843,9 @@ IntRect alignSelectionRectToDevicePixels(LayoutRect& rect)
bool LayoutBlockFlow::shouldPaintSelectionGaps() const
{
- return selectionState() != SelectionNone && style()->visibility() == VISIBLE && isSelectionRoot();
+ // TODO(chrishtr): remove the feature once we are sure it will be ok to do so. See crbug.com/471908 for more details.
+ return RuntimeEnabledFeatures::selectionGapPaintingEnabled()
+ && selectionState() != SelectionNone && style()->visibility() == VISIBLE && isSelectionRoot();
}
LayoutRect LayoutBlockFlow::blockSelectionGap(const LayoutBlock* rootBlock, const LayoutPoint& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock,

Powered by Google App Engine
This is Rietveld 408576698