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

Side by Side Diff: sky/engine/core/css/resolver/StyleAdjuster.cpp

Issue 739573003: Fix android build. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 case BLOCK: 51 case BLOCK:
52 case FLEX: 52 case FLEX:
53 case INLINE_FLEX: 53 case INLINE_FLEX:
54 case INLINE_BLOCK: 54 case INLINE_BLOCK:
55 return true; 55 return true;
56 56
57 case NONE: 57 case NONE:
58 ASSERT_NOT_REACHED(); 58 ASSERT_NOT_REACHED();
59 return false; 59 return false;
60 } 60 }
61
62 ASSERT_NOT_REACHED();
63 return false;
61 } 64 }
62 65
63 static EDisplay equivalentInlineDisplay(EDisplay display) 66 static EDisplay equivalentInlineDisplay(EDisplay display)
64 { 67 {
65 switch (display) { 68 switch (display) {
66 // TODO(ojan): Do we need an INLINE_PARAGRAPH display? 69 // TODO(ojan): Do we need an INLINE_PARAGRAPH display?
67 case PARAGRAPH: 70 case PARAGRAPH:
68 return INLINE; 71 return INLINE;
69 72
70 case BLOCK: 73 case BLOCK:
71 return INLINE_BLOCK; 74 return INLINE_BLOCK;
72 75
73 case FLEX: 76 case FLEX:
74 return INLINE_FLEX; 77 return INLINE_FLEX;
75 78
76 case INLINE: 79 case INLINE:
77 case INLINE_FLEX: 80 case INLINE_FLEX:
78 case INLINE_BLOCK: 81 case INLINE_BLOCK:
79 return display; 82 return display;
80 83
81 case NONE: 84 case NONE:
82 ASSERT_NOT_REACHED(); 85 ASSERT_NOT_REACHED();
83 return NONE; 86 return NONE;
84 } 87 }
88
89 ASSERT_NOT_REACHED();
90 return NONE;
85 } 91 }
86 92
87 static EDisplay equivalentBlockDisplay(EDisplay display) 93 static EDisplay equivalentBlockDisplay(EDisplay display)
88 { 94 {
89 switch (display) { 95 switch (display) {
90 case PARAGRAPH: 96 case PARAGRAPH:
91 case BLOCK: 97 case BLOCK:
92 case FLEX: 98 case FLEX:
93 return display; 99 return display;
94 100
95 case INLINE_FLEX: 101 case INLINE_FLEX:
96 return FLEX; 102 return FLEX;
97 103
98 case INLINE: 104 case INLINE:
99 case INLINE_BLOCK: 105 case INLINE_BLOCK:
100 return BLOCK; 106 return BLOCK;
101 107
102 case NONE: 108 case NONE:
103 ASSERT_NOT_REACHED(); 109 ASSERT_NOT_REACHED();
104 return NONE; 110 return NONE;
105 } 111 }
112
113 ASSERT_NOT_REACHED();
114 return NONE;
106 } 115 }
107 116
108 // CSS requires text-decoration to be reset at each DOM element for tables, 117 // CSS requires text-decoration to be reset at each DOM element for tables,
109 // inline blocks, inline tables, shadow DOM crossings, floating elements, 118 // inline blocks, inline tables, shadow DOM crossings, floating elements,
110 // and absolute or relatively positioned elements. 119 // and absolute or relatively positioned elements.
111 static bool doesNotInheritTextDecoration(const RenderStyle* style, const Element & e) 120 static bool doesNotInheritTextDecoration(const RenderStyle* style, const Element & e)
112 { 121 {
113 return style->display() == INLINE_BLOCK || isAtShadowBoundary(&e) || style-> hasOutOfFlowPosition(); 122 return style->display() == INLINE_BLOCK || isAtShadowBoundary(&e) || style-> hasOutOfFlowPosition();
114 } 123 }
115 124
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 // FIXME: Once we implement pagination controls, overflow-x should defau lt to hidden 276 // FIXME: Once we implement pagination controls, overflow-x should defau lt to hidden
268 // if overflow-y is set to -webkit-paged-x or -webkit-page-y. For now, w e'll let it 277 // if overflow-y is set to -webkit-paged-x or -webkit-page-y. For now, w e'll let it
269 // default to auto so we can at least scroll through the pages. 278 // default to auto so we can at least scroll through the pages.
270 style->setOverflowX(OAUTO); 279 style->setOverflowX(OAUTO);
271 } else if (style->overflowY() == OVISIBLE && style->overflowX() != OVISIBLE) { 280 } else if (style->overflowY() == OVISIBLE && style->overflowX() != OVISIBLE) {
272 style->setOverflowY(OAUTO); 281 style->setOverflowY(OAUTO);
273 } 282 }
274 } 283 }
275 284
276 } 285 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698