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

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: 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
Index: Source/core/layout/LayoutBlockFlow.cpp
diff --git a/Source/core/layout/LayoutBlockFlow.cpp b/Source/core/layout/LayoutBlockFlow.cpp
index 8dd973bf8d1c41917ee1f604a178d51012ac365d..05a8d13e5a314e1a880ae1f34bce3c4fbec01e31 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"
@@ -2866,12 +2867,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)

Powered by Google App Engine
This is Rietveld 408576698