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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSProperty.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 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. 3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 } 46 }
47 47
48 enum LogicalBoxSide { BeforeSide, EndSide, AfterSide, StartSide }; 48 enum LogicalBoxSide { BeforeSide, EndSide, AfterSide, StartSide };
49 enum PhysicalBoxSide { TopSide, RightSide, BottomSide, LeftSide }; 49 enum PhysicalBoxSide { TopSide, RightSide, BottomSide, LeftSide };
50 50
51 static CSSPropertyID resolveToPhysicalProperty( 51 static CSSPropertyID resolveToPhysicalProperty(
52 TextDirection direction, 52 TextDirection direction,
53 WritingMode writingMode, 53 WritingMode writingMode,
54 LogicalBoxSide logicalSide, 54 LogicalBoxSide logicalSide,
55 const StylePropertyShorthand& shorthand) { 55 const StylePropertyShorthand& shorthand) {
56 if (direction == TextDirection::Ltr) { 56 if (direction == TextDirection::kLtr) {
57 if (isHorizontalWritingMode(writingMode)) { 57 if (isHorizontalWritingMode(writingMode)) {
58 // The common case. The logical and physical box sides match. 58 // The common case. The logical and physical box sides match.
59 // Left = Start, Right = End, Before = Top, After = Bottom 59 // Left = Start, Right = End, Before = Top, After = Bottom
60 return shorthand.properties()[logicalSide]; 60 return shorthand.properties()[logicalSide];
61 } 61 }
62 62
63 if (isFlippedLinesWritingMode(writingMode)) { 63 if (isFlippedLinesWritingMode(writingMode)) {
64 // Start = Top, End = Bottom, Before = Left, After = Right. 64 // Start = Top, End = Bottom, Before = Left, After = Right.
65 switch (logicalSide) { 65 switch (logicalSide) {
66 case StartSide: 66 case StartSide:
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 return propertyID != CSSPropertyUnicodeBidi && 287 return propertyID != CSSPropertyUnicodeBidi &&
288 propertyID != CSSPropertyDirection; 288 propertyID != CSSPropertyDirection;
289 } 289 }
290 290
291 bool CSSProperty::operator==(const CSSProperty& other) const { 291 bool CSSProperty::operator==(const CSSProperty& other) const {
292 return m_value->equals(*other.m_value) && 292 return m_value->equals(*other.m_value) &&
293 isImportant() == other.isImportant(); 293 isImportant() == other.isImportant();
294 } 294 }
295 295
296 } // namespace blink 296 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698