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

Side by Side Diff: Source/core/frame/FrameView.cpp

Issue 220853002: SVG does not respect overflow:visible. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: overflow affects root svg's scrollbars 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) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 void FrameView::applyOverflowToViewportAndSetRenderer(RenderObject* o, Scrollbar Mode& hMode, ScrollbarMode& vMode) 518 void FrameView::applyOverflowToViewportAndSetRenderer(RenderObject* o, Scrollbar Mode& hMode, ScrollbarMode& vMode)
519 { 519 {
520 // Handle the overflow:hidden/scroll case for the body/html elements. WinIE treats 520 // Handle the overflow:hidden/scroll case for the body/html elements. WinIE treats
521 // overflow:hidden and overflow:scroll on <body> as applying to the document 's 521 // overflow:hidden and overflow:scroll on <body> as applying to the document 's
522 // scrollbars. The CSS2.1 draft states that HTML UAs should use the <html> or <body> element and XML/XHTML UAs should 522 // scrollbars. The CSS2.1 draft states that HTML UAs should use the <html> or <body> element and XML/XHTML UAs should
523 // use the root element. 523 // use the root element.
524 524
525 EOverflow overflowX = o->style()->overflowX(); 525 EOverflow overflowX = o->style()->overflowX();
526 EOverflow overflowY = o->style()->overflowY(); 526 EOverflow overflowY = o->style()->overflowY();
527 527
528 if (o->isSVGRoot()) {
529 // overflow is ignored in stand-alone SVG documents.
530 if (!toRenderSVGRoot(o)->isEmbeddedThroughFrameContainingSVGDocument())
531 return;
532 overflowX = OHIDDEN;
533 overflowY = OHIDDEN;
534 }
535
536 bool ignoreOverflowHidden = false; 528 bool ignoreOverflowHidden = false;
537 if (m_frame->settings()->ignoreMainFrameOverflowHiddenQuirk() && m_frame->is MainFrame()) 529 if (m_frame->settings()->ignoreMainFrameOverflowHiddenQuirk() && m_frame->is MainFrame())
538 ignoreOverflowHidden = true; 530 ignoreOverflowHidden = true;
539 531
540 switch (overflowX) { 532 switch (overflowX) {
541 case OHIDDEN: 533 case OHIDDEN:
542 if (!ignoreOverflowHidden) 534 if (!ignoreOverflowHidden)
543 hMode = ScrollbarAlwaysOff; 535 hMode = ScrollbarAlwaysOff;
544 break; 536 break;
545 case OSCROLL: 537 case OSCROLL:
(...skipping 2658 matching lines...) Expand 10 before | Expand all | Expand 10 after
3204 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation) 3196 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation)
3205 { 3197 {
3206 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); 3198 ScrollableArea::willRemoveScrollbar(scrollbar, orientation);
3207 if (AXObjectCache* cache = axObjectCache()) { 3199 if (AXObjectCache* cache = axObjectCache()) {
3208 cache->remove(scrollbar); 3200 cache->remove(scrollbar);
3209 cache->handleScrollbarUpdate(this); 3201 cache->handleScrollbarUpdate(this);
3210 } 3202 }
3211 } 3203 }
3212 3204
3213 } // namespace WebCore 3205 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698