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

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

Issue 1261653002: Move SelectionState out of LayoutObject and into Line Layout API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 2 legit 5ever Created 5 years, 5 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/core.gypi ('k') | Source/core/layout/LayoutBlockFlowLine.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutBlockFlow.cpp
diff --git a/Source/core/layout/LayoutBlockFlow.cpp b/Source/core/layout/LayoutBlockFlow.cpp
index fd2cc02af8f7be7f248f142c4bab3d4ab4ded8b4..42f603a95fdd183b4ae90d3c298fee67132d2db3 100644
--- a/Source/core/layout/LayoutBlockFlow.cpp
+++ b/Source/core/layout/LayoutBlockFlow.cpp
@@ -45,6 +45,7 @@
#include "core/layout/LayoutText.h"
#include "core/layout/LayoutView.h"
#include "core/layout/TextAutosizer.h"
+#include "core/layout/api/SelectionState.h"
#include "core/layout/line/LineBreaker.h"
#include "core/layout/line/LineWidth.h"
#include "core/layout/shapes/ShapeOutsideInfo.h"
@@ -2829,12 +2830,12 @@ LayoutRect LayoutBlockFlow::logicalRightSelectionGap(const LayoutBlock* rootBloc
void LayoutBlockFlow::getSelectionGapInfo(SelectionState state, bool& leftGap, bool& rightGap) const
{
bool ltr = style()->isLeftToRightDirection();
- leftGap = (state == LayoutObject::SelectionInside)
- || (state == LayoutObject::SelectionEnd && ltr)
- || (state == LayoutObject::SelectionStart && !ltr);
- rightGap = (state == LayoutObject::SelectionInside)
- || (state == LayoutObject::SelectionStart && ltr)
- || (state == LayoutObject::SelectionEnd && !ltr);
+ leftGap = (state == SelectionInside)
+ || (state == SelectionEnd && ltr)
+ || (state == SelectionStart && !ltr);
+ rightGap = (state == SelectionInside)
+ || (state == SelectionStart && ltr)
+ || (state == SelectionEnd && !ltr);
}
void LayoutBlockFlow::setPaginationStrut(LayoutUnit strut)
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/layout/LayoutBlockFlowLine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698