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

Unified Diff: third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp

Issue 2144523002: Remove obsolete SVG small font rejection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « third_party/WebKit/LayoutTests/svg/text/minimum-text-size-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp b/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp
index 71497f19b4e7d726b137fc59243de4674977f0d5..f035f90de33f13d5674931e5cde8bcb0966d636b 100644
--- a/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp
@@ -26,13 +26,6 @@
namespace blink {
-static inline bool textShouldBePainted(const LayoutSVGInlineText& textLayoutObject)
-{
- // Font::pixelSize(), returns FontDescription::computedPixelSize(), which returns "int(x + 0.5)".
- // If the absolute font size on screen is below x=0.5, don't render anything.
- return textLayoutObject.scaledFont().getFontDescription().computedPixelSize();
-}
-
bool SVGInlineTextBoxPainter::shouldPaintSelection(const PaintInfo& paintInfo) const
{
return !paintInfo.isPrinting() && m_svgInlineTextBox.getSelectionState() != SelectionNone;
@@ -70,12 +63,9 @@ void SVGInlineTextBoxPainter::paint(const PaintInfo& paintInfo, const LayoutPoin
if (!haveSelection && paintInfo.phase == PaintPhaseSelection)
return;
- LayoutSVGInlineText& textLayoutObject = toLayoutSVGInlineText(*LineLayoutAPIShim::layoutObjectFrom(m_svgInlineTextBox.getLineLayoutItem()));
- if (!textShouldBePainted(textLayoutObject))
- return;
-
DisplayItem::Type displayItemType = DisplayItem::paintPhaseToDrawingType(paintInfo.phase);
if (!DrawingRecorder::useCachedDrawingIfPossible(paintInfo.context, m_svgInlineTextBox, displayItemType)) {
+ LayoutSVGInlineText& textLayoutObject = toLayoutSVGInlineText(*LineLayoutAPIShim::layoutObjectFrom(m_svgInlineTextBox.getLineLayoutItem()));
LayoutObject& parentLayoutObject = *LineLayoutAPIShim::layoutObjectFrom(m_svgInlineTextBox.parent()->getLineLayoutItem());
const ComputedStyle& style = parentLayoutObject.styleRef();
@@ -181,10 +171,6 @@ void SVGInlineTextBoxPainter::paintSelectionBackground(const PaintInfo& paintInf
if (!backgroundColor.alpha())
return;
- LayoutSVGInlineText& textLayoutObject = toLayoutSVGInlineText(*LineLayoutAPIShim::layoutObjectFrom(m_svgInlineTextBox.getLineLayoutItem()));
- if (!textShouldBePainted(textLayoutObject))
- return;
-
const ComputedStyle& style = m_svgInlineTextBox.parent()->getLineLayoutItem().styleRef();
int startPosition, endPosition;
« no previous file with comments | « third_party/WebKit/LayoutTests/svg/text/minimum-text-size-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698