| 544 | static bool textLayoutHasStaleInlineAttachmentSizes(const TextLayout& textLayout, Scalar displayScale) { |
| 545 | for (const auto& attachment : textLayout.getAttachments()) { |
| 546 | auto inlineViewAttachment = Valdi::castOrNull<Valdi::TextInlineAttachment>(attachment.attachment); |
| 547 | if (inlineViewAttachment == nullptr) { |
| 548 | continue; |
| 549 | } |
| 550 | |
| 551 | auto currentSize = inlineViewAttachment->getSize(); |
| 552 | auto currentReplacementSize = Size::make(currentSize.width * displayScale, currentSize.height * displayScale); |
| 553 | if (attachment.replacementSize != currentReplacementSize) { |
| 554 | return true; |
| 555 | } |
| 556 | } |
| 557 |
no test coverage detected