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

Side by Side Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGImage.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) 2006 Alexander Kellett <lypanov@kde.org> 2 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org>
3 * Copyright (C) 2006 Apple Computer, Inc. 3 * Copyright (C) 2006 Apple Computer, Inc.
4 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> 4 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
5 * Copyright (C) 2007, 2008, 2009 Rob Buis <buis@kde.org> 5 * Copyright (C) 2007, 2008, 2009 Rob Buis <buis@kde.org>
6 * Copyright (C) 2009 Google, Inc. 6 * Copyright (C) 2009 Google, Inc.
7 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> 7 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
8 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> 8 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com>
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 SVGImagePainter(*this).paint(paintInfo); 113 SVGImagePainter(*this).paint(paintInfo);
114 } 114 }
115 115
116 bool LayoutSVGImage::nodeAtFloatPoint(HitTestResult& result, const FloatPoint& p ointInParent, HitTestAction hitTestAction) 116 bool LayoutSVGImage::nodeAtFloatPoint(HitTestResult& result, const FloatPoint& p ointInParent, HitTestAction hitTestAction)
117 { 117 {
118 // We only draw in the forground phase, so we only hit-test then. 118 // We only draw in the forground phase, so we only hit-test then.
119 if (hitTestAction != HitTestForeground) 119 if (hitTestAction != HitTestForeground)
120 return false; 120 return false;
121 121
122 PointerEventsHitRules hitRules(PointerEventsHitRules::SVG_IMAGE_HITTESTING, result.hitTestRequest(), style()->pointerEvents()); 122 PointerEventsHitRules hitRules(PointerEventsHitRules::SVG_IMAGE_HITTESTING, result.hitTestRequest(), style()->pointerEvents());
123 bool isVisible = (style()->visibility() == VISIBLE); 123 bool isVisible = (style()->visibility() == EVisibility::Visible);
124 if (isVisible || !hitRules.requireVisible) { 124 if (isVisible || !hitRules.requireVisible) {
125 FloatPoint localPoint; 125 FloatPoint localPoint;
126 if (!SVGLayoutSupport::transformToUserSpaceAndCheckClipping(this, localT oSVGParentTransform(), pointInParent, localPoint)) 126 if (!SVGLayoutSupport::transformToUserSpaceAndCheckClipping(this, localT oSVGParentTransform(), pointInParent, localPoint))
127 return false; 127 return false;
128 128
129 if (hitRules.canHitFill || hitRules.canHitBoundingBox) { 129 if (hitRules.canHitFill || hitRules.canHitBoundingBox) {
130 if (m_objectBoundingBox.contains(localPoint)) { 130 if (m_objectBoundingBox.contains(localPoint)) {
131 const LayoutPoint& localLayoutPoint = roundedLayoutPoint(localPo int); 131 const LayoutPoint& localLayoutPoint = roundedLayoutPoint(localPo int);
132 updateHitTestResult(result, localLayoutPoint); 132 updateHitTestResult(result, localLayoutPoint);
133 if (result.addNodeToListBasedTestResult(element(), localLayoutPo int) == StopHitTesting) 133 if (result.addNodeToListBasedTestResult(element(), localLayoutPo int) == StopHitTesting)
(...skipping 15 matching lines...) Expand all
149 setShouldDoFullPaintInvalidation(); 149 setShouldDoFullPaintInvalidation();
150 } 150 }
151 151
152 void LayoutSVGImage::addOutlineRects(Vector<LayoutRect>& rects, const LayoutPoin t&, IncludeBlockVisualOverflowOrNot) const 152 void LayoutSVGImage::addOutlineRects(Vector<LayoutRect>& rects, const LayoutPoin t&, IncludeBlockVisualOverflowOrNot) const
153 { 153 {
154 // this is called from paint() after the localTransform has already been app lied 154 // this is called from paint() after the localTransform has already been app lied
155 rects.append(LayoutRect(paintInvalidationRectInLocalSVGCoordinates())); 155 rects.append(LayoutRect(paintInvalidationRectInLocalSVGCoordinates()));
156 } 156 }
157 157
158 } // namespace blink 158 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698