Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) | 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. |
| 4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. | 4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 181 | 181 |
| 182 if (oldStyle->display() != newStyle->display() | 182 if (oldStyle->display() != newStyle->display() |
| 183 || oldStyle->hasPseudoStyle(FIRST_LETTER) != newStyle->hasPseudoStyle(FI RST_LETTER) | 183 || oldStyle->hasPseudoStyle(FIRST_LETTER) != newStyle->hasPseudoStyle(FI RST_LETTER) |
| 184 || oldStyle->columnSpan() != newStyle->columnSpan() | 184 || oldStyle->columnSpan() != newStyle->columnSpan() |
| 185 || !oldStyle->contentDataEquivalent(newStyle) | 185 || !oldStyle->contentDataEquivalent(newStyle) |
| 186 || oldStyle->hasTextCombine() != newStyle->hasTextCombine() | 186 || oldStyle->hasTextCombine() != newStyle->hasTextCombine() |
| 187 || oldStyle->justifyItems() != newStyle->justifyItems() | 187 || oldStyle->justifyItems() != newStyle->justifyItems() |
| 188 || oldStyle->alignItems() != newStyle->alignItems()) | 188 || oldStyle->alignItems() != newStyle->alignItems()) |
| 189 return Reattach; | 189 return Reattach; |
| 190 | 190 |
| 191 if (oldStyle->inheritedNotEqual(*newStyle) | 191 if (oldStyle->inheritedNotEqual(*newStyle)) |
| 192 || oldStyle->hasExplicitlyInheritedProperties() | |
| 193 || newStyle->hasExplicitlyInheritedProperties()) | |
| 194 return Inherit; | 192 return Inherit; |
| 195 | 193 |
| 196 if (*oldStyle == *newStyle) | 194 if (*oldStyle == *newStyle) |
| 197 return diffPseudoStyles(*oldStyle, *newStyle); | 195 return diffPseudoStyles(*oldStyle, *newStyle); |
| 198 | 196 |
| 197 if (oldStyle->hasExplicitlyInheritedProperties()) | |
| 198 return Inherit; | |
| 199 | |
| 199 return NoInherit; | 200 return NoInherit; |
| 200 } | 201 } |
| 201 | 202 |
| 202 ItemPosition LayoutStyle::resolveAlignment(const LayoutStyle& parentStyle, const LayoutStyle& childStyle, ItemPosition resolvedAutoPositionForRenderer) | 203 ItemPosition LayoutStyle::resolveAlignment(const LayoutStyle& parentStyle, const LayoutStyle& childStyle, ItemPosition resolvedAutoPositionForRenderer) |
| 203 { | 204 { |
| 204 // The auto keyword computes to the parent's align-items computed value, or to "stretch", if not set or "auto". | 205 // The auto keyword computes to the parent's align-items computed value, or to "stretch", if not set or "auto". |
| 205 if (childStyle.alignSelf() == ItemPositionAuto) | 206 if (childStyle.alignSelf() == ItemPositionAuto) |
| 206 return (parentStyle.alignItems() == ItemPositionAuto) ? resolvedAutoPosi tionForRenderer : parentStyle.alignItems(); | 207 return (parentStyle.alignItems() == ItemPositionAuto) ? resolvedAutoPosi tionForRenderer : parentStyle.alignItems(); |
| 207 return childStyle.alignSelf(); | 208 return childStyle.alignSelf(); |
| 208 } | 209 } |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 244 noninherited_flags.overflowY = other.noninherited_flags.overflowY; | 245 noninherited_flags.overflowY = other.noninherited_flags.overflowY; |
| 245 noninherited_flags.verticalAlign = other.noninherited_flags.verticalAlign; | 246 noninherited_flags.verticalAlign = other.noninherited_flags.verticalAlign; |
| 246 noninherited_flags.clear = other.noninherited_flags.clear; | 247 noninherited_flags.clear = other.noninherited_flags.clear; |
| 247 noninherited_flags.position = other.noninherited_flags.position; | 248 noninherited_flags.position = other.noninherited_flags.position; |
| 248 noninherited_flags.floating = other.noninherited_flags.floating; | 249 noninherited_flags.floating = other.noninherited_flags.floating; |
| 249 noninherited_flags.tableLayout = other.noninherited_flags.tableLayout; | 250 noninherited_flags.tableLayout = other.noninherited_flags.tableLayout; |
| 250 noninherited_flags.unicodeBidi = other.noninherited_flags.unicodeBidi; | 251 noninherited_flags.unicodeBidi = other.noninherited_flags.unicodeBidi; |
| 251 noninherited_flags.pageBreakBefore = other.noninherited_flags.pageBreakBefor e; | 252 noninherited_flags.pageBreakBefore = other.noninherited_flags.pageBreakBefor e; |
| 252 noninherited_flags.pageBreakAfter = other.noninherited_flags.pageBreakAfter; | 253 noninherited_flags.pageBreakAfter = other.noninherited_flags.pageBreakAfter; |
| 253 noninherited_flags.pageBreakInside = other.noninherited_flags.pageBreakInsid e; | 254 noninherited_flags.pageBreakInside = other.noninherited_flags.pageBreakInsid e; |
| 254 noninherited_flags.explicitInheritance = other.noninherited_flags.explicitIn heritance; | |
|
esprehn
2015/02/13 02:29:13
Why is it okay not to copy this bit? This seems to
| |
| 255 noninherited_flags.hasViewportUnits = other.noninherited_flags.hasViewportUn its; | 255 noninherited_flags.hasViewportUnits = other.noninherited_flags.hasViewportUn its; |
| 256 if (m_svgStyle != other.m_svgStyle) | 256 if (m_svgStyle != other.m_svgStyle) |
| 257 m_svgStyle.access()->copyNonInheritedFrom(other.m_svgStyle.get()); | 257 m_svgStyle.access()->copyNonInheritedFrom(other.m_svgStyle.get()); |
| 258 ASSERT(zoom() == initialZoom()); | 258 ASSERT(zoom() == initialZoom()); |
| 259 } | 259 } |
| 260 | 260 |
| 261 bool LayoutStyle::operator==(const LayoutStyle& o) const | 261 bool LayoutStyle::operator==(const LayoutStyle& o) const |
| 262 { | 262 { |
| 263 // compare everything except the pseudoStyle pointer | 263 // compare everything except the pseudoStyle pointer |
| 264 return inherited_flags == o.inherited_flags | 264 return inherited_flags == o.inherited_flags |
| (...skipping 1401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1666 horizontal || includeLogicalRightEdge); | 1666 horizontal || includeLogicalRightEdge); |
| 1667 | 1667 |
| 1668 edges[BSLeft] = BorderEdge(borderLeftWidth(), | 1668 edges[BSLeft] = BorderEdge(borderLeftWidth(), |
| 1669 visitedDependentColor(CSSPropertyBorderLeftColor), | 1669 visitedDependentColor(CSSPropertyBorderLeftColor), |
| 1670 borderLeftStyle(), | 1670 borderLeftStyle(), |
| 1671 borderLeftIsTransparent(), | 1671 borderLeftIsTransparent(), |
| 1672 !horizontal || includeLogicalLeftEdge); | 1672 !horizontal || includeLogicalLeftEdge); |
| 1673 } | 1673 } |
| 1674 | 1674 |
| 1675 } // namespace blink | 1675 } // namespace blink |
| OLD | NEW |