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

Unified Diff: Source/core/css/resolver/FontBuilder.cpp

Issue 308123010: Trigger computation of font size when crossing foreignObject boundary (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove use of useSVGZoomRules in FontBuilder and add a forced mode for when crossing the foreignObj… Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/css/resolver/FontBuilder.cpp
diff --git a/Source/core/css/resolver/FontBuilder.cpp b/Source/core/css/resolver/FontBuilder.cpp
index 744a91499824f1b5394cedde8dda2a5c5ba5174b..53470be47ef86ac7c5da1141247ce60c9980e3f8 100644
--- a/Source/core/css/resolver/FontBuilder.cpp
+++ b/Source/core/css/resolver/FontBuilder.cpp
@@ -62,20 +62,19 @@ private:
FontBuilder::FontBuilder()
: m_document(0)
- , m_useSVGZoomRules(false)
, m_fontSizehasViewportUnits(false)
, m_style(0)
, m_fontDirty(false)
{
}
-void FontBuilder::initForStyleResolve(const Document& document, RenderStyle* style, bool useSVGZoomRules)
+void FontBuilder::initForStyleResolve(const Document& document, RenderStyle* style, FontBuilderOperation fontBuilderOperation)
{
ASSERT(document.frame());
+ ASSERT(fontBuilderOperation == OnlyBuildFontOnChange || fontBuilderOperation == AlwaysBuildFont);
m_document = &document;
- m_useSVGZoomRules = useSVGZoomRules;
m_style = style;
- m_fontDirty = false;
+ m_fontDirty = (fontBuilderOperation == AlwaysBuildFont);
}
inline static void setFontFamilyToStandard(FontDescription& fontDescription, const Document* document)
@@ -530,13 +529,10 @@ void FontBuilder::setSize(FontDescription& fontDescription, float effectiveZoom,
float FontBuilder::getComputedSizeFromSpecifiedSize(FontDescription& fontDescription, float effectiveZoom, float specifiedSize)
{
- float zoomFactor = 1.0f;
- if (!m_useSVGZoomRules) {
- zoomFactor = effectiveZoom;
- // FIXME: Why is this here!!!!?!
- if (LocalFrame* frame = m_document->frame())
- zoomFactor *= frame->textZoomFactor();
- }
+ float zoomFactor = effectiveZoom;
+ // FIXME: Why is this here!!!!?!
+ if (LocalFrame* frame = m_document->frame())
+ zoomFactor *= frame->textZoomFactor();
return FontSize::getComputedSizeFromSpecifiedSize(m_document, zoomFactor, fontDescription.isAbsoluteSize(), specifiedSize);
}

Powered by Google App Engine
This is Rietveld 408576698