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

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

Issue 2614883007: Change computed style enums to be prefixed with 'k'. (Closed)
Patch Set: Rebase on ToT. Created 3 years, 11 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2011 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 } 43 }
44 44
45 ETextAlign LayoutRubyText::textAlignmentForLine(bool endsWithSoftBreak) const { 45 ETextAlign LayoutRubyText::textAlignmentForLine(bool endsWithSoftBreak) const {
46 ETextAlign textAlign = style()->textAlign(); 46 ETextAlign textAlign = style()->textAlign();
47 // FIXME: This check is bogus since user can set the initial value. 47 // FIXME: This check is bogus since user can set the initial value.
48 if (textAlign != ComputedStyle::initialTextAlign()) 48 if (textAlign != ComputedStyle::initialTextAlign())
49 return LayoutBlockFlow::textAlignmentForLine(endsWithSoftBreak); 49 return LayoutBlockFlow::textAlignmentForLine(endsWithSoftBreak);
50 50
51 // The default behavior is to allow ruby text to expand if it is shorter than 51 // The default behavior is to allow ruby text to expand if it is shorter than
52 // the ruby base. 52 // the ruby base.
53 return ETextAlign::Justify; 53 return ETextAlign::kJustify;
54 } 54 }
55 55
56 void LayoutRubyText::adjustInlineDirectionLineBounds( 56 void LayoutRubyText::adjustInlineDirectionLineBounds(
57 unsigned expansionOpportunityCount, 57 unsigned expansionOpportunityCount,
58 LayoutUnit& logicalLeft, 58 LayoutUnit& logicalLeft,
59 LayoutUnit& logicalWidth) const { 59 LayoutUnit& logicalWidth) const {
60 ETextAlign textAlign = style()->textAlign(); 60 ETextAlign textAlign = style()->textAlign();
61 // FIXME: This check is bogus since user can set the initial value. 61 // FIXME: This check is bogus since user can set the initial value.
62 if (textAlign != ComputedStyle::initialTextAlign()) 62 if (textAlign != ComputedStyle::initialTextAlign())
63 return LayoutBlockFlow::adjustInlineDirectionLineBounds( 63 return LayoutBlockFlow::adjustInlineDirectionLineBounds(
(...skipping 12 matching lines...) Expand all
76 76
77 logicalLeft += inset / 2; 77 logicalLeft += inset / 2;
78 logicalWidth -= inset; 78 logicalWidth -= inset;
79 } 79 }
80 80
81 bool LayoutRubyText::avoidsFloats() const { 81 bool LayoutRubyText::avoidsFloats() const {
82 return true; 82 return true;
83 } 83 }
84 84
85 } // namespace blink 85 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698