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

Side by Side Diff: Source/core/rendering/RenderListMarker.cpp

Issue 197203003: Consider intrinsic size for SVG as list-style-image (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « LayoutTests/svg/as-list-image/svg-list-image-intrinsic-size-1-expected.html ('k') | no next file » | 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv ed. 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv ed.
5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) 5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net)
6 * Copyright (C) 2010 Daniel Bates (dbates@intudata.com) 6 * Copyright (C) 2010 Daniel Bates (dbates@intudata.com)
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 1359 matching lines...) Expand 10 before | Expand all | Expand 10 after
1370 // It's unclear if this is a premature optimization. 1370 // It's unclear if this is a premature optimization.
1371 if (!preferredLogicalWidthsDirty()) 1371 if (!preferredLogicalWidthsDirty())
1372 return; 1372 return;
1373 1373
1374 m_text = ""; 1374 m_text = "";
1375 1375
1376 if (isImage()) { 1376 if (isImage()) {
1377 // FIXME: This is a somewhat arbitrary width. Generated images for mark ers really won't become particularly useful 1377 // FIXME: This is a somewhat arbitrary width. Generated images for mark ers really won't become particularly useful
1378 // until we support the CSS3 marker pseudoclass to allow control over th e width and height of the marker box. 1378 // until we support the CSS3 marker pseudoclass to allow control over th e width and height of the marker box.
1379 int bulletWidth = style()->fontMetrics().ascent() / 2; 1379 int bulletWidth = style()->fontMetrics().ascent() / 2;
1380 m_image->setContainerSizeForRenderer(this, IntSize(bulletWidth, bulletWi dth), style()->effectiveZoom()); 1380 IntSize defaultBulletSize(bulletWidth, bulletWidth);
1381 IntSize imageSize = calculateImageIntrinsicDimensions(m_image.get(), def aultBulletSize, DoNotScaleByEffectiveZoom);
1382 m_image->setContainerSizeForRenderer(this, imageSize, style()->effective Zoom());
1381 return; 1383 return;
1382 } 1384 }
1383 1385
1384 EListStyleType type = style()->listStyleType(); 1386 EListStyleType type = style()->listStyleType();
1385 switch (type) { 1387 switch (type) {
1386 case NoneListStyle: 1388 case NoneListStyle:
1387 break; 1389 break;
1388 case Circle: 1390 case Circle:
1389 case Disc: 1391 case Disc:
1390 case Square: 1392 case Square:
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
1840 1842
1841 if (clipToVisibleContent) 1843 if (clipToVisibleContent)
1842 computeRectForRepaint(repaintContainer, rect); 1844 computeRectForRepaint(repaintContainer, rect);
1843 else 1845 else
1844 rect = localToContainerQuad(FloatRect(rect), repaintContainer).enclosing BoundingBox(); 1846 rect = localToContainerQuad(FloatRect(rect), repaintContainer).enclosing BoundingBox();
1845 1847
1846 return rect; 1848 return rect;
1847 } 1849 }
1848 1850
1849 } // namespace WebCore 1851 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/svg/as-list-image/svg-list-image-intrinsic-size-1-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698