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 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 if (element && element->isSVGElement()) { | 412 if (element && element->isSVGElement()) { |
413 if (style->overflowY() == OSCROLL) | 413 if (style->overflowY() == OSCROLL) |
414 style->setOverflowY(OHIDDEN); | 414 style->setOverflowY(OHIDDEN); |
415 else if (style->overflowY() == OAUTO) | 415 else if (style->overflowY() == OAUTO) |
416 style->setOverflowY(OVISIBLE); | 416 style->setOverflowY(OVISIBLE); |
417 | 417 |
418 if (style->overflowX() == OSCROLL) | 418 if (style->overflowX() == OSCROLL) |
419 style->setOverflowX(OHIDDEN); | 419 style->setOverflowX(OHIDDEN); |
420 else if (style->overflowX() == OAUTO) | 420 else if (style->overflowX() == OAUTO) |
421 style->setOverflowX(OVISIBLE); | 421 style->setOverflowX(OVISIBLE); |
| 422 |
| 423 if (style->overflowX() == style->overflowY()) |
| 424 return; |
| 425 |
| 426 if (style->overflowX() != OVISIBLE) |
| 427 style->setOverflowX(OVISIBLE); |
| 428 else |
| 429 style->setOverflowY(OVISIBLE); |
422 } | 430 } |
423 } | 431 } |
424 | 432 |
425 void StyleAdjuster::adjustStyleForDisplay(RenderStyle* style, RenderStyle* paren
tStyle) | 433 void StyleAdjuster::adjustStyleForDisplay(RenderStyle* style, RenderStyle* paren
tStyle) |
426 { | 434 { |
427 if (style->display() == BLOCK && !style->isFloating()) | 435 if (style->display() == BLOCK && !style->isFloating()) |
428 return; | 436 return; |
429 | 437 |
430 // FIXME: Don't support this mutation for pseudo styles like first-letter or
first-line, since it's not completely | 438 // FIXME: Don't support this mutation for pseudo styles like first-letter or
first-line, since it's not completely |
431 // clear how that should work. | 439 // clear how that should work. |
(...skipping 27 matching lines...) Expand all Loading... |
459 if (style->writingMode() != TopToBottomWritingMode && (style->display() == B
OX || style->display() == INLINE_BOX)) | 467 if (style->writingMode() != TopToBottomWritingMode && (style->display() == B
OX || style->display() == INLINE_BOX)) |
460 style->setWritingMode(TopToBottomWritingMode); | 468 style->setWritingMode(TopToBottomWritingMode); |
461 | 469 |
462 if (isDisplayFlexibleBox(parentStyle->display()) || isDisplayGridBox(parentS
tyle->display())) { | 470 if (isDisplayFlexibleBox(parentStyle->display()) || isDisplayGridBox(parentS
tyle->display())) { |
463 style->setFloating(NoFloat); | 471 style->setFloating(NoFloat); |
464 style->setDisplay(equivalentBlockDisplay(style->display(), style->isFloa
ting(), !m_useQuirksModeStyles)); | 472 style->setDisplay(equivalentBlockDisplay(style->display(), style->isFloa
ting(), !m_useQuirksModeStyles)); |
465 } | 473 } |
466 } | 474 } |
467 | 475 |
468 } | 476 } |
OLD | NEW |