| 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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 bool makeIdentity = true; | 243 bool makeIdentity = true; |
| 244 style->setTransform(TransformOperations(makeIdentity)); | 244 style->setTransform(TransformOperations(makeIdentity)); |
| 245 } | 245 } |
| 246 | 246 |
| 247 if (doesNotInheritTextDecoration(style, e)) | 247 if (doesNotInheritTextDecoration(style, e)) |
| 248 style->setTextDecorationsInEffect(style->textDecoration()); | 248 style->setTextDecorationsInEffect(style->textDecoration()); |
| 249 else | 249 else |
| 250 style->addToTextDecorationsInEffect(style->textDecoration()); | 250 style->addToTextDecorationsInEffect(style->textDecoration()); |
| 251 | 251 |
| 252 if (style->overflowX() != OVISIBLE || style->overflowY() != OVISIBLE) | 252 if (style->overflowX() != OVISIBLE || style->overflowY() != OVISIBLE) |
| 253 adjustOverflow(style, e); | 253 adjustOverflow(style); |
| 254 | 254 |
| 255 // Cull out any useless layers and also repeat patterns into additional laye
rs. | 255 // Cull out any useless layers and also repeat patterns into additional laye
rs. |
| 256 style->adjustBackgroundLayers(); | 256 style->adjustBackgroundLayers(); |
| 257 style->adjustMaskLayers(); | 257 style->adjustMaskLayers(); |
| 258 | 258 |
| 259 // Let the theme also have a crack at adjusting the style. | 259 // Let the theme also have a crack at adjusting the style. |
| 260 if (style->hasAppearance()) | 260 if (style->hasAppearance()) |
| 261 RenderTheme::theme().adjustStyle(style, e, m_cachedUAStyle); | 261 RenderTheme::theme().adjustStyle(style, e, m_cachedUAStyle); |
| 262 | 262 |
| 263 // If we have first-letter pseudo style, transitions, or animations, do not
share this style. | 263 // If we have first-letter pseudo style, transitions, or animations, do not
share this style. |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 // since the theme will alter fonts and heights/widths. | 371 // since the theme will alter fonts and heights/widths. |
| 372 // | 372 // |
| 373 // Don't apply intrinsic margins to image buttons. The designer knows ho
w big the images are, | 373 // Don't apply intrinsic margins to image buttons. The designer knows ho
w big the images are, |
| 374 // so we have to treat all image buttons as though they were explicitly
sized. | 374 // so we have to treat all image buttons as though they were explicitly
sized. |
| 375 if (style->fontSize() >= 11 && (!isHTMLInputElement(element) || !toHTMLI
nputElement(element).isImageButton())) | 375 if (style->fontSize() >= 11 && (!isHTMLInputElement(element) || !toHTMLI
nputElement(element).isImageButton())) |
| 376 addIntrinsicMargins(style); | 376 addIntrinsicMargins(style); |
| 377 return; | 377 return; |
| 378 } | 378 } |
| 379 } | 379 } |
| 380 | 380 |
| 381 void StyleAdjuster::adjustOverflow(RenderStyle* style, Element* element) | 381 void StyleAdjuster::adjustOverflow(RenderStyle* style) |
| 382 { | 382 { |
| 383 ASSERT(style->overflowX() != OVISIBLE || style->overflowY() != OVISIBLE); | 383 ASSERT(style->overflowX() != OVISIBLE || style->overflowY() != OVISIBLE); |
| 384 | 384 |
| 385 // If either overflow value is not visible, change to auto. | 385 // If either overflow value is not visible, change to auto. |
| 386 if (style->overflowX() == OVISIBLE && style->overflowY() != OVISIBLE) { | 386 if (style->overflowX() == OVISIBLE && style->overflowY() != OVISIBLE) { |
| 387 // FIXME: Once we implement pagination controls, overflow-x should defau
lt to hidden | 387 // FIXME: Once we implement pagination controls, overflow-x should defau
lt to hidden |
| 388 // if overflow-y is set to -webkit-paged-x or -webkit-page-y. For now, w
e'll let it | 388 // if overflow-y is set to -webkit-paged-x or -webkit-page-y. For now, w
e'll let it |
| 389 // default to auto so we can at least scroll through the pages. | 389 // default to auto so we can at least scroll through the pages. |
| 390 style->setOverflowX(OAUTO); | 390 style->setOverflowX(OAUTO); |
| 391 } else if (style->overflowY() == OVISIBLE && style->overflowX() != OVISIBLE)
{ | 391 } else if (style->overflowY() == OVISIBLE && style->overflowX() != OVISIBLE)
{ |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 446 if (style->writingMode() != TopToBottomWritingMode && (style->display() == B
OX || style->display() == INLINE_BOX)) | 446 if (style->writingMode() != TopToBottomWritingMode && (style->display() == B
OX || style->display() == INLINE_BOX)) |
| 447 style->setWritingMode(TopToBottomWritingMode); | 447 style->setWritingMode(TopToBottomWritingMode); |
| 448 | 448 |
| 449 if (isDisplayFlexibleBox(parentStyle->display()) || isDisplayGridBox(parentS
tyle->display())) { | 449 if (isDisplayFlexibleBox(parentStyle->display()) || isDisplayGridBox(parentS
tyle->display())) { |
| 450 style->setFloating(NoFloat); | 450 style->setFloating(NoFloat); |
| 451 style->setDisplay(equivalentBlockDisplay(style->display(), style->isFloa
ting(), !m_useQuirksModeStyles)); | 451 style->setDisplay(equivalentBlockDisplay(style->display(), style->isFloa
ting(), !m_useQuirksModeStyles)); |
| 452 } | 452 } |
| 453 } | 453 } |
| 454 | 454 |
| 455 } | 455 } |
| OLD | NEW |