| 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 | 179 |
| 180 if (oldStyle->display() != newStyle->display() | 180 if (oldStyle->display() != newStyle->display() |
| 181 || oldStyle->hasPseudoStyle(FIRST_LETTER) != newStyle->hasPseudoStyle(FI
RST_LETTER) | 181 || oldStyle->hasPseudoStyle(FIRST_LETTER) != newStyle->hasPseudoStyle(FI
RST_LETTER) |
| 182 || oldStyle->columnSpan() != newStyle->columnSpan() | 182 || oldStyle->columnSpan() != newStyle->columnSpan() |
| 183 || !oldStyle->contentDataEquivalent(newStyle) | 183 || !oldStyle->contentDataEquivalent(newStyle) |
| 184 || oldStyle->hasTextCombine() != newStyle->hasTextCombine() | 184 || oldStyle->hasTextCombine() != newStyle->hasTextCombine() |
| 185 || oldStyle->justifyItems() != newStyle->justifyItems() | 185 || oldStyle->justifyItems() != newStyle->justifyItems() |
| 186 || oldStyle->alignItems() != newStyle->alignItems()) | 186 || oldStyle->alignItems() != newStyle->alignItems()) |
| 187 return Reattach; | 187 return Reattach; |
| 188 | 188 |
| 189 if (*oldStyle == *newStyle) | |
| 190 return diffPseudoStyles(oldStyle, newStyle); | |
| 191 | |
| 192 if (oldStyle->inheritedNotEqual(newStyle) | 189 if (oldStyle->inheritedNotEqual(newStyle) |
| 193 || oldStyle->hasExplicitlyInheritedProperties() | 190 || oldStyle->hasExplicitlyInheritedProperties() |
| 194 || newStyle->hasExplicitlyInheritedProperties()) | 191 || newStyle->hasExplicitlyInheritedProperties()) |
| 195 return Inherit; | 192 return Inherit; |
| 196 | 193 |
| 194 if (*oldStyle == *newStyle) |
| 195 return diffPseudoStyles(oldStyle, newStyle); |
| 196 |
| 197 return NoInherit; | 197 return NoInherit; |
| 198 } | 198 } |
| 199 | 199 |
| 200 ItemPosition RenderStyle::resolveAlignment(const RenderStyle* parentStyle, const
RenderStyle* childStyle, ItemPosition resolvedAutoPositionForRenderer) | 200 ItemPosition RenderStyle::resolveAlignment(const RenderStyle* parentStyle, const
RenderStyle* childStyle, ItemPosition resolvedAutoPositionForRenderer) |
| 201 { | 201 { |
| 202 // The auto keyword computes to the parent's align-items computed value, or
to "stretch", if not set or "auto". | 202 // The auto keyword computes to the parent's align-items computed value, or
to "stretch", if not set or "auto". |
| 203 if (childStyle->alignSelf() == ItemPositionAuto) | 203 if (childStyle->alignSelf() == ItemPositionAuto) |
| 204 return (parentStyle->alignItems() == ItemPositionAuto) ? resolvedAutoPos
itionForRenderer : parentStyle->alignItems(); | 204 return (parentStyle->alignItems() == ItemPositionAuto) ? resolvedAutoPos
itionForRenderer : parentStyle->alignItems(); |
| 205 return childStyle->alignSelf(); | 205 return childStyle->alignSelf(); |
| 206 } | 206 } |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 if (pseudoStyle->styleType() == pid) { | 332 if (pseudoStyle->styleType() == pid) { |
| 333 m_cachedPseudoStyles->remove(i); | 333 m_cachedPseudoStyles->remove(i); |
| 334 return; | 334 return; |
| 335 } | 335 } |
| 336 } | 336 } |
| 337 } | 337 } |
| 338 | 338 |
| 339 bool RenderStyle::inheritedNotEqual(const RenderStyle* other) const | 339 bool RenderStyle::inheritedNotEqual(const RenderStyle* other) const |
| 340 { | 340 { |
| 341 return inherited_flags != other->inherited_flags | 341 return inherited_flags != other->inherited_flags |
| 342 || inherited != other->inherited | 342 || inherited != other->inherited |
| 343 || m_svgStyle->inheritedNotEqual(other->m_svgStyle.get()) | 343 || font().loadingCustomFonts() != other->font().loadingCustomFonts() |
| 344 || rareInheritedData != other->rareInheritedData; | 344 || m_svgStyle->inheritedNotEqual(other->m_svgStyle.get()) |
| 345 || rareInheritedData != other->rareInheritedData; |
| 345 } | 346 } |
| 346 | 347 |
| 347 bool RenderStyle::inheritedDataShared(const RenderStyle* other) const | 348 bool RenderStyle::inheritedDataShared(const RenderStyle* other) const |
| 348 { | 349 { |
| 349 // This is a fast check that only looks if the data structures are shared. | 350 // This is a fast check that only looks if the data structures are shared. |
| 350 return inherited_flags == other->inherited_flags | 351 return inherited_flags == other->inherited_flags |
| 351 && inherited.get() == other->inherited.get() | 352 && inherited.get() == other->inherited.get() |
| 352 && m_svgStyle.get() == other->m_svgStyle.get() | 353 && m_svgStyle.get() == other->m_svgStyle.get() |
| 353 && rareInheritedData.get() == other->rareInheritedData.get(); | 354 && rareInheritedData.get() == other->rareInheritedData.get(); |
| 354 } | 355 } |
| (...skipping 1307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1662 horizontal || includeLogicalRightEdge); | 1663 horizontal || includeLogicalRightEdge); |
| 1663 | 1664 |
| 1664 edges[BSLeft] = BorderEdge(borderLeftWidth(), | 1665 edges[BSLeft] = BorderEdge(borderLeftWidth(), |
| 1665 visitedDependentColor(CSSPropertyBorderLeftColor), | 1666 visitedDependentColor(CSSPropertyBorderLeftColor), |
| 1666 borderLeftStyle(), | 1667 borderLeftStyle(), |
| 1667 borderLeftIsTransparent(), | 1668 borderLeftIsTransparent(), |
| 1668 !horizontal || includeLogicalLeftEdge); | 1669 !horizontal || includeLogicalLeftEdge); |
| 1669 } | 1670 } |
| 1670 | 1671 |
| 1671 } // namespace blink | 1672 } // namespace blink |
| OLD | NEW |