Lines Matching refs:paragraph
221 auto paragraph = builder.Build();
222 paragraph->layout(TestCanvasWidth);
223 REPORTER_ASSERT(reporter, paragraph->unresolvedGlyphs() == 0);
225 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
227 REPORTER_ASSERT(reporter, impl->styles().size() == 1); // paragraph style does not count
264 auto paragraph = builder.Build();
265 paragraph->layout(SK_ScalarInfinity);
267 REPORTER_ASSERT(reporter, paragraph->unresolvedGlyphs() == 0);
268 paragraph->layout(paragraph->getMaxIntrinsicWidth());
270 ParagraphImpl* impl = static_cast<ParagraphImpl*>(paragraph.get());
335 auto paragraph = builder.Build();
336 paragraph->layout(TestCanvasWidth);
337 paragraph->paint(canvas.get(), 0, 0);
342 auto boxes = paragraph->getRectsForRange(0, 3, rect_height_style, rect_width_style);
346 boxes = paragraph->getRectsForRange(0, 3, rect_height_style, rect_width_style);
350 boxes = paragraph->getRectsForPlaceholders();
353 boxes = paragraph->getRectsForRange(4, 17, rect_height_style, rect_width_style);
409 auto paragraph = builder.Build();
410 paragraph->layout(TestCanvasWidth);
411 paragraph->paint(canvas.get(), 0, 0);
413 auto boxes = paragraph->getRectsForPlaceholders();
425 boxes = paragraph->getRectsForRange(5, 6, rect_height_style, rect_width_style);
465 auto paragraph = builder.Build();
466 paragraph->layout(TestCanvasWidth);
467 paragraph->paint(canvas.get(), 0, 0);
469 auto boxes = paragraph->getRectsForPlaceholders();
481 boxes = paragraph->getRectsForRange(5, 6, rect_height_style, rect_width_style);
521 auto paragraph = builder.Build();
522 paragraph->layout(TestCanvasWidth);
523 paragraph->paint(canvas.get(), 0, 0);
525 auto boxes = paragraph->getRectsForPlaceholders();
537 boxes = paragraph->getRectsForRange(5, 6, rect_height_style, rect_width_style);
577 auto paragraph = builder.Build();
578 paragraph->layout(TestCanvasWidth);
579 paragraph->paint(canvas.get(), 0, 0);
584 auto boxes = paragraph->getRectsForPlaceholders();
592 boxes = paragraph->getRectsForRange(0, 1, rect_height_style, rect_width_style);
631 auto paragraph = builder.Build();
632 paragraph->layout(TestCanvasWidth);
633 paragraph->paint(canvas.get(), 0, 0);
638 auto boxes = paragraph->getRectsForPlaceholders();
646 boxes = paragraph->getRectsForRange(0, 1, rect_height_style, rect_width_style);
685 auto paragraph = builder.Build();
686 paragraph->layout(TestCanvasWidth);
687 paragraph->paint(canvas.get(), 0, 0);
692 auto boxes = paragraph->getRectsForPlaceholders();
700 boxes = paragraph->getRectsForRange(5, 6, rect_height_style, rect_width_style);
738 auto paragraph = builder.Build();
739 paragraph->layout(TestCanvasWidth);
740 paragraph->paint(canvas.get(), 0, 0);
745 auto boxes = paragraph->getRectsForPlaceholders();
753 boxes = paragraph->getRectsForRange(5, 6, rect_height_style, rect_width_style);
856 auto paragraph = builder.Build();
857 paragraph->layout(TestCanvasWidth - 100);
858 paragraph->paint(canvas.get(), 0, 0);
863 auto boxes = paragraph->getRectsForRange(0, 3, rect_height_style, rect_width_style);
867 boxes = paragraph->getRectsForRange(175, 176, rect_height_style, rect_width_style);
875 boxes = paragraph->getRectsForPlaceholders();
878 boxes = paragraph->getRectsForRange(4, 45, rect_height_style, rect_width_style);
979 auto paragraph = builder.Build();
980 paragraph->layout(TestCanvasWidth);
981 paragraph->paint(canvas.get(), 0, 0);
986 auto boxes = paragraph->getRectsForPlaceholders();
1005 boxes = paragraph->getRectsForRange(30, 50, rect_height_style, rect_width_style);
1042 auto paragraph = builder.Build();
1043 paragraph->layout(TestCanvasWidth);
1044 REPORTER_ASSERT(reporter, paragraph->unresolvedGlyphs() == 0);
1046 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
1048 REPORTER_ASSERT(reporter, impl->styles().size() == 1); // paragraph style does not count
1127 auto paragraph = builder.Build();
1128 paragraph->layout(1000);
1129 paragraph->paint(canvas.get(), 0, 0);
1131 REPORTER_ASSERT(reporter, paragraph->unresolvedGlyphs() == 0);
1133 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
1138 auto rects = paragraph->getRectsForRange(0, impl->text().size(), RectHeightStyle::kMax, RectWidthStyle::kTight);
1203 auto paragraph = builder.Build();
1204 paragraph->layout(TestCanvasWidth);
1205 paragraph->paint(canvas.get(), 10.0, 15.0);
1207 REPORTER_ASSERT(reporter, paragraph->unresolvedGlyphs() == 0);
1209 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
1249 auto paragraph = builder.Build();
1250 paragraph->layout(VeryLongCanvasWidth);
1251 paragraph->paint(canvas.get(), 10.0, 60.0);
1253 REPORTER_ASSERT(reporter, paragraph->unresolvedGlyphs() == 0);
1255 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
1295 auto paragraph = builder.Build();
1296 paragraph->layout(550);
1298 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
1300 REPORTER_ASSERT(reporter, impl->styles().size() == 1); // paragraph style does not count
1303 paragraph->paint(canvas.get(), 0, 0);
1314 std::vector<TextBox> boxes = paragraph->getRectsForRange(0, 0, rect_height_style, rect_width_style);
1318 boxes = paragraph->getRectsForRange(0, 40, rect_height_style, rect_width_style);
1356 auto paragraph = builder.Build();
1357 paragraph->layout(550);
1359 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
1360 REPORTER_ASSERT(reporter, impl->styles().size() == 1); // paragraph style does not count
1363 paragraph->paint(canvas.get(), 0, 0);
1366 std::vector<TextBox> boxes = paragraph->getRectsForRange(0, len, RectHeightStyle::kTight, rect_width_style);
1367 std::vector<TextBox> lineBoxes = paragraph->getRectsForRange(0, len, RectHeightStyle::kMax, rect_width_style);
1424 auto paragraph = builder.Build();
1425 paragraph->layout(550);
1426 paragraph->paint(canvas.get(), 0, 0);
1428 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
1430 REPORTER_ASSERT(reporter, impl->styles().size() == 2); // paragraph style does not count
1435 std::vector<TextBox> boxes = paragraph->getRectsForRange(0, len, RectHeightStyle::kTight, rect_width_style);
1436 std::vector<TextBox> lineBoxes = paragraph->getRectsForRange(0, len, RectHeightStyle::kMax, rect_width_style);
1518 auto paragraph = builder.Build();
1519 paragraph->layout(550);
1521 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
1522 REPORTER_ASSERT(reporter, impl->styles().size() == 1); // paragraph style does not count
1524 paragraph->paint(canvas.get(), 0, 0);
1527 std::vector<TextBox> boxes = paragraph->getRectsForRange(0, len, RectHeightStyle::kTight, rect_width_style);
1528 std::vector<TextBox> lineBoxes = paragraph->getRectsForRange(0, len, RectHeightStyle::kMax, rect_width_style);
1578 auto paragraph = builder.Build();
1579 paragraph->layout(550);
1580 paragraph->paint(canvas.get(), 0, 0);
1584 std::vector<TextBox> boxes = paragraph->getRectsForRange(0, len, RectHeightStyle::kTight, rect_width_style);
1585 std::vector<TextBox> lineBoxes = paragraph->getRectsForRange(0, len, RectHeightStyle::kMax, rect_width_style);
1658 auto paragraph = builder.Build();
1659 paragraph->layout(TestCanvasWidth - 100);
1660 paragraph->paint(canvas.get(), 0, 0);
1662 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
1742 auto paragraph = builder.Build();
1743 paragraph->layout(TestCanvasWidth - 100);
1745 paragraph->paint(canvas.get(), 0, 0);
1747 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
1829 auto paragraph = builder.Build();
1830 paragraph->layout(TestCanvasWidth - 100);
1831 paragraph->paint(canvas.get(), 0, 0);
1833 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
1914 auto paragraph = builder.Build();
1915 paragraph->layout(TestCanvasWidth - 100);
1916 paragraph->paint(canvas.get(), 0, 0);
1920 auto boxes = paragraph->getRectsForRange(0, 100, rect_height_style, rect_width_style);
1923 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
1986 auto paragraph = builder.Build();
1987 paragraph->layout(TestCanvasWidth - 100);
1988 paragraph->paint(canvas.get(), 0, 0);
1990 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
2011 auto boxes = paragraph->getRectsForRange(0, 100, rect_height_style, rect_width_style);
2015 boxes = paragraph->getRectsForRange(240, 250, rect_height_style, rect_width_style);
2050 auto paragraph = builder.Build();
2051 paragraph->layout(TestCanvasWidth - 100);
2052 paragraph->paint(canvas.get(), 0, 0);
2054 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
2065 auto boxes = paragraph->getRectsForRange(0, 30, rect_height_style, rect_width_style);
2076 boxes = paragraph->getRectsForRange(240, 250, rect_height_style, rect_width_style);
2086 // All lines should be justified to the width of the paragraph
2123 auto paragraph = builder.Build();
2124 paragraph->layout(TestCanvasWidth - 100);
2125 paragraph->paint(canvas.get(), 0, 0);
2136 auto boxes = paragraph->getRectsForRange(0, 100, rect_height_style, rect_width_style);
2200 auto paragraph = builder.Build();
2201 paragraph->layout(TestCanvasWidth - 100);
2202 paragraph->paint(canvas.get(), 0, 0);
2204 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
2290 auto paragraph = builder.Build();
2291 paragraph->layout(TestCanvasWidth);
2292 paragraph->paint(canvas.get(), 0, 0);
2294 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
2362 auto paragraph = builder.Build();
2363 paragraph->layout(TestCanvasWidth - 100);
2364 paragraph->paint(canvas.get(), 0, 0);
2366 REPORTER_ASSERT(reporter, paragraph->unresolvedGlyphs() == 0);
2368 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
2407 auto paragraph = builder.Build();
2408 paragraph->layout(TestCanvasWidth - 100);
2409 paragraph->paint(canvas.get(), 0, 0);
2411 REPORTER_ASSERT(reporter, paragraph->unresolvedGlyphs() == 0);
2413 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
2448 auto paragraph = builder.Build();
2449 paragraph->layout(TestCanvasWidth - 100);
2451 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
2454 paragraph->paint(canvas.get(), 0, 0);
2458 std::vector<TextBox> boxes = paragraph->getRectsForRange(0, 100, rect_height_style, rect_width_style);
2472 // that has default paragraph direction (LTR) and is placed at the end of the paragraph
2499 auto paragraph = builder.Build();
2500 paragraph->layout(TestCanvasWidth - 100);
2502 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
2505 paragraph->paint(canvas.get(), 0, 0);
2510 std::vector<TextBox> boxes = paragraph->getRectsForRange(36, 40, rect_height_style, rect_width_style);
2547 auto paragraph = builder.Build();
2548 paragraph->layout(TestCanvasWidth - 100);
2550 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
2553 paragraph->paint(canvas.get(), 0, 0);
2558 paragraph->getRectsForRange(36, 40, rect_height_style, rect_width_style);
2596 auto paragraph = builder.Build();
2597 paragraph->layout(550);
2598 paragraph->paint(canvas.get(), 0, 0);
2606 paragraph->getGlyphPositionAtCoordinate(-10000, -10000).position == 0);
2607 REPORTER_ASSERT(reporter, paragraph->getGlyphPositionAtCoordinate(-1, -1).position == 0);
2608 REPORTER_ASSERT(reporter, paragraph->getGlyphPositionAtCoordinate(0, 0).position == 0);
2609 REPORTER_ASSERT(reporter, paragraph->getGlyphPositionAtCoordinate(3, 3).position == 0);
2610 REPORTER_ASSERT(reporter, paragraph->getGlyphPositionAtCoordinate(35, 1).position == 1);
2612 paragraph->getGlyphPositionAtCoordinate(300, 2).position == 11);
2613 REPORTER_ASSERT(reporter, paragraph->getGlyphPositionAtCoordinate(301, 2.2f).position == 11);
2614 REPORTER_ASSERT(reporter, paragraph->getGlyphPositionAtCoordinate(302, 2.6f).position == 11);
2615 REPORTER_ASSERT(reporter, paragraph->getGlyphPositionAtCoordinate(301, 2.1f).position == 11);
2616 REPORTER_ASSERT(reporter, paragraph->getGlyphPositionAtCoordinate(100000, 20).position == 18);
2617 REPORTER_ASSERT(reporter, paragraph->getGlyphPositionAtCoordinate(450, 20).position == 16);
2618 REPORTER_ASSERT(reporter, paragraph->getGlyphPositionAtCoordinate(100000, 90).position == 36);
2619 REPORTER_ASSERT(reporter, paragraph->getGlyphPositionAtCoordinate(-100000, 90).position == 18);
2621 paragraph->getGlyphPositionAtCoordinate(20, -80).position == 1);
2622 REPORTER_ASSERT(reporter, paragraph->getGlyphPositionAtCoordinate(1, 90).position == 18);
2623 REPORTER_ASSERT(reporter, paragraph->getGlyphPositionAtCoordinate(1, 170).position == 36);
2624 REPORTER_ASSERT(reporter, paragraph->getGlyphPositionAtCoordinate(10000, 180).position == 72);
2625 REPORTER_ASSERT(reporter, paragraph->getGlyphPositionAtCoordinate(70, 180).position == 56);
2626 REPORTER_ASSERT(reporter, paragraph->getGlyphPositionAtCoordinate(1, 270).position == 72);
2627 REPORTER_ASSERT(reporter, paragraph->getGlyphPositionAtCoordinate(35, 90).position == 19);
2628 REPORTER_ASSERT(reporter, paragraph->getGlyphPositionAtCoordinate(10000, 10000).position == 77);
2629 REPORTER_ASSERT(reporter, paragraph->getGlyphPositionAtCoordinate(85, 10000).position == 75);
2657 auto paragraph = builder.Build();
2658 paragraph->layout(550);
2659 paragraph->paint(canvas.get(), 0, 0);
2670 auto result = paragraph->getRectsForRange(0, 0, heightStyle, widthStyle);
2674 auto result = paragraph->getRectsForRange(0, 1, heightStyle, widthStyle);
2683 auto result = paragraph->getRectsForRange(2, 8, heightStyle, widthStyle);
2692 auto result = paragraph->getRectsForRange(8, 21, heightStyle, widthStyle);
2701 auto result = paragraph->getRectsForRange(30, 100, heightStyle, widthStyle);
2714 auto result = paragraph->getRectsForRange(19, 22, heightStyle, widthStyle);
2723 auto result = paragraph->getRectsForRange(21, 21, heightStyle, widthStyle);
2760 auto paragraph = builder.Build();
2761 paragraph->layout(550);
2762 paragraph->paint(canvas.get(), 0, 0);
2767 auto result = paragraph->getRectsForRange(0, 0, heightStyle, widthStyle);
2771 auto result = paragraph->getRectsForRange(0, 1, heightStyle, widthStyle);
2780 auto result = paragraph->getRectsForRange(2, 8, heightStyle, widthStyle);
2789 auto result = paragraph->getRectsForRange(8, 21, heightStyle, widthStyle);
2828 auto paragraph = builder.Build();
2829 paragraph->layout(550);
2830 paragraph->paint(canvas.get(), 0, 0);
2835 auto result = paragraph->getRectsForRange(0, 0, heightStyle, widthStyle);
2840 auto result = paragraph->getRectsForRange(0, 1, heightStyle, widthStyle);
2849 auto result = paragraph->getRectsForRange(2, 8, heightStyle, widthStyle);
2858 auto result = paragraph->getRectsForRange(8, 21, heightStyle, widthStyle);
2867 auto result = paragraph->getRectsForRange(30, 150, heightStyle, widthStyle);
2902 auto result = paragraph->getRectsForRange(19, 22, heightStyle, widthStyle);
2916 auto result = paragraph->getRectsForRange(21, 21, heightStyle, widthStyle);
2950 auto paragraph = builder.Build();
2951 paragraph->layout(550);
2952 paragraph->paint(canvas.get(), 0, 0);
2957 auto result = paragraph->getRectsForRange(0, 0, heightStyle, widthStyle);
2962 auto result = paragraph->getRectsForRange(0, 1, heightStyle, widthStyle);
2971 auto result = paragraph->getRectsForRange(2, 8, heightStyle, widthStyle);
2980 auto result = paragraph->getRectsForRange(8, 21, heightStyle, widthStyle);
2989 auto result = paragraph->getRectsForRange(30, 150, heightStyle, widthStyle);
3024 auto result = paragraph->getRectsForRange(19, 22, heightStyle, widthStyle);
3038 auto result = paragraph->getRectsForRange(21, 21, heightStyle, widthStyle);
3072 auto paragraph = builder.Build();
3073 paragraph->layout(550);
3074 paragraph->paint(canvas.get(), 0, 0);
3079 auto result = paragraph->getRectsForRange(0, 0, heightStyle, widthStyle);
3084 auto result = paragraph->getRectsForRange(0, 1, heightStyle, widthStyle);
3093 auto result = paragraph->getRectsForRange(2, 8, heightStyle, widthStyle);
3102 auto result = paragraph->getRectsForRange(8, 21, heightStyle, widthStyle);
3111 auto result = paragraph->getRectsForRange(30, 150, heightStyle, widthStyle);
3146 auto result = paragraph->getRectsForRange(19, 22, heightStyle, widthStyle);
3160 auto result = paragraph->getRectsForRange(21, 21, heightStyle, widthStyle);
3192 auto paragraph = builder.Build();
3193 paragraph->layout(TestCanvasWidth - 100);
3194 paragraph->paint(canvas.get(), 0, 0);
3196 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
3202 auto result = paragraph->getRectsForRange(0, 0, heightStyle, widthStyle);
3206 auto first = paragraph->getRectsForRange(0, 1, heightStyle, widthStyle);
3207 auto second = paragraph->getRectsForRange(1, 2, heightStyle, widthStyle);
3208 auto last = paragraph->getRectsForRange(0, 2, heightStyle, widthStyle);
3213 auto first = paragraph->getRectsForRange(3, 4, heightStyle, widthStyle);
3214 auto second = paragraph->getRectsForRange(4, 5, heightStyle, widthStyle);
3215 auto last = paragraph->getRectsForRange(3, 5, heightStyle, widthStyle);
3220 auto first = paragraph->getRectsForRange(14, 15, heightStyle, widthStyle);
3221 auto second = paragraph->getRectsForRange(15, 16, heightStyle, widthStyle);
3222 auto third = paragraph->getRectsForRange(16, 17, heightStyle, widthStyle);
3223 auto last = paragraph->getRectsForRange(14, 17, heightStyle, widthStyle);
3259 auto paragraph = builder.Build();
3260 paragraph->layout(550);
3261 paragraph->paint(canvas.get(), 0, 0);
3267 auto result = paragraph->getRectsForRange(0, 0, heightStyle, widthStyle);
3272 auto result = paragraph->getRectsForRange(0, 1, heightStyle, widthStyle);
3282 auto result = paragraph->getRectsForRange(2, 4, heightStyle, widthStyle);
3292 auto result = paragraph->getRectsForRange(4, 5, heightStyle, widthStyle);
3302 auto result = paragraph->getRectsForRange(4, 6, heightStyle, widthStyle);
3312 auto result = paragraph->getRectsForRange(5, 6, heightStyle, widthStyle);
3322 auto result = paragraph->getRectsForRange(21, 21, heightStyle, widthStyle);
3353 auto paragraph = builder.Build();
3354 paragraph->layout(550);
3356 paragraph->paint(canvas.get(), 0, 0);
3358 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
3364 auto result = paragraph->getRectsForRange(0, 0, heightStyle, widthStyle);
3369 auto result = paragraph->getRectsForRange(0, 1, heightStyle, widthStyle);
3379 auto result = paragraph->getRectsForRange(6, 7, heightStyle, widthStyle);
3415 auto paragraph = builder.Build();
3416 paragraph->layout(550);
3418 paragraph->paint(canvas.get(), 0, 0);
3420 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
3428 auto result = paragraph->getRectsForRange(0, 0, heightStyle, widthStyle);
3432 auto result = paragraph->getRectsForRange(0, 1, heightStyle, widthStyle);
3441 auto result = paragraph->getRectsForRange(2, 4, heightStyle, widthStyle);
3450 auto result = paragraph->getRectsForRange(4, 6, heightStyle, widthStyle);
3459 auto result = paragraph->getRectsForRange(5, 6, heightStyle, widthStyle);
3468 auto result = paragraph->getRectsForRange(10, 12, heightStyle, widthStyle);
3477 auto result = paragraph->getRectsForRange(14, 18, heightStyle, widthStyle);
3486 auto result = paragraph->getRectsForRange(21, 21, heightStyle, widthStyle);
3517 auto paragraph = builder.Build();
3518 paragraph->layout(550);
3519 paragraph->paint(canvas.get(), 0, 0);
3522 auto result = paragraph->getRectsForRange(0, 10, RectHeightStyle::kTight, RectWidthStyle::kMax);
3528 auto result = paragraph->getRectsForRange(0, 10, RectHeightStyle::kStrut, RectWidthStyle::kMax);
3562 auto paragraph = builder.Build();
3563 paragraph->layout(550);
3564 paragraph->paint(canvas.get(), 0, 0);
3567 auto result1 = paragraph->getRectsForRange(0, 10, RectHeightStyle::kTight, RectWidthStyle::kMax);
3571 auto result2 = paragraph->getRectsForRange(0, 10, RectHeightStyle::kStrut, RectWidthStyle::kMax);
3604 auto paragraph = builder.Build();
3605 paragraph->layout(550);
3606 paragraph->paint(canvas.get(), 0, 0);
3608 REPORTER_ASSERT(reporter, paragraph->getWordBoundary(0) == SkRange<size_t>(0, 5));
3609 REPORTER_ASSERT(reporter, paragraph->getWordBoundary(1) == SkRange<size_t>(0, 5));
3610 REPORTER_ASSERT(reporter, paragraph->getWordBoundary(2) == SkRange<size_t>(0, 5));
3611 REPORTER_ASSERT(reporter, paragraph->getWordBoundary(3) == SkRange<size_t>(0, 5));
3612 REPORTER_ASSERT(reporter, paragraph->getWordBoundary(4) == SkRange<size_t>(0, 5));
3613 auto boxes = paragraph->getRectsForRange(5, 6, RectHeightStyle::kMax, RectWidthStyle::kTight);
3616 REPORTER_ASSERT(reporter, paragraph->getWordBoundary(5) == SkRange<size_t>(5, 7));
3617 boxes = paragraph->getRectsForRange(6, 7, RectHeightStyle::kMax, RectWidthStyle::kTight);
3620 REPORTER_ASSERT(reporter, paragraph->getWordBoundary(6) == SkRange<size_t>(5, 7));
3621 boxes = paragraph->getRectsForRange(7, 8, RectHeightStyle::kMax, RectWidthStyle::kTight);
3624 REPORTER_ASSERT(reporter, paragraph->getWordBoundary(7) == SkRange<size_t>(7, 12));
3625 REPORTER_ASSERT(reporter, paragraph->getWordBoundary(8) == SkRange<size_t>(7, 12));
3626 REPORTER_ASSERT(reporter, paragraph->getWordBoundary(9) == SkRange<size_t>(7, 12));
3627 REPORTER_ASSERT(reporter, paragraph->getWordBoundary(10) == SkRange<size_t>(7, 12));
3628 REPORTER_ASSERT(reporter, paragraph->getWordBoundary(11) == SkRange<size_t>(7, 12));
3629 REPORTER_ASSERT(reporter, paragraph->getWordBoundary(12) == SkRange<size_t>(12, 13));
3630 REPORTER_ASSERT(reporter, paragraph->getWordBoundary(13) == SkRange<size_t>(13, 18));
3631 REPORTER_ASSERT(reporter, paragraph->getWordBoundary(30) == SkRange<size_t>(30, 31));
3633 boxes = paragraph->getRectsForRange(12, 13, RectHeightStyle::kMax, RectWidthStyle::kTight);
3635 boxes = paragraph->getRectsForRange(13, 14, RectHeightStyle::kMax, RectWidthStyle::kTight);
3637 boxes = paragraph->getRectsForRange(18, 19, RectHeightStyle::kMax, RectWidthStyle::kTight);
3639 boxes = paragraph->getRectsForRange(19, 20, RectHeightStyle::kMax, RectWidthStyle::kTight);
3641 boxes = paragraph->getRectsForRange(24, 25, RectHeightStyle::kMax, RectWidthStyle::kTight);
3643 boxes = paragraph->getRectsForRange(25, 26, RectHeightStyle::kMax, RectWidthStyle::kTight);
3645 boxes = paragraph->getRectsForRange(30, 31, RectHeightStyle::kMax, RectWidthStyle::kTight);
3647 boxes = paragraph->getRectsForRange(31, 32, RectHeightStyle::kMax, RectWidthStyle::kTight);
3650 auto outLen = static_cast<ParagraphImpl*>(paragraph.get())->text().size();
3651 REPORTER_ASSERT(reporter, paragraph->getWordBoundary(outLen - 1) == SkRange<size_t>(outLen - 5, outLen));
3715 auto paragraph = builder.Build();
3716 paragraph->layout(550);
3717 paragraph->paint(canvas.get(), 0, 0);
3719 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
3764 auto paragraph = builder.Build();
3765 paragraph->layout(TestCanvasWidth / 2);
3766 paragraph->paint(canvas.get(), 0, 0);
3768 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
3808 auto paragraph = builder.Build();
3809 paragraph->layout(TestCanvasWidth / scale);
3811 paragraph->paint(canvas.get(), 0, 0);
3814 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
3850 auto paragraph = builder.Build();
3851 paragraph->layout(TestCanvasWidth - 300);
3852 paragraph->paint(canvas.get(), 0, 0);
3854 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
3892 auto paragraph = builder.Build();
3893 paragraph->layout(TestCanvasWidth);
3894 paragraph->paint(canvas.get(), 0, 0);
3896 REPORTER_ASSERT(reporter, paragraph->unresolvedGlyphs() == 0);
3898 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
3937 auto paragraph = builder.Build();
3938 paragraph->layout(TestCanvasWidth - 300);
3939 paragraph->paint(canvas.get(), 0, 0);
3944 auto result = paragraph->getRectsForRange(0, 0, rect_height_style, rect_width_style);
3947 result = paragraph->getRectsForRange(0, 119, rect_height_style, rect_width_style);
3951 result = paragraph->getRectsForRange(122, 132, rect_height_style, rect_width_style);
3956 auto pos = paragraph->getGlyphPositionAtCoordinate(610, 100).position;
3957 result = paragraph->getRectsForRange(0, pos, rect_height_style, rect_width_style);
3961 pos = paragraph->getGlyphPositionAtCoordinate(580, 100).position;
3962 result = paragraph->getRectsForRange(0, pos, rect_height_style, rect_width_style);
3966 pos = paragraph->getGlyphPositionAtCoordinate(560, 100).position;
3967 result = paragraph->getRectsForRange(0, pos, rect_height_style, rect_width_style);
3996 auto paragraph = builder.Build();
3997 paragraph->layout(300);
3999 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
4005 paragraph->layout(600);
4006 paragraph->paint(canvas.get(), 0, 0);
4038 auto paragraph = builder.Build();
4039 paragraph->layout(TestCanvasWidth);
4040 paragraph->paint(canvas.get(), 0, 0);
4042 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
4078 auto paragraph = builder.Build();
4079 paragraph->layout(TestCanvasWidth);
4080 paragraph->paint(canvas.get(), 0, 0);
4082 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
4099 auto rect = paragraph->getRectsForRange(0, 12, RectHeightStyle::kMax, RectWidthStyle::kTight)
4110 auto r1 = paragraph->getRectsForRange(i, i + 1, RectHeightStyle::kMax, RectWidthStyle::kTight);
4140 auto paragraph = builder.Build();
4141 paragraph->layout(TestCanvasWidth);
4142 paragraph->paint(canvas.get(), 10.0, 15.0);
4144 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
4193 auto paragraph = builder.Build();
4194 paragraph->layout(TestCanvasWidth);
4195 paragraph->paint(canvas.get(), 10.0, 15.0);
4197 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
4257 auto paragraph = builder.Build();
4258 paragraph->layout(TestCanvasWidth - 100);
4259 paragraph->paint(canvas.get(), 0, 0);
4261 SkRect rect1 = SkRect::MakeXYWH(0, paragraph->getIdeographicBaseline(),
4262 paragraph->getMaxWidth(),
4263 paragraph->getIdeographicBaseline());
4264 SkRect rect2 = SkRect::MakeXYWH(0, paragraph->getAlphabeticBaseline(),
4265 paragraph->getMaxWidth(),
4266 paragraph->getAlphabeticBaseline());
4271 SkScalarNearlyEqual(paragraph->getIdeographicBaseline(), 79.035f, EPSILON100));
4273 SkScalarNearlyEqual(paragraph->getAlphabeticBaseline(), 63.305f, EPSILON100));
4334 auto paragraph = builder.Build();
4335 REPORTER_ASSERT(reporter, paragraph->unresolvedGlyphs() == -1); // Not shaped yet
4336 paragraph->layout(TestCanvasWidth);
4337 paragraph->paint(canvas.get(), 10.0, 15.0);
4340 REPORTER_ASSERT(reporter, paragraph->unresolvedGlyphs() == 2); // From the text1 ("å—å…¸" - excluding the last space)
4342 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
4401 auto paragraph = builder.Build();
4402 paragraph->layout(550);
4403 paragraph->paint(canvas.get(), 0, 0);
4405 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
4412 auto boxes = paragraph->getRectsForRange(0, 0, rect_height_style, rect_width_style);
4416 auto boxes = paragraph->getRectsForRange(0, 1, rect_height_style, rect_width_style);
4425 auto boxes = paragraph->getRectsForRange(0, 1, rect_height_max_style, rect_width_style);
4434 auto boxes = paragraph->getRectsForRange(6, 10, rect_height_style, rect_width_style);
4443 auto boxes = paragraph->getRectsForRange(6, 10, rect_height_max_style, rect_width_style);
4452 auto boxes = paragraph->getRectsForRange(14, 16, rect_height_max_style, rect_width_style);
4461 auto boxes = paragraph->getRectsForRange(20, 25, rect_height_max_style, rect_width_style);
4507 auto paragraph = builder.Build();
4508 paragraph->layout(550);
4509 paragraph->paint(canvas.get(), 0, 0);
4511 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
4519 auto boxes = paragraph->getRectsForRange(0, 0, rect_height_style, rect_width_style);
4523 auto boxes = paragraph->getRectsForRange(0, 1, rect_height_style, rect_width_style);
4532 auto boxes = paragraph->getRectsForRange(0, 1, rect_height_max_style, rect_width_style);
4541 auto boxes = paragraph->getRectsForRange(6, 10, rect_height_style, rect_width_style);
4550 auto boxes = paragraph->getRectsForRange(6, 10, rect_height_max_style, rect_width_style);
4559 auto boxes = paragraph->getRectsForRange(14, 16, rect_height_max_style, rect_width_style);
4568 auto boxes = paragraph->getRectsForRange(20, 25, rect_height_max_style, rect_width_style);
4614 auto paragraph = builder.Build();
4615 paragraph->layout(550);
4616 paragraph->paint(canvas.get(), 0, 0);
4618 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
4627 auto boxes = paragraph->getRectsForRange(0, 0, rect_height_style, rect_width_style);
4631 auto boxes = paragraph->getRectsForRange(0, 1, rect_height_style, rect_width_style);
4640 auto boxes = paragraph->getRectsForRange(0, 1, rect_height_max_style, rect_width_style);
4649 auto boxes = paragraph->getRectsForRange(6, 10, rect_height_style, rect_width_style);
4658 auto boxes = paragraph->getRectsForRange(6, 10, rect_height_max_style, rect_width_style);
4667 auto boxes = paragraph->getRectsForRange(14, 16, rect_height_max_style, rect_width_style);
4676 auto boxes = paragraph->getRectsForRange(20, 25, rect_height_max_style, rect_width_style);
4721 auto paragraph = builder.Build();
4722 paragraph->layout(550);
4723 paragraph->paint(canvas.get(), 0, 0);
4725 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
4733 auto boxes1 = paragraph->getRectsForRange(0, 0, rect_height_style, rect_width_style);
4736 auto boxes2 = paragraph->getRectsForRange(0, 1, rect_height_style, rect_width_style);
4744 auto boxes3 = paragraph->getRectsForRange(0, 1, rect_height_max_style, rect_width_style);
4752 auto boxes4 = paragraph->getRectsForRange(6, 10, rect_height_style, rect_width_style);
4760 auto boxes5 = paragraph->getRectsForRange(6, 10, rect_height_max_style, rect_width_style);
4768 auto boxes6 = paragraph->getRectsForRange(14, 16, rect_height_max_style, rect_width_style);
4776 auto boxes7 = paragraph->getRectsForRange(20, 25, rect_height_max_style, rect_width_style);
4818 auto paragraph = builder.Build();
4819 paragraph->layout(550);
4820 paragraph->paint(canvas.get(), 0, 0);
4826 auto boxes = paragraph->getRectsForRange(0, 0, rect_height_style, rect_width_style);
4830 auto boxes = paragraph->getRectsForRange(0, 1, rect_height_style, rect_width_style);
4839 auto boxes = paragraph->getRectsForRange(0, 2, rect_height_strut_style, rect_width_style);
4878 auto paragraph = builder.Build();
4879 paragraph->layout(TestCanvasWidth);
4881 paragraph->paint(canvas.get(), 10.0, 15.0);
4883 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
4884 REPORTER_ASSERT(reporter, paragraph->lineNumber() == 3ull);
4918 auto paragraph = builder.Build();
4919 paragraph->layout(TestCanvasWidth);
4921 REPORTER_ASSERT(reporter, paragraph->unresolvedGlyphs() == 0);
4923 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
4948 auto paragraph = builder.Build();
4949 paragraph->layout(TestCanvasWidth);
4951 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
4989 auto paragraph = builder.Build();
4990 paragraph->layout(TestCanvasWidth);
4992 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
5032 auto paragraph = builder.Build();
5034 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
5069 auto paragraph = builder.Build();
5070 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
5117 auto paragraph = builder.Build();
5118 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
5155 auto paragraph = builder.Build();
5156 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
5191 auto paragraph = builder.Build();
5192 paragraph->layout(TestCanvasWidth);
5193 paragraph->paint(canvas.get(), 0, 0);
5196 auto pos = paragraph->getGlyphPositionAtCoordinate(0, 21);
5198 auto rect = paragraph->getRectsForRange(4, 5, RectHeightStyle::kTight, RectWidthStyle::kTight);
5218 auto paragraph = builder.Build();
5219 paragraph->layout(TestCanvasWidth);
5220 REPORTER_ASSERT(reporter, SkScalarNearlyZero(paragraph->getHeight()));
5237 auto paragraph = builder.Build();
5238 paragraph->layout(TestCanvasWidth);
5239 auto result = paragraph->getRectsForPlaceholders();
5280 auto paragraph = builder.Build();
5281 paragraph->layout(TestCanvasWidth);
5282 paragraph->paint(canvas.get(), 0, 0);
5283 canvas.get()->translate(0, paragraph->getHeight() + 10);
5334 auto paragraph = builder.Build();
5335 paragraph->layout(400);
5336 paragraph->paint(canvas.get(), 0, 0);
5365 auto paragraph = builder.Build();
5366 paragraph->layout(360);
5367 paragraph->paint(canvas.get(), 0, 0);
5374 auto paragraph = builder.Build();
5375 paragraph->layout(360);
5376 paragraph->paint(canvas.get(), 0, 0);
5396 auto paragraph = builder.Build();
5397 paragraph->layout(1000);
5398 REPORTER_ASSERT(reporter, paragraph->getHeight() == 28);
5442 auto paragraph = builder.Build();
5443 paragraph->layout(TestCanvasWidth);
5445 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
5455 paragraph->paint(canvas.get(), 100, 100);
5491 auto paragraph = builder.Build();
5492 paragraph->layout(250);
5493 paragraph->paint(canvas.get(), 0, 0);
5517 auto paragraph = builder.Build();
5518 paragraph->layout(380);
5519 paragraph->paint(canvas.get(), 0, 0);
5548 auto paragraph = builder.Build();
5549 paragraph->layout(50);
5550 paragraph->paint(canvas.get(), 0, 0);
5551 canvas.get()->translate(50, paragraph->getHeight() + 10);
5552 auto result = paragraph->getRectsForRange(0, strlen(text), RectHeightStyle::kTight, RectWidthStyle::kTight);
5560 SkASSERT(width == paragraph->getMaxWidth());
5561 SkASSERT(height == paragraph->getHeight());
5562 SkASSERT(nearlyEqual(minWidth, paragraph->getMinIntrinsicWidth(), EPSILON100));
5563 SkASSERT(nearlyEqual(maxWidth, paragraph->getMaxIntrinsicWidth(), EPSILON100));
5606 auto paragraph = builder.Build();
5607 paragraph->layout(100);
5637 auto paragraph = builder.Build();
5638 paragraph->layout(SK_ScalarInfinity);
5639 paragraph->paint(canvas.get(), 0, 0);
5706 auto paragraph = builder.Build();
5707 paragraph->layout(TestCanvasWidth);
5710 paragraph->getLineMetrics(metrics);
5712 SkDEBUGCODE(auto impl = static_cast<ParagraphImpl*>(paragraph.get());)
5722 paragraph->paint(canvas.get(), 0, 0);
5723 auto rects = paragraph->getRectsForRange(0, len * 4, RectHeightStyle::kMax, RectWidthStyle::kTight);
5772 auto paragraph = builder.Build();
5773 paragraph->layout(SK_ScalarInfinity);
5774 paragraph->paint(canvas.get(), 0, 0);
5776 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
5799 auto paragraph = builder.Build();
5800 paragraph->layout(200);
5801 paragraph->paint(canvas.get(), 0, 0);
5802 canvas.get()->translate(0, paragraph->getHeight());
5804 paragraph->getLineMetrics(metrics);
5848 auto paragraph = builder.Build();
5849 paragraph->layout(TestCanvasWidth);
5850 paragraph->paint(canvas.get(), 0, 0);
5852 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
5875 auto paragraph = builder.Build();
5876 paragraph->layout(TestCanvasWidth);
5877 paragraph->paint(canvas.get(), 0, 0);
5879 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
5904 auto paragraph = builder.Build();
5905 paragraph->layout(300000.0f);
5906 REPORTER_ASSERT(reporter, paragraph->getMinIntrinsicWidth() <= paragraph->getMaxIntrinsicWidth());
5945 auto paragraph = builder.Build();
5946 paragraph->layout(TestCanvasWidth);
5994 auto paragraph = builder.Build();
5995 paragraph->layout(500);
5996 paragraph->paint(canvas.get(), 0, 0);
5997 canvas.get()->translate(0, paragraph->getHeight());
5998 REPORTER_ASSERT(reporter, SkScalarNearlyEqual(paragraph->getHeight(), height));
6041 auto paragraph = builder.Build();
6042 paragraph->layout(300);
6043 paragraph->paint(canvas.get(), 0, 0);
6063 auto paragraph = builder.Build();
6064 paragraph->layout(TestCanvasWidth);
6065 paragraph->paint(canvas.get(), 0, 0);
6077 auto family = paragraph->getRectsForRange(0, 11, RectHeightStyle::kTight, RectWidthStyle::kTight); // 00.0000000 + 17.4699993
6078 auto face01 = paragraph->getRectsForRange(11, 13, RectHeightStyle::kTight, RectWidthStyle::kTight); // 17.4699993 + 17.4699993
6079 auto face02 = paragraph->getRectsForRange(13, 15, RectHeightStyle::kTight, RectWidthStyle::kTight); // 34.9399986 + 17.4699993
6080 auto face03 = paragraph->getRectsForRange(15, 17, RectHeightStyle::kTight, RectWidthStyle::kTight); // 52.4099998 + 17.4699993
6081 auto face04 = paragraph->getRectsForRange(17, 19, RectHeightStyle::kTight, RectWidthStyle::kTight); // 69.8799973 + 17.4699993
6086 auto rects = paragraph->getRectsForRange(j, i, RectHeightStyle::kTight, RectWidthStyle::kTight);
6092 auto res1 = paragraph->getGlyphPositionAtCoordinate(X - 5, Y);
6094 auto res2 = paragraph->getGlyphPositionAtCoordinate(X + 5, Y);
6120 auto paragraph = builder.Build();
6121 paragraph->layout(80);
6122 paragraph->paint(canvas.get(), 0, 0);
6123 REPORTER_ASSERT(reporter, paragraph->getHeight() == 14.0f);
6148 auto paragraph = builder.Build();
6149 paragraph->layout(80);
6150 paragraph->paint(canvas.get(), 0, 0);
6151 REPORTER_ASSERT(reporter, paragraph->getHeight() == 28.0f);
6187 auto paragraph = builder.Build();
6188 paragraph->layout(950);
6189 paragraph->paint(canvas.get(), 0, 0);
6190 canvas.get()->translate(0, paragraph->getHeight());
6191 return paragraph->getMinIntrinsicWidth();
6217 auto paragraph = builder.Build();
6218 paragraph->layout(300);
6219 paragraph->paint(canvas.get(), 0, 0);
6221 auto res1 = paragraph->
6222 getGlyphPositionAtCoordinate(paragraph->getMinIntrinsicWidth(),1);
6225 auto res2 = paragraph->
6226 getGlyphPositionAtCoordinate(0,paragraph->getHeight() * 0.5);
6229 auto res3 = paragraph->
6230 getGlyphPositionAtCoordinate(0,paragraph->getHeight() - 1);
6250 auto paragraph = builder.Build();
6251 paragraph->layout(500);
6252 paragraph->paint(canvas.get(), 0, 0);
6268 auto pos = paragraph->getGlyphPositionAtCoordinate(check.first, 0);
6292 auto paragraph = builder.Build();
6293 paragraph->layout(500);
6294 paragraph->paint(canvas.get(), 0, 0);
6296 auto height = paragraph->getHeight();
6297 auto res1 = paragraph->getGlyphPositionAtCoordinate(0, 0);
6299 auto res2 = paragraph->getGlyphPositionAtCoordinate(0, height / 2);
6301 auto res3 = paragraph->getGlyphPositionAtCoordinate(0, height);
6325 auto paragraph = builder.Build();
6326 paragraph->layout(100);
6328 canvas.get()->drawRect(SkRect::MakeXYWH(0, 0, paragraph->getMaxIntrinsicWidth(), paragraph->getHeight()), gray);
6329 paragraph->paint(canvas.get(), 0, 0);
6330 canvas.get()->translate(0, paragraph->getHeight());
6333 auto res = paragraph->getGlyphPositionAtCoordinate(i * 10, 2);
6369 auto paragraph = builder.Build();
6370 paragraph->layout(100);
6372 auto res = paragraph->getRectsForRange(0, str.size(), RectHeightStyle::kTight, RectWidthStyle::kTight);
6384 canvas.get()->drawRect(SkRect::MakeXYWH(0, 0, 1, paragraph->getHeight()), gray);
6385 paragraph->paint(canvas.get(), 0, 0);
6386 canvas.get()->translate(0, paragraph->getHeight());
6392 auto pos = paragraph->getGlyphPositionAtCoordinate(pointX, 2);
6420 auto paragraph = builder.Build();
6421 paragraph->layout(190);
6422 paragraph->paint(canvas.get(), 0, 0);
6434 paragraph->getLineMetrics(metrics);
6464 auto paragraph = builder.Build();
6465 paragraph->layout(190);
6466 paragraph->paint(canvas.get(), 0, 0);
6467 //auto impl = static_cast<ParagraphImpl*>(paragraph.get());
6474 canvas.get()->drawRect(SkRect::MakeXYWH(0, 0, paragraph->getMaxWidth(), paragraph->getHeight()), gray);
6488 auto boxes = paragraph->getRectsForRange(0, 100, RectHeightStyle::kTight, RectWidthStyle::kTight);
6509 paragraph->getLineMetrics(metrics);
6544 auto paragraph = builder.Build();
6545 paragraph->layout(500);
6546 paragraph->paint(canvas.get(), 0, 0);
6548 auto result = paragraph->getGlyphPositionAtCoordinate(41.0f, 0.0f);
6573 auto paragraph = builder.Build();
6574 paragraph->layout(60.0f);
6575 paragraph->paint(canvas.get(), 0, 0);
6578 paragraph->getLineMetrics(lm);
6606 auto paragraph = builder.Build();
6607 paragraph->layout(60.0f);
6608 paragraph->paint(canvas.get(), 0, 0);
6610 paragraph->getLineMetrics(lm);
6636 auto paragraph = builder.Build();
6637 paragraph->layout(100);
6638 paragraph->paint(canvas.get(), 0, 0);
6640 auto boxes = paragraph->getRectsForRange(
6641 0, paragraph->getMaxWidth(), RectHeightStyle::kTight, RectWidthStyle::kTight);
6649 SkScalarNearlyEqual(boxes[1].rect.fRight, paragraph->getMaxIntrinsicWidth()));
6669 auto pos = paragraph->getGlyphPositionAtCoordinate(check.first, 0);
6705 auto paragraph = builder.Build();
6706 paragraph->layout(797);
6707 paragraph->paint(canvas.get(), 0, 0);
6708 auto boxes = paragraph->getRectsForRange(0, 60, RectHeightStyle::kIncludeLineSpacingTop, RectWidthStyle::kMax);
6751 auto paragraph = builder.Build();
6752 paragraph->layout(797);
6753 paragraph->paint(canvas.get(), 0, 0);
6754 auto boxes = paragraph->getRectsForRange(0, 60, RectHeightStyle::kIncludeLineSpacingTop, RectWidthStyle::kMax);
6790 auto paragraph = builder.Build();
6791 paragraph->layout(TestCanvasWidth);
6792 REPORTER_ASSERT(reporter, paragraph->unresolvedGlyphs() == 0);
6794 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
6796 REPORTER_ASSERT(reporter, impl->styles().size() == 1); // paragraph style does not count
6837 auto paragraph = builder.Build();
6838 paragraph->layout(TestCanvasWidth);
6839 paragraph->paint(canvas.get(), 0, 0);
6841 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
6883 auto paragraph = builder.Build();
6884 paragraph->layout(SK_ScalarInfinity);
6885 return paragraph->getHeight();
6927 auto paragraph = builder.Build();
6928 paragraph->layout(SK_ScalarInfinity);
6930 paragraph->layout(paragraph->getMinIntrinsicWidth() + 1);
6931 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
6946 paragraph->paint(canvas.get(), 0, 0);
6969 auto paragraph = builder.Build();
6970 paragraph->layout(SK_ScalarInfinity);
6972 paragraph->layout(paragraph->getMinIntrinsicWidth() + 1);
6973 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
6986 paragraph->paint(canvas.get(), 0, 0);
7009 auto paragraph = builder.Build();
7010 paragraph->layout(std::numeric_limits<float>::max());
7015 auto result = paragraph->getRectsForRange(0, 2, heightStyle, widthStyle);
7019 auto result = paragraph->getRectsForRange(5, 10, heightStyle, widthStyle);
7066 // Second paragraph has an unresolved \t (glyph == 0)
7069 // Notice, that the cache didn't work for the second paragraph - as it should not
7087 auto paragraph = builder.Build();
7088 paragraph->layout(1.);
7091 paragraph->getLineMetrics(lm);
7108 auto paragraph = builder.Build();
7109 paragraph->layout(200.);
7112 paragraph->getLineMetrics(lm);
7115 paragraph->updateFontSize(0, text.size(), 42);
7116 paragraph->layout(200.);
7117 paragraph->getLineMetrics(lm);
7194 auto paragraph = builder.Build();
7195 paragraph->layout(width - 40);
7196 paragraph->paint(canvas.get(), 20, 20);
7198 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
7262 auto paragraph = builder.Build();
7263 paragraph->layout(TestCanvasWidth);
7264 paragraph->paint(canvas.get(), 0, 0);
7265 auto width = paragraph->getLongestLine();
7266 auto height = paragraph->getHeight();
7268 auto f1Pos = paragraph->getGlyphPositionAtCoordinate(width/6 - 5, height/2);
7269 auto f2Pos = paragraph->getGlyphPositionAtCoordinate(width/2 - 5, height/2);
7270 auto iPos = paragraph->getGlyphPositionAtCoordinate(width*5/6 - 5, height/2);
7278 auto f1 = paragraph->getRectsForRange(0, 1, RectHeightStyle::kTight,
7285 auto f2 = paragraph->getRectsForRange(1, 2, RectHeightStyle::kTight,
7292 auto fi = paragraph->getRectsForRange(2, 3, RectHeightStyle::kTight,
7317 auto paragraph = builder.Build();
7318 paragraph->layout(TestCanvasWidth);
7324 canvas.get()->drawRect(SkRect::MakeXYWH(0, 0, paragraph->getLongestLine(), paragraph->getHeight()), paint);
7325 paragraph->paint(canvas.get(), 0, 0);
7326 auto width = paragraph->getLongestLine();
7327 auto height = paragraph->getHeight();
7329 auto pos00 = paragraph->getGlyphPositionAtCoordinate(width/4, height/4);
7330 auto pos10 = paragraph->getGlyphPositionAtCoordinate(width*3/4, height/2);
7331 auto pos01 = paragraph->getGlyphPositionAtCoordinate(width/4, height/2);
7332 auto pos11 = paragraph->getGlyphPositionAtCoordinate(width*3/4, height*3/4);
7341 auto f1 = paragraph->getRectsForRange(0, 2, RectHeightStyle::kTight, RectWidthStyle::kTight);
7344 auto f2 = paragraph->getRectsForRange(4, 6, RectHeightStyle::kTight, RectWidthStyle::kTight);
7347 auto f3 = paragraph->getRectsForRange(8, 10, RectHeightStyle::kTight, RectWidthStyle::kTight);
7350 auto f4 = paragraph->getRectsForRange(8, 10, RectHeightStyle::kTight, RectWidthStyle::kTight);
7380 auto paragraph = builder.Build();
7381 paragraph->layout(TestCanvasWidth);
7382 paragraph->paint(canvas.get(), 0, 0);
7384 auto width = paragraph->getLongestLine();
7385 auto height = paragraph->getHeight();
7388 auto f1Pos = paragraph->getGlyphPositionAtCoordinate(TestCanvasWidth - width*5/6, height/2);
7389 auto f2Pos = paragraph->getGlyphPositionAtCoordinate(TestCanvasWidth - width/3, height/2);
7390 auto iPos = paragraph->getGlyphPositionAtCoordinate(TestCanvasWidth - width/6, height/2);
7396 auto f1 = paragraph->getRectsForRange(0, 1, RectHeightStyle::kTight, RectWidthStyle::kTight);
7399 auto f2 = paragraph->getRectsForRange(1, 2, RectHeightStyle::kTight, RectWidthStyle::kTight);
7402 auto fi = paragraph->getRectsForRange(2, 3, RectHeightStyle::kTight, RectWidthStyle::kTight);
7442 auto paragraph = builder.Build();
7443 paragraph->layout(TestCanvasWidth);
7444 paragraph->paint(canvas.get(), 0, paragraph->getHeight() / 2);
7445 //auto width = paragraph->getLongestLine();
7446 auto height = paragraph->getHeight();
7448 auto resSK = paragraph->getRectsForRange(0, K, RectHeightStyle::kTight,
7453 auto resKP = paragraph->getRectsForRange(K, P, RectHeightStyle::kTight,
7459 auto resPh = paragraph->getRectsForRange(P, h, RectHeightStyle::kTight,
7464 auto posK = paragraph->getGlyphPositionAtCoordinate(resSK.back().rect.fRight, height/2);
7465 auto posP = paragraph->getGlyphPositionAtCoordinate(resKP.back().rect.fRight, height/2);
7466 auto posH = paragraph->getGlyphPositionAtCoordinate(resPh.back().rect.fRight, height/2);
7492 auto paragraph = builder.Build();
7493 paragraph->layout(474);
7494 paragraph->paint(canvas.get(), 0, 0);
7495 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
7496 REPORTER_ASSERT(reporter, paragraph->lineNumber() == 1);
7529 auto paragraph = builder.Build();
7530 paragraph->layout(474);
7531 paragraph->paint(canvas.get(), 0, 0);
7532 auto impl = static_cast<ParagraphImpl*>(paragraph.get());
7533 REPORTER_ASSERT(reporter, paragraph->lineNumber() == 2);
7571 auto paragraph = builder.Build();
7572 paragraph->layout(TestCanvasWidth);
7573 paragraph->paint(canvas.get(), 0, 0);
7575 auto lineNumber = paragraph->getLineNumberAt(0);
7577 lineNumber = paragraph->getLineNumberAt(len / 2);
7579 lineNumber = paragraph->getLineNumberAt(len - 1);
7581 lineNumber = paragraph->getLineNumberAt(len + 10);
7585 auto foundMetrics = paragraph->getLineMetricsAt(0, &lineMetrics);
7587 foundMetrics = paragraph->getLineMetricsAt(1, &lineMetrics);
7589 foundMetrics = paragraph->getLineMetricsAt(3, &lineMetrics);
7591 foundMetrics = paragraph->getLineMetricsAt(10, &lineMetrics);
7595 paragraph->getLineMetrics(metrics);
7596 auto actualText = paragraph->getActualTextRange(0, false);
7598 actualText = paragraph->getActualTextRange(1, false);
7600 actualText = paragraph->getActualTextRange(2, false);
7604 auto foundCluster = paragraph->getGlyphClusterAt(0, &glyphInfo);
7606 foundCluster = paragraph->getGlyphClusterAt(len / 2, &glyphInfo);
7608 foundCluster = paragraph->getGlyphClusterAt(len, &glyphInfo);
7611 auto foundClosest = paragraph->getClosestGlyphClusterAt(0, 10, &glyphInfo);
7614 foundClosest = paragraph->getClosestGlyphClusterAt(TestCanvasWidth / 2, 20, &glyphInfo);
7617 foundClosest = paragraph->getClosestGlyphClusterAt(TestCanvasWidth + 10, 30, &glyphInfo);
7621 auto font = paragraph->getFontAt(10);
7627 auto fonts = paragraph->getFonts();
7651 auto paragraph = builder.Build();
7652 paragraph->layout(TestCanvasWidth);
7654 auto impl = static_cast<ParagraphImpl*>(paragraph.get());