[skottie] Add warning for missing text/paragraph box

Text auto-scaling requires an explicit paragraph box.

Change-Id: If3ba91051cd5fa8456fc8530d7ed7ad4c663fff9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272119
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Florin Malita <fmalita@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
diff --git a/modules/skottie/src/text/TextValue.cpp b/modules/skottie/src/text/TextValue.cpp
index 5829dd1..0111aa3 100644
--- a/modules/skottie/src/text/TextValue.cpp
+++ b/modules/skottie/src/text/TextValue.cpp
@@ -111,6 +111,11 @@
         }
     }
 
+    if (v->fResize != Shaper::ResizePolicy::kNone && v->fBox.isEmpty()) {
+        abuilder->log(Logger::Level::kWarning, jtxt, "Auto-scaled text requires a paragraph box.");
+        v->fResize = Shaper::ResizePolicy::kNone;
+    }
+
     const auto& parse_color = [] (const skjson::ArrayValue* jcolor,
                                   const internal::AnimationBuilder* abuilder,
                                   SkColor* c) {