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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBR.cpp

Issue 1642223002: Delete selection gap code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Integrate feedback. Created 4 years, 10 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
OLDNEW
1 /** 1 /**
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2006 Apple Computer, Inc. 3 * Copyright (C) 2006 Apple Computer, Inc.
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 27 matching lines...) Expand all
38 : LayoutText(node, newlineString()) 38 : LayoutText(node, newlineString())
39 { 39 {
40 } 40 }
41 41
42 LayoutBR::~LayoutBR() 42 LayoutBR::~LayoutBR()
43 { 43 {
44 } 44 }
45 45
46 LayoutRect LayoutBR::selectionRectForPaintInvalidation(const LayoutBoxModelObjec t* paintInvalidationContainer) const 46 LayoutRect LayoutBR::selectionRectForPaintInvalidation(const LayoutBoxModelObjec t* paintInvalidationContainer) const
47 { 47 {
48 if (!RuntimeEnabledFeatures::selectionPaintingWithoutSelectionGapsEnabled())
49 return LayoutRect();
50
51 // Although line breaks contain no actual text, if we're selected we need 48 // Although line breaks contain no actual text, if we're selected we need
52 // to return a rect that includes space to illustrate a newline. 49 // to return a rect that includes space to illustrate a newline.
53 return LayoutText::selectionRectForPaintInvalidation(paintInvalidationContai ner); 50 return LayoutText::selectionRectForPaintInvalidation(paintInvalidationContai ner);
54 } 51 }
55 52
56 int LayoutBR::lineHeight(bool firstLine) const 53 int LayoutBR::lineHeight(bool firstLine) const
57 { 54 {
58 const ComputedStyle& style = styleRef(firstLine && document().styleEngine(). usesFirstLineRules()); 55 const ComputedStyle& style = styleRef(firstLine && document().styleEngine(). usesFirstLineRules());
59 return style.computedLineHeight(); 56 return style.computedLineHeight();
60 } 57 }
(...skipping 12 matching lines...) Expand all
73 { 70 {
74 return 1; 71 return 1;
75 } 72 }
76 73
77 PositionWithAffinity LayoutBR::positionForPoint(const LayoutPoint&) 74 PositionWithAffinity LayoutBR::positionForPoint(const LayoutPoint&)
78 { 75 {
79 return createPositionWithAffinity(0); 76 return createPositionWithAffinity(0);
80 } 77 }
81 78
82 } // namespace blink 79 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698