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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 style->setOverflowX(OVISIBLE); | 400 style->setOverflowX(OVISIBLE); |
401 if (style->overflowY() != OVISIBLE && style->overflowY() != OHIDDEN) | 401 if (style->overflowY() != OVISIBLE && style->overflowY() != OHIDDEN) |
402 style->setOverflowY(OVISIBLE); | 402 style->setOverflowY(OVISIBLE); |
403 } | 403 } |
404 | 404 |
405 // Menulists should have visible overflow | 405 // Menulists should have visible overflow |
406 if (style->appearance() == MenulistPart) { | 406 if (style->appearance() == MenulistPart) { |
407 style->setOverflowX(OVISIBLE); | 407 style->setOverflowX(OVISIBLE); |
408 style->setOverflowY(OVISIBLE); | 408 style->setOverflowY(OVISIBLE); |
409 } | 409 } |
410 | |
411 // Spec: http://www.w3.org/TR/SVG/masking.html#OverflowProperty | |
412 if (element && element->isSVGElement()) { | |
413 if (style->overflowY() == OSCROLL) | |
414 style->setOverflowY(OHIDDEN); | |
415 else if (style->overflowY() == OAUTO) | |
416 style->setOverflowY(OVISIBLE); | |
417 | |
418 if (style->overflowX() == OSCROLL) | |
419 style->setOverflowX(OHIDDEN); | |
420 else if (style->overflowX() == OAUTO) | |
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); | |
430 } | |
431 } | 410 } |
432 | 411 |
433 void StyleAdjuster::adjustStyleForDisplay(RenderStyle* style, RenderStyle* paren
tStyle) | 412 void StyleAdjuster::adjustStyleForDisplay(RenderStyle* style, RenderStyle* paren
tStyle) |
434 { | 413 { |
435 if (style->display() == BLOCK && !style->isFloating()) | 414 if (style->display() == BLOCK && !style->isFloating()) |
436 return; | 415 return; |
437 | 416 |
438 // FIXME: Don't support this mutation for pseudo styles like first-letter or
first-line, since it's not completely | 417 // FIXME: Don't support this mutation for pseudo styles like first-letter or
first-line, since it's not completely |
439 // clear how that should work. | 418 // clear how that should work. |
440 if (style->display() == INLINE && style->styleType() == NOPSEUDO && style->w
ritingMode() != parentStyle->writingMode()) | 419 if (style->display() == INLINE && style->styleType() == NOPSEUDO && style->w
ritingMode() != parentStyle->writingMode()) |
(...skipping 26 matching lines...) Expand all Loading... |
467 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)) |
468 style->setWritingMode(TopToBottomWritingMode); | 447 style->setWritingMode(TopToBottomWritingMode); |
469 | 448 |
470 if (isDisplayFlexibleBox(parentStyle->display()) || isDisplayGridBox(parentS
tyle->display())) { | 449 if (isDisplayFlexibleBox(parentStyle->display()) || isDisplayGridBox(parentS
tyle->display())) { |
471 style->setFloating(NoFloat); | 450 style->setFloating(NoFloat); |
472 style->setDisplay(equivalentBlockDisplay(style->display(), style->isFloa
ting(), !m_useQuirksModeStyles)); | 451 style->setDisplay(equivalentBlockDisplay(style->display(), style->isFloa
ting(), !m_useQuirksModeStyles)); |
473 } | 452 } |
474 } | 453 } |
475 | 454 |
476 } | 455 } |
OLD | NEW |