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

Side by Side Diff: Source/core/layout/svg/LayoutSVGBlock.cpp

Issue 1032823003: Refactor HitTestResult to store the HitTestRequest (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated as per review comments Created 5 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
« no previous file with comments | « Source/core/layout/svg/LayoutSVGBlock.h ('k') | Source/core/layout/svg/LayoutSVGContainer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Apple Computer, Inc. 2 * Copyright (C) 2006 Apple Computer, Inc.
3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 4 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 } 108 }
109 109
110 void LayoutSVGBlock::mapRectToPaintInvalidationBacking(const LayoutBoxModelObjec t* paintInvalidationContainer, LayoutRect& rect, const PaintInvalidationState* p aintInvalidationState) const 110 void LayoutSVGBlock::mapRectToPaintInvalidationBacking(const LayoutBoxModelObjec t* paintInvalidationContainer, LayoutRect& rect, const PaintInvalidationState* p aintInvalidationState) const
111 { 111 {
112 FloatRect paintInvalidationRect = rect; 112 FloatRect paintInvalidationRect = rect;
113 paintInvalidationRect.inflate(style()->outlineWidth()); 113 paintInvalidationRect.inflate(style()->outlineWidth());
114 const LayoutSVGRoot& svgRoot = SVGLayoutSupport::mapRectToSVGRootForPaintInv alidation(this, paintInvalidationRect, rect); 114 const LayoutSVGRoot& svgRoot = SVGLayoutSupport::mapRectToSVGRootForPaintInv alidation(this, paintInvalidationRect, rect);
115 svgRoot.mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect, paintInvalidationState); 115 svgRoot.mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect, paintInvalidationState);
116 } 116 }
117 117
118 bool LayoutSVGBlock::nodeAtPoint(const HitTestRequest&, HitTestResult&, const Hi tTestLocation&, const LayoutPoint&, HitTestAction) 118 bool LayoutSVGBlock::nodeAtPoint(HitTestResult&, const HitTestLocation&, const L ayoutPoint&, HitTestAction)
119 { 119 {
120 ASSERT_NOT_REACHED(); 120 ASSERT_NOT_REACHED();
121 return false; 121 return false;
122 } 122 }
123 123
124 void LayoutSVGBlock::invalidateTreeIfNeeded(PaintInvalidationState& paintInvalid ationState) 124 void LayoutSVGBlock::invalidateTreeIfNeeded(PaintInvalidationState& paintInvalid ationState)
125 { 125 {
126 if (!shouldCheckForPaintInvalidation(paintInvalidationState)) 126 if (!shouldCheckForPaintInvalidation(paintInvalidationState))
127 return; 127 return;
128 128
(...skipping 16 matching lines...) Expand all
145 145
146 void LayoutSVGBlock::updatePaintInfoRect(IntRect& rect) 146 void LayoutSVGBlock::updatePaintInfoRect(IntRect& rect)
147 { 147 {
148 if (rect != LayoutRect::infiniteIntRect()) { 148 if (rect != LayoutRect::infiniteIntRect()) {
149 AffineTransform transformToRoot = m_cachedPaintInvalidationTransform * l ocalTransform(); 149 AffineTransform transformToRoot = m_cachedPaintInvalidationTransform * l ocalTransform();
150 rect = enclosingIntRect(transformToRoot.inverse().mapRect(FloatRect(rect ))); 150 rect = enclosingIntRect(transformToRoot.inverse().mapRect(FloatRect(rect )));
151 } 151 }
152 } 152 }
153 153
154 } 154 }
OLDNEW
« no previous file with comments | « Source/core/layout/svg/LayoutSVGBlock.h ('k') | Source/core/layout/svg/LayoutSVGContainer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698