| OLD | NEW |
| 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 if (RuntimeEnabledFeatures::cssCompositingEnabled()) | 155 if (RuntimeEnabledFeatures::cssCompositingEnabled()) |
| 156 return true; | 156 return true; |
| 157 break; | 157 break; |
| 158 default: | 158 default: |
| 159 break; | 159 break; |
| 160 } | 160 } |
| 161 } | 161 } |
| 162 return false; | 162 return false; |
| 163 } | 163 } |
| 164 | 164 |
| 165 void StyleAdjuster::adjustRenderStyle(RenderStyle* style, RenderStyle* parentSty
le, Element *e, const CachedUAStyle* cachedUAStyle) | 165 void StyleAdjuster::adjustRenderStyle(RenderStyle* style, RenderStyle* parentSty
le, Element *e, bool uaStyleHasWebkitAppearance, bool valuesUnchangedForWebkitAp
pearance) |
| 166 { | 166 { |
| 167 ASSERT(parentStyle); | 167 ASSERT(parentStyle); |
| 168 | 168 |
| 169 // Cache our original display. | 169 // Cache our original display. |
| 170 style->setOriginalDisplay(style->display()); | 170 style->setOriginalDisplay(style->display()); |
| 171 | 171 |
| 172 if (style->display() != NONE) { | 172 if (style->display() != NONE) { |
| 173 if (e) | 173 if (e) |
| 174 adjustStyleForTagName(style, parentStyle, *e); | 174 adjustStyleForTagName(style, parentStyle, *e); |
| 175 | 175 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 | 219 |
| 220 if (style->overflowX() != OVISIBLE || style->overflowY() != OVISIBLE) | 220 if (style->overflowX() != OVISIBLE || style->overflowY() != OVISIBLE) |
| 221 adjustOverflow(style); | 221 adjustOverflow(style); |
| 222 | 222 |
| 223 // Cull out any useless layers and also repeat patterns into additional laye
rs. | 223 // Cull out any useless layers and also repeat patterns into additional laye
rs. |
| 224 style->adjustBackgroundLayers(); | 224 style->adjustBackgroundLayers(); |
| 225 style->adjustMaskLayers(); | 225 style->adjustMaskLayers(); |
| 226 | 226 |
| 227 // Let the theme also have a crack at adjusting the style. | 227 // Let the theme also have a crack at adjusting the style. |
| 228 if (style->hasAppearance()) | 228 if (style->hasAppearance()) |
| 229 RenderTheme::theme().adjustStyle(style, e, cachedUAStyle); | 229 RenderTheme::theme().adjustStyle(style, e, uaStyleHasWebkitAppearance, v
aluesUnchangedForWebkitAppearance); |
| 230 | 230 |
| 231 // If we have first-letter pseudo style, transitions, or animations, do not
share this style. | 231 // If we have first-letter pseudo style, transitions, or animations, do not
share this style. |
| 232 if (style->hasPseudoStyle(FIRST_LETTER) || style->transitions() || style->an
imations()) | 232 if (style->hasPseudoStyle(FIRST_LETTER) || style->transitions() || style->an
imations()) |
| 233 style->setUnique(); | 233 style->setUnique(); |
| 234 | 234 |
| 235 // FIXME: when dropping the -webkit prefix on transform-style, we should als
o have opacity < 1 cause flattening. | 235 // FIXME: when dropping the -webkit prefix on transform-style, we should als
o have opacity < 1 cause flattening. |
| 236 if (style->preserves3D() && (style->overflowX() != OVISIBLE | 236 if (style->preserves3D() && (style->overflowX() != OVISIBLE |
| 237 || style->overflowY() != OVISIBLE | 237 || style->overflowY() != OVISIBLE |
| 238 || style->hasFilter())) | 238 || style->hasFilter())) |
| 239 style->setTransformStyle3D(TransformStyle3DFlat); | 239 style->setTransformStyle3D(TransformStyle3DFlat); |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 if (style->writingMode() != TopToBottomWritingMode && (style->display() == B
OX || style->display() == INLINE_BOX)) | 398 if (style->writingMode() != TopToBottomWritingMode && (style->display() == B
OX || style->display() == INLINE_BOX)) |
| 399 style->setWritingMode(TopToBottomWritingMode); | 399 style->setWritingMode(TopToBottomWritingMode); |
| 400 | 400 |
| 401 if (parentStyle->isDisplayFlexibleOrGridBox()) { | 401 if (parentStyle->isDisplayFlexibleOrGridBox()) { |
| 402 style->setFloating(NoFloat); | 402 style->setFloating(NoFloat); |
| 403 style->setDisplay(equivalentBlockDisplay(style->display(), style->isFloa
ting(), !m_useQuirksModeStyles)); | 403 style->setDisplay(equivalentBlockDisplay(style->display(), style->isFloa
ting(), !m_useQuirksModeStyles)); |
| 404 } | 404 } |
| 405 } | 405 } |
| 406 | 406 |
| 407 } | 407 } |
| OLD | NEW |