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

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

Issue 975933002: Return reference from styleEngine() accessor. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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/line/RootInlineBox.cpp ('k') | Source/core/page/InjectedStyleSheets.cpp » ('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 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) 2008 Rob Buis <buis@kde.org> 5 * Copyright (C) 2008 Rob Buis <buis@kde.org>
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. 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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 if (style->fontDescription().textRendering() == GeometricPrecision) 224 if (style->fontDescription().textRendering() == GeometricPrecision)
225 scalingFactor = 1; 225 scalingFactor = 1;
226 226
227 FontDescription fontDescription(style->fontDescription()); 227 FontDescription fontDescription(style->fontDescription());
228 228
229 Document& document = renderer->document(); 229 Document& document = renderer->document();
230 // FIXME: We need to better handle the case when we compute very small fonts below (below 1pt). 230 // FIXME: We need to better handle the case when we compute very small fonts below (below 1pt).
231 fontDescription.setComputedSize(FontSize::getComputedSizeFromSpecifiedSize(& document, scalingFactor, fontDescription.isAbsoluteSize(), fontDescription.speci fiedSize(), DoNotUseSmartMinimumForFontSize)); 231 fontDescription.setComputedSize(FontSize::getComputedSizeFromSpecifiedSize(& document, scalingFactor, fontDescription.isAbsoluteSize(), fontDescription.speci fiedSize(), DoNotUseSmartMinimumForFontSize));
232 232
233 scaledFont = Font(fontDescription); 233 scaledFont = Font(fontDescription);
234 scaledFont.update(document.styleEngine()->fontSelector()); 234 scaledFont.update(document.styleEngine().fontSelector());
235 } 235 }
236 236
237 LayoutRect LayoutSVGInlineText::clippedOverflowRectForPaintInvalidation(const La youtBoxModelObject* paintInvalidationContainer, const PaintInvalidationState* pa intInvalidationState) const 237 LayoutRect LayoutSVGInlineText::clippedOverflowRectForPaintInvalidation(const La youtBoxModelObject* paintInvalidationContainer, const PaintInvalidationState* pa intInvalidationState) const
238 { 238 {
239 // FIXME: The following works because LayoutSVGBlock has forced slow rect ma pping of the paintInvalidationState. 239 // FIXME: The following works because LayoutSVGBlock has forced slow rect ma pping of the paintInvalidationState.
240 // Should let this really work with paintInvalidationState's fast mapping an d remove the assert. 240 // Should let this really work with paintInvalidationState's fast mapping an d remove the assert.
241 ASSERT(!paintInvalidationState || !paintInvalidationState->canMapToContainer (paintInvalidationContainer)); 241 ASSERT(!paintInvalidationState || !paintInvalidationState->canMapToContainer (paintInvalidationContainer));
242 return parent()->clippedOverflowRectForPaintInvalidation(paintInvalidationCo ntainer, paintInvalidationState); 242 return parent()->clippedOverflowRectForPaintInvalidation(paintInvalidationCo ntainer, paintInvalidationState);
243 } 243 }
244 244
245 PassRefPtr<StringImpl> LayoutSVGInlineText::originalText() const 245 PassRefPtr<StringImpl> LayoutSVGInlineText::originalText() const
246 { 246 {
247 RefPtr<StringImpl> result = LayoutText::originalText(); 247 RefPtr<StringImpl> result = LayoutText::originalText();
248 if (!result) 248 if (!result)
249 return nullptr; 249 return nullptr;
250 return applySVGWhitespaceRules(result, style() && style()->whiteSpace() == P RE); 250 return applySVGWhitespaceRules(result, style() && style()->whiteSpace() == P RE);
251 } 251 }
252 252
253 } 253 }
OLDNEW
« no previous file with comments | « Source/core/layout/line/RootInlineBox.cpp ('k') | Source/core/page/InjectedStyleSheets.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698