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

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

Issue 2181953004: Changed ComputedStyle's EVisibility to be an enum class and fixed naming (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_move_computedstyle_around
Patch Set: Rebase Created 4 years, 4 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) 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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 } 334 }
335 335
336 LayoutRect LayoutSVGRoot::localOverflowRectForPaintInvalidation() const 336 LayoutRect LayoutSVGRoot::localOverflowRectForPaintInvalidation() const
337 { 337 {
338 // This is an open-coded aggregate of SVGLayoutSupport::localOverflowRectFor PaintInvalidation, 338 // This is an open-coded aggregate of SVGLayoutSupport::localOverflowRectFor PaintInvalidation,
339 // and LayoutReplaced::localOverflowRectForPaintInvalidation. 339 // and LayoutReplaced::localOverflowRectForPaintInvalidation.
340 // The reason for this is to optimize/minimize the paint invalidation rect w hen the box is not "decorated" 340 // The reason for this is to optimize/minimize the paint invalidation rect w hen the box is not "decorated"
341 // (does not have background/border/etc., see LayoutSVGRootTest.OverflowRect MappingWithViewportClipWithoutBorder). 341 // (does not have background/border/etc., see LayoutSVGRootTest.OverflowRect MappingWithViewportClipWithoutBorder).
342 342
343 // Return early for any cases where we don't actually paint. 343 // Return early for any cases where we don't actually paint.
344 if (style()->visibility() != VISIBLE && !enclosingLayer()->hasVisibleContent ()) 344 if (style()->visibility() != EVisibility::Visible && !enclosingLayer()->hasV isibleContent())
345 return LayoutRect(); 345 return LayoutRect();
346 346
347 // Compute the paint invalidation rect of the content of the SVG in the bord er-box coordinate space. 347 // Compute the paint invalidation rect of the content of the SVG in the bord er-box coordinate space.
348 FloatRect contentPaintInvalidationRect = paintInvalidationRectInLocalSVGCoor dinates(); 348 FloatRect contentPaintInvalidationRect = paintInvalidationRectInLocalSVGCoor dinates();
349 contentPaintInvalidationRect = m_localToBorderBoxTransform.mapRect(contentPa intInvalidationRect); 349 contentPaintInvalidationRect = m_localToBorderBoxTransform.mapRect(contentPa intInvalidationRect);
350 350
351 // Apply initial viewport clip, overflow:visible content is added to visualO verflow 351 // Apply initial viewport clip, overflow:visible content is added to visualO verflow
352 // but the most common case is that overflow is hidden, so always intersect. 352 // but the most common case is that overflow is hidden, so always intersect.
353 contentPaintInvalidationRect.intersect(pixelSnappedBorderBoxRect()); 353 contentPaintInvalidationRect.intersect(pixelSnappedBorderBoxRect());
354 354
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 updateHitTestResult(result, pointInBorderBox); 418 updateHitTestResult(result, pointInBorderBox);
419 if (result.addNodeToListBasedTestResult(node(), locationInContainer, boundsRect) == StopHitTesting) 419 if (result.addNodeToListBasedTestResult(node(), locationInContainer, boundsRect) == StopHitTesting)
420 return true; 420 return true;
421 } 421 }
422 } 422 }
423 423
424 return false; 424 return false;
425 } 425 }
426 426
427 } // namespace blink 427 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698