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

Side by Side Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp

Issue 2569013006: Changed EOverflow to an enum class and renamed its members (Closed)
Patch Set: Rebase Created 4 years 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) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2007, 2008, 2009 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2007, 2008, 2009 Rob Buis <buis@kde.org>
4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org>
5 * Copyright (C) 2009 Google, Inc. 5 * Copyright (C) 2009 Google, Inc.
6 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 invalidateBackgroundObscurationStatus(); 208 invalidateBackgroundObscurationStatus();
209 209
210 clearNeedsLayout(); 210 clearNeedsLayout();
211 } 211 }
212 212
213 bool LayoutSVGRoot::shouldApplyViewportClip() const { 213 bool LayoutSVGRoot::shouldApplyViewportClip() const {
214 // the outermost svg is clipped if auto, and svg document roots are always 214 // the outermost svg is clipped if auto, and svg document roots are always
215 // clipped. When the svg is stand-alone (isDocumentElement() == true) the 215 // clipped. When the svg is stand-alone (isDocumentElement() == true) the
216 // viewport clipping should always be applied, noting that the window 216 // viewport clipping should always be applied, noting that the window
217 // scrollbars should be hidden if overflow=hidden. 217 // scrollbars should be hidden if overflow=hidden.
218 return style()->overflowX() == OverflowHidden || 218 return style()->overflowX() == EOverflow::Hidden ||
219 style()->overflowX() == OverflowAuto || 219 style()->overflowX() == EOverflow::Auto ||
220 style()->overflowX() == OverflowScroll || this->isDocumentElement(); 220 style()->overflowX() == EOverflow::Scroll || this->isDocumentElement();
221 } 221 }
222 222
223 LayoutRect LayoutSVGRoot::visualOverflowRect() const { 223 LayoutRect LayoutSVGRoot::visualOverflowRect() const {
224 LayoutRect rect = LayoutReplaced::selfVisualOverflowRect(); 224 LayoutRect rect = LayoutReplaced::selfVisualOverflowRect();
225 if (!shouldApplyViewportClip()) 225 if (!shouldApplyViewportClip())
226 rect.unite(contentsVisualOverflowRect()); 226 rect.unite(contentsVisualOverflowRect());
227 return rect; 227 return rect;
228 } 228 }
229 229
230 LayoutRect LayoutSVGRoot::overflowClipRect(const LayoutPoint& location, 230 LayoutRect LayoutSVGRoot::overflowClipRect(const LayoutPoint& location,
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 if (result.addNodeToListBasedTestResult(node(), locationInContainer, 481 if (result.addNodeToListBasedTestResult(node(), locationInContainer,
482 boundsRect) == StopHitTesting) 482 boundsRect) == StopHitTesting)
483 return true; 483 return true;
484 } 484 }
485 } 485 }
486 486
487 return false; 487 return false;
488 } 488 }
489 489
490 } // namespace blink 490 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698