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

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

Issue 236203020: Separate repaint and layout requirements of StyleDifference (Step 1) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase, Fix break Created 6 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 | 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) 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 if (oldPreserves && !newPreserves) { 82 if (oldPreserves && !newPreserves) {
83 setText(applySVGWhitespaceRules(originalText(), false), true); 83 setText(applySVGWhitespaceRules(originalText(), false), true);
84 return; 84 return;
85 } 85 }
86 86
87 if (!oldPreserves && newPreserves) { 87 if (!oldPreserves && newPreserves) {
88 setText(applySVGWhitespaceRules(originalText(), true), true); 88 setText(applySVGWhitespaceRules(originalText(), true), true);
89 return; 89 return;
90 } 90 }
91 91
92 if (diff != StyleDifferenceLayout) 92 if (!diff.needsFullLayout())
93 return; 93 return;
94 94
95 // The text metrics may be influenced by style changes. 95 // The text metrics may be influenced by style changes.
96 if (RenderSVGText* textRenderer = RenderSVGText::locateRenderSVGTextAncestor (this)) 96 if (RenderSVGText* textRenderer = RenderSVGText::locateRenderSVGTextAncestor (this))
97 textRenderer->setNeedsLayout(); 97 textRenderer->setNeedsLayout();
98 } 98 }
99 99
100 InlineTextBox* RenderSVGInlineText::createTextBox() 100 InlineTextBox* RenderSVGInlineText::createTextBox()
101 { 101 {
102 InlineTextBox* box = new SVGInlineTextBox(*this); 102 InlineTextBox* box = new SVGInlineTextBox(*this);
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 232
233 Document& document = renderer->document(); 233 Document& document = renderer->document();
234 // FIXME: We need to better handle the case when we compute very small fonts below (below 1pt). 234 // FIXME: We need to better handle the case when we compute very small fonts below (below 1pt).
235 fontDescription.setComputedSize(FontSize::getComputedSizeFromSpecifiedSize(& document, scalingFactor, fontDescription.isAbsoluteSize(), fontDescription.speci fiedSize(), DoNotUseSmartMinimumForFontSize)); 235 fontDescription.setComputedSize(FontSize::getComputedSizeFromSpecifiedSize(& document, scalingFactor, fontDescription.isAbsoluteSize(), fontDescription.speci fiedSize(), DoNotUseSmartMinimumForFontSize));
236 236
237 scaledFont = Font(fontDescription); 237 scaledFont = Font(fontDescription);
238 scaledFont.update(document.styleEngine()->fontSelector()); 238 scaledFont.update(document.styleEngine()->fontSelector());
239 } 239 }
240 240
241 } 241 }
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/RenderSVGInline.cpp ('k') | Source/core/rendering/svg/RenderSVGModelObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698