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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutFieldset.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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. 5 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 LayoutRect oldLegendFrameRect = legend->frameRect(); 62 LayoutRect oldLegendFrameRect = legend->frameRect();
63 63
64 if (relayoutChildren) 64 if (relayoutChildren)
65 legend->setNeedsLayoutAndFullPaintInvalidation( 65 legend->setNeedsLayoutAndFullPaintInvalidation(
66 LayoutInvalidationReason::FieldsetChanged); 66 LayoutInvalidationReason::FieldsetChanged);
67 legend->layoutIfNeeded(); 67 legend->layoutIfNeeded();
68 68
69 LayoutUnit logicalLeft; 69 LayoutUnit logicalLeft;
70 if (style()->isLeftToRightDirection()) { 70 if (style()->isLeftToRightDirection()) {
71 switch (legend->style()->textAlign()) { 71 switch (legend->style()->textAlign()) {
72 case ETextAlign::Center: 72 case ETextAlign::kCenter:
73 logicalLeft = (logicalWidth() - logicalWidthForChild(*legend)) / 2; 73 logicalLeft = (logicalWidth() - logicalWidthForChild(*legend)) / 2;
74 break; 74 break;
75 case ETextAlign::Right: 75 case ETextAlign::kRight:
76 logicalLeft = logicalWidth() - borderEnd() - paddingEnd() - 76 logicalLeft = logicalWidth() - borderEnd() - paddingEnd() -
77 logicalWidthForChild(*legend); 77 logicalWidthForChild(*legend);
78 break; 78 break;
79 default: 79 default:
80 logicalLeft = 80 logicalLeft =
81 borderStart() + paddingStart() + marginStartForChild(*legend); 81 borderStart() + paddingStart() + marginStartForChild(*legend);
82 break; 82 break;
83 } 83 }
84 } else { 84 } else {
85 switch (legend->style()->textAlign()) { 85 switch (legend->style()->textAlign()) {
86 case ETextAlign::Left: 86 case ETextAlign::kLeft:
87 logicalLeft = borderStart() + paddingStart(); 87 logicalLeft = borderStart() + paddingStart();
88 break; 88 break;
89 case ETextAlign::Center: { 89 case ETextAlign::kCenter: {
90 // Make sure that the extra pixel goes to the end side in RTL (since 90 // Make sure that the extra pixel goes to the end side in RTL (since
91 // it went to the end side in LTR). 91 // it went to the end side in LTR).
92 LayoutUnit centeredWidth = 92 LayoutUnit centeredWidth =
93 logicalWidth() - logicalWidthForChild(*legend); 93 logicalWidth() - logicalWidthForChild(*legend);
94 logicalLeft = centeredWidth - centeredWidth / 2; 94 logicalLeft = centeredWidth - centeredWidth / 2;
95 break; 95 break;
96 } 96 }
97 default: 97 default:
98 logicalLeft = logicalWidth() - borderStart() - paddingStart() - 98 logicalLeft = logicalWidth() - borderStart() - paddingStart() -
99 marginStartForChild(*legend) - 99 marginStartForChild(*legend) -
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 const LayoutPoint& paintOffset) const { 154 const LayoutPoint& paintOffset) const {
155 FieldsetPainter(*this).paintBoxDecorationBackground(paintInfo, paintOffset); 155 FieldsetPainter(*this).paintBoxDecorationBackground(paintInfo, paintOffset);
156 } 156 }
157 157
158 void LayoutFieldset::paintMask(const PaintInfo& paintInfo, 158 void LayoutFieldset::paintMask(const PaintInfo& paintInfo,
159 const LayoutPoint& paintOffset) const { 159 const LayoutPoint& paintOffset) const {
160 FieldsetPainter(*this).paintMask(paintInfo, paintOffset); 160 FieldsetPainter(*this).paintMask(paintInfo, paintOffset);
161 } 161 }
162 162
163 } // namespace blink 163 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698