• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/WebCore-7537.78.1/rendering/svg/

Lines Matching refs:ts

101 TextStream& operator<<(TextStream& ts, TextStreamSeparator& sep)
104 ts << sep.m_separator;
107 return ts;
111 static void writeNameValuePair(TextStream& ts, const char* name, ValueType value)
113 ts << " [" << name << "=" << value << "]";
117 static void writeNameAndQuotedValue(TextStream& ts, const char* name, ValueType value)
119 ts << " [" << name << "=\"" << value << "\"]";
122 static void writeIfNotEmpty(TextStream& ts, const char* name, const String& value)
125 writeNameValuePair(ts, name, value);
129 static void writeIfNotDefault(TextStream& ts, const char* name, ValueType value, ValueType defaultValue)
132 writeNameValuePair(ts, name, value);
135 TextStream& operator<<(TextStream& ts, const FloatRect& r)
137 ts << "at (" << TextStream::FormatNumberRespectingIntegers(r.x());
138 ts << "," << TextStream::FormatNumberRespectingIntegers(r.y());
139 ts << ") size " << TextStream::FormatNumberRespectingIntegers(r.width());
140 ts << "x" << TextStream::FormatNumberRespectingIntegers(r.height());
141 return ts;
144 TextStream& operator<<(TextStream& ts, const AffineTransform& transform)
147 ts << "identity";
149 ts << "{m=(("
157 return ts;
160 static TextStream& operator<<(TextStream& ts, const WindRule rule)
164 ts << "NON-ZERO";
167 ts << "EVEN-ODD";
171 return ts;
174 static TextStream& operator<<(TextStream& ts, const SVGUnitTypes::SVGUnitType& unitType)
176 ts << SVGPropertyTraits<SVGUnitTypes::SVGUnitType>::toString(unitType);
177 return ts;
180 static TextStream& operator<<(TextStream& ts, const SVGMarkerUnitsType& markerUnit)
182 ts << SVGPropertyTraits<SVGMarkerUnitsType>::toString(markerUnit);
183 return ts;
186 TextStream& operator<<(TextStream& ts, const Color& c)
188 return ts << c.nameForRenderTreeAsText();
192 static TextStream& operator<<(TextStream& ts, const DashArray& a)
194 ts << "{";
198 ts << ", ";
199 ts << *it;
201 ts << "}";
202 return ts;
206 static TextStream& operator<<(TextStream& ts, LineCap style)
210 ts << "BUTT";
213 ts << "ROUND";
216 ts << "SQUARE";
219 return ts;
223 static TextStream& operator<<(TextStream& ts, LineJoin style)
227 ts << "MITER";
230 ts << "ROUND";
233 ts << "BEVEL";
236 return ts;
239 static TextStream& operator<<(TextStream& ts, const SVGSpreadMethodType& type)
241 ts << SVGPropertyTraits<SVGSpreadMethodType>::toString(type).upper();
242 return ts;
245 static void writeSVGPaintingResource(TextStream& ts, RenderSVGResource* resource)
248 ts << "[type=SOLID] [color=" << static_cast<RenderSVGResourceSolidColor*>(resource)->color() << "]";
259 ts << "[type=PATTERN]";
261 ts << "[type=LINEAR-GRADIENT]";
263 ts << "[type=RADIAL-GRADIENT]";
265 ts << " [id=\"" << toSVGElement(node)->getIdAttribute() << "\"]";
268 static void writeStyle(TextStream& ts, const RenderObject& object)
274 writeNameValuePair(ts, "transform", object.localTransform());
275 writeIfNotDefault(ts, "image rendering", style->imageRendering(), RenderStyle::initialImageRendering());
276 writeIfNotDefault(ts, "opacity", style->opacity(), RenderStyle::initialOpacity());
285 ts << " [stroke={" << s;
286 writeSVGPaintingResource(ts, strokePaintingResource);
298 writeIfNotDefault(ts, "opacity", svgStyle->strokeOpacity(), 1.0f);
299 writeIfNotDefault(ts, "stroke width", strokeWidth, 1.0);
300 writeIfNotDefault(ts, "miter limit", svgStyle->strokeMiterLimit(), 4.0f);
301 writeIfNotDefault(ts, "line cap", svgStyle->capStyle(), ButtCap);
302 writeIfNotDefault(ts, "line join", svgStyle->joinStyle(), MiterJoin);
303 writeIfNotDefault(ts, "dash offset", dashOffset, 0.0);
305 writeNameValuePair(ts, "dash array", dashArray);
307 ts << "}]";
312 ts << " [fill={" << s;
313 writeSVGPaintingResource(ts, fillPaintingResource);
315 writeIfNotDefault(ts, "opacity", svgStyle->fillOpacity(), 1.0f);
316 writeIfNotDefault(ts, "fill rule", svgStyle->fillRule(), RULE_NONZERO);
317 ts << "}]";
319 writeIfNotDefault(ts, "clip rule", svgStyle->clipRule(), RULE_NONZERO);
322 writeIfNotEmpty(ts, "start marker", svgStyle->markerStartResource());
323 writeIfNotEmpty(ts, "middle marker", svgStyle->markerMidResource());
324 writeIfNotEmpty(ts, "end marker", svgStyle->markerEndResource());
327 static TextStream& writePositionAndStyle(TextStream& ts, const RenderObject& object)
329 ts << " " << enclosingIntRect(const_cast<RenderObject&>(object).absoluteClippedOverflowRect());
330 writeStyle(ts, object);
331 return ts;
334 static TextStream& operator<<(TextStream& ts, const RenderSVGShape& shape)
336 writePositionAndStyle(ts, shape);
344 writeNameValuePair(ts, "x", element->x().value(lengthContext));
345 writeNameValuePair(ts, "y", element->y().value(lengthContext));
346 writeNameValuePair(ts, "width", element->width().value(lengthContext));
347 writeNameValuePair(ts, "height", element->height().value(lengthContext));
350 writeNameValuePair(ts, "x1", element->x1().value(lengthContext));
351 writeNameValuePair(ts, "y1", element->y1().value(lengthContext));
352 writeNameValuePair(ts, "x2", element->x2().value(lengthContext));
353 writeNameValuePair(ts, "y2", element->y2().value(lengthContext));
356 writeNameValuePair(ts, "cx", element->cx().value(lengthContext));
357 writeNameValuePair(ts, "cy", element->cy().value(lengthContext));
358 writeNameValuePair(ts, "rx", element->rx().value(lengthContext));
359 writeNameValuePair(ts, "ry", element->ry().value(lengthContext));
362 writeNameValuePair(ts, "cx", element->cx().value(lengthContext));
363 writeNameValuePair(ts, "cy", element->cy().value(lengthContext));
364 writeNameValuePair(ts, "r", element->r().value(lengthContext));
367 writeNameAndQuotedValue(ts, "points", element->pointList().valueAsString());
373 writeNameAndQuotedValue(ts, "data", pathString);
376 return ts;
379 static TextStream& operator<<(TextStream& ts, const RenderSVGRoot& root)
381 return writePositionAndStyle(ts, root);
384 static void writeRenderSVGTextBox(TextStream& ts, const RenderSVGText& text)
390 ts << " " << enclosingIntRect(FloatRect(text.location(), FloatSize(box->logicalWidth(), box->logicalHeight())));
393 ts << " contains 1 chunk(s)";
396 writeNameValuePair(ts, "color", text.style()->visitedDependentColor(CSSPropertyColor).nameForRenderTreeAsText());
399 static inline void writeSVGInlineTextBox(TextStream& ts, SVGInlineTextBox* textBox, int indent)
414 writeIndent(ts, indent + 1);
420 ts << "chunk 1 ";
424 ts << "(middle anchor";
426 ts << ", vertical";
427 ts << ") ";
429 ts << "(end anchor";
431 ts << ", vertical";
432 ts << ") ";
434 ts << "(vertical) ";
439 ts << "text run " << i + 1 << " at (" << fragment.x << "," << fragment.y << ")";
440 ts << " startOffset " << startOffset << " endOffset " << endOffset;
442 ts << " height " << fragment.height;
444 ts << " width " << fragment.width;
447 ts << (textBox->isLeftToRightDirection() ? " LTR" : " RTL");
449 ts << " override";
452 ts << ": " << quoteAndEscapeNonPrintables(text.substring(fragment.characterOffset, fragment.length)) << "\n";
456 static inline void writeSVGInlineTextBoxes(TextStream& ts, const RenderText& text, int indent)
462 writeSVGInlineTextBox(ts, static_cast<SVGInlineTextBox*>(box), indent);
466 static void writeStandardPrefix(TextStream& ts, const RenderObject& object, int indent)
468 writeIndent(ts, indent);
469 ts << object.renderName();
472 ts << " {" << object.node()->nodeName() << "}";
475 static void writeChildren(TextStream& ts, const RenderObject& object, int indent)
478 write(ts, *child, indent + 1);
481 static inline void writeCommonGradientProperties(TextStream& ts, SVGSpreadMethodType spreadMethod, const AffineTransform& gradientTransform, SVGUnitTypes::SVGUnitType gradientUnits)
483 writeNameValuePair(ts, "gradientUnits", gradientUnits);
486 ts << " [spreadMethod=" << spreadMethod << "]";
489 ts << " [gradientTransform=" << gradientTransform << "]";
492 void writeSVGResourceContainer(TextStream& ts, const RenderObject& object, int indent)
494 writeStandardPrefix(ts, object, indent);
498 writeNameAndQuotedValue(ts, "id", id);
505 writeNameValuePair(ts, "maskUnits", masker->maskUnits());
506 writeNameValuePair(ts, "maskContentUnits", masker->maskContentUnits());
507 ts << "\n";
511 writeNameValuePair(ts, "filterUnits", filter->filterUnits());
512 writeNameValuePair(ts, "primitiveUnits", filter->primitiveUnits());
513 ts << "\n";
519 lastEffect->externalRepresentation(ts, indent + 1);
524 writeNameValuePair(ts, "clipPathUnits", clipper->clipPathUnits());
525 ts << "\n";
528 writeNameValuePair(ts, "markerUnits", marker->markerUnits());
529 ts << " [ref at " << marker->referencePoint() << "]";
530 ts << " [angle=";
532 ts << "auto" << "]\n";
534 ts << marker->angle() << "]\n";
543 writeNameValuePair(ts, "patternUnits", attributes.patternUnits());
544 writeNameValuePair(ts, "patternContentUnits", attributes.patternContentUnits());
548 ts << " [patternTransform=" << transform << "]";
549 ts << "\n";
559 writeCommonGradientProperties(ts, attributes.spreadMethod(), attributes.gradientTransform(), attributes.gradientUnits());
561 ts << " [start=" << gradient->startPoint(attributes) << "] [end=" << gradient->endPoint(attributes) << "]\n";
571 writeCommonGradientProperties(ts, attributes.spreadMethod(), attributes.gradientTransform(), attributes.gradientUnits());
578 ts << " [center=" << centerPoint << "] [focal=" << focalPoint << "] [radius=" << radius << "] [focalRadius=" << focalRadius << "]\n";
580 ts << "\n";
581 writeChildren(ts, object, indent);
584 void writeSVGContainer(TextStream& ts, const RenderObject& container, int indent)
589 writeStandardPrefix(ts, container, indent);
590 writePositionAndStyle(ts, container);
591 ts << "\n";
592 writeResources(ts, container, indent);
593 writeChildren(ts, container, indent);
596 void write(TextStream& ts, const RenderSVGRoot& root, int indent)
598 writeStandardPrefix(ts, root, indent);
599 ts << root << "\n";
600 writeChildren(ts, root, indent);
603 void writeSVGText(TextStream& ts, const RenderSVGText& text, int indent)
605 writeStandardPrefix(ts, text, indent);
606 writeRenderSVGTextBox(ts, text);
607 ts << "\n";
608 writeResources(ts, text, indent);
609 writeChildren(ts, text, indent);
612 void writeSVGInlineText(TextStream& ts, const RenderSVGInlineText& text, int indent)
614 writeStandardPrefix(ts, text, indent);
615 ts << " " << enclosingIntRect(FloatRect(text.firstRunOrigin(), text.floatLinesBoundingBox().size())) << "\n";
616 writeResources(ts, text, indent);
617 writeSVGInlineTextBoxes(ts, text, indent);
620 void writeSVGImage(TextStream& ts, const RenderSVGImage& image, int indent)
622 writeStandardPrefix(ts, image, indent);
623 writePositionAndStyle(ts, image);
624 ts << "\n";
625 writeResources(ts, image, indent);
628 void write(TextStream& ts, const RenderSVGShape& shape, int indent)
630 writeStandardPrefix(ts, shape, indent);
631 ts << shape << "\n";
632 writeResources(ts, shape, indent);
635 void writeSVGGradientStop(TextStream& ts, const RenderSVGGradientStop& stop, int indent)
637 writeStandardPrefix(ts, stop, indent);
646 ts << " [offset=" << stopElement->offset() << "] [color=" << stopElement->stopColorIncludingOpacity() << "]\n";
649 void writeResources(TextStream& ts, const RenderObject& object, int indent)
659 writeIndent(ts, indent);
660 ts << " ";
661 writeNameAndQuotedValue(ts, "masker", svgStyle->maskerResource());
662 ts << " ";
663 writeStandardPrefix(ts, *masker, 0);
664 ts << " " << masker->resourceBoundingBox(&renderer) << "\n";
669 writeIndent(ts, indent);
670 ts << " ";
671 writeNameAndQuotedValue(ts, "clipPath", svgStyle->clipperResource());
672 ts << " ";
673 writeStandardPrefix(ts, *clipper, 0);
674 ts << " " << clipper->resourceBoundingBox(&renderer) << "\n";
680 writeIndent(ts, indent);
681 ts << " ";
682 writeNameAndQuotedValue(ts, "filter", svgStyle->filterResource());
683 ts << " ";
684 writeStandardPrefix(ts, *filter, 0);
685 ts << " " << filter->resourceBoundingBox(&renderer) << "\n";