Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: Source/core/css/resolver/StyleAdjuster.cpp

Issue 220853002: SVG does not respect overflow:visible. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 410
411 // Spec: http://www.w3.org/TR/SVG/masking.html#OverflowProperty 411 // Spec: http://www.w3.org/TR/SVG/masking.html#OverflowProperty
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)
416 style->setOverflowY(OVISIBLE);
417 415
418 if (style->overflowX() == OSCROLL) 416 if (style->overflowX() == OSCROLL)
419 style->setOverflowX(OHIDDEN); 417 style->setOverflowX(OHIDDEN);
420 else if (style->overflowX() == OAUTO)
421 style->setOverflowX(OVISIBLE);
422 } 418 }
423 } 419 }
424 420
425 void StyleAdjuster::adjustStyleForDisplay(RenderStyle* style, RenderStyle* paren tStyle) 421 void StyleAdjuster::adjustStyleForDisplay(RenderStyle* style, RenderStyle* paren tStyle)
426 { 422 {
427 if (style->display() == BLOCK && !style->isFloating()) 423 if (style->display() == BLOCK && !style->isFloating())
428 return; 424 return;
429 425
430 // FIXME: Don't support this mutation for pseudo styles like first-letter or first-line, since it's not completely 426 // 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. 427 // clear how that should work.
(...skipping 27 matching lines...) Expand all
459 if (style->writingMode() != TopToBottomWritingMode && (style->display() == B OX || style->display() == INLINE_BOX)) 455 if (style->writingMode() != TopToBottomWritingMode && (style->display() == B OX || style->display() == INLINE_BOX))
460 style->setWritingMode(TopToBottomWritingMode); 456 style->setWritingMode(TopToBottomWritingMode);
461 457
462 if (isDisplayFlexibleBox(parentStyle->display()) || isDisplayGridBox(parentS tyle->display())) { 458 if (isDisplayFlexibleBox(parentStyle->display()) || isDisplayGridBox(parentS tyle->display())) {
463 style->setFloating(NoFloat); 459 style->setFloating(NoFloat);
464 style->setDisplay(equivalentBlockDisplay(style->display(), style->isFloa ting(), !m_useQuirksModeStyles)); 460 style->setDisplay(equivalentBlockDisplay(style->display(), style->isFloa ting(), !m_useQuirksModeStyles));
465 } 461 }
466 } 462 }
467 463
468 } 464 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698