| 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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 if (RuntimeEnabledFeatures::cssCompositingEnabled()) | 187 if (RuntimeEnabledFeatures::cssCompositingEnabled()) |
| 188 return true; | 188 return true; |
| 189 break; | 189 break; |
| 190 default: | 190 default: |
| 191 break; | 191 break; |
| 192 } | 192 } |
| 193 } | 193 } |
| 194 return false; | 194 return false; |
| 195 } | 195 } |
| 196 | 196 |
| 197 void StyleAdjuster::adjustRenderStyle(RenderStyle* style, RenderStyle* parentSty
le, Element *e) | 197 void StyleAdjuster::adjustRenderStyle(RenderStyle* style, RenderStyle* parentSty
le, Element *e, const CachedUAStyle* cachedUAStyle) |
| 198 { | 198 { |
| 199 ASSERT(parentStyle); | 199 ASSERT(parentStyle); |
| 200 | 200 |
| 201 // Cache our original display. | 201 // Cache our original display. |
| 202 style->setOriginalDisplay(style->display()); | 202 style->setOriginalDisplay(style->display()); |
| 203 | 203 |
| 204 if (style->display() != NONE) { | 204 if (style->display() != NONE) { |
| 205 if (e) | 205 if (e) |
| 206 adjustStyleForTagName(style, parentStyle, *e); | 206 adjustStyleForTagName(style, parentStyle, *e); |
| 207 | 207 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 | 252 |
| 253 if (style->overflowX() != OVISIBLE || style->overflowY() != OVISIBLE) | 253 if (style->overflowX() != OVISIBLE || style->overflowY() != OVISIBLE) |
| 254 adjustOverflow(style); | 254 adjustOverflow(style); |
| 255 | 255 |
| 256 // Cull out any useless layers and also repeat patterns into additional laye
rs. | 256 // Cull out any useless layers and also repeat patterns into additional laye
rs. |
| 257 style->adjustBackgroundLayers(); | 257 style->adjustBackgroundLayers(); |
| 258 style->adjustMaskLayers(); | 258 style->adjustMaskLayers(); |
| 259 | 259 |
| 260 // Let the theme also have a crack at adjusting the style. | 260 // Let the theme also have a crack at adjusting the style. |
| 261 if (style->hasAppearance()) | 261 if (style->hasAppearance()) |
| 262 RenderTheme::theme().adjustStyle(style, e, m_cachedUAStyle); | 262 RenderTheme::theme().adjustStyle(style, e, cachedUAStyle); |
| 263 | 263 |
| 264 // If we have first-letter pseudo style, transitions, or animations, do not
share this style. | 264 // If we have first-letter pseudo style, transitions, or animations, do not
share this style. |
| 265 if (style->hasPseudoStyle(FIRST_LETTER) || style->transitions() || style->an
imations()) | 265 if (style->hasPseudoStyle(FIRST_LETTER) || style->transitions() || style->an
imations()) |
| 266 style->setUnique(); | 266 style->setUnique(); |
| 267 | 267 |
| 268 // FIXME: when dropping the -webkit prefix on transform-style, we should als
o have opacity < 1 cause flattening. | 268 // FIXME: when dropping the -webkit prefix on transform-style, we should als
o have opacity < 1 cause flattening. |
| 269 if (style->preserves3D() && (style->overflowX() != OVISIBLE | 269 if (style->preserves3D() && (style->overflowX() != OVISIBLE |
| 270 || style->overflowY() != OVISIBLE | 270 || style->overflowY() != OVISIBLE |
| 271 || style->hasFilter())) | 271 || style->hasFilter())) |
| 272 style->setTransformStyle3D(TransformStyle3DFlat); | 272 style->setTransformStyle3D(TransformStyle3DFlat); |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 if (style->writingMode() != TopToBottomWritingMode && (style->display() == B
OX || style->display() == INLINE_BOX)) | 447 if (style->writingMode() != TopToBottomWritingMode && (style->display() == B
OX || style->display() == INLINE_BOX)) |
| 448 style->setWritingMode(TopToBottomWritingMode); | 448 style->setWritingMode(TopToBottomWritingMode); |
| 449 | 449 |
| 450 if (isDisplayFlexibleBox(parentStyle->display()) || isDisplayGridBox(parentS
tyle->display())) { | 450 if (isDisplayFlexibleBox(parentStyle->display()) || isDisplayGridBox(parentS
tyle->display())) { |
| 451 style->setFloating(NoFloat); | 451 style->setFloating(NoFloat); |
| 452 style->setDisplay(equivalentBlockDisplay(style->display(), style->isFloa
ting(), !m_useQuirksModeStyles)); | 452 style->setDisplay(equivalentBlockDisplay(style->display(), style->isFloa
ting(), !m_useQuirksModeStyles)); |
| 453 } | 453 } |
| 454 } | 454 } |
| 455 | 455 |
| 456 } | 456 } |
| OLD | NEW |