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

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

Issue 2915543002: Generate enum/getters/setters/mappings for text-align-last. (Closed)
Patch Set: Rebase Created 3 years, 6 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) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
4 * All right reserved. 4 * All right reserved.
5 * Copyright (C) 2010 Google Inc. All rights reserved. 5 * Copyright (C) 2010 Google Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 // Return the last line. 358 // Return the last line.
359 return LastRootBox(); 359 return LastRootBox();
360 } 360 }
361 361
362 ETextAlign LayoutBlockFlow::TextAlignmentForLine( 362 ETextAlign LayoutBlockFlow::TextAlignmentForLine(
363 bool ends_with_soft_break) const { 363 bool ends_with_soft_break) const {
364 ETextAlign alignment = Style()->GetTextAlign(); 364 ETextAlign alignment = Style()->GetTextAlign();
365 if (ends_with_soft_break) 365 if (ends_with_soft_break)
366 return alignment; 366 return alignment;
367 367
368 TextAlignLast alignment_last = Style()->GetTextAlignLast(); 368 ETextAlignLast alignment_last = Style()->TextAlignLast();
369 switch (alignment_last) { 369 switch (alignment_last) {
370 case TextAlignLast::kStart: 370 case ETextAlignLast::kStart:
371 return ETextAlign::kStart; 371 return ETextAlign::kStart;
372 case TextAlignLast::kEnd: 372 case ETextAlignLast::kEnd:
373 return ETextAlign::kEnd; 373 return ETextAlign::kEnd;
374 case TextAlignLast::kLeft: 374 case ETextAlignLast::kLeft:
375 return ETextAlign::kLeft; 375 return ETextAlign::kLeft;
376 case TextAlignLast::kRight: 376 case ETextAlignLast::kRight:
377 return ETextAlign::kRight; 377 return ETextAlign::kRight;
378 case TextAlignLast::kCenter: 378 case ETextAlignLast::kCenter:
379 return ETextAlign::kCenter; 379 return ETextAlign::kCenter;
380 case TextAlignLast::kJustify: 380 case ETextAlignLast::kJustify:
381 return ETextAlign::kJustify; 381 return ETextAlign::kJustify;
382 case TextAlignLast::kAuto: 382 case ETextAlignLast::kAuto:
383 if (alignment == ETextAlign::kJustify) 383 if (alignment == ETextAlign::kJustify)
384 return ETextAlign::kStart; 384 return ETextAlign::kStart;
385 return alignment; 385 return alignment;
386 } 386 }
387 387
388 return alignment; 388 return alignment;
389 } 389 }
390 390
391 static bool TextAlignmentNeedsTrailingSpace(ETextAlign text_align, 391 static bool TextAlignmentNeedsTrailingSpace(ETextAlign text_align,
392 const ComputedStyle& style) { 392 const ComputedStyle& style) {
(...skipping 2261 matching lines...) Expand 10 before | Expand all | Expand 10 after
2654 2654
2655 bool LayoutBlockFlow::PaintedOutputOfObjectHasNoEffectRegardlessOfSize() const { 2655 bool LayoutBlockFlow::PaintedOutputOfObjectHasNoEffectRegardlessOfSize() const {
2656 // LayoutBlockFlow is in charge of paint invalidation of the first line. 2656 // LayoutBlockFlow is in charge of paint invalidation of the first line.
2657 if (FirstLineBox()) 2657 if (FirstLineBox())
2658 return false; 2658 return false;
2659 2659
2660 return LayoutBlock::PaintedOutputOfObjectHasNoEffectRegardlessOfSize(); 2660 return LayoutBlock::PaintedOutputOfObjectHasNoEffectRegardlessOfSize();
2661 } 2661 }
2662 2662
2663 } // namespace blink 2663 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698