| 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 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 // If either overflow value is not visible, change to auto. | 404 // If either overflow value is not visible, change to auto. |
| 405 if (style->overflowX() == OVISIBLE && style->overflowY() != OVISIBLE) { | 405 if (style->overflowX() == OVISIBLE && style->overflowY() != OVISIBLE) { |
| 406 // FIXME: Once we implement pagination controls, overflow-x should defau
lt to hidden | 406 // FIXME: Once we implement pagination controls, overflow-x should defau
lt to hidden |
| 407 // if overflow-y is set to -webkit-paged-x or -webkit-page-y. For now, w
e'll let it | 407 // if overflow-y is set to -webkit-paged-x or -webkit-page-y. For now, w
e'll let it |
| 408 // default to auto so we can at least scroll through the pages. | 408 // default to auto so we can at least scroll through the pages. |
| 409 style->setOverflowX(OAUTO); | 409 style->setOverflowX(OAUTO); |
| 410 } else if (style->overflowY() == OVISIBLE && style->overflowX() != OVISIBLE)
{ | 410 } else if (style->overflowY() == OVISIBLE && style->overflowX() != OVISIBLE)
{ |
| 411 style->setOverflowY(OAUTO); | 411 style->setOverflowY(OAUTO); |
| 412 } | 412 } |
| 413 | 413 |
| 414 // Table rows, sections and the table itself will support overflow:hidden an
d will ignore scroll/auto. | |
| 415 // FIXME: Eventually table sections will support auto and scroll. | |
| 416 if (style->display() == TABLE || style->display() == INLINE_TABLE | |
| 417 || style->display() == TABLE_ROW_GROUP || style->display() == TABLE_ROW)
{ | |
| 418 if (style->overflowX() != OVISIBLE && style->overflowX() != OHIDDEN) | |
| 419 style->setOverflowX(OVISIBLE); | |
| 420 if (style->overflowY() != OVISIBLE && style->overflowY() != OHIDDEN) | |
| 421 style->setOverflowY(OVISIBLE); | |
| 422 } | |
| 423 | |
| 424 // Menulists should have visible overflow | 414 // Menulists should have visible overflow |
| 425 if (style->appearance() == MenulistPart) { | 415 if (style->appearance() == MenulistPart) { |
| 426 style->setOverflowX(OVISIBLE); | 416 style->setOverflowX(OVISIBLE); |
| 427 style->setOverflowY(OVISIBLE); | 417 style->setOverflowY(OVISIBLE); |
| 428 } | 418 } |
| 429 } | 419 } |
| 430 | 420 |
| 431 void StyleAdjuster::adjustStyleForDisplay(RenderStyle* style, RenderStyle* paren
tStyle) | 421 void StyleAdjuster::adjustStyleForDisplay(RenderStyle* style, RenderStyle* paren
tStyle) |
| 432 { | 422 { |
| 433 if (style->display() == BLOCK && !style->isFloating()) | 423 if (style->display() == BLOCK && !style->isFloating()) |
| (...skipping 25 matching lines...) Expand all Loading... |
| 459 if (style->writingMode() != TopToBottomWritingMode && (style->display() == B
OX || style->display() == INLINE_BOX)) | 449 if (style->writingMode() != TopToBottomWritingMode && (style->display() == B
OX || style->display() == INLINE_BOX)) |
| 460 style->setWritingMode(TopToBottomWritingMode); | 450 style->setWritingMode(TopToBottomWritingMode); |
| 461 | 451 |
| 462 if (parentStyle->isDisplayFlexibleOrGridBox()) { | 452 if (parentStyle->isDisplayFlexibleOrGridBox()) { |
| 463 style->setFloating(NoFloat); | 453 style->setFloating(NoFloat); |
| 464 style->setDisplay(equivalentBlockDisplay(style->display(), style->isFloa
ting(), !m_useQuirksModeStyles)); | 454 style->setDisplay(equivalentBlockDisplay(style->display(), style->isFloa
ting(), !m_useQuirksModeStyles)); |
| 465 } | 455 } |
| 466 } | 456 } |
| 467 | 457 |
| 468 } | 458 } |
| OLD | NEW |