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

Side by Side Diff: Source/core/rendering/svg/SVGInlineFlowBox.cpp

Issue 23819007: Have Node::document() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 3 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> 2 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz>
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) Research In Motion Limited 2010. All rights reserved. 5 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 ASSERT(textRenderer); 82 ASSERT(textRenderer);
83 83
84 Node* node = textRenderer->node(); 84 Node* node = textRenderer->node();
85 if (!node || !node->inDocument()) 85 if (!node || !node->inDocument())
86 return; 86 return;
87 87
88 RenderStyle* style = textRenderer->style(); 88 RenderStyle* style = textRenderer->style();
89 ASSERT(style); 89 ASSERT(style);
90 90
91 AffineTransform fragmentTransform; 91 AffineTransform fragmentTransform;
92 Document* document = textRenderer->document(); 92 Document& document = textRenderer->document();
93 Vector<DocumentMarker*> markers = document->markers()->markersFor(textRender er->node()); 93 Vector<DocumentMarker*> markers = document.markers()->markersFor(textRendere r->node());
94 94
95 Vector<DocumentMarker*>::iterator markerEnd = markers.end(); 95 Vector<DocumentMarker*>::iterator markerEnd = markers.end();
96 for (Vector<DocumentMarker*>::iterator markerIt = markers.begin(); markerIt != markerEnd; ++markerIt) { 96 for (Vector<DocumentMarker*>::iterator markerIt = markers.begin(); markerIt != markerEnd; ++markerIt) {
97 DocumentMarker* marker = *markerIt; 97 DocumentMarker* marker = *markerIt;
98 98
99 // SVG is only interessted in the TextMatch marker, for now. 99 // SVG is only interessted in the TextMatch marker, for now.
100 if (marker->type() != DocumentMarker::TextMatch) 100 if (marker->type() != DocumentMarker::TextMatch)
101 continue; 101 continue;
102 102
103 FloatRect markerRect; 103 FloatRect markerRect;
(...skipping 29 matching lines...) Expand all
133 133
134 markerRect.unite(fragmentRect); 134 markerRect.unite(fragmentRect);
135 } 135 }
136 } 136 }
137 137
138 toRenderedDocumentMarker(marker)->setRenderedRect(textRenderer->localToA bsoluteQuad(markerRect).enclosingBoundingBox()); 138 toRenderedDocumentMarker(marker)->setRenderedRect(textRenderer->localToA bsoluteQuad(markerRect).enclosingBoundingBox());
139 } 139 }
140 } 140 }
141 141
142 } // namespace WebCore 142 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/RenderSVGTextPath.cpp ('k') | Source/core/rendering/svg/SVGInlineTextBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698