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

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

Issue 2555923002: Changed TextDirection to an enum class and renamed its members (Closed)
Patch Set: Added 2 changes in mac files Created 4 years 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 int adjustmentWidth = verticalScrollbarWidth(); 260 int adjustmentWidth = verticalScrollbarWidth();
261 int adjustmentHeight = horizontalScrollbarHeight(); 261 int adjustmentHeight = horizontalScrollbarHeight();
262 if (!adjustmentWidth && !adjustmentHeight) 262 if (!adjustmentWidth && !adjustmentHeight)
263 return size; 263 return size;
264 264
265 EFlexDirection flexDirection = style()->flexDirection(); 265 EFlexDirection flexDirection = style()->flexDirection();
266 TextDirection textDirection = style()->direction(); 266 TextDirection textDirection = style()->direction();
267 WritingMode writingMode = style()->getWritingMode(); 267 WritingMode writingMode = style()->getWritingMode();
268 268
269 if (flexDirection == FlowRow) { 269 if (flexDirection == FlowRow) {
270 if (textDirection == RTL) { 270 if (textDirection == TextDirection::Rtl) {
271 if (writingMode == TopToBottomWritingMode) 271 if (writingMode == TopToBottomWritingMode)
272 size.expand(adjustmentWidth, 0); 272 size.expand(adjustmentWidth, 0);
273 else 273 else
274 size.expand(0, adjustmentHeight); 274 size.expand(0, adjustmentHeight);
275 } 275 }
276 if (writingMode == RightToLeftWritingMode) 276 if (writingMode == RightToLeftWritingMode)
277 size.expand(adjustmentWidth, 0); 277 size.expand(adjustmentWidth, 0);
278 } else if (flexDirection == FlowRowReverse) { 278 } else if (flexDirection == FlowRowReverse) {
279 if (textDirection == LTR) { 279 if (textDirection == TextDirection::Ltr) {
280 if (writingMode == TopToBottomWritingMode) 280 if (writingMode == TopToBottomWritingMode)
281 size.expand(adjustmentWidth, 0); 281 size.expand(adjustmentWidth, 0);
282 else 282 else
283 size.expand(0, adjustmentHeight); 283 size.expand(0, adjustmentHeight);
284 } 284 }
285 if (writingMode == RightToLeftWritingMode) 285 if (writingMode == RightToLeftWritingMode)
286 size.expand(adjustmentWidth, 0); 286 size.expand(adjustmentWidth, 0);
287 } else if (flexDirection == FlowColumn) { 287 } else if (flexDirection == FlowColumn) {
288 if (writingMode == RightToLeftWritingMode) 288 if (writingMode == RightToLeftWritingMode)
289 size.expand(adjustmentWidth, 0); 289 size.expand(adjustmentWidth, 0);
(...skipping 1891 matching lines...) Expand 10 before | Expand all | Expand 10 after
2181 LayoutUnit originalOffset = 2181 LayoutUnit originalOffset =
2182 lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge; 2182 lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge;
2183 LayoutUnit newOffset = 2183 LayoutUnit newOffset =
2184 contentExtent - originalOffset - lineCrossAxisExtent; 2184 contentExtent - originalOffset - lineCrossAxisExtent;
2185 adjustAlignmentForChild(*flexItem.box, newOffset - originalOffset); 2185 adjustAlignmentForChild(*flexItem.box, newOffset - originalOffset);
2186 } 2186 }
2187 } 2187 }
2188 } 2188 }
2189 2189
2190 } // namespace blink 2190 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698