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

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

Issue 1813383002: Move all fast-path paint invalidation mapping into PaintInvalidationState (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reorganize conditions in PaintInvalidationState constructor Created 4 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
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 FontDescription fontDescription(style->getFontDescription()); 224 FontDescription fontDescription(style->getFontDescription());
225 225
226 Document& document = layoutObject->document(); 226 Document& document = layoutObject->document();
227 // FIXME: We need to better handle the case when we compute very small fonts below (below 1pt). 227 // FIXME: We need to better handle the case when we compute very small fonts below (below 1pt).
228 fontDescription.setComputedSize(FontSize::getComputedSizeFromSpecifiedSize(& document, scalingFactor, fontDescription.isAbsoluteSize(), fontDescription.speci fiedSize(), DoNotUseSmartMinimumForFontSize)); 228 fontDescription.setComputedSize(FontSize::getComputedSizeFromSpecifiedSize(& document, scalingFactor, fontDescription.isAbsoluteSize(), fontDescription.speci fiedSize(), DoNotUseSmartMinimumForFontSize));
229 229
230 scaledFont = Font(fontDescription); 230 scaledFont = Font(fontDescription);
231 scaledFont.update(document.styleEngine().fontSelector()); 231 scaledFont.update(document.styleEngine().fontSelector());
232 } 232 }
233 233
234 LayoutRect LayoutSVGInlineText::clippedOverflowRectForPaintInvalidation(const La youtBoxModelObject* paintInvalidationContainer, const PaintInvalidationState* pa intInvalidationState) const 234 LayoutRect LayoutSVGInlineText::absoluteClippedOverflowRect() const
235 { 235 {
236 // FIXME: The following works because LayoutSVGBlock has forced slow rect ma pping of the paintInvalidationState. 236 return parent()->absoluteClippedOverflowRect();
237 // Should let this really work with paintInvalidationState's fast mapping an d remove the assert. 237 }
238 ASSERT(!paintInvalidationState || !paintInvalidationState->canMapToAncestor( paintInvalidationContainer)); 238
239 return parent()->clippedOverflowRectForPaintInvalidation(paintInvalidationCo ntainer, nullptr); 239 FloatRect LayoutSVGInlineText::paintInvalidationRectInLocalSVGCoordinates() cons t
240 {
241 return parent()->paintInvalidationRectInLocalSVGCoordinates();
240 } 242 }
241 243
242 PassRefPtr<StringImpl> LayoutSVGInlineText::originalText() const 244 PassRefPtr<StringImpl> LayoutSVGInlineText::originalText() const
243 { 245 {
244 RefPtr<StringImpl> result = LayoutText::originalText(); 246 RefPtr<StringImpl> result = LayoutText::originalText();
245 if (!result) 247 if (!result)
246 return nullptr; 248 return nullptr;
247 return applySVGWhitespaceRules(result, style() && style()->whiteSpace() == P RE); 249 return applySVGWhitespaceRules(result, style() && style()->whiteSpace() == P RE);
248 } 250 }
249 251
250 } // namespace blink 252 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698