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

Side by Side Diff: Source/core/css/resolver/StyleAdjuster.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, 6 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 if (style->preserves3D() && (style->overflowX() != OVISIBLE 268 if (style->preserves3D() && (style->overflowX() != OVISIBLE
269 || style->overflowY() != OVISIBLE 269 || style->overflowY() != OVISIBLE
270 || style->hasFilter())) 270 || style->hasFilter()))
271 style->setTransformStyle3D(TransformStyle3DFlat); 271 style->setTransformStyle3D(TransformStyle3DFlat);
272 272
273 if (e && e->isSVGElement()) { 273 if (e && e->isSVGElement()) {
274 // Only the root <svg> element in an SVG document fragment tree honors c ss position 274 // Only the root <svg> element in an SVG document fragment tree honors c ss position
275 if (!(isSVGSVGElement(*e) && e->parentNode() && !e->parentNode()->isSVGE lement())) 275 if (!(isSVGSVGElement(*e) && e->parentNode() && !e->parentNode()->isSVGE lement()))
276 style->setPosition(RenderStyle::initialPosition()); 276 style->setPosition(RenderStyle::initialPosition());
277 277
278 // RenderSVGRoot handles zooming for the whole SVG subtree, so foreignOb ject content should
279 // not be scaled again.
280 if (isSVGForeignObjectElement(*e))
281 style->setEffectiveZoom(RenderStyle::initialZoom());
rune 2014/06/03 19:34:33 I don't understand how you can just remove this an
282
283 // SVG text layout code expects us to be a block-level style element. 278 // SVG text layout code expects us to be a block-level style element.
284 if ((isSVGForeignObjectElement(*e) || isSVGTextElement(*e)) && style->is DisplayInlineType()) 279 if ((isSVGForeignObjectElement(*e) || isSVGTextElement(*e)) && style->is DisplayInlineType())
285 style->setDisplay(BLOCK); 280 style->setDisplay(BLOCK);
286 } 281 }
287 282
288 if (e && e->renderStyle() && e->renderStyle()->textAutosizingMultiplier() != 1) { 283 if (e && e->renderStyle() && e->renderStyle()->textAutosizingMultiplier() != 1) {
289 // Preserve the text autosizing multiplier on style recalc. 284 // Preserve the text autosizing multiplier on style recalc.
290 // (The autosizer will update it during layout if it needs to be changed .) 285 // (The autosizer will update it during layout if it needs to be changed .)
291 style->setTextAutosizingMultiplier(e->renderStyle()->textAutosizingMulti plier()); 286 style->setTextAutosizingMultiplier(e->renderStyle()->textAutosizingMulti plier());
292 style->setUnique(); 287 style->setUnique();
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 if (style->writingMode() != TopToBottomWritingMode && (style->display() == B OX || style->display() == INLINE_BOX)) 441 if (style->writingMode() != TopToBottomWritingMode && (style->display() == B OX || style->display() == INLINE_BOX))
447 style->setWritingMode(TopToBottomWritingMode); 442 style->setWritingMode(TopToBottomWritingMode);
448 443
449 if (isDisplayFlexibleBox(parentStyle->display()) || isDisplayGridBox(parentS tyle->display())) { 444 if (isDisplayFlexibleBox(parentStyle->display()) || isDisplayGridBox(parentS tyle->display())) {
450 style->setFloating(NoFloat); 445 style->setFloating(NoFloat);
451 style->setDisplay(equivalentBlockDisplay(style->display(), style->isFloa ting(), !m_useQuirksModeStyles)); 446 style->setDisplay(equivalentBlockDisplay(style->display(), style->isFloa ting(), !m_useQuirksModeStyles));
452 } 447 }
453 } 448 }
454 449
455 } 450 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698