diff --git a/DEPS b/DEPS index 0791d81c65..65e48c209a 100644 --- a/DEPS +++ b/DEPS @@ -450,11 +450,9 @@ deps = { Var('chromium_git') + '/external/github.com/harfbuzz/harfbuzz.git@' + Var('harfbuzz_revision'), - 'third_party/highway/src': { - 'url': Var('chromium_git') + '/external/github.com/google/highway.git@' + + 'third_party/highway/src': + Var('chromium_git') + '/external/github.com/google/highway.git@' + Var('highway_revision'), - 'condition': 'checkout_v8', - }, 'third_party/icu': Var('chromium_git') + '/chromium/deps/icu.git@' + Var('icu_revision'), diff --git a/core/fpdfapi/edit/cpdf_pagecontentgenerator_unittest.cpp b/core/fpdfapi/edit/cpdf_pagecontentgenerator_unittest.cpp index 56b9aecf93..4d6c53cf03 100644 --- a/core/fpdfapi/edit/cpdf_pagecontentgenerator_unittest.cpp +++ b/core/fpdfapi/edit/cpdf_pagecontentgenerator_unittest.cpp @@ -133,6 +133,20 @@ TEST_F(CPDFPageContentGeneratorTest, ProcessRect) { buf.str(""); TestProcessPath(&generator, &buf, pPathObj.get()); EXPECT_EQ("q 0 0 100 100 re n Q\n", ByteString(buf)); + + // Same as above, but closed without repeating the first point. + pPathObj = std::make_unique(); + pPathObj->path().AppendPoint(CFX_PointF(0, 0), CFX_Path::Point::Type::kMove); + pPathObj->path().AppendPoint(CFX_PointF(50, 0), CFX_Path::Point::Type::kLine); + pPathObj->path().AppendPoint(CFX_PointF(100, 0), + CFX_Path::Point::Type::kLine); + pPathObj->path().AppendPoint(CFX_PointF(100, 100), + CFX_Path::Point::Type::kLine); + pPathObj->path().AppendPointAndClose(CFX_PointF(0, 100), + CFX_Path::Point::Type::kLine); + buf.str(""); + TestProcessPath(&generator, &buf, pPathObj.get()); + EXPECT_EQ("q 0 0 100 100 re n Q\n", ByteString(buf)); } TEST_F(CPDFPageContentGeneratorTest, Bug937) { diff --git a/core/fpdfapi/page/cpdf_clippath.cpp b/core/fpdfapi/page/cpdf_clippath.cpp index 08fd9f5f28..f8acc7852d 100644 --- a/core/fpdfapi/page/cpdf_clippath.cpp +++ b/core/fpdfapi/page/cpdf_clippath.cpp @@ -6,6 +6,7 @@ #include "core/fpdfapi/page/cpdf_clippath.h" +#include #include #include "core/fpdfapi/page/cpdf_textobject.h" @@ -86,10 +87,11 @@ void CPDF_ClipPath::AppendPathWithAutoMerge( PathData* pData = ref_.GetPrivateCopy(); if (!pData->path_and_type_list_.empty()) { const CPDF_Path& old_path = pData->path_and_type_list_.back().first; - if (old_path.IsRect()) { + std::optional corner = old_path.GetRectOppositeCorner(); + if (corner.has_value()) { CFX_PointF point0 = old_path.GetPoint(0); - CFX_PointF point2 = old_path.GetPoint(2); - CFX_FloatRect old_rect(point0.x, point0.y, point2.x, point2.y); + CFX_FloatRect old_rect(point0.x, point0.y, corner.value().x, + corner.value().y); CFX_FloatRect new_rect = path.GetBoundingBox(); if (old_rect.Contains(new_rect)) { pData->path_and_type_list_.pop_back(); diff --git a/core/fpdfapi/page/cpdf_contentparser.cpp b/core/fpdfapi/page/cpdf_contentparser.cpp index 9be9975c7d..a2fc9a8d5c 100644 --- a/core/fpdfapi/page/cpdf_contentparser.cpp +++ b/core/fpdfapi/page/cpdf_contentparser.cpp @@ -7,6 +7,7 @@ #include "core/fpdfapi/page/cpdf_contentparser.h" #include +#include #include #include @@ -367,15 +368,19 @@ CPDF_ContentParser::Stage CPDF_ContentParser::CheckClip( if (clip_path.GetTextCount() > 0) { continue; } + if (pObj->IsShading()) { + continue; + } CPDF_Path path = clip_path.GetPath(0); - if (!path.IsRect() || pObj->IsShading()) { + std::optional corner = path.GetRectOppositeCorner(); + if (!corner.has_value()) { continue; } CFX_PointF point0 = path.GetPoint(0); - CFX_PointF point2 = path.GetPoint(2); - CFX_FloatRect old_rect(point0.x, point0.y, point2.x, point2.y); + CFX_FloatRect old_rect(point0.x, point0.y, corner.value().x, + corner.value().y); if (old_rect.Contains(pObj->GetRect())) { clip_path.SetNull(); } diff --git a/core/fpdfapi/page/cpdf_path.cpp b/core/fpdfapi/page/cpdf_path.cpp index 5758e3335e..8877392751 100644 --- a/core/fpdfapi/page/cpdf_path.cpp +++ b/core/fpdfapi/page/cpdf_path.cpp @@ -33,10 +33,6 @@ CFX_FloatRect CPDF_Path::GetBoundingBoxForStrokePath(float line_width, return ref_.GetObject()->GetBoundingBoxForStrokePath(line_width, miter_limit); } -bool CPDF_Path::IsRect() const { - return ref_.GetObject()->IsRect(); -} - std::optional CPDF_Path::GetRectOppositeCorner() const { return ref_.GetObject()->GetRectOppositeCorner(); } diff --git a/core/fpdfapi/page/cpdf_path.h b/core/fpdfapi/page/cpdf_path.h index 930a4c9cc7..c17a8cb757 100644 --- a/core/fpdfapi/page/cpdf_path.h +++ b/core/fpdfapi/page/cpdf_path.h @@ -30,7 +30,6 @@ class CPDF_Path { CFX_FloatRect GetBoundingBoxForStrokePath(float line_width, float miter_limit) const; - bool IsRect() const; std::optional GetRectOppositeCorner() const; void Transform(const CFX_Matrix& matrix); diff --git a/core/fpdfapi/page/cpdf_streamparser.cpp b/core/fpdfapi/page/cpdf_streamparser.cpp index 89cd925105..f440e7e962 100644 --- a/core/fpdfapi/page/cpdf_streamparser.cpp +++ b/core/fpdfapi/page/cpdf_streamparser.cpp @@ -409,12 +409,12 @@ RetainPtr CPDF_StreamParser::ReadLeafObject() { } if (first_char == '(') { - return pdfium::MakeRetain(pool_, ReadString()); + return pdfium::MakeRetain(ReadString()); } if (first_char == '<') { CHECK_EQ(word_size_, 1); // Caller handled all other cases. - return pdfium::MakeRetain(pool_, ReadHexString(), + return pdfium::MakeRetain(ReadHexString(), CPDF_String::DataType::kIsHex); } diff --git a/core/fpdfapi/parser/cpdf_dictionary.cpp b/core/fpdfapi/parser/cpdf_dictionary.cpp index f12d397708..38b4465f06 100644 --- a/core/fpdfapi/parser/cpdf_dictionary.cpp +++ b/core/fpdfapi/parser/cpdf_dictionary.cpp @@ -24,8 +24,7 @@ #include "core/fxcrt/containers/contains.h" #include "core/fxcrt/fx_stream.h" -CPDF_Dictionary::CPDF_Dictionary() - : CPDF_Dictionary(WeakPtr()) {} +CPDF_Dictionary::CPDF_Dictionary() : CPDF_Dictionary(nullptr) {} CPDF_Dictionary::CPDF_Dictionary(const WeakPtr& pPool) : pool_(pPool) {} @@ -372,7 +371,7 @@ RetainPtr CPDF_Dictionary::RemoveFor(ByteStringView key) { CHECK(!IsLocked()); auto it = map_.find(key); if (it == map_.end()) { - return RetainPtr(); + return nullptr; } // EmbedPDF(write-generation, reads-dont-write): a write past the layer's // door, or one during a read-only walk, is a bug. diff --git a/core/fpdfapi/parser/cpdf_indirect_object_holder.cpp b/core/fpdfapi/parser/cpdf_indirect_object_holder.cpp index fd6ec238f1..4552983876 100644 --- a/core/fpdfapi/parser/cpdf_indirect_object_holder.cpp +++ b/core/fpdfapi/parser/cpdf_indirect_object_holder.cpp @@ -24,7 +24,7 @@ const CPDF_Object* FilterInvalidObjNum(const CPDF_Object* obj) { } // namespace CPDF_IndirectObjectHolder::CPDF_IndirectObjectHolder() - : byte_string_pool_(std::make_unique()) {} + : byte_string_pool_(ByteStringPool::Create()) {} CPDF_IndirectObjectHolder::~CPDF_IndirectObjectHolder() { byte_string_pool_.DeleteObject(); // Make weak. diff --git a/core/fpdfapi/parser/cpdf_object.h b/core/fpdfapi/parser/cpdf_object.h index f46f3ca354..46fa372892 100644 --- a/core/fpdfapi/parser/cpdf_object.h +++ b/core/fpdfapi/parser/cpdf_object.h @@ -207,8 +207,7 @@ template struct CanInternStrings { static constexpr bool value = std::is_same::value || std::is_same::value || - std::is_same::value || - std::is_same::value; + std::is_same::value; }; #endif // CORE_FPDFAPI_PARSER_CPDF_OBJECT_H_ diff --git a/core/fpdfapi/parser/cpdf_object_avail_unittest.cpp b/core/fpdfapi/parser/cpdf_object_avail_unittest.cpp index 0c19c79cb7..cd75175614 100644 --- a/core/fpdfapi/parser/cpdf_object_avail_unittest.cpp +++ b/core/fpdfapi/parser/cpdf_object_avail_unittest.cpp @@ -119,7 +119,7 @@ class CPDF_ObjectAvailExcludeTypeKey final : public CPDF_ObjectAvail { TEST(ObjectAvailTest, OneObject) { TestHolder holder; - holder.AddObject(1, pdfium::MakeRetain(nullptr, "string"), + holder.AddObject(1, pdfium::MakeRetain("string"), TestHolder::ObjectState::Unavailable); CPDF_ObjectAvail avail(holder.GetValidator(), &holder, 1); EXPECT_EQ(CPDF_DataAvail::kDataNotAvailable, avail.CheckAvail()); @@ -131,7 +131,7 @@ TEST(ObjectAvailTest, OneReferencedObject) { TestHolder holder; holder.AddObject(1, pdfium::MakeRetain(&holder, 2), TestHolder::ObjectState::Unavailable); - holder.AddObject(2, pdfium::MakeRetain(nullptr, "string"), + holder.AddObject(2, pdfium::MakeRetain("string"), TestHolder::ObjectState::Unavailable); CPDF_ObjectAvail avail(holder.GetValidator(), &holder, 1); EXPECT_EQ(CPDF_DataAvail::kDataNotAvailable, avail.CheckAvail()); @@ -235,9 +235,8 @@ TEST(ObjectAvailTest, Exclude) { 2); // Add string, which is refered by array item. It is should not be checked. - holder.AddObject( - 3, pdfium::MakeRetain(nullptr, "Not available string"), - TestHolder::ObjectState::Unavailable); + holder.AddObject(3, pdfium::MakeRetain("Not available string"), + TestHolder::ObjectState::Unavailable); CPDF_ObjectAvailExcludeArray avail(holder.GetValidator(), &holder, 1); EXPECT_EQ(CPDF_DataAvail::kDataAvailable, avail.CheckAvail()); } @@ -254,16 +253,15 @@ TEST(ObjectAvailTest, ReadErrorOnExclude) { holder.GetTestObject(2)->GetMutableDict()->SetNewFor( "Type", &holder, 3); // The value of "Type" key is not available at start - holder.AddObject(3, pdfium::MakeRetain(nullptr, "Exclude me"), + holder.AddObject(3, pdfium::MakeRetain("Exclude me"), TestHolder::ObjectState::Unavailable); holder.GetTestObject(2)->GetMutableDict()->SetNewFor( "OtherData", &holder, 4); // Add string, which is referred by dictionary item. It is should not be // checked, because the dictionary with it, should be skipped. - holder.AddObject( - 4, pdfium::MakeRetain(nullptr, "Not available string"), - TestHolder::ObjectState::Unavailable); + holder.AddObject(4, pdfium::MakeRetain("Not available string"), + TestHolder::ObjectState::Unavailable); CPDF_ObjectAvailExcludeTypeKey avail(holder.GetValidator(), &holder, 1); @@ -291,7 +289,7 @@ TEST(ObjectAvailTest, IgnoreNotExistsObject) { TEST(ObjectAvailTest, CheckTwice) { TestHolder holder; - holder.AddObject(1, pdfium::MakeRetain(nullptr, "string"), + holder.AddObject(1, pdfium::MakeRetain("string"), TestHolder::ObjectState::Unavailable); CPDF_ObjectAvail avail(holder.GetValidator(), &holder, 1); @@ -313,7 +311,7 @@ TEST(ObjectAvailTest, SelfReferedInlinedObject) { "Dict"); root->SetNewFor("Self", &holder, 1); - holder.AddObject(2, pdfium::MakeRetain(nullptr, "Data"), + holder.AddObject(2, pdfium::MakeRetain("Data"), TestHolder::ObjectState::Unavailable); CPDF_ObjectAvail avail(holder.GetValidator(), &holder, root); diff --git a/core/fpdfapi/parser/cpdf_object_unittest.cpp b/core/fpdfapi/parser/cpdf_object_unittest.cpp index 2aed796907..3d3780ae4b 100644 --- a/core/fpdfapi/parser/cpdf_object_unittest.cpp +++ b/core/fpdfapi/parser/cpdf_object_unittest.cpp @@ -60,9 +60,8 @@ class PDFObjectsTest : public testing::Test { auto number_int_obj = pdfium::MakeRetain(1245); auto number_float_obj = pdfium::MakeRetain(9.00345f); // String objects. - auto str_reg_obj = - pdfium::MakeRetain(nullptr, L"A simple test"); - auto str_spec_obj = pdfium::MakeRetain(nullptr, L"\t\n"); + auto str_reg_obj = pdfium::MakeRetain(L"A simple test"); + auto str_spec_obj = pdfium::MakeRetain(L"\t\n"); // Name object. auto name_obj = pdfium::MakeRetain(nullptr, "space"); // Array object. @@ -809,8 +808,7 @@ TEST(PDFArrayTest, AddReferenceAndGetObjectAt) { auto boolean_obj = pdfium::MakeRetain(true); auto int_obj = pdfium::MakeRetain(-1234); auto float_obj = pdfium::MakeRetain(2345.089f); - auto str_obj = - pdfium::MakeRetain(nullptr, "Adsfdsf 343434 %&&*\n"); + auto str_obj = pdfium::MakeRetain("Adsfdsf 343434 %&&*\n"); auto name_obj = pdfium::MakeRetain(nullptr, "Title:"); auto null_obj = pdfium::MakeRetain(); auto indirect_objs = std::to_array>( diff --git a/core/fpdfapi/parser/cpdf_page_object_avail_unittest.cpp b/core/fpdfapi/parser/cpdf_page_object_avail_unittest.cpp index 57e7ae2ad5..2a499bfd7a 100644 --- a/core/fpdfapi/parser/cpdf_page_object_avail_unittest.cpp +++ b/core/fpdfapi/parser/cpdf_page_object_avail_unittest.cpp @@ -105,8 +105,7 @@ TEST(PageObjectAvailTest, ExcludePages) { holder.GetTestObject(3)->GetMutableDict()->SetNewFor( "OtherPageData", &holder, 4); // Add unavailable object related to other page. - holder.AddObject(4, - pdfium::MakeRetain(nullptr, "Other page data"), + holder.AddObject(4, pdfium::MakeRetain("Other page data"), TestHolder::ObjectState::Unavailable); CPDF_PageObjectAvail avail(holder.GetValidator(), &holder, 1); diff --git a/core/fpdfapi/parser/cpdf_parser.cpp b/core/fpdfapi/parser/cpdf_parser.cpp index 2fb455322b..e1833de43b 100644 --- a/core/fpdfapi/parser/cpdf_parser.cpp +++ b/core/fpdfapi/parser/cpdf_parser.cpp @@ -166,8 +166,7 @@ CPDF_Parser::CPDF_Parser(ParsedObjectsHolder* holder) : objects_holder_(holder), cross_ref_table_(std::make_unique()) { if (!holder) { - owned_objects_holder_ = std::make_unique(); - objects_holder_ = owned_objects_holder_.get(); + objects_holder_ = std::make_unique(); } } @@ -1078,7 +1077,7 @@ uint32_t CPDF_Parser::GetTrailerObjectNumber() const { RetainPtr CPDF_Parser::GetCombinedTrailer() const { return cross_ref_table_->trailer() ? ToDictionary(cross_ref_table_->trailer()->Clone()) - : RetainPtr(); + : nullptr; } uint32_t CPDF_Parser::GetInfoObjNum() const { @@ -1100,7 +1099,7 @@ uint32_t CPDF_Parser::GetRootObjNum() const { // EmbedPDF(save-traversal): a save parses from the loaded bytes without // filling the document's caches. RetainPtr CPDF_Parser::ParseIndirectObject(uint32_t objnum) { - return ParseIndirectObjectInternal(objnum, objects_holder_, nullptr); + return ParseIndirectObjectInternal(objnum, objects_holder_.Get(), nullptr); } RetainPtr CPDF_Parser::ParseIndirectObjectForSave( @@ -1232,7 +1231,7 @@ const CPDF_ObjectStream* CPDF_Parser::GetObjectStream(uint32_t object_number) { // document's caches stay untouched. RetainPtr CPDF_Parser::ParseIndirectObjectAt(FX_FILESIZE pos, uint32_t objnum) { - return ParseIndirectObjectAtWithHolder(pos, objnum, objects_holder_); + return ParseIndirectObjectAtWithHolder(pos, objnum, objects_holder_.Get()); } RetainPtr CPDF_Parser::ParseIndirectObjectAtWithHolder( @@ -1300,7 +1299,7 @@ RetainPtr CPDF_Parser::LoadTrailer() { return nullptr; } - return ToDictionary(syntax_->GetObjectBody(objects_holder_)); + return ToDictionary(syntax_->GetObjectBody(objects_holder_.Get())); } uint32_t CPDF_Parser::GetPermissions(bool get_owner_perms) const { @@ -1446,8 +1445,7 @@ CPDF_Parser::Error CPDF_Parser::LoadLinearizedMainXRefTable() { return SUCCESS; } - const AutoRestorer save_metadata_objnum(&metadata_objnum_); - metadata_objnum_ = 0; + AutoRestorer save_metadata_objnum(&metadata_objnum_, 0); object_stream_map_.clear(); if (!LoadLinearizedAllCrossRefTable(main_xref_offset) && diff --git a/core/fpdfapi/parser/cpdf_parser.h b/core/fpdfapi/parser/cpdf_parser.h index 8ee2e6c440..0cf4fc49c9 100644 --- a/core/fpdfapi/parser/cpdf_parser.h +++ b/core/fpdfapi/parser/cpdf_parser.h @@ -22,8 +22,8 @@ #include "core/fpdfapi/parser/cpdf_reference_index.h" #include "core/fxcrt/bytestring.h" #include "core/fxcrt/fx_types.h" +#include "core/fxcrt/maybe_owned.h" #include "core/fxcrt/retain_ptr.h" -#include "core/fxcrt/unowned_ptr.h" class CPDF_Array; class CPDF_Dictionary; @@ -265,8 +265,7 @@ class CPDF_Parser { void SetPassword(const ByteString& password) { password_ = password; } std::unique_ptr syntax_; - std::unique_ptr owned_objects_holder_; - UnownedPtr objects_holder_; + MaybeOwned objects_holder_; // EmbedPDF(save-traversal): a save's bounded index of each object's // references. diff --git a/core/fpdfapi/parser/cpdf_parser_unittest.cpp b/core/fpdfapi/parser/cpdf_parser_unittest.cpp index 0c4301b3fd..83f34770da 100644 --- a/core/fpdfapi/parser/cpdf_parser_unittest.cpp +++ b/core/fpdfapi/parser/cpdf_parser_unittest.cpp @@ -15,6 +15,7 @@ #include "core/fpdfapi/parser/cpdf_dictionary.h" #include "core/fpdfapi/parser/cpdf_linearized_header.h" #include "core/fpdfapi/parser/cpdf_object.h" +#include "core/fpdfapi/parser/cpdf_read_validator.h" #include "core/fpdfapi/parser/cpdf_syntax_parser.h" #include "core/fxcrt/cfx_fileaccess_stream.h" #include "core/fxcrt/cfx_read_only_span_stream.h" @@ -121,8 +122,10 @@ class CPDF_TestParser final : public CPDF_Parser { // Setup reading from a buffer and initial states. bool InitTestFromBufferWithOffset(pdfium::span buffer, FX_FILESIZE header_offset) { - SetSyntaxParserForTesting(CPDF_SyntaxParser::CreateForTesting( - pdfium::MakeRetain(buffer), header_offset)); + SetSyntaxParserForTesting(std::make_unique( + pdfium::MakeRetain( + pdfium::MakeRetain(buffer), nullptr), + header_offset)); return true; } diff --git a/core/fpdfapi/parser/cpdf_security_handler_embeddertest.cpp b/core/fpdfapi/parser/cpdf_security_handler_embeddertest.cpp index 6a7a780420..113aec93c9 100644 --- a/core/fpdfapi/parser/cpdf_security_handler_embeddertest.cpp +++ b/core/fpdfapi/parser/cpdf_security_handler_embeddertest.cpp @@ -17,7 +17,6 @@ #include "public/fpdf_save.h" #include "public/fpdfview.h" #include "testing/embedder_test.h" -#include "testing/embedder_test_constants.h" #include "testing/gtest/include/gtest/gtest.h" namespace { @@ -90,18 +89,14 @@ class CPDFSecurityHandlerEmbedderTest : public EmbedderTest { private: void VerifyHelloWorldPage(FPDF_PAGE page) { ASSERT_TRUE(page); - - ScopedFPDFBitmap page_bitmap = RenderPage(page); - CompareBitmapWithExpectationSuffix(page_bitmap.get(), - pdfium::kHelloWorldPng); + std::string display_list = RenderPageToDisplayList(page); + CompareDisplayList(display_list, "hello_world"); } void VerifyModifiedHelloWorldPage(FPDF_PAGE page) { ASSERT_TRUE(page); - - ScopedFPDFBitmap page_bitmap = RenderPage(page); - CompareBitmapWithExpectationSuffix(page_bitmap.get(), - pdfium::kHelloWorldRemovedPng); + std::string display_list = RenderPageToDisplayList(page); + CompareDisplayList(display_list, "hello_world_removed"); } }; @@ -211,7 +206,6 @@ TEST_F(CPDFSecurityHandlerEmbedderTest, SetRuntimeOwnerPermissions) { } TEST_F(CPDFSecurityHandlerEmbedderTest, PasswordAfterGenerateSave) { - constexpr char kBasename[] = "encrypted"; { ASSERT_TRUE(OpenDocumentWithOptions("encrypted.pdf", "5678", LinearizeOption::kMustLinearize, @@ -223,8 +217,7 @@ TEST_F(CPDFSecurityHandlerEmbedderTest, PasswordAfterGenerateSave) { EXPECT_TRUE(FPDFPageObj_SetFillColor(red_rect, 255, 0, 0, 255)); EXPECT_TRUE(FPDFPath_SetDrawMode(red_rect, FPDF_FILLMODE_ALTERNATE, 0)); FPDFPage_InsertObject(page.get(), red_rect); - ScopedFPDFBitmap bitmap = RenderLoadedPage(page.get()); - CompareBitmapWithExpectationSuffix(bitmap.get(), kBasename); + CompareDisplayList(RenderLoadedPageToDisplayList(page.get()), "encrypted"); EXPECT_TRUE(FPDFPage_GenerateContent(page.get())); SetWholeFileAvailable(); EXPECT_TRUE(FPDF_SaveAsCopy(document(), this, 0)); @@ -247,7 +240,7 @@ TEST_F(CPDFSecurityHandlerEmbedderTest, PasswordAfterGenerateSave) { ASSERT_TRUE(doc); ScopedSavedPage page = LoadScopedSavedPage(0); ASSERT_TRUE(page); - VerifySavedRenderingWithExpectationSuffix(page.get(), kBasename); + VerifySavedRenderingWithDisplayList(page.get(), "encrypted"); EXPECT_EQ(test.permissions, FPDF_GetDocPermissions(saved_document())); } } diff --git a/core/fpdfapi/parser/cpdf_string.cpp b/core/fpdfapi/parser/cpdf_string.cpp index dcd9cb1f1b..0b34b98054 100644 --- a/core/fpdfapi/parser/cpdf_string.cpp +++ b/core/fpdfapi/parser/cpdf_string.cpp @@ -20,24 +20,13 @@ CPDF_String::CPDF_String() = default; -CPDF_String::CPDF_String(WeakPtr pool, - pdfium::span data, - DataType is_hex) - : data_(ByteStringView(data)), output_is_hex_(true) { - if (pool) { - data_ = pool->Intern(data_); - } -} +CPDF_String::CPDF_String(pdfium::span data, DataType is_hex) + : data_(ByteStringView(data)), output_is_hex_(true) {} -CPDF_String::CPDF_String(WeakPtr pool, const ByteString& str) - : data_(str) { - if (pool) { - data_ = pool->Intern(data_); - } -} +CPDF_String::CPDF_String(const ByteString& str) : data_(str) {} -CPDF_String::CPDF_String(WeakPtr pool, WideStringView str) - : CPDF_String(pool, PDF_EncodeText(str)) { +CPDF_String::CPDF_String(WideStringView str) + : CPDF_String(PDF_EncodeText(str)) { // Delegates to ctor above. } diff --git a/core/fpdfapi/parser/cpdf_string.h b/core/fpdfapi/parser/cpdf_string.h index d0ce5d482d..4d09d7cdf4 100644 --- a/core/fpdfapi/parser/cpdf_string.h +++ b/core/fpdfapi/parser/cpdf_string.h @@ -8,11 +8,9 @@ #define CORE_FPDFAPI_PARSER_CPDF_STRING_H_ #include "core/fpdfapi/parser/cpdf_object.h" -#include "core/fxcrt/bytestring_pool.h" #include "core/fxcrt/fx_string.h" #include "core/fxcrt/retain_ptr.h" #include "core/fxcrt/span.h" -#include "core/fxcrt/weak_ptr.h" class CPDF_String final : public CPDF_Object { public: @@ -39,11 +37,9 @@ class CPDF_String final : public CPDF_Object { private: CPDF_String(); - CPDF_String(WeakPtr pool, - pdfium::span data, - DataType is_hex); - CPDF_String(WeakPtr pool, const ByteString& str); - CPDF_String(WeakPtr pool, WideStringView str); + CPDF_String(pdfium::span data, DataType is_hex); + explicit CPDF_String(const ByteString& str); + explicit CPDF_String(WideStringView str); ~CPDF_String() override; ByteString data_; diff --git a/core/fpdfapi/parser/cpdf_syntax_parser.cpp b/core/fpdfapi/parser/cpdf_syntax_parser.cpp index fe960164a9..7986f62dc6 100644 --- a/core/fpdfapi/parser/cpdf_syntax_parser.cpp +++ b/core/fpdfapi/parser/cpdf_syntax_parser.cpp @@ -86,26 +86,17 @@ class ReadableSubStream final : public IFX_SeekableReadStream { // EmbedPDF(thread-confined-globals): each thread parses with its own depth. EPDF_TLS uint32_t CPDF_SyntaxParser::s_CurrentRecursionDepth = 0; -// static -std::unique_ptr CPDF_SyntaxParser::CreateForTesting( - RetainPtr pFileAccess, - FX_FILESIZE HeaderOffset) { - return std::make_unique( - pdfium::MakeRetain(std::move(pFileAccess), nullptr), - HeaderOffset); -} - CPDF_SyntaxParser::CPDF_SyntaxParser( - RetainPtr pFileAccess) + RetainPtr file_access) : CPDF_SyntaxParser( - pdfium::MakeRetain(std::move(pFileAccess), + pdfium::MakeRetain(std::move(file_access), nullptr), - 0) {} + /*header_offset_=*/0) {} CPDF_SyntaxParser::CPDF_SyntaxParser(RetainPtr validator, - FX_FILESIZE HeaderOffset) + FX_FILESIZE header_offset) : file_access_(std::move(validator)), - header_offset_(HeaderOffset), + header_offset_(header_offset), file_len_(file_access_->GetSize()) { DCHECK_LE(header_offset_, file_len_); } @@ -113,8 +104,7 @@ CPDF_SyntaxParser::CPDF_SyntaxParser(RetainPtr validator, CPDF_SyntaxParser::~CPDF_SyntaxParser() = default; bool CPDF_SyntaxParser::GetCharAt(FX_FILESIZE pos, uint8_t& ch) { - AutoRestorer save_pos(&pos_); - pos_ = pos; + AutoRestorer save_pos(&pos_, pos); return GetNextChar(ch); } @@ -594,10 +584,10 @@ RetainPtr CPDF_SyntaxParser::GetObjectBodyInternal( } if (word == "(") { - return pdfium::MakeRetain(pool_, ReadString()); + return pdfium::MakeRetain(ReadString()); } if (word == "<") { - return pdfium::MakeRetain(pool_, ReadHexString(), + return pdfium::MakeRetain(ReadHexString(), CPDF_String::DataType::kIsHex); } if (word == "[") { diff --git a/core/fpdfapi/parser/cpdf_syntax_parser.h b/core/fpdfapi/parser/cpdf_syntax_parser.h index 45f059424e..dec7b260d4 100644 --- a/core/fpdfapi/parser/cpdf_syntax_parser.h +++ b/core/fpdfapi/parser/cpdf_syntax_parser.h @@ -41,13 +41,9 @@ class CPDF_SyntaxParser { static constexpr uint32_t kParserMaxRecursionDepth = 64; - static std::unique_ptr CreateForTesting( - RetainPtr pFileAccess, - FX_FILESIZE HeaderOffset); - - explicit CPDF_SyntaxParser(RetainPtr pFileAccess); - CPDF_SyntaxParser(RetainPtr pValidator, - FX_FILESIZE HeaderOffset); + explicit CPDF_SyntaxParser(RetainPtr file_access); + CPDF_SyntaxParser(RetainPtr validator, + FX_FILESIZE header_offset); ~CPDF_SyntaxParser(); void SetReadBufferSize(uint32_t read_buffer_size) { diff --git a/core/fpdfapi/parser/fpdf_parser_decode_unittest.cpp b/core/fpdfapi/parser/fpdf_parser_decode_unittest.cpp index ee7ec3b37f..110eaa703d 100644 --- a/core/fpdfapi/parser/fpdf_parser_decode_unittest.cpp +++ b/core/fpdfapi/parser/fpdf_parser_decode_unittest.cpp @@ -176,7 +176,7 @@ TEST(ParserDecodeTest, ValidateDecoderPipelineWithIndirectObjects) { { // Invalid 2 decoder pipeline due to wrong type indirect object. CPDF_IndirectObjectHolder objects_holder; - auto decoder = pdfium::MakeRetain(nullptr, "FlateDecode"); + auto decoder = pdfium::MakeRetain("FlateDecode"); uint32_t decoder_number = objects_holder.AddIndirectObject(std::move(decoder)); diff --git a/core/fpdfdoc/cpdf_filespec_unittest.cpp b/core/fpdfdoc/cpdf_filespec_unittest.cpp index 2b12dbf45d..4ddbc93c5b 100644 --- a/core/fpdfdoc/cpdf_filespec_unittest.cpp +++ b/core/fpdfdoc/cpdf_filespec_unittest.cpp @@ -70,7 +70,7 @@ TEST(CPDFFileSpecTest, GetFileName) { L"/docs/test.pdf", L"/docs/test.pdf" #endif }; - auto str_obj = pdfium::MakeRetain(nullptr, test_data.input); + auto str_obj = pdfium::MakeRetain(test_data.input); CPDF_FileSpec file_spec(str_obj); EXPECT_EQ(test_data.expected, file_spec.GetFileName()); } diff --git a/core/fpdfdoc/cpdf_formfield_unittest.cpp b/core/fpdfdoc/cpdf_formfield_unittest.cpp index 6b31dfa8a4..91562b6f30 100644 --- a/core/fpdfdoc/cpdf_formfield_unittest.cpp +++ b/core/fpdfdoc/cpdf_formfield_unittest.cpp @@ -127,7 +127,7 @@ TEST(CPDFFormFieldTest, IsItemSelected) { } { // Values (/V) object is just a string. - auto values = pdfium::MakeRetain(/*pPool=*/nullptr, L"Gamma"); + auto values = pdfium::MakeRetain(L"Gamma"); std::vector expected_indices{2}; std::vector excluded_indices{-1, 5}; TestMultiselectFieldDict(opt_array, values, /*selected_indices=*/nullptr, @@ -136,7 +136,7 @@ TEST(CPDFFormFieldTest, IsItemSelected) { } { // Values (/V) object is just an invalid string. - auto values = pdfium::MakeRetain(/*pPool=*/nullptr, L"Omega"); + auto values = pdfium::MakeRetain(L"Omega"); std::vector expected_indices; std::vector excluded_indices{-1, 5}; TestMultiselectFieldDict(opt_array, values, /*selected_indices=*/nullptr, @@ -325,7 +325,7 @@ TEST(CPDFFormFieldTest, IsItemSelected) { { // Values (/V) or Selected Indices (/I) objects conflict with each not being // an array. - auto values = pdfium::MakeRetain(/*pPool=*/nullptr, L"Gamma"); + auto values = pdfium::MakeRetain(L"Gamma"); auto selected_indices = pdfium::MakeRetain(4); std::vector expected_indices{2}; std::vector excluded_indices{-1, 5}; diff --git a/core/fpdfdoc/cpvt_section_unittest.cpp b/core/fpdfdoc/cpvt_section_unittest.cpp index 472a2bfdcd..60bcb89029 100644 --- a/core/fpdfdoc/cpvt_section_unittest.cpp +++ b/core/fpdfdoc/cpvt_section_unittest.cpp @@ -26,12 +26,6 @@ constexpr uint16_t kHebrewGimel = 0x05D2; enum class TextContent { kEnglishAndHebrew, kHebrewAndEnglish }; -struct LayoutTestData { - TextContent content; - CFX_BidiResolver::ParagraphDirection direction; - pdfium::span expected_visual_order; -}; - // For `TextContent::kEnglishAndHebrew`: `kAuto` uses the Unicode Bidirectional // Algorithm, which resolves to LTR because the first strong character is // English. The RTL run [w4, sp4, w5] (indices 6, 7, 8) has its words ordered @@ -48,6 +42,12 @@ constexpr int kHebrewAndEnglishLtr[] = {4, 3, 2, 1, 0, 5, 6, 7, 8}; } // namespace +struct LayoutTestData { + TextContent content; + CFX_BidiResolver::ParagraphDirection direction; + pdfium::span expected_visual_order; +}; + class CPVT_SectionTest : public testing::Test { public: void SetUp() override { diff --git a/core/fxcrt/autorestorer.h b/core/fxcrt/autorestorer.h index 6f19c2acd8..367b9bf825 100644 --- a/core/fxcrt/autorestorer.h +++ b/core/fxcrt/autorestorer.h @@ -17,11 +17,18 @@ class AutoRestorer { explicit AutoRestorer(T* location) : location_(location), old_value_(*location) {} + + AutoRestorer(T* location, const T& new_value) + : location_(location), old_value_(*location) { + *location = new_value; + } + ~AutoRestorer() { if (location_) { *location_ = old_value_; } } + void AbandonRestoration() { location_ = nullptr; } private: diff --git a/core/fxcrt/autorestorer_unittest.cpp b/core/fxcrt/autorestorer_unittest.cpp index b7ee576afe..dfa6e849e7 100644 --- a/core/fxcrt/autorestorer_unittest.cpp +++ b/core/fxcrt/autorestorer_unittest.cpp @@ -16,6 +16,11 @@ TEST(fxcrt, AutoRestorer) { EXPECT_EQ(6, x); } EXPECT_EQ(5, x); + { + AutoRestorer restorer(&x, 7); + EXPECT_EQ(7, x); + } + EXPECT_EQ(5, x); } TEST(fxcrt, AutoRestorerNoOp) { @@ -30,8 +35,7 @@ TEST(fxcrt, AutoRestorerNoOp) { TEST(fxcrt, AutoRestorerAbandon) { int x = 5; { - AutoRestorer restorer(&x); - x = 6; + AutoRestorer restorer(&x, 6); EXPECT_EQ(6, x); restorer.AbandonRestoration(); } diff --git a/core/fxcrt/bytestring_pool.cpp b/core/fxcrt/bytestring_pool.cpp index eda2e8be5c..5df2b71910 100644 --- a/core/fxcrt/bytestring_pool.cpp +++ b/core/fxcrt/bytestring_pool.cpp @@ -6,17 +6,38 @@ #include "core/fxcrt/bytestring_pool.h" +#include + +#include "third_party/abseil-cpp/absl/container/flat_hash_set.h" + namespace fxcrt { -ByteStringPool::ByteStringPool() = default; +namespace { -ByteStringPool::~ByteStringPool() = default; +class ByteStringPoolImpl final : public ByteStringPool { + public: + ByteStringPoolImpl() = default; + ~ByteStringPoolImpl() override = default; -ByteString ByteStringPool::Intern(const ByteString& str) { - if (str.IsEmpty()) { - return str; + ByteString Intern(const ByteString& str) override { + if (str.IsEmpty()) { + return str; + } + return *pool_.insert(str).first; } - return *pool_.insert(str).first; + + // EmbedPDF(save-traversal): see ByteStringPool::Clear(). + void Clear() override { pool_.clear(); } + + private: + absl::flat_hash_set pool_; +}; + +} // namespace + +// static +std::unique_ptr ByteStringPool::Create() { + return std::make_unique(); } } // namespace fxcrt diff --git a/core/fxcrt/bytestring_pool.h b/core/fxcrt/bytestring_pool.h index aa998f39b4..84348d4d93 100644 --- a/core/fxcrt/bytestring_pool.h +++ b/core/fxcrt/bytestring_pool.h @@ -7,7 +7,7 @@ #ifndef CORE_FXCRT_BYTESTRING_POOL_H_ #define CORE_FXCRT_BYTESTRING_POOL_H_ -#include +#include #include "core/fxcrt/bytestring.h" @@ -15,17 +15,19 @@ namespace fxcrt { class ByteStringPool { public: - ByteStringPool(); - ~ByteStringPool(); + // Never returns nullptr. + static std::unique_ptr Create(); - ByteString Intern(const ByteString& str); + virtual ~ByteStringPool() = default; + + virtual ByteString Intern(const ByteString& str) = 0; // EmbedPDF(save-traversal): the save reader drops its interned strings // between objects, so a full rewrite does not keep every name it read. - void Clear() { pool_.clear(); } + virtual void Clear() = 0; - private: - std::unordered_set pool_; + protected: + ByteStringPool() = default; }; } // namespace fxcrt diff --git a/core/fxcrt/bytestring_pool_unittest.cpp b/core/fxcrt/bytestring_pool_unittest.cpp index c518479973..253140f805 100644 --- a/core/fxcrt/bytestring_pool_unittest.cpp +++ b/core/fxcrt/bytestring_pool_unittest.cpp @@ -10,7 +10,8 @@ namespace fxcrt { TEST(ByteStringPool, Basic) { - ByteStringPool pool; + std::unique_ptr pool = ByteStringPool::Create(); + ASSERT_TRUE(pool); ByteString null1; ByteString null2; @@ -22,10 +23,10 @@ TEST(ByteStringPool, Basic) { EXPECT_TRUE(null2.IsEmpty()); EXPECT_NE(goats1.c_str(), goats2.c_str()); - ByteString interned_null1 = pool.Intern(null1); - ByteString interned_null2 = pool.Intern(null2); - ByteString interned_goats1 = pool.Intern(goats1); - ByteString interned_goats2 = pool.Intern(goats2); + ByteString interned_null1 = pool->Intern(null1); + ByteString interned_null2 = pool->Intern(null2); + ByteString interned_goats1 = pool->Intern(goats1); + ByteString interned_goats2 = pool->Intern(goats2); // Strings are logically equal after being interned. EXPECT_EQ(null1, interned_null1); diff --git a/core/fxcrt/css/cfx_cssdeclaration.h b/core/fxcrt/css/cfx_cssdeclaration.h index c55a0ef67d..563e30ef34 100644 --- a/core/fxcrt/css/cfx_cssdeclaration.h +++ b/core/fxcrt/css/cfx_cssdeclaration.h @@ -35,7 +35,9 @@ class CFX_CSSDeclaration { RetainPtr GetProperty(CFX_CSSProperty eProperty, bool* bImportant) const; - bool empty() const { return properties_.empty(); } + bool empty() const { + return properties_.empty() && custom_properties_.empty(); + } const_prop_iterator begin() const { return properties_.begin(); } const_prop_iterator end() const { return properties_.end(); } diff --git a/core/fxcrt/css/cfx_cssdeclaration_unittest.cpp b/core/fxcrt/css/cfx_cssdeclaration_unittest.cpp index 67fe06bd20..31f2542455 100644 --- a/core/fxcrt/css/cfx_cssdeclaration_unittest.cpp +++ b/core/fxcrt/css/cfx_cssdeclaration_unittest.cpp @@ -9,6 +9,10 @@ #include #include "core/fxcrt/css/cfx_csscolorvalue.h" +#include "core/fxcrt/css/cfx_csscomputedstyle.h" +#include "core/fxcrt/css/cfx_cssstyleselector.h" +#include "core/fxcrt/retain_ptr.h" +#include "core/fxcrt/widestring.h" #include "testing/gtest/include/gtest/gtest.h" TEST(CFXCSSDeclarationTest, HexEncodingParsing) { @@ -56,3 +60,22 @@ TEST(CFXCSSDeclarationTest, RGBEncodingParsing) { ASSERT_TRUE(maybe_color.has_value()); EXPECT_EQ(0xFF80FF30u, maybe_color.value()); } + +TEST(CFXCSSDeclarationTest, CustomPropertiesInInlineStyle) { + CFX_CSSStyleSelector selector; + RetainPtr style = selector.CreateComputedStyle(nullptr); + selector.ComputeStyle( + {}, L"color: #ff0000; xfa-spacerun: yes; tab-interval: 24pt", L"", + style.Get()); + + EXPECT_EQ(0xFFFF0000u, style->GetColor()); + + WideString value; + EXPECT_TRUE(style->GetCustomStyle(L"xfa-spacerun", &value)); + EXPECT_EQ(L"yes", value); + + EXPECT_TRUE(style->GetCustomStyle(L"tab-interval", &value)); + EXPECT_EQ(L"24pt", value); + + EXPECT_FALSE(style->GetCustomStyle(L"nonexistent", &value)); +} diff --git a/core/fxcrt/css/cfx_cssstyleselector.cpp b/core/fxcrt/css/cfx_cssstyleselector.cpp index 049b86cacc..46f5affed7 100644 --- a/core/fxcrt/css/cfx_cssstyleselector.cpp +++ b/core/fxcrt/css/cfx_cssstyleselector.cpp @@ -156,7 +156,6 @@ void CFX_CSSStyleSelector::AppendInlineStyle(CFX_CSSDeclaration* pDecl, auto pSyntax = std::make_unique(style.AsStringView()); pSyntax->SetParseOnlyDeclarations(); - int32_t iLen2 = 0; const CFX_CSSData::Property* property = nullptr; WideString wsName; while (true) { @@ -168,12 +167,12 @@ void CFX_CSSStyleSelector::AppendInlineStyle(CFX_CSSDeclaration* pDecl, wsName = WideString(strValue); } } else if (eStatus == CFX_CSSSyntaxParser::Status::kPropertyValue) { - if (property || iLen2 > 0) { + if (property || !wsName.IsEmpty()) { WideStringView strValue = pSyntax->GetCurrentString(); if (!strValue.IsEmpty()) { if (property) { pDecl->AddProperty(property, strValue); - } else if (iLen2 > 0) { + } else { pDecl->AddProperty(wsName, WideString(strValue)); } } diff --git a/core/fxcrt/css/cfx_cssstylesheet.cpp b/core/fxcrt/css/cfx_cssstylesheet.cpp index 5f25eb3c7f..3928a29faf 100644 --- a/core/fxcrt/css/cfx_cssstylesheet.cpp +++ b/core/fxcrt/css/cfx_cssstylesheet.cpp @@ -46,7 +46,6 @@ CFX_CSSSyntaxParser::Status CFX_CSSStyleSheet::LoadStyleRule( CFX_CSSSyntaxParser* pSyntax) { std::vector> selectors; CFX_CSSStyleRule* pStyleRule = nullptr; - int32_t iValueLen = 0; const CFX_CSSData::Property* property = nullptr; WideString wsName; while (true) { @@ -68,7 +67,7 @@ CFX_CSSSyntaxParser::Status CFX_CSSStyleSheet::LoadStyleRule( break; } case CFX_CSSSyntaxParser::Status::kPropertyValue: { - if (property || iValueLen > 0) { + if (property || !wsName.IsEmpty()) { WideStringView strValue = pSyntax->GetCurrentString(); auto* decl = pStyleRule->GetDeclaration(); if (!strValue.IsEmpty()) { diff --git a/core/fxcrt/css/cfx_cssstylesheet_unittest.cpp b/core/fxcrt/css/cfx_cssstylesheet_unittest.cpp index 97f43a3feb..fb773320af 100644 --- a/core/fxcrt/css/cfx_cssstylesheet_unittest.cpp +++ b/core/fxcrt/css/cfx_cssstylesheet_unittest.cpp @@ -10,6 +10,7 @@ #include #include "core/fxcrt/check.h" +#include "core/fxcrt/css/cfx_csscustomproperty.h" #include "core/fxcrt/css/cfx_cssdeclaration.h" #include "core/fxcrt/css/cfx_cssenumvalue.h" #include "core/fxcrt/css/cfx_cssnumbervalue.h" @@ -331,3 +332,25 @@ TEST_F(CFXCSSStyleSheetTest, ParseWithUnterminatedCommentInProperty) { TEST_F(CFXCSSStyleSheetTest, ParseWithUnterminatedCommentInValue) { LoadAndVerifyRuleCount(L"a { border-bottom: /*2.5pc; }", 1); } + +TEST_F(CFXCSSStyleSheetTest, ParseOnlyCustomProperty) { + LoadAndVerifyDecl(L"a { xfa-spacerun: yes; }", {L"a"}, 0); + auto it = decl_->custom_begin(); + ASSERT_NE(it, decl_->custom_end()); + EXPECT_EQ(L"xfa-spacerun", (*it)->name()); + EXPECT_EQ(L"yes", (*it)->value()); + ++it; + EXPECT_EQ(it, decl_->custom_end()); +} + +TEST_F(CFXCSSStyleSheetTest, ParseMixedStandardAndCustomProperties) { + LoadAndVerifyDecl(L"a { border-left: 2.5pc; xfa-spacerun: yes; }", {L"a"}, 1); + VerifyFloat(CFX_CSSProperty::BorderLeftWidth, 2.5, + CFX_CSSNumber::Unit::kPicas); + auto it = decl_->custom_begin(); + ASSERT_NE(it, decl_->custom_end()); + EXPECT_EQ(L"xfa-spacerun", (*it)->name()); + EXPECT_EQ(L"yes", (*it)->value()); + ++it; + EXPECT_EQ(it, decl_->custom_end()); +} diff --git a/core/fxcrt/fx_memory_wrappers.h b/core/fxcrt/fx_memory_wrappers.h index f68948275d..e34af90f8d 100644 --- a/core/fxcrt/fx_memory_wrappers.h +++ b/core/fxcrt/fx_memory_wrappers.h @@ -32,7 +32,6 @@ struct IsFXDataPartitionException : std::false_type {}; // undo some of the nice segregation that we get from PartitionAlloc. template struct FxPartitionAllocAllocator { - public: static_assert(std::is_arithmetic::value || std::is_enum::value || IsFXDataPartitionException::value, "Only numeric types allowed in this partition"); diff --git a/core/fxcrt/xml/cfx_xmlparser.cpp b/core/fxcrt/xml/cfx_xmlparser.cpp index c516cc1946..3cb59c3011 100644 --- a/core/fxcrt/xml/cfx_xmlparser.cpp +++ b/core/fxcrt/xml/cfx_xmlparser.cpp @@ -85,8 +85,8 @@ CFX_XMLParser::~CFX_XMLParser() = default; std::unique_ptr CFX_XMLParser::Parse() { auto doc = std::make_unique(); - AutoRestorer> restorer(¤t_node_); - current_node_ = doc->GetRoot(); + AutoRestorer> restorer(¤t_node_, + doc->GetRoot()); if (!DoSyntaxParse(doc.get())) { return nullptr; } diff --git a/core/fxge/BUILD.gn b/core/fxge/BUILD.gn index faf565bf35..202413795b 100644 --- a/core/fxge/BUILD.gn +++ b/core/fxge/BUILD.gn @@ -83,6 +83,8 @@ source_set("fxge") { "dib/cfx_scanlinecompositor.h", "dib/cstretchengine.cpp", "dib/cstretchengine.h", + "dib/cstretchengine_hwy.cpp", + "dib/cstretchengine_hwy.h", "dib/fx_dib.cpp", "dib/fx_dib.h", "dib/scanlinecomposer_iface.h", @@ -126,63 +128,10 @@ source_set("fxge") { "../../third_party/harfbuzz", "../fdrm", "//third_party/abseil-cpp:absl", + "//third_party/highway:libhwy", ] defines = [] - if (pdf_enable_freetype) { - sources += [ - "freetype/fx_freetype.cpp", - "freetype/fx_freetype.h", - ] - public_deps += [ "../../:freetype_common" ] - } - - if (pdf_enable_freetype && (is_component_build || use_system_freetype)) { - # ft_adobe_glyph_list is not exported from the Freetype shared library so we - # need it defined in component builds and builds using system freetype. - defines += [ "DEFINE_PS_TABLES_DATA" ] - } - - if (pdf_use_agg) { - sources += [ - "agg/cfx_agg_bitmapcomposer.cpp", - "agg/cfx_agg_bitmapcomposer.h", - "agg/cfx_agg_cliprgn.cpp", - "agg/cfx_agg_cliprgn.h", - "agg/cfx_agg_devicedriver.cpp", - "agg/cfx_agg_devicedriver.h", - "agg/cfx_agg_imagerenderer.cpp", - "agg/cfx_agg_imagerenderer.h", - ] - deps += [ "../../third_party:fx_agg" ] - } - - if (pdf_use_libyuv) { - deps += [ "//third_party/libyuv" ] - } - - if (pdf_use_skia) { - sources += [ - "skia/cfx_dibbase_skia.cpp", - "skia/fx_skia_device.cpp", - ] - public_deps += [ "//skia" ] - - if (pdf_skia_font_manager_target != "") { - defines += [ "PDF_USE_SKIA_CUSTOM_FONT_MANAGER" ] - deps += [ pdf_skia_font_manager_target ] - } - } - - if (pdf_enable_fontations) { - configs += [ ":skrifa_cxx_config" ] - deps += [ - ":skrifa_cxx", - ":skrifa_cxx_cpp", - "//build/rust:cxx_cppdeps", - ] - } - if (is_android) { sources += [ "android/cfx_androidfontinfo.cpp", @@ -232,6 +181,29 @@ source_set("fxge") { configs -= [ "//build/config/win:lean_and_mean" ] } + if (pdf_enable_fontations) { + configs += [ ":skrifa_cxx_config" ] + deps += [ + ":skrifa_cxx", + ":skrifa_cxx_cpp", + "//build/rust:cxx_cppdeps", + ] + } + + if (pdf_enable_freetype) { + sources += [ + "freetype/fx_freetype.cpp", + "freetype/fx_freetype.h", + ] + public_deps += [ "../../:freetype_common" ] + } + + if (pdf_enable_freetype && (is_component_build || use_system_freetype)) { + # ft_adobe_glyph_list is not exported from the Freetype shared library so we + # need it defined in component builds and builds using system freetype. + defines += [ "DEFINE_PS_TABLES_DATA" ] + } + if (pdf_enable_xfa) { sources += [ "cfx_cttnametable.cpp", @@ -239,6 +211,37 @@ source_set("fxge") { ] } + if (pdf_use_agg) { + sources += [ + "agg/cfx_agg_bitmapcomposer.cpp", + "agg/cfx_agg_bitmapcomposer.h", + "agg/cfx_agg_cliprgn.cpp", + "agg/cfx_agg_cliprgn.h", + "agg/cfx_agg_devicedriver.cpp", + "agg/cfx_agg_devicedriver.h", + "agg/cfx_agg_imagerenderer.cpp", + "agg/cfx_agg_imagerenderer.h", + ] + deps += [ "../../third_party:fx_agg" ] + } + + if (pdf_use_libyuv) { + deps += [ "//third_party/libyuv" ] + } + + if (pdf_use_skia) { + sources += [ + "skia/cfx_dibbase_skia.cpp", + "skia/fx_skia_device.cpp", + ] + public_deps += [ "//skia" ] + + if (pdf_skia_font_manager_target != "") { + defines += [ "PDF_USE_SKIA_CUSTOM_FONT_MANAGER" ] + deps += [ pdf_skia_font_manager_target ] + } + } + visibility = [ "../../*" ] } @@ -321,10 +324,6 @@ pdfium_unittest_source_set("unittests") { configs = [] pdfium_root_dir = "../../" - if (is_win) { - sources += [ "win32/cfx_psrenderer_unittest.cpp" ] - } - # CFX_AndroidFontInfo contains cross-platform logic that can be tested on # Linux without Android-specific APIs. if (is_linux) { @@ -335,6 +334,10 @@ pdfium_unittest_source_set("unittests") { ] } + if (is_win) { + sources += [ "win32/cfx_psrenderer_unittest.cpp" ] + } + if (pdf_enable_fontations) { sources += [ "skrifa/fx_skrifa_unittest.cpp" ] deps += [ diff --git a/core/fxge/DEPS b/core/fxge/DEPS index 81e9c22f12..a25eb15df4 100644 --- a/core/fxge/DEPS +++ b/core/fxge/DEPS @@ -1,10 +1,5 @@ include_rules = [ + '+third_party/libyuv/include', '+third_party/rust', '+third_party/skia/include', ] - -specific_include_rules = { - "cfx_scanlinecompositor\.cpp": [ - '+third_party/libyuv/include/libyuv/convert_argb.h', - ], -} diff --git a/core/fxge/apple/capple_platform.cpp b/core/fxge/apple/capple_platform.cpp index 95dab74bb0..9dc55297f1 100644 --- a/core/fxge/apple/capple_platform.cpp +++ b/core/fxge/apple/capple_platform.cpp @@ -165,6 +165,10 @@ void* CApplePlatform::CreatePlatformFont( return quartz_2d_.CreateFont(font_span); } +void CApplePlatform::DestroyPlatformFont(void* font) { + quartz_2d_.DestroyFont(font); +} + // static std::unique_ptr CFX_GEModule::PlatformIface::Create() { diff --git a/core/fxge/apple/capple_platform.h b/core/fxge/apple/capple_platform.h index 0baeb8ac1c..00b719dee0 100644 --- a/core/fxge/apple/capple_platform.h +++ b/core/fxge/apple/capple_platform.h @@ -22,6 +22,7 @@ class CApplePlatform final : public CFX_GEModule::PlatformIface { void Terminate() override; std::unique_ptr CreateDefaultSystemFontInfo() override; void* CreatePlatformFont(pdfium::span font_span) override; + void DestroyPlatformFont(void* font) override; CQuartz2D quartz_2d_; }; diff --git a/core/fxge/apple/fx_apple_impl.cpp b/core/fxge/apple/fx_apple_impl.cpp index 2283be3e28..cbf003a55d 100644 --- a/core/fxge/apple/fx_apple_impl.cpp +++ b/core/fxge/apple/fx_apple_impl.cpp @@ -110,8 +110,8 @@ bool CFX_AggDeviceDriver::DrawDeviceText( const CFX_Matrix& mtObject2Device, float font_size, uint32_t color, - const CFX_TextRenderOptions& /*options*/) { - if (!font) { + const CFX_TextRenderOptions& options) { + if (!font || !font->ShouldDrawDeviceText(options)) { return false; } @@ -176,13 +176,3 @@ bool CFX_AggDeviceDriver::DrawDeviceText( } } // namespace pdfium - -void CFX_Font::ReleasePlatformResource() { - if (platform_font_) { - CQuartz2D& quartz2d = - static_cast(CFX_GEModule::Get()->GetPlatform()) - ->quartz_2d_; - quartz2d.DestroyFont(platform_font_); - platform_font_ = nullptr; - } -} diff --git a/core/fxge/cfx_font.cpp b/core/fxge/cfx_font.cpp index 532d05e878..04aec880f8 100644 --- a/core/fxge/cfx_font.cpp +++ b/core/fxge/cfx_font.cpp @@ -27,6 +27,7 @@ #include "core/fxge/cfx_glyphcache.h" #include "core/fxge/cfx_path.h" #include "core/fxge/cfx_substfont.h" +#include "core/fxge/cfx_textrenderoptions.h" #include "core/fxge/fx_font.h" namespace { @@ -322,6 +323,33 @@ bool CFX_Font::IsSubstFontBold() const { } #endif +#if BUILDFLAG(IS_APPLE) +bool CFX_Font::ShouldDrawDeviceText( + const CFX_TextRenderOptions& options) const { + if (options.font_is_cid) { + return false; + } + + const ByteString ps_name = GetPsName(); + if (ps_name.Contains("+ZJHL")) { + return false; + } + + if (ps_name == "CNAAJI+cmex10") { + return false; + } + + return true; +} + +void CFX_Font::ReleasePlatformResource() { + if (platform_font_) { + CFX_GEModule::Get()->GetPlatform()->DestroyPlatformFont(platform_font_); + platform_font_ = nullptr; + } +} +#endif + ByteString CFX_Font::GetPsName() const { if (!face_) { return ByteString(); diff --git a/core/fxge/cfx_font.h b/core/fxge/cfx_font.h index b6501a4bc8..6482ac44d9 100644 --- a/core/fxge/cfx_font.h +++ b/core/fxge/cfx_font.h @@ -137,6 +137,7 @@ class CFX_Font { #if BUILDFLAG(IS_APPLE) void* GetPlatformFont() const { return platform_font_; } void SetPlatformFont(void* font) { platform_font_ = font; } + bool ShouldDrawDeviceText(const CFX_TextRenderOptions& options) const; #endif private: diff --git a/core/fxge/cfx_gemodule.h b/core/fxge/cfx_gemodule.h index e17f37daf7..4275eaf88d 100644 --- a/core/fxge/cfx_gemodule.h +++ b/core/fxge/cfx_gemodule.h @@ -61,6 +61,7 @@ class CFX_GEModule { CreateDefaultSystemFontInfo() = 0; #if BUILDFLAG(IS_APPLE) virtual void* CreatePlatformFont(pdfium::span font_span) = 0; + virtual void DestroyPlatformFont(void* font) = 0; #endif }; diff --git a/core/fxge/cfx_path.cpp b/core/fxge/cfx_path.cpp index c22bb45142..5495887e28 100644 --- a/core/fxge/cfx_path.cpp +++ b/core/fxge/cfx_path.cpp @@ -22,6 +22,10 @@ bool IsRectPreTransform(const std::vector& points) { return false; } + if (points.size() == 4 && !points[3].close_figure_) { + return false; + } + if (points.size() == 5 && points[0].point_ != points[4].point_) { return false; } @@ -68,7 +72,8 @@ CFX_FloatRect CreateRectFromPoints(const CFX_PointF& p1, const CFX_PointF& p2) { } bool PathPointsNeedNormalization(const std::vector& points) { - return points.size() > 5; + return points.size() > 5 || + (points.size() == 5 && points[0].point_ != points[4].point_); } // Returns whether `point` lies strictly between `prev` and `next` on a @@ -91,48 +96,60 @@ std::vector GetNormalizedPoints( const std::vector& points) { DCHECK(PathPointsNeedNormalization(points)); - if (points[0].point_ != points.back().point_) { + const size_t expected_size = points[0].point_ == points.back().point_ ? 5 : 4; + if (expected_size == 4 && !points.back().close_figure_) { return {}; } std::vector normalized; - normalized.reserve(6); + normalized.reserve(expected_size); normalized.push_back(points[0]); for (auto it = points.begin() + 1; it != points.end(); ++it) { - // Exactly 5 points left. Stop normalizing and take what is left. - if (normalized.size() + std::distance(it, points.end()) == 5) { + // Exactly `expected_size` points left. Stop normalizing and take what is + // left. + if (normalized.size() + std::distance(it, points.end()) == expected_size) { std::copy(it, points.end(), std::back_inserter(normalized)); break; } const auto& point = *it; - if (point.type_ == CFX_Path::Point::Type::kLine && !point.close_figure_ && + if (point.type_ == CFX_Path::Point::Type::kLine && !normalized.back().close_figure_) { - // If the line does not move, skip this point. - if (point.point_ == normalized.back().point_) { - continue; - } - - // If the line continues straight on along the same edge, skip this - // point. Some PDF generators emit a rectangle with an extra vertex in - // the middle of an edge. const auto next = std::next(it); - if (next != points.end() && next->type_ == CFX_Path::Point::Type::kLine && - IsBetweenOnAxisAlignedLine(normalized.back().point_, point.point_, - next->point_)) { - continue; + if (!point.close_figure_) { + // If the line does not move, skip this point. + if (point.point_ == normalized.back().point_) { + continue; + } + + // If the line continues straight on along the same edge, skip this + // point. Some PDF generators emit a rectangle with an extra vertex in + // the middle of an edge. + if (next != points.end() && + next->type_ == CFX_Path::Point::Type::kLine && + IsBetweenOnAxisAlignedLine(normalized.back().point_, point.point_, + next->point_)) { + continue; + } + } else if (next == points.end()) { + if (point.point_ == normalized.back().point_ || + IsBetweenOnAxisAlignedLine(normalized.back().point_, point.point_, + points[0].point_)) { + normalized.back().close_figure_ = true; + continue; + } } } - normalized.push_back(point); - // Too many points. Not considered as a rectangle. - if (normalized.size() > 5) { + if (normalized.size() >= expected_size) { return {}; } + + normalized.push_back(point); } - DCHECK_EQ(5u, normalized.size()); + DCHECK_EQ(expected_size, normalized.size()); return normalized; } diff --git a/core/fxge/cfx_path_unittest.cpp b/core/fxge/cfx_path_unittest.cpp index fd8b3894bd..688fab13e8 100644 --- a/core/fxge/cfx_path_unittest.cpp +++ b/core/fxge/cfx_path_unittest.cpp @@ -12,15 +12,11 @@ TEST(CFXPath, BasicTest) { path.AppendRect(/*left=*/1, /*bottom=*/2, /*right=*/3, /*top=*/5); EXPECT_EQ(5u, path.GetPoints().size()); EXPECT_TRUE(path.IsRect()); - std::optional rect = path.GetRect(nullptr); - ASSERT_TRUE(rect.has_value()); - EXPECT_EQ(CFX_FloatRect(1, 2, 3, 5), rect.value()); + EXPECT_EQ(CFX_FloatRect(1, 2, 3, 5), path.GetRect(nullptr)); EXPECT_EQ(CFX_FloatRect(1, 2, 3, 5), path.GetBoundingBox()); const CFX_Matrix kScaleMatrix(1, 0, 0, 2, 60, 70); - rect = path.GetRect(&kScaleMatrix); - ASSERT_TRUE(rect.has_value()); - EXPECT_EQ(CFX_FloatRect(61, 74, 63, 80), rect.value()); + EXPECT_EQ(CFX_FloatRect(61, 74, 63, 80), path.GetRect(&kScaleMatrix)); EXPECT_EQ(CFX_FloatRect(1, 2, 3, 5), path.GetBoundingBox()); path.Clear(); @@ -28,40 +24,32 @@ TEST(CFXPath, BasicTest) { EXPECT_FALSE(path.IsRect()); EXPECT_EQ(CFX_FloatRect(), path.GetBoundingBox()); - // 4 points without a closed path makes a rect. + // 4 points without a closed path does not make a rect. path.AppendPoint({0, 0}, CFX_Path::Point::Type::kMove); path.AppendPoint({0, 1}, CFX_Path::Point::Type::kLine); path.AppendPoint({1, 1}, CFX_Path::Point::Type::kLine); path.AppendPoint({1, 0}, CFX_Path::Point::Type::kLine); EXPECT_EQ(4u, path.GetPoints().size()); - EXPECT_TRUE(path.IsRect()); - rect = path.GetRect(nullptr); - ASSERT_TRUE(rect.has_value()); - EXPECT_EQ(CFX_FloatRect(0, 0, 1, 1), rect.value()); + EXPECT_FALSE(path.IsRect()); + EXPECT_FALSE(path.GetRect(nullptr).has_value()); EXPECT_EQ(CFX_FloatRect(0, 0, 1, 1), path.GetBoundingBox()); - // 4 points with a closed path also makes a rect. + // 4 points with a closed path makes a rect. path.ClosePath(); EXPECT_EQ(4u, path.GetPoints().size()); EXPECT_TRUE(path.IsRect()); - rect = path.GetRect(nullptr); - ASSERT_TRUE(rect.has_value()); - EXPECT_EQ(CFX_FloatRect(0, 0, 1, 1), rect.value()); + EXPECT_EQ(CFX_FloatRect(0, 0, 1, 1), path.GetRect(nullptr)); EXPECT_EQ(CFX_FloatRect(0, 0, 1, 1), path.GetBoundingBox()); path.Transform(kScaleMatrix); EXPECT_TRUE(path.IsRect()); - rect = path.GetRect(nullptr); - ASSERT_TRUE(rect.has_value()); - EXPECT_EQ(CFX_FloatRect(60, 70, 61, 72), rect.value()); + EXPECT_EQ(CFX_FloatRect(60, 70, 61, 72), path.GetRect(nullptr)); EXPECT_EQ(CFX_FloatRect(60, 70, 61, 72), path.GetBoundingBox()); path.Clear(); path.AppendFloatRect({1, 2, 3, 5}); EXPECT_TRUE(path.IsRect()); - rect = path.GetRect(nullptr); - ASSERT_TRUE(rect.has_value()); - EXPECT_EQ(CFX_FloatRect(1, 2, 3, 5), rect.value()); + EXPECT_EQ(CFX_FloatRect(1, 2, 3, 5), path.GetRect(nullptr)); EXPECT_EQ(CFX_FloatRect(1, 2, 3, 5), path.GetBoundingBox()); } @@ -71,27 +59,21 @@ TEST(CFXPath, ShearTransform) { const CFX_Matrix kShearMatrix(1, 2, 0, 1, 0, 0); EXPECT_TRUE(path.IsRect()); - std::optional rect = path.GetRect(&kShearMatrix); - EXPECT_FALSE(rect.has_value()); + EXPECT_FALSE(path.GetRect(&kShearMatrix).has_value()); EXPECT_EQ(CFX_FloatRect(1, 2, 3, 5), path.GetBoundingBox()); path.Transform(kShearMatrix); EXPECT_FALSE(path.IsRect()); - rect = path.GetRect(nullptr); - EXPECT_FALSE(rect.has_value()); + EXPECT_FALSE(path.GetRect(nullptr).has_value()); EXPECT_EQ(CFX_FloatRect(1, 4, 3, 11), path.GetBoundingBox()); const CFX_Matrix shear_inverse_matrix = kShearMatrix.GetInverse(); - rect = path.GetRect(&shear_inverse_matrix); - ASSERT_TRUE(rect.has_value()); - EXPECT_EQ(CFX_FloatRect(1, 2, 3, 5), rect.value()); + EXPECT_EQ(CFX_FloatRect(1, 2, 3, 5), path.GetRect(&shear_inverse_matrix)); EXPECT_EQ(CFX_FloatRect(1, 4, 3, 11), path.GetBoundingBox()); path.Transform(shear_inverse_matrix); EXPECT_TRUE(path.IsRect()); - rect = path.GetRect(nullptr); - ASSERT_TRUE(rect.has_value()); - EXPECT_EQ(CFX_FloatRect(1, 2, 3, 5), rect.value()); + EXPECT_EQ(CFX_FloatRect(1, 2, 3, 5), path.GetRect(nullptr)); EXPECT_EQ(CFX_FloatRect(1, 2, 3, 5), path.GetBoundingBox()); } @@ -140,6 +122,7 @@ TEST(CFXPath, Hexagon) { } TEST(CFXPath, ClosePath) { + // The path starts out open. CFX_Path path; path.AppendLine({0, 0}, {0, 1}); path.AppendLine({0, 1}, {1, 1}); @@ -147,25 +130,19 @@ TEST(CFXPath, ClosePath) { ASSERT_EQ(4u, path.GetPoints().size()); EXPECT_EQ(CFX_Path::Point::Type::kLine, path.GetType(3)); EXPECT_FALSE(path.IsClosingFigure(3)); - EXPECT_TRUE(path.IsRect()); - std::optional rect = path.GetRect(nullptr); - ASSERT_TRUE(rect.has_value()); - EXPECT_EQ(CFX_FloatRect(0, 0, 1, 1), rect.value()); + EXPECT_FALSE(path.IsRect()); + EXPECT_FALSE(path.GetRect(nullptr).has_value()); const CFX_Matrix kIdentityMatrix; ASSERT_TRUE(kIdentityMatrix.IsIdentity()); - rect = path.GetRect(&kIdentityMatrix); - ASSERT_TRUE(rect.has_value()); - EXPECT_EQ(CFX_FloatRect(0, 0, 1, 1), rect.value()); + EXPECT_FALSE(path.GetRect(&kIdentityMatrix).has_value()); path.ClosePath(); ASSERT_EQ(4u, path.GetPoints().size()); EXPECT_EQ(CFX_Path::Point::Type::kLine, path.GetType(3)); EXPECT_TRUE(path.IsClosingFigure(3)); EXPECT_TRUE(path.IsRect()); - rect = path.GetRect(nullptr); - ASSERT_TRUE(rect.has_value()); - EXPECT_EQ(CFX_FloatRect(0, 0, 1, 1), rect.value()); + EXPECT_EQ(CFX_FloatRect(0, 0, 1, 1), path.GetRect(nullptr)); // Calling ClosePath() repeatedly makes no difference. path.ClosePath(); @@ -173,9 +150,7 @@ TEST(CFXPath, ClosePath) { EXPECT_EQ(CFX_Path::Point::Type::kLine, path.GetType(3)); EXPECT_TRUE(path.IsClosingFigure(3)); EXPECT_TRUE(path.IsRect()); - rect = path.GetRect(nullptr); - ASSERT_TRUE(rect.has_value()); - EXPECT_EQ(CFX_FloatRect(0, 0, 1, 1), rect.value()); + EXPECT_EQ(CFX_FloatRect(0, 0, 1, 1), path.GetRect(nullptr)); path.AppendPointAndClose({0, 0}, CFX_Path::Point::Type::kLine); ASSERT_EQ(5u, path.GetPoints().size()); @@ -184,9 +159,7 @@ TEST(CFXPath, ClosePath) { EXPECT_EQ(CFX_Path::Point::Type::kLine, path.GetType(4)); EXPECT_TRUE(path.IsClosingFigure(4)); EXPECT_TRUE(path.IsRect()); - rect = path.GetRect(nullptr); - ASSERT_TRUE(rect.has_value()); - EXPECT_EQ(CFX_FloatRect(0, 0, 1, 1), rect.value()); + EXPECT_EQ(CFX_FloatRect(0, 0, 1, 1), path.GetRect(nullptr)); } TEST(CFXPath, FivePointRect) { @@ -200,18 +173,52 @@ TEST(CFXPath, FivePointRect) { EXPECT_EQ(CFX_Path::Point::Type::kLine, path.GetType(4)); EXPECT_FALSE(path.IsClosingFigure(4)); EXPECT_TRUE(path.IsRect()); - std::optional rect = path.GetRect(nullptr); - ASSERT_TRUE(rect.has_value()); - EXPECT_EQ(CFX_FloatRect(0, 0, 2, 1), rect.value()); + EXPECT_EQ(CFX_FloatRect(0, 0, 2, 1), path.GetRect(nullptr)); path.ClosePath(); ASSERT_EQ(5u, path.GetPoints().size()); EXPECT_EQ(CFX_Path::Point::Type::kLine, path.GetType(4)); EXPECT_TRUE(path.IsClosingFigure(4)); EXPECT_TRUE(path.IsRect()); - rect = path.GetRect(nullptr); - ASSERT_TRUE(rect.has_value()); - EXPECT_EQ(CFX_FloatRect(0, 0, 2, 1), rect.value()); + EXPECT_EQ(CFX_FloatRect(0, 0, 2, 1), path.GetRect(nullptr)); + + // 4-point rect with a duplicate point. + path.Clear(); + path.AppendPoint({0, 0}, CFX_Path::Point::Type::kMove); + path.AppendPoint({0, 0}, CFX_Path::Point::Type::kLine); + path.AppendPoint({2, 0}, CFX_Path::Point::Type::kLine); + path.AppendPoint({2, 1}, CFX_Path::Point::Type::kLine); + path.AppendPoint({0, 1}, CFX_Path::Point::Type::kLine); + ASSERT_EQ(5u, path.GetPoints().size()); + EXPECT_FALSE(path.IsRect()); + EXPECT_FALSE(path.GetRect(nullptr).has_value()); + + path.ClosePath(); + EXPECT_TRUE(path.IsRect()); + EXPECT_EQ(CFX_FloatRect(0, 0, 2, 1), path.GetRect(nullptr)); + + // 4-point rect with a collinear point on an edge. + path.Clear(); + path.AppendPoint({0, 0}, CFX_Path::Point::Type::kMove); + path.AppendPoint({1, 0}, CFX_Path::Point::Type::kLine); + path.AppendPoint({2, 0}, CFX_Path::Point::Type::kLine); + path.AppendPoint({2, 1}, CFX_Path::Point::Type::kLine); + path.AppendPointAndClose({0, 1}, CFX_Path::Point::Type::kLine); + ASSERT_EQ(5u, path.GetPoints().size()); + EXPECT_TRUE(path.IsRect()); + EXPECT_EQ(CFX_FloatRect(0, 0, 2, 1), path.GetRect(nullptr)); + + // 4-point rect with a collinear point on the closing edge. + path.Clear(); + path.AppendPoint({0, 0}, CFX_Path::Point::Type::kMove); + path.AppendPoint({2, 0}, CFX_Path::Point::Type::kLine); + path.AppendPoint({2, 1}, CFX_Path::Point::Type::kLine); + path.AppendPoint({0, 1}, CFX_Path::Point::Type::kLine); + path.AppendPointAndClose({0, 0.1f}, CFX_Path::Point::Type::kLine); + ASSERT_EQ(5u, path.GetPoints().size()); + EXPECT_TRUE(path.IsRect()); + EXPECT_EQ(CFX_FloatRect(0, 0, 2, 1), path.GetRect(nullptr)); + EXPECT_EQ(CFX_FloatRect(0, 0, 2, 1), path.GetBoundingBox()); } TEST(CFXPath, SixPlusPointRect) { @@ -223,9 +230,7 @@ TEST(CFXPath, SixPlusPointRect) { path.AppendPoint({0, 1}, CFX_Path::Point::Type::kLine); path.AppendPoint({0, 0}, CFX_Path::Point::Type::kLine); EXPECT_TRUE(path.IsRect()); - std::optional rect = path.GetRect(nullptr); - ASSERT_TRUE(rect.has_value()); - EXPECT_EQ(CFX_FloatRect(0, 0, 2, 1), rect.value()); + EXPECT_EQ(CFX_FloatRect(0, 0, 2, 1), path.GetRect(nullptr)); EXPECT_EQ(CFX_FloatRect(0, 0, 2, 1), path.GetBoundingBox()); path.Clear(); @@ -243,9 +248,21 @@ TEST(CFXPath, SixPlusPointRect) { path.AppendPoint({0, 0}, CFX_Path::Point::Type::kLine); path.AppendPoint({0, 0}, CFX_Path::Point::Type::kLine); EXPECT_TRUE(path.IsRect()); - rect = path.GetRect(nullptr); - ASSERT_TRUE(rect.has_value()); - EXPECT_EQ(CFX_FloatRect(0, 0, 2, 1), rect.value()); + EXPECT_EQ(CFX_FloatRect(0, 0, 2, 1), path.GetRect(nullptr)); + EXPECT_EQ(CFX_FloatRect(0, 0, 2, 1), path.GetBoundingBox()); + + // 4-point rect with duplicate points that does not repeat the start point at + // the end. + path.Clear(); + path.AppendPoint({0, 0}, CFX_Path::Point::Type::kMove); + path.AppendPoint({0, 0}, CFX_Path::Point::Type::kLine); + path.AppendPoint({2, 0}, CFX_Path::Point::Type::kLine); + path.AppendPoint({2, 1}, CFX_Path::Point::Type::kLine); + path.AppendPoint({0, 1}, CFX_Path::Point::Type::kLine); + path.AppendPointAndClose({0, 1}, CFX_Path::Point::Type::kLine); + ASSERT_EQ(6u, path.GetPoints().size()); + EXPECT_TRUE(path.IsRect()); + EXPECT_EQ(CFX_FloatRect(0, 0, 2, 1), path.GetRect(nullptr)); EXPECT_EQ(CFX_FloatRect(0, 0, 2, 1), path.GetBoundingBox()); } @@ -276,6 +293,16 @@ TEST(CFXPath, GetRectOppositeCorner) { ASSERT_EQ(CFX_PointF(2, 0), path.GetPoints()[2].point_); EXPECT_EQ(CFX_PointF(2, 1), path.GetRectOppositeCorner()); + // Same as above, but closed without repeating the first point. + path.Clear(); + path.AppendPoint({0, 0}, CFX_Path::Point::Type::kMove); + path.AppendPoint({1, 0}, CFX_Path::Point::Type::kLine); + path.AppendPoint({2, 0}, CFX_Path::Point::Type::kLine); + path.AppendPoint({2, 1}, CFX_Path::Point::Type::kLine); + path.AppendPointAndClose({0, 1}, CFX_Path::Point::Type::kLine); + ASSERT_EQ(CFX_PointF(2, 0), path.GetPoints()[2].point_); + EXPECT_EQ(CFX_PointF(2, 1), path.GetRectOppositeCorner()); + path.Clear(); path.AppendPoint({0, 0}, CFX_Path::Point::Type::kMove); path.AppendPoint({2, 0}, CFX_Path::Point::Type::kLine); @@ -296,14 +323,10 @@ TEST(CFXPath, SixPlusPointRectWithCollinearPoints) { path.AppendPointAndClose({0, 1}, CFX_Path::Point::Type::kLine); ASSERT_EQ(6u, path.GetPoints().size()); EXPECT_TRUE(path.IsRect()); - std::optional rect = path.GetRect(nullptr); - ASSERT_TRUE(rect.has_value()); - EXPECT_EQ(CFX_FloatRect(0, 0, 2, 1), rect.value()); + EXPECT_EQ(CFX_FloatRect(0, 0, 2, 1), path.GetRect(nullptr)); constexpr CFX_Matrix kScaleMatrix(1, 0, 0, 2, 60, 70); - rect = path.GetRect(&kScaleMatrix); - ASSERT_TRUE(rect.has_value()); - EXPECT_EQ(CFX_FloatRect(60, 70, 62, 72), rect.value()); + EXPECT_EQ(CFX_FloatRect(60, 70, 62, 72), path.GetRect(&kScaleMatrix)); // An extra point on a vertical edge. path.Clear(); @@ -314,9 +337,7 @@ TEST(CFXPath, SixPlusPointRectWithCollinearPoints) { path.AppendPoint({0, 1}, CFX_Path::Point::Type::kLine); path.AppendPointAndClose({0, 0}, CFX_Path::Point::Type::kLine); EXPECT_TRUE(path.IsRect()); - rect = path.GetRect(nullptr); - ASSERT_TRUE(rect.has_value()); - EXPECT_EQ(CFX_FloatRect(0, 0, 2, 1), rect.value()); + EXPECT_EQ(CFX_FloatRect(0, 0, 2, 1), path.GetRect(nullptr)); // Extra points on two edges. path.Clear(); @@ -329,9 +350,20 @@ TEST(CFXPath, SixPlusPointRectWithCollinearPoints) { path.AppendPointAndClose({0, 0}, CFX_Path::Point::Type::kLine); ASSERT_EQ(7u, path.GetPoints().size()); EXPECT_TRUE(path.IsRect()); - rect = path.GetRect(&kScaleMatrix); - ASSERT_TRUE(rect.has_value()); - EXPECT_EQ(CFX_FloatRect(60, 70, 62, 72), rect.value()); + EXPECT_EQ(CFX_FloatRect(60, 70, 62, 72), path.GetRect(&kScaleMatrix)); + + // Same as above, but closed without repeating the first point. + path.Clear(); + path.AppendPoint({0, 0}, CFX_Path::Point::Type::kMove); + path.AppendPoint({1, 0}, CFX_Path::Point::Type::kLine); + path.AppendPoint({2, 0}, CFX_Path::Point::Type::kLine); + path.AppendPoint({2, 1}, CFX_Path::Point::Type::kLine); + path.AppendPoint({1, 1}, CFX_Path::Point::Type::kLine); + path.AppendPointAndClose({0, 1}, CFX_Path::Point::Type::kLine); + ASSERT_EQ(6u, path.GetPoints().size()); + EXPECT_TRUE(path.IsRect()); + EXPECT_EQ(CFX_FloatRect(0, 0, 2, 1), path.GetRect(nullptr)); + EXPECT_EQ(CFX_FloatRect(60, 70, 62, 72), path.GetRect(&kScaleMatrix)); // A point that goes past the corner and back is not in between its // neighbors, so the path is not a rectangle. @@ -365,14 +397,7 @@ TEST(CFXPath, NotRect) { path.AppendPoint({0, 1}, CFX_Path::Point::Type::kLine); path.AppendPoint({0, 0.1f}, CFX_Path::Point::Type::kLine); EXPECT_FALSE(path.IsRect()); - std::optional rect = path.GetRect(nullptr); - EXPECT_FALSE(rect.has_value()); - EXPECT_EQ(CFX_FloatRect(0, 0, 2, 1), path.GetBoundingBox()); - - path.ClosePath(); - EXPECT_FALSE(path.IsRect()); - rect = path.GetRect(nullptr); - EXPECT_FALSE(rect.has_value()); + EXPECT_FALSE(path.GetRect(nullptr).has_value()); EXPECT_EQ(CFX_FloatRect(0, 0, 2, 1), path.GetBoundingBox()); path.Clear(); @@ -381,8 +406,7 @@ TEST(CFXPath, NotRect) { path.AppendPoint({3, 1}, CFX_Path::Point::Type::kLine); path.AppendPointAndClose({0, 1}, CFX_Path::Point::Type::kLine); EXPECT_FALSE(path.IsRect()); - rect = path.GetRect(nullptr); - EXPECT_FALSE(rect.has_value()); + EXPECT_FALSE(path.GetRect(nullptr).has_value()); EXPECT_EQ(CFX_FloatRect(0, 0, 3, 1), path.GetBoundingBox()); path.Clear(); @@ -391,8 +415,7 @@ TEST(CFXPath, NotRect) { path.AppendPoint({2, 1}, CFX_Path::Point::Type::kLine); path.AppendPointAndClose({0, 1}, CFX_Path::Point::Type::kMove); EXPECT_FALSE(path.IsRect()); - rect = path.GetRect(nullptr); - EXPECT_FALSE(rect.has_value()); + EXPECT_FALSE(path.GetRect(nullptr).has_value()); EXPECT_EQ(CFX_FloatRect(0, 0, 2, 1), path.GetBoundingBox()); path.Clear(); @@ -401,8 +424,7 @@ TEST(CFXPath, NotRect) { path.AppendPoint({3, 0}, CFX_Path::Point::Type::kLine); path.AppendPointAndClose({0, 1}, CFX_Path::Point::Type::kLine); EXPECT_FALSE(path.IsRect()); - rect = path.GetRect(nullptr); - EXPECT_FALSE(rect.has_value()); + EXPECT_FALSE(path.GetRect(nullptr).has_value()); EXPECT_EQ(CFX_FloatRect(0, 0, 3, 1), path.GetBoundingBox()); path.Clear(); @@ -412,8 +434,7 @@ TEST(CFXPath, NotRect) { path.AppendPoint({0, 1}, CFX_Path::Point::Type::kLine); path.AppendPoint({0, 0}, CFX_Path::Point::Type::kLine); EXPECT_FALSE(path.IsRect()); - rect = path.GetRect(nullptr); - EXPECT_FALSE(rect.has_value()); + EXPECT_FALSE(path.GetRect(nullptr).has_value()); EXPECT_EQ(CFX_FloatRect(0, 0, 2, 1), path.GetBoundingBox()); path.Clear(); @@ -423,8 +444,17 @@ TEST(CFXPath, NotRect) { path.AppendPoint({2, 0}, CFX_Path::Point::Type::kLine); path.AppendPoint({0, 0}, CFX_Path::Point::Type::kLine); EXPECT_FALSE(path.IsRect()); - rect = path.GetRect(nullptr); - EXPECT_FALSE(rect.has_value()); + EXPECT_FALSE(path.GetRect(nullptr).has_value()); + EXPECT_EQ(CFX_FloatRect(0, 0, 2, 1), path.GetBoundingBox()); + + path.Clear(); + path.AppendPoint({0, 0}, CFX_Path::Point::Type::kMove); + path.AppendPoint({2, 0}, CFX_Path::Point::Type::kLine); + path.AppendPoint({2, 1}, CFX_Path::Point::Type::kLine); + path.AppendPointAndClose({2, 1}, CFX_Path::Point::Type::kLine); + path.AppendPoint({0, 1}, CFX_Path::Point::Type::kLine); + EXPECT_FALSE(path.IsRect()); + EXPECT_FALSE(path.GetRect(nullptr).has_value()); EXPECT_EQ(CFX_FloatRect(0, 0, 2, 1), path.GetBoundingBox()); path.Clear(); @@ -433,11 +463,9 @@ TEST(CFXPath, NotRect) { path.AppendPoint({2, 1}, CFX_Path::Point::Type::kLine); path.AppendPoint({2, 2}, CFX_Path::Point::Type::kLine); EXPECT_FALSE(path.IsRect()); - rect = path.GetRect(nullptr); - EXPECT_FALSE(rect.has_value()); + EXPECT_FALSE(path.GetRect(nullptr).has_value()); const CFX_Matrix kScaleMatrix(1, 0, 0, 2, 60, 70); - rect = path.GetRect(&kScaleMatrix); - EXPECT_FALSE(rect.has_value()); + EXPECT_FALSE(path.GetRect(&kScaleMatrix).has_value()); EXPECT_EQ(CFX_FloatRect(0, 0, 2, 2), path.GetBoundingBox()); } @@ -450,9 +478,7 @@ TEST(CFXPath, EmptyRect) { path.AppendPoint({0, 1}, CFX_Path::Point::Type::kLine); path.AppendPoint({0, 0}, CFX_Path::Point::Type::kLine); EXPECT_TRUE(path.IsRect()); - std::optional rect = path.GetRect(nullptr); - ASSERT_TRUE(rect.has_value()); - EXPECT_EQ(CFX_FloatRect(0, 0, 0, 1), rect.value()); + EXPECT_EQ(CFX_FloatRect(0, 0, 0, 1), path.GetRect(nullptr)); EXPECT_EQ(CFX_FloatRect(0, 0, 0, 1), path.GetBoundingBox()); } diff --git a/core/fxge/cfx_renderdevice.cpp b/core/fxge/cfx_renderdevice.cpp index c3dde6656c..7dc92e0af8 100644 --- a/core/fxge/cfx_renderdevice.cpp +++ b/core/fxge/cfx_renderdevice.cpp @@ -309,25 +309,6 @@ void DrawNormalTextHelper(const RetainPtr& bitmap, } } -bool ShouldDrawDeviceText(const CFX_Font* font, - const CFX_TextRenderOptions& options) { -#if BUILDFLAG(IS_APPLE) - if (options.font_is_cid) { - return false; - } - - const ByteString bsPsName = font->GetPsName(); - if (bsPsName.Contains("+ZJHL")) { - return false; - } - - if (bsPsName == "CNAAJI+cmex10") { - return false; - } -#endif - return true; -} - // Returns true if the path is a 3-point path that draws A->B->A and forms a // zero area, or a 2-point path which draws A->B. bool CheckSimpleLinePath(pdfium::span points, @@ -1180,8 +1161,7 @@ bool CFX_RenderDevice::DrawNormalText(pdfium::span pCharPos, #if BUILDFLAG(IS_WIN) if (GetDeviceType() == DeviceType::kPrinter) { - if (ShouldDrawDeviceText(font, options) && - device_driver_->DrawDeviceText(pCharPos, font, mtText2Device, font_size, + if (device_driver_->DrawDeviceText(pCharPos, font, mtText2Device, font_size, fill_color, text_options)) { return true; } @@ -1194,8 +1174,7 @@ bool CFX_RenderDevice::DrawNormalText(pdfium::span pCharPos, #endif if (try_native_text && options.native_text) { - if (ShouldDrawDeviceText(font, options) && - device_driver_->DrawDeviceText(pCharPos, font, mtText2Device, font_size, + if (device_driver_->DrawDeviceText(pCharPos, font, mtText2Device, font_size, fill_color, text_options)) { return true; } diff --git a/core/fxge/dib/DEPS b/core/fxge/dib/DEPS new file mode 100644 index 0000000000..da5267ae6b --- /dev/null +++ b/core/fxge/dib/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + '+third_party/highway', +] diff --git a/core/fxge/dib/cfx_dibbase.cpp b/core/fxge/dib/cfx_dibbase.cpp index e945f07066..cfa77d7f9e 100644 --- a/core/fxge/dib/cfx_dibbase.cpp +++ b/core/fxge/dib/cfx_dibbase.cpp @@ -29,6 +29,14 @@ #include "core/fxge/dib/cfx_imagestretcher.h" #include "core/fxge/dib/cfx_imagetransformer.h" +#if defined(PDF_USE_LIBYUV) +#include "third_party/libyuv/include/libyuv/convert_argb.h" +#include "third_party/libyuv/include/libyuv/convert_from_argb.h" +#include "third_party/libyuv/include/libyuv/planar_functions.h" +#include "third_party/libyuv/include/libyuv/rotate.h" +#include "third_party/libyuv/include/libyuv/rotate_argb.h" +#endif + namespace { #if defined(PDF_USE_SKIA) @@ -40,6 +48,23 @@ void ConvertBuffer_RgbToArgbPremul( const RetainPtr& src_bitmap, int src_left, int src_top) { +#if defined(PDF_USE_LIBYUV) + if (!src_bitmap->GetBuffer().empty()) { + const uint8_t* src_buf = src_bitmap->GetScanline(src_top) + .subspan(Fx2DSizeOrDie(src_left, 3)) + .data(); + libyuv::RGB24ToARGB(src_buf, src_bitmap->GetPitch(), dest_buf.data(), + dest_pitch, width, height); + return; + } + + for (int row = 0; row < height; ++row) { + auto dest_span = dest_buf.subspan(Fx2DSizeOrDie(row, dest_pitch)); + auto src_span = src_bitmap->GetScanline(src_top + row) + .subspan(Fx2DSizeOrDie(src_left, 3)); + libyuv::RGB24ToARGB(src_span.data(), 0, dest_span.data(), 0, width, 1); + } +#else for (int row = 0; row < height; ++row) { auto dest_span = fxcrt::reinterpret_span>( dest_buf.subspan(Fx2DSizeOrDie(row, dest_pitch))); @@ -57,6 +82,7 @@ void ConvertBuffer_RgbToArgbPremul( output.alpha = 255; } } +#endif } void ConvertBuffer_ArgbPremulToRgb( @@ -462,11 +488,24 @@ void ConvertBuffer_32bppRgbToRgb24( int src_left, int src_top) { const size_t x_offset = Fx2DSizeOrDie(src_left, 4); +#if defined(PDF_USE_LIBYUV) + if (!pSrcBitmap->GetBuffer().empty()) { + const uint8_t* src_buf = + pSrcBitmap->GetScanline(src_top).subspan(x_offset).data(); + libyuv::ARGBToRGB24(src_buf, pSrcBitmap->GetPitch(), dest_buf.data(), + dest_pitch, width, height); + return; + } +#endif + for (int row = 0; row < height; ++row) { uint8_t* dest_scan = dest_buf.subspan(Fx2DSizeOrDie(row, dest_pitch)).data(); const uint8_t* src_scan = pSrcBitmap->GetScanline(src_top + row).subspan(x_offset).data(); +#if defined(PDF_USE_LIBYUV) + libyuv::ARGBToRGB24(src_scan, 0, dest_scan, 0, width, 1); +#else UNSAFE_TODO({ for (int col = 0; col < width; ++col) { FXSYS_memcpy(dest_scan, src_scan, 3); @@ -474,6 +513,7 @@ void ConvertBuffer_32bppRgbToRgb24( src_scan += 4; } }); +#endif } } @@ -613,6 +653,10 @@ CFX_DIBBase::CFX_DIBBase() = default; CFX_DIBBase::~CFX_DIBBase() = default; +pdfium::span CFX_DIBBase::GetBuffer() const { + return pdfium::span(); +} + bool CFX_DIBBase::SkipToScanline(int line, PauseIndicatorIface* pPause) const { return false; } @@ -621,7 +665,7 @@ size_t CFX_DIBBase::GetEstimatedImageMemoryBurden() const { return GetRequiredPaletteSize() * sizeof(uint32_t); } -#if BUILDFLAG(IS_WIN) || defined(PDF_USE_SKIA) +#if BUILDFLAG(IS_WIN) || defined(PDF_USE_SKIA) || defined(PDF_USE_LIBYUV) RetainPtr CFX_DIBBase::RealizeIfNeeded() const { return Realize(); } @@ -901,7 +945,21 @@ RetainPtr CFX_DIBBase::CloneAlphaMask() const { return nullptr; } +#if defined(PDF_USE_LIBYUV) + if (!GetBuffer().empty()) { + libyuv::ARGBExtractAlpha(GetBuffer().data(), GetPitch(), + pMask->GetWritableBuffer().data(), + pMask->GetPitch(), GetWidth(), GetHeight()); + return pMask; + } +#endif + for (int row = 0; row < GetHeight(); ++row) { +#if defined(PDF_USE_LIBYUV) + libyuv::ARGBExtractAlpha(GetScanline(row).data(), 0, + pMask->GetWritableScanline(row).data(), 0, + GetWidth(), 1); +#else const uint8_t* src_scan = GetScanline(row).subspan<3u>().data(); uint8_t* dest_scan = pMask->GetWritableScanline(row).data(); UNSAFE_TODO({ @@ -910,6 +968,7 @@ RetainPtr CFX_DIBBase::CloneAlphaMask() const { src_scan += 4; } }); +#endif } return pMask; } @@ -956,12 +1015,25 @@ RetainPtr CFX_DIBBase::FlipImage(bool bXFlip, bool bYFlip) const { } if (bytes_per_pixel == 1) { +#if defined(PDF_USE_LIBYUV) + if (!GetBuffer().empty()) { + libyuv::MirrorPlane(GetBuffer().data(), GetPitch(), + pFlipped->GetWritableBuffer().data(), + pFlipped->GetPitch(), GetWidth(), + bYFlip ? -GetHeight() : GetHeight()); + return pFlipped; + } +#endif + for (int row = 0; row < GetHeight(); ++row) { + const uint8_t* src_scan = GetScanline(row).data(); + uint8_t* dest_scan = + pFlipped->GetWritableScanline(bYFlip ? GetHeight() - row - 1 : row) + .data(); +#if defined(PDF_USE_LIBYUV) + libyuv::MirrorPlane(src_scan, 0, dest_scan, 0, GetWidth(), 1); +#else UNSAFE_TODO({ - const uint8_t* src_scan = GetScanline(row).data(); - uint8_t* dest_scan = - pFlipped->GetWritableScanline(bYFlip ? GetHeight() - row - 1 : row) - .data(); dest_scan += (GetWidth() - 1) * bytes_per_pixel; for (int col = 0; col < GetWidth(); ++col) { *dest_scan = *src_scan; @@ -969,17 +1041,31 @@ RetainPtr CFX_DIBBase::FlipImage(bool bXFlip, bool bYFlip) const { ++src_scan; } }); +#endif } return pFlipped; } if (bytes_per_pixel == 3) { +#if defined(PDF_USE_LIBYUV) + if (!GetBuffer().empty()) { + libyuv::RGB24Mirror(GetBuffer().data(), GetPitch(), + pFlipped->GetWritableBuffer().data(), + pFlipped->GetPitch(), GetWidth(), + bYFlip ? -GetHeight() : GetHeight()); + return pFlipped; + } +#endif + for (int row = 0; row < GetHeight(); ++row) { + const uint8_t* src_scan = GetScanline(row).data(); + uint8_t* dest_scan = + pFlipped->GetWritableScanline(bYFlip ? GetHeight() - row - 1 : row) + .data(); +#if defined(PDF_USE_LIBYUV) + libyuv::RGB24Mirror(src_scan, 0, dest_scan, 0, GetWidth(), 1); +#else UNSAFE_TODO({ - const uint8_t* src_scan = GetScanline(row).data(); - uint8_t* dest_scan = - pFlipped->GetWritableScanline(bYFlip ? GetHeight() - row - 1 : row) - .data(); dest_scan += (GetWidth() - 1) * bytes_per_pixel; for (int col = 0; col < GetWidth(); ++col) { FXSYS_memcpy(dest_scan, src_scan, 3); @@ -987,17 +1073,30 @@ RetainPtr CFX_DIBBase::FlipImage(bool bXFlip, bool bYFlip) const { src_scan += 3; } }); +#endif } return pFlipped; } CHECK_EQ(bytes_per_pixel, 4); +#if defined(PDF_USE_LIBYUV) + if (!GetBuffer().empty()) { + libyuv::ARGBMirror( + GetBuffer().data(), GetPitch(), pFlipped->GetWritableBuffer().data(), + pFlipped->GetPitch(), GetWidth(), bYFlip ? -GetHeight() : GetHeight()); + return pFlipped; + } +#endif + for (int row = 0; row < GetHeight(); ++row) { + const uint8_t* src_scan = GetScanline(row).data(); + uint8_t* dest_scan = + pFlipped->GetWritableScanline(bYFlip ? GetHeight() - row - 1 : row) + .data(); +#if defined(PDF_USE_LIBYUV) + libyuv::ARGBMirror(src_scan, 0, dest_scan, 0, GetWidth(), 1); +#else UNSAFE_TODO({ - const uint8_t* src_scan = GetScanline(row).data(); - uint8_t* dest_scan = - pFlipped->GetWritableScanline(bYFlip ? GetHeight() - row - 1 : row) - .data(); dest_scan += (GetWidth() - 1) * bytes_per_pixel; for (int col = 0; col < GetWidth(); ++col) { const auto* src_scan32 = reinterpret_cast(src_scan); @@ -1007,6 +1106,7 @@ RetainPtr CFX_DIBBase::FlipImage(bool bXFlip, bool bYFlip) const { src_scan += 4; } }); +#endif } return pFlipped; } @@ -1080,6 +1180,40 @@ RetainPtr CFX_DIBBase::SwapXY(bool bXFlip, bool bYFlip) const { } const int bytes_per_pixel = GetBPP() / 8; +#if defined(PDF_USE_LIBYUV) + if (bytes_per_pixel == 1 || bytes_per_pixel == 4) { + RetainPtr realized = RealizeIfNeeded(); + if (realized) { + const uint8_t* src_buf = realized->GetBuffer().data(); + const int src_pitch = realized->GetPitch(); + uint8_t* dst_buf = dest_span.data(); + if (bytes_per_pixel == 1) { + if (bXFlip && bYFlip) { + libyuv::RotatePlane270(realized->GetScanline(GetHeight() - 1).data(), + -src_pitch, dst_buf, dest_pitch, GetWidth(), + GetHeight()); + } else if (bXFlip) { + libyuv::RotatePlane90(src_buf, src_pitch, dst_buf, dest_pitch, + GetWidth(), GetHeight()); + } else if (bYFlip) { + libyuv::RotatePlane270(src_buf, src_pitch, dst_buf, dest_pitch, + GetWidth(), GetHeight()); + } else { + libyuv::TransposePlane(src_buf, src_pitch, dst_buf, dest_pitch, + GetWidth(), GetHeight()); + } + return pTransBitmap; + } + if (libyuv::ARGBRotate( + src_buf, src_pitch, dst_buf, dest_pitch, GetWidth(), + bXFlip == bYFlip ? -GetHeight() : GetHeight(), + bYFlip ? libyuv::kRotate270 : libyuv::kRotate90) == 0) { + return pTransBitmap; + } + } + } +#endif + int dest_step = bYFlip ? -dest_pitch : dest_pitch; if (bytes_per_pixel == 3) { dest_step -= 2; diff --git a/core/fxge/dib/cfx_dibbase.h b/core/fxge/dib/cfx_dibbase.h index 0227867771..99d7224b88 100644 --- a/core/fxge/dib/cfx_dibbase.h +++ b/core/fxge/dib/cfx_dibbase.h @@ -44,11 +44,15 @@ class CFX_DIBBase : public Retainable { static constexpr uint32_t kPaletteSize = 256; + // Returns an empty buffer if there is no data, or if the DIB is not backed by + // a contiguous buffer. In the latter case, the caller should use + // GetScanline(). + virtual pdfium::span GetBuffer() const; // Note that the returned scanline includes unused space at the end, if any. virtual pdfium::span GetScanline(int line) const = 0; virtual bool SkipToScanline(int line, PauseIndicatorIface* pPause) const; virtual size_t GetEstimatedImageMemoryBurden() const; -#if BUILDFLAG(IS_WIN) || defined(PDF_USE_SKIA) +#if BUILDFLAG(IS_WIN) || defined(PDF_USE_SKIA) || defined(PDF_USE_LIBYUV) // Calls Realize() if needed. Otherwise, return `this`. virtual RetainPtr RealizeIfNeeded() const; #endif diff --git a/core/fxge/dib/cfx_dibbase_unittest.cpp b/core/fxge/dib/cfx_dibbase_unittest.cpp index b0ba4ce1d3..ab24270a7a 100644 --- a/core/fxge/dib/cfx_dibbase_unittest.cpp +++ b/core/fxge/dib/cfx_dibbase_unittest.cpp @@ -5,11 +5,16 @@ #include "core/fxge/dib/cfx_dibbase.h" #include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/span.h" #include "core/fxge/dib/cfx_dibitmap.h" +#include "core/fxge/dib/fx_dib.h" +#include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" namespace { +using ::testing::ElementsAre; + struct Input { CFX_Point src_top_left; CFX_Size src_size; @@ -163,3 +168,292 @@ TEST(CFXDIBBaseTest, GetOverlapRectBadInputs) { RunOverlapRectTest(bitmap.Get(), input, /*expected_output=*/nullptr); } } + +TEST(CFXDIBBaseTest, SwapXY8Bpp) { + auto src = pdfium::MakeRetain(); + ASSERT_TRUE(src->Create(3, 2, FXDIB_Format::k8bppMask)); + auto row0 = src->GetWritableScanline(0); + row0[0] = 10; + row0[1] = 20; + row0[2] = 30; + auto row1 = src->GetWritableScanline(1); + row1[0] = 40; + row1[1] = 50; + row1[2] = 60; + + auto ff = src->SwapXY(false, false); + ASSERT_TRUE(ff); + ASSERT_EQ(2, ff->GetWidth()); + ASSERT_EQ(3, ff->GetHeight()); + EXPECT_EQ(10u, ff->GetScanline(0)[0]); + EXPECT_EQ(40u, ff->GetScanline(0)[1]); + EXPECT_EQ(20u, ff->GetScanline(1)[0]); + EXPECT_EQ(50u, ff->GetScanline(1)[1]); + EXPECT_EQ(30u, ff->GetScanline(2)[0]); + EXPECT_EQ(60u, ff->GetScanline(2)[1]); + + auto tf = src->SwapXY(true, false); + ASSERT_TRUE(tf); + ASSERT_EQ(2, tf->GetWidth()); + ASSERT_EQ(3, tf->GetHeight()); + EXPECT_EQ(40u, tf->GetScanline(0)[0]); + EXPECT_EQ(10u, tf->GetScanline(0)[1]); + EXPECT_EQ(50u, tf->GetScanline(1)[0]); + EXPECT_EQ(20u, tf->GetScanline(1)[1]); + EXPECT_EQ(60u, tf->GetScanline(2)[0]); + EXPECT_EQ(30u, tf->GetScanline(2)[1]); + + auto ft = src->SwapXY(false, true); + ASSERT_TRUE(ft); + ASSERT_EQ(2, ft->GetWidth()); + ASSERT_EQ(3, ft->GetHeight()); + EXPECT_EQ(30u, ft->GetScanline(0)[0]); + EXPECT_EQ(60u, ft->GetScanline(0)[1]); + EXPECT_EQ(20u, ft->GetScanline(1)[0]); + EXPECT_EQ(50u, ft->GetScanline(1)[1]); + EXPECT_EQ(10u, ft->GetScanline(2)[0]); + EXPECT_EQ(40u, ft->GetScanline(2)[1]); + + auto tt = src->SwapXY(true, true); + ASSERT_TRUE(tt); + ASSERT_EQ(2, tt->GetWidth()); + ASSERT_EQ(3, tt->GetHeight()); + EXPECT_EQ(60u, tt->GetScanline(0)[0]); + EXPECT_EQ(30u, tt->GetScanline(0)[1]); + EXPECT_EQ(50u, tt->GetScanline(1)[0]); + EXPECT_EQ(20u, tt->GetScanline(1)[1]); + EXPECT_EQ(40u, tt->GetScanline(2)[0]); + EXPECT_EQ(10u, tt->GetScanline(2)[1]); +} + +TEST(CFXDIBBaseTest, SwapXY32Bpp) { + auto src = pdfium::MakeRetain(); + ASSERT_TRUE(src->Create(3, 2, FXDIB_Format::kBgra)); + auto row0 = src->GetWritableScanlineAs(0); + row0[0] = 0x11223301u; + row0[1] = 0x11223302u; + row0[2] = 0x11223303u; + auto row1 = src->GetWritableScanlineAs(1); + row1[0] = 0x44556604u; + row1[1] = 0x44556605u; + row1[2] = 0x44556606u; + + auto ff = src->SwapXY(false, false); + ASSERT_TRUE(ff); + ASSERT_EQ(2, ff->GetWidth()); + ASSERT_EQ(3, ff->GetHeight()); + EXPECT_EQ(0x11223301u, ff->GetScanlineAs(0)[0]); + EXPECT_EQ(0x44556604u, ff->GetScanlineAs(0)[1]); + EXPECT_EQ(0x11223302u, ff->GetScanlineAs(1)[0]); + EXPECT_EQ(0x44556605u, ff->GetScanlineAs(1)[1]); + EXPECT_EQ(0x11223303u, ff->GetScanlineAs(2)[0]); + EXPECT_EQ(0x44556606u, ff->GetScanlineAs(2)[1]); + + auto tf = src->SwapXY(true, false); + ASSERT_TRUE(tf); + ASSERT_EQ(2, tf->GetWidth()); + ASSERT_EQ(3, tf->GetHeight()); + EXPECT_EQ(0x44556604u, tf->GetScanlineAs(0)[0]); + EXPECT_EQ(0x11223301u, tf->GetScanlineAs(0)[1]); + EXPECT_EQ(0x44556605u, tf->GetScanlineAs(1)[0]); + EXPECT_EQ(0x11223302u, tf->GetScanlineAs(1)[1]); + EXPECT_EQ(0x44556606u, tf->GetScanlineAs(2)[0]); + EXPECT_EQ(0x11223303u, tf->GetScanlineAs(2)[1]); + + auto ft = src->SwapXY(false, true); + ASSERT_TRUE(ft); + ASSERT_EQ(2, ft->GetWidth()); + ASSERT_EQ(3, ft->GetHeight()); + EXPECT_EQ(0x11223303u, ft->GetScanlineAs(0)[0]); + EXPECT_EQ(0x44556606u, ft->GetScanlineAs(0)[1]); + EXPECT_EQ(0x11223302u, ft->GetScanlineAs(1)[0]); + EXPECT_EQ(0x44556605u, ft->GetScanlineAs(1)[1]); + EXPECT_EQ(0x11223301u, ft->GetScanlineAs(2)[0]); + EXPECT_EQ(0x44556604u, ft->GetScanlineAs(2)[1]); + + auto tt = src->SwapXY(true, true); + ASSERT_TRUE(tt); + ASSERT_EQ(2, tt->GetWidth()); + ASSERT_EQ(3, tt->GetHeight()); + EXPECT_EQ(0x44556606u, tt->GetScanlineAs(0)[0]); + EXPECT_EQ(0x11223303u, tt->GetScanlineAs(0)[1]); + EXPECT_EQ(0x44556605u, tt->GetScanlineAs(1)[0]); + EXPECT_EQ(0x11223302u, tt->GetScanlineAs(1)[1]); + EXPECT_EQ(0x44556604u, tt->GetScanlineAs(2)[0]); + EXPECT_EQ(0x11223301u, tt->GetScanlineAs(2)[1]); +} + +TEST(CFXDIBBaseTest, CloneAlphaMask) { + auto src = pdfium::MakeRetain(); + ASSERT_TRUE(src->Create(2, 1, FXDIB_Format::kBgra)); + auto row = src->GetWritableScanlineAs>(0); + row[0] = {1, 2, 3, 0xaa}; + row[1] = {4, 5, 6, 0x55}; + + auto mask = src->CloneAlphaMask(); + ASSERT_TRUE(mask); + ASSERT_EQ(2, mask->GetWidth()); + ASSERT_EQ(1, mask->GetHeight()); + EXPECT_EQ(FXDIB_Format::k8bppMask, mask->GetFormat()); + EXPECT_EQ(0xaau, mask->GetScanline(0)[0]); + EXPECT_EQ(0x55u, mask->GetScanline(0)[1]); +} + +TEST(CFXDIBBaseTest, ConvertToBgrFromBgra) { + auto src = pdfium::MakeRetain(); + ASSERT_TRUE(src->Create(2, 1, FXDIB_Format::kBgra)); + auto row = src->GetWritableScanlineAs>(0); + row[0] = {10, 20, 30, 0x80}; + row[1] = {40, 50, 60, 0xff}; + + auto bgr = src->ConvertTo(FXDIB_Format::kBgr); + ASSERT_TRUE(bgr); + ASSERT_EQ(2, bgr->GetWidth()); + ASSERT_EQ(1, bgr->GetHeight()); + EXPECT_EQ(FXDIB_Format::kBgr, bgr->GetFormat()); + auto bgr_row = bgr->GetScanlineAs>(0); + EXPECT_EQ(10u, bgr_row[0].blue); + EXPECT_EQ(20u, bgr_row[0].green); + EXPECT_EQ(30u, bgr_row[0].red); + EXPECT_EQ(40u, bgr_row[1].blue); + EXPECT_EQ(50u, bgr_row[1].green); + EXPECT_EQ(60u, bgr_row[1].red); +} + +TEST(CFXDIBBaseTest, StretchToEmpty) { + auto bitmap = pdfium::MakeRetain(); + ASSERT_TRUE(bitmap->Create(2, 3, FXDIB_Format::kBgra)); + + EXPECT_FALSE(bitmap->StretchTo(0, 3, FXDIB_ResampleOptions(), nullptr)); + EXPECT_FALSE(bitmap->StretchTo(2, 0, FXDIB_ResampleOptions(), nullptr)); + + constexpr FX_RECT kOutOfBoundsClip(10, 10, 20, 20); + EXPECT_FALSE( + bitmap->StretchTo(4, 6, FXDIB_ResampleOptions(), &kOutOfBoundsClip)); +} + +TEST(CFXDIBBaseTest, StretchToMaskFlipAndClip) { + auto bitmap = pdfium::MakeRetain(); + ASSERT_TRUE(bitmap->Create(2, 2, FXDIB_Format::k8bppMask)); + auto src_scan0 = bitmap->GetWritableScanline(0); + src_scan0[0] = 0x10; + src_scan0[1] = 0x20; + auto src_scan1 = bitmap->GetWritableScanline(1); + src_scan1[0] = 0x30; + src_scan1[1] = 0x40; + + constexpr FX_RECT kClip(1, 0, 3, 2); + RetainPtr result = + bitmap->StretchTo(-4, 2, FXDIB_ResampleOptions(), &kClip); + ASSERT_TRUE(result); + ASSERT_EQ(2, result->GetWidth()); + ASSERT_EQ(2, result->GetHeight()); + EXPECT_EQ(FXDIB_Format::k8bppMask, result->GetFormat()); + EXPECT_THAT(result->GetScanline(0).first(2u), ElementsAre(0x1c, 0x14)); + EXPECT_THAT(result->GetScanline(1).first(2u), ElementsAre(0x3c, 0x34)); +} + +TEST(CFXDIBBaseTest, StretchToGrayscale) { + auto bitmap = pdfium::MakeRetain(); + ASSERT_TRUE(bitmap->Create(2, 2, FXDIB_Format::k8bppRgb)); + auto src_scan0 = bitmap->GetWritableScanline(0); + src_scan0[0] = 0x10; + src_scan0[1] = 0x20; + auto src_scan1 = bitmap->GetWritableScanline(1); + src_scan1[0] = 0x30; + src_scan1[1] = 0x40; + + RetainPtr result = + bitmap->StretchTo(4, -2, FXDIB_ResampleOptions(), nullptr); + ASSERT_TRUE(result); + ASSERT_EQ(4, result->GetWidth()); + ASSERT_EQ(2, result->GetHeight()); + EXPECT_EQ(FXDIB_Format::k8bppRgb, result->GetFormat()); + EXPECT_FALSE(result->HasPalette()); + EXPECT_THAT(result->GetScanline(0).first(4u), + ElementsAre(0x30, 0x34, 0x3c, 0x40)); + EXPECT_THAT(result->GetScanline(1).first(4u), + ElementsAre(0x10, 0x14, 0x1c, 0x20)); +} + +TEST(CFXDIBBaseTest, StretchToBgra) { + auto bitmap = pdfium::MakeRetain(); + ASSERT_TRUE(bitmap->Create(2, 1, FXDIB_Format::kBgra)); + auto src_scan = bitmap->GetWritableScanlineAs(0); + src_scan[0] = 0xff112233; + src_scan[1] = 0xff445566; + + RetainPtr result = + bitmap->StretchTo(4, 2, FXDIB_ResampleOptions(), nullptr); + ASSERT_TRUE(result); + ASSERT_EQ(4, result->GetWidth()); + ASSERT_EQ(2, result->GetHeight()); + EXPECT_EQ(FXDIB_Format::kBgra, result->GetFormat()); + EXPECT_THAT(result->GetScanlineAs(0), + ElementsAre(0xff112233, 0xff112233, 0xff445566, 0xff445566)); + EXPECT_THAT(result->GetScanlineAs(1), + ElementsAre(0xff112233, 0xff112233, 0xff445566, 0xff445566)); +} + +TEST(CFXDIBBaseTest, TransformToEmpty) { + auto bitmap = pdfium::MakeRetain(); + ASSERT_TRUE(bitmap->Create(2, 3, FXDIB_Format::kBgra)); + + int left = -1; + int top = -1; + RetainPtr result = + bitmap->TransformTo(CFX_Matrix(0, 0, 0, 0, 10, 20), &left, &top); + EXPECT_FALSE(result); + EXPECT_EQ(0, left); + EXPECT_EQ(0, top); +} + +TEST(CFXDIBBaseTest, TransformToMaskRotate90) { + auto bitmap = pdfium::MakeRetain(); + ASSERT_TRUE(bitmap->Create(2, 3, FXDIB_Format::k8bppMask)); + auto src_scan0 = bitmap->GetWritableScanline(0); + src_scan0[0] = 0x10; + src_scan0[1] = 0x20; + auto src_scan1 = bitmap->GetWritableScanline(1); + src_scan1[0] = 0x30; + src_scan1[1] = 0x40; + auto src_scan2 = bitmap->GetWritableScanline(2); + src_scan2[0] = 0x50; + src_scan2[1] = 0x60; + + int left = 0; + int top = 0; + RetainPtr result = + bitmap->TransformTo(CFX_Matrix(0, 2, 3, 0, -5, 7), &left, &top); + ASSERT_TRUE(result); + EXPECT_EQ(-5, left); + EXPECT_EQ(7, top); + ASSERT_EQ(3, result->GetWidth()); + ASSERT_EQ(2, result->GetHeight()); + EXPECT_EQ(FXDIB_Format::k8bppMask, result->GetFormat()); + EXPECT_THAT(result->GetScanline(0).first(3u), ElementsAre(0x50, 0x30, 0x10)); + EXPECT_THAT(result->GetScanline(1).first(3u), ElementsAre(0x60, 0x40, 0x20)); +} + +TEST(CFXDIBBaseTest, TransformToBgraScaleAndTranslate) { + auto bitmap = pdfium::MakeRetain(); + ASSERT_TRUE(bitmap->Create(2, 1, FXDIB_Format::kBgra)); + auto src_scan = bitmap->GetWritableScanlineAs(0); + src_scan[0] = 0xff112233; + src_scan[1] = 0xff445566; + + int left = 0; + int top = 0; + RetainPtr result = + bitmap->TransformTo(CFX_Matrix(4, 0, 0, -2, 10, 22), &left, &top); + ASSERT_TRUE(result); + EXPECT_EQ(10, left); + EXPECT_EQ(20, top); + ASSERT_EQ(4, result->GetWidth()); + ASSERT_EQ(2, result->GetHeight()); + EXPECT_EQ(FXDIB_Format::kBgra, result->GetFormat()); + EXPECT_THAT(result->GetScanlineAs(0), + ElementsAre(0xff112233, 0xff112233, 0xff445566, 0xff445566)); + EXPECT_THAT(result->GetScanlineAs(1), + ElementsAre(0xff112233, 0xff112233, 0xff445566, 0xff445566)); +} diff --git a/core/fxge/dib/cfx_dibitmap.cpp b/core/fxge/dib/cfx_dibitmap.cpp index f98cb981ae..4836116712 100644 --- a/core/fxge/dib/cfx_dibitmap.cpp +++ b/core/fxge/dib/cfx_dibitmap.cpp @@ -28,6 +28,11 @@ #include "core/fxge/cfx_gemodule.h" #include "core/fxge/dib/cfx_scanlinecompositor.h" +#if defined(PDF_USE_LIBYUV) +#include "third_party/libyuv/include/libyuv/convert_argb.h" +#include "third_party/libyuv/include/libyuv/planar_functions.h" +#endif + namespace { size_t GetAllocSizeOrZero(uint32_t size) { @@ -126,7 +131,7 @@ size_t CFX_DIBitmap::GetEstimatedImageMemoryBurden() const { return result; } -#if BUILDFLAG(IS_WIN) || defined(PDF_USE_SKIA) +#if BUILDFLAG(IS_WIN) || defined(PDF_USE_SKIA) || defined(PDF_USE_LIBYUV) RetainPtr CFX_DIBitmap::RealizeIfNeeded() const { if (GetBuffer().empty()) { return Realize(); @@ -347,6 +352,12 @@ bool CFX_DIBitmap::MultiplyAlphaMask(RetainPtr mask) { if (GetFormat() == FXDIB_Format::kBgrx) { // TODO(crbug.com/42271020): Consider adding support for // `FXDIB_Format::kBgraPremul` +#if defined(PDF_USE_LIBYUV) + SetFormat(FXDIB_Format::kBgra); + libyuv::ARGBCopyYToAlpha(mask->GetBuffer().data(), mask->GetPitch(), + GetWritableBuffer().data(), GetPitch(), GetWidth(), + GetHeight()); +#else if (!ConvertFormat(FXDIB_Format::kBgra)) { return false; } @@ -363,6 +374,7 @@ bool CFX_DIBitmap::MultiplyAlphaMask(RetainPtr mask) { dest_scan[col].alpha = mask_scan[col]; } } +#endif return true; } @@ -998,15 +1010,25 @@ bool CFX_DIBitmap::ConvertFormat(FXDIB_Format dest_format) { // SAFETY: `dest_buf` allocated with `dest_buf_size` bytes above. auto dest_span = UNSAFE_BUFFERS(pdfium::span(dest_buf.get(), dest_buf_size)); - if (dest_format == FXDIB_Format::kBgra) { - std::ranges::fill(dest_span, 0xff); - } - - RetainPtr holder(this); const uint32_t dest_pitch = pitch_size.value().pitch; - palette_ = ConvertBuffer(dest_format, dest_span, dest_pitch, GetWidth(), - GetHeight(), holder, /*src_left=*/0, - /*src_top=*/0); +#if defined(PDF_USE_LIBYUV) + if (dest_format == FXDIB_Format::kBgra && GetFormat() == FXDIB_Format::kBgr) { + libyuv::RGB24ToARGB(GetBuffer().data(), GetPitch(), dest_span.data(), + dest_pitch, GetWidth(), GetHeight()); + palette_.clear(); + } else { +#endif + if (dest_format == FXDIB_Format::kBgra) { + std::ranges::fill(dest_span, 0xff); + } + + RetainPtr holder(this); + palette_ = ConvertBuffer(dest_format, dest_span, dest_pitch, GetWidth(), + GetHeight(), holder, /*src_left=*/0, + /*src_top=*/0); +#if defined(PDF_USE_LIBYUV) + } +#endif buffer_ = std::move(dest_buf); SetFormat(dest_format); SetPitch(dest_pitch); diff --git a/core/fxge/dib/cfx_dibitmap.h b/core/fxge/dib/cfx_dibitmap.h index 0c98f1c280..5c1f7f38ad 100644 --- a/core/fxge/dib/cfx_dibitmap.h +++ b/core/fxge/dib/cfx_dibitmap.h @@ -60,13 +60,13 @@ class CFX_DIBitmap final : public CFX_DIBBase { bool Copy(RetainPtr source); // CFX_DIBBase + pdfium::span GetBuffer() const override; pdfium::span GetScanline(int line) const override; size_t GetEstimatedImageMemoryBurden() const override; -#if BUILDFLAG(IS_WIN) || defined(PDF_USE_SKIA) +#if BUILDFLAG(IS_WIN) || defined(PDF_USE_SKIA) || defined(PDF_USE_LIBYUV) RetainPtr RealizeIfNeeded() const override; #endif - pdfium::span GetBuffer() const; pdfium::span GetWritableBuffer() { pdfium::span src = GetBuffer(); // SAFETY: const_cast<>() doesn't change size. diff --git a/core/fxge/dib/cfx_dibitmap_unittest.cpp b/core/fxge/dib/cfx_dibitmap_unittest.cpp index 1ba4e5ae23..3efbb1265e 100644 --- a/core/fxge/dib/cfx_dibitmap_unittest.cpp +++ b/core/fxge/dib/cfx_dibitmap_unittest.cpp @@ -178,3 +178,53 @@ TEST(CFXDIBitmapTest, PreMultiplyFromPreMultiplied) { EXPECT_THAT(bitmap->GetBuffer(), ElementsAre(0x7f, 0x7f, 0x7f, 0x7f)); } #endif // defined(PDF_USE_SKIA) + +TEST(CFXDIBitmapTest, ConvertFormatBgrToBgra) { + auto bitmap = pdfium::MakeRetain(); + ASSERT_TRUE(bitmap->Create(2, 1, FXDIB_Format::kBgr)); + auto bgr_row = bitmap->GetWritableScanlineAs>(0); + bgr_row[0] = {11, 22, 33}; + bgr_row[1] = {44, 55, 66}; + + ASSERT_TRUE(bitmap->ConvertFormat(FXDIB_Format::kBgra)); + ASSERT_EQ(2, bitmap->GetWidth()); + ASSERT_EQ(1, bitmap->GetHeight()); + EXPECT_EQ(FXDIB_Format::kBgra, bitmap->GetFormat()); + auto bgra_row = bitmap->GetScanlineAs>(0); + EXPECT_EQ(11u, bgra_row[0].blue); + EXPECT_EQ(22u, bgra_row[0].green); + EXPECT_EQ(33u, bgra_row[0].red); + EXPECT_EQ(255u, bgra_row[0].alpha); + EXPECT_EQ(44u, bgra_row[1].blue); + EXPECT_EQ(55u, bgra_row[1].green); + EXPECT_EQ(66u, bgra_row[1].red); + EXPECT_EQ(255u, bgra_row[1].alpha); +} + +TEST(CFXDIBitmapTest, MultiplyAlphaMaskFromBgrx) { + auto bitmap = pdfium::MakeRetain(); + ASSERT_TRUE(bitmap->Create(2, 1, FXDIB_Format::kBgrx)); + auto row = bitmap->GetWritableScanlineAs>(0); + row[0] = {10, 20, 30, 0}; + row[1] = {40, 50, 60, 0}; + + auto mask = pdfium::MakeRetain(); + ASSERT_TRUE(mask->Create(2, 1, FXDIB_Format::k8bppMask)); + auto mask_row = mask->GetWritableScanline(0); + mask_row[0] = 0x12; + mask_row[1] = 0x34; + + ASSERT_TRUE(bitmap->MultiplyAlphaMask(mask)); + ASSERT_EQ(2, bitmap->GetWidth()); + ASSERT_EQ(1, bitmap->GetHeight()); + EXPECT_EQ(FXDIB_Format::kBgra, bitmap->GetFormat()); + auto out_row = bitmap->GetScanlineAs>(0); + EXPECT_EQ(10u, out_row[0].blue); + EXPECT_EQ(20u, out_row[0].green); + EXPECT_EQ(30u, out_row[0].red); + EXPECT_EQ(0x12u, out_row[0].alpha); + EXPECT_EQ(40u, out_row[1].blue); + EXPECT_EQ(50u, out_row[1].green); + EXPECT_EQ(60u, out_row[1].red); + EXPECT_EQ(0x34u, out_row[1].alpha); +} diff --git a/core/fxge/dib/cstretchengine.cpp b/core/fxge/dib/cstretchengine.cpp index 68245db260..24769f293e 100644 --- a/core/fxge/dib/cstretchengine.cpp +++ b/core/fxge/dib/cstretchengine.cpp @@ -10,6 +10,7 @@ #include #include +#include #include #include @@ -19,12 +20,14 @@ #include "core/fxcrt/fx_ceil_div.h" #include "core/fxcrt/fx_safe_types.h" #include "core/fxcrt/fx_system.h" +#include "core/fxcrt/numerics/safe_conversions.h" #include "core/fxcrt/pauseindicator_iface.h" #include "core/fxcrt/span_util.h" #include "core/fxcrt/zip.h" #include "core/fxge/calculate_pitch.h" #include "core/fxge/dib/cfx_dibbase.h" #include "core/fxge/dib/cfx_dibitmap.h" +#include "core/fxge/dib/cstretchengine_hwy.h" #include "core/fxge/dib/fx_dib.h" #include "core/fxge/dib/scanlinecomposer_iface.h" @@ -394,11 +397,206 @@ bool CStretchEngine::StartStretchHorz() { return false; } } + PlanHorzGroups(); cur_row_ = src_clip_.top; state_ = State::kHorizontal; return true; } +void CStretchEngine::PlanHorzGroups() { + horz_groups_.clear(); + horz_runs_.clear(); + if (dest_clip_.Width() <= 0) { + return; + } + if (!StretchHorzSimdAvailable()) { + // No vector wide enough for the kernel's gather exists in this build + // (see the HWY_SCALAR branch of cstretchengine_hwy.cpp): leave + // `horz_groups_` and `horz_runs_` empty, so every column takes the + // per-column path below, unchanged, rather than planning groups nothing + // can process. + return; + } + // The two palette arms have no group kernel; every other arm does. (1bpp + // sources take the k8BppTo8Bpp arm, on the row Expand1BppRow() produces.) + if (trans_method_ == TransformMethod::k1BppToManyBpp || + trans_method_ == TransformMethod::k8BppToManyBpp) { + return; + } + + HorzPlanParams params; + // The source pixel stride the gather reads: one byte for k8BppTo8Bpp and + // for an expanded 1bpp row, or the full pixel for kManyBpptoManyBpp / + // WithAlpha (3 or 4, per trans_method_'s own precondition on src_bpp_; + // WithAlpha is always 4). + const bool one_byte_pixels = trans_method_ == TransformMethod::k1BppTo8Bpp || + trans_method_ == TransformMethod::k8BppTo8Bpp; + params.bpp = one_byte_pixels ? 1 : src_bpp_ / 8; + // How many leading bytes of each source pixel a group loads: fewer than + // `bpp` when the 4th byte of a 4-byte pixel is padding the kernel never + // reads, matching the per-column path. WithAlpha reads all 4 bytes: its + // kernel needs the alpha byte the non-alpha kernel treats as padding. + if (trans_method_ == TransformMethod::kManyBpptoManyBppWithAlpha) { + params.gathered = params.bpp; + } else if (params.bpp == 1) { + params.gathered = 1; + } else { + params.gathered = 3; + } + // The row the kernel will read. For a 1bpp source that is the expanded + // row, which StartStretchHorz() has already sized: whole source bytes of 8 + // pixels each, so up to 7 bytes past src_width_ (see Expand1BppRow()). + if (trans_method_ == TransformMethod::k1BppTo8Bpp) { + params.src_row_bytes = expanded_row_.size(); + } else { + params.src_row_bytes = Fx2DSizeOrDie(src_width_, params.bpp); + } + + // Walk the destination columns in maximal spans of the same tap count and + // plan each span. + int span_start = dest_clip_.left; + uint32_t span_taps = HorzTapCountAt(span_start); + for (int col = span_start + 1; col <= dest_clip_.right; ++col) { + const uint32_t taps = col < dest_clip_.right ? HorzTapCountAt(col) : 0; + if (col == dest_clip_.right || taps != span_taps) { + PlanHorzSpan(span_start, col, span_taps, params); + span_start = col; + span_taps = taps; + } + } +} + +// A destination column's tap count if the kernel handles it (1 or 2), else 0. +uint32_t CStretchEngine::HorzTapCountAt(int col) const { + const size_t weight_count = + weight_table_.GetPixelWeight(col)->GetWeights().size(); + if (weight_count == 1) { + return 1; + } + if (weight_count == 2) { + return 2; + } + return 0; +} + +// A span shorter than this stays on the per-column path entirely: even one +// group's setup -- four weight-table lookups plus the index/weight plan -- +// costs more than the per-column dispatch it would replace. +constexpr int kMinSpanLength = 4; + +// Plans one maximal span [start, end) of columns sharing `taps`: chops it +// into groups of 4 and, if at least 3 in 4 of them fit the gather, adds all +// the fitting ones, consecutive fitting groups forming one run. Below that +// share a fitting minority is all cost, since the span's leftover columns -- +// including every non-fitting group -- fall back to the per-column path +// regardless. Spans with taps 0 (neither 1 nor 2) are never planned, nor +// spans shorter than kMinSpanLength. +void CStretchEngine::PlanHorzSpan(int start, + int end, + uint32_t taps, + const HorzPlanParams& params) { + if (taps == 0 || end - start < kMinSpanLength) { + return; + } + const int candidate_groups = (end - start) / 4; + // Builds directly into `horz_groups_` and `horz_runs_`; reverted below if + // too few groups fit. `original_last_run` guards the one case a plain + // `horz_runs_.resize()` wouldn't undo: this span's first group extending a + // run from an earlier span, mutating its `group_count` in place. + const size_t original_group_count = horz_groups_.size(); + const size_t original_run_count = horz_runs_.size(); + const std::optional original_last_run = + horz_runs_.empty() ? std::nullopt + : std::make_optional(horz_runs_.back()); + int fitting = 0; + for (int i = 0; i < candidate_groups; ++i) { + std::optional group = + BuildHorzGroup(start + 4 * i, taps, params); + if (!group.has_value()) { + continue; + } + ++fitting; + // Extend the current run if this group's columns follow its last group's + // directly; otherwise this group starts a new run. + const int dest_col = start + 4 * i; + if (!horz_runs_.empty() && + horz_runs_.back().dest_col + 4 * horz_runs_.back().group_count == + static_cast(dest_col)) { + ++horz_runs_.back().group_count; + } else { + horz_runs_.push_back({dest_col, horz_groups_.size(), 1}); + } + horz_groups_.push_back(group.value()); + } + if (fitting * 4 < candidate_groups * 3) { + horz_groups_.resize(original_group_count); + horz_runs_.resize(original_run_count); + if (original_last_run.has_value()) { + horz_runs_.back() = original_last_run.value(); + } + } +} + +// Builds the group covering the 4 destination columns starting at `col`, all +// already known to share `taps`, or returns nullopt if the four columns' +// combined source window does not fit a 16- or 32-byte gather. +// `weight->GetSrcStart()` is a source pixel position; the plan is in bytes. +std::optional CStretchEngine::BuildHorzGroup( + int col, + uint32_t taps, + const HorzPlanParams& params) const { + size_t min_start = weight_table_.GetPixelWeight(col)->GetSrcStart(); + size_t max_start = min_start; + for (int i = 1; i < 4; ++i) { + const size_t start = weight_table_.GetPixelWeight(col + i)->GetSrcStart(); + min_start = std::min(min_start, start); + max_start = std::max(max_start, start); + } + const size_t span_bytes = (max_start - min_start + taps) * params.bpp; + if (span_bytes > 32 || params.src_row_bytes < 16) { + return std::nullopt; + } + const bool wide = span_bytes > 16; + const size_t load_bytes = wide ? 32 : 16; + if (load_bytes > params.src_row_bytes) { + return std::nullopt; + } + // Keep the load inside the source row, sliding its base left if needed + // (mirrors the per-column path's own subspan, which is always in bounds). + size_t src_byte_base = min_start * params.bpp; + if (src_byte_base + load_bytes > params.src_row_bytes) { + src_byte_base = params.src_row_bytes - load_bytes; + } + + StretchHorzGroup group; + group.taps = taps; + group.src_byte_base = src_byte_base; + group.wide = wide; + std::ranges::fill(group.idx[0], 0xFF); + std::ranges::fill(group.idx[1], 0xFF); + for (int k = 0; k < 4; ++k) { + const PixelWeight* weight = weight_table_.GetPixelWeight(col + k); + pdfium::span weights = weight->GetWeights(); + group.weights[0][k] = weights[0]; + group.weights[1][k] = taps == 2 ? weights[1] : 0; + for (uint32_t t = 0; t < taps; ++t) { + const size_t src_byte = + (weight->GetSrcStart() + t) * params.bpp - src_byte_base; + for (uint32_t c = 0; c < params.gathered; ++c) { + // Within the 32-byte window, so it fits the byte the gather reads. + group.idx[t][k * 4 + c] = pdfium::checked_cast(src_byte + c); + } + } + } + return group; +} + +// The groups of one planned run, in `horz_groups_`. +pdfium::span CStretchEngine::HorzRunGroups( + const StretchHorzRun& run) const { + return pdfium::span(horz_groups_).subspan(run.first_group, run.group_count); +} + bool CStretchEngine::ContinueStretchHorz(PauseIndicatorIface* pPause) { if (!dest_width_) { return false; @@ -429,7 +627,22 @@ bool CStretchEngine::ContinueStretchHorz(PauseIndicatorIface* pPause) { src_row_span = Expand1BppRow(src_row_span); [[fallthrough]]; case TransformMethod::k8BppTo8Bpp: { - for (int col = dest_clip_.left; col < dest_clip_.right; ++col) { + pdfium::span runs(horz_runs_); + for (int col = dest_clip_.left; col < dest_clip_.right;) { + if (!runs.empty() && runs.front().dest_col == col) { + // A run of the 4-column groups PlanHorzGroups() found: one + // gather, one multiply-accumulate per tap, covering 4 columns at + // once. The index plan and weights come from the weight table, + // copied verbatim, and the terms are summed in tap order, so the + // output matches the per-column path below bit for bit. + const StretchHorzRun& run = runs.front(); + StretchHorzRunSimd(HorzRunGroups(run), src_row_span, + dest_span.subspan(dest_span_index)); + dest_span_index += 4 * run.group_count; + col += 4 * run.group_count; + runs = runs.subspan<1u>(); + continue; + } const PixelWeight* pWeights = weight_table_.GetPixelWeight(col); pdfium::span weights = pWeights->GetWeights(); // One validated view of exactly the source bytes this column taps. @@ -454,6 +667,7 @@ bool CStretchEngine::ContinueStretchHorz(PauseIndicatorIface* pPause) { break; } dest_span[dest_span_index++] = PixelFromFixed(dest_a); + ++col; } break; } @@ -516,12 +730,26 @@ bool CStretchEngine::ContinueStretchHorz(PauseIndicatorIface* pPause) { auto stretch_row_from = [this, &dest_span](auto src_pixels) { // The destination pixels have the same layout as the source // pixels: 3 bytes fully written, or 4 bytes of which the 4th is - // left untouched. + // left untouched (both here and on the generic path below). using DestPixel = std::remove_const_t; auto dest_pixels = fxcrt::reinterpret_span(dest_span); + pdfium::span runs(horz_runs_); size_t dest_index = 0; - for (int col = dest_clip_.left; col < dest_clip_.right; ++col) { + for (int col = dest_clip_.left; col < dest_clip_.right;) { + if (!runs.empty() && runs.front().dest_col == col) { + // See the matching kernel in the k8BppTo8Bpp case above: one + // gather and multiply-accumulate per tap for all 4 columns of + // each group in the run, reading the same weights and source + // pixels, in the same tap order, as the per-column path below. + const StretchHorzRun& run = runs.front(); + StretchHorzRunSimd(HorzRunGroups(run), src_pixels, + dest_pixels.subspan(dest_index)); + dest_index += 4 * run.group_count; + col += 4 * run.group_count; + runs = runs.subspan<1u>(); + continue; + } const PixelWeight* pWeights = weight_table_.GetPixelWeight(col); pdfium::span weights = pWeights->GetWeights(); auto window = @@ -561,6 +789,7 @@ bool CStretchEngine::ContinueStretchHorz(PauseIndicatorIface* pPause) { dest.blue = PixelFromFixed(dest_b); dest.green = PixelFromFixed(dest_g); dest.red = PixelFromFixed(dest_r); + ++col; } }; if (Bpp == 3) { @@ -586,8 +815,22 @@ bool CStretchEngine::ContinueStretchHorz(PauseIndicatorIface* pPause) { src_row_span); auto dest_pixels = fxcrt::reinterpret_span>(dest_span); + pdfium::span runs(horz_runs_); size_t dest_index = 0; - for (int col = dest_clip_.left; col < dest_clip_.right; ++col) { + for (int col = dest_clip_.left; col < dest_clip_.right;) { + if (!runs.empty() && runs.front().dest_col == col) { + // See the matching kernels above: one gather and + // multiply-accumulate per tap for all 4 columns of each group in + // the run, including the per-lane weight*alpha/255 divide the + // per-column path below performs, in the same tap order. + const StretchHorzRun& run = runs.front(); + StretchHorzRunAlphaSimd(HorzRunGroups(run), src_pixels, + dest_pixels.subspan(dest_index)); + dest_index += 4 * run.group_count; + col += 4 * run.group_count; + runs = runs.subspan<1u>(); + continue; + } const PixelWeight* pWeights = weight_table_.GetPixelWeight(col); pdfium::span weights = pWeights->GetWeights(); auto window = @@ -636,6 +879,7 @@ bool CStretchEngine::ContinueStretchHorz(PauseIndicatorIface* pPause) { dest.green = PixelFromFixed(dest_g); dest.red = PixelFromFixed(dest_r); dest.alpha = PixelFromFixed(255 * dest_a); + ++col; } break; } diff --git a/core/fxge/dib/cstretchengine.h b/core/fxge/dib/cstretchengine.h index e52f94b9a5..499b6d81d0 100644 --- a/core/fxge/dib/cstretchengine.h +++ b/core/fxge/dib/cstretchengine.h @@ -7,12 +7,17 @@ #ifndef CORE_FXGE_DIB_CSTRETCHENGINE_H_ #define CORE_FXGE_DIB_CSTRETCHENGINE_H_ +#include #include +#include +#include + #include "core/fxcrt/check_op.h" #include "core/fxcrt/data_vector.h" #include "core/fxcrt/fixed_size_data_vector.h" #include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_memory_wrappers.h" #include "core/fxcrt/fx_system.h" #include "core/fxcrt/raw_span.h" #include "core/fxcrt/retain_ptr.h" @@ -23,6 +28,41 @@ class CFX_DIBBase; class PauseIndicatorIface; class ScanlineComposerIface; +// The horizontal stretch pass's k8BppTo8Bpp and kManyBpptoManyBpp arms (the +// former also serving 1bpp sources, whose rows are expanded to bytes) visit +// every destination column once per source row, and the modal tap counts are +// 1 (no scaling in this axis) and 2 (bilinear interpolation). Four columns +// sharing a tap count, in a long enough run of them, can be resampled in one +// pass with a vectorized gather-and-multiply-accumulate: see +// StretchHorzRunSimd() in cstretchengine_hwy.cpp. PlanHorzGroups() finds those +// runs and, for each whole group of four within one whose combined source +// window fits the gather (at most 32 bytes), precomputes the indices and +// weights the kernel needs. Columns not covered by a group -- an odd tap +// count, a short run, or a group whose window does not fit -- take the +// unchanged per-column path. +struct StretchHorzGroup { + size_t src_byte_base; // Byte offset of the source window in the row. + // Per-tap gather indices into the window; see the kernel. + std::array, 2> idx; + // Per-tap, per-column weights. + std::array, 2> weights; + uint32_t taps; // 1 or 2. + bool wide; // Whether the source window needs 32 bytes, not 16. +}; +FX_DATA_PARTITION_EXCEPTION(StretchHorzGroup); + +// A run of consecutive groups covering 4 * group_count consecutive +// destination columns from dest_col (an absolute column index, the same +// coordinate space ContinueStretchHorz()'s `col` uses): the groups at +// [first_group, first_group + group_count) of horz_groups_. The kernel +// handles a whole run per call. +struct StretchHorzRun { + int dest_col; + size_t first_group; + size_t group_count; +}; +FX_DATA_PARTITION_EXCEPTION(StretchHorzRun); + class CStretchEngine { public: static constexpr uint32_t kFixedPointBits = 16; @@ -165,6 +205,28 @@ class CStretchEngine { pdfium::span Expand1BppRow( pdfium::span src_row); + // What PlanHorzGroups() derives once per stretch for its helpers: the + // source pixel stride the gather reads, how many leading bytes of each + // pixel it loads, and the byte length of the row the kernel will read. + struct HorzPlanParams { + uint32_t bpp; + uint32_t gathered; + size_t src_row_bytes; + }; + + // Fills horz_groups_ and horz_runs_ for the current weight table; see + // StretchHorzGroup. + void PlanHorzGroups(); + void PlanHorzSpan(int start, + int end, + uint32_t taps, + const HorzPlanParams& params); + std::optional + BuildHorzGroup(int col, uint32_t taps, const HorzPlanParams& params) const; + uint32_t HorzTapCountAt(int col) const; + pdfium::span HorzRunGroups( + const StretchHorzRun& run) const; + const FXDIB_Format dest_format_; const int dest_bpp_; const int src_bpp_; @@ -188,6 +250,8 @@ class CStretchEngine { State state_ = State::kInitial; int cur_row_ = 0; WeightTable weight_table_; + DataVector horz_groups_; + DataVector horz_runs_; }; #endif // CORE_FXGE_DIB_CSTRETCHENGINE_H_ diff --git a/core/fxge/dib/cstretchengine_hwy.cpp b/core/fxge/dib/cstretchengine_hwy.cpp new file mode 100644 index 0000000000..064c618fbf --- /dev/null +++ b/core/fxge/dib/cstretchengine_hwy.cpp @@ -0,0 +1,425 @@ +// Copyright 2026 The PDFium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "core/fxge/dib/cstretchengine_hwy.h" + +#include +#include + +#include + +#include "core/fxcrt/compiler_specific.h" +#include "core/fxcrt/notreached.h" +#include "core/fxcrt/span.h" +#include "core/fxcrt/span_util.h" + +#undef HWY_TARGET_INCLUDE +#define HWY_TARGET_INCLUDE "core/fxge/dib/cstretchengine_hwy.cpp" +#include "third_party/highway/src/hwy/foreach_target.h" // IWYU pragma: keep +#include "third_party/highway/src/hwy/highway.h" + +HWY_BEFORE_NAMESPACE(); +namespace fxge_stretch_simd { +namespace HWY_NAMESPACE { +namespace { + +namespace hn = hwy::HWY_NAMESPACE; + +// HWY_SCALAR has no vector wide enough for Full128: Highway's portable +// fallback for targets without real SIMD is HWY_EMU128 (which does support +// it), and HWY_SCALAR is only selected instead when an embedder defines +// HWY_COMPILE_ONLY_SCALAR, or when HWY_EMU128 itself is broken for their +// compiler. Either way, PlanHorzGroups() (cstretchengine.cpp) checks +// StretchHorzSimdAvailable() and never plans a group in that build, so +// ContinueStretchHorz() never calls these. +#if HWY_TARGET == HWY_SCALAR + +void RunBpp1(pdfium::span groups, + pdfium::span src_row, + pdfium::span dest) { + NOTREACHED(); +} +void RunBpp3(pdfium::span groups, + pdfium::span src_row, + pdfium::span dest) { + NOTREACHED(); +} +void RunBpp4(pdfium::span groups, + pdfium::span src_row, + pdfium::span dest) { + NOTREACHED(); +} +void RunAlpha(pdfium::span groups, + pdfium::span src_row, + pdfium::span dest) { + NOTREACHED(); +} + +#else // HWY_TARGET == HWY_SCALAR + +using D8 = hn::Full128; +using D32 = hn::Full128; + +// Runs `do_group` over every group in `groups`, each writing the next +// kDestBytes of `dest`. Keeping this loop here, rather than dispatching once +// per group from ContinueStretchHorz(), makes the runtime target selection +// and the call a per-run cost instead of a per-4-columns one: a full-width +// run of an unclipped bilinear row is hundreds of groups. +template +inline void DoRun(pdfium::span groups, + pdfium::span src_row, + pdfium::span dest, + DoGroupFn do_group) { + for (const StretchHorzGroup& group : groups) { + do_group(group, src_row, dest.template first()); + dest = dest.subspan(kDestBytes); + } +} + +// Gathers one tap's four columns' worth of source bytes into 32-bit lanes, +// zero-extended, per the group's precomputed index plan. `window` is the +// group's 16 or 32 source bytes; `idx` is 16 lane indices into it, where +// unused lanes are the 0xFF sentinel PlanHorzGroups() fills, which must read +// back as zero. +// +// For the narrow (16-byte window) case a single TableLookupBytesOr0() does +// this directly: valid indices are in [0, 16), the sentinel is 0xFF (bit 7 +// set), and Or0's contract guarantees zero exactly there. +// +// For the wide (32-byte, two 16-byte table halves) case, Highway's portable +// contract only guarantees a zero when the index's bit 7 is set; indices in +// [16, 128) are implementation-defined. So the low-table lookup needs its +// indices explicitly masked to either the true value (< 16) or 0x80. The +// high-table lookup does not: `idx - 16` wraps every index outside [16, 32) +// -- values below 16, and the 0xFF sentinel -- into [0x80, 0xFF], which is +// already Or0-safe, while valid indices in [16, 32) land correctly in +// [0, 16). +template +inline hn::Vec Gather(D8 d8, + pdfium::span window, + const std::array& idx) { + const auto raw_idx = hn::LoadU(d8, idx.data()); + if constexpr (kWide) { + const auto table_lo = hn::LoadU(d8, window.template first<16>().data()); + const auto table_hi = + hn::LoadU(d8, window.template subspan<16, 16>().data()); + const auto idx_lo = hn::IfThenElse(hn::Lt(raw_idx, hn::Set(d8, 16)), + raw_idx, hn::Set(d8, 0x80)); + const auto idx_hi = hn::Sub(raw_idx, hn::Set(d8, 16)); + return hn::Or(hn::TableLookupBytesOr0(table_lo, idx_lo), + hn::TableLookupBytesOr0(table_hi, idx_hi)); + } + const auto table = hn::LoadU(d8, window.data()); + return hn::TableLookupBytesOr0(table, raw_idx); +} + +// The group's source window within the row: 16 or 32 bytes from +// src_byte_base, which PlanHorzGroups() keeps inside the row. A fixed-extent +// span, so the loads within it need no further bounds checks. +template +inline pdfium::span Window( + const StretchHorzGroup& group, + pdfium::span src_row) { + return src_row.subspan(group.src_byte_base).template first(); +} + +// Exactly the scalar arithmetic the per-column path performs: gather, +// multiply by the tap weight, accumulate across taps in uint32 with +// wraparound, then (acc >> 16) & 0xFF is CStretchEngine::PixelFromFixed(). +// `dest` is the group's 4 destination pixels, 4 * kBpp bytes. +template +inline void DoGroupImpl(const StretchHorzGroup& group, + pdfium::span src_row, + pdfium::span dest) { + const D8 d8; + const D32 d32; + const auto window = Window(group, src_row); + + const auto p0 = hn::BitCast(d32, Gather(d8, window, group.idx[0])); + const auto w0 = hn::LoadU(d32, group.weights[0].data()); + const auto m255 = hn::Set(d32, 0xFF); + + hn::Vec b{}; + hn::Vec g{}; + hn::Vec r{}; + if constexpr (kBpp == 1) { + b = hn::Mul(p0, w0); + } else { + b = hn::Mul(hn::And(p0, m255), w0); + g = hn::Mul(hn::And(hn::ShiftRight<8>(p0), m255), w0); + r = hn::Mul(hn::ShiftRight<16>(p0), w0); + } + + if constexpr (kTaps == 2) { + const auto p1 = hn::BitCast(d32, Gather(d8, window, group.idx[1])); + const auto w1 = hn::LoadU(d32, group.weights[1].data()); + if constexpr (kBpp == 1) { + b = hn::Add(b, hn::Mul(p1, w1)); + } else { + b = hn::Add(b, hn::Mul(hn::And(p1, m255), w1)); + g = hn::Add(g, hn::Mul(hn::And(hn::ShiftRight<8>(p1), m255), w1)); + r = hn::Add(r, hn::Mul(hn::ShiftRight<16>(p1), w1)); + } + } + + // (acc >> 16) & 0xFF is PixelFromFixed(); the mask also satisfies + // U8FromU32()'s precondition that lanes are already in [0, 256). + const auto b16 = hn::And(hn::ShiftRight<16>(b), m255); + + // A single if-constexpr/else chain: code after an early return inside one + // arm of `if constexpr` is still instantiated for every kBpp, so the + // kBpp == 4 arm's static_assert would otherwise fire for kBpp == 1 too. + if constexpr (kBpp == 1) { + const hn::Full32 d8x4; + hn::StoreU(hn::U8FromU32(b16), d8x4, dest.data()); + } else { + const auto g16 = hn::And(hn::ShiftRight<16>(g), m255); + const auto r16 = hn::And(hn::ShiftRight<16>(r), m255); + // Each 32-bit lane becomes one column's B | G << 8 | R << 16, which in + // memory is the destination's B, G, R byte order -- the same + // little-endian lane layout the gather's BitCast to 32-bit lanes above + // already relies on for splitting the channels out. + const auto bgr = + hn::Or(hn::Or(b16, hn::ShiftLeft<8>(g16)), hn::ShiftLeft<16>(r16)); + if constexpr (kBpp == 3) { + // Drop each lane's zero 4th byte: the 4 columns' 12 payload bytes end + // up in the vector's first 12 bytes, stored as 8 + 4 so that nothing is + // written past the 12 bytes the group owns. + static constexpr std::array kPack = { + 0, 1, 2, 4, 5, 6, 8, 9, 10, 12, 13, 14, 0x80, 0x80, 0x80, 0x80}; + const auto packed = hn::TableLookupBytesOr0(hn::BitCast(d8, bgr), + hn::LoadU(d8, kPack.data())); + const hn::Half d8x8; + hn::StoreU(hn::LowerHalf(d8x8, packed), d8x8, dest.data()); + const uint32_t tail = hn::ExtractLane(hn::BitCast(d32, packed), 2); + fxcrt::spancpy(dest.template subspan<8, 4>(), + pdfium::byte_span_from_ref(tail)); + } else { + static_assert(kBpp == 4); + // Byte 3 (alpha/padding) is left untouched, matching the per-column + // path: the 16 bytes are written back with their current 4th bytes. + const auto old = hn::BitCast(d32, hn::LoadU(d8, dest.data())); + const auto out = hn::Or(hn::And(old, hn::Set(d32, 0xFF000000u)), bgr); + hn::StoreU(hn::BitCast(d8, out), d8, dest.data()); + } + } +} + +// Chooses among the 4 (taps, wide) instantiations of DoGroupImpl +// once per group of 4 columns -- not once per column, so this one small +// branch is negligible next to the gather and multiply-accumulate it +// selects. +template +inline void DoGroup(const StretchHorzGroup& group, + pdfium::span src_row, + pdfium::span dest) { + if (group.taps == 1) { + if (group.wide) { + DoGroupImpl(group, src_row, dest); + } else { + DoGroupImpl(group, src_row, dest); + } + } else { + if (group.wide) { + DoGroupImpl(group, src_row, dest); + } else { + DoGroupImpl(group, src_row, dest); + } + } +} + +// Same shape as DoGroupImpl(), for the alpha arm: source and destination are +// always 4-byte BGRA, and each tap's contribution is weighted by +// `weight * src.alpha / 255`, not just `weight` -- a per-lane divide that +// depends on the gathered source alpha, so it can't be folded into the +// precomputed per-tap weight the non-alpha kernel uses. `weight * alpha` +// reaches 65536 * 255, so the usual `(x + 1 + (x >> 8)) >> 8` approximation +// (exact only up to 65535) is wrong here; instead this is the exact +// reciprocal-multiply trick for unsigned division by 255, matching the +// scalar path's `weight * src.alpha / 255` bit for bit: `(x * 0x80808081) >> +// 39` equals `x / 255` for every uint32_t `x`, including this kernel's full +// range (verified exhaustively over [0, 65536 * 255]), and `MulHigh` + +// `ShiftRight<7>` compute exactly that -- the top 32 bits of the 64-bit +// product, then the remaining 7 of the 39 shift -- without `Div`'s +// float-conversion round trip. +template +inline void DoGroupAlphaImpl(const StretchHorzGroup& group, + pdfium::span src_row, + pdfium::span dest) { + const D8 d8; + const D32 d32; + const auto window = Window(group, src_row); + const auto m255 = hn::Set(d32, 0xFF); + const auto kMul255Recip = hn::Set(d32, 0x80808081u); + + const auto p0 = hn::BitCast(d32, Gather(d8, window, group.idx[0])); + const auto w0 = hn::LoadU(d32, group.weights[0].data()); + const auto alpha0 = hn::ShiftRight<24>(p0); + const auto pw0 = + hn::ShiftRight<7>(hn::MulHigh(hn::Mul(w0, alpha0), kMul255Recip)); + auto b = hn::Mul(pw0, hn::And(p0, m255)); + auto g = hn::Mul(pw0, hn::And(hn::ShiftRight<8>(p0), m255)); + auto r = hn::Mul(pw0, hn::And(hn::ShiftRight<16>(p0), m255)); + auto a = pw0; + + if constexpr (kTaps == 2) { + const auto p1 = hn::BitCast(d32, Gather(d8, window, group.idx[1])); + const auto w1 = hn::LoadU(d32, group.weights[1].data()); + const auto alpha1 = hn::ShiftRight<24>(p1); + const auto pw1 = + hn::ShiftRight<7>(hn::MulHigh(hn::Mul(w1, alpha1), kMul255Recip)); + b = hn::Add(b, hn::Mul(pw1, hn::And(p1, m255))); + g = hn::Add(g, hn::Mul(pw1, hn::And(hn::ShiftRight<8>(p1), m255))); + r = hn::Add(r, hn::Mul(pw1, hn::And(hn::ShiftRight<16>(p1), m255))); + a = hn::Add(a, pw1); + } + + // Matches the scalar path: blue/green/red are PixelFromFixed() of the + // accumulated `pixel_weight * channel`; alpha is PixelFromFixed() of + // `255 * accumulated pixel_weight` (the earlier /255 divides are folded + // back out here, the same as the per-column loop does). + // Each 32-bit lane becomes one column's B | G << 8 | R << 16 | A << 24, + // the destination's BGRA byte order in memory (little-endian lanes, as the + // gather's BitCast above already assumes), so the 4 columns are one + // 16-byte store. + const auto b16 = hn::And(hn::ShiftRight<16>(b), m255); + const auto g16 = hn::And(hn::ShiftRight<16>(g), m255); + const auto r16 = hn::And(hn::ShiftRight<16>(r), m255); + const auto a16 = hn::And(hn::ShiftRight<16>(hn::Mul(a, m255)), m255); + const auto bgra = + hn::Or(hn::Or(b16, hn::ShiftLeft<8>(g16)), + hn::Or(hn::ShiftLeft<16>(r16), hn::ShiftLeft<24>(a16))); + hn::StoreU(hn::BitCast(d8, bgra), d8, dest.data()); +} + +inline void DoGroupAlpha(const StretchHorzGroup& group, + pdfium::span src_row, + pdfium::span dest) { + if (group.taps == 1) { + if (group.wide) { + DoGroupAlphaImpl<1, true>(group, src_row, dest); + } else { + DoGroupAlphaImpl<1, false>(group, src_row, dest); + } + } else { + if (group.wide) { + DoGroupAlphaImpl<2, true>(group, src_row, dest); + } else { + DoGroupAlphaImpl<2, false>(group, src_row, dest); + } + } +} + +void RunBpp1(pdfium::span groups, + pdfium::span src_row, + pdfium::span dest) { + DoRun<4>(groups, src_row, dest, DoGroup<1>); +} +void RunBpp3(pdfium::span groups, + pdfium::span src_row, + pdfium::span dest) { + DoRun<12>(groups, src_row, dest, DoGroup<3>); +} +void RunBpp4(pdfium::span groups, + pdfium::span src_row, + pdfium::span dest) { + DoRun<16>(groups, src_row, dest, DoGroup<4>); +} +void RunAlpha(pdfium::span groups, + pdfium::span src_row, + pdfium::span dest) { + DoRun<16>(groups, src_row, dest, DoGroupAlpha); +} + +#endif // HWY_TARGET == HWY_SCALAR + +} // namespace +} // namespace HWY_NAMESPACE +} // namespace fxge_stretch_simd +HWY_AFTER_NAMESPACE(); + +#if HWY_ONCE +namespace fxge_stretch_simd { + +HWY_EXPORT(RunBpp1); +HWY_EXPORT(RunBpp3); +HWY_EXPORT(RunBpp4); +HWY_EXPORT(RunAlpha); + +// Called unqualified, from inside this namespace: when only one target is +// compiled (e.g. HWY_SCALAR), HWY_DYNAMIC_DISPATCH()/HWY_EXPORT() collapse to +// a direct call to HWY_STATIC_NAMESPACE::FUNC_NAME, which only resolves if +// FUNC_NAME is looked up from inside the enclosing project namespace, as +// Highway's own usage example does -- not from the StretchHorz*Simd() free +// functions below, which callers reach without naming this namespace. +void CallRunBpp1(pdfium::span groups, + pdfium::span src_row, + pdfium::span dest_row) { + // SAFETY: indexes Highway's per-target function table with the index of + // the target Highway itself chose for this CPU, which it keeps within + // that table; there is no span form of the macro. + UNSAFE_BUFFERS(HWY_DYNAMIC_DISPATCH(RunBpp1)(groups, src_row, dest_row)); +} +void CallRunBpp3(pdfium::span groups, + pdfium::span src_row, + pdfium::span dest_row) { + // SAFETY: indexes Highway's per-target function table with the index of + // the target Highway itself chose for this CPU, which it keeps within + // that table; there is no span form of the macro. + UNSAFE_BUFFERS(HWY_DYNAMIC_DISPATCH(RunBpp3)(groups, src_row, dest_row)); +} +void CallRunBpp4(pdfium::span groups, + pdfium::span src_row, + pdfium::span dest_row) { + // SAFETY: indexes Highway's per-target function table with the index of + // the target Highway itself chose for this CPU, which it keeps within + // that table; there is no span form of the macro. + UNSAFE_BUFFERS(HWY_DYNAMIC_DISPATCH(RunBpp4)(groups, src_row, dest_row)); +} +void CallRunAlpha(pdfium::span groups, + pdfium::span src_row, + pdfium::span dest_row) { + // SAFETY: indexes Highway's per-target function table with the index of + // the target Highway itself chose for this CPU, which it keeps within + // that table; there is no span form of the macro. + UNSAFE_BUFFERS(HWY_DYNAMIC_DISPATCH(RunAlpha)(groups, src_row, dest_row)); +} + +} // namespace fxge_stretch_simd + +void StretchHorzRunSimd(pdfium::span groups, + pdfium::span src_row, + pdfium::span dest_row) { + fxge_stretch_simd::CallRunBpp1(groups, src_row, dest_row); +} + +void StretchHorzRunSimd(pdfium::span groups, + pdfium::span> src_row, + pdfium::span> dest_row) { + fxge_stretch_simd::CallRunBpp3( + groups, fxcrt::reinterpret_span(src_row), + fxcrt::reinterpret_span(dest_row)); +} + +void StretchHorzRunSimd(pdfium::span groups, + pdfium::span> src_row, + pdfium::span> dest_row) { + fxge_stretch_simd::CallRunBpp4( + groups, fxcrt::reinterpret_span(src_row), + fxcrt::reinterpret_span(dest_row)); +} + +void StretchHorzRunAlphaSimd( + pdfium::span groups, + pdfium::span> src_row, + pdfium::span> dest_row) { + fxge_stretch_simd::CallRunAlpha( + groups, fxcrt::reinterpret_span(src_row), + fxcrt::reinterpret_span(dest_row)); +} + +bool StretchHorzSimdAvailable() { + return (HWY_TARGETS & HWY_SCALAR) == 0; +} +#endif // HWY_ONCE diff --git a/core/fxge/dib/cstretchengine_hwy.h b/core/fxge/dib/cstretchengine_hwy.h new file mode 100644 index 0000000000..9ef8d20340 --- /dev/null +++ b/core/fxge/dib/cstretchengine_hwy.h @@ -0,0 +1,59 @@ +// Copyright 2026 The PDFium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CORE_FXGE_DIB_CSTRETCHENGINE_HWY_H_ +#define CORE_FXGE_DIB_CSTRETCHENGINE_HWY_H_ + +#include + +#include "core/fxcrt/span.h" +#include "core/fxge/dib/cstretchengine.h" +#include "core/fxge/dib/fx_dib.h" + +// Resamples a run of groups' destination columns, 4 per group, in one call: +// for each group, exactly the scalar arithmetic the per-column path performs +// for the same columns (see PlanHorzGroups() and the callers in +// ContinueStretchHorz()): gather each tap's source bytes from `src_row` via +// the group's precomputed index plan, multiply by the tap weight, accumulate +// across taps in the same order, and write one destination pixel per column. +// +// Every group in `groups` is processed, in order, each writing the next 4 +// pixels of `dest_row`, so `dest_row` must hold at least 4 pixels per group. +// PlanHorzGroups() built `groups` for `src_row`, and guarantees each group's +// source window lies within it. +// +// Three destination pixel types, matching the arms of ContinueStretchHorz(): +// a byte (k8BppTo8Bpp, including expanded 1bpp rows), FX_BGR_STRUCT +// (kManyBpptoManyBpp to kBgr) and FX_BGRA_STRUCT (kManyBpptoManyBpp to +// kBgrx, whose 4th byte is left untouched, as the per-column path does). +// +// Implemented with Highway (see cstretchengine_hwy.cpp). `group.taps` and +// `group.wide` select among 4 internal code paths once per group of 4 +// columns, not once per column. +void StretchHorzRunSimd(pdfium::span groups, + pdfium::span src_row, + pdfium::span dest_row); +void StretchHorzRunSimd(pdfium::span groups, + pdfium::span> src_row, + pdfium::span> dest_row); +void StretchHorzRunSimd(pdfium::span groups, + pdfium::span> src_row, + pdfium::span> dest_row); + +// Same contract, for kManyBpptoManyBppWithAlpha: source and destination are +// BGRA, and each tap's contribution is `weight * src.alpha / 255`, not just +// `weight`, so this isn't one of the overloads above -- it has its own kernel +// (cstretchengine_hwy.cpp) that computes that per-lane divide, and it writes +// all 4 bytes of each destination pixel. +void StretchHorzRunAlphaSimd( + pdfium::span groups, + pdfium::span> src_row, + pdfium::span> dest_row); + +// False if this build has no vectorized kernel to dispatch to (HWY_SCALAR, +// see cstretchengine_hwy.cpp), in which case PlanHorzGroups() should not +// plan any groups: there would be nothing able to process them. +bool StretchHorzSimdAvailable(); + +#endif // CORE_FXGE_DIB_CSTRETCHENGINE_HWY_H_ diff --git a/core/fxge/dib/cstretchengine_unittest.cpp b/core/fxge/dib/cstretchengine_unittest.cpp index baecc52705..64f33431fc 100644 --- a/core/fxge/dib/cstretchengine_unittest.cpp +++ b/core/fxge/dib/cstretchengine_unittest.cpp @@ -5,6 +5,7 @@ #include "core/fxge/dib/cstretchengine.h" #include +#include #include #include #include @@ -14,7 +15,10 @@ #include "core/fpdfapi/parser/cpdf_number.h" #include "core/fpdfapi/parser/cpdf_stream.h" #include "core/fxcrt/containers/to_vector.h" +#include "core/fxcrt/span.h" +#include "core/fxcrt/span_util.h" #include "core/fxge/dib/cfx_dibitmap.h" +#include "core/fxge/dib/cstretchengine_hwy.h" #include "core/fxge/dib/fx_dib.h" #include "core/fxge/dib/scanlinecomposer_iface.h" #include "testing/gtest/include/gtest/gtest.h" @@ -277,3 +281,250 @@ TEST(CStretchEngine, TooManyWeights) { kTooBigSrcLen, 0, kTooBigSrcLen, options)); } + +namespace { + +// What one group of StretchHorzRunSimd() is documented to compute (see the +// comment above StretchHorzGroup), re-derived in plain scalar code rather +// than copied from the kernel: per column and channel, gather each tap's byte +// through the group's index plan (a 0xFF index reads as zero), multiply by +// the tap's weight, accumulate in uint32 with wraparound, take bits 16..23. +void ScalarGroupReference(int bpp, + const StretchHorzGroup& group, + pdfium::span src_row, + std::array, 4>& expected) { + const int gathered = bpp == 1 ? 1 : 3; + for (int k = 0; k < 4; ++k) { + for (int c = 0; c < gathered; ++c) { + uint32_t acc = 0; + for (uint32_t t = 0; t < group.taps; ++t) { + const uint8_t idx = group.idx[t][k * 4 + c]; + const uint8_t byte_val = + idx == 0xFF ? 0 : src_row[group.src_byte_base + idx]; + acc += group.weights[t][k] * byte_val; + } + expected[k][c] = CStretchEngine::PixelFromFixed(acc); + } + } +} + +// Weights spanning the 17-bit fixed-point range the weight table produces: +// zero, one, the midpoint, and both ends. +constexpr std::array kTestWeights = {0, 1, 32768, 65535, 65536}; + +// Source bytes spanning uint8_t's range, plus two values that are not a +// power of two. +constexpr std::array kTestBytes = {0, 1, 84, 127, + 128, 171, 254, 255}; + +// Builds the `seed`-th of a small, fixed set of test groups with `taps` taps +// over a `wide` (32 byte) or narrow (16 byte) window at the start of the +// row: every (column, tap) gathers `gathered` consecutive bytes from a +// position and a weight chosen from kTestWeights, cycling both with a +// different phase per (column, tap) so consecutive seeds exercise different +// combinations -- deliberately, rather than hoping random search eventually +// covers the same positions and weights. +StretchHorzGroup BuildTestGroup(int seed, int gathered, uint32_t taps, bool wide) { + const int load_bytes = wide ? 32 : 16; + const int max_pos = load_bytes - gathered; + const std::array positions = {0, max_pos / 2, max_pos}; + StretchHorzGroup group = {}; + group.taps = taps; + group.wide = wide; + std::ranges::fill(group.idx[0], 0xFF); + std::ranges::fill(group.idx[1], 0xFF); + int n = seed; + for (int k = 0; k < 4; ++k) { + for (uint32_t t = 0; t < taps; ++t) { + const int pos = positions[n % positions.size()]; + for (int c = 0; c < gathered; ++c) { + group.idx[t][k * 4 + c] = static_cast(pos + c); + } + group.weights[t][k] = kTestWeights[n % kTestWeights.size()]; + ++n; + } + } + return group; +} + +// How many of BuildTestGroup()'s seeds to check: enough that, since +// kTestWeights and the 3 positions are coprime in count, every (position, +// weight) pair is reached at least once, shifted by a different phase per +// seed. +constexpr int kTestSeedCount = 16; + +// A source row of 48 bytes cycling through kTestBytes (whole BGR and BGRA +// pixels) and a 24-byte destination prefilled with 0xAA, so untouched bytes +// can be told apart. +struct KernelBuffers { + std::array src_row; + std::array dest; + + KernelBuffers() { + for (size_t i = 0; i < src_row.size(); ++i) { + src_row[i] = kTestBytes[i % kTestBytes.size()]; + } + std::ranges::fill(dest, 0xAA); + } +}; + +// Runs one group through the kernel for the destination pixel type `Pixel` +// (a byte, FX_BGR_STRUCT or FX_BGRA_STRUCT). +template +void RunOneGroup(const StretchHorzGroup& group, KernelBuffers& buffers) { + StretchHorzRunSimd( + pdfium::span_from_ref(group), + fxcrt::reinterpret_span( + pdfium::span(buffers.src_row)), + fxcrt::reinterpret_span(pdfium::span(buffers.dest))); +} + +template +void CheckTestGroups(uint32_t taps, bool wide) { + const int gathered = kBpp == 1 ? 1 : 3; + for (int seed = 0; seed < kTestSeedCount; ++seed) { + KernelBuffers buffers; + const StretchHorzGroup group = BuildTestGroup(seed, gathered, taps, wide); + std::array, 4> expected = {}; + ScalarGroupReference(kBpp, group, buffers.src_row, expected); + + RunOneGroup(group, buffers); + for (int k = 0; k < 4; ++k) { + for (int c = 0; c < gathered; ++c) { + EXPECT_EQ(expected[k][c], buffers.dest[k * kBpp + c]) + << "seed " << seed << " column " << k << " channel " << c; + } + if constexpr (kBpp == 4) { + EXPECT_EQ(0xAA, buffers.dest[k * 4 + 3]) + << "seed " << seed << " column " << k; + } + } + // The 4 columns of kBpp bytes are all the group may write. + for (size_t i = 4 * kBpp; i < buffers.dest.size(); ++i) { + EXPECT_EQ(0xAA, buffers.dest[i]) << "seed " << seed << " byte " << i; + } + } +} + +// The alpha arm's per-column arithmetic (kManyBpptoManyBppWithAlpha in +// ContinueStretchHorz()), re-derived: each tap contributes weight * +// src.alpha / 255 (truncating) times the channel, the alpha channel +// accumulates that pixel weight itself, and the output alpha is bits 16..23 +// of 255 times the accumulated pixel weight. +void ScalarAlphaReference(const StretchHorzGroup& group, + pdfium::span src_row, + std::array, 4>& expected) { + for (int k = 0; k < 4; ++k) { + std::array acc = {}; + for (uint32_t t = 0; t < group.taps; ++t) { + std::array px; + for (int c = 0; c < 4; ++c) { + const uint8_t idx = group.idx[t][k * 4 + c]; + px[c] = idx == 0xFF ? 0 : src_row[group.src_byte_base + idx]; + } + const uint32_t pixel_weight = group.weights[t][k] * px[3] / 255; + for (int c = 0; c < 3; ++c) { + acc[c] += pixel_weight * px[c]; + } + acc[3] += pixel_weight; + } + for (int c = 0; c < 3; ++c) { + expected[k][c] = CStretchEngine::PixelFromFixed(acc[c]); + } + expected[k][3] = CStretchEngine::PixelFromFixed(255 * acc[3]); + } +} + +void CheckTestAlphaGroups(uint32_t taps, bool wide) { + for (int seed = 0; seed < kTestSeedCount; ++seed) { + KernelBuffers buffers; + // A 4-byte gather per column: the alpha arm reads all of B, G, R, A. + const StretchHorzGroup group = BuildTestGroup(seed, 4, taps, wide); + std::array, 4> expected = {}; + ScalarAlphaReference(group, buffers.src_row, expected); + + using Pixel = FX_BGRA_STRUCT; + StretchHorzRunAlphaSimd( + pdfium::span_from_ref(group), + fxcrt::reinterpret_span( + pdfium::span(buffers.src_row)), + fxcrt::reinterpret_span(pdfium::span(buffers.dest))); + for (int k = 0; k < 4; ++k) { + for (int c = 0; c < 4; ++c) { + EXPECT_EQ(expected[k][c], buffers.dest[k * 4 + c]) + << "seed " << seed << " column " << k << " channel " << c; + } + } + for (size_t i = 16; i < buffers.dest.size(); ++i) { + EXPECT_EQ(0xAA, buffers.dest[i]) << "seed " << seed << " byte " << i; + } + } +} + +} // namespace + +TEST(CStretchEngine, HorzRunSimdMatchesScalarReference) { + if (!StretchHorzSimdAvailable()) { + GTEST_SKIP(); + } + for (uint32_t taps : {1u, 2u}) { + for (bool wide : {false, true}) { + CheckTestGroups<1, uint8_t>(taps, wide); + CheckTestGroups<3, FX_BGR_STRUCT>(taps, wide); + CheckTestGroups<4, FX_BGRA_STRUCT>(taps, wide); + } + } +} + +TEST(CStretchEngine, HorzRunAlphaSimdMatchesScalarReference) { + if (!StretchHorzSimdAvailable()) { + GTEST_SKIP(); + } + for (uint32_t taps : {1u, 2u}) { + for (bool wide : {false, true}) { + CheckTestAlphaGroups(taps, wide); + } + } +} + +// The run contract: every group in the span is processed, in order, each +// writing the next 4 destination pixels, and nothing beyond them. Every +// group here is one identity tap (weight 65536) over bytes 0..11 of the row, +// so each group's output must equal the row's first 12 bytes. +TEST(CStretchEngine, HorzRunSimdProcessesEveryGroup) { + if (!StretchHorzSimdAvailable()) { + GTEST_SKIP(); + } + std::array src_row; + for (size_t i = 0; i < src_row.size(); ++i) { + src_row[i] = static_cast(0x10 + i); + } + std::array groups = {}; + for (StretchHorzGroup& group : groups) { + group.taps = 1; + std::ranges::fill(group.idx[0], 0xFF); + std::ranges::fill(group.idx[1], 0xFF); + for (int k = 0; k < 4; ++k) { + for (int c = 0; c < 3; ++c) { + group.idx[0][k * 4 + c] = static_cast(k * 3 + c); + } + group.weights[0][k] = CStretchEngine::kFixedPointOne; + } + } + std::array dest; + std::ranges::fill(dest, 0xAA); + using Pixel = FX_BGR_STRUCT; + StretchHorzRunSimd(groups, + fxcrt::reinterpret_span( + pdfium::span(src_row)), + fxcrt::reinterpret_span(pdfium::span(dest))); + const pdfium::span dest_span(dest); + const pdfium::span row_span(src_row); + for (size_t j = 0; j < groups.size(); ++j) { + EXPECT_EQ(row_span.first(12u), dest_span.subspan(12 * j, 12u)) + << "group " << j; + } + for (size_t i = 12 * groups.size(); i < dest.size(); ++i) { + EXPECT_EQ(0xAA, dest[i]) << "byte " << i; + } +} diff --git a/core/fxge/renderdevicedriver_iface.cpp b/core/fxge/renderdevicedriver_iface.cpp index f9523853b1..2cbeb67133 100644 --- a/core/fxge/renderdevicedriver_iface.cpp +++ b/core/fxge/renderdevicedriver_iface.cpp @@ -89,7 +89,7 @@ bool RenderDeviceDriverIface::GetDIBits(RetainPtr bitmap, } RetainPtr RenderDeviceDriverIface::GetBackDrop() const { - return RetainPtr(); + return nullptr; } bool RenderDeviceDriverIface::ContinueDIBits(Continuation* continuation, diff --git a/core/fxge/skia/cfx_dibbase_skia.cpp b/core/fxge/skia/cfx_dibbase_skia.cpp index d1d3861f97..ab8a4cf514 100644 --- a/core/fxge/skia/cfx_dibbase_skia.cpp +++ b/core/fxge/skia/cfx_dibbase_skia.cpp @@ -18,6 +18,7 @@ #include "core/fxcrt/fx_memory_wrappers.h" #include "core/fxcrt/fx_safe_types.h" #include "core/fxcrt/notreached.h" +#include "core/fxcrt/numerics/safe_conversions.h" #include "core/fxcrt/retain_ptr.h" #include "core/fxcrt/span.h" #include "core/fxge/calculate_pitch.h" @@ -31,6 +32,10 @@ #include "third_party/skia/include/core/SkPixmap.h" #include "third_party/skia/include/core/SkRefCnt.h" +#if defined(PDF_USE_LIBYUV) +#include "third_party/libyuv/include/libyuv/convert_argb.h" +#endif + namespace { // Releases `CFX_DIBitmap` "leaked" by `CreateSkiaImageFromDib()`. @@ -99,6 +104,7 @@ class PixelTransformTraits<8, PixelTransform> { } }; +#if !defined(PDF_USE_LIBYUV) template class PixelTransformTraits<24, PixelTransform> { public: @@ -113,6 +119,7 @@ class PixelTransformTraits<24, PixelTransform> { scanline[offset]); } }; +#endif template class PixelTransformTraits<32, PixelTransform> { @@ -134,6 +141,48 @@ void ValidateScanlineSize(pdfium::span scanline, DCHECK_GE(scanline.size(), min_row_bytes); } +#if defined(PDF_USE_LIBYUV) +sk_sp CreateSkiaImageFrom24BppDib(const CFX_DIBBase& source) { + const int width = source.GetWidth(); + const int height = source.GetHeight(); + SkImageInfo info = SkImageInfo::Make(width, height, kBGRA_8888_SkColorType, + kOpaque_SkAlphaType); + const size_t dst_row_bytes = info.minRowBytes(); + size_t output_size = Fx2DSizeOrDie(dst_row_bytes, height); + std::unique_ptr output( + FX_TryAlloc(uint8_t, output_size)); + if (!output) { + return nullptr; + } + + const size_t min_row_bytes = + fxge::CalculatePitch8OrDie(source.GetBPP(), /*components=*/1, width); + DCHECK_LE(min_row_bytes, source.GetPitch()); + + if (!source.GetBuffer().empty()) { + libyuv::RGB24ToARGB(source.GetBuffer().data(), source.GetPitch(), + output.get(), pdfium::checked_cast(dst_row_bytes), + width, height); + } else { + // SAFETY: `output` allocated with `output_size` bytes above. + auto output_span = UNSAFE_BUFFERS(pdfium::span(output.get(), output_size)); + for (int row = 0; row < height; ++row) { + pdfium::span scanline = source.GetScanline(row); + ValidateScanlineSize(scanline, min_row_bytes); + libyuv::RGB24ToARGB( + scanline.data(), 0, + output_span.subspan(Fx2DSizeOrDie(row, dst_row_bytes)).data(), 0, + width, 1); + } + } + + return SkImages::RasterFromPixmap( + SkPixmap(info, output.release(), dst_row_bytes), + /*rasterReleaseProc=*/ReleaseAllocatedHeldBySkImage, + /*releaseContext=*/nullptr); +} +#endif + // Creates an `SkImage` from a `CFX_DIBBase`, transforming the source pixels // using `pixel_transform`. // @@ -240,11 +289,15 @@ sk_sp CFX_DIBBase::RealizeSkImage() const { kPremul_SkAlphaType); case 24: +#if defined(PDF_USE_LIBYUV) + return CreateSkiaImageFrom24BppDib(*this); +#else return CreateSkiaImageFromTransformedDib( *this, kBGRA_8888_SkColorType, kOpaque_SkAlphaType, [](uint8_t red, uint8_t green, uint8_t blue) -> SkColor { return SkColorSetRGB(red, green, blue); }); +#endif case 32: switch (GetFormat()) { diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp index 144d7469b2..ebf768461a 100644 --- a/core/fxge/skia/fx_skia_device.cpp +++ b/core/fxge/skia/fx_skia_device.cpp @@ -765,6 +765,12 @@ bool CFX_SkiaDeviceDriver::DrawDeviceText( float font_size, uint32_t color, const CFX_TextRenderOptions& options) { +#if BUILDFLAG(IS_APPLE) + if (!pFont->ShouldDrawDeviceText(options)) { + return false; + } +#endif + // `SkTextBlob` is built from `pFont`'s font data. If `pFont` doesn't contain // any font data, each text blob will have zero area to be drawn and the // drawing command will be rejected. In this case, fall back to drawing diff --git a/docs/embedpdf/syncs/2026-10-17-7c55203ed.md b/docs/embedpdf/syncs/2026-10-17-7c55203ed.md new file mode 100644 index 0000000000..b5ceb16006 --- /dev/null +++ b/docs/embedpdf/syncs/2026-10-17-7c55203ed.md @@ -0,0 +1,119 @@ +# Sync 2026-10-17: upstream 59ea54cce..7c55203ed (37 commits) + +## Summary + +Upstream from 2026-10-12 to 2026-10-15, merged into `a58884229`. + +The release gate stopped a deploy: 46 upstream commits were missing, the oldest 4.9 days old. +This sync takes the 37 that were at least a day old. Upstream hid `ByteStringPool` behind an +interface on `absl::flat_hash_set`, stopped interning `CPDF_String`, resampled 1- and 2-tap stretch +columns with Highway, converted bitmaps with libyuv, tightened which paths count as rectangles, +and moved many embedder tests from PNG goldens to display lists. We kept our pool `Clear()` on the +new interface, kept our save reader's holder in the parser, and allowlisted Highway's and +abseil's shared globals. + +## Likely security fixes + +- `a898334f9` 2026-10-12 Support optional SSIM threshold in fuzzy matching suppressions + +Not a fix: it extends upstream's pixel-comparison tooling. + +## Conflicts (21 files, 7 blocks) + +A block with an `EPDF_TLS` count is never resolved by taking upstream's side without putting `EPDF_TLS` back (rule thread-confined-globals). + +| File | Blocks | Rules in the blocks | EPDF_TLS | Upstream commits | Resolution | +| :-- | --: | :-- | --: | :-- | :-- | +| `core/fpdfapi/page/cpdf_contentparser.cpp` | 1 | untagged | | `c2cae14c8` Use CFX_Path::GetRectOppositeCorner() in more places | Both includes: ours ``, upstream's `` (`c2cae14c8`). | +| `core/fpdfapi/parser/cpdf_parser.cpp` | 2 | save-traversal | | `f536928c2` Use two-argument AutoRestorer constructor in additional files.; `1e1e501df` Use MaybeOwned in CPDF_Parser; `e2cea87df` Use nullptr instead of FooPtr() | Ours: the save reader parses into the caller's holder (save-traversal); upstream's `objects_holder_` became a `MaybeOwned` (`1e1e501df`), so our two plain-parse wrappers pass `objects_holder_.Get()`. | +| `core/fxcrt/bytestring_pool.h` | 1 | save-traversal | | `e8ff093ac` Hide ByteStringPool details inside bytestring_pool.cpp; `f871ae479` Change ByteStringPool to use absl::flat_hash_set | Upstream made `ByteStringPool` an interface with a hidden `absl::flat_hash_set` implementation (`e8ff093ac`, `f871ae479`). Our `Clear()` (save-traversal) is a pure virtual on the interface, implemented in `bytestring_pool.cpp`. | +| `core/fxge/BUILD.gn` | 1 | untagged | | `ab5e0a9a5` Resample the horizontal stretch's 1- and 2-tap columns with Highway; `0ee275491` Sort conditionals in core/fxge/BUILD.gn | Both: our dependencies (HarfBuzz, fdrm) and upstream's Highway (`ab5e0a9a5`). | +| `fpdfsdk/fpdf_edit_embeddertest.cpp` | 2 | untagged | | `c7fe62c6b` Use display lists for text addition and positioning tests; `5b39cca7f` Use display lists for font subsetting tests in FPDFSaveEmbedderTest; `bb7b5e65a` Use display lists for text removal tests in FPDFEditEmbedderTest | Upstream moved these tests to display lists (`c7fe62c6b`, `bb7b5e65a`). `Bug1549`: ours, which expects the corrected color, now through `VerifySavedDocumentWithDisplayList()` (upstream deleted the PNG and still expects the incorrect color). The repeated-generation test: our resource-name checks (our generator reuses names) with upstream's display list. | +| `testing/resources/embedder_tests/bottom_text_added_bold_and_stretched_text_agg_mac.png` | binary, rename or delete | untagged | | `c7fe62c6b` Use display lists for text addition and positioning tests | Upstream's deletion: its tests compare display lists now, and none of ours uses this golden. | +| `testing/resources/embedder_tests/bottom_text_added_bold_text_agg_mac.png` | binary, rename or delete | untagged | | `c7fe62c6b` Use display lists for text addition and positioning tests | Upstream's deletion: its tests compare display lists now, and none of ours uses this golden. | +| `testing/resources/embedder_tests/bottom_text_agg_mac.png` | binary, rename or delete | untagged | | `c7fe62c6b` Use display lists for text addition and positioning tests | Upstream's deletion: its tests compare display lists now, and none of ours uses this golden. | +| `testing/resources/embedder_tests/bug_1302455_edit_both_forms_agg_mac.png` | binary, rename or delete | untagged | | `7c55203ed` Use display list comparisons in form fill embedder tests | Upstream's deletion: its tests compare display lists now, and none of ours uses this golden. | +| `testing/resources/embedder_tests/bug_1302455_edit_first_form_agg_mac.png` | binary, rename or delete | untagged | | `7c55203ed` Use display list comparisons in form fill embedder tests | Upstream's deletion: its tests compare display lists now, and none of ours uses this golden. | +| `testing/resources/embedder_tests/encrypted_agg_mac.png` | binary, rename or delete | untagged | | `bb7b5e65a` Use display lists for text removal tests in FPDFEditEmbedderTest | Upstream's deletion: its tests compare display lists now, and none of ours uses this golden. | +| `testing/resources/embedder_tests/focused_text_form_with_abc_agg_mac.png` | binary, rename or delete | untagged | | `7c55203ed` Use display list comparisons in form fill embedder tests | Upstream's deletion: its tests compare display lists now, and none of ours uses this golden. | +| `testing/resources/embedder_tests/hello_world_removed_agg_mac.png` | binary, rename or delete | untagged | | `bb7b5e65a` Use display lists for text removal tests in FPDFEditEmbedderTest | Upstream's deletion: its tests compare display lists now, and none of ours uses this golden. | +| `testing/resources/embedder_tests/hello_world_removed_hello_world_agg_mac.png` | binary, rename or delete | untagged | | `bb7b5e65a` Use display lists for text removal tests in FPDFEditEmbedderTest | Upstream's deletion: its tests compare display lists now, and none of ours uses this golden. | +| `testing/resources/embedder_tests/hello_world_split_streams_removed_hello_world_agg_mac.png` | binary, rename or delete | untagged | | `bb7b5e65a` Use display lists for text removal tests in FPDFEditEmbedderTest | Upstream's deletion: its tests compare display lists now, and none of ours uses this golden. | +| `testing/resources/embedder_tests/loaded_text_agg_mac.png` | binary, rename or delete | untagged | | `c7fe62c6b` Use display lists for text addition and positioning tests | Upstream's deletion: its tests compare display lists now, and none of ours uses this golden. | +| `testing/resources/embedder_tests/save_new_text_agg_mac.png` | binary, rename or delete | untagged | | `5b39cca7f` Use display lists for font subsetting tests in FPDFSaveEmbedderTest | Upstream's deletion: its tests compare display lists now, and none of ours uses this golden. | +| `testing/resources/embedder_tests/split_streams_removed_stream1_agg_mac.png` | binary, rename or delete | untagged | | `bb7b5e65a` Use display lists for text removal tests in FPDFEditEmbedderTest | Upstream's deletion: its tests compare display lists now, and none of ours uses this golden. | +| `testing/resources/embedder_tests/text_form_no_highlight_agg_mac.png` | binary, rename or delete | untagged | | `7c55203ed` Use display list comparisons in form fill embedder tests | Upstream's deletion: its tests compare display lists now, and none of ours uses this golden. | +| `testing/resources/embedder_tests/truetype_font_text_agg_mac.png` | binary, rename or delete | untagged | | `c7fe62c6b` Use display lists for text addition and positioning tests | Upstream's deletion: its tests compare display lists now, and none of ours uses this golden. | +| `testing/resources/embedder_tests/unfocused_text_form_with_abc_agg_mac.png` | binary, rename or delete | untagged | | `7c55203ed` Use display list comparisons in form fill embedder tests | Upstream's deletion: its tests compare display lists now, and none of ours uses this golden. | + +## Upstream changes outside the conflicts + +- **Display-list tests.** Upstream compares many embedder tests against display-list dumps + (`*.dump.txt`) instead of PNG goldens. Our Mac run drops from 80 failing tests (stale + `_agg_mac` text goldens) to 36. +- **`CPDF_String` no longer interns** (`56c5b9701`): one of our tests built one with a pool. +- **Highway in the horizontal stretch** (`ab5e0a9a5`) for 1- and 2-tap columns. Our opaque + 3/4-byte row loop still runs first behind its switch; the off/on comparison + (`EPDFViewEmbedderTest.SpecializedResampleLoopsMatchGeneralOnes`) passes. +- **libyuv for bitmap formats and transforms** (`c31605b51`); linuxmusl-arm64 keeps + `pdf_use_libyuv=false` (S9). +- **Path rectangles:** open 3-sided paths are no longer rectangles (`b02da6c41`), and 4-point + rectangles with redundant points are normalized (`69efacb11`). +- **Highway checked out on every build**, not only with V8 (the one `DEPS` change). + +## Write audit (0 lines) + +None. + +## Upstream appearance generator + +None. + +## Globals + +None by the heuristic. `check-globals.py` on the darwin-arm64 release build found seven new +shared globals, all third-party code this sync starts using, now on the allowlist with their +reasons: Highway's dispatch target (an atomic mask every thread computes the same), its +test-only target masks and its atomic warn/abort hooks; abseil's hash-table sentinel +`kDefaultIterSlot` (never written) and two raw-logging `AtomicHook`s (only `Register*Hook()` +changes them). Then ok. + +## Build and patches + +- `DEPS` changed in 1 commit (Highway always checked out); synced with + `gclient sync --no-history --shallow`. `build/` is unchanged, so every target's patch applies + as at S10; darwin-arm64 and wasm32 applied and built. + +## API diff + +None. + +## Tests + +- [x] fork unit + embedder tests (darwin-arm64): 1286 unit tests pass. Embedder: 1621 tests, + 9 skipped, 36 failing, every one a PNG pixel comparison against a Mac golden. A sample + (`EPDFMeasureEmbedderTest.CaptionAppearanceGolden`, `FPDFEditEmbedderTest.Bug1574`, + `FPDFParserDecodeEmbedderTest.Bug455199`, `FPDFPPOEmbedderTest.ImportWithZeroLengthStream`) + fails the same way, with the same pixel counts, in a test binary built before this sync. + Linux runs in the PR's CI. +- [x] layer mode: exit 0; 209 layer-only failures, all expected; writers unchanged. (A Mac + recording drops `FPDFTransformEmbedderTest.TransFormWithClipAndSaveWithLocale`, a Linux-only + test; its line stays.) +- [x] tag check (`--base 7c55203ed`): 965 blocks, 0 untagged. +- [x] C API check: ok, 522 functions in 22 headers. +- [x] globals check: ok after the allowlist entries above. +- [x] wasm build: builds locally, Highway included. +- [ ] ThreadSanitizer soak: in the PR's CI. +- [ ] engine tests and engine-conformance with the local runtime: not run for this sync. +- changed expectations, each with its reason: + - `FPDFEditEmbedderTest.Bug1549`: our corrected-color expectation through a display list + (upstream deleted the PNG). + - `EPDFSaveEmbedderTest`: builds its `CPDF_String` without a pool (`56c5b9701`). + +## Ledger changes proposed + +For review; none applied. + +1. **Tooling:** `run_layer_mode.py --record-writers` drops writers whose tests don't run on the + recording platform (Linux-only tests on a Mac). It could keep entries for tests that didn't + run. diff --git a/fpdfsdk/cpdfsdk_formfillenvironment.cpp b/fpdfsdk/cpdfsdk_formfillenvironment.cpp index 01d1929571..4f1d4b39d6 100644 --- a/fpdfsdk/cpdfsdk_formfillenvironment.cpp +++ b/fpdfsdk/cpdfsdk_formfillenvironment.cpp @@ -75,6 +75,8 @@ CPDFSDK_FormFillEnvironment::CPDFSDK_FormFillEnvironment( } CPDFSDK_FormFillEnvironment::~CPDFSDK_FormFillEnvironment() { + CHECK(!in_active_ffi_callback_); + CHECK(!in_passive_ffi_callback_); being_destroyed_ = true; OnDetachFromDocument(); @@ -119,8 +121,7 @@ void CPDFSDK_FormFillEnvironment::OutputSelectedRect( CFX_PointF ptA = pFormField->PWLtoFFL(CFX_PointF(rect.left, rect.bottom)); CFX_PointF ptB = pFormField->PWLtoFFL(CFX_PointF(rect.right, rect.top)); - AutoRestorer ffi_restorer(&in_passive_ffi_callback_); - in_passive_ffi_callback_ = true; + AutoRestorer restorer(&in_passive_ffi_callback_, true); info_->FFI_OutputSelectedRect(info_, pPage, ptA.x, ptB.y, ptB.x, ptA.y); } @@ -134,8 +135,9 @@ CPDFSDK_PageView* CPDFSDK_FormFillEnvironment::GetCurrentView() { return pPage ? GetOrCreatePageView(pPage) : nullptr; } -IPDF_Page* CPDFSDK_FormFillEnvironment::GetCurrentPage() const { +IPDF_Page* CPDFSDK_FormFillEnvironment::GetCurrentPage() { if (info_ && info_->FFI_GetCurrentPage) { + AutoRestorer restorer(&in_active_ffi_callback_, true); return IPDFPageFromFPDFPage(info_->FFI_GetCurrentPage( info_, FPDFDocumentFromCPDFDocument(cpdfdoc_.Get()))); } @@ -148,19 +150,27 @@ WideString CPDFSDK_FormFillEnvironment::GetLanguage() { return WideString(); } - int nRequiredLen = info_->FFI_GetLanguage(info_, nullptr, 0); - if (nRequiredLen <= 0) { + int required_len; + { + AutoRestorer restorer(&in_active_ffi_callback_, true); + required_len = info_->FFI_GetLanguage(info_, nullptr, 0); + } + if (required_len <= 0) { return WideString(); } - DataVector pBuff(nRequiredLen); - int nActualLen = info_->FFI_GetLanguage(info_, pBuff.data(), nRequiredLen); - if (nActualLen <= 0 || nActualLen > nRequiredLen) { + DataVector pBuff(required_len); + int actual_len; + { + AutoRestorer restorer(&in_active_ffi_callback_, true); + actual_len = info_->FFI_GetLanguage(info_, pBuff.data(), required_len); + } + if (actual_len <= 0 || actual_len > required_len) { return WideString(); } return WideString::FromUTF16LE( - pdfium::span(pBuff).first(static_cast(nActualLen))); + pdfium::span(pBuff).first(static_cast(actual_len))); #else // PDF_ENABLE_XFA return WideString(); #endif // PDF_ENABLE_XFA @@ -172,19 +182,27 @@ WideString CPDFSDK_FormFillEnvironment::GetPlatform() { return WideString(); } - int nRequiredLen = info_->FFI_GetPlatform(info_, nullptr, 0); - if (nRequiredLen <= 0) { + int required_len; + { + AutoRestorer restorer(&in_active_ffi_callback_, true); + required_len = info_->FFI_GetPlatform(info_, nullptr, 0); + } + if (required_len <= 0) { return WideString(); } - DataVector pBuff(nRequiredLen); - int nActualLen = info_->FFI_GetPlatform(info_, pBuff.data(), nRequiredLen); - if (nActualLen <= 0 || nActualLen > nRequiredLen) { + DataVector pBuff(required_len); + int actual_len; + { + AutoRestorer restorer(&in_active_ffi_callback_, true); + actual_len = info_->FFI_GetPlatform(info_, pBuff.data(), required_len); + } + if (actual_len <= 0 || actual_len > required_len) { return WideString(); } return WideString::FromUTF16LE( - pdfium::span(pBuff).first(static_cast(nActualLen))); + pdfium::span(pBuff).first(static_cast(actual_len))); #else // PDF_ENABLE_XFA return WideString(); #endif // PDF_ENABLE_XFA @@ -242,20 +260,20 @@ WideString CPDFSDK_FormFillEnvironment::JS_fieldBrowse() { return WideString(); } - const int nRequiredLen = js_platform->Field_browse(js_platform, nullptr, 0); - if (nRequiredLen <= 0) { + const int required_len = js_platform->Field_browse(js_platform, nullptr, 0); + if (required_len <= 0) { return WideString(); } - DataVector pBuff(nRequiredLen); - const int nActualLen = - js_platform->Field_browse(js_platform, pBuff.data(), nRequiredLen); - if (nActualLen <= 0 || nActualLen > nRequiredLen) { + DataVector pBuff(required_len); + const int actual_len = + js_platform->Field_browse(js_platform, pBuff.data(), required_len); + if (actual_len <= 0 || actual_len > required_len) { return WideString(); } // Don't include trailing NUL. - pBuff.resize(nActualLen - 1); + pBuff.resize(actual_len - 1); // Use FromDefANSI() per "local encoding" comment in fpdf_formfill.h. return WideString::FromDefANSI(ByteStringView(pBuff)); @@ -323,21 +341,21 @@ WideString CPDFSDK_FormFillEnvironment::GetFilePath() const { return WideString(); } - const int nRequiredLen = + const int required_len = js_platform->Doc_getFilePath(js_platform, nullptr, 0); - if (nRequiredLen <= 0) { + if (required_len <= 0) { return WideString(); } - DataVector pBuff(nRequiredLen); - const int nActualLen = - js_platform->Doc_getFilePath(js_platform, pBuff.data(), nRequiredLen); - if (nActualLen <= 0 || nActualLen > nRequiredLen) { + DataVector pBuff(required_len); + const int actual_len = + js_platform->Doc_getFilePath(js_platform, pBuff.data(), required_len); + if (actual_len <= 0 || actual_len > required_len) { return WideString(); } // Don't include trailing NUL. - pBuff.resize(nActualLen - 1); + pBuff.resize(actual_len - 1); // Use FromDefANSI() per "local encoding" comment in fpdf_formfill.h. return WideString::FromDefANSI(ByteStringView(pBuff)); @@ -378,8 +396,7 @@ IJS_Runtime* CPDFSDK_FormFillEnvironment::GetIJSRuntime() { void CPDFSDK_FormFillEnvironment::Invalidate(IPDF_Page* page, const FX_RECT& rect) { if (info_ && info_->FFI_Invalidate) { - AutoRestorer ffi_restorer(&in_passive_ffi_callback_); - in_passive_ffi_callback_ = true; + AutoRestorer restorer(&in_passive_ffi_callback_, true); info_->FFI_Invalidate(info_, FPDFPageFromIPDFPage(page), rect.left, rect.top, rect.right, rect.bottom); } @@ -388,8 +405,7 @@ void CPDFSDK_FormFillEnvironment::Invalidate(IPDF_Page* page, void CPDFSDK_FormFillEnvironment::SetCursor( IPWL_FillerNotify::CursorStyle nCursorType) { if (info_ && info_->FFI_SetCursor) { - AutoRestorer ffi_restorer(&in_passive_ffi_callback_); - in_passive_ffi_callback_ = true; + AutoRestorer restorer(&in_passive_ffi_callback_, true); info_->FFI_SetCursor(info_, static_cast(nCursorType)); } } @@ -397,6 +413,7 @@ void CPDFSDK_FormFillEnvironment::SetCursor( int CPDFSDK_FormFillEnvironment::SetTimer(int uElapse, TimerCallback lpTimerFunc) { if (info_ && info_->FFI_SetTimer) { + AutoRestorer restorer(&in_active_ffi_callback_, true); return info_->FFI_SetTimer(info_, uElapse, lpTimerFunc); } return CFX_Timer::HandlerIface::kInvalidTimerID; @@ -404,14 +421,14 @@ int CPDFSDK_FormFillEnvironment::SetTimer(int uElapse, void CPDFSDK_FormFillEnvironment::KillTimer(int nTimerID) { if (info_ && info_->FFI_KillTimer) { + AutoRestorer restorer(&in_active_ffi_callback_, true); info_->FFI_KillTimer(info_, nTimerID); } } void CPDFSDK_FormFillEnvironment::OnChange() { if (info_ && info_->FFI_OnChange) { - AutoRestorer ffi_restorer(&in_passive_ffi_callback_); - in_passive_ffi_callback_ = true; + AutoRestorer restorer(&in_passive_ffi_callback_, true); info_->FFI_OnChange(info_); } } @@ -419,6 +436,7 @@ void CPDFSDK_FormFillEnvironment::OnChange() { void CPDFSDK_FormFillEnvironment::ExecuteNamedAction( const ByteString& namedAction) { if (info_ && info_->FFI_ExecuteNamedAction) { + AutoRestorer restorer(&in_active_ffi_callback_, true); info_->FFI_ExecuteNamedAction(info_, namedAction.c_str()); } } @@ -434,8 +452,7 @@ void CPDFSDK_FormFillEnvironment::OnSetFieldInputFocusInternal( size_t nCharacters = text.GetLength(); ByteString bsUTFText = text.ToUTF16LE(); auto* pBuffer = reinterpret_cast(bsUTFText.c_str()); - AutoRestorer ffi_restorer(&in_passive_ffi_callback_); - in_passive_ffi_callback_ = true; + AutoRestorer restorer(&in_passive_ffi_callback_, true); info_->FFI_SetTextFieldFocus( info_, pBuffer, pdfium::checked_cast(nCharacters), bFocus); } @@ -471,14 +488,14 @@ void CPDFSDK_FormFillEnvironment::DoURIAction(const ByteString& bsURI, if (!info_) { return; } - if (info_->version >= 2 && info_->FFI_DoURIActionWithKeyboardModifier) { + AutoRestorer restorer(&in_active_ffi_callback_, true); info_->FFI_DoURIActionWithKeyboardModifier(info_, bsURI.c_str(), modifiers.UncheckedValue()); return; } - if (info_->FFI_DoURIAction) { + AutoRestorer restorer(&in_active_ffi_callback_, true); info_->FFI_DoURIAction(info_, bsURI.c_str()); } } @@ -487,6 +504,7 @@ void CPDFSDK_FormFillEnvironment::DoGoToAction(int nPageIndex, int zoomMode, pdfium::span fPosArray) { if (info_ && info_->FFI_DoGoToAction) { + AutoRestorer restorer(&in_active_ffi_callback_, true); info_->FFI_DoGoToAction(info_, nPageIndex, zoomMode, fPosArray.data(), fxcrt::CollectionSize(fPosArray)); } @@ -504,17 +522,17 @@ void CPDFSDK_FormFillEnvironment::DisplayCaret(IPDF_Page* page, double right, double bottom) { if (info_ && info_->version >= 2 && info_->FFI_DisplayCaret) { - AutoRestorer ffi_restorer(&in_passive_ffi_callback_); - in_passive_ffi_callback_ = true; + AutoRestorer restorer(&in_passive_ffi_callback_, true); info_->FFI_DisplayCaret(info_, FPDFPageFromIPDFPage(page), bVisible, left, top, right, bottom); } } -int CPDFSDK_FormFillEnvironment::GetCurrentPageIndex() const { +int CPDFSDK_FormFillEnvironment::GetCurrentPageIndex() { if (!info_ || info_->version < 2 || !info_->FFI_GetCurrentPageIndex) { return -1; } + AutoRestorer restorer(&in_active_ffi_callback_, true); return info_->FFI_GetCurrentPageIndex( info_, FPDFDocumentFromCPDFDocument(cpdfdoc_.Get())); } @@ -523,6 +541,7 @@ void CPDFSDK_FormFillEnvironment::SetCurrentPage(int iCurPage) { if (!info_ || info_->version < 2 || !info_->FFI_SetCurrentPage) { return; } + AutoRestorer restorer(&in_active_ffi_callback_, true); info_->FFI_SetCurrentPage(info_, FPDFDocumentFromCPDFDocument(cpdfdoc_.Get()), iCurPage); } @@ -533,6 +552,7 @@ void CPDFSDK_FormFillEnvironment::GotoURL(const WideString& wsURL) { } ByteString bsTo = wsURL.ToUTF16LE(); + AutoRestorer restorer(&in_active_ffi_callback_, true); info_->FFI_GotoURL(info_, FPDFDocumentFromCPDFDocument(cpdfdoc_.Get()), AsFPDFWideString(&bsTo)); } @@ -547,8 +567,11 @@ FS_RECTF CPDFSDK_FormFillEnvironment::GetPageViewRect(IPDF_Page* page) { double top; double right; double bottom; - info_->FFI_GetPageViewRect(info_, FPDFPageFromIPDFPage(page), &left, &top, - &right, &bottom); + { + AutoRestorer restorer(&in_active_ffi_callback_, true); + info_->FFI_GetPageViewRect(info_, FPDFPageFromIPDFPage(page), &left, &top, + &right, &bottom); + } rect.left = static_cast(left); rect.top = static_cast(top); @@ -560,9 +583,12 @@ FS_RECTF CPDFSDK_FormFillEnvironment::GetPageViewRect(IPDF_Page* page) { bool CPDFSDK_FormFillEnvironment::PopupMenu(IPDF_Page* page, int menuFlag, const CFX_PointF& pt) { - return info_ && info_->version >= 2 && info_->FFI_PopupMenu && - info_->FFI_PopupMenu(info_, FPDFPageFromIPDFPage(page), nullptr, - menuFlag, pt.x, pt.y); + if (info_ && info_->version >= 2 && info_->FFI_PopupMenu) { + AutoRestorer restorer(&in_active_ffi_callback_, true); + return info_->FFI_PopupMenu(info_, FPDFPageFromIPDFPage(page), nullptr, + menuFlag, pt.x, pt.y); + } + return false; } void CPDFSDK_FormFillEnvironment::EmailTo(FPDF_FILEHANDLER* fileHandler, @@ -572,6 +598,7 @@ void CPDFSDK_FormFillEnvironment::EmailTo(FPDF_FILEHANDLER* fileHandler, FPDF_WIDESTRING pBcc, FPDF_WIDESTRING pMsg) { if (info_ && info_->version >= 2 && info_->FFI_EmailTo) { + AutoRestorer restorer(&in_active_ffi_callback_, true); info_->FFI_EmailTo(info_, fileHandler, pTo, pSubject, pCC, pBcc, pMsg); } } @@ -580,6 +607,7 @@ void CPDFSDK_FormFillEnvironment::UploadTo(FPDF_FILEHANDLER* fileHandler, int fileFlag, FPDF_WIDESTRING uploadTo) { if (info_ && info_->version >= 2 && info_->FFI_UploadTo) { + AutoRestorer restorer(&in_active_ffi_callback_, true); info_->FFI_UploadTo(info_, fileHandler, fileFlag, uploadTo); } } @@ -588,6 +616,7 @@ FPDF_FILEHANDLER* CPDFSDK_FormFillEnvironment::OpenFile(int fileType, FPDF_WIDESTRING wsURL, const char* mode) { if (info_ && info_->version >= 2 && info_->FFI_OpenFile) { + AutoRestorer restorer(&in_active_ffi_callback_, true); return info_->FFI_OpenFile(info_, fileType, wsURL, mode); } return nullptr; @@ -600,8 +629,12 @@ RetainPtr CPDFSDK_FormFillEnvironment::DownloadFromURL( } ByteString bstrURL = url.ToUTF16LE(); - FPDF_FILEHANDLER* file_handler = - info_->FFI_DownloadFromURL(info_, AsFPDFWideString(&bstrURL)); + FPDF_FILEHANDLER* file_handler; + { + AutoRestorer restorer(&in_active_ffi_callback_, true); + file_handler = + info_->FFI_DownloadFromURL(info_, AsFPDFWideString(&bstrURL)); + } if (!file_handler) { return nullptr; } @@ -627,10 +660,13 @@ WideString CPDFSDK_FormFillEnvironment::PostRequestURL( FPDF_BSTR response; FPDF_BStr_Init(&response); - info_->FFI_PostRequestURL( - info_, AsFPDFWideString(&bsURL), AsFPDFWideString(&bsData), - AsFPDFWideString(&bsContentType), AsFPDFWideString(&bsEncode), - AsFPDFWideString(&bsHeader), &response); + { + AutoRestorer restorer(&in_active_ffi_callback_, true); + info_->FFI_PostRequestURL( + info_, AsFPDFWideString(&bsURL), AsFPDFWideString(&bsData), + AsFPDFWideString(&bsContentType), AsFPDFWideString(&bsEncode), + AsFPDFWideString(&bsHeader), &response); + } // SAFETY: required from FFI callback. WideString wsRet = WideString::FromUTF16LE(UNSAFE_BUFFERS( @@ -653,14 +689,16 @@ FPDF_BOOL CPDFSDK_FormFillEnvironment::PutRequestURL( ByteString bsData = wsData.ToUTF16LE(); ByteString bsEncode = wsEncode.ToUTF16LE(); + AutoRestorer restorer(&in_active_ffi_callback_, true); return info_->FFI_PutRequestURL(info_, AsFPDFWideString(&bsURL), AsFPDFWideString(&bsData), AsFPDFWideString(&bsEncode)); } void CPDFSDK_FormFillEnvironment::PageEvent(int iPageCount, - uint32_t dwEventType) const { + uint32_t dwEventType) { if (info_ && info_->version >= 2 && info_->FFI_PageEvent) { + AutoRestorer restorer(&in_active_ffi_callback_, true); info_->FFI_PageEvent(info_, iPageCount, dwEventType); } } @@ -792,10 +830,11 @@ void CPDFSDK_FormFillEnvironment::RemovePageView(IPDF_Page* pUnderlyingPage) { page_map_.erase(it); } -IPDF_Page* CPDFSDK_FormFillEnvironment::GetPage(int nIndex) const { +IPDF_Page* CPDFSDK_FormFillEnvironment::GetPage(int nIndex) { if (!info_ || !info_->FFI_GetPage) { return nullptr; } + AutoRestorer restorer(&in_active_ffi_callback_, true); return IPDFPageFromFPDFPage(info_->FFI_GetPage( info_, FPDFDocumentFromCPDFDocument(cpdfdoc_.Get()), nIndex)); } @@ -936,8 +975,7 @@ void CPDFSDK_FormFillEnvironment::SendOnFocusChange( FPDF_ANNOTATION fpdf_annot = FPDFAnnotationFromCPDFAnnotContext(focused_annot.get()); - AutoRestorer ffi_restorer(&in_passive_ffi_callback_); - in_passive_ffi_callback_ = true; + AutoRestorer restorer(&in_passive_ffi_callback_, true); info_->FFI_OnFocusChange(info_, fpdf_annot, pPageView->GetPageIndex()); } @@ -1212,35 +1250,35 @@ void CPDFSDK_FormFillEnvironment::RunFieldJavaScript( RunScript(script, [type, data, pFormField](IJS_EventContext* context) { switch (type) { case CPDF_AAction::kCursorEnter: - context->OnField_MouseEnter(data->bModifier, data->bShift, pFormField); + context->OnField_MouseEnter(data->modifier, data->shift, pFormField); break; case CPDF_AAction::kCursorExit: - context->OnField_MouseExit(data->bModifier, data->bShift, pFormField); + context->OnField_MouseExit(data->modifier, data->shift, pFormField); break; case CPDF_AAction::kButtonDown: - context->OnField_MouseDown(data->bModifier, data->bShift, pFormField); + context->OnField_MouseDown(data->modifier, data->shift, pFormField); break; case CPDF_AAction::kButtonUp: - context->OnField_MouseUp(data->bModifier, data->bShift, pFormField); + context->OnField_MouseUp(data->modifier, data->shift, pFormField); break; case CPDF_AAction::kGetFocus: - context->OnField_Focus(data->bModifier, data->bShift, pFormField, - &data->sValue); + context->OnField_Focus(data->modifier, data->shift, pFormField, + &data->value); break; case CPDF_AAction::kLoseFocus: - context->OnField_Blur(data->bModifier, data->bShift, pFormField, - &data->sValue); + context->OnField_Blur(data->modifier, data->shift, pFormField, + &data->value); break; case CPDF_AAction::kKeyStroke: context->OnField_Keystroke( - &data->sChange, data->sChangeEx, data->bKeyDown, data->bModifier, - &data->nSelEnd, &data->nSelStart, data->bShift, pFormField, - &data->sValue, data->bWillCommit, data->bFieldFull, &data->bRC); + &data->change, data->change_ex, data->key_down, data->modifier, + &data->sel_end, &data->sel_start, data->shift, pFormField, + &data->value, data->will_commit, data->field_full, &data->rc); break; case CPDF_AAction::kValidate: - context->OnField_Validate(&data->sChange, data->sChangeEx, - data->bKeyDown, data->bModifier, data->bShift, - pFormField, &data->sValue, &data->bRC); + context->OnField_Validate(&data->change, data->change_ex, + data->key_down, data->modifier, data->shift, + pFormField, &data->value, &data->rc); break; default: NOTREACHED(); diff --git a/fpdfsdk/cpdfsdk_formfillenvironment.h b/fpdfsdk/cpdfsdk_formfillenvironment.h index 5ddd521541..a25cc62877 100644 --- a/fpdfsdk/cpdfsdk_formfillenvironment.h +++ b/fpdfsdk/cpdfsdk_formfillenvironment.h @@ -158,7 +158,7 @@ class CPDFSDK_FormFillEnvironment final #ifdef PDF_ENABLE_V8 CPDFSDK_PageView* GetCurrentView(); - IPDF_Page* GetCurrentPage() const; + IPDF_Page* GetCurrentPage(); WideString GetLanguage(); WideString GetPlatform(); @@ -201,7 +201,7 @@ class CPDFSDK_FormFillEnvironment final double top, double right, double bottom); - int GetCurrentPageIndex() const; + int GetCurrentPageIndex(); void SetCurrentPage(int iCurPage); // TODO(dsinclair): This should probably change to PDFium? @@ -232,7 +232,7 @@ class CPDFSDK_FormFillEnvironment final const WideString& wsData, const WideString& wsEncode); - void PageEvent(int iPageCount, uint32_t dwEventType) const; + void PageEvent(int iPageCount, uint32_t dwEventType); #endif // PDF_ENABLE_XFA #endif // PDF_ENABLE_V8 @@ -259,7 +259,7 @@ class CPDFSDK_FormFillEnvironment final private: using RunScriptCallback = std::function; - IPDF_Page* GetPage(int nIndex) const; + IPDF_Page* GetPage(int nIndex); void OnSetFieldInputFocusInternal(const WideString& text, bool bFocus); void SendOnFocusChange(ObservedPtr& pAnnot); @@ -299,6 +299,7 @@ class CPDFSDK_FormFillEnvironment final std::unique_ptr interactive_form_filler_; bool change_mask_ = false; bool being_destroyed_ = false; + bool in_active_ffi_callback_ = false; bool in_passive_ffi_callback_ = false; // Holds the list of focusable annot types. diff --git a/fpdfsdk/cpdfsdk_interactiveform.cpp b/fpdfsdk/cpdfsdk_interactiveform.cpp index 41dcf0b89e..6bbf97d16a 100644 --- a/fpdfsdk/cpdfsdk_interactiveform.cpp +++ b/fpdfsdk/cpdfsdk_interactiveform.cpp @@ -260,9 +260,7 @@ void CPDFSDK_InteractiveForm::OnCalculate(CPDF_FormField* pFormField) { return; } - AutoRestorer restorer(&busy_); - busy_ = true; - + AutoRestorer restorer(&busy_, true); if (!IsCalculateEnabled()) { return; } @@ -387,13 +385,12 @@ bool CPDFSDK_InteractiveForm::OnValidate(CPDF_FormField* pFormField, return true; } - CFFL_FieldAction fa; - fa.bModifier = false; - fa.bShift = false; - fa.sValue = csValue; + CFFL_FieldAction fa = { + .value = csValue, + }; form_fill_env_->DoActionFieldJavaScript(action, CPDF_AAction::kValidate, pFormField, &fa); - return fa.bRC; + return fa.rc; } bool CPDFSDK_InteractiveForm::DoAction_Hide(const CPDF_Action& action) { diff --git a/fpdfsdk/cpdfsdk_pageview.cpp b/fpdfsdk/cpdfsdk_pageview.cpp index b12a93dd7e..11ab3006f5 100644 --- a/fpdfsdk/cpdfsdk_pageview.cpp +++ b/fpdfsdk/cpdfsdk_pageview.cpp @@ -570,8 +570,7 @@ bool CPDFSDK_PageView::OnKeyDown(FWL_VKEYCODE key_code, } void CPDFSDK_PageView::LoadFXAnnots() { - AutoRestorer lock(&locked_); - locked_ = true; + AutoRestorer lock(&locked_, true); #ifdef PDF_ENABLE_XFA RetainPtr protector(ToXFAPage(page_)); diff --git a/fpdfsdk/cpdfsdk_widget.cpp b/fpdfsdk/cpdfsdk_widget.cpp index 6b928906f3..9866a3d057 100644 --- a/fpdfsdk/cpdfsdk_widget.cpp +++ b/fpdfsdk/cpdfsdk_widget.cpp @@ -240,15 +240,15 @@ bool CPDFSDK_Widget::OnXFAAAction(PDFSDK_XFAAActionType eXFAAAT, } CXFA_EventParam param(eEventType); - param.change_ = data->sChange; + param.change_ = data->change; param.commit_key_ = 0; - param.shift_ = data->bShift; - param.sel_start_ = data->nSelStart; - param.sel_end_ = data->nSelEnd; - param.full_text_ = data->sValue; - param.key_down_ = data->bKeyDown; - param.modifier_ = data->bModifier; - param.prev_text_ = data->sValue; + param.shift_ = data->shift; + param.sel_start_ = data->sel_start; + param.sel_end_ = data->sel_end; + param.full_text_ = data->value; + param.key_down_ = data->key_down; + param.modifier_ = data->modifier; + param.prev_text_ = data->value; if ((eEventType == XFA_EVENT_Click || eEventType == XFA_EVENT_Change) && GetFieldType() == FormFieldType::kRadioButton) { CXFA_FFWidget* hGroupWidget = GetGroupMixXFAWidget(); @@ -332,7 +332,7 @@ bool CPDFSDK_Widget::HandleXFAAAction( return false; } - XFA_EVENTTYPE eEventType = GetXFAEventType(type, data->bWillCommit); + XFA_EVENTTYPE eEventType = GetXFAEventType(type, data->will_commit); if (eEventType == XFA_EVENT_Unknown) { return false; } @@ -343,15 +343,15 @@ bool CPDFSDK_Widget::HandleXFAAAction( } CXFA_EventParam param(eEventType); - param.change_ = data->sChange; + param.change_ = data->change; param.commit_key_ = 0; - param.shift_ = data->bShift; - param.sel_start_ = data->nSelStart; - param.sel_end_ = data->nSelEnd; - param.full_text_ = data->sValue; - param.key_down_ = data->bKeyDown; - param.modifier_ = data->bModifier; - param.prev_text_ = data->sValue; + param.shift_ = data->shift; + param.sel_start_ = data->sel_start; + param.sel_end_ = data->sel_end; + param.full_text_ = data->value; + param.key_down_ = data->key_down; + param.modifier_ = data->modifier; + param.prev_text_ = data->value; bool ret = hWidget->ProcessEventUnderHandler(¶m, pXFAWidgetHandler); CXFA_FFDocView* pDocView = context->GetXFADocView(); if (pDocView) { diff --git a/fpdfsdk/epdf_save_embeddertest.cpp b/fpdfsdk/epdf_save_embeddertest.cpp index 8aaf227413..5edff43014 100644 --- a/fpdfsdk/epdf_save_embeddertest.cpp +++ b/fpdfsdk/epdf_save_embeddertest.cpp @@ -132,7 +132,7 @@ std::string MakeGenerationDocument(uint16_t generation, auto encrypted_title = crypto->EncryptContent(5, generation, pdfium::as_byte_span(title)); auto title_object = pdfium::MakeRetain( - nullptr, encrypted_title, CPDF_String::DataType::kIsHex); + encrypted_title, CPDF_String::DataType::kIsHex); objects[4] = "<>"; objects.push_back( SerializeObject(encryption_source->GetEncryptDict().Get())); diff --git a/fpdfsdk/formfiller/BUILD.gn b/fpdfsdk/formfiller/BUILD.gn index 4652b0f408..e89b2b1a4e 100644 --- a/fpdfsdk/formfiller/BUILD.gn +++ b/fpdfsdk/formfiller/BUILD.gn @@ -13,7 +13,6 @@ source_set("formfiller") { "cffl_checkbox.h", "cffl_combobox.cpp", "cffl_combobox.h", - "cffl_fieldaction.cpp", "cffl_fieldaction.h", "cffl_formfield.cpp", "cffl_formfield.h", diff --git a/fpdfsdk/formfiller/cffl_combobox.cpp b/fpdfsdk/formfiller/cffl_combobox.cpp index eb7fd98e3c..ab1f3d3bc6 100644 --- a/fpdfsdk/formfiller/cffl_combobox.cpp +++ b/fpdfsdk/formfiller/cffl_combobox.cpp @@ -128,14 +128,13 @@ void CFFL_ComboBox::GetActionData(const CPDFSDK_PageView* pPageView, case CPDF_AAction::kKeyStroke: if (CPWL_ComboBox* pComboBox = GetPWLComboBox(pPageView)) { if (CPWL_Edit* pEdit = pComboBox->GetEdit()) { - fa.bFieldFull = pEdit->IsTextFull(); - std::tie(fa.nSelStart, fa.nSelEnd) = pEdit->GetSelection(); - fa.sValue = pEdit->GetText(); - fa.sChangeEx = GetSelectExportText(); - - if (fa.bFieldFull) { - fa.sChange.clear(); - fa.sChangeEx.clear(); + fa.field_full = pEdit->IsTextFull(); + std::tie(fa.sel_start, fa.sel_end) = pEdit->GetSelection(); + fa.value = pEdit->GetText(); + fa.change_ex = GetSelectExportText(); + if (fa.field_full) { + fa.change.clear(); + fa.change_ex.clear(); } } } @@ -143,13 +142,13 @@ void CFFL_ComboBox::GetActionData(const CPDFSDK_PageView* pPageView, case CPDF_AAction::kValidate: if (CPWL_ComboBox* pComboBox = GetPWLComboBox(pPageView)) { if (CPWL_Edit* pEdit = pComboBox->GetEdit()) { - fa.sValue = pEdit->GetText(); + fa.value = pEdit->GetText(); } } break; case CPDF_AAction::kLoseFocus: case CPDF_AAction::kGetFocus: - fa.sValue = widget_->GetValue(); + fa.value = widget_->GetValue(); break; default: break; @@ -163,8 +162,8 @@ void CFFL_ComboBox::SetActionData(const CPDFSDK_PageView* pPageView, case CPDF_AAction::kKeyStroke: if (CPWL_ComboBox* pComboBox = GetPWLComboBox(pPageView)) { if (CPWL_Edit* pEdit = pComboBox->GetEdit()) { - pEdit->SetSelection(fa.nSelStart, fa.nSelEnd); - pEdit->ReplaceSelection(fa.sChange); + pEdit->SetSelection(fa.sel_start, fa.sel_end); + pEdit->ReplaceSelection(fa.change); } } break; diff --git a/fpdfsdk/formfiller/cffl_combobox_embeddertest.cpp b/fpdfsdk/formfiller/cffl_combobox_embeddertest.cpp index 3e1789f711..cf5d4ab665 100644 --- a/fpdfsdk/formfiller/cffl_combobox_embeddertest.cpp +++ b/fpdfsdk/formfiller/cffl_combobox_embeddertest.cpp @@ -17,22 +17,22 @@ TEST_F(CFFLComboBoxEmbedderTest, GetActionData) { CFFL_FieldAction result; GetCFFLFormField()->GetActionData(GetPageView(), CPDF_AAction::kKeyStroke, result); - EXPECT_EQ(L"Banana", result.sValue); - EXPECT_EQ(L"Banana", result.sChangeEx); + EXPECT_EQ(L"Banana", result.value); + EXPECT_EQ(L"Banana", result.change_ex); } { CFFL_FieldAction result; GetCFFLFormField()->GetActionData(GetPageView(), CPDF_AAction::kValidate, result); - EXPECT_EQ(L"Banana", result.sValue); - EXPECT_EQ(L"", result.sChangeEx); + EXPECT_EQ(L"Banana", result.value); + EXPECT_EQ(L"", result.change_ex); } { CFFL_FieldAction result; GetCFFLFormField()->GetActionData(GetPageView(), CPDF_AAction::kGetFocus, result); - EXPECT_EQ(L"Banana", result.sValue); - EXPECT_EQ(L"", result.sChangeEx); + EXPECT_EQ(L"Banana", result.value); + EXPECT_EQ(L"", result.change_ex); } } @@ -40,15 +40,16 @@ TEST_F(CFFLComboBoxEmbedderTest, SetActionData) { ScopedPage page = CreateAndInitializeFormComboboxPDF(); ASSERT_TRUE(page); FormFillerAndWindowSetup(GetCPDFSDKAnnotNormal()); - CFFL_FieldAction input_fa; - input_fa.nSelStart = 2; - input_fa.nSelEnd = 4; - input_fa.sChange = L"Hamster"; + CFFL_FieldAction input_fa = { + .sel_start = 2, + .sel_end = 4, + .change = L"Hamster", + }; GetCFFLFormField()->SetActionData(GetPageView(), CPDF_AAction::kKeyStroke, input_fa); CFFL_FieldAction output_fa; GetCFFLFormField()->GetActionData(GetPageView(), CPDF_AAction::kKeyStroke, output_fa); - EXPECT_EQ(L"BaHamsterna", output_fa.sValue); + EXPECT_EQ(L"BaHamsterna", output_fa.value); } diff --git a/fpdfsdk/formfiller/cffl_fieldaction.cpp b/fpdfsdk/formfiller/cffl_fieldaction.cpp deleted file mode 100644 index 8ee28cbaf7..0000000000 --- a/fpdfsdk/formfiller/cffl_fieldaction.cpp +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright 2016 The PDFium Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#include "fpdfsdk/formfiller/cffl_fieldaction.h" - -CFFL_FieldAction::CFFL_FieldAction() = default; - -CFFL_FieldAction::~CFFL_FieldAction() = default; diff --git a/fpdfsdk/formfiller/cffl_fieldaction.h b/fpdfsdk/formfiller/cffl_fieldaction.h index 0bd6824cfe..e6949c3661 100644 --- a/fpdfsdk/formfiller/cffl_fieldaction.h +++ b/fpdfsdk/formfiller/cffl_fieldaction.h @@ -10,21 +10,17 @@ #include "core/fxcrt/widestring.h" struct CFFL_FieldAction { - CFFL_FieldAction(); - CFFL_FieldAction(const CFFL_FieldAction& other) = delete; - ~CFFL_FieldAction(); - - bool bModifier = false; - bool bShift = false; - bool bKeyDown = false; - bool bWillCommit = false; - bool bFieldFull = false; - bool bRC = true; - int nSelEnd = 0; - int nSelStart = 0; - WideString sChange; - WideString sChangeEx; - WideString sValue; + bool modifier = false; + bool shift = false; + bool key_down = false; + bool will_commit = false; + bool field_full = false; + bool rc = true; + int sel_start = 0; + int sel_end = 0; + WideString change; + WideString change_ex; + WideString value; }; #endif // FPDFSDK_FORMFILLER_CFFL_FIELDACTION_H_ diff --git a/fpdfsdk/formfiller/cffl_formfield.cpp b/fpdfsdk/formfiller/cffl_formfield.cpp index 790ad3e878..ccef4c3785 100644 --- a/fpdfsdk/formfiller/cffl_formfield.cpp +++ b/fpdfsdk/formfiller/cffl_formfield.cpp @@ -583,7 +583,7 @@ void CFFL_FormField::SetChangeMark() { void CFFL_FormField::GetActionData(const CPDFSDK_PageView* pPageView, CPDF_AAction::AActionType type, CFFL_FieldAction& fa) { - fa.sValue = widget_->GetValue(); + fa.value = widget_->GetValue(); } void CFFL_FormField::SetActionData(const CPDFSDK_PageView* pPageView, diff --git a/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp b/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp index b041ff7e58..22e1a0bc00 100644 --- a/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp +++ b/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp @@ -108,12 +108,11 @@ void CFFL_InteractiveFormFiller::OnMouseEnter( pWidget->set_appearance_modified(false); DCHECK(pPageView); { - AutoRestorer restorer(¬ifying_); - notifying_ = true; - - CFFL_FieldAction fa; - fa.bModifier = CPWL_Wnd::IsCTRLKeyDown(nFlag); - fa.bShift = CPWL_Wnd::IsSHIFTKeyDown(nFlag); + CFFL_FieldAction fa = { + .modifier = CPWL_Wnd::IsCTRLKeyDown(nFlag), + .shift = CPWL_Wnd::IsSHIFTKeyDown(nFlag), + }; + AutoRestorer restorer(¬ifying_, true); pWidget->OnAAction(CPDF_AAction::kCursorEnter, &fa, pPageView); } if (!pWidget) { @@ -144,12 +143,11 @@ void CFFL_InteractiveFormFiller::OnMouseExit( pWidget->set_appearance_modified(false); DCHECK(pPageView); { - AutoRestorer restorer(¬ifying_); - notifying_ = true; - - CFFL_FieldAction fa; - fa.bModifier = CPWL_Wnd::IsCTRLKeyDown(nFlag); - fa.bShift = CPWL_Wnd::IsSHIFTKeyDown(nFlag); + CFFL_FieldAction fa = { + .modifier = CPWL_Wnd::IsCTRLKeyDown(nFlag), + .shift = CPWL_Wnd::IsSHIFTKeyDown(nFlag), + }; + AutoRestorer restorer(¬ifying_, true); pWidget->OnAAction(CPDF_AAction::kCursorExit, &fa, pPageView); } if (!pWidget) { @@ -182,12 +180,11 @@ bool CFFL_InteractiveFormFiller::OnLButtonDown( pWidget->set_appearance_modified(false); DCHECK(pPageView); { - AutoRestorer restorer(¬ifying_); - notifying_ = true; - - CFFL_FieldAction fa; - fa.bModifier = CPWL_Wnd::IsCTRLKeyDown(nFlags); - fa.bShift = CPWL_Wnd::IsSHIFTKeyDown(nFlags); + CFFL_FieldAction fa = { + .modifier = CPWL_Wnd::IsCTRLKeyDown(nFlags), + .shift = CPWL_Wnd::IsSHIFTKeyDown(nFlags), + }; + AutoRestorer restorer(¬ifying_, true); pWidget->OnAAction(CPDF_AAction::kButtonDown, &fa, pPageView); } if (!pWidget) { @@ -265,16 +262,15 @@ bool CFFL_InteractiveFormFiller::OnButtonUp( return false; } + DCHECK(pPageView); uint32_t nAge = pWidget->GetAppearanceAge(); uint32_t nValueAge = pWidget->GetValueAge(); - DCHECK(pPageView); { - AutoRestorer restorer(¬ifying_); - notifying_ = true; - - CFFL_FieldAction fa; - fa.bModifier = CPWL_Wnd::IsCTRLKeyDown(nFlag); - fa.bShift = CPWL_Wnd::IsSHIFTKeyDown(nFlag); + CFFL_FieldAction fa = { + .modifier = CPWL_Wnd::IsCTRLKeyDown(nFlag), + .shift = CPWL_Wnd::IsSHIFTKeyDown(nFlag), + }; + AutoRestorer restorer(¬ifying_, true); pWidget->OnAAction(CPDF_AAction::kButtonUp, &fa, pPageView); } if (!pWidget || !IsValidAnnot(pPageView, pWidget.Get())) { @@ -410,12 +406,11 @@ bool CFFL_InteractiveFormFiller::OnSetFocus( CPDFSDK_PageView* pPageView = pWidget->GetPageView(); DCHECK(pPageView); { - AutoRestorer restorer(¬ifying_); - notifying_ = true; - - CFFL_FieldAction fa; - fa.bModifier = CPWL_Wnd::IsCTRLKeyDown(nFlag); - fa.bShift = CPWL_Wnd::IsSHIFTKeyDown(nFlag); + CFFL_FieldAction fa = { + .modifier = CPWL_Wnd::IsCTRLKeyDown(nFlag), + .shift = CPWL_Wnd::IsSHIFTKeyDown(nFlag), + }; + AutoRestorer restorer(¬ifying_, true); pFormField->GetActionData(pPageView, CPDF_AAction::kGetFocus, fa); pWidget->OnAAction(CPDF_AAction::kGetFocus, &fa, pPageView); } @@ -470,12 +465,11 @@ bool CFFL_InteractiveFormFiller::OnKillFocus( CPDFSDK_PageView* pPageView = pWidget->GetPageView(); DCHECK(pPageView); { - AutoRestorer restorer(¬ifying_); - notifying_ = true; - - CFFL_FieldAction fa; - fa.bModifier = CPWL_Wnd::IsCTRLKeyDown(nFlag); - fa.bShift = CPWL_Wnd::IsSHIFTKeyDown(nFlag); + CFFL_FieldAction fa = { + .modifier = CPWL_Wnd::IsCTRLKeyDown(nFlag), + .shift = CPWL_Wnd::IsSHIFTKeyDown(nFlag), + }; + AutoRestorer restorer(¬ifying_, true); pFormField->GetActionData(pPageView, CPDF_AAction::kLoseFocus, fa); pWidget->OnAAction(CPDF_AAction::kLoseFocus, &fa, pPageView); } @@ -743,16 +737,13 @@ bool CFFL_InteractiveFormFiller::OnKeyStrokeCommit( DCHECK(pPageView); pWidget->set_appearance_modified(false); - AutoRestorer restorer(¬ifying_); - notifying_ = true; - - CFFL_FieldAction fa; - fa.bModifier = CPWL_Wnd::IsCTRLKeyDown(nFlag); - fa.bShift = CPWL_Wnd::IsSHIFTKeyDown(nFlag); - fa.bWillCommit = true; - fa.bKeyDown = true; - fa.bRC = true; - + CFFL_FieldAction fa = { + .modifier = CPWL_Wnd::IsCTRLKeyDown(nFlag), + .shift = CPWL_Wnd::IsSHIFTKeyDown(nFlag), + .key_down = true, + .will_commit = true, + }; + AutoRestorer restorer(¬ifying_, true); CFFL_FormField* pFormField = GetFormField(pWidget.Get()); pFormField->GetActionData(pPageView, CPDF_AAction::kKeyStroke, fa); pFormField->SavePWLWindowState(pPageView); @@ -761,8 +752,7 @@ bool CFFL_InteractiveFormFiller::OnKeyStrokeCommit( if (!pWidget) { return true; } - - return fa.bRC; + return fa.rc; } bool CFFL_InteractiveFormFiller::OnValidate( @@ -780,15 +770,12 @@ bool CFFL_InteractiveFormFiller::OnValidate( DCHECK(pPageView); pWidget->set_appearance_modified(false); - AutoRestorer restorer(¬ifying_); - notifying_ = true; - - CFFL_FieldAction fa; - fa.bModifier = CPWL_Wnd::IsCTRLKeyDown(nFlag); - fa.bShift = CPWL_Wnd::IsSHIFTKeyDown(nFlag); - fa.bKeyDown = true; - fa.bRC = true; - + CFFL_FieldAction fa = { + .modifier = CPWL_Wnd::IsCTRLKeyDown(nFlag), + .shift = CPWL_Wnd::IsSHIFTKeyDown(nFlag), + .key_down = true, + }; + AutoRestorer restorer(¬ifying_, true); CFFL_FormField* pFormField = GetFormField(pWidget.Get()); pFormField->GetActionData(pPageView, CPDF_AAction::kValidate, fa); pFormField->SavePWLWindowState(pPageView); @@ -798,7 +785,7 @@ bool CFFL_InteractiveFormFiller::OnValidate( return true; } - return fa.bRC; + return fa.rc; } void CFFL_InteractiveFormFiller::OnCalculate( @@ -836,13 +823,11 @@ bool CFFL_InteractiveFormFiller::OnClick(ObservedPtr& pWidget, uint32_t nAge = pWidget->GetAppearanceAge(); uint32_t nValueAge = pWidget->GetValueAge(); { - AutoRestorer restorer(¬ifying_); - notifying_ = true; - - CFFL_FieldAction fa; - fa.bModifier = CPWL_Wnd::IsCTRLKeyDown(nFlag); - fa.bShift = CPWL_Wnd::IsSHIFTKeyDown(nFlag); - + CFFL_FieldAction fa = { + .modifier = CPWL_Wnd::IsCTRLKeyDown(nFlag), + .shift = CPWL_Wnd::IsSHIFTKeyDown(nFlag), + }; + AutoRestorer restorer(¬ifying_, true); pWidget->OnXFAAAction(PDFSDK_XFA_Click, &fa, pPageView); } if (!pWidget || !IsValidAnnot(pPageView, pWidget.Get())) { @@ -873,12 +858,11 @@ bool CFFL_InteractiveFormFiller::OnFull(ObservedPtr& pWidget, uint32_t nAge = pWidget->GetAppearanceAge(); uint32_t nValueAge = pWidget->GetValueAge(); { - AutoRestorer restorer(¬ifying_); - notifying_ = true; - - CFFL_FieldAction fa; - fa.bModifier = CPWL_Wnd::IsCTRLKeyDown(nFlag); - fa.bShift = CPWL_Wnd::IsSHIFTKeyDown(nFlag); + CFFL_FieldAction fa = { + .modifier = CPWL_Wnd::IsCTRLKeyDown(nFlag), + .shift = CPWL_Wnd::IsSHIFTKeyDown(nFlag), + }; + AutoRestorer restorer(¬ifying_, true); pWidget->OnXFAAAction(PDFSDK_XFA_Full, &fa, pPageView); } if (!pWidget || !IsValidAnnot(pPageView, pWidget.Get())) { @@ -909,12 +893,11 @@ bool CFFL_InteractiveFormFiller::OnPreOpen(ObservedPtr& pWidget, uint32_t nAge = pWidget->GetAppearanceAge(); uint32_t nValueAge = pWidget->GetValueAge(); { - AutoRestorer restorer(¬ifying_); - notifying_ = true; - - CFFL_FieldAction fa; - fa.bModifier = CPWL_Wnd::IsCTRLKeyDown(nFlag); - fa.bShift = CPWL_Wnd::IsSHIFTKeyDown(nFlag); + CFFL_FieldAction fa = { + .modifier = CPWL_Wnd::IsCTRLKeyDown(nFlag), + .shift = CPWL_Wnd::IsSHIFTKeyDown(nFlag), + }; + AutoRestorer restorer(¬ifying_, true); pWidget->OnXFAAAction(PDFSDK_XFA_PreOpen, &fa, pPageView); } if (!pWidget || !IsValidAnnot(pPageView, pWidget.Get())) { @@ -946,12 +929,11 @@ bool CFFL_InteractiveFormFiller::OnPostOpen( uint32_t nAge = pWidget->GetAppearanceAge(); uint32_t nValueAge = pWidget->GetValueAge(); { - AutoRestorer restorer(¬ifying_); - notifying_ = true; - - CFFL_FieldAction fa; - fa.bModifier = CPWL_Wnd::IsCTRLKeyDown(nFlag); - fa.bShift = CPWL_Wnd::IsSHIFTKeyDown(nFlag); + CFFL_FieldAction fa = { + .modifier = CPWL_Wnd::IsCTRLKeyDown(nFlag), + .shift = CPWL_Wnd::IsSHIFTKeyDown(nFlag), + }; + AutoRestorer restorer(¬ifying_, true); pWidget->OnXFAAAction(PDFSDK_XFA_PostOpen, &fa, pPageView); } if (!pWidget || !IsValidAnnot(pPageView, pWidget.Get())) { @@ -1005,22 +987,18 @@ CFFL_InteractiveFormFiller::OnBeforeKeyStroke( return {true, false}; } - AutoRestorer restorer(¬ifying_); - notifying_ = true; - uint32_t nAge = pWidget->GetAppearanceAge(); uint32_t nValueAge = pWidget->GetValueAge(); - - CFFL_FieldAction fa; - fa.bModifier = CPWL_Wnd::IsCTRLKeyDown(nFlag); - fa.bShift = CPWL_Wnd::IsSHIFTKeyDown(nFlag); - fa.sChange = strChange; - fa.sChangeEx = strChangeEx; - fa.bKeyDown = bKeyDown; - fa.bWillCommit = false; - fa.bRC = true; - fa.nSelStart = nSelStart; - fa.nSelEnd = nSelEnd; + CFFL_FieldAction fa = { + .modifier = CPWL_Wnd::IsCTRLKeyDown(nFlag), + .shift = CPWL_Wnd::IsSHIFTKeyDown(nFlag), + .key_down = bKeyDown, + .sel_start = nSelStart, + .sel_end = nSelEnd, + .change = strChange, + .change_ex = strChangeEx, + }; + AutoRestorer restorer(¬ifying_, true); pFormField->GetActionData(pPageView, CPDF_AAction::kKeyStroke, fa); pFormField->SavePWLWindowState(pPageView); @@ -1046,7 +1024,7 @@ CFFL_InteractiveFormFiller::OnBeforeKeyStroke( pPageView = pPrivateData->GetPageView(); bExit = true; } - if (fa.bRC) { + if (fa.rc) { pFormField->SetActionData(pPageView, CPDF_AAction::kKeyStroke, fa); } else { pFormField->RecreatePWLWindowFromSavedState(pPageView); diff --git a/fpdfsdk/formfiller/cffl_listbox.cpp b/fpdfsdk/formfiller/cffl_listbox.cpp index 12a8857563..9d76623891 100644 --- a/fpdfsdk/formfiller/cffl_listbox.cpp +++ b/fpdfsdk/formfiller/cffl_listbox.cpp @@ -160,13 +160,13 @@ void CFFL_ListBox::GetActionData(const CPDFSDK_PageView* pPageView, switch (type) { case CPDF_AAction::kValidate: if (widget_->GetFieldFlags() & pdfium::form_flags::kChoiceMultiSelect) { - fa.sValue.clear(); + fa.value.clear(); } else { CPWL_ListBox* pListBox = GetPWLListBox(pPageView); if (pListBox) { int32_t nCurSel = pListBox->GetCurSel(); if (nCurSel >= 0) { - fa.sValue = widget_->GetOptionLabel(nCurSel); + fa.value = widget_->GetOptionLabel(nCurSel); } } } @@ -174,11 +174,11 @@ void CFFL_ListBox::GetActionData(const CPDFSDK_PageView* pPageView, case CPDF_AAction::kLoseFocus: case CPDF_AAction::kGetFocus: if (widget_->GetFieldFlags() & pdfium::form_flags::kChoiceMultiSelect) { - fa.sValue.clear(); + fa.value.clear(); } else { int32_t nCurSel = widget_->GetSelectedIndex(0); if (nCurSel >= 0) { - fa.sValue = widget_->GetOptionLabel(nCurSel); + fa.value = widget_->GetOptionLabel(nCurSel); } } break; diff --git a/fpdfsdk/formfiller/cffl_textfield.cpp b/fpdfsdk/formfiller/cffl_textfield.cpp index 9b0d1261b6..bbdf2ae354 100644 --- a/fpdfsdk/formfiller/cffl_textfield.cpp +++ b/fpdfsdk/formfiller/cffl_textfield.cpp @@ -187,22 +187,22 @@ void CFFL_TextField::GetActionData(const CPDFSDK_PageView* pPageView, switch (type) { case CPDF_AAction::kKeyStroke: if (CPWL_Edit* pWnd = GetPWLEdit(pPageView)) { - fa.bFieldFull = pWnd->IsTextFull(); - fa.sValue = pWnd->GetText(); - if (fa.bFieldFull) { - fa.sChange.clear(); - fa.sChangeEx.clear(); + fa.field_full = pWnd->IsTextFull(); + fa.value = pWnd->GetText(); + if (fa.field_full) { + fa.change.clear(); + fa.change_ex.clear(); } } break; case CPDF_AAction::kValidate: if (CPWL_Edit* pWnd = GetPWLEdit(pPageView)) { - fa.sValue = pWnd->GetText(); + fa.value = pWnd->GetText(); } break; case CPDF_AAction::kLoseFocus: case CPDF_AAction::kGetFocus: - fa.sValue = widget_->GetValue(); + fa.value = widget_->GetValue(); break; default: break; @@ -216,8 +216,8 @@ void CFFL_TextField::SetActionData(const CPDFSDK_PageView* pPageView, case CPDF_AAction::kKeyStroke: if (CPWL_Edit* pEdit = GetPWLEdit(pPageView)) { pEdit->SetFocus(); - pEdit->SetSelection(fa.nSelStart, fa.nSelEnd); - pEdit->ReplaceSelection(fa.sChange); + pEdit->SetSelection(fa.sel_start, fa.sel_end); + pEdit->ReplaceSelection(fa.change); } break; default: diff --git a/fpdfsdk/fpdf_edit_embeddertest.cpp b/fpdfsdk/fpdf_edit_embeddertest.cpp index ca1210530a..7cd74389a5 100644 --- a/fpdfsdk/fpdf_edit_embeddertest.cpp +++ b/fpdfsdk/fpdf_edit_embeddertest.cpp @@ -9,8 +9,10 @@ #include #include #include +#include #include #include +#include #include #include @@ -60,17 +62,8 @@ namespace { constexpr wchar_t kBottomText[] = L"I'm at the bottom of the page"; -constexpr char kBottomTextPng[] = "bottom_text"; - -constexpr char kHelloWorldRemovedHelloWorldPng[] = - "hello_world_removed_hello_world"; - constexpr wchar_t kLoadedFontText[] = L"I am testing my loaded font, WEE."; -constexpr char kLoadedTextPng[] = "loaded_text"; - -constexpr char kRedRectanglePng[] = "red_rectangle"; - // In embedded_images.pdf. constexpr char kEmbeddedImage33Checksum[] = "cb3637934bb3b95a6e4ae1ea9eb9e56e"; constexpr char kEmbeddedImage33Png[] = "embedded_images_33"; @@ -487,10 +480,7 @@ TEST_F(FPDFEditEmbedderTest, AddPaths) { EXPECT_TRUE(FPDFPageObj_SetMatrix(red_rect, &matrix)); EXPECT_TRUE(FPDFPage_InsertObject(page.get(), red_rect)); - { - ScopedFPDFBitmap page_bitmap = RenderPage(page.get()); - CompareBitmap(page_bitmap.get(), kRedRectanglePng); - } + CompareDisplayList(RenderPageToDisplayList(page.get()), "red_rectangle"); // Now add to that a green rectangle with some medium alpha FPDF_PAGEOBJECT green_rect = FPDFPageObj_CreateNewRect(100, 100, 40, 40); @@ -549,10 +539,8 @@ TEST_F(FPDFEditEmbedderTest, AddPaths) { EXPECT_TRUE(FPDFPath_SetDrawMode(green_rect, FPDF_FILLMODE_WINDING, 0)); EXPECT_TRUE(FPDFPage_InsertObject(page.get(), green_rect)); - { - ScopedFPDFBitmap page_bitmap = RenderPage(page.get()); - CompareBitmap(page_bitmap.get(), "red_green_rectangles"); - } + CompareDisplayList(RenderPageToDisplayList(page.get()), + "red_green_rectangles"); // Add a black triangle. FPDF_PAGEOBJECT black_path = FPDFPageObj_CreateNewPath(400, 100); @@ -588,10 +576,8 @@ TEST_F(FPDFEditEmbedderTest, AddPaths) { EXPECT_FALSE(FPDFPath_GetPathSegment(black_path, 3)); EXPECT_TRUE(FPDFPage_InsertObject(page.get(), black_path)); - { - ScopedFPDFBitmap page_bitmap = RenderPage(page.get()); - CompareBitmap(page_bitmap.get(), "red_green_rectangles_black_triangle"); - } + CompareDisplayList(RenderPageToDisplayList(page.get()), + "red_green_rectangles_black_triangle"); // Now add a more complex blue path. FPDF_PAGEOBJECT blue_path = FPDFPageObj_CreateNewPath(200, 200); @@ -604,18 +590,13 @@ TEST_F(FPDFEditEmbedderTest, AddPaths) { EXPECT_TRUE(FPDFPath_BezierTo(blue_path, 375, 330, 390, 360, 400, 400)); EXPECT_TRUE(FPDFPath_Close(blue_path)); EXPECT_TRUE(FPDFPage_InsertObject(page.get(), blue_path)); - { - ScopedFPDFBitmap page_bitmap = RenderPage(page.get()); - CompareBitmapWithExpectationSuffix(page_bitmap.get(), "blue_path"); - } + CompareDisplayList(RenderPageToDisplayList(page.get()), "blue_path"); // Now save the result, closing the page and document. EXPECT_TRUE(FPDFPage_GenerateContent(page.get())); EXPECT_TRUE(FPDF_SaveAsCopy(document(), this, 0)); - // Render the saved result. The images will change due to floating point - // precision error. - VerifySavedDocumentWithExpectationSuffix("blue_path"); + VerifySavedDocumentWithDisplayList("blue_path_saved"); } TEST_F(FPDFEditEmbedderTest, ClipPath) { @@ -753,25 +734,20 @@ TEST_F(FPDFEditEmbedderTest, Bug1549) { ASSERT_TRUE(OpenDocument("bug_1549.pdf")); ScopedPage page = LoadScopedPage(0); - { - ScopedFPDFBitmap bitmap = RenderLoadedPage(page.get()); - CompareBitmap(bitmap.get(), "bug_1549"); + CompareDisplayList(RenderLoadedPageToDisplayList(page.get()), "bug_1549"); - ScopedFPDFPageObject obj(FPDFPage_GetObject(page.get(), 0)); - ASSERT_EQ(FPDF_PAGEOBJ_IMAGE, FPDFPageObj_GetType(obj.get())); - ASSERT_TRUE(FPDFPage_RemoveObject(page.get(), obj.get())); - } + ScopedFPDFPageObject obj(FPDFPage_GetObject(page.get(), 0)); + ASSERT_EQ(FPDF_PAGEOBJ_IMAGE, FPDFPageObj_GetType(obj.get())); + ASSERT_TRUE(FPDFPage_RemoveObject(page.get(), obj.get())); ASSERT_TRUE(FPDFPage_GenerateContent(page.get())); - { - ScopedFPDFBitmap bitmap = RenderLoadedPage(page.get()); - CompareBitmap(bitmap.get(), "bug_1549_removed"); - } + CompareDisplayList(RenderLoadedPageToDisplayList(page.get()), + "bug_1549_removed"); ASSERT_TRUE(FPDF_SaveAsCopy(document(), this, 0)); - VerifySavedDocument("bug_1549_removed"); + VerifySavedDocumentWithDisplayList("bug_1549_removed"); } TEST_F(FPDFEditEmbedderTest, SetText) { @@ -867,14 +843,10 @@ TEST_F(FPDFEditEmbedderTest, SetPositions) { } ASSERT_TRUE(FPDFPage_GenerateContent(page.get())); - static constexpr char kExpected[] = "bug_410996566"; - { - ScopedFPDFBitmap bitmap = RenderPage(page.get()); - CompareBitmapWithExpectationSuffix(bitmap.get(), kExpected); - } + CompareDisplayList(RenderPageToDisplayList(page.get()), "bug_410996566"); ASSERT_TRUE(FPDF_SaveAsCopy(document(), this, 0)); - VerifySavedDocumentWithExpectationSuffix(kExpected); + VerifySavedDocumentWithDisplayList("bug_410996566"); } TEST_F(FPDFEditEmbedderTest, SetPositionsZeroFontSize) { @@ -927,17 +899,13 @@ TEST_F(FPDFEditEmbedderTest, SetPositionsVertical) { }); ASSERT_TRUE(FPDFText_SetPositions(page_object, kAbsolutePositions.data(), kAbsolutePositions.size())); - - static constexpr char kExpected[] = "vertical_text_positioned"; - { - ScopedFPDFBitmap bitmap = RenderPage(page.get()); - CompareBitmapWithExpectationSuffix(bitmap.get(), kExpected, - kFuzzyDiffOptions); - } ASSERT_TRUE(FPDFPage_GenerateContent(page.get())); + CompareDisplayList(RenderPageToDisplayList(page.get()), + "vertical_text_positioned"); + ASSERT_TRUE(FPDF_SaveAsCopy(document(), this, 0)); - VerifySavedDocumentWithExpectationSuffix(kExpected, kFuzzyDiffOptions); + VerifySavedDocumentWithDisplayList("vertical_text_positioned"); } TEST_F(FPDFEditEmbedderTest, SetPositionsBengali2) { @@ -978,12 +946,11 @@ TEST_F(FPDFEditEmbedderTest, SetPositionsBengali2) { EXPECT_TRUE(FPDFPage_GenerateContent(page.get())); - static constexpr char kExpected[] = "set_positions_bengali2"; - ScopedFPDFBitmap page_bitmap = RenderPage(page.get()); - CompareBitmapWithExpectationSuffix(page_bitmap.get(), kExpected); + CompareDisplayList(RenderPageToDisplayList(page.get()), + "set_positions_bengali2"); ASSERT_TRUE(FPDF_SaveAsCopy(document(), this, 0)); - VerifySavedDocumentWithExpectationSuffix(kExpected); + VerifySavedDocumentWithDisplayList("set_positions_bengali2"); } TEST_F(FPDFEditEmbedderTest, SetPositionsBengali3) { @@ -1062,13 +1029,11 @@ TEST_F(FPDFEditEmbedderTest, SetPositionsBengali3) { EXPECT_TRUE(FPDFPage_GenerateContent(page.get())); - static constexpr char kExpected[] = "set_positions_bengali3"; - ScopedFPDFBitmap page_bitmap = RenderPage(page.get()); - CompareBitmapWithExpectationSuffix(page_bitmap.get(), kExpected, - kFuzzyDiffOptions); + CompareDisplayList(RenderPageToDisplayList(page.get()), + "set_positions_bengali3"); ASSERT_TRUE(FPDF_SaveAsCopy(document(), this, 0)); - VerifySavedDocumentWithExpectationSuffix(kExpected); + VerifySavedDocumentWithDisplayList("set_positions_bengali3"); } TEST_F(FPDFEditEmbedderTest, SetCharcodesBadParams) { @@ -1279,11 +1244,7 @@ TEST_F(FPDFEditEmbedderTest, RemoveTextObject) { ASSERT_TRUE(page); // Show what the original file looks like. - { - ScopedFPDFBitmap page_bitmap = RenderPage(page.get()); - CompareBitmapWithExpectationSuffix(page_bitmap.get(), - pdfium::kHelloWorldPng); - } + CompareDisplayList(RenderPageToDisplayList(page.get()), "hello_world"); // Check the initial state of the text page as well. `text_page` must be freed // before calling FPDFPage_RemoveObject() below, so ASAN does not report @@ -1306,11 +1267,8 @@ TEST_F(FPDFEditEmbedderTest, RemoveTextObject) { ASSERT_EQ(1, FPDFPage_CountObjects(page.get())); // Verify the "Hello, world!" text is gone. - { - ScopedFPDFBitmap page_bitmap = RenderPage(page.get()); - CompareBitmapWithExpectationSuffix(page_bitmap.get(), - kHelloWorldRemovedHelloWorldPng); - } + CompareDisplayList(RenderPageToDisplayList(page.get()), + "hello_world_removed_hello_world"); // Create a new text page, which has updated results. { @@ -1322,15 +1280,12 @@ TEST_F(FPDFEditEmbedderTest, RemoveTextObject) { // Verify the rendering again after calling FPDFPage_GenerateContent(). ASSERT_TRUE(FPDFPage_GenerateContent(page.get())); - { - ScopedFPDFBitmap page_bitmap = RenderPage(page.get()); - CompareBitmapWithExpectationSuffix(page_bitmap.get(), - kHelloWorldRemovedHelloWorldPng); - } + CompareDisplayList(RenderPageToDisplayList(page.get()), + "hello_world_removed_hello_world"); // Save the document and verify it after reloading. ASSERT_TRUE(FPDF_SaveAsCopy(document(), this, 0)); - VerifySavedDocumentWithExpectationSuffix(kHelloWorldRemovedHelloWorldPng); + VerifySavedDocumentWithDisplayList("hello_world_removed_hello_world"); // Verify removed/renamed resources are no longer there. EXPECT_THAT(GetString(), Not(HasSubstr("/F1"))); @@ -1348,12 +1303,8 @@ TEST_F(FPDFEditEmbedderTest, ASSERT_TRUE(page2); // Show what the original file looks like. - { - ScopedFPDFBitmap page1_bitmap = RenderPage(page1.get()); - CompareBitmapWithExpectationSuffix(page1_bitmap.get(), kHelloWorldPng); - ScopedFPDFBitmap page2_bitmap = RenderPage(page2.get()); - CompareBitmapWithExpectationSuffix(page2_bitmap.get(), kHelloWorldPng); - } + CompareDisplayList(RenderPageToDisplayList(page1.get()), "hello_world"); + CompareDisplayList(RenderPageToDisplayList(page2.get()), "hello_world"); // Get the "Hello, world!" text object from page 1 and remove it. ASSERT_EQ(2, FPDFPage_CountObjects(page1.get())); @@ -1366,33 +1317,27 @@ TEST_F(FPDFEditEmbedderTest, ASSERT_EQ(1, FPDFPage_CountObjects(page1.get())); // Verify the "Hello, world!" text is gone from page 1. - { - ScopedFPDFBitmap page1_bitmap = RenderPage(page1.get()); - CompareBitmapWithExpectationSuffix(page1_bitmap.get(), - kHelloWorldRemovedHelloWorldPng); - ScopedFPDFBitmap page2_bitmap = RenderPage(page2.get()); - CompareBitmapWithExpectationSuffix(page2_bitmap.get(), kHelloWorldPng); - } + CompareDisplayList(RenderPageToDisplayList(page1.get()), + "hello_world_removed_hello_world"); + CompareDisplayList(RenderPageToDisplayList(page2.get()), "hello_world"); // Verify the rendering again after calling FPDFPage_GenerateContent(). ASSERT_TRUE(FPDFPage_GenerateContent(page1.get())); - { - ScopedFPDFBitmap page1_bitmap = RenderPage(page1.get()); - CompareBitmapWithExpectationSuffix(page1_bitmap.get(), - kHelloWorldRemovedHelloWorldPng); - ScopedFPDFBitmap page2_bitmap = RenderPage(page2.get()); - CompareBitmapWithExpectationSuffix(page2_bitmap.get(), kHelloWorldPng); - } + CompareDisplayList(RenderPageToDisplayList(page1.get()), + "hello_world_removed_hello_world"); + CompareDisplayList(RenderPageToDisplayList(page2.get()), "hello_world"); // Save the document and verify it after reloading. ASSERT_TRUE(FPDF_SaveAsCopy(document(), this, 0)); ScopedSavedDoc saved_document = OpenScopedSavedDocument(); ASSERT_TRUE(saved_document); ScopedSavedPage saved_page1 = LoadScopedSavedPage(0); - VerifySavedRenderingWithExpectationSuffix(saved_page1.get(), - kHelloWorldRemovedHelloWorldPng); + ASSERT_TRUE(saved_page1); + VerifySavedRenderingWithDisplayList(saved_page1.get(), + "hello_world_removed_hello_world"); ScopedSavedPage saved_page2 = LoadScopedSavedPage(1); - VerifySavedRenderingWithExpectationSuffix(saved_page2.get(), kHelloWorldPng); + ASSERT_TRUE(saved_page2); + VerifySavedRenderingWithDisplayList(saved_page2.get(), "hello_world"); std::vector split_saved_data = StringSplit(GetString(), '\n'); // Verify removed/renamed resources are in the save PDF the correct number of // times. @@ -1411,12 +1356,8 @@ TEST_F(FPDFEditEmbedderTest, ASSERT_TRUE(page2); // Show what the original file looks like. - { - ScopedFPDFBitmap page1_bitmap = RenderPage(page1.get()); - CompareBitmapWithExpectationSuffix(page1_bitmap.get(), kHelloWorldPng); - ScopedFPDFBitmap page2_bitmap = RenderPage(page2.get()); - CompareBitmapWithExpectationSuffix(page2_bitmap.get(), kHelloWorldPng); - } + CompareDisplayList(RenderPageToDisplayList(page1.get()), "hello_world"); + CompareDisplayList(RenderPageToDisplayList(page2.get()), "hello_world"); // Get the "Hello, world!" text object from page 1 and remove it. ASSERT_EQ(2, FPDFPage_CountObjects(page1.get())); @@ -1429,33 +1370,27 @@ TEST_F(FPDFEditEmbedderTest, ASSERT_EQ(1, FPDFPage_CountObjects(page1.get())); // Verify the "Hello, world!" text is gone from page 1. - { - ScopedFPDFBitmap page1_bitmap = RenderPage(page1.get()); - CompareBitmapWithExpectationSuffix(page1_bitmap.get(), - kHelloWorldRemovedHelloWorldPng); - ScopedFPDFBitmap page2_bitmap = RenderPage(page2.get()); - CompareBitmapWithExpectationSuffix(page2_bitmap.get(), kHelloWorldPng); - } + CompareDisplayList(RenderPageToDisplayList(page1.get()), + "hello_world_removed_hello_world"); + CompareDisplayList(RenderPageToDisplayList(page2.get()), "hello_world"); // Verify the rendering again after calling FPDFPage_GenerateContent(). ASSERT_TRUE(FPDFPage_GenerateContent(page1.get())); - { - ScopedFPDFBitmap page1_bitmap = RenderPage(page1.get()); - CompareBitmapWithExpectationSuffix(page1_bitmap.get(), - kHelloWorldRemovedHelloWorldPng); - ScopedFPDFBitmap page2_bitmap = RenderPage(page2.get()); - CompareBitmapWithExpectationSuffix(page2_bitmap.get(), kHelloWorldPng); - } + CompareDisplayList(RenderPageToDisplayList(page1.get()), + "hello_world_removed_hello_world"); + CompareDisplayList(RenderPageToDisplayList(page2.get()), "hello_world"); // Save the document and verify it after reloading. ASSERT_TRUE(FPDF_SaveAsCopy(document(), this, 0)); ScopedSavedDoc saved_document = OpenScopedSavedDocument(); ASSERT_TRUE(saved_document); ScopedSavedPage saved_page1 = LoadScopedSavedPage(0); - VerifySavedRenderingWithExpectationSuffix(saved_page1.get(), - kHelloWorldRemovedHelloWorldPng); + ASSERT_TRUE(saved_page1); + VerifySavedRenderingWithDisplayList(saved_page1.get(), + "hello_world_removed_hello_world"); ScopedSavedPage saved_page2 = LoadScopedSavedPage(1); - VerifySavedRenderingWithExpectationSuffix(saved_page2.get(), kHelloWorldPng); + ASSERT_TRUE(saved_page2); + VerifySavedRenderingWithDisplayList(saved_page2.get(), "hello_world"); } TEST_F(FPDFEditEmbedderTest, RemoveTextObjectWithTwoPagesSharingResourcesDict) { @@ -1467,12 +1402,8 @@ TEST_F(FPDFEditEmbedderTest, RemoveTextObjectWithTwoPagesSharingResourcesDict) { ASSERT_TRUE(page2); // Show what the original file looks like. - { - ScopedFPDFBitmap page1_bitmap = RenderPage(page1.get()); - CompareBitmapWithExpectationSuffix(page1_bitmap.get(), kHelloWorldPng); - ScopedFPDFBitmap page2_bitmap = RenderPage(page2.get()); - CompareBitmapWithExpectationSuffix(page2_bitmap.get(), kHelloWorldPng); - } + CompareDisplayList(RenderPageToDisplayList(page1.get()), "hello_world"); + CompareDisplayList(RenderPageToDisplayList(page2.get()), "hello_world"); // Get the "Hello, world!" text object from page 1 and remove it. ASSERT_EQ(2, FPDFPage_CountObjects(page1.get())); @@ -1485,33 +1416,27 @@ TEST_F(FPDFEditEmbedderTest, RemoveTextObjectWithTwoPagesSharingResourcesDict) { ASSERT_EQ(1, FPDFPage_CountObjects(page1.get())); // Verify the "Hello, world!" text is gone from page 1 - { - ScopedFPDFBitmap page1_bitmap = RenderPage(page1.get()); - CompareBitmapWithExpectationSuffix(page1_bitmap.get(), - kHelloWorldRemovedHelloWorldPng); - ScopedFPDFBitmap page2_bitmap = RenderPage(page2.get()); - CompareBitmapWithExpectationSuffix(page2_bitmap.get(), kHelloWorldPng); - } + CompareDisplayList(RenderPageToDisplayList(page1.get()), + "hello_world_removed_hello_world"); + CompareDisplayList(RenderPageToDisplayList(page2.get()), "hello_world"); // Verify the rendering again after calling FPDFPage_GenerateContent(). ASSERT_TRUE(FPDFPage_GenerateContent(page1.get())); - { - ScopedFPDFBitmap page1_bitmap = RenderPage(page1.get()); - CompareBitmapWithExpectationSuffix(page1_bitmap.get(), - kHelloWorldRemovedHelloWorldPng); - ScopedFPDFBitmap page2_bitmap = RenderPage(page2.get()); - CompareBitmapWithExpectationSuffix(page2_bitmap.get(), kHelloWorldPng); - } + CompareDisplayList(RenderPageToDisplayList(page1.get()), + "hello_world_removed_hello_world"); + CompareDisplayList(RenderPageToDisplayList(page2.get()), "hello_world"); // Save the document and verify it after reloading. ASSERT_TRUE(FPDF_SaveAsCopy(document(), this, 0)); ScopedSavedDoc saved_document = OpenScopedSavedDocument(); ASSERT_TRUE(saved_document); ScopedSavedPage saved_page1 = LoadScopedSavedPage(0); - VerifySavedRenderingWithExpectationSuffix(saved_page1.get(), - kHelloWorldRemovedHelloWorldPng); + ASSERT_TRUE(saved_page1); + VerifySavedRenderingWithDisplayList(saved_page1.get(), + "hello_world_removed_hello_world"); ScopedSavedPage saved_page2 = LoadScopedSavedPage(1); - VerifySavedRenderingWithExpectationSuffix(saved_page2.get(), kHelloWorldPng); + ASSERT_TRUE(saved_page2); + VerifySavedRenderingWithDisplayList(saved_page2.get(), "hello_world"); } void CheckMarkCounts(FPDF_PAGE page, @@ -1943,14 +1868,9 @@ TEST_F(FPDFEditEmbedderTest, RemoveExistingPageObjectSplitStreamsNotLonely) { } // Verify the "Hello, world!" text is gone. - static constexpr char kHelloWorldSplitStreamsRemovedHelloWorldPng[] = - "hello_world_split_streams_removed_hello_world"; ASSERT_EQ(2, FPDFPage_CountObjects(page.get())); - { - ScopedFPDFBitmap page_bitmap = RenderPage(page.get()); - CompareBitmapWithExpectationSuffix( - page_bitmap.get(), kHelloWorldSplitStreamsRemovedHelloWorldPng); - } + CompareDisplayList(RenderPageToDisplayList(page.get()), + "hello_world_split_streams_removed_hello_world"); // Save the file EXPECT_TRUE(FPDFPage_GenerateContent(page.get())); @@ -1963,11 +1883,8 @@ TEST_F(FPDFEditEmbedderTest, RemoveExistingPageObjectSplitStreamsNotLonely) { ASSERT_TRUE(saved_page); EXPECT_EQ(2, FPDFPage_CountObjects(saved_page.get())); - { - ScopedFPDFBitmap page_bitmap = RenderPage(saved_page.get()); - CompareBitmapWithExpectationSuffix( - page_bitmap.get(), kHelloWorldSplitStreamsRemovedHelloWorldPng); - } + VerifySavedRenderingWithDisplayList( + saved_page.get(), "hello_world_split_streams_removed_hello_world"); } TEST_F(FPDFEditEmbedderTest, RemoveExistingPageObjectSplitStreamsLonely) { @@ -1987,10 +1904,7 @@ TEST_F(FPDFEditEmbedderTest, RemoveExistingPageObjectSplitStreamsLonely) { // Verify the "Greetings, world!" text is gone. ASSERT_EQ(2, FPDFPage_CountObjects(page.get())); - { - ScopedFPDFBitmap page_bitmap = RenderPage(page.get()); - CompareBitmapWithExpectationSuffix(page_bitmap.get(), kHelloWorldPng); - } + CompareDisplayList(RenderPageToDisplayList(page.get()), "hello_world"); // Save the file EXPECT_TRUE(FPDFPage_GenerateContent(page.get())); @@ -2003,10 +1917,7 @@ TEST_F(FPDFEditEmbedderTest, RemoveExistingPageObjectSplitStreamsLonely) { ASSERT_TRUE(saved_page); EXPECT_EQ(2, FPDFPage_CountObjects(saved_page.get())); - { - ScopedFPDFBitmap page_bitmap = RenderPage(saved_page.get()); - CompareBitmapWithExpectationSuffix(page_bitmap.get(), kHelloWorldPng); - } + VerifySavedRenderingWithDisplayList(saved_page.get(), "hello_world"); } TEST_F(FPDFEditEmbedderTest, GetContentStream) { @@ -2094,13 +2005,8 @@ TEST_F(FPDFEditEmbedderTest, RemoveAllFromStream) { } } - static constexpr char kSplitStreamsRemovedStream1Png[] = - "split_streams_removed_stream1"; - { - ScopedFPDFBitmap page_bitmap = RenderPage(page.get()); - CompareBitmapWithExpectationSuffix(page_bitmap.get(), - kSplitStreamsRemovedStream1Png); - } + CompareDisplayList(RenderPageToDisplayList(page.get()), + "split_streams_removed_stream1"); // Save the file EXPECT_TRUE(FPDF_SaveAsCopy(document(), this, 0)); @@ -2127,11 +2033,8 @@ TEST_F(FPDFEditEmbedderTest, RemoveAllFromStream) { } } - { - ScopedFPDFBitmap page_bitmap = RenderPage(saved_page.get()); - CompareBitmapWithExpectationSuffix(page_bitmap.get(), - kSplitStreamsRemovedStream1Png); - } + VerifySavedRenderingWithDisplayList(saved_page.get(), + "split_streams_removed_stream1"); } TEST_F(FPDFEditEmbedderTest, RemoveAllFromSingleStream) { @@ -2163,10 +2066,7 @@ TEST_F(FPDFEditEmbedderTest, RemoveAllFromSingleStream) { ASSERT_EQ(0, FPDFPage_CountObjects(page.get())); - { - ScopedFPDFBitmap page_bitmap = RenderPage(page.get()); - CompareBitmap(page_bitmap.get(), kBlankPage200x200Png); - } + CompareDisplayList(RenderPageToDisplayList(page.get()), "blank_page_200x200"); // Save the file EXPECT_TRUE(FPDF_SaveAsCopy(document(), this, 0)); @@ -2178,10 +2078,7 @@ TEST_F(FPDFEditEmbedderTest, RemoveAllFromSingleStream) { ASSERT_TRUE(saved_page); EXPECT_EQ(0, FPDFPage_CountObjects(saved_page.get())); - { - ScopedFPDFBitmap page_bitmap = RenderPage(saved_page.get()); - CompareBitmap(page_bitmap.get(), kBlankPage200x200Png); - } + VerifySavedRenderingWithDisplayList(saved_page.get(), "blank_page_200x200"); } TEST_F(FPDFEditEmbedderTest, RemoveFirstFromSingleStream) { @@ -2221,11 +2118,8 @@ TEST_F(FPDFEditEmbedderTest, RemoveFirstFromSingleStream) { cpdf_page_object = CPDFPageObjectFromFPDFPageObject(page_object); ASSERT_EQ(0, cpdf_page_object->GetContentStream()); - { - ScopedFPDFBitmap page_bitmap = RenderPage(page.get()); - CompareBitmapWithExpectationSuffix(page_bitmap.get(), - kHelloWorldRemovedHelloWorldPng); - } + CompareDisplayList(RenderPageToDisplayList(page.get()), + "hello_world_removed_hello_world"); // Save the file EXPECT_TRUE(FPDF_SaveAsCopy(document(), this, 0)); @@ -2241,11 +2135,8 @@ TEST_F(FPDFEditEmbedderTest, RemoveFirstFromSingleStream) { ASSERT_TRUE(page_object); cpdf_page_object = CPDFPageObjectFromFPDFPageObject(page_object); ASSERT_EQ(0, cpdf_page_object->GetContentStream()); - { - ScopedFPDFBitmap page_bitmap = RenderPage(saved_page.get()); - CompareBitmapWithExpectationSuffix(page_bitmap.get(), - kHelloWorldRemovedHelloWorldPng); - } + VerifySavedRenderingWithDisplayList(saved_page.get(), + "hello_world_removed_hello_world"); } TEST_F(FPDFEditEmbedderTest, RemoveLastFromSingleStream) { @@ -2285,12 +2176,8 @@ TEST_F(FPDFEditEmbedderTest, RemoveLastFromSingleStream) { cpdf_page_object = CPDFPageObjectFromFPDFPageObject(page_object); ASSERT_EQ(0, cpdf_page_object->GetContentStream()); - using pdfium::kHelloWorldRemovedPng; - { - ScopedFPDFBitmap page_bitmap = RenderPage(page.get()); - CompareBitmapWithExpectationSuffix(page_bitmap.get(), - kHelloWorldRemovedPng); - } + CompareDisplayList(RenderPageToDisplayList(page.get()), + "hello_world_removed"); // Save the file EXPECT_TRUE(FPDF_SaveAsCopy(document(), this, 0)); @@ -2306,11 +2193,7 @@ TEST_F(FPDFEditEmbedderTest, RemoveLastFromSingleStream) { ASSERT_TRUE(page_object); cpdf_page_object = CPDFPageObjectFromFPDFPageObject(page_object); ASSERT_EQ(0, cpdf_page_object->GetContentStream()); - { - ScopedFPDFBitmap page_bitmap = RenderPage(saved_page.get()); - CompareBitmapWithExpectationSuffix(page_bitmap.get(), - kHelloWorldRemovedPng); - } + VerifySavedRenderingWithDisplayList(saved_page.get(), "hello_world_removed"); } TEST_F(FPDFEditEmbedderTest, RemoveAllFromMultipleStreams) { @@ -2340,10 +2223,7 @@ TEST_F(FPDFEditEmbedderTest, RemoveAllFromMultipleStreams) { ASSERT_EQ(0, FPDFPage_CountObjects(page.get())); - { - ScopedFPDFBitmap page_bitmap = RenderPage(page.get()); - CompareBitmap(page_bitmap.get(), kBlankPage200x200Png); - } + CompareDisplayList(RenderPageToDisplayList(page.get()), "blank_page_200x200"); // Save the file EXPECT_TRUE(FPDF_SaveAsCopy(document(), this, 0)); @@ -2355,10 +2235,7 @@ TEST_F(FPDFEditEmbedderTest, RemoveAllFromMultipleStreams) { ASSERT_TRUE(saved_page); EXPECT_EQ(0, FPDFPage_CountObjects(saved_page.get())); - { - ScopedFPDFBitmap page_bitmap = RenderPage(saved_page.get()); - CompareBitmap(page_bitmap.get(), kBlankPage200x200Png); - } + VerifySavedRenderingWithDisplayList(saved_page.get(), "blank_page_200x200"); } TEST_F(FPDFEditEmbedderTest, InsertPageObjectAndSave) { @@ -2689,20 +2566,14 @@ TEST_F(FPDFEditEmbedderTest, AddAndRemovePaths) { EXPECT_TRUE(FPDFPageObj_SetFillColor(red_rect, 255, 0, 0, 255)); EXPECT_TRUE(FPDFPath_SetDrawMode(red_rect, FPDF_FILLMODE_ALTERNATE, 0)); EXPECT_TRUE(FPDFPage_InsertObject(page.get(), red_rect_deleter.release())); - { - ScopedFPDFBitmap page_bitmap = RenderPage(page.get()); - CompareBitmap(page_bitmap.get(), kRedRectanglePng); - } + CompareDisplayList(RenderPageToDisplayList(page.get()), "red_rectangle"); EXPECT_EQ(1, FPDFPage_CountObjects(page.get())); // Remove rectangle and verify it does not render anymore and the bitmap is // back to a blank one. EXPECT_TRUE(FPDFPage_RemoveObject(page.get(), red_rect)); red_rect_deleter.reset(red_rect); - { - ScopedFPDFBitmap page_bitmap = RenderPage(page.get()); - CompareBitmap(page_bitmap.get(), kBlankPage612By792Png); - } + CompareDisplayList(RenderPageToDisplayList(page.get()), "blank_page_612x792"); EXPECT_EQ(0, FPDFPage_CountObjects(page.get())); // Trying to remove an object not in the page should return false. @@ -2964,13 +2835,9 @@ TEST_F(FPDFEditEmbedderTest, AddStandardFontText) { EXPECT_TRUE(FPDFPageObj_SetMatrix(text_object1, &kMatrix1)); EXPECT_TRUE(FPDFPage_InsertObject(page.get(), text_object1)); EXPECT_TRUE(FPDFPage_GenerateContent(page.get())); - { - ScopedFPDFBitmap page_bitmap = RenderPage(page.get()); - CompareBitmapWithExpectationSuffix(page_bitmap.get(), kBottomTextPng); - - EXPECT_TRUE(FPDF_SaveAsCopy(document(), this, 0)); - VerifySavedDocumentWithExpectationSuffix(kBottomTextPng); - } + CompareDisplayList(RenderPageToDisplayList(page.get()), "bottom_text"); + EXPECT_TRUE(FPDF_SaveAsCopy(document(), this, 0)); + VerifySavedDocumentWithDisplayList("bottom_text"); // Try another font FPDF_PAGEOBJECT text_object2 = @@ -2982,16 +2849,10 @@ TEST_F(FPDFEditEmbedderTest, AddStandardFontText) { FPDFPageObj_Transform(text_object2, 1, 0, 0, 1, 100, 600); EXPECT_TRUE(FPDFPage_InsertObject(page.get(), text_object2)); EXPECT_TRUE(FPDFPage_GenerateContent(page.get())); - { - static constexpr char kBottomTextAddedBoldTextPng[] = - "bottom_text_added_bold_text"; - ScopedFPDFBitmap page_bitmap = RenderPage(page.get()); - CompareBitmapWithExpectationSuffix(page_bitmap.get(), - kBottomTextAddedBoldTextPng); - - EXPECT_TRUE(FPDF_SaveAsCopy(document(), this, 0)); - VerifySavedDocumentWithExpectationSuffix(kBottomTextAddedBoldTextPng); - } + CompareDisplayList(RenderPageToDisplayList(page.get()), + "bottom_text_added_bold_text"); + EXPECT_TRUE(FPDF_SaveAsCopy(document(), this, 0)); + VerifySavedDocumentWithDisplayList("bottom_text_added_bold_text"); // And some randomly transformed text FPDF_PAGEOBJECT text_object3 = @@ -3002,17 +2863,11 @@ TEST_F(FPDFEditEmbedderTest, AddStandardFontText) { FPDFPageObj_Transform(text_object3, 1, 1.5, 2, 0.5, 200, 200); EXPECT_TRUE(FPDFPage_InsertObject(page.get(), text_object3)); EXPECT_TRUE(FPDFPage_GenerateContent(page.get())); - { - static constexpr char kBottomTextAddedBoldAndStretchedTextPng[] = - "bottom_text_added_bold_and_stretched_text"; - ScopedFPDFBitmap page_bitmap = RenderPage(page.get()); - CompareBitmapWithExpectationSuffix(page_bitmap.get(), - kBottomTextAddedBoldAndStretchedTextPng); - - EXPECT_TRUE(FPDF_SaveAsCopy(document(), this, 0)); - VerifySavedDocumentWithExpectationSuffix( - kBottomTextAddedBoldAndStretchedTextPng); - } + CompareDisplayList(RenderPageToDisplayList(page.get()), + "bottom_text_added_bold_and_stretched_text"); + EXPECT_TRUE(FPDF_SaveAsCopy(document(), this, 0)); + VerifySavedDocumentWithDisplayList( + "bottom_text_added_bold_and_stretched_text"); FS_MATRIX matrix; @@ -3538,8 +3393,7 @@ TEST_F(FPDFEditEmbedderTest, AddStandardFontText2) { EXPECT_TRUE(FPDFText_SetText(text_object, text.get())); FPDFPageObj_Transform(text_object, 1, 0, 0, 1, 20, 20); EXPECT_TRUE(FPDFPage_InsertObject(page.get(), text_object)); - ScopedFPDFBitmap page_bitmap = RenderPage(page.get()); - CompareBitmapWithExpectationSuffix(page_bitmap.get(), kBottomTextPng); + CompareDisplayList(RenderPageToDisplayList(page.get()), "bottom_text"); } TEST_F(FPDFEditEmbedderTest, LoadStandardFonts) { @@ -3642,9 +3496,6 @@ TEST_F(FPDFEditEmbedderTest, GraphicsData) { } TEST_F(FPDFEditEmbedderTest, DoubleGenerating) { - static constexpr char kRedRectangleAlphaPng[] = "red_rectangle_alpha"; - static constexpr char kBlueRectangleAlphaPng[] = "blue_rectangle_alpha"; - // Start with a blank page ScopedFPDFPage page(FPDFPage_New(CreateNewDocument(), 0, 612, 792)); @@ -3663,11 +3514,8 @@ TEST_F(FPDFEditEmbedderTest, DoubleGenerating) { EXPECT_THAT(graphics_dict->GetKeys(), UnorderedElementsAreArray({"FXE1", "FXE2"})); - // Check the bitmap - { - ScopedFPDFBitmap page_bitmap = RenderPage(page.get()); - CompareBitmap(page_bitmap.get(), kRedRectangleAlphaPng); - } + CompareDisplayList(RenderPageToDisplayList(page.get()), + "red_rectangle_alpha"); // Never mind, my new favorite color is blue, increase alpha. // The red graphics state goes away. The remaining generated resource name is @@ -3678,20 +3526,15 @@ TEST_F(FPDFEditEmbedderTest, DoubleGenerating) { EXPECT_THAT(graphics_dict->GetKeys(), SizeIs(2)); EXPECT_TRUE(graphics_dict->KeyExist("FXE1")); - // Check that bitmap displays changed content - { - ScopedFPDFBitmap page_bitmap = RenderPage(page.get()); - CompareBitmap(page_bitmap.get(), kBlueRectangleAlphaPng); - } + CompareDisplayList(RenderPageToDisplayList(page.get()), + "blue_rectangle_alpha"); // And now generate, without changes EXPECT_TRUE(FPDFPage_GenerateContent(page.get())); EXPECT_THAT(graphics_dict->GetKeys(), SizeIs(2)); EXPECT_TRUE(graphics_dict->KeyExist("FXE1")); - { - ScopedFPDFBitmap page_bitmap = RenderPage(page.get()); - CompareBitmap(page_bitmap.get(), kBlueRectangleAlphaPng); - } + CompareDisplayList(RenderPageToDisplayList(page.get()), + "blue_rectangle_alpha"); // Add some text to the page, which starts out with no fonts. RetainPtr font_dict = @@ -3902,8 +3745,7 @@ TEST_F(FPDFEditEmbedderTest, AddTrueTypeFontText) { EXPECT_TRUE(FPDFText_SetText(text_object, text.get())); FPDFPageObj_Transform(text_object, 1, 0, 0, 1, 400, 400); EXPECT_TRUE(FPDFPage_InsertObject(page.get(), text_object)); - ScopedFPDFBitmap page_bitmap = RenderPage(page.get()); - CompareBitmapWithExpectationSuffix(page_bitmap.get(), kLoadedTextPng); + CompareDisplayList(RenderPageToDisplayList(page.get()), "loaded_text"); // Add some more text, same font FPDF_PAGEOBJECT text_object2 = @@ -3913,14 +3755,12 @@ TEST_F(FPDFEditEmbedderTest, AddTrueTypeFontText) { FPDFPageObj_Transform(text_object2, 1, 0, 0, 1, 200, 200); EXPECT_TRUE(FPDFPage_InsertObject(page.get(), text_object2)); } - static constexpr char kTruetypeFontTextPng[] = "truetype_font_text"; - ScopedFPDFBitmap page_bitmap2 = RenderPage(page.get()); - CompareBitmapWithExpectationSuffix(page_bitmap2.get(), kTruetypeFontTextPng); + CompareDisplayList(RenderPageToDisplayList(page.get()), "truetype_font_text"); EXPECT_TRUE(FPDFPage_GenerateContent(page.get())); EXPECT_TRUE(FPDF_SaveAsCopy(document(), this, 0)); - VerifySavedDocumentWithExpectationSuffix(kTruetypeFontTextPng); + VerifySavedDocumentWithDisplayList("truetype_font_text"); } TEST_F(FPDFEditEmbedderTest, TransformAnnot) { @@ -3982,19 +3822,14 @@ TEST_F(FPDFEditEmbedderTest, AddCIDFontText) { EXPECT_TRUE(FPDFPage_InsertObject(page.get(), text_object2)); } - // Check that the text renders properly. - static constexpr char kJapaneseCidFontTextPng[] = "japanese_cid_font_text"; - { - ScopedFPDFBitmap page_bitmap = RenderPage(page.get()); - CompareBitmapWithExpectationSuffix(page_bitmap.get(), - kJapaneseCidFontTextPng); - } + CompareDisplayList(RenderPageToDisplayList(page.get()), + "japanese_cid_font_text"); // Save the document. EXPECT_TRUE(FPDFPage_GenerateContent(page.get())); EXPECT_TRUE(FPDF_SaveAsCopy(document(), this, 0)); - VerifySavedDocumentWithExpectationSuffix(kJapaneseCidFontTextPng); + VerifySavedDocumentWithDisplayList("japanese_cid_font_text"); } #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) @@ -4462,11 +4297,8 @@ TEST_F(FPDFEditEmbedderTest, AddMarkedText) { EXPECT_EQ(kBlobLen, out_buffer_len); EXPECT_EQ(pdfium::span(kBlobData), blob_buffer); - // Render and check the bitmap is the expected one. - { - ScopedFPDFBitmap page_bitmap = RenderPage(page.get()); - CompareBitmapWithExpectationSuffix(page_bitmap.get(), kLoadedTextPng); - } + // Render and check the display list is the expected one. + CompareDisplayList(RenderPageToDisplayList(page.get()), "loaded_text"); // Now save the result. EXPECT_EQ(1, FPDFPage_CountObjects(page.get())); @@ -4532,11 +4364,8 @@ TEST_F(FPDFEditEmbedderTest, AddMarkedTextWithFloat) { EXPECT_TRUE(FPDFPageObjMark_GetParamFloatValue(mark, "Pi", &float_value)); EXPECT_FLOAT_EQ(3.14159f, float_value); - // Render and check the bitmap is the expected one. - { - ScopedFPDFBitmap page_bitmap = RenderPage(page.get()); - CompareBitmapWithExpectationSuffix(page_bitmap.get(), kLoadedTextPng); - } + // Render and check the display list is the expected one. + CompareDisplayList(RenderPageToDisplayList(page.get()), "loaded_text"); // Now save the result. EXPECT_EQ(1, FPDFPage_CountObjects(page.get())); @@ -5929,7 +5758,7 @@ TEST_F(FPDFEditEmbedderTest, FormModifyObject) { // Save the document to the internal buffer EXPECT_TRUE(FPDF_SaveAsCopy(document(), this, 0)); - VerifySavedDocument("form_object_with_image_removed_image"); + VerifySavedDocumentWithDisplayList("form_object_with_image_removed_image"); } // Paths parsed under one `cm` store their matrix once; transforming one of them @@ -5991,14 +5820,10 @@ TEST_F(FPDFEditEmbedderTest, Bug410996566) { } ASSERT_TRUE(FPDFPage_GenerateContent(page.get())); - static constexpr char kExpected[] = "bug_410996566"; - { - ScopedFPDFBitmap bitmap = RenderPage(page.get()); - CompareBitmapWithExpectationSuffix(bitmap.get(), kExpected); - } + CompareDisplayList(RenderPageToDisplayList(page.get()), "bug_410996566"); ASSERT_TRUE(FPDF_SaveAsCopy(document(), this, 0)); - VerifySavedDocumentWithExpectationSuffix(kExpected); + VerifySavedDocumentWithDisplayList("bug_410996566"); } TEST_F(FPDFEditEmbedderTest, Bug461845674) { diff --git a/fpdfsdk/fpdf_formfill_embeddertest.cpp b/fpdfsdk/fpdf_formfill_embeddertest.cpp index 284d00bf27..a130f75d1c 100644 --- a/fpdfsdk/fpdf_formfill_embeddertest.cpp +++ b/fpdfsdk/fpdf_formfill_embeddertest.cpp @@ -1371,16 +1371,11 @@ TEST_F(FPDFFormFillEmbedderTest, Bug1477093) { #endif // PDF_ENABLE_V8 TEST_F(FPDFFormFillEmbedderTest, FormText) { - static constexpr char kFocusedTextFormWithAbcPng[] = - "focused_text_form_with_abc"; - static constexpr char kUnfocusedTextFormWithAbcPng[] = - "unfocused_text_form_with_abc"; { ASSERT_TRUE(OpenDocument("text_form.pdf")); ScopedPage page = LoadScopedPage(0); ASSERT_TRUE(page); - ScopedFPDFBitmap bitmap1 = RenderLoadedPage(page.get()); - CompareBitmapWithExpectationSuffix(bitmap1.get(), kTextFormPng); + CompareDisplayList(RenderLoadedPageToDisplayList(page.get()), "text_form"); // Click on the textfield EXPECT_EQ( @@ -1396,30 +1391,27 @@ TEST_F(FPDFFormFillEmbedderTest, FormText) { FORM_OnChar(form_handle(), page.get(), 'A', 0); FORM_OnChar(form_handle(), page.get(), 'B', 0); FORM_OnChar(form_handle(), page.get(), 'C', 0); - ScopedFPDFBitmap bitmap2 = RenderLoadedPage(page.get()); - CompareBitmapWithExpectationSuffix(bitmap2.get(), - kFocusedTextFormWithAbcPng); + CompareDisplayList(RenderLoadedPageToDisplayList(page.get()), + "focused_text_form_with_abc"); // Focus remains despite right clicking out of the textfield FORM_OnMouseMove(form_handle(), page.get(), 0, 15.0, 15.0); FORM_OnRButtonDown(form_handle(), page.get(), 0, 15.0, 15.0); FORM_OnRButtonUp(form_handle(), page.get(), 0, 15.0, 15.0); - ScopedFPDFBitmap bitmap3 = RenderLoadedPage(page.get()); - CompareBitmapWithExpectationSuffix(bitmap3.get(), - kFocusedTextFormWithAbcPng); + CompareDisplayList(RenderLoadedPageToDisplayList(page.get()), + "focused_text_form_with_abc"); // Take out focus by clicking out of the textfield FORM_OnMouseMove(form_handle(), page.get(), 0, 15.0, 15.0); FORM_OnLButtonDown(form_handle(), page.get(), 0, 15.0, 15.0); FORM_OnLButtonUp(form_handle(), page.get(), 0, 15.0, 15.0); - ScopedFPDFBitmap bitmap4 = RenderLoadedPage(page.get()); - CompareBitmapWithExpectationSuffix(bitmap4.get(), - kUnfocusedTextFormWithAbcPng); + CompareDisplayList(RenderLoadedPageToDisplayList(page.get()), + "unfocused_text_form_with_abc"); EXPECT_TRUE(FPDF_SaveAsCopy(document(), this, 0)); } // Check saved document - VerifySavedDocumentWithExpectationSuffix(kUnfocusedTextFormWithAbcPng); + VerifySavedDocumentWithDisplayList("unfocused_text_form_with_abc"); } // Tests using FPDF_REVERSE_BYTE_ORDER with FPDF_FFLDraw(). The two rendered @@ -1440,23 +1432,19 @@ TEST_F(FPDFFormFillEmbedderTest, Bug1281) { } TEST_F(FPDFFormFillEmbedderTest, Bug1302455RenderOnly) { - static constexpr char kBug1302455ReadOnlyPng[] = "bug_1302455_read_only"; { ASSERT_TRUE(OpenDocument("bug_1302455.pdf")); ScopedPage page = LoadScopedPage(0); ASSERT_TRUE(page); - - ScopedFPDFBitmap bitmap = RenderLoadedPage(page.get()); - CompareBitmapWithExpectationSuffix(bitmap.get(), kBug1302455ReadOnlyPng); + CompareDisplayList(RenderLoadedPageToDisplayList(page.get()), + "bug_1302455_read_only"); EXPECT_TRUE(FPDF_SaveAsCopy(document(), this, 0)); } - VerifySavedDocumentWithExpectationSuffix(kBug1302455ReadOnlyPng); + VerifySavedDocumentWithDisplayList("bug_1302455_read_only"); } TEST_F(FPDFFormFillEmbedderTest, Bug1302455EditFirstForm) { - static constexpr char kBug1302455EditFirstFormPng[] = - "bug_1302455_edit_first_form"; { ASSERT_TRUE(OpenDocument("bug_1302455.pdf")); ScopedPage page = LoadScopedPage(0); @@ -1471,18 +1459,15 @@ TEST_F(FPDFFormFillEmbedderTest, Bug1302455EditFirstForm) { FORM_OnChar(form_handle(), page.get(), 'A', 0); FORM_ForceToKillFocus(form_handle()); - ScopedFPDFBitmap bitmap = RenderLoadedPage(page.get()); - CompareBitmapWithExpectationSuffix(bitmap.get(), - kBug1302455EditFirstFormPng); + CompareDisplayList(RenderLoadedPageToDisplayList(page.get()), + "bug_1302455_edit_first_form"); EXPECT_TRUE(FPDF_SaveAsCopy(document(), this, 0)); } - VerifySavedDocumentWithExpectationSuffix(kBug1302455EditFirstFormPng); + VerifySavedDocumentWithDisplayList("bug_1302455_edit_first_form"); } TEST_F(FPDFFormFillEmbedderTest, Bug1302455EditSecondForm) { - static constexpr char kBug1302455EditSecondFormPng[] = - "bug_1302455_edit_second_form"; { ASSERT_TRUE(OpenDocument("bug_1302455.pdf")); ScopedPage page = LoadScopedPage(0); @@ -1497,18 +1482,15 @@ TEST_F(FPDFFormFillEmbedderTest, Bug1302455EditSecondForm) { FORM_OnChar(form_handle(), page.get(), 'B', 0); FORM_ForceToKillFocus(form_handle()); - ScopedFPDFBitmap bitmap = RenderLoadedPage(page.get()); - CompareBitmapWithExpectationSuffix(bitmap.get(), - kBug1302455EditSecondFormPng); + CompareDisplayList(RenderLoadedPageToDisplayList(page.get()), + "bug_1302455_edit_second_form"); EXPECT_TRUE(FPDF_SaveAsCopy(document(), this, 0)); } - VerifySavedDocumentWithExpectationSuffix(kBug1302455EditSecondFormPng); + VerifySavedDocumentWithDisplayList("bug_1302455_edit_second_form"); } TEST_F(FPDFFormFillEmbedderTest, Bug1302455EditBothForms) { - static constexpr char kBug1302455EditBothFormsPng[] = - "bug_1302455_edit_both_forms"; { ASSERT_TRUE(OpenDocument("bug_1302455.pdf")); ScopedPage page = LoadScopedPage(0); @@ -1531,31 +1513,28 @@ TEST_F(FPDFFormFillEmbedderTest, Bug1302455EditBothForms) { FORM_OnChar(form_handle(), page.get(), 'B', 0); FORM_ForceToKillFocus(form_handle()); - ScopedFPDFBitmap bitmap = RenderLoadedPage(page.get()); - CompareBitmapWithExpectationSuffix(bitmap.get(), - kBug1302455EditBothFormsPng); + CompareDisplayList(RenderLoadedPageToDisplayList(page.get()), + "bug_1302455_edit_both_forms"); EXPECT_TRUE(FPDF_SaveAsCopy(document(), this, 0)); } - VerifySavedDocumentWithExpectationSuffix(kBug1302455EditBothFormsPng); + VerifySavedDocumentWithDisplayList("bug_1302455_edit_both_forms"); } TEST_F(FPDFFormFillEmbedderTest, RemoveFormFieldHighlight) { ASSERT_TRUE(OpenDocument("text_form.pdf")); ScopedPage page = LoadScopedPage(0); ASSERT_TRUE(page); - ScopedFPDFBitmap bitmap1 = RenderLoadedPage(page.get()); - CompareBitmapWithExpectationSuffix(bitmap1.get(), kTextFormPng); + CompareDisplayList(RenderLoadedPageToDisplayList(page.get()), "text_form"); // Removing the highlight changes the rendering. FPDF_RemoveFormFieldHighlight(form_handle()); - ScopedFPDFBitmap bitmap2 = RenderLoadedPage(page.get()); - CompareBitmapWithExpectationSuffix(bitmap2.get(), "text_form_no_highlight"); + CompareDisplayList(RenderLoadedPageToDisplayList(page.get()), + "text_form_no_highlight"); // Restoring it gives the original rendering. SetInitialFormFieldHighlight(form_handle()); - ScopedFPDFBitmap bitmap3 = RenderLoadedPage(page.get()); - CompareBitmapWithExpectationSuffix(bitmap3.get(), kTextFormPng); + CompareDisplayList(RenderLoadedPageToDisplayList(page.get()), "text_form"); } TEST_F(FPDFFormFillEmbedderTest, HasFormInfoNone) { @@ -1719,9 +1698,7 @@ TEST_F(FPDFFormFillTextFormEmbedderTest, FormTextFieldBiDiLiveEdit) { constexpr auto kInput = std::to_array({'A', ' ', 0x05E9, ' ', 0x05DE, ' ', 'B'}); TypeCharactersIntoTextField(kInput, RegularFormBegin()); - - ScopedFPDFBitmap bitmap = RenderLoadedPage(page()); - CompareBitmapWithExpectationSuffix(bitmap.get(), "bug_535730401"); + CompareDisplayList(RenderLoadedPageToDisplayList(page()), "bug_535730401"); } TEST_F(FPDFFormFillTextFormEmbedderTest, GetSelectedTextEmptyAndBasicKeyboard) { @@ -1802,9 +1779,8 @@ TEST_F(FPDFFormFillComboBoxFormEmbedderTest, FormComboBoxBiDiLiveEdit) { constexpr auto kInput = std::to_array({'A', ' ', 0x05E9, ' ', 0x05DE, ' ', 'B'}); TypeCharactersIntoTextField(kInput, EditableFormBegin()); - - ScopedFPDFBitmap bitmap = RenderLoadedPage(page()); - CompareBitmapWithExpectationSuffix(bitmap.get(), "bug_535730401_combobox"); + CompareDisplayList(RenderLoadedPageToDisplayList(page()), + "bug_535730401_combobox"); } TEST_F(FPDFFormFillComboBoxFormEmbedderTest, diff --git a/fpdfsdk/fpdf_save_embeddertest.cpp b/fpdfsdk/fpdf_save_embeddertest.cpp index 105484fdb3..898398489e 100644 --- a/fpdfsdk/fpdf_save_embeddertest.cpp +++ b/fpdfsdk/fpdf_save_embeddertest.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include "core/fxcrt/fx_coordinates.h" @@ -324,7 +325,6 @@ TEST_F(FPDFSaveEmbedderTest, IncrementalSaveWithModifications) { class FPDFSaveWithFontSubsetEmbedderTest : public FPDFSaveEmbedderTest { public: - static constexpr char kSaveNewTextFilename[] = "save_new_text"; static constexpr std::array kExpectedSingleTextAdded = { // "Hello, world!\r\n" 'H', 'e', 'l', 'l', 'o', ',', ' ', 'w', 'o', 'r', 'l', 'd', '!', '\r', @@ -416,8 +416,8 @@ TEST_F(FPDFSaveWithFontSubsetEmbedderTest, SaveWithoutSubsetWithNewText) { ASSERT_NO_FATAL_FAILURE(InsertNewTextObject( page.get(), font.get(), text.get(), CFX_PointF(10.0f, 10.0f))); - ScopedFPDFBitmap bitmap = RenderLoadedPage(page.get()); - CompareBitmapWithExpectationSuffix(bitmap.get(), kSaveNewTextFilename); + CompareDisplayList(RenderLoadedPageToDisplayList(page.get()), + "save_new_text"); // Verify the file grew enough to include the new text's font data without // depending on exact PDF serialization byte counts. @@ -427,7 +427,7 @@ TEST_F(FPDFSaveWithFontSubsetEmbedderTest, SaveWithoutSubsetWithNewText) { EXPECT_LT(GetString().size(), 10000u); // Verify the text is visible. - VerifySavedDocumentWithExpectationSuffix(kSaveNewTextFilename); + VerifySavedDocumentWithDisplayList("save_new_text"); TestExtractedFont(kExpectedSingleTextAdded); } @@ -445,8 +445,8 @@ TEST_F(FPDFSaveWithFontSubsetEmbedderTest, SaveWithSubsetWithNewText) { ASSERT_NO_FATAL_FAILURE(InsertNewTextObject( page.get(), font.get(), text.get(), CFX_PointF(10.0f, 10.0f))); - ScopedFPDFBitmap bitmap = RenderLoadedPage(page.get()); - CompareBitmapWithExpectationSuffix(bitmap.get(), kSaveNewTextFilename); + CompareDisplayList(RenderLoadedPageToDisplayList(page.get()), + "save_new_text"); // Verify the file size increase is smaller when subsetting the new text's // font, since text only contains a subset of the characters in the test font. @@ -461,7 +461,7 @@ TEST_F(FPDFSaveWithFontSubsetEmbedderTest, SaveWithSubsetWithNewText) { EXPECT_LT(GetString().size(), whole_font_size); // Verify the text is visible. - VerifySavedDocumentWithExpectationSuffix(kSaveNewTextFilename); + VerifySavedDocumentWithDisplayList("save_new_text"); TestExtractedFont(kExpectedSingleTextAdded); } @@ -488,9 +488,8 @@ TEST_F(FPDFSaveWithFontSubsetEmbedderTest, ASSERT_NO_FATAL_FAILURE(InsertNewTextObject( page.get(), font2.get(), text2.get(), CFX_PointF(10.0f, 150.0f))); - constexpr char kSaveMultipleFontsFilename[] = "save_multiple_fonts"; - ScopedFPDFBitmap bitmap = RenderLoadedPage(page.get()); - CompareBitmapWithExpectationSuffix(bitmap.get(), kSaveMultipleFontsFilename); + CompareDisplayList(RenderLoadedPageToDisplayList(page.get()), + "save_multiple_fonts"); EXPECT_TRUE(FPDF_SaveAsCopy(document(), this, FPDF_SUBSET_NEW_FONTS)); EXPECT_THAT(GetString(), StartsWith("%PDF-1.7\r\n")); @@ -499,7 +498,7 @@ TEST_F(FPDFSaveWithFontSubsetEmbedderTest, EXPECT_NEAR(GetString().size(), 12000u, 500u); // Verify the text is visible. - VerifySavedDocumentWithExpectationSuffix(kSaveMultipleFontsFilename); + VerifySavedDocumentWithDisplayList("save_multiple_fonts"); std::vector expected_multiple_text_added; expected_multiple_text_added.reserve(kExpectedSingleTextAdded.size() + diff --git a/fpdfsdk/fpdf_view_embeddertest.cpp b/fpdfsdk/fpdf_view_embeddertest.cpp index 42bbd3394f..18443141bc 100644 --- a/fpdfsdk/fpdf_view_embeddertest.cpp +++ b/fpdfsdk/fpdf_view_embeddertest.cpp @@ -2233,69 +2233,12 @@ TEST_F(FPDFViewEmbedderTest, DocumentVersionInCatalog) { } TEST_F(FPDFViewEmbedderTest, RenderPageToDisplayList) { - static const char kExpectedDisplayList[] = - "SaveState\n" - "SetBaseClip [0,0,200,300]\n" - "SetClip_PathFill rule=winding matrix=none " - "points=[move(0.0000,300.0000) line(0.0000,0.0000) line(200.0000,0.0000) " - "line(200.0000,300.0000) line(0.0000,300.0000,close)]\n" - "SaveState\n" - "DrawPath fill=0xff000000 stroke=0xff000000 rule=even-odd " - "stroke_state=[width=1.0000 cap=butt join=miter miter=10.0000] " - "matrix=[1.0000,0.0000,0.0000,-1.0000,0.0000,300.0000] " - "points=[move(0.0000,290.0000) line(10.0000,290.0000) " - "line(10.0000,300.0000) " - "line(0.0000,300.0000) line(0.0000,290.0000,close)]\n" - "DrawPath fill=0xff000000 stroke=0xff000000 rule=even-odd " - "stroke_state=[width=1.0000 cap=butt join=miter miter=10.0000] " - "matrix=[1.0000,0.0000,0.0000,-1.0000,0.0000,300.0000] " - "points=[move(10.0000,150.0000) line(60.0000,150.0000) " - "line(60.0000,180.0000) " - "line(10.0000,180.0000) line(10.0000,150.0000,close)]\n" - "DrawPath fill=0xff0000ff stroke=0xff000000 rule=even-odd " - "stroke_state=[width=1.0000 cap=butt join=miter miter=10.0000] " - "matrix=[1.0000,0.0000,0.0000,-1.0000,0.0000,300.0000] " - "points=[move(190.0000,290.0000) line(200.0000,290.0000) " - "line(200.0000,300.0000) " - "line(190.0000,300.0000) line(190.0000,290.0000,close)]\n" - "DrawPath fill=0xff0000ff stroke=0xff000000 rule=even-odd " - "stroke_state=[width=1.0000 cap=butt join=miter miter=10.0000] " - "matrix=[1.0000,0.0000,0.0000,-1.0000,0.0000,300.0000] " - "points=[move(70.0000,232.0000) line(120.0000,232.0000) " - "line(120.0000,262.0000) " - "line(70.0000,262.0000) line(70.0000,232.0000,close)]\n" - "DrawPath fill=0xff00ff00 stroke=0xff000000 rule=even-odd " - "stroke_state=[width=1.0000 cap=butt join=miter miter=10.0000] " - "matrix=[1.0000,0.0000,0.0000,-1.0000,0.0000,300.0000] " - "points=[move(190.0000,0.0000) line(200.0000,0.0000) " - "line(200.0000,10.0000) " - "line(190.0000,10.0000) line(190.0000,0.0000,close)]\n" - "DrawPath fill=0xff00ff00 stroke=0xff000000 rule=even-odd " - "stroke_state=[width=1.0000 cap=butt join=miter miter=10.0000] " - "matrix=[1.0000,0.0000,0.0000,-1.0000,0.0000,300.0000] " - "points=[move(130.0000,150.0000) line(180.0000,150.0000) " - "line(180.0000,180.0000) " - "line(130.0000,180.0000) line(130.0000,150.0000,close)]\n" - "DrawPath fill=0xffff0000 stroke=0xff000000 rule=even-odd " - "stroke_state=[width=1.0000 cap=butt join=miter miter=10.0000] " - "matrix=[1.0000,0.0000,0.0000,-1.0000,0.0000,300.0000] " - "points=[move(0.0000,0.0000) line(10.0000,0.0000) line(10.0000,10.0000) " - "line(0.0000,10.0000) line(0.0000,0.0000,close)]\n" - "DrawPath fill=0xffff0000 stroke=0xff000000 rule=even-odd " - "stroke_state=[width=1.0000 cap=butt join=miter miter=10.0000] " - "matrix=[1.0000,0.0000,0.0000,-1.0000,0.0000,300.0000] " - "points=[move(70.0000,67.0000) line(120.0000,67.0000) " - "line(120.0000,97.0000) " - "line(70.0000,97.0000) line(70.0000,67.0000,close)]\n" - "RestoreState\n" - "RestoreState\n"; - ASSERT_TRUE(OpenDocument("rectangles.pdf")); ScopedPage page = LoadScopedPage(0); ASSERT_TRUE(page); std::string display_list = RenderPageToDisplayList(page.get()); - EXPECT_EQ(kExpectedDisplayList, display_list); + CompareDisplayList(display_list, "rectangles"); } TEST_F(FPDFViewEmbedderTest, RenderHelloWorldToDisplayList) { diff --git a/fpdfsdk/pwl/cpwl_edit_impl.cpp b/fpdfsdk/pwl/cpwl_edit_impl.cpp index ea7239377b..50437a2e11 100644 --- a/fpdfsdk/pwl/cpwl_edit_impl.cpp +++ b/fpdfsdk/pwl/cpwl_edit_impl.cpp @@ -1147,15 +1147,14 @@ void CPWL_EditImpl::SetScrollInfo() { return; } - AutoRestorer restorer(¬ify_flag_); - notify_flag_ = true; - PWL_SCROLL_INFO Info; Info.fPlateWidth = rcPlate.top - rcPlate.bottom; Info.fContentMin = rcContent.bottom; Info.fContentMax = rcContent.top; Info.fSmallStep = rcPlate.Height() / 3; Info.fBigStep = rcPlate.Height(); + + AutoRestorer restorer(¬ify_flag_, true); notify_->SetScrollInfo(Info); } @@ -1184,8 +1183,7 @@ void CPWL_EditImpl::SetScrollPosY(float fy) { if (notify_) { if (!notify_flag_) { - AutoRestorer restorer(¬ify_flag_); - notify_flag_ = true; + AutoRestorer restorer(¬ify_flag_, true); notify_->SetScrollPosition(fy); } } @@ -1295,8 +1293,7 @@ void CPWL_EditImpl::Refresh() { if (notify_) { if (!notify_flag_) { - AutoRestorer restorer(¬ify_flag_); - notify_flag_ = true; + AutoRestorer restorer(¬ify_flag_, true); std::vector* pRects = refresh_.GetRefreshRects(); for (auto& rect : *pRects) { if (!notify_->InvalidateRect(&rect)) { @@ -1368,8 +1365,7 @@ void CPWL_EditImpl::RefreshWordRange(const CPVT_WordRange& wr) { if (notify_) { if (!notify_flag_) { - AutoRestorer restorer(¬ify_flag_); - notify_flag_ = true; + AutoRestorer restorer(¬ify_flag_, true); CFX_FloatRect rcRefresh = VTToEdit(word_rect); if (!notify_->InvalidateRect(&rcRefresh)) { notify_ = nullptr; // Gone, dangling even. @@ -1384,8 +1380,7 @@ void CPWL_EditImpl::RefreshWordRange(const CPVT_WordRange& wr) { if (notify_) { if (!notify_flag_) { - AutoRestorer restorer(¬ify_flag_); - notify_flag_ = true; + AutoRestorer restorer(¬ify_flag_, true); CFX_FloatRect rcRefresh = VTToEdit(rcLine); if (!notify_->InvalidateRect(&rcRefresh)) { notify_ = nullptr; // Gone, dangling even. @@ -1425,8 +1420,7 @@ void CPWL_EditImpl::SetCaretInfo() { ptFoot.y = line.ptLine.y + line.fLineDescent; } - AutoRestorer restorer(¬ify_flag_); - notify_flag_ = true; + AutoRestorer restorer(¬ify_flag_, true); notify_->SetCaret(sel_state_.IsEmpty(), VTToEdit(ptHead), VTToEdit(ptFoot)); } diff --git a/fpdfsdk/pwl/cpwl_scroll_bar.h b/fpdfsdk/pwl/cpwl_scroll_bar.h index 28b6137c89..62942d781d 100644 --- a/fpdfsdk/pwl/cpwl_scroll_bar.h +++ b/fpdfsdk/pwl/cpwl_scroll_bar.h @@ -15,28 +15,17 @@ #include "fpdfsdk/pwl/cpwl_wnd.h" struct PWL_SCROLL_INFO { - public: - PWL_SCROLL_INFO() - : fContentMin(0.0f), - fContentMax(0.0f), - fPlateWidth(0.0f), - fBigStep(0.0f), - fSmallStep(0.0f) {} - friend constexpr bool operator==(const PWL_SCROLL_INFO&, const PWL_SCROLL_INFO&) = default; - float fContentMin; - float fContentMax; - float fPlateWidth; - float fBigStep; - float fSmallStep; + float fContentMin = 0.0f; + float fContentMax = 0.0f; + float fPlateWidth = 0.0f; + float fBigStep = 0.0f; + float fSmallStep = 0.0f; }; struct PWL_FLOATRANGE { - public: - PWL_FLOATRANGE() = default; - friend constexpr bool operator==(const PWL_FLOATRANGE&, const PWL_FLOATRANGE&) = default; @@ -50,7 +39,6 @@ struct PWL_FLOATRANGE { }; struct PWL_SCROLL_PRIVATEDATA { - public: PWL_SCROLL_PRIVATEDATA(); friend constexpr bool operator==(const PWL_SCROLL_PRIVATEDATA&, diff --git a/fxjs/cjs_app.cpp b/fxjs/cjs_app.cpp index f56b06625c..d18663d595 100644 --- a/fxjs/cjs_app.cpp +++ b/fxjs/cjs_app.cpp @@ -282,7 +282,10 @@ CJS_Result CJS_App::beep(CJS_Runtime* pRuntime, type = pRuntime->ToInt32Reentrant(params[0]); } + pRuntime->BeginBlock(); pRuntime->GetFormFillEnv()->JS_appBeep(type); + pRuntime->EndBlock(); + return CJS_Result::Success(); } @@ -579,8 +582,11 @@ CJS_Result CJS_App::response(CJS_Runtime* pRuntime, static constexpr int kMaxWideChars = 1024; static constexpr int kMaxBytes = kMaxWideChars * sizeof(uint16_t); auto buffer = FixedSizeDataVector::Zeroed(kMaxBytes); + + pRuntime->BeginBlock(); int byte_length = pRuntime->GetFormFillEnv()->JS_appResponse( swQuestion, swTitle, swDefault, swLabel, bPassword, buffer.span()); + pRuntime->EndBlock(); if (byte_length < 0 || byte_length > kMaxBytes) { return CJS_Result::Failure(JSMessage::kParamTooLongError); diff --git a/fxjs/cjs_event_context.cpp b/fxjs/cjs_event_context.cpp index f1bd3c7d92..4ce542fec2 100644 --- a/fxjs/cjs_event_context.cpp +++ b/fxjs/cjs_event_context.cpp @@ -34,8 +34,7 @@ std::optional CJS_EventContext::RunScript( JSGetStringFromID(JSMessage::kBusyError)); } - AutoRestorer restorer(&busy_); - busy_ = true; + AutoRestorer restorer(&busy_, true); DCHECK(IsValid()); CJS_Runtime::FieldEvent event(TargetName(), EventKind()); diff --git a/fxjs/cjs_global.h b/fxjs/cjs_global.h index acc0580044..02b5d65cb4 100644 --- a/fxjs/cjs_global.h +++ b/fxjs/cjs_global.h @@ -58,7 +58,7 @@ class CJS_Global final : public CJS_Object { ~CJS_Global() override; private: - struct JSGlobalData : public CFX_Value { + class JSGlobalData : public CFX_Value { public: JSGlobalData(); ~JSGlobalData(); diff --git a/fxjs/cjs_runtime.cpp b/fxjs/cjs_runtime.cpp index 75c55fa339..dc0403ad41 100644 --- a/fxjs/cjs_runtime.cpp +++ b/fxjs/cjs_runtime.cpp @@ -86,6 +86,7 @@ CJS_Runtime::CJS_Runtime(CPDFSDK_FormFillEnvironment* pFormFillEnv) } CJS_Runtime::~CJS_Runtime() { + CHECK(!IsBlocking()); NotifyObservers(); ReleaseEngine(); if (isolate_managed_) { diff --git a/fxjs/xfa/cfxjse_engine.cpp b/fxjs/xfa/cfxjse_engine.cpp index 521026f130..60645070c9 100644 --- a/fxjs/xfa/cfxjse_engine.cpp +++ b/fxjs/xfa/cfxjse_engine.cpp @@ -207,9 +207,7 @@ CFXJSE_Context::ExecutionResult CFXJSE_Engine::RunScript( WideStringView wsScript, CXFA_Object* pThisObject) { CFXJSE_ScopeUtil_IsolateHandleContext scope(GetJseContext()); - AutoRestorer typeRestorer(&script_type_); - script_type_ = eScriptType; - + AutoRestorer typeRestorer(&script_type_, eScriptType); ByteString btScript; if (eScriptType == CXFA_Script::Type::Formcalc) { if (!form_calc_context_) { @@ -760,9 +758,7 @@ CFXJSE_Engine::ResolveObjectsWithBindNode(CXFA_Object* refObject, return std::nullopt; } - AutoRestorer resolving_restorer(&resolving_nodes_); - resolving_nodes_ = true; - + AutoRestorer resolving_restorer(&resolving_nodes_, true); const bool bParentOrSiblings = !!(dwStyles & Mask{XFA_ResolveFlag::kParent, XFA_ResolveFlag::kSiblings}); diff --git a/scripts/embedpdf-runtime/globals-allowlist.txt b/scripts/embedpdf-runtime/globals-allowlist.txt index 0a8d56a54f..2eb485c194 100644 --- a/scripts/embedpdf-runtime/globals-allowlist.txt +++ b/scripts/embedpdf-runtime/globals-allowlist.txt @@ -60,6 +60,12 @@ third-party | icu_[0-9]*::* | ICU: once-initialized data behind umtx; any ICU ve third-party | (anonymous namespace)::g[A-Z]* | ICU: layout property tables, once-initialized. third-party | g[A-Z]* | ICU: data, directory and time zone state, once-initialized. third-party | p[A-Z]* | ICU: allocator and trace hooks, set before use. +third-party | absl::container_internal::kDefaultIterSlot | Abseil hash tables: a sentinel whose address marks a default iterator; never written. +third-party | absl::raw_log_internal::(anonymous namespace)::*_hook | Abseil raw logging: AtomicHook values, changed only by Register*Hook(), which nothing calls. +third-party | hwy::GetChosenTarget()::chosen_target | Highway's dispatch target: its mask is a std::atomic, and every thread computes the same one. +third-party | hwy::supported_mask_ | Highway: written only by DisableTargets(), which nothing calls. +third-party | hwy::supported_targets_for_test_ | Highway: written only by SetSupportedTargetsForTest(), which nothing calls. +third-party | hwy::(anonymous namespace)::Atomic*Func()::func | Highway's warn and abort hooks: std::atomic. third-party | utrace_level | ICU: trace level. third-party | _cms* | lcms: the context pool behind _cmsContextPoolHeadMutex, plugin chunks and constants. third-party | globalContext | lcms: the default context (see the June thread-safety fixes). diff --git a/testing/SUPPRESSIONS b/testing/SUPPRESSIONS index b24ec4ecf8..ebd08760d4 100644 --- a/testing/SUPPRESSIONS +++ b/testing/SUPPRESSIONS @@ -4,21 +4,21 @@ # # List of expectations for tests that do not match their expected images, # one per line. -# There are seven space-separated columns per line +# There are six space-separated columns per line # Each column (except column 0) can contain a comma-separated list of values. # # Column 0: test file name # Column 1: platform: *, win, mac, mac_arm, mac_x86, linux -# Column 2: v8 support: *, nov8, v8 -# Column 3: xfa support: *, noxfa, xfa -# Column 4: rendering support: *, agg, gdi, gdi_agg, gdi_skia, skia -# Column 5: font engine: *, freetype, fontations -# Column 6: action, one of: +# Column 2: engine: *, nov8, v8, xfa +# Column 3: rendering support: *, agg, gdi, gdi_agg, gdi_skia, skia +# Column 4: font engine: *, freetype, fontations +# Column 5: action, one of: # diff - the output differs in a way that no tolerance can bridge, so # the test still runs but never fails, however far off it lands # blank - skip the image comparison entirely # fuzzy - compare with a tolerance, either the defaults or the explicit -# fuzzy=,, (e.g. fuzzy=3,0.05,15.0) +# fuzzy=,,[,] (e.g. fuzzy=3,0.05,15.0 or +# fuzzy=10,0.1,15.0,0.98) # skip - the test is expected to crash, so do not run it at all # # Apart from "skip", every action excuses mismatching output and nothing @@ -31,7 +31,7 @@ # comma-separated values must match in order for the column to "match". # The filenames and keywords are case-sensitive. # One exception is column 1, where "mac" is a shorthand that matches either -# "mac_arm" or "mac_x86". Similarly, "gdi" in column 4 is a shorthand that +# "mac_arm" or "mac_x86". Similarly, "gdi" in column 3 is a shorthand that # matches either "gdi_agg" or "gdi_skia". # # Try to keep the file alphabetized within each category of test. @@ -39,1615 +39,1615 @@ # # Corpus tests # -12.pdf mac * * agg * diff -12.pdf * * * * fontations fuzzy=10,0.1,15 -1_1_textbox.pdf * * * * * diff -1_2_typewriter.pdf * * * * * diff -1_3_callout.pdf * * * * * diff -1_matrix.pdf mac * * agg * diff -1_matrix.pdf * * * * fontations fuzzy=10,0.1,15 -1m_diff_lsjdf.pdf mac * * agg * diff -1m_diff_lsjdf.pdf * * * * fontations fuzzy=10,0.1,15 -1m_same_xxxx.pdf mac * * agg * diff -2_11_stamp3.pdf mac * * agg * diff -2_11_stamp3.pdf * * * * fontations fuzzy=10,0.1,15 -2_11_stamp3.pdf mac * * skia * fuzzy -2_6_textbox.pdf * * * * * diff -2_color_calrgb.pdf mac * * agg * diff -2_color_calrgb.pdf * * * * fontations fuzzy=10,0.1,15 -2_color_indexed.pdf mac * * agg * diff -2_color_indexed.pdf * * * * fontations fuzzy=10,0.1,15 -3_4_textbox.pdf * * * * * diff -3_interpolate_image.pdf mac * * agg * diff -3_interpolate_image.pdf * * * * fontations fuzzy=10,0.1,15 -3_interpolate_image.pdf mac * * skia * fuzzy -3bigpreview.pdf mac * * agg * diff -3bigpreview.pdf * * * * * fuzzy=21,0.15,10.0 -3bigpreview.pdf * * * * fontations fuzzy=25,0.25,15 -4_35.pdf mac * * agg * diff -4_35.pdf * * * * fontations fuzzy=10,0.1,15 -4_39.pdf mac * * agg * diff -4_39.pdf * * * * fontations fuzzy=10,0.1,15 -5.1.pdf mac * * agg * diff -5.1.pdf * * * * fontations fuzzy=10,0.1,15 -5.2.pdf * * * * * diff -5.5_simple_font.pdf mac * * agg * diff -5.5_simple_font.pdf * * * * fontations diff -8.2_name_dest_f_dest.pdf mac * * agg * diff -8.2_name_dest_f_dest.pdf * * * * fontations fuzzy=10,0.1,15 -8.2_outline.pdf mac * * agg * diff -8.2_outline.pdf * * * * fontations fuzzy=10,0.1,15 -8.3_presentation.pdf mac * * agg * diff -8.3_presentation.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_10_8.2.2__T8.3_original_file.pdf * * * * * diff -FRC_11_8.2.2__T8.3_first_last_exchange.pdf * * * * * diff -FRC_12_8.2.2__T8.3_first_outline_obj_ID.pdf * * * * * diff -FRC_13_8.2.2__T8.3_Count_edit300.pdf * * * * * diff -FRC_14_8.2.2__T8.3_Count_edit0.pdf * * * * * diff -FRC_15_8.2.2__T8.3_Count_edit1.pdf * * * * * diff -FRC_16_8.2.2__T8.3_Count_edit_1.pdf * * * * * diff -FRC_1_8.2.2__T8.3_First_empty.pdf * * * * * diff -FRC_2_8.2.2__T8.3_Last_empty.pdf * * * * * diff -FRC_3.5_P__3616_Password_1.pdf * * * * * diff -FRC_3_8.2.2_Type_empty.pdf * * * * * diff -FRC_4_8.2.2__T8.3_Count_empty.pdf * * * * * diff -FRC_5_8.2.2__T8.3_First_remove.pdf * * * * * diff -FRC_6_8.2.2__T8.3_Last_remove.pdf * * * * * diff -FRC_7_8.2.2_Type_remove.pdf * * * * * diff -FRC_8.4.1_Annotations_M.pdf * * * * * diff -FRC_8.4.1_Annotations_NM.pdf * * * * * diff -FRC_8.5_Page_C_SubmitForm.pdf * * * * * diff -FRC_8.5_Page_PI_ResetForm_Phantom.pdf * * * * * diff -FRC_8.5_Widget_F.pdf * nov8 * * * diff -FRC_8.5_Widget_F.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8_8.2.2__T8.3_Count_remove.pdf * * * * * diff -FRC_9_8.2.2__T8.3_remove_first_item.pdf * * * * * diff -action.pdf * * * * * diff -action_execute_a_menu_item.pdf mac * * agg * diff -action_execute_a_menu_item.pdf * * * * fontations fuzzy=10,0.1,15 -action_execute_a_menu_item.pdf mac * * skia * fuzzy -action_hide_show_form.pdf mac * * agg * diff -action_hide_show_form.pdf * * * * fontations fuzzy=10,0.1,15 -action_hide_show_form.pdf mac * * skia * fuzzy -action_on_focus.pdf mac * * agg * diff -action_on_focus.pdf * * * * fontations fuzzy=10,0.1,15 -action_open_a_file.pdf mac * * agg * diff -action_open_a_file.pdf * * * * fontations fuzzy=10,0.1,15 -action_pdf_save_close.pdf mac * * agg * diff -action_pdf_save_close.pdf * * * * fontations fuzzy=10,0.1,15 -action_reset.pdf mac * * agg * diff -action_reset.pdf * * * * fontations fuzzy=10,0.1,15 -action_reset.pdf mac * * skia * fuzzy -action_run_javascript.pdf mac * * agg * diff -action_run_javascript.pdf * * * * fontations fuzzy=10,0.1,15 -action_submit_a_form.pdf mac * * agg * diff -action_submit_a_form.pdf * * * * fontations fuzzy=10,0.1,15 -all_trigger_alert.pdf * * * * * diff -all_trigger_mailmsg.pdf * * * * * diff -all_trigger_print.pdf * * * * * diff -all_trigger_run_js_lunchurl.pdf mac * * agg * diff -all_trigger_run_js_lunchurl.pdf * * * * fontations fuzzy=10,0.1,15 -all_trigger_run_js_lunchurl.pdf mac * * skia * fuzzy -all_trigger_run_js_maildoc.pdf mac * * agg * diff -all_trigger_run_js_maildoc.pdf * * * * fontations fuzzy=10,0.1,15 -all_trigger_run_js_maildoc.pdf mac * * skia * fuzzy -annotation_highlight_author_content.pdf mac * * agg * diff -annotation_highlight_author_content.pdf * * * * fontations fuzzy=10,0.1,15 -annotation_highlight_author_content.pdf mac * * skia * fuzzy -annotation_highlight_long_content.pdf mac * * agg * diff -annotation_highlight_long_content.pdf * * * * fontations fuzzy=10,0.1,15 -annotation_highlight_long_content.pdf mac * * skia * fuzzy -annotation_highlight_no_author.pdf mac * * agg * diff -annotation_highlight_no_author.pdf * * * * fontations fuzzy=10,0.1,15 -annotation_highlight_no_author.pdf mac * * skia * fuzzy -app_launchurl.pdf mac * * agg * diff -app_launchurl.pdf * * * * fontations fuzzy=10,0.1,15 -appstoredescription3.1_en_updated.pdf mac * * agg * diff -appstoredescription3.1_en_updated.pdf * * * * fontations fuzzy=10,0.1,15 -bookmark.pdf * * * * * diff -bookmarkgetcolor.pdf mac * * agg * diff -bookmarkgetcolor.pdf * * * * fontations diff -bug_0_length_line.pdf mac * * agg * diff -bug_0_length_line.pdf * * * * fontations fuzzy=10,0.1,15 +12.pdf mac * agg * diff +12.pdf * * * fontations fuzzy=10,0.1,15 +1_1_textbox.pdf * * * * diff +1_2_typewriter.pdf * * * * diff +1_3_callout.pdf * * * * diff +1_matrix.pdf mac * agg * diff +1_matrix.pdf * * * fontations fuzzy=10,0.1,15 +1m_diff_lsjdf.pdf mac * agg * diff +1m_diff_lsjdf.pdf * * * fontations fuzzy=10,0.1,15 +1m_same_xxxx.pdf mac * agg * diff +2_11_stamp3.pdf mac * agg * diff +2_11_stamp3.pdf * * * fontations fuzzy=10,0.1,15 +2_11_stamp3.pdf mac * skia * fuzzy +2_6_textbox.pdf * * * * diff +2_color_calrgb.pdf mac * agg * diff +2_color_calrgb.pdf * * * fontations fuzzy=10,0.1,15 +2_color_indexed.pdf mac * agg * diff +2_color_indexed.pdf * * * fontations fuzzy=10,0.1,15 +3_4_textbox.pdf * * * * diff +3_interpolate_image.pdf mac * agg * diff +3_interpolate_image.pdf * * * fontations fuzzy=10,0.1,15 +3_interpolate_image.pdf mac * skia * fuzzy +3bigpreview.pdf mac * agg * diff +3bigpreview.pdf * * * * fuzzy=21,0.15,10.0 +3bigpreview.pdf * * * fontations fuzzy=25,0.25,15 +4_35.pdf mac * agg * diff +4_35.pdf * * * fontations fuzzy=10,0.1,15 +4_39.pdf mac * agg * diff +4_39.pdf * * * fontations fuzzy=10,0.1,15 +5.1.pdf mac * agg * diff +5.1.pdf * * * fontations fuzzy=10,0.1,15 +5.2.pdf * * * * diff +5.5_simple_font.pdf mac * agg * diff +5.5_simple_font.pdf * * * fontations diff +8.2_name_dest_f_dest.pdf mac * agg * diff +8.2_name_dest_f_dest.pdf * * * fontations fuzzy=10,0.1,15 +8.2_outline.pdf mac * agg * diff +8.2_outline.pdf * * * fontations fuzzy=10,0.1,15 +8.3_presentation.pdf mac * agg * diff +8.3_presentation.pdf * * * fontations fuzzy=10,0.1,15 +FRC_10_8.2.2__T8.3_original_file.pdf * * * * diff +FRC_11_8.2.2__T8.3_first_last_exchange.pdf * * * * diff +FRC_12_8.2.2__T8.3_first_outline_obj_ID.pdf * * * * diff +FRC_13_8.2.2__T8.3_Count_edit300.pdf * * * * diff +FRC_14_8.2.2__T8.3_Count_edit0.pdf * * * * diff +FRC_15_8.2.2__T8.3_Count_edit1.pdf * * * * diff +FRC_16_8.2.2__T8.3_Count_edit_1.pdf * * * * diff +FRC_1_8.2.2__T8.3_First_empty.pdf * * * * diff +FRC_2_8.2.2__T8.3_Last_empty.pdf * * * * diff +FRC_3.5_P__3616_Password_1.pdf * * * * diff +FRC_3_8.2.2_Type_empty.pdf * * * * diff +FRC_4_8.2.2__T8.3_Count_empty.pdf * * * * diff +FRC_5_8.2.2__T8.3_First_remove.pdf * * * * diff +FRC_6_8.2.2__T8.3_Last_remove.pdf * * * * diff +FRC_7_8.2.2_Type_remove.pdf * * * * diff +FRC_8.4.1_Annotations_M.pdf * * * * diff +FRC_8.4.1_Annotations_NM.pdf * * * * diff +FRC_8.5_Page_C_SubmitForm.pdf * * * * diff +FRC_8.5_Page_PI_ResetForm_Phantom.pdf * * * * diff +FRC_8.5_Widget_F.pdf * nov8 * * diff +FRC_8.5_Widget_F.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8_8.2.2__T8.3_Count_remove.pdf * * * * diff +FRC_9_8.2.2__T8.3_remove_first_item.pdf * * * * diff +action.pdf * * * * diff +action_execute_a_menu_item.pdf mac * agg * diff +action_execute_a_menu_item.pdf * * * fontations fuzzy=10,0.1,15 +action_execute_a_menu_item.pdf mac * skia * fuzzy +action_hide_show_form.pdf mac * agg * diff +action_hide_show_form.pdf * * * fontations fuzzy=10,0.1,15 +action_hide_show_form.pdf mac * skia * fuzzy +action_on_focus.pdf mac * agg * diff +action_on_focus.pdf * * * fontations fuzzy=10,0.1,15 +action_open_a_file.pdf mac * agg * diff +action_open_a_file.pdf * * * fontations fuzzy=10,0.1,15 +action_pdf_save_close.pdf mac * agg * diff +action_pdf_save_close.pdf * * * fontations fuzzy=10,0.1,15 +action_reset.pdf mac * agg * diff +action_reset.pdf * * * fontations fuzzy=10,0.1,15 +action_reset.pdf mac * skia * fuzzy +action_run_javascript.pdf mac * agg * diff +action_run_javascript.pdf * * * fontations fuzzy=10,0.1,15 +action_submit_a_form.pdf mac * agg * diff +action_submit_a_form.pdf * * * fontations fuzzy=10,0.1,15 +all_trigger_alert.pdf * * * * diff +all_trigger_mailmsg.pdf * * * * diff +all_trigger_print.pdf * * * * diff +all_trigger_run_js_lunchurl.pdf mac * agg * diff +all_trigger_run_js_lunchurl.pdf * * * fontations fuzzy=10,0.1,15 +all_trigger_run_js_lunchurl.pdf mac * skia * fuzzy +all_trigger_run_js_maildoc.pdf mac * agg * diff +all_trigger_run_js_maildoc.pdf * * * fontations fuzzy=10,0.1,15 +all_trigger_run_js_maildoc.pdf mac * skia * fuzzy +annotation_highlight_author_content.pdf mac * agg * diff +annotation_highlight_author_content.pdf * * * fontations fuzzy=10,0.1,15 +annotation_highlight_author_content.pdf mac * skia * fuzzy +annotation_highlight_long_content.pdf mac * agg * diff +annotation_highlight_long_content.pdf * * * fontations fuzzy=10,0.1,15 +annotation_highlight_long_content.pdf mac * skia * fuzzy +annotation_highlight_no_author.pdf mac * agg * diff +annotation_highlight_no_author.pdf * * * fontations fuzzy=10,0.1,15 +annotation_highlight_no_author.pdf mac * skia * fuzzy +app_launchurl.pdf mac * agg * diff +app_launchurl.pdf * * * fontations fuzzy=10,0.1,15 +appstoredescription3.1_en_updated.pdf mac * agg * diff +appstoredescription3.1_en_updated.pdf * * * fontations fuzzy=10,0.1,15 +bookmark.pdf * * * * diff +bookmarkgetcolor.pdf mac * agg * diff +bookmarkgetcolor.pdf * * * fontations diff +bug_0_length_line.pdf mac * agg * diff +bug_0_length_line.pdf * * * fontations fuzzy=10,0.1,15 # TODO(crbug.com/42270825): Remove after associated bug is fixed -bug_0_length_line.pdf * * * skia * diff +bug_0_length_line.pdf * * skia * diff -bug_0_width_line.pdf mac * * agg * diff -bug_0_width_line.pdf * * * * fontations fuzzy=10,0.1,15 -bug_440132.pdf mac * * agg * diff -bug_440132.pdf * * * * fontations fuzzy=10,0.1,15 -bug_white_space.pdf mac * * agg * diff -bug_white_space.pdf * * * * fontations fuzzy=10,0.1,15 -calcorderindex_test.pdf * * * * * diff -calculate_average.pdf mac * * agg * diff -calculate_average.pdf * * * * fontations fuzzy=10,0.1,15 -calculate_order.pdf * * * * * diff -calculate_sum_a_b_c.pdf mac * * agg * diff -calculate_sum_a_b_c.pdf * * * * fontations fuzzy=10,0.1,15 -calculate_validate.pdf mac * * agg * diff -calculate_validate.pdf * * * * fontations fuzzy=10,0.1,15 -calculate_validate.pdf * nov8 * * * diff -ch_1.pdf * * * * * diff -check_box.pdf * * * * * diff -color.pdf mac * * agg * diff -color.pdf * * * * fontations fuzzy=10,0.1,15 -colorspace.pdf mac * * agg * diff -colorspace.pdf * * * * fontations fuzzy=10,0.1,15 -colorspace.pdf mac * * skia * fuzzy -colorspace_test1.pdf mac * * agg * diff -colorspace_test1.pdf * * * * fontations fuzzy=10,0.1,15 -colorspace_test1.pdf mac * * skia * fuzzy -combo_box.pdf * * * * * diff -combo_box_format.pdf mac * * agg * diff -combo_box_format.pdf * * * * fontations fuzzy=10,0.1,15 -date.pdf mac * * agg * diff -date.pdf * * * * fontations fuzzy=10,0.1,15 -edit_transform.pdf mac * * agg * diff -edit_transform.pdf * * * * fontations fuzzy=10,0.1,15 -en_contact.pdf mac * * agg * diff -en_contact.pdf * * * * fontations fuzzy=10,0.1,15 -en_diy.pdf mac * * agg * diff -en_diy.pdf * * * * fontations diff -en_foxit.pdf mac * * agg * diff -en_foxit.pdf * * * * fontations diff -en_fqa2.pdf mac * * agg * diff -en_fqa2.pdf * * * * fontations fuzzy=10,0.1,15 -en_fqa2.pdf mac * * skia * fuzzy -en_introduce.pdf mac * * agg * diff -en_introduce.pdf * * * * fontations fuzzy=10,0.1,15 -en_tem.pdf mac * * agg * diff -en_tem.pdf * * * * fontations diff -en_tem.pdf * * * * * fuzzy -en_tem.pdf mac * * skia * fuzzy -en_uicase_.pdf mac * * agg * diff -en_uicase_.pdf * * * * fontations fuzzy=10,0.1,15 -en_uicase_.pdf mac * * skia * fuzzy -event.change.pdf mac * * agg * diff -event.change.pdf * * * * fontations fuzzy=10,0.1,15 -event.changeex.pdf mac * * agg * diff -event.changeex.pdf * * * * fontations fuzzy=10,0.1,15 -event.keydown.pdf mac * * agg * diff -event.keydown.pdf * * * * fontations fuzzy=10,0.1,15 -event.keydown_1_.pdf mac * * agg * diff -event.keydown_1_.pdf * * * * fontations fuzzy=10,0.1,15 -event.type_name.pdf mac * * agg * diff -event.type_name.pdf * * * * fontations fuzzy=10,0.1,15 -event.value.pdf mac * * agg * diff -event.value.pdf * * * * fontations fuzzy=10,0.1,15 -event_change.pdf mac * * agg * diff -event_change.pdf * * * * fontations fuzzy=10,0.1,15 -example_001.pdf mac * * agg * diff -example_001.pdf * * * * fontations diff -example_001.pdf * * * * * fuzzy -example_001.pdf mac * * skia * fuzzy -example_002.pdf mac * * agg * diff -example_002.pdf * * * * fontations fuzzy=10,0.1,15 -example_003.pdf mac * * agg * diff -example_003.pdf * * * * fontations diff -example_003.pdf * * * * * fuzzy -example_004.pdf mac * * agg * diff -example_004.pdf * * * * fontations diff -example_004.pdf * * * * * fuzzy -example_005.pdf mac * * agg * diff -example_005.pdf * * * * fontations diff -example_005.pdf * * * * * fuzzy -example_006.pdf mac * * agg * diff -example_006.pdf * * * * fontations diff -example_006.pdf * * * * * fuzzy -example_006.pdf mac * * skia * fuzzy -example_007.pdf mac * * agg * diff -example_007.pdf * * * * fontations diff -example_007.pdf * * * * * fuzzy -example_008.pdf mac * * agg * diff -example_008.pdf * * * * fontations diff -example_008.pdf * * * * * fuzzy -example_009.pdf mac * * agg * diff -example_009.pdf * * * * fontations diff -example_009.pdf * * * * * fuzzy=3,0.15,5.0 -example_010.pdf mac * * agg * diff -example_010.pdf * * * * fontations diff -example_010.pdf * * * * * fuzzy -example_010.pdf mac * * skia * fuzzy -example_011.pdf mac * * agg * diff -example_011.pdf * * * * fontations diff -example_011.pdf * * * * * fuzzy -example_012.pdf mac * * agg * diff -example_012.pdf * * * * fontations fuzzy=10,0.1,15 -example_013.pdf mac * * agg * diff -example_013.pdf * * * * fontations diff -example_013.pdf * * * * * fuzzy -example_014.pdf mac * * agg * diff -example_014.pdf * * * * fontations diff -example_014.pdf * * * * * fuzzy -example_015.pdf mac * * agg * diff -example_015.pdf * * * * fontations diff -example_015.pdf * * * * * fuzzy -example_016.pdf mac * * agg * diff -example_016.pdf * * * * fontations diff -example_016.pdf * * * * * fuzzy -example_017.pdf mac * * agg * diff -example_017.pdf * * * * fontations diff -example_017.pdf * * * * * fuzzy -example_018.pdf mac * * agg * diff -example_018.pdf * * * * fontations diff -example_018.pdf * * * * * fuzzy -example_018.pdf mac * * skia * fuzzy -example_019.pdf mac * * agg * diff -example_019.pdf * * * * fontations diff -example_019.pdf * * * * * fuzzy -example_020.pdf mac * * agg * diff -example_020.pdf * * * * fontations diff -example_020.pdf * * * * * fuzzy -example_021.pdf mac * * agg * diff -example_021.pdf * * * * fontations diff -example_021.pdf * * * * * fuzzy -example_022.pdf mac * * agg * diff -example_022.pdf * * * * fontations diff -example_022.pdf * * * * * fuzzy -example_023.pdf mac * * agg * diff -example_023.pdf * * * * fontations diff -example_023.pdf * * * * * fuzzy -example_024.pdf mac * * agg * diff -example_024.pdf * * * * fontations diff -example_024.pdf * * * * * fuzzy -example_025.pdf mac * * agg * diff -example_025.pdf * * * * fontations diff -example_025.pdf * * * * * fuzzy -example_025.pdf mac * * skia * fuzzy -example_026.pdf mac * * agg * diff -example_026.pdf * * * * * fuzzy=4,0.05,5.0 -example_027.pdf mac * * agg * diff -example_027.pdf * * * * fontations diff -example_027.pdf * * * * * fuzzy -example_028.pdf mac * * agg * diff -example_028.pdf * * * * fontations fuzzy=10,0.1,15 -example_029.pdf mac * * agg * diff -example_029.pdf * * * * fontations diff -example_029.pdf * * * * * fuzzy -example_030.pdf mac * * agg * diff -example_030.pdf * * * * fontations diff -example_030.pdf * * * * * fuzzy -example_031.pdf mac * * agg * diff -example_031.pdf * * * * fontations diff -example_031.pdf * * * * * fuzzy -example_032.pdf mac * * agg * diff -example_032.pdf * * * * fontations diff -example_032.pdf * * * * * fuzzy -example_033.pdf mac * * agg * diff -example_033.pdf * * * * fontations diff -example_033.pdf * * * * * fuzzy -example_034.pdf mac * * agg * diff -example_034.pdf * * * * * fuzzy=4,0.05,5.0 -example_034.pdf * * * * fontations fuzzy=10,0.1,15 -example_035.pdf mac * * agg * diff -example_035.pdf * * * * fontations diff -example_035.pdf * * * * * fuzzy -example_036.pdf mac * * agg * diff -example_036.pdf * * * * fontations diff -example_036.pdf * * * * * fuzzy -example_037.pdf mac * * agg * diff -example_037.pdf * * * * fontations diff -example_037.pdf * * * * * fuzzy -example_038.pdf mac * * agg * diff -example_038.pdf * * * * fontations diff -example_038.pdf * * * * * fuzzy -example_039.pdf mac * * agg * diff -example_039.pdf * * * * fontations diff -example_039.pdf * * * * * fuzzy -example_039.pdf mac * * skia * fuzzy -example_040.pdf mac * * agg * diff -example_040.pdf * * * * fontations diff -example_040.pdf * * * * * fuzzy -example_040.pdf mac * * skia * fuzzy -example_041.pdf mac * * agg * diff -example_041.pdf * * * * fontations diff -example_041.pdf * * * * * fuzzy -example_042.pdf mac * * agg * diff -example_042.pdf * * * * fontations diff -example_042.pdf * * * * * fuzzy -example_043.pdf mac * * agg * diff -example_043.pdf * * * * fontations diff -example_043.pdf * * * * * fuzzy -example_044.pdf mac * * agg * diff -example_044.pdf * * * * fontations diff -example_044.pdf * * * * * fuzzy -example_045.pdf mac * * agg * diff -example_045.pdf * * * * fontations diff -example_045.pdf * * * * * fuzzy -example_046.pdf mac * * agg * diff -example_046.pdf * * * * fontations diff -example_046.pdf * * * * * fuzzy -example_047.pdf mac * * agg * diff -example_047.pdf * * * * fontations diff -example_047.pdf * * * * * fuzzy -example_048.pdf mac * * agg * diff -example_048.pdf * * * * fontations diff -example_048.pdf * * * * * fuzzy -example_049.pdf mac * * agg * diff -example_049.pdf * * * * fontations diff -example_049.pdf * * * * * fuzzy -example_050.pdf mac * * agg * diff -example_050.pdf * * * * fontations diff -example_050.pdf * * * * * fuzzy -example_051.pdf mac * * agg * diff -example_051.pdf * * * * * fuzzy=3,0.35,5.0 -example_051.pdf * * * * fontations fuzzy=10,0.35,15 -example_052.pdf mac * * agg * diff -example_052.pdf * * * * fontations diff -example_052.pdf * * * * * fuzzy -example_053.pdf mac * * agg * diff -example_053.pdf * * * * fontations diff -example_053.pdf * * * * * fuzzy -example_054.pdf mac * * agg * diff -example_054.pdf * * * * fontations diff -example_054.pdf * * * * * fuzzy -example_055.pdf mac * * agg * diff -example_055.pdf * * * * fontations diff -example_055.pdf * * * * * fuzzy -example_056.pdf mac * * agg * diff -example_056.pdf * * * * fontations diff -example_056.pdf * * * * * fuzzy -example_057.pdf mac * * agg * diff -example_057.pdf * * * * fontations diff -example_057.pdf * * * * * fuzzy -example_057.pdf mac * * skia * fuzzy -example_058.pdf mac * * agg * diff -example_058.pdf * * * * fontations diff -example_058.pdf * * * * * fuzzy -example_058.pdf mac * * skia * fuzzy -example_059.pdf mac * * agg * diff -example_059.pdf * * * * fontations diff -example_059.pdf * * * * * fuzzy -example_060.pdf mac * * agg * diff -example_060.pdf * * * * fontations diff -example_060.pdf * * * * * fuzzy -example_060.pdf mac * * skia * fuzzy -example_061.pdf mac * * agg * diff -example_061.pdf * * * * fontations diff -example_061.pdf * * * * * fuzzy -example_062.pdf mac * * agg * diff -example_062.pdf * * * * * fuzzy=4,0.05,5.0 -example_062.pdf * * * * fontations fuzzy=10,0.1,15 -example_063.pdf mac * * agg * diff -example_063.pdf * * * * fontations diff -example_063.pdf * * * * * fuzzy -example_063.pdf mac * * skia * fuzzy -example_064.pdf mac * * agg * diff -example_064.pdf * * * * fontations diff -example_064.pdf * * * * * fuzzy -example_064.pdf mac * * skia * fuzzy -example_065.pdf mac * * agg * diff -example_065.pdf * * * * fontations fuzzy=15,0.05,15 -example_065.pdf * * * * * fuzzy -fillform.pdf * * * * * diff -form_action_trigger.pdf * * * * * diff -form_button_sign_url.pdf * * * * * diff -form_combo_sign_url.pdf * * * * * diff -form_combobox0.pdf * * * * * diff -form_combobox_actioin_goto.pdf * * * * * diff -form_combobox_date.pdf mac * * agg * diff -form_combobox_date.pdf * * * * fontations fuzzy=10,0.1,15 -form_combobox_date.pdf * nov8 * * * diff -form_combobox_date1.pdf * * * * * diff -form_combobox_date2.pdf mac * * agg * diff -form_combobox_date2.pdf * * * * fontations fuzzy=10,0.1,15 -form_combobox_date2.pdf * nov8 * * * diff -form_combobox_importform.pdf * * * * * diff -form_combobox_num.pdf mac * * agg * diff -form_combobox_num.pdf * * * * fontations fuzzy=10,0.1,15 -form_combobox_num.pdf * nov8 * * * diff -form_combobox_per.pdf mac * * agg * diff -form_combobox_per.pdf * * * * fontations fuzzy=10,0.1,15 -form_combobox_per.pdf * nov8 * * * diff -form_combobox_plus.pdf mac * * agg * diff -form_combobox_plus.pdf * * * * fontations fuzzy=10,0.1,15 -form_combobox_plus.pdf * nov8 * * * diff -form_combobox_product.pdf mac * * agg * diff -form_combobox_product.pdf * * * * fontations fuzzy=10,0.1,15 -form_combobox_product.pdf * nov8 * * * diff -form_combobox_resetform.pdf * * * * * diff -form_combobox_time.pdf mac * * agg * diff -form_combobox_time.pdf * * * * fontations fuzzy=10,0.1,15 -form_combobox_time.pdf * nov8 * * * diff -form_list.pdf * * * * * diff -form_list1.pdf * * * * * diff -form_same.pdf mac * * agg * diff -form_same.pdf * * * * fontations diff -form_text_sign_url.pdf * * * * * diff -format_combo_box.pdf mac * * agg * diff -format_combo_box.pdf * * * * fontations fuzzy=10,0.1,15 -format_combo_box.pdf * nov8 * * * diff -format_custom_format.pdf * nov8 * agg * diff -format_custom_format.pdf * * * * fontations fuzzy=10,0.1,15 -format_custom_keystroke.pdf * * * * * diff -format_date.pdf * nov8 * * * diff -format_number.pdf mac * * agg * diff -format_number.pdf * * * * fontations fuzzy=10,0.1,15 -format_percentage.pdf mac * * agg * diff -format_percentage.pdf * * * * fontations fuzzy=10,0.1,15 -format_special.pdf * nov8 * * * diff -format_text_color.pdf mac * * agg * diff -format_text_color.pdf * * * * fontations fuzzy=10,0.1,15 -formfield.pdf * * * * * diff -getarray.pdf mac * * agg * diff -getarray.pdf * * * * fontations fuzzy=10,0.1,15 +bug_0_width_line.pdf mac * agg * diff +bug_0_width_line.pdf * * * fontations fuzzy=10,0.1,15 +bug_440132.pdf mac * agg * diff +bug_440132.pdf * * * fontations fuzzy=10,0.1,15 +bug_white_space.pdf mac * agg * diff +bug_white_space.pdf * * * fontations fuzzy=10,0.1,15 +calcorderindex_test.pdf * * * * diff +calculate_average.pdf mac * agg * diff +calculate_average.pdf * * * fontations fuzzy=10,0.1,15 +calculate_order.pdf * * * * diff +calculate_sum_a_b_c.pdf mac * agg * diff +calculate_sum_a_b_c.pdf * * * fontations fuzzy=10,0.1,15 +calculate_validate.pdf mac * agg * diff +calculate_validate.pdf * * * fontations fuzzy=10,0.1,15 +calculate_validate.pdf * nov8 * * diff +ch_1.pdf * * * * diff +check_box.pdf * * * * diff +color.pdf mac * agg * diff +color.pdf * * * fontations fuzzy=10,0.1,15 +colorspace.pdf mac * agg * diff +colorspace.pdf * * * fontations fuzzy=10,0.1,15 +colorspace.pdf mac * skia * fuzzy +colorspace_test1.pdf mac * agg * diff +colorspace_test1.pdf * * * fontations fuzzy=10,0.1,15 +colorspace_test1.pdf mac * skia * fuzzy +combo_box.pdf * * * * diff +combo_box_format.pdf mac * agg * diff +combo_box_format.pdf * * * fontations fuzzy=10,0.1,15 +date.pdf mac * agg * diff +date.pdf * * * fontations fuzzy=10,0.1,15 +edit_transform.pdf mac * agg * diff +edit_transform.pdf * * * fontations fuzzy=10,0.1,15 +en_contact.pdf mac * agg * diff +en_contact.pdf * * * fontations fuzzy=10,0.1,15 +en_diy.pdf mac * agg * diff +en_diy.pdf * * * fontations diff +en_foxit.pdf mac * agg * diff +en_foxit.pdf * * * fontations diff +en_fqa2.pdf mac * agg * diff +en_fqa2.pdf * * * fontations fuzzy=10,0.1,15 +en_fqa2.pdf mac * skia * fuzzy +en_introduce.pdf mac * agg * diff +en_introduce.pdf * * * fontations fuzzy=10,0.1,15 +en_tem.pdf mac * agg * diff +en_tem.pdf * * * fontations diff +en_tem.pdf * * * * fuzzy +en_tem.pdf mac * skia * fuzzy +en_uicase_.pdf mac * agg * diff +en_uicase_.pdf * * * fontations fuzzy=10,0.1,15 +en_uicase_.pdf mac * skia * fuzzy +event.change.pdf mac * agg * diff +event.change.pdf * * * fontations fuzzy=10,0.1,15 +event.changeex.pdf mac * agg * diff +event.changeex.pdf * * * fontations fuzzy=10,0.1,15 +event.keydown.pdf mac * agg * diff +event.keydown.pdf * * * fontations fuzzy=10,0.1,15 +event.keydown_1_.pdf mac * agg * diff +event.keydown_1_.pdf * * * fontations fuzzy=10,0.1,15 +event.type_name.pdf mac * agg * diff +event.type_name.pdf * * * fontations fuzzy=10,0.1,15 +event.value.pdf mac * agg * diff +event.value.pdf * * * fontations fuzzy=10,0.1,15 +event_change.pdf mac * agg * diff +event_change.pdf * * * fontations fuzzy=10,0.1,15 +example_001.pdf mac * agg * diff +example_001.pdf * * * fontations diff +example_001.pdf * * * * fuzzy +example_001.pdf mac * skia * fuzzy +example_002.pdf mac * agg * diff +example_002.pdf * * * fontations fuzzy=10,0.1,15 +example_003.pdf mac * agg * diff +example_003.pdf * * * fontations diff +example_003.pdf * * * * fuzzy +example_004.pdf mac * agg * diff +example_004.pdf * * * fontations diff +example_004.pdf * * * * fuzzy +example_005.pdf mac * agg * diff +example_005.pdf * * * fontations diff +example_005.pdf * * * * fuzzy +example_006.pdf mac * agg * diff +example_006.pdf * * * fontations diff +example_006.pdf * * * * fuzzy +example_006.pdf mac * skia * fuzzy +example_007.pdf mac * agg * diff +example_007.pdf * * * fontations diff +example_007.pdf * * * * fuzzy +example_008.pdf mac * agg * diff +example_008.pdf * * * fontations diff +example_008.pdf * * * * fuzzy +example_009.pdf mac * agg * diff +example_009.pdf * * * fontations diff +example_009.pdf * * * * fuzzy=3,0.15,5.0 +example_010.pdf mac * agg * diff +example_010.pdf * * * fontations diff +example_010.pdf * * * * fuzzy +example_010.pdf mac * skia * fuzzy +example_011.pdf mac * agg * diff +example_011.pdf * * * fontations diff +example_011.pdf * * * * fuzzy +example_012.pdf mac * agg * diff +example_012.pdf * * * fontations fuzzy=10,0.1,15 +example_013.pdf mac * agg * diff +example_013.pdf * * * fontations diff +example_013.pdf * * * * fuzzy +example_014.pdf mac * agg * diff +example_014.pdf * * * fontations diff +example_014.pdf * * * * fuzzy +example_015.pdf mac * agg * diff +example_015.pdf * * * fontations diff +example_015.pdf * * * * fuzzy +example_016.pdf mac * agg * diff +example_016.pdf * * * fontations diff +example_016.pdf * * * * fuzzy +example_017.pdf mac * agg * diff +example_017.pdf * * * fontations diff +example_017.pdf * * * * fuzzy +example_018.pdf mac * agg * diff +example_018.pdf * * * fontations diff +example_018.pdf * * * * fuzzy +example_018.pdf mac * skia * fuzzy +example_019.pdf mac * agg * diff +example_019.pdf * * * fontations diff +example_019.pdf * * * * fuzzy +example_020.pdf mac * agg * diff +example_020.pdf * * * fontations diff +example_020.pdf * * * * fuzzy +example_021.pdf mac * agg * diff +example_021.pdf * * * fontations diff +example_021.pdf * * * * fuzzy +example_022.pdf mac * agg * diff +example_022.pdf * * * fontations diff +example_022.pdf * * * * fuzzy +example_023.pdf mac * agg * diff +example_023.pdf * * * fontations diff +example_023.pdf * * * * fuzzy +example_024.pdf mac * agg * diff +example_024.pdf * * * fontations diff +example_024.pdf * * * * fuzzy +example_025.pdf mac * agg * diff +example_025.pdf * * * fontations diff +example_025.pdf * * * * fuzzy +example_025.pdf mac * skia * fuzzy +example_026.pdf mac * agg * diff +example_026.pdf * * * * fuzzy=4,0.05,5.0 +example_027.pdf mac * agg * diff +example_027.pdf * * * fontations diff +example_027.pdf * * * * fuzzy +example_028.pdf mac * agg * diff +example_028.pdf * * * fontations fuzzy=10,0.1,15 +example_029.pdf mac * agg * diff +example_029.pdf * * * fontations diff +example_029.pdf * * * * fuzzy +example_030.pdf mac * agg * diff +example_030.pdf * * * fontations diff +example_030.pdf * * * * fuzzy +example_031.pdf mac * agg * diff +example_031.pdf * * * fontations diff +example_031.pdf * * * * fuzzy +example_032.pdf mac * agg * diff +example_032.pdf * * * fontations diff +example_032.pdf * * * * fuzzy +example_033.pdf mac * agg * diff +example_033.pdf * * * fontations diff +example_033.pdf * * * * fuzzy +example_034.pdf mac * agg * diff +example_034.pdf * * * * fuzzy=4,0.05,5.0 +example_034.pdf * * * fontations fuzzy=10,0.1,15 +example_035.pdf mac * agg * diff +example_035.pdf * * * fontations diff +example_035.pdf * * * * fuzzy +example_036.pdf mac * agg * diff +example_036.pdf * * * fontations diff +example_036.pdf * * * * fuzzy +example_037.pdf mac * agg * diff +example_037.pdf * * * fontations diff +example_037.pdf * * * * fuzzy +example_038.pdf mac * agg * diff +example_038.pdf * * * fontations diff +example_038.pdf * * * * fuzzy +example_039.pdf mac * agg * diff +example_039.pdf * * * fontations diff +example_039.pdf * * * * fuzzy +example_039.pdf mac * skia * fuzzy +example_040.pdf mac * agg * diff +example_040.pdf * * * fontations diff +example_040.pdf * * * * fuzzy +example_040.pdf mac * skia * fuzzy +example_041.pdf mac * agg * diff +example_041.pdf * * * fontations diff +example_041.pdf * * * * fuzzy +example_042.pdf mac * agg * diff +example_042.pdf * * * fontations diff +example_042.pdf * * * * fuzzy +example_043.pdf mac * agg * diff +example_043.pdf * * * fontations diff +example_043.pdf * * * * fuzzy +example_044.pdf mac * agg * diff +example_044.pdf * * * fontations diff +example_044.pdf * * * * fuzzy +example_045.pdf mac * agg * diff +example_045.pdf * * * fontations diff +example_045.pdf * * * * fuzzy +example_046.pdf mac * agg * diff +example_046.pdf * * * fontations diff +example_046.pdf * * * * fuzzy +example_047.pdf mac * agg * diff +example_047.pdf * * * fontations diff +example_047.pdf * * * * fuzzy +example_048.pdf mac * agg * diff +example_048.pdf * * * fontations diff +example_048.pdf * * * * fuzzy +example_049.pdf mac * agg * diff +example_049.pdf * * * fontations diff +example_049.pdf * * * * fuzzy +example_050.pdf mac * agg * diff +example_050.pdf * * * fontations diff +example_050.pdf * * * * fuzzy +example_051.pdf mac * agg * diff +example_051.pdf * * * * fuzzy=3,0.35,5.0 +example_051.pdf * * * fontations fuzzy=10,0.35,15 +example_052.pdf mac * agg * diff +example_052.pdf * * * fontations diff +example_052.pdf * * * * fuzzy +example_053.pdf mac * agg * diff +example_053.pdf * * * fontations diff +example_053.pdf * * * * fuzzy +example_054.pdf mac * agg * diff +example_054.pdf * * * fontations diff +example_054.pdf * * * * fuzzy +example_055.pdf mac * agg * diff +example_055.pdf * * * fontations diff +example_055.pdf * * * * fuzzy +example_056.pdf mac * agg * diff +example_056.pdf * * * fontations diff +example_056.pdf * * * * fuzzy +example_057.pdf mac * agg * diff +example_057.pdf * * * fontations diff +example_057.pdf * * * * fuzzy +example_057.pdf mac * skia * fuzzy +example_058.pdf mac * agg * diff +example_058.pdf * * * fontations diff +example_058.pdf * * * * fuzzy +example_058.pdf mac * skia * fuzzy +example_059.pdf mac * agg * diff +example_059.pdf * * * fontations diff +example_059.pdf * * * * fuzzy +example_060.pdf mac * agg * diff +example_060.pdf * * * fontations diff +example_060.pdf * * * * fuzzy +example_060.pdf mac * skia * fuzzy +example_061.pdf mac * agg * diff +example_061.pdf * * * fontations diff +example_061.pdf * * * * fuzzy +example_062.pdf mac * agg * diff +example_062.pdf * * * * fuzzy=4,0.05,5.0 +example_062.pdf * * * fontations fuzzy=10,0.1,15 +example_063.pdf mac * agg * diff +example_063.pdf * * * fontations diff +example_063.pdf * * * * fuzzy +example_063.pdf mac * skia * fuzzy +example_064.pdf mac * agg * diff +example_064.pdf * * * fontations diff +example_064.pdf * * * * fuzzy +example_064.pdf mac * skia * fuzzy +example_065.pdf mac * agg * diff +example_065.pdf * * * fontations fuzzy=15,0.05,15 +example_065.pdf * * * * fuzzy +fillform.pdf * * * * diff +form_action_trigger.pdf * * * * diff +form_button_sign_url.pdf * * * * diff +form_combo_sign_url.pdf * * * * diff +form_combobox0.pdf * * * * diff +form_combobox_actioin_goto.pdf * * * * diff +form_combobox_date.pdf mac * agg * diff +form_combobox_date.pdf * * * fontations fuzzy=10,0.1,15 +form_combobox_date.pdf * nov8 * * diff +form_combobox_date1.pdf * * * * diff +form_combobox_date2.pdf mac * agg * diff +form_combobox_date2.pdf * * * fontations fuzzy=10,0.1,15 +form_combobox_date2.pdf * nov8 * * diff +form_combobox_importform.pdf * * * * diff +form_combobox_num.pdf mac * agg * diff +form_combobox_num.pdf * * * fontations fuzzy=10,0.1,15 +form_combobox_num.pdf * nov8 * * diff +form_combobox_per.pdf mac * agg * diff +form_combobox_per.pdf * * * fontations fuzzy=10,0.1,15 +form_combobox_per.pdf * nov8 * * diff +form_combobox_plus.pdf mac * agg * diff +form_combobox_plus.pdf * * * fontations fuzzy=10,0.1,15 +form_combobox_plus.pdf * nov8 * * diff +form_combobox_product.pdf mac * agg * diff +form_combobox_product.pdf * * * fontations fuzzy=10,0.1,15 +form_combobox_product.pdf * nov8 * * diff +form_combobox_resetform.pdf * * * * diff +form_combobox_time.pdf mac * agg * diff +form_combobox_time.pdf * * * fontations fuzzy=10,0.1,15 +form_combobox_time.pdf * nov8 * * diff +form_list.pdf * * * * diff +form_list1.pdf * * * * diff +form_same.pdf mac * agg * diff +form_same.pdf * * * fontations diff +form_text_sign_url.pdf * * * * diff +format_combo_box.pdf mac * agg * diff +format_combo_box.pdf * * * fontations fuzzy=10,0.1,15 +format_combo_box.pdf * nov8 * * diff +format_custom_format.pdf * nov8 agg * diff +format_custom_format.pdf * * * fontations fuzzy=10,0.1,15 +format_custom_keystroke.pdf * * * * diff +format_date.pdf * nov8 * * diff +format_number.pdf mac * agg * diff +format_number.pdf * * * fontations fuzzy=10,0.1,15 +format_percentage.pdf mac * agg * diff +format_percentage.pdf * * * fontations fuzzy=10,0.1,15 +format_special.pdf * nov8 * * diff +format_text_color.pdf mac * agg * diff +format_text_color.pdf * * * fontations fuzzy=10,0.1,15 +formfield.pdf * * * * diff +getarray.pdf mac * agg * diff +getarray.pdf * * * fontations fuzzy=10,0.1,15 # TODO(crbug.com/42271468): Remove after associated bug is fixed. -gradient_many_stops.pdf * * * agg * diff +gradient_many_stops.pdf * * agg * diff -javascriptaction.pdf * * * * * diff -jetman_std.pdf mac * * agg * diff -jetman_std.pdf * * * * fontations fuzzy=10,0.1,15 -jetman_std_fixed.pdf mac * * agg * diff -jetman_std_fixed.pdf * * * * fontations fuzzy=10,0.1,15 -js_calculate.pdf * * * * * diff -list_box.pdf * * * * * diff -negative.pdf mac * * agg * diff -negative.pdf * * * * fontations fuzzy=10,0.1,15 -new_certify1.pdf mac * * agg * diff -new_certify1.pdf * * * * fontations fuzzy=10,0.1,15 -new_signature1.pdf mac * * agg * diff -new_signature1.pdf * * * * fontations fuzzy=10,0.1,15 -new_signature2.pdf mac * * agg * diff -new_signature2.pdf * * * * fontations fuzzy=10,0.1,15 -new_stamp4.pdf mac * * agg * diff -new_stamp4.pdf * * * * fontations fuzzy=10,0.1,15 -new_stamp5.pdf mac * * agg * diff -new_stamp5.pdf * * * * fontations fuzzy=10,0.1,15 -new_textmarkup1.pdf mac * * agg * diff -new_textmarkup1.pdf * * * * fontations fuzzy=10,0.1,15 -new_textmarkup1_hidden.pdf mac * * agg * diff -new_textmarkup1_hidden.pdf * * * * fontations fuzzy=10,0.1,15 -new_textmarkup2.pdf mac * * agg * diff -new_textmarkup2.pdf * * * * fontations fuzzy=10,0.1,15 -new_textmarkup2.pdf mac * * skia * fuzzy -new_textmarkup2_hidden.pdf mac * * agg * diff -new_textmarkup2_hidden.pdf * * * * fontations fuzzy=10,0.1,15 -new_textmarkup4.pdf mac * * agg * diff -new_textmarkup4.pdf * * * * fontations fuzzy=10,0.1,15 -new_textmarkup4_hidden.pdf mac * * agg * diff -new_textmarkup4_hidden.pdf * * * * fontations fuzzy=10,0.1,15 -new_textmarkup5.pdf mac * * agg * diff -new_textmarkup5.pdf * * * * fontations fuzzy=10,0.1,15 -new_textmarkup5_hidden.pdf mac * * agg * diff -new_textmarkup5_hidden.pdf * * * * fontations fuzzy=10,0.1,15 -new_textmarkup6.pdf mac * * agg * diff -new_textmarkup6.pdf * * * * fontations fuzzy=10,0.1,15 -new_textmarkup7.pdf mac * * agg * diff -new_textmarkup7.pdf * * * * fontations fuzzy=10,0.1,15 -new_textmarkup7_hidden.pdf mac * * agg * diff -new_textmarkup7_hidden.pdf * * * * fontations fuzzy=10,0.1,15 -new_textmarkup8.pdf mac * * agg * diff -new_textmarkup8.pdf * * * * fontations fuzzy=10,0.1,15 -new_textmarkup8.pdf mac * * skia * fuzzy -new_textmarkup8_hidden.pdf mac * * agg * diff -new_textmarkup8_hidden.pdf * * * * fontations fuzzy=10,0.1,15 -number.pdf * * * * * diff -octest.pdf mac * * agg * diff -octest.pdf * * * * fontations fuzzy=10,0.1,15 -open_a_weblink.pdf mac * * agg * diff -open_a_weblink.pdf * * * * fontations fuzzy=10,0.1,15 -path_10_jd.pdf mac * * agg * diff -path_10_jd.pdf * * * * fontations fuzzy=10,0.1,15 -path_5_pattern.pdf mac * * agg * diff -path_5_pattern.pdf * * * * fontations fuzzy=10,0.1,15 -path_5_pattern.pdf mac * * skia * fuzzy -path_6_graphics4.5.5.pdf mac * * agg * diff -path_6_graphics4.5.5.pdf * * * * fontations fuzzy=10,0.1,15 -path_7.pdf mac * * agg * diff -path_7.pdf * * * * fontations diff -path_9.pdf mac * * agg * diff -path_9.pdf * * * * fontations diff -path_9.pdf mac_x86 * * skia * fuzzy -percentage.pdf mac * * agg * diff -percentage.pdf * * * * fontations fuzzy=10,0.1,15 -push_button.pdf * * * * * diff -quick_start_guide.pdf mac * * agg * diff -quick_start_guide.pdf * * * * fontations diff -quick_start_guide.pdf * * * * * fuzzy=4,0.05,5.0 -radio_button.pdf * * * * * diff -run_custom_validate_script.pdf * * * * * diff -show_1.pdf mac * * agg * diff -show_1.pdf * * * * fontations fuzzy=10,0.1,15 -signature.pdf * * * * * diff -signature_4.pdf * * * * * diff -simplified_field_notation.pdf mac * * agg * diff -simplified_field_notation.pdf * * * * fontations fuzzy=10,0.1,15 -special.pdf mac * * agg * diff -special.pdf * * * * fontations fuzzy=10,0.1,15 -submit_form.pdf mac * * agg * diff -submit_form.pdf * * * * fontations fuzzy=10,0.1,15 -test_app_beep.pdf * * * * * diff -test_control.pdf * * * * * diff -text_field.pdf * * * * * diff -text_field_font_input_decimal_point.pdf mac * * agg * diff -text_field_font_input_decimal_point.pdf * * * * fontations fuzzy=10,0.1,15 -text_field_multiline_line_spacing.pdf mac * * agg * diff -text_field_multiline_line_spacing.pdf * * * * fontations fuzzy=10,0.1,15 -thread_action.pdf mac * * agg * diff -thread_action.pdf * * * * fontations fuzzy=10,0.1,15 -time.pdf mac * * agg * diff -time.pdf * * * * fontations fuzzy=10,0.1,15 -transformation.pdf mac * * agg * diff -transformation.pdf * * * * fontations fuzzy=10,0.1,15 -transparent.pdf mac * * agg * diff -transparent.pdf * * * * fontations fuzzy=10,0.1,15 -whats_new_in_v3.0.pdf mac * * agg * diff -whats_new_in_v3.0.pdf * * * * fontations fuzzy=10,0.1,15 -whats_new_in_v3.0.pdf mac * * skia * fuzzy -widget_javascript.pdf mac * * agg * diff -widget_javascript.pdf * * * * fontations fuzzy=10,0.1,15 +javascriptaction.pdf * * * * diff +jetman_std.pdf mac * agg * diff +jetman_std.pdf * * * fontations fuzzy=10,0.1,15 +jetman_std_fixed.pdf mac * agg * diff +jetman_std_fixed.pdf * * * fontations fuzzy=10,0.1,15 +js_calculate.pdf * * * * diff +list_box.pdf * * * * diff +negative.pdf mac * agg * diff +negative.pdf * * * fontations fuzzy=10,0.1,15 +new_certify1.pdf mac * agg * diff +new_certify1.pdf * * * fontations fuzzy=10,0.1,15 +new_signature1.pdf mac * agg * diff +new_signature1.pdf * * * fontations fuzzy=10,0.1,15 +new_signature2.pdf mac * agg * diff +new_signature2.pdf * * * fontations fuzzy=10,0.1,15 +new_stamp4.pdf mac * agg * diff +new_stamp4.pdf * * * fontations fuzzy=10,0.1,15 +new_stamp5.pdf mac * agg * diff +new_stamp5.pdf * * * fontations fuzzy=10,0.1,15 +new_textmarkup1.pdf mac * agg * diff +new_textmarkup1.pdf * * * fontations fuzzy=10,0.1,15 +new_textmarkup1_hidden.pdf mac * agg * diff +new_textmarkup1_hidden.pdf * * * fontations fuzzy=10,0.1,15 +new_textmarkup2.pdf mac * agg * diff +new_textmarkup2.pdf * * * fontations fuzzy=10,0.1,15 +new_textmarkup2.pdf mac * skia * fuzzy +new_textmarkup2_hidden.pdf mac * agg * diff +new_textmarkup2_hidden.pdf * * * fontations fuzzy=10,0.1,15 +new_textmarkup4.pdf mac * agg * diff +new_textmarkup4.pdf * * * fontations fuzzy=10,0.1,15 +new_textmarkup4_hidden.pdf mac * agg * diff +new_textmarkup4_hidden.pdf * * * fontations fuzzy=10,0.1,15 +new_textmarkup5.pdf mac * agg * diff +new_textmarkup5.pdf * * * fontations fuzzy=10,0.1,15 +new_textmarkup5_hidden.pdf mac * agg * diff +new_textmarkup5_hidden.pdf * * * fontations fuzzy=10,0.1,15 +new_textmarkup6.pdf mac * agg * diff +new_textmarkup6.pdf * * * fontations fuzzy=10,0.1,15 +new_textmarkup7.pdf mac * agg * diff +new_textmarkup7.pdf * * * fontations fuzzy=10,0.1,15 +new_textmarkup7_hidden.pdf mac * agg * diff +new_textmarkup7_hidden.pdf * * * fontations fuzzy=10,0.1,15 +new_textmarkup8.pdf mac * agg * diff +new_textmarkup8.pdf * * * fontations fuzzy=10,0.1,15 +new_textmarkup8.pdf mac * skia * fuzzy +new_textmarkup8_hidden.pdf mac * agg * diff +new_textmarkup8_hidden.pdf * * * fontations fuzzy=10,0.1,15 +number.pdf * * * * diff +octest.pdf mac * agg * diff +octest.pdf * * * fontations fuzzy=10,0.1,15 +open_a_weblink.pdf mac * agg * diff +open_a_weblink.pdf * * * fontations fuzzy=10,0.1,15 +path_10_jd.pdf mac * agg * diff +path_10_jd.pdf * * * fontations fuzzy=10,0.1,15 +path_5_pattern.pdf mac * agg * diff +path_5_pattern.pdf * * * fontations fuzzy=10,0.1,15 +path_5_pattern.pdf mac * skia * fuzzy +path_6_graphics4.5.5.pdf mac * agg * diff +path_6_graphics4.5.5.pdf * * * fontations fuzzy=10,0.1,15 +path_7.pdf mac * agg * diff +path_7.pdf * * * fontations diff +path_9.pdf mac * agg * diff +path_9.pdf * * * fontations diff +path_9.pdf mac_x86 * skia * fuzzy +percentage.pdf mac * agg * diff +percentage.pdf * * * fontations fuzzy=10,0.1,15 +push_button.pdf * * * * diff +quick_start_guide.pdf mac * agg * diff +quick_start_guide.pdf * * * fontations diff +quick_start_guide.pdf * * * * fuzzy=4,0.05,5.0 +radio_button.pdf * * * * diff +run_custom_validate_script.pdf * * * * diff +show_1.pdf mac * agg * diff +show_1.pdf * * * fontations fuzzy=10,0.1,15 +signature.pdf * * * * diff +signature_4.pdf * * * * diff +simplified_field_notation.pdf mac * agg * diff +simplified_field_notation.pdf * * * fontations fuzzy=10,0.1,15 +special.pdf mac * agg * diff +special.pdf * * * fontations fuzzy=10,0.1,15 +submit_form.pdf mac * agg * diff +submit_form.pdf * * * fontations fuzzy=10,0.1,15 +test_app_beep.pdf * * * * diff +test_control.pdf * * * * diff +text_field.pdf * * * * diff +text_field_font_input_decimal_point.pdf mac * agg * diff +text_field_font_input_decimal_point.pdf * * * fontations fuzzy=10,0.1,15 +text_field_multiline_line_spacing.pdf mac * agg * diff +text_field_multiline_line_spacing.pdf * * * fontations fuzzy=10,0.1,15 +thread_action.pdf mac * agg * diff +thread_action.pdf * * * fontations fuzzy=10,0.1,15 +time.pdf mac * agg * diff +time.pdf * * * fontations fuzzy=10,0.1,15 +transformation.pdf mac * agg * diff +transformation.pdf * * * fontations fuzzy=10,0.1,15 +transparent.pdf mac * agg * diff +transparent.pdf * * * fontations fuzzy=10,0.1,15 +whats_new_in_v3.0.pdf mac * agg * diff +whats_new_in_v3.0.pdf * * * fontations fuzzy=10,0.1,15 +whats_new_in_v3.0.pdf mac * skia * fuzzy +widget_javascript.pdf mac * agg * diff +widget_javascript.pdf * * * fontations fuzzy=10,0.1,15 # TODO(crbug.com/42270997): Remove after associated bug is fixed -xfermodes2.pdf * * * agg * diff -xfermodes2.pdf * * * skia * fuzzy +xfermodes2.pdf * * agg * diff +xfermodes2.pdf * * skia * fuzzy -zh_file1.pdf mac * * agg * diff -zh_file1.pdf * * * * fontations diff -zh_function_list.pdf mac * * agg * diff -zh_function_list.pdf * * * * fontations diff -zh_function_list.pdf mac * * skia * fuzzy -zh_shared_document.pdf mac * * agg * diff -zh_shared_document.pdf * * * * fontations diff +zh_file1.pdf mac * agg * diff +zh_file1.pdf * * * fontations diff +zh_function_list.pdf mac * agg * diff +zh_function_list.pdf * * * fontations diff +zh_function_list.pdf mac * skia * fuzzy +zh_shared_document.pdf mac * agg * diff +zh_shared_document.pdf * * * fontations diff # TODO(hnakashima): These might never have been run. Go over them and fix. -FRC_8.5_E&X.pdf * * * * * diff -FRC_8.5_O&PO_GoToE.pdf * * * * * diff -FRC_8.5_OpenAction&O_URI.pdf * * * * * diff -FRC_8.5_PC&C_GoToE_T_T.pdf * * * * * diff -FRC_8.5_PC_GoToE_T_R&P&A.pdf * * * * * diff -FRC_8.5_PO_GoToE_T_R&N.pdf * * * * * diff +FRC_8.5_E&X.pdf * * * * diff +FRC_8.5_O&PO_GoToE.pdf * * * * diff +FRC_8.5_OpenAction&O_URI.pdf * * * * diff +FRC_8.5_PC&C_GoToE_T_T.pdf * * * * diff +FRC_8.5_PC_GoToE_T_R&P&A.pdf * * * * diff +FRC_8.5_PO_GoToE_T_R&N.pdf * * * * diff # xfa_specific -Choose.pdf * * * * * diff -data_binding.pdf * * * * * diff +Choose.pdf * * * * diff +data_binding.pdf * * * * diff # TODO(crbug.com/567626109): Add proper evt for MouseEvents. -MouseEvents_enter.pdf * * * * * diff -MouseEvents_exit.pdf * * * * * diff -Oneof3.pdf * * * * * diff -Sum.pdf * * * * * diff -Test_CheckBox.pdf * * * * * diff +MouseEvents_enter.pdf * * * * diff +MouseEvents_exit.pdf * * * * diff +Oneof3.pdf * * * * diff +Sum.pdf * * * * diff +Test_CheckBox.pdf * * * * diff # TODO(crbug.com/459586268): Remove this entry once macOS support for Intel # hardware goes away. The test expectation is just different enough from the ARM # rendering that fuzzy matching is not enough for it to match. -2_color_calrgb.pdf mac_x86 * * skia * diff -2_color_tiling.pdf mac_x86 * * skia * diff -2_color_tiling.pdf * * * * fontations fuzzy=10,0.1,15 -2_uncolor_tiling.pdf mac_x86 * * skia * diff -2_uncolor_tiling.pdf * * * * fontations fuzzy=10,0.1,15 -3bigpreview.pdf mac_x86 * * skia * diff -FRC_4.5.3_DeviceRGB_rg.pdf mac_x86 * * skia * diff -FRC_4.5.4_CalGray_gamma.pdf mac_x86 * * skia * diff -FRC_4.5.4_CalGray_whitepoint.pdf mac_x86 * * skia * diff -FRC_4.5.4_CalRGB_gamma.pdf mac_x86 * * skia * diff -FRC_4.5.4_CalRGB_matrix.pdf mac_x86 * * skia * diff -FRC_4.5.4_CalRGB_whitepoint.pdf mac_x86 * * skia * diff -FRC_4.5.4_Lab.pdf mac_x86 * * skia * diff -FRC_4.5.4_RI_Relative.pdf mac_x86 * * skia * diff -FRC_10_8.2.4_View_C.pdf mac_x86 * * skia * diff -FRC_10_8.2.4_View_C.pdf * * * * fontations fuzzy=10,0.1,15 -Test_DateField_locale_zh_HK.pdf mac_x86 * * skia * diff -Test_DateField_locale_zh_HK.pdf * * * * fontations fuzzy=10,0.1,15 -TimeField.pdf mac_x86 * * skia * diff -annotation_circle_hidden.pdf mac_x86 * * skia * diff -annotation_circle_hidden.pdf * * * * fontations fuzzy=10,0.1,15 -annotation_ellipse_hidden.pdf mac_x86 * * skia * diff -annotation_ellipse_hidden.pdf * * * * fontations fuzzy=10,0.1,15 -annotation_highlight.pdf mac_x86 * * skia * diff -annotation_highlight.pdf * * * * fontations fuzzy=10,0.1,15 -annotation_highlight_empty_content.pdf mac_x86 * * skia * diff -annotation_highlight_empty_content.pdf * * * * fontations fuzzy=10,0.1,15 -annotation_highlight_hidden.pdf mac_x86 * * skia * diff -annotation_highlight_hidden.pdf * * * * fontations fuzzy=10,0.1,15 -annotation_highlight_no_author_no_content.pdf mac_x86 * * skia * diff -annotation_highlight_no_author_no_content.pdf * * * * fontations fuzzy=10,0.1,15 -annotation_highlight_no_content.pdf mac_x86 * * skia * diff -annotation_highlight_opacity.pdf mac_x86 * * skia * diff -annotation_highlight_opacity.pdf * * * * fontations fuzzy=10,0.1,15 -annotation_ink_hidden.pdf mac_x86 * * skia * diff -annotation_ink_hidden.pdf * * * * fontations fuzzy=10,0.1,15 -annotation_polygon.pdf mac_x86 * * skia * diff -annotation_polygon.pdf * * * * fontations fuzzy=10,0.1,15 -annotation_square_fill_negative_border.pdf mac_x86 * * skia * diff -annotation_square_fill_negative_border.pdf * * * * fontations fuzzy=10,0.1,15 -annotation_square_hidden.pdf mac_x86 * * skia * diff -annotation_square_hidden.pdf * * * * fontations fuzzy=10,0.1,15 -annotation_squiggly_hidden.pdf mac_x86 * * skia * diff -annotation_squiggly_hidden.pdf * * * * fontations fuzzy=10,0.1,15 -annotation_stamp.pdf mac_x86 * * skia * diff -annotation_stamp.pdf * * * * fontations fuzzy=10,0.1,15 -annotation_strikeout_hidden.pdf mac_x86 * * skia * diff -annotation_strikeout_hidden.pdf * * * * fontations fuzzy=10,0.1,15 -annotation_strikeout_opacity.pdf * * * * fontations fuzzy=10,0.1,15 -annotation_strikeout_opacity.pdf mac * * skia * fuzzy -annotation_underline.pdf mac_x86 * * skia * diff -annotation_underline.pdf * * * * fontations fuzzy=10,0.1,15 -annotation_underline_hidden.pdf mac_x86 * * skia * diff -annotation_underline_hidden.pdf * * * * fontations fuzzy=10,0.1,15 -annotation_underline_opacity.pdf mac_x86 * * skia * diff -annotation_underline_opacity.pdf * * * * fontations fuzzy=10,0.1,15 -bug_668762.pdf mac_x86 * * skia * diff -bug_668762.pdf * * * * fontations fuzzy=10,0.1,15 -edit_transform.pdf mac_x86 * * skia * diff -en_14_foxit_products.pdf mac_x86 * * skia * diff -en_14_foxit_products.pdf * * * * fontations fuzzy=10,0.2,15 -en_contact.pdf mac_x86 * * skia * diff -en_foxit.pdf mac_x86 * * skia * diff -en_fqa.pdf mac_x86 * * skia * diff -en_fqa.pdf * * * * fontations fuzzy=10,0.1,15 -example_002.pdf mac_x86 * * skia * diff -example_004.pdf mac_x86 * * skia * diff -example_028.pdf mac_x86 * * skia * diff -example_055.pdf mac_x86 * * skia * diff -font_1_embedded_font_en_feature.pdf mac_x86 * * skia * diff -font_1_embedded_font_en_feature.pdf * * * * fontations diff -font_2_embedded_font_en_size14.pdf mac_x86 * * skia * diff -font_2_embedded_font_en_size14.pdf * * * * fontations diff -new_stamp4.pdf mac_x86 * * skia * diff -octest.pdf mac_x86 * * skia * diff -path_5_pattern.pdf mac_x86 * * skia * diff -path_6_graphics4.5.5.pdf mac_x86 * * skia * diff -path_7.pdf mac_x86 * * skia * diff -quick_start_guide.pdf mac_x86 * * skia * diff -transparent1.pdf mac_x86 * * skia * diff -xfermodes.pdf mac_x86 * * skia * diff -xfermodes.pdf * * * skia * fuzzy -xfermodes2.pdf mac_x86 * * skia * diff -xfermodes3.pdf * * * skia * fuzzy -zh_function_list.pdf mac_x86 * * skia * diff +2_color_calrgb.pdf mac_x86 * skia * diff +2_color_tiling.pdf mac_x86 * skia * diff +2_color_tiling.pdf * * * fontations fuzzy=10,0.1,15 +2_uncolor_tiling.pdf mac_x86 * skia * diff +2_uncolor_tiling.pdf * * * fontations fuzzy=10,0.1,15 +3bigpreview.pdf mac_x86 * skia * diff +FRC_4.5.3_DeviceRGB_rg.pdf mac_x86 * skia * diff +FRC_4.5.4_CalGray_gamma.pdf mac_x86 * skia * diff +FRC_4.5.4_CalGray_whitepoint.pdf mac_x86 * skia * diff +FRC_4.5.4_CalRGB_gamma.pdf mac_x86 * skia * diff +FRC_4.5.4_CalRGB_matrix.pdf mac_x86 * skia * diff +FRC_4.5.4_CalRGB_whitepoint.pdf mac_x86 * skia * diff +FRC_4.5.4_Lab.pdf mac_x86 * skia * diff +FRC_4.5.4_RI_Relative.pdf mac_x86 * skia * diff +FRC_10_8.2.4_View_C.pdf mac_x86 * skia * diff +FRC_10_8.2.4_View_C.pdf * * * fontations fuzzy=10,0.1,15 +Test_DateField_locale_zh_HK.pdf mac_x86 * skia * diff +Test_DateField_locale_zh_HK.pdf * * * fontations fuzzy=10,0.1,15 +TimeField.pdf mac_x86 * skia * diff +annotation_circle_hidden.pdf mac_x86 * skia * diff +annotation_circle_hidden.pdf * * * fontations fuzzy=10,0.1,15 +annotation_ellipse_hidden.pdf mac_x86 * skia * diff +annotation_ellipse_hidden.pdf * * * fontations fuzzy=10,0.1,15 +annotation_highlight.pdf mac_x86 * skia * diff +annotation_highlight.pdf * * * fontations fuzzy=10,0.1,15 +annotation_highlight_empty_content.pdf mac_x86 * skia * diff +annotation_highlight_empty_content.pdf * * * fontations fuzzy=10,0.1,15 +annotation_highlight_hidden.pdf mac_x86 * skia * diff +annotation_highlight_hidden.pdf * * * fontations fuzzy=10,0.1,15 +annotation_highlight_no_author_no_content.pdf mac_x86 * skia * diff +annotation_highlight_no_author_no_content.pdf * * * fontations fuzzy=10,0.1,15 +annotation_highlight_no_content.pdf mac_x86 * skia * diff +annotation_highlight_opacity.pdf mac_x86 * skia * diff +annotation_highlight_opacity.pdf * * * fontations fuzzy=10,0.1,15 +annotation_ink_hidden.pdf mac_x86 * skia * diff +annotation_ink_hidden.pdf * * * fontations fuzzy=10,0.1,15 +annotation_polygon.pdf mac_x86 * skia * diff +annotation_polygon.pdf * * * fontations fuzzy=10,0.1,15 +annotation_square_fill_negative_border.pdf mac_x86 * skia * diff +annotation_square_fill_negative_border.pdf * * * fontations fuzzy=10,0.1,15 +annotation_square_hidden.pdf mac_x86 * skia * diff +annotation_square_hidden.pdf * * * fontations fuzzy=10,0.1,15 +annotation_squiggly_hidden.pdf mac_x86 * skia * diff +annotation_squiggly_hidden.pdf * * * fontations fuzzy=10,0.1,15 +annotation_stamp.pdf mac_x86 * skia * diff +annotation_stamp.pdf * * * fontations fuzzy=10,0.1,15 +annotation_strikeout_hidden.pdf mac_x86 * skia * diff +annotation_strikeout_hidden.pdf * * * fontations fuzzy=10,0.1,15 +annotation_strikeout_opacity.pdf * * * fontations fuzzy=10,0.1,15 +annotation_strikeout_opacity.pdf mac * skia * fuzzy +annotation_underline.pdf mac_x86 * skia * diff +annotation_underline.pdf * * * fontations fuzzy=10,0.1,15 +annotation_underline_hidden.pdf mac_x86 * skia * diff +annotation_underline_hidden.pdf * * * fontations fuzzy=10,0.1,15 +annotation_underline_opacity.pdf mac_x86 * skia * diff +annotation_underline_opacity.pdf * * * fontations fuzzy=10,0.1,15 +bug_668762.pdf mac_x86 * skia * diff +bug_668762.pdf * * * fontations fuzzy=10,0.1,15 +edit_transform.pdf mac_x86 * skia * diff +en_14_foxit_products.pdf mac_x86 * skia * diff +en_14_foxit_products.pdf * * * fontations fuzzy=10,0.2,15 +en_contact.pdf mac_x86 * skia * diff +en_foxit.pdf mac_x86 * skia * diff +en_fqa.pdf mac_x86 * skia * diff +en_fqa.pdf * * * fontations fuzzy=10,0.1,15 +example_002.pdf mac_x86 * skia * diff +example_004.pdf mac_x86 * skia * diff +example_028.pdf mac_x86 * skia * diff +example_055.pdf mac_x86 * skia * diff +font_1_embedded_font_en_feature.pdf mac_x86 * skia * diff +font_1_embedded_font_en_feature.pdf * * * fontations diff +font_2_embedded_font_en_size14.pdf mac_x86 * skia * diff +font_2_embedded_font_en_size14.pdf * * * fontations diff +new_stamp4.pdf mac_x86 * skia * diff +octest.pdf mac_x86 * skia * diff +path_5_pattern.pdf mac_x86 * skia * diff +path_6_graphics4.5.5.pdf mac_x86 * skia * diff +path_7.pdf mac_x86 * skia * diff +quick_start_guide.pdf mac_x86 * skia * diff +transparent1.pdf mac_x86 * skia * diff +xfermodes.pdf mac_x86 * skia * diff +xfermodes.pdf * * skia * fuzzy +xfermodes2.pdf mac_x86 * skia * diff +xfermodes3.pdf * * skia * fuzzy +zh_function_list.pdf mac_x86 * skia * diff # GDI # TODO(crbug.com/42271066): Remove after associated bug is fixed -1.pdf * * * gdi * diff -1.pdf * * * * * fuzzy -1.pdf mac * * skia * fuzzy -123.pdf * * * gdi * diff -123.pdf mac * * skia * fuzzy -1_image.pdf * * * gdi * diff -1_image.pdf mac * * skia * fuzzy -3_interpolate_image.pdf * * * gdi * diff -3bigpreview.pdf * * * gdi * diff -4_3.pdf * * * gdi * diff -4_3.pdf mac * * skia * fuzzy -4_36.pdf * * * gdi * diff -4_36.pdf mac * * skia * fuzzy -FRC_10_8.2.4_View_C.pdf * * * gdi * diff -FRC_8.4.1_Annotations_Type.pdf * * * gdi * diff -FRC_8.4.1_Annotations_Type.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.4.3_Border_Stypes_W_different_values.pdf * * * gdi * diff -FRC_8.4.3_Border_Stypes_W_different_values.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.5_Screen_Img_D_Launch.pdf * * * gdi * diff -FRC_8.5_Screen_Img_D_Launch.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.5_Screen_Img_D_Launch.pdf mac * * skia * fuzzy -FRC_8.5_URI_IsMap.pdf * * * gdi * diff -FRC_8.5_URI_IsMap.pdf * * * * * fuzzy -FRC_8.5_URI_IsMap.pdf mac * * skia * fuzzy -FRC_8.5_URI_IsMap.pdf * * * * fontations fuzzy=10,0.1,15 -bug_691967.pdf * * * gdi_skia * diff -bug_691967.pdf * * * * * fuzzy -bug_691967.pdf mac * * skia * fuzzy -bug_691967.pdf * * * * fontations fuzzy=10,0.1,15 -bug_86459.pdf * * * gdi * diff -bug_86459.pdf * * * * * fuzzy -bug_880920.pdf * * * gdi * diff -ch_7_0.pdf * * * gdi * diff -ch_7_0.pdf * * * * * fuzzy -ch_7_1.pdf * * * gdi * diff -ch_7_1.pdf * * * * * fuzzy -ch_7_4.pdf * * * gdi * diff -ch_7_4.pdf * * * * * fuzzy -ch_7_5.pdf * * * gdi * diff -ch_7_5.pdf * * * * * fuzzy -ch_7_6.pdf * * * gdi * diff -ch_7_6.pdf * * * * * fuzzy -ch_7_7.pdf * * * gdi * diff -ch_7_7.pdf * * * * * fuzzy -ch_7_8.pdf * * * gdi * diff -ch_7_8.pdf * * * * * fuzzy -en_tem.pdf * * * gdi * diff -example_001.pdf * * * gdi * diff -example_003.pdf * * * gdi * diff -example_004.pdf * * * gdi * diff -example_005.pdf * * * gdi * diff -example_006.pdf * * * gdi * diff -example_007.pdf * * * gdi * diff -example_008.pdf * * * gdi * diff -example_009.pdf * * * gdi * diff -example_010.pdf * * * gdi * diff -example_011.pdf * * * gdi * diff -example_013.pdf * * * gdi * diff -example_015.pdf * * * gdi * diff -example_016.pdf * * * gdi * diff -example_017.pdf * * * gdi * diff -example_018.pdf * * * gdi * diff -example_019.pdf * * * gdi * diff -example_020.pdf * * * gdi * diff -example_021.pdf * * * gdi * diff -example_022.pdf * * * gdi * diff -example_023.pdf * * * gdi * diff -example_024.pdf * * * gdi * diff -example_025.pdf * * * gdi * diff -example_026.pdf * * * gdi * diff -example_027.pdf * * * gdi * diff -example_029.pdf * * * gdi * diff -example_030.pdf * * * gdi * diff -example_031.pdf * * * gdi * diff -example_032.pdf * * * gdi * diff -example_033.pdf * * * gdi * diff -example_034.pdf * * * gdi * diff -example_035.pdf * * * gdi * diff -example_036.pdf * * * gdi * diff -example_037.pdf * * * gdi * diff -example_038.pdf * * * gdi * diff -example_039.pdf * * * gdi * diff -example_040.pdf * * * gdi * diff -example_041.pdf * * * gdi * diff -example_042.pdf * * * gdi * diff -example_043.pdf * * * gdi * diff -example_044.pdf * * * gdi * diff -example_045.pdf * * * gdi * diff -example_046.pdf * * * gdi * diff -example_047.pdf * * * gdi * diff -example_048.pdf * * * gdi * diff -example_049.pdf * * * gdi * diff -example_050.pdf * * * gdi * diff -example_051.pdf * * * gdi * diff -example_052.pdf * * * gdi * diff -example_053.pdf * * * gdi * diff -example_055.pdf * * * gdi * diff -example_056.pdf * * * gdi * diff -example_057.pdf * * * gdi * diff -example_058.pdf * * * gdi * diff -example_059.pdf * * * gdi * diff -example_060.pdf * * * gdi * diff -example_061.pdf * * * gdi * diff -example_062.pdf * * * gdi * diff -example_063.pdf * * * gdi * diff -example_064.pdf * * * gdi * diff -example_065.pdf * * * gdi * diff -image_8bit_devicergb_dctdecode.pdf * * * gdi * diff -image_8bit_devicergb_dctdecode.pdf * * * * * fuzzy -image_8bit_devicergb_dctdecode.pdf mac * * skia * fuzzy -image_bmp.pdf * * * gdi * diff -image_bmp.pdf * * * * * fuzzy -image_bmp.pdf mac * * skia * fuzzy -image_jpg.pdf * * * gdi * diff -image_jpg.pdf * * * * * fuzzy -image_jpg.pdf mac * * skia * fuzzy -image_png.pdf * * * gdi * diff -image_png.pdf mac * * skia * fuzzy -image_tif.pdf * * * gdi * diff -image_tif.pdf * * * * * fuzzy=10,0.05,10.0 -mask_array.pdf * * * gdi * diff -new_stamp2.pdf * * * gdi * diff -quick_start_guide.pdf * * * gdi * diff -whats_new_in_v3.0.pdf * * * gdi * diff +1.pdf * * gdi * diff +1.pdf * * * * fuzzy +1.pdf mac * skia * fuzzy +123.pdf * * gdi * diff +123.pdf mac * skia * fuzzy +1_image.pdf * * gdi * diff +1_image.pdf mac * skia * fuzzy +3_interpolate_image.pdf * * gdi * diff +3bigpreview.pdf * * gdi * diff +4_3.pdf * * gdi * diff +4_3.pdf mac * skia * fuzzy +4_36.pdf * * gdi * diff +4_36.pdf mac * skia * fuzzy +FRC_10_8.2.4_View_C.pdf * * gdi * diff +FRC_8.4.1_Annotations_Type.pdf * * gdi * diff +FRC_8.4.1_Annotations_Type.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.4.3_Border_Stypes_W_different_values.pdf * * gdi * diff +FRC_8.4.3_Border_Stypes_W_different_values.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.5_Screen_Img_D_Launch.pdf * * gdi * diff +FRC_8.5_Screen_Img_D_Launch.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.5_Screen_Img_D_Launch.pdf mac * skia * fuzzy +FRC_8.5_URI_IsMap.pdf * * gdi * diff +FRC_8.5_URI_IsMap.pdf * * * * fuzzy +FRC_8.5_URI_IsMap.pdf mac * skia * fuzzy +FRC_8.5_URI_IsMap.pdf * * * fontations fuzzy=10,0.1,15 +bug_691967.pdf * * gdi_skia * diff +bug_691967.pdf * * * * fuzzy +bug_691967.pdf mac * skia * fuzzy +bug_691967.pdf * * * fontations fuzzy=10,0.1,15 +bug_86459.pdf * * gdi * diff +bug_86459.pdf * * * * fuzzy +bug_880920.pdf * * gdi * diff +ch_7_0.pdf * * gdi * diff +ch_7_0.pdf * * * * fuzzy +ch_7_1.pdf * * gdi * diff +ch_7_1.pdf * * * * fuzzy +ch_7_4.pdf * * gdi * diff +ch_7_4.pdf * * * * fuzzy +ch_7_5.pdf * * gdi * diff +ch_7_5.pdf * * * * fuzzy +ch_7_6.pdf * * gdi * diff +ch_7_6.pdf * * * * fuzzy +ch_7_7.pdf * * gdi * diff +ch_7_7.pdf * * * * fuzzy +ch_7_8.pdf * * gdi * diff +ch_7_8.pdf * * * * fuzzy +en_tem.pdf * * gdi * diff +example_001.pdf * * gdi * diff +example_003.pdf * * gdi * diff +example_004.pdf * * gdi * diff +example_005.pdf * * gdi * diff +example_006.pdf * * gdi * diff +example_007.pdf * * gdi * diff +example_008.pdf * * gdi * diff +example_009.pdf * * gdi * diff +example_010.pdf * * gdi * diff +example_011.pdf * * gdi * diff +example_013.pdf * * gdi * diff +example_015.pdf * * gdi * diff +example_016.pdf * * gdi * diff +example_017.pdf * * gdi * diff +example_018.pdf * * gdi * diff +example_019.pdf * * gdi * diff +example_020.pdf * * gdi * diff +example_021.pdf * * gdi * diff +example_022.pdf * * gdi * diff +example_023.pdf * * gdi * diff +example_024.pdf * * gdi * diff +example_025.pdf * * gdi * diff +example_026.pdf * * gdi * diff +example_027.pdf * * gdi * diff +example_029.pdf * * gdi * diff +example_030.pdf * * gdi * diff +example_031.pdf * * gdi * diff +example_032.pdf * * gdi * diff +example_033.pdf * * gdi * diff +example_034.pdf * * gdi * diff +example_035.pdf * * gdi * diff +example_036.pdf * * gdi * diff +example_037.pdf * * gdi * diff +example_038.pdf * * gdi * diff +example_039.pdf * * gdi * diff +example_040.pdf * * gdi * diff +example_041.pdf * * gdi * diff +example_042.pdf * * gdi * diff +example_043.pdf * * gdi * diff +example_044.pdf * * gdi * diff +example_045.pdf * * gdi * diff +example_046.pdf * * gdi * diff +example_047.pdf * * gdi * diff +example_048.pdf * * gdi * diff +example_049.pdf * * gdi * diff +example_050.pdf * * gdi * diff +example_051.pdf * * gdi * diff +example_052.pdf * * gdi * diff +example_053.pdf * * gdi * diff +example_055.pdf * * gdi * diff +example_056.pdf * * gdi * diff +example_057.pdf * * gdi * diff +example_058.pdf * * gdi * diff +example_059.pdf * * gdi * diff +example_060.pdf * * gdi * diff +example_061.pdf * * gdi * diff +example_062.pdf * * gdi * diff +example_063.pdf * * gdi * diff +example_064.pdf * * gdi * diff +example_065.pdf * * gdi * diff +image_8bit_devicergb_dctdecode.pdf * * gdi * diff +image_8bit_devicergb_dctdecode.pdf * * * * fuzzy +image_8bit_devicergb_dctdecode.pdf mac * skia * fuzzy +image_bmp.pdf * * gdi * diff +image_bmp.pdf * * * * fuzzy +image_bmp.pdf mac * skia * fuzzy +image_jpg.pdf * * gdi * diff +image_jpg.pdf * * * * fuzzy +image_jpg.pdf mac * skia * fuzzy +image_png.pdf * * gdi * diff +image_png.pdf mac * skia * fuzzy +image_tif.pdf * * gdi * diff +image_tif.pdf * * * * fuzzy=10,0.05,10.0 +mask_array.pdf * * gdi * diff +new_stamp2.pdf * * gdi * diff +quick_start_guide.pdf * * gdi * diff +whats_new_in_v3.0.pdf * * gdi * diff # TODO(crbug.com/42271067): Remove after associated bug is fixed -Date_FormCale.pdf * * * gdi * diff -Date_FormCale.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_3.5_P__3648_Password_1.pdf * * * gdi * diff -FRC_3.5_P__3648_Password_1.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.4.1_Annotations_AP_N_R.D_.pdf * * * gdi * diff -FRC_8.4.1_Annotations_AP_N_R.D_.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.4.1_Annotations_AS_Off_.pdf * * * gdi * diff -FRC_8.4.1_Annotations_AS_Off_.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.4.1_Annotations_AS_Yes_.pdf * * * gdi * diff -FRC_8.4.1_Annotations_AS_Yes_.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.5_Bl_Hide.pdf * * * gdi * diff -FRC_8.5_Bl_Hide.pdf * * * * fontations diff -FRC_8.5_E_GoTo_D.pdf * * * gdi * diff -FRC_8.5_E_GoTo_D.pdf * * * * fontations diff -FRC_8.5_Fo_URI_Base.pdf * * * gdi * diff -FRC_8.5_Fo_URI_Base.pdf * * * * fontations diff -FRC_8.5_U_GoToR_NewWindow.pdf * * * gdi * diff -FRC_8.5_U_GoToR_NewWindow.pdf * * * * fontations diff -FRC_8.5_U_GoToR_NewWindow_2.pdf * * * gdi * diff -FRC_8.5_U_GoToR_NewWindow_2.pdf * * * * fontations diff -FRC_8.5_Widget_C.pdf * * * gdi * diff -FRC_8.5_Widget_C.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.5_Widget_F.pdf * * * gdi * diff -FRC_8.5_Widget_K.pdf * * * gdi * diff -FRC_8.5_Widget_K.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.5_Widget_V.pdf * * * gdi * diff -FRC_8.5_Widget_V.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.5_X_GoToR_D.pdf * * * gdi * diff -FRC_8.5_X_GoToR_D.pdf * * * * fontations diff -Line_Stroke.pdf * * * gdi * diff -Line_Stroke.pdf * * * * fontations fuzzy=10,0.1,15 -Oneof1.pdf * * * gdi * diff -Oneof1.pdf * * * * fontations fuzzy=10,0.1,15 -Oneof2.pdf * * * gdi * diff -Oneof2.pdf * * * * fontations fuzzy=10,0.1,15 -PagePosition_any_rest.pdf * * * gdi * diff -PagePosition_any_rest.pdf * * * * fontations fuzzy=10,0.1,15 -PagePosition_first.pdf * * * gdi * diff -PagePosition_first.pdf * * * * fontations diff -PagePosition_last.pdf * * * gdi * diff -PagePosition_last.pdf * * * * fontations diff -PagePosition_no_any.pdf * * * gdi * diff -PagePosition_no_any.pdf * * * * fontations fuzzy=10,0.1,15 -PagePosition_rest.pdf * * * gdi * diff -PagePosition_rest.pdf * * * * fontations fuzzy=10,0.1,15 -PagePosition_rest_any.pdf * * * gdi * diff -PagePosition_rest_any.pdf * * * * fontations fuzzy=10,0.1,15 -Test_DateField_locale_en_CA.pdf * * * gdi * diff -Test_DateField_locale_en_CA.pdf * * * * fontations fuzzy=10,0.1,15 -Test_DateField_locale_en_GB.pdf * * * gdi * diff -Test_DateField_locale_en_GB.pdf * * * * fontations fuzzy=10,0.1,15 -Test_DateField_locale_en_US.pdf * * * gdi * diff -Test_DateField_locale_en_US.pdf * * * * fontations fuzzy=10,0.1,15 -Test_DateField_locale_fr_CA.pdf * * * gdi * diff -Test_DateField_locale_fr_CA.pdf * * * * fontations fuzzy=10,0.1,15 -Test_DateField_locale_fr_FR.pdf * * * gdi * diff -Test_DateField_locale_fr_FR.pdf * * * * fontations fuzzy=10,0.1,15 -Test_DateField_locale_nl_NL.pdf * * * gdi * diff -Test_DateField_locale_nl_NL.pdf * * * * fontations fuzzy=10,0.1,15 -Test_DateField_locale_zh_CN.pdf * * * gdi * diff -Test_DateField_locale_zh_CN.pdf * * * * fontations fuzzy=10,0.1,15 -Test_DateField_locale_zh_HK.pdf * * * gdi * diff -Test_Drop_downList.pdf * * * gdi * diff -Test_Drop_downList.pdf * * * * fontations fuzzy=10,0.1,15 -Test_NumericField.pdf * * * gdi * diff -Test_NumericField.pdf * * * * fontations fuzzy=10,0.1,15 -Test_PasswordField.pdf * * * gdi * diff -Test_PasswordField.pdf * * * * fontations fuzzy=10,0.1,15 -Test_RadioButton.pdf * * * gdi * diff -Test_RadioButton.pdf * * * * fontations fuzzy=10,0.1,15 -Test_ResetButton.pdf * * * gdi * diff -Test_ResetButton.pdf * * * * fontations fuzzy=10,0.1,15 -Test_TextField.pdf * * * gdi * diff -Test_TextField.pdf * * * * fontations fuzzy=10,0.1,15 -TimeField.pdf * * * gdi * diff -TimeField.pdf * * * * fontations fuzzy=10,0.1,15 -action_execute_a_menu_item.pdf * * * gdi * diff -action_hide_show_form.pdf * * * gdi * diff -action_on_focus.pdf * * * gdi * diff -action_reset.pdf * * * gdi * diff -action_run_javascript.pdf * * * gdi * diff -action_submit_a_form.pdf * * * gdi * diff -all_trigger_browsefordoc.pdf * * * gdi * diff -all_trigger_browsefordoc.pdf * * * * fontations diff -all_trigger_browsefordoc.pdf * * * * * fuzzy -all_trigger_browsefordoc.pdf mac * * skia * fuzzy -all_trigger_newdoc.pdf * * * gdi * diff -all_trigger_newdoc.pdf * * * * fontations fuzzy=10,0.1,15 -all_trigger_newdoc.pdf mac * * skia * fuzzy -all_trigger_run_js_lunchurl.pdf * * * gdi * diff -all_trigger_run_js_maildoc.pdf * * * gdi * diff -annotation_highlight_author_content.pdf * * * gdi * diff -annotation_highlight_long_content.pdf * * * gdi * diff -annotation_highlight_no_author.pdf * * * gdi * diff -app_launchurl.pdf * * * gdi * diff -bi.pdf * * * gdi * diff -bi.pdf mac * * skia * fuzzy -bug_434.pdf * * * gdi * diff -bug_434.pdf * * * * fontations diff -bug_440132.pdf * * * gdi * diff -calculate_average.pdf * * * gdi * diff -calculate_sum_a_b_c.pdf * * * gdi * diff -calculate_validate.pdf * * * gdi * diff -check_box_no_color.pdf * * * gdi * diff -combo_box_format.pdf * * * gdi * diff -date.pdf * * * gdi * diff -event.change.pdf * * * gdi * diff -event.changeex.pdf * * * gdi * diff -event.keydown.pdf * * * gdi * diff -event.keydown_1_.pdf * * * gdi * diff -event.shift.pdf * * * gdi * diff -event.type_name.pdf * * * gdi * diff -event.value.pdf * * * gdi * diff -event_change.pdf * * * gdi * diff -event_fieldfull.pdf * * * gdi * diff -event_fieldfull_1_.pdf * * * gdi * diff -example_014.pdf * * * gdi * diff -example_054.pdf * * * gdi * diff -form_button0.pdf * * * gdi * diff -form_button0.pdf mac * * skia * fuzzy -form_button1.pdf * * * gdi * diff -form_button1.pdf mac * * skia * fuzzy -form_button10.pdf * * * gdi * diff -form_button10.pdf mac * * skia * fuzzy -form_button2.pdf * * * gdi * diff -form_button2.pdf mac * * skia * fuzzy -form_button3.pdf * * * gdi * diff -form_button3.pdf mac * * skia * fuzzy -form_button4.pdf * * * gdi * diff -form_button4.pdf mac * * skia * fuzzy -form_button5.pdf * * * gdi * diff -form_button5.pdf mac * * skia * fuzzy -form_button7.pdf * * * gdi * diff -form_button7.pdf mac * * skia * fuzzy -form_button8.pdf * * * gdi * diff -form_button8.pdf mac * * skia * fuzzy -form_button9.pdf * * * gdi * diff -form_button9.pdf mac * * skia * fuzzy -form_checkbox.pdf * * * gdi * diff -form_checkbox1.pdf * * * gdi * diff -form_checkbox2.pdf * * * gdi * diff -form_checkbox3.pdf * * * gdi * diff -form_combobox_date.pdf * * * gdi * diff -form_combobox_date2.pdf * * * gdi * diff -form_combobox_num.pdf * * * gdi * diff -form_combobox_per.pdf * * * gdi * diff -form_combobox_plus.pdf * * * gdi * diff -form_combobox_product.pdf * * * gdi * diff -form_combobox_time.pdf * * * gdi * diff -form_radio.pdf * * * gdi * diff -form_same.pdf * * * gdi * diff -form_textfield_focused_ltr.in * * * gdi * diff -form_textfield_focused_ltr.in * * * * fontations fuzzy=10,0.1,15 -form_textfield_focused_rtl.in * * * gdi * diff -form_textfield_focused_rtl.in * * * * fontations fuzzy=10,0.1,15 -form_textfield_selected_ltr.in * * * gdi * diff -form_textfield_selected_rtl.in * * * gdi * diff -format_alert_box.pdf * * * gdi * diff -format_combo_box.pdf * * * gdi * diff -format_custom_format.pdf * * * gdi * diff -format_date.pdf * * * gdi * diff -format_number.pdf * * * gdi * diff -format_percentage.pdf * * * gdi * diff -format_special.pdf * * * gdi * diff -format_text_color.pdf * * * gdi * diff -getarray.pdf * * * gdi * diff -js_value_chack_box.pdf * * * gdi * diff -negative.pdf * * * gdi * diff -new_certify1.pdf * * * gdi * diff -new_signature1.pdf * * * gdi * diff -new_signature2.pdf * * * gdi * diff -none.pdf * * * gdi * diff -open_a_weblink.pdf * * * gdi * diff -percentage.pdf * * * gdi * diff -rotate.pdf * * * gdi * diff -show_1.pdf * * * gdi * diff -simplified_field_notation.pdf * * * gdi * diff -special.pdf * * * gdi * diff -submit_form.pdf * * * gdi * diff -text_field_font_input_decimal_point.pdf * * * gdi * diff -text_field_multiline_line_spacing.pdf * * * gdi * diff -time.pdf * * * gdi * diff -validate_alert_box.pdf * * * gdi * diff -widget_javascript.pdf * * * gdi * diff +Date_FormCale.pdf * * gdi * diff +Date_FormCale.pdf * * * fontations fuzzy=10,0.1,15 +FRC_3.5_P__3648_Password_1.pdf * * gdi * diff +FRC_3.5_P__3648_Password_1.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.4.1_Annotations_AP_N_R.D_.pdf * * gdi * diff +FRC_8.4.1_Annotations_AP_N_R.D_.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.4.1_Annotations_AS_Off_.pdf * * gdi * diff +FRC_8.4.1_Annotations_AS_Off_.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.4.1_Annotations_AS_Yes_.pdf * * gdi * diff +FRC_8.4.1_Annotations_AS_Yes_.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.5_Bl_Hide.pdf * * gdi * diff +FRC_8.5_Bl_Hide.pdf * * * fontations diff +FRC_8.5_E_GoTo_D.pdf * * gdi * diff +FRC_8.5_E_GoTo_D.pdf * * * fontations diff +FRC_8.5_Fo_URI_Base.pdf * * gdi * diff +FRC_8.5_Fo_URI_Base.pdf * * * fontations diff +FRC_8.5_U_GoToR_NewWindow.pdf * * gdi * diff +FRC_8.5_U_GoToR_NewWindow.pdf * * * fontations diff +FRC_8.5_U_GoToR_NewWindow_2.pdf * * gdi * diff +FRC_8.5_U_GoToR_NewWindow_2.pdf * * * fontations diff +FRC_8.5_Widget_C.pdf * * gdi * diff +FRC_8.5_Widget_C.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.5_Widget_F.pdf * * gdi * diff +FRC_8.5_Widget_K.pdf * * gdi * diff +FRC_8.5_Widget_K.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.5_Widget_V.pdf * * gdi * diff +FRC_8.5_Widget_V.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.5_X_GoToR_D.pdf * * gdi * diff +FRC_8.5_X_GoToR_D.pdf * * * fontations diff +Line_Stroke.pdf * * gdi * diff +Line_Stroke.pdf * * * fontations fuzzy=10,0.1,15 +Oneof1.pdf * * gdi * diff +Oneof1.pdf * * * fontations fuzzy=10,0.1,15 +Oneof2.pdf * * gdi * diff +Oneof2.pdf * * * fontations fuzzy=10,0.1,15 +PagePosition_any_rest.pdf * * gdi * diff +PagePosition_any_rest.pdf * * * fontations fuzzy=10,0.1,15 +PagePosition_first.pdf * * gdi * diff +PagePosition_first.pdf * * * fontations diff +PagePosition_last.pdf * * gdi * diff +PagePosition_last.pdf * * * fontations diff +PagePosition_no_any.pdf * * gdi * diff +PagePosition_no_any.pdf * * * fontations fuzzy=10,0.1,15 +PagePosition_rest.pdf * * gdi * diff +PagePosition_rest.pdf * * * fontations fuzzy=10,0.1,15 +PagePosition_rest_any.pdf * * gdi * diff +PagePosition_rest_any.pdf * * * fontations fuzzy=10,0.1,15 +Test_DateField_locale_en_CA.pdf * * gdi * diff +Test_DateField_locale_en_CA.pdf * * * fontations fuzzy=10,0.1,15 +Test_DateField_locale_en_GB.pdf * * gdi * diff +Test_DateField_locale_en_GB.pdf * * * fontations fuzzy=10,0.1,15 +Test_DateField_locale_en_US.pdf * * gdi * diff +Test_DateField_locale_en_US.pdf * * * fontations fuzzy=10,0.1,15 +Test_DateField_locale_fr_CA.pdf * * gdi * diff +Test_DateField_locale_fr_CA.pdf * * * fontations fuzzy=10,0.1,15 +Test_DateField_locale_fr_FR.pdf * * gdi * diff +Test_DateField_locale_fr_FR.pdf * * * fontations fuzzy=10,0.1,15 +Test_DateField_locale_nl_NL.pdf * * gdi * diff +Test_DateField_locale_nl_NL.pdf * * * fontations fuzzy=10,0.1,15 +Test_DateField_locale_zh_CN.pdf * * gdi * diff +Test_DateField_locale_zh_CN.pdf * * * fontations fuzzy=10,0.1,15 +Test_DateField_locale_zh_HK.pdf * * gdi * diff +Test_Drop_downList.pdf * * gdi * diff +Test_Drop_downList.pdf * * * fontations fuzzy=10,0.1,15 +Test_NumericField.pdf * * gdi * diff +Test_NumericField.pdf * * * fontations fuzzy=10,0.1,15 +Test_PasswordField.pdf * * gdi * diff +Test_PasswordField.pdf * * * fontations fuzzy=10,0.1,15 +Test_RadioButton.pdf * * gdi * diff +Test_RadioButton.pdf * * * fontations fuzzy=10,0.1,15 +Test_ResetButton.pdf * * gdi * diff +Test_ResetButton.pdf * * * fontations fuzzy=10,0.1,15 +Test_TextField.pdf * * gdi * diff +Test_TextField.pdf * * * fontations fuzzy=10,0.1,15 +TimeField.pdf * * gdi * diff +TimeField.pdf * * * fontations fuzzy=10,0.1,15 +action_execute_a_menu_item.pdf * * gdi * diff +action_hide_show_form.pdf * * gdi * diff +action_on_focus.pdf * * gdi * diff +action_reset.pdf * * gdi * diff +action_run_javascript.pdf * * gdi * diff +action_submit_a_form.pdf * * gdi * diff +all_trigger_browsefordoc.pdf * * gdi * diff +all_trigger_browsefordoc.pdf * * * fontations diff +all_trigger_browsefordoc.pdf * * * * fuzzy +all_trigger_browsefordoc.pdf mac * skia * fuzzy +all_trigger_newdoc.pdf * * gdi * diff +all_trigger_newdoc.pdf * * * fontations fuzzy=10,0.1,15 +all_trigger_newdoc.pdf mac * skia * fuzzy +all_trigger_run_js_lunchurl.pdf * * gdi * diff +all_trigger_run_js_maildoc.pdf * * gdi * diff +annotation_highlight_author_content.pdf * * gdi * diff +annotation_highlight_long_content.pdf * * gdi * diff +annotation_highlight_no_author.pdf * * gdi * diff +app_launchurl.pdf * * gdi * diff +bi.pdf * * gdi * diff +bi.pdf mac * skia * fuzzy +bug_434.pdf * * gdi * diff +bug_434.pdf * * * fontations diff +bug_440132.pdf * * gdi * diff +calculate_average.pdf * * gdi * diff +calculate_sum_a_b_c.pdf * * gdi * diff +calculate_validate.pdf * * gdi * diff +check_box_no_color.pdf * * gdi * diff +combo_box_format.pdf * * gdi * diff +date.pdf * * gdi * diff +event.change.pdf * * gdi * diff +event.changeex.pdf * * gdi * diff +event.keydown.pdf * * gdi * diff +event.keydown_1_.pdf * * gdi * diff +event.shift.pdf * * gdi * diff +event.type_name.pdf * * gdi * diff +event.value.pdf * * gdi * diff +event_change.pdf * * gdi * diff +event_fieldfull.pdf * * gdi * diff +event_fieldfull_1_.pdf * * gdi * diff +example_014.pdf * * gdi * diff +example_054.pdf * * gdi * diff +form_button0.pdf * * gdi * diff +form_button0.pdf mac * skia * fuzzy +form_button1.pdf * * gdi * diff +form_button1.pdf mac * skia * fuzzy +form_button10.pdf * * gdi * diff +form_button10.pdf mac * skia * fuzzy +form_button2.pdf * * gdi * diff +form_button2.pdf mac * skia * fuzzy +form_button3.pdf * * gdi * diff +form_button3.pdf mac * skia * fuzzy +form_button4.pdf * * gdi * diff +form_button4.pdf mac * skia * fuzzy +form_button5.pdf * * gdi * diff +form_button5.pdf mac * skia * fuzzy +form_button7.pdf * * gdi * diff +form_button7.pdf mac * skia * fuzzy +form_button8.pdf * * gdi * diff +form_button8.pdf mac * skia * fuzzy +form_button9.pdf * * gdi * diff +form_button9.pdf mac * skia * fuzzy +form_checkbox.pdf * * gdi * diff +form_checkbox1.pdf * * gdi * diff +form_checkbox2.pdf * * gdi * diff +form_checkbox3.pdf * * gdi * diff +form_combobox_date.pdf * * gdi * diff +form_combobox_date2.pdf * * gdi * diff +form_combobox_num.pdf * * gdi * diff +form_combobox_per.pdf * * gdi * diff +form_combobox_plus.pdf * * gdi * diff +form_combobox_product.pdf * * gdi * diff +form_combobox_time.pdf * * gdi * diff +form_radio.pdf * * gdi * diff +form_same.pdf * * gdi * diff +form_textfield_focused_ltr.in * * gdi * diff +form_textfield_focused_ltr.in * * * fontations fuzzy=10,0.1,15 +form_textfield_focused_rtl.in * * gdi * diff +form_textfield_focused_rtl.in * * * fontations fuzzy=10,0.1,15 +form_textfield_selected_ltr.in * * gdi * diff +form_textfield_selected_rtl.in * * gdi * diff +format_alert_box.pdf * * gdi * diff +format_combo_box.pdf * * gdi * diff +format_custom_format.pdf * * gdi * diff +format_date.pdf * * gdi * diff +format_number.pdf * * gdi * diff +format_percentage.pdf * * gdi * diff +format_special.pdf * * gdi * diff +format_text_color.pdf * * gdi * diff +getarray.pdf * * gdi * diff +js_value_chack_box.pdf * * gdi * diff +negative.pdf * * gdi * diff +new_certify1.pdf * * gdi * diff +new_signature1.pdf * * gdi * diff +new_signature2.pdf * * gdi * diff +none.pdf * * gdi * diff +open_a_weblink.pdf * * gdi * diff +percentage.pdf * * gdi * diff +rotate.pdf * * gdi * diff +show_1.pdf * * gdi * diff +simplified_field_notation.pdf * * gdi * diff +special.pdf * * gdi * diff +submit_form.pdf * * gdi * diff +text_field_font_input_decimal_point.pdf * * gdi * diff +text_field_multiline_line_spacing.pdf * * gdi * diff +time.pdf * * gdi * diff +validate_alert_box.pdf * * gdi * diff +widget_javascript.pdf * * gdi * diff # TODO(crbug.com/42271068): Remove after associated bug is fixed -1_10_watermark.pdf * * * gdi_skia * diff -1_10_watermark.pdf * * * * fontations fuzzy=10,0.1,15 -1_10_watermark.pdf * * * skia * fuzzy -1_matrix.pdf * * * gdi * diff -2_color_tiling.pdf * * * gdi * diff -2_shading_type_6_00.pdf * * * gdi_skia * diff -2_shading_type_6_001.pdf * * * gdi_skia * diff -2_uncolor_tiling.pdf * * * gdi * diff -FRC_11_8.2.4_View_edit.pdf * * * gdi * diff -FRC_11_8.2.4_View_edit.pdf * * * * fontations diff -FRC_11_8.2.4_View_edit.pdf * * * * * fuzzy -FRC_11_8.2.4_View_edit.pdf mac * * skia * fuzzy -FRC_12_8.2.4_View_remove_all.pdf * * * gdi * diff -FRC_12_8.2.4_View_remove_all.pdf * * * * fontations diff -FRC_12_8.2.4_View_remove_all.pdf * * * * * fuzzy -FRC_12_8.2.4_View_remove_all.pdf mac * * skia * fuzzy -FRC_13_8.2.4_View_remove_value.pdf * * * gdi * diff -FRC_13_8.2.4_View_remove_value.pdf * * * * fontations diff -FRC_13_8.2.4_View_remove_value.pdf * * * * * fuzzy -FRC_13_8.2.4_View_remove_value.pdf mac * * skia * fuzzy -FRC_14_8.2.4_Sort_remove_all.pdf * * * gdi * diff -FRC_14_8.2.4_Sort_remove_all.pdf * * * * fontations diff -FRC_14_8.2.4_Sort_remove_all.pdf * * * * * fuzzy -FRC_14_8.2.4_Sort_remove_all.pdf mac * * skia * fuzzy -FRC_15_8.2.4_Sort_remove_value.pdf * * * gdi * diff -FRC_15_8.2.4_Sort_remove_value.pdf * * * * fontations diff -FRC_15_8.2.4_Sort_remove_value.pdf * * * * * fuzzy -FRC_15_8.2.4_Sort_remove_value.pdf mac * * skia * fuzzy -FRC_1_8.2.4_Type_8.6_.pdf * * * gdi * diff -FRC_1_8.2.4_Type_8.6_.pdf * * * * fontations diff -FRC_1_8.2.4_Type_8.6_.pdf * * * * * fuzzy -FRC_1_8.2.4_Type_8.6_.pdf mac * * skia * fuzzy -FRC_2_8.2.4_Type_8.6__remove_value.pdf * * * gdi * diff -FRC_2_8.2.4_Type_8.6__remove_value.pdf * * * * fontations diff -FRC_2_8.2.4_Type_8.6__remove_value.pdf * * * * * fuzzy -FRC_2_8.2.4_Type_8.6__remove_value.pdf mac * * skia * fuzzy -FRC_3.5_AuthEvent_EFOpen.pdf * * * gdi * diff -FRC_3.5_AuthEvent_EFOpen.pdf * * * * fontations diff -FRC_3.5_AuthEvent_EFOpen.pdf mac * * skia * fuzzy -FRC_3.5_CFM_AESV2__EncryptMetadata_F.pdf * * * gdi * diff -FRC_3.5_CFM_AESV2__EncryptMetadata_F.pdf * * * * fontations diff -FRC_3.5_CFM_AESV2__EncryptMetadata_F.pdf mac * * skia * fuzzy -FRC_3.5_CF_EFF_StdCF_Strf_Stmf_Identity.pdf * * * gdi * diff -FRC_3.5_CF_EFF_StdCF_Strf_Stmf_Identity.pdf * * * * fontations diff -FRC_3.5_CF_EFF_StdCF_Strf_Stmf_Identity.pdf mac * * skia * fuzzy -FRC_3.5_CF_Strf_stmf_StdCF.pdf * * * gdi * diff -FRC_3.5_CF_Strf_stmf_StdCF.pdf * * * * fontations diff -FRC_3.5_CF_Strf_stmf_StdCF.pdf mac * * skia * fuzzy -FRC_3.5_EncryptMetadata_None.pdf * * * gdi * diff -FRC_3.5_EncryptMetadata_None.pdf * * * * fontations diff -FRC_3.5_EncryptMetadata_None.pdf mac * * skia * fuzzy -FRC_3.5_V_4_CFM_V2_.pdf * * * gdi * diff -FRC_3.5_V_4_CFM_V2_.pdf * * * * fontations diff -FRC_3.5_V_4_CFM_V2_.pdf mac * * skia * fuzzy -FRC_3.5_V_5_CFM_AESV3.pdf * * * gdi * diff -FRC_3.5_V_5_CFM_AESV3.pdf * * * * fontations diff -FRC_3.5_V_5_CFM_AESV3.pdf mac * * skia * fuzzy -FRC_3.5_v_1_length_40_Filter_standard.pdf * * * gdi * diff -FRC_3.5_v_1_length_40_Filter_standard.pdf * * * * fontations diff -FRC_3.5_v_1_length_40_Filter_standard.pdf mac * * skia * fuzzy -FRC_3.5_v_2_length_128_AuthEvent_DocOpen_.pdf * * * gdi * diff -FRC_3.5_v_2_length_128_AuthEvent_DocOpen_.pdf * * * * fontations diff -FRC_3.5_v_2_length_128_AuthEvent_DocOpen_.pdf mac * * skia * fuzzy -FRC_3_8.2.4_Type_8.6__edit_.pdf * * * gdi * diff -FRC_3_8.2.4_Type_8.6__edit_.pdf * * * * fontations diff -FRC_3_8.2.4_Type_8.6__edit_.pdf * * * * * fuzzy -FRC_3_8.2.4_Type_8.6__edit_.pdf mac * * skia * fuzzy -FRC_4.5.5_Pattern_shading.pdf * * * gdi * diff -FRC_4.5.5_Pattern_shading.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_4.5.5_Pattern_shading.pdf mac * * skia * fuzzy -FRC_4.5.5_Pattern_tiling.pdf * * * gdi_skia * diff -FRC_4.5.5_Pattern_tiling.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_4_8.2.4_Schema_8.6__remove_all.pdf * * * gdi * diff -FRC_4_8.2.4_Schema_8.6__remove_all.pdf * * * * fontations diff -FRC_4_8.2.4_Schema_8.6__remove_all.pdf * * * * * fuzzy -FRC_4_8.2.4_Schema_8.6__remove_all.pdf mac * * skia * fuzzy -FRC_5_8.2.4_Schema_8.6__remove_value.pdf * * * gdi * diff -FRC_5_8.2.4_Schema_8.6__remove_value.pdf * * * * fontations diff -FRC_5_8.2.4_Schema_8.6__remove_value.pdf * * * * * fuzzy -FRC_5_8.2.4_Schema_8.6__remove_value.pdf mac * * skia * fuzzy -FRC_6_8.2.4_Schema_8.6__remove_obj.pdf * * * gdi * diff -FRC_6_8.2.4_Schema_8.6__remove_obj.pdf * * * * fontations diff -FRC_6_8.2.4_Schema_8.6__remove_obj.pdf * * * * * fuzzy -FRC_6_8.2.4_Schema_8.6__remove_obj.pdf mac * * skia * fuzzy -FRC_7_8.2.4_View_H.pdf * * * gdi * diff -FRC_7_8.2.4_View_H.pdf * * * * fontations diff -FRC_7_8.2.4_View_H.pdf * * * * * fuzzy -FRC_7_8.2.4_View_H.pdf mac * * skia * fuzzy -FRC_8_8.2.4_View_D.pdf * * * gdi * diff -FRC_8_8.2.4_View_D.pdf * * * * fontations diff -FRC_8_8.2.4_View_D.pdf * * * * * fuzzy -FRC_8_8.2.4_View_D.pdf mac * * skia * fuzzy -FRC_9_8.2.4_View_T.pdf * * * gdi * diff -FRC_9_8.2.4_View_T.pdf * * * * fontations diff -FRC_9_8.2.4_View_T.pdf * * * * * fuzzy -FRC_9_8.2.4_View_T.pdf mac * * skia * fuzzy -annotation_circle_fill_opacity.pdf * * * gdi_skia * diff -annotation_circle_fill_opacity.pdf * * * * fontations fuzzy=10,0.1,15 -annotation_circle_fill_opacity.pdf mac * * skia * fuzzy -annotation_square_fill_opacity.pdf * * * gdi_skia * diff -annotation_square_fill_opacity.pdf * * * * fontations fuzzy=10,0.1,15 -annotation_square_fill_opacity.pdf mac * * skia * fuzzy -annotation_square_fill_opacity_dash.pdf * * * gdi_skia * diff -annotation_square_fill_opacity_dash.pdf * * * * fontations fuzzy=10,0.1,15 -annotation_square_fill_opacity_dash.pdf mac * * skia * fuzzy -bug_0_length_line.pdf * * * gdi * diff -bug_883026.pdf * * * gdi_skia * diff -bug_883026.pdf * * * * fontations fuzzy=10,0.1,15 -clipping_text.pdf * * * gdi * diff -clipping_text.pdf * * * * fontations fuzzy=10,0.1,15 -en_fqa.pdf * * * gdi_skia * diff -en_introduce.pdf * * * gdi_skia * diff -en_system.pdf * * * gdi * diff -en_system.pdf mac * * skia * fuzzy -example_012.pdf * * * gdi * diff -gradient_many_stops.pdf * * * gdi * diff -group_xobject.pdf * * * gdi * diff -group_xobject.pdf * * * * fontations fuzzy=10,0.1,15 -image_gif.pdf * * * gdi_skia * diff -image_gif.pdf mac * * skia * fuzzy -image_ico.pdf * * * gdi_skia * diff -new_pdfsign1.pdf * * * gdi_skia * diff -new_pdfsign2.pdf * * * gdi_skia * diff -new_pdfsign3.pdf * * * gdi_skia * diff -new_pdfsign3.pdf * * * * * fuzzy -new_pdfsign4.pdf * * * gdi_skia * diff -new_stamp3.pdf * * * gdi_skia * diff -new_stamp3.pdf * * * * * fuzzy -new_stamp3.pdf mac * * skia * fuzzy -path_10_jd.pdf * * * gdi * diff -path_5_pattern.pdf * * * gdi * diff -path_7.pdf * * * gdi * diff -path_9.pdf * * * gdi * diff -transformation.pdf * * * gdi * diff -transparent1.pdf * * * gdi_skia * diff -xfermodes.pdf * * * gdi_skia * diff -xfermodes2.pdf * * * gdi * diff -xfermodes3.pdf * * * gdi_skia * diff +1_10_watermark.pdf * * gdi_skia * diff +1_10_watermark.pdf * * * fontations fuzzy=10,0.1,15 +1_10_watermark.pdf * * skia * fuzzy +1_matrix.pdf * * gdi * diff +2_color_tiling.pdf * * gdi * diff +2_shading_type_6_00.pdf * * gdi_skia * diff +2_shading_type_6_001.pdf * * gdi_skia * diff +2_uncolor_tiling.pdf * * gdi * diff +FRC_11_8.2.4_View_edit.pdf * * gdi * diff +FRC_11_8.2.4_View_edit.pdf * * * fontations diff +FRC_11_8.2.4_View_edit.pdf * * * * fuzzy +FRC_11_8.2.4_View_edit.pdf mac * skia * fuzzy +FRC_12_8.2.4_View_remove_all.pdf * * gdi * diff +FRC_12_8.2.4_View_remove_all.pdf * * * fontations diff +FRC_12_8.2.4_View_remove_all.pdf * * * * fuzzy +FRC_12_8.2.4_View_remove_all.pdf mac * skia * fuzzy +FRC_13_8.2.4_View_remove_value.pdf * * gdi * diff +FRC_13_8.2.4_View_remove_value.pdf * * * fontations diff +FRC_13_8.2.4_View_remove_value.pdf * * * * fuzzy +FRC_13_8.2.4_View_remove_value.pdf mac * skia * fuzzy +FRC_14_8.2.4_Sort_remove_all.pdf * * gdi * diff +FRC_14_8.2.4_Sort_remove_all.pdf * * * fontations diff +FRC_14_8.2.4_Sort_remove_all.pdf * * * * fuzzy +FRC_14_8.2.4_Sort_remove_all.pdf mac * skia * fuzzy +FRC_15_8.2.4_Sort_remove_value.pdf * * gdi * diff +FRC_15_8.2.4_Sort_remove_value.pdf * * * fontations diff +FRC_15_8.2.4_Sort_remove_value.pdf * * * * fuzzy +FRC_15_8.2.4_Sort_remove_value.pdf mac * skia * fuzzy +FRC_1_8.2.4_Type_8.6_.pdf * * gdi * diff +FRC_1_8.2.4_Type_8.6_.pdf * * * fontations diff +FRC_1_8.2.4_Type_8.6_.pdf * * * * fuzzy +FRC_1_8.2.4_Type_8.6_.pdf mac * skia * fuzzy +FRC_2_8.2.4_Type_8.6__remove_value.pdf * * gdi * diff +FRC_2_8.2.4_Type_8.6__remove_value.pdf * * * fontations diff +FRC_2_8.2.4_Type_8.6__remove_value.pdf * * * * fuzzy +FRC_2_8.2.4_Type_8.6__remove_value.pdf mac * skia * fuzzy +FRC_3.5_AuthEvent_EFOpen.pdf * * gdi * diff +FRC_3.5_AuthEvent_EFOpen.pdf * * * fontations diff +FRC_3.5_AuthEvent_EFOpen.pdf mac * skia * fuzzy +FRC_3.5_CFM_AESV2__EncryptMetadata_F.pdf * * gdi * diff +FRC_3.5_CFM_AESV2__EncryptMetadata_F.pdf * * * fontations diff +FRC_3.5_CFM_AESV2__EncryptMetadata_F.pdf mac * skia * fuzzy +FRC_3.5_CF_EFF_StdCF_Strf_Stmf_Identity.pdf * * gdi * diff +FRC_3.5_CF_EFF_StdCF_Strf_Stmf_Identity.pdf * * * fontations diff +FRC_3.5_CF_EFF_StdCF_Strf_Stmf_Identity.pdf mac * skia * fuzzy +FRC_3.5_CF_Strf_stmf_StdCF.pdf * * gdi * diff +FRC_3.5_CF_Strf_stmf_StdCF.pdf * * * fontations diff +FRC_3.5_CF_Strf_stmf_StdCF.pdf mac * skia * fuzzy +FRC_3.5_EncryptMetadata_None.pdf * * gdi * diff +FRC_3.5_EncryptMetadata_None.pdf * * * fontations diff +FRC_3.5_EncryptMetadata_None.pdf mac * skia * fuzzy +FRC_3.5_V_4_CFM_V2_.pdf * * gdi * diff +FRC_3.5_V_4_CFM_V2_.pdf * * * fontations diff +FRC_3.5_V_4_CFM_V2_.pdf mac * skia * fuzzy +FRC_3.5_V_5_CFM_AESV3.pdf * * gdi * diff +FRC_3.5_V_5_CFM_AESV3.pdf * * * fontations diff +FRC_3.5_V_5_CFM_AESV3.pdf mac * skia * fuzzy +FRC_3.5_v_1_length_40_Filter_standard.pdf * * gdi * diff +FRC_3.5_v_1_length_40_Filter_standard.pdf * * * fontations diff +FRC_3.5_v_1_length_40_Filter_standard.pdf mac * skia * fuzzy +FRC_3.5_v_2_length_128_AuthEvent_DocOpen_.pdf * * gdi * diff +FRC_3.5_v_2_length_128_AuthEvent_DocOpen_.pdf * * * fontations diff +FRC_3.5_v_2_length_128_AuthEvent_DocOpen_.pdf mac * skia * fuzzy +FRC_3_8.2.4_Type_8.6__edit_.pdf * * gdi * diff +FRC_3_8.2.4_Type_8.6__edit_.pdf * * * fontations diff +FRC_3_8.2.4_Type_8.6__edit_.pdf * * * * fuzzy +FRC_3_8.2.4_Type_8.6__edit_.pdf mac * skia * fuzzy +FRC_4.5.5_Pattern_shading.pdf * * gdi * diff +FRC_4.5.5_Pattern_shading.pdf * * * fontations fuzzy=10,0.1,15 +FRC_4.5.5_Pattern_shading.pdf mac * skia * fuzzy +FRC_4.5.5_Pattern_tiling.pdf * * gdi_skia * diff +FRC_4.5.5_Pattern_tiling.pdf * * * fontations fuzzy=10,0.1,15 +FRC_4_8.2.4_Schema_8.6__remove_all.pdf * * gdi * diff +FRC_4_8.2.4_Schema_8.6__remove_all.pdf * * * fontations diff +FRC_4_8.2.4_Schema_8.6__remove_all.pdf * * * * fuzzy +FRC_4_8.2.4_Schema_8.6__remove_all.pdf mac * skia * fuzzy +FRC_5_8.2.4_Schema_8.6__remove_value.pdf * * gdi * diff +FRC_5_8.2.4_Schema_8.6__remove_value.pdf * * * fontations diff +FRC_5_8.2.4_Schema_8.6__remove_value.pdf * * * * fuzzy +FRC_5_8.2.4_Schema_8.6__remove_value.pdf mac * skia * fuzzy +FRC_6_8.2.4_Schema_8.6__remove_obj.pdf * * gdi * diff +FRC_6_8.2.4_Schema_8.6__remove_obj.pdf * * * fontations diff +FRC_6_8.2.4_Schema_8.6__remove_obj.pdf * * * * fuzzy +FRC_6_8.2.4_Schema_8.6__remove_obj.pdf mac * skia * fuzzy +FRC_7_8.2.4_View_H.pdf * * gdi * diff +FRC_7_8.2.4_View_H.pdf * * * fontations diff +FRC_7_8.2.4_View_H.pdf * * * * fuzzy +FRC_7_8.2.4_View_H.pdf mac * skia * fuzzy +FRC_8_8.2.4_View_D.pdf * * gdi * diff +FRC_8_8.2.4_View_D.pdf * * * fontations diff +FRC_8_8.2.4_View_D.pdf * * * * fuzzy +FRC_8_8.2.4_View_D.pdf mac * skia * fuzzy +FRC_9_8.2.4_View_T.pdf * * gdi * diff +FRC_9_8.2.4_View_T.pdf * * * fontations diff +FRC_9_8.2.4_View_T.pdf * * * * fuzzy +FRC_9_8.2.4_View_T.pdf mac * skia * fuzzy +annotation_circle_fill_opacity.pdf * * gdi_skia * diff +annotation_circle_fill_opacity.pdf * * * fontations fuzzy=10,0.1,15 +annotation_circle_fill_opacity.pdf mac * skia * fuzzy +annotation_square_fill_opacity.pdf * * gdi_skia * diff +annotation_square_fill_opacity.pdf * * * fontations fuzzy=10,0.1,15 +annotation_square_fill_opacity.pdf mac * skia * fuzzy +annotation_square_fill_opacity_dash.pdf * * gdi_skia * diff +annotation_square_fill_opacity_dash.pdf * * * fontations fuzzy=10,0.1,15 +annotation_square_fill_opacity_dash.pdf mac * skia * fuzzy +bug_0_length_line.pdf * * gdi * diff +bug_883026.pdf * * gdi_skia * diff +bug_883026.pdf * * * fontations fuzzy=10,0.1,15 +clipping_text.pdf * * gdi * diff +clipping_text.pdf * * * fontations fuzzy=10,0.1,15 +en_fqa.pdf * * gdi_skia * diff +en_introduce.pdf * * gdi_skia * diff +en_system.pdf * * gdi * diff +en_system.pdf mac * skia * fuzzy +example_012.pdf * * gdi * diff +gradient_many_stops.pdf * * gdi * diff +group_xobject.pdf * * gdi * diff +group_xobject.pdf * * * fontations fuzzy=10,0.1,15 +image_gif.pdf * * gdi_skia * diff +image_gif.pdf mac * skia * fuzzy +image_ico.pdf * * gdi_skia * diff +new_pdfsign1.pdf * * gdi_skia * diff +new_pdfsign2.pdf * * gdi_skia * diff +new_pdfsign3.pdf * * gdi_skia * diff +new_pdfsign3.pdf * * * * fuzzy +new_pdfsign4.pdf * * gdi_skia * diff +new_stamp3.pdf * * gdi_skia * diff +new_stamp3.pdf * * * * fuzzy +new_stamp3.pdf mac * skia * fuzzy +path_10_jd.pdf * * gdi * diff +path_5_pattern.pdf * * gdi * diff +path_7.pdf * * gdi * diff +path_9.pdf * * gdi * diff +transformation.pdf * * gdi * diff +transparent1.pdf * * gdi_skia * diff +xfermodes.pdf * * gdi_skia * diff +xfermodes2.pdf * * gdi * diff +xfermodes3.pdf * * gdi_skia * diff # # JavaScript tests # -bug_679642.in * * noxfa * * diff -bug_735912.in * * noxfa * * diff +bug_679642.in * nov8,v8 * * diff +bug_735912.in * nov8,v8 * * diff # xfa_specific # TODO(crbug.com/42270097): Remove after associated bug is fixed -resolve_nodes_1.pdf * * * * * diff +resolve_nodes_1.pdf * * * * diff # # Pixel tests # # TODO(crbug.com/475874968): Remove after the bug is fixed -alpha_composite.in * * * gdi * diff +alpha_composite.in * * gdi * diff # TODO(crbug.com/40643646): Remove after associated bug is fixed -bug_40643646.in * * * * * diff +bug_40643646.in * * * * diff # TODO(crbug.com/40721524): Remove after associated bug is fixed -bug_40721524.in * * * * * diff +bug_40721524.in * * * * diff # TODO(thestig): Remove after fixing inline image parsing. -bug_1236805.in * * * * * diff +bug_1236805.in * * * * diff # TODO(crbug.com/42270756): Remove after associated bug is fixed -bug_1258634.in * * * * * diff +bug_1258634.in * * * * diff # TODO(crbug.com/42270333): Remove after associated bug is fixed -bug_42270333.in * * * * * diff +bug_42270333.in * * * * diff # TODO(crbug.com/40860237): Remove after associated bug is fixed -bug_40860237.in mac * * agg * diff -bug_40860237.in * * * * fontations fuzzy=10,0.1,15 +bug_40860237.in mac * agg * diff +bug_40860237.in * * * fontations fuzzy=10,0.1,15 # This test is intentionally suppressed on Windows. Normally, Windows provides # the Symbol font, so this PDF would render correctly. However, in the hermetic # test environment, there is no Symbol font and the rendering is incorrect. -bug_1442723.in win * * * * diff -bug_1442723.in * * * * fontations fuzzy=10,0.1,15 +bug_1442723.in win * * * diff +bug_1442723.in * * * fontations fuzzy=10,0.1,15 # TODO(crbug.com/42270459): Remove after associated bug is fixed -bug_42270459_2.in * * * * * diff +bug_42270459_2.in * * * * diff # TODO(crbug.com/42270524): Remove after associated bug is fixed -bug_42270524.in * * * * * diff +bug_42270524.in * * * * diff # TODO(crbug.com/42270577): Remove after associated bug is fixed -bug_42270577.in * * * * * diff +bug_42270577.in * * * * diff # TODO(crbug.com/42270732): Remove after associated bug is fixed -bug_42270732.in * * * * * diff +bug_42270732.in * * * * diff # TODO(crbug.com/42270979): Remove after associated bug is fixed -bug_42270979_1.in * * * agg * diff -bug_42270979_2.in * * * agg * diff -bug_42270979_3.in * * * agg * diff +bug_42270979_1.in * * agg * diff +bug_42270979_2.in * * agg * diff +bug_42270979_3.in * * agg * diff # TODO(crbug.com/42270980): Remove after associated bug is fixed -bug_42270980.in * * * * * diff +bug_42270980.in * * * * diff # TODO(crbug.com/42271010): Remove after associated bug is fixed -bug_42271010.pdf * * * * * diff +bug_42271010.pdf * * * * diff # TODO(crbug.com/41010502): Remove after associated bug is fixed -bug_41010502_1.in * * * * * diff +bug_41010502_1.in * * * * diff # TODO(crbug.com/346766787): Remove after associated bug is fixed -bug_346766787.in * * * * * diff +bug_346766787.in * * * * diff # TODO(crbug.com/394767650): Remove after associated bug is fixed -bug_394767650.in * * * * * diff +bug_394767650.in * * * * diff # TODO(crbug.com/41153500): Remove after associated bug is fixed -bug_41153500.in * * * agg * diff +bug_41153500.in * * agg * diff # TODO(crbug.com/42271472): Remove after associated bug is fixed -bug_42271472.in * nov8 * * * diff +bug_42271472.in * nov8 * * diff # TODO(crbug.com/40040570, crbug.com/40040569): Remove after associated bug is # fixed -bug_40040570.in * * * skia * diff +bug_40040570.in * * skia * diff # TODO(crbug.com/41470360): Remove after associated bug is fixed -bug_41470360.in * * * agg * diff +bug_41470360.in * * agg * diff # TODO(crbug.com/42270756): Remove after associated bug is fixed -jpxdecode.in * * * * * diff -jpxdecode_without_bitspercomponent.in * * * * * diff -jpxdecode_without_colorspace.in * * * * * diff +jpxdecode.in * * * * diff +jpxdecode_without_bitspercomponent.in * * * * diff +jpxdecode_without_colorspace.in * * * * diff # TODO(crbug.com/40661120): Remove after associated bug is fixed -reset_button.in * * * * * diff +reset_button.in * * * * diff # TODO(crbug.com/479849565): Remove after associated bug is fixed -bug_479849565.in * * * agg * diff +bug_479849565.in * * agg * diff # xfa_specific # TODO(crbug.com/42270088): Remove after associated bug is fixed -bug_997412.in win * * * * diff +bug_997412.in win * * * diff # TODO(crbug.com/42270098): Remove after associated bug is fixed -standard_symbols.pdf * * * * * diff +standard_symbols.pdf * * * * diff # TODO(crbug.com/42270088): Remove after associated bug is fixed -xfa_example.in win * * * * diff +xfa_example.in win * * * diff # TODO(crbug.com/42270088): Remove after associated bug is fixed -xfa_textfield.in win * * * * diff -xfa_textfield.in mac * * skia * fuzzy +xfa_textfield.in win * * * diff +xfa_textfield.in mac * skia * fuzzy # GDI # TODO(crbug.com/42271066): Remove after associated bug is fixed -bug_1258968.in * * * gdi * diff -bug_1258968.in * * * skia * fuzzy -bug_1383708.in * * * gdi * diff -bug_1383708.in mac * * skia * fuzzy +bug_1258968.in * * gdi * diff +bug_1258968.in * * skia * fuzzy +bug_1383708.in * * gdi * diff +bug_1383708.in mac * skia * fuzzy # TODO(crbug.com/42271067): Remove after associated bug is fixed -barcode_test.pdf * * * gdi * diff -barcode_test.pdf * * * * fontations fuzzy=10,0.1,15 -bug_1026918.in * * * gdi * diff -bug_1072440.in * * * gdi * diff -bug_1072440.in * * * * fontations fuzzy=10,0.1,15 -bug_113910.in * * * gdi * diff -bug_1282.in * * * gdi * diff -bug_1286970.in * * * gdi * diff -bug_1304714.in * * * gdi * diff -bug_1337.in * * * gdi * diff -bug_1372651.in * * * gdi * diff -bug_1372651.in * * * * fontations fuzzy=10,0.1,15 -bug_477200528.in * * * gdi * diff -bug_477200528.in * * * * fontations fuzzy=10,0.1,15 -bug_725389.in * * * gdi * diff -bug_725389.in * * * * fontations fuzzy=10,0.1,15 -bug_733528.in * * * gdi * diff -bug_733528.in * * * * fontations fuzzy=10,0.1,15 -bug_736695_1.in * * * gdi * diff -bug_736695_2.in * * * gdi * diff -bug_736695_2.in * * * * fontations fuzzy=10,0.1,15 -bug_736695_3.in * * * gdi * diff -bug_736695_4.in * * * gdi * diff -bug_983137.in * * * gdi * diff -checkbox_radiobutton.in * * * gdi * diff -checkbox_radiobutton_hide.in * * * gdi * diff -checkbox_radiobutton_reset.in * * * gdi * diff -combobox_form.in * * * gdi * diff -dynamic_list_box_allow_multiple_selection.pdf * * * gdi * diff -dynamic_list_box_allow_multiple_selection.pdf * * * * fontations fuzzy=10,0.1,15 -dynamic_password_field_background_fill.pdf * * * gdi * diff -dynamic_password_field_background_fill.pdf mac * * skia * fuzzy -dynamic_password_field_background_fill.pdf * * * * fontations fuzzy=10,0.1,15 -dynamic_table_color_and_width.pdf * * * gdi * diff -dynamic_table_color_and_width.pdf * * * * fontations fuzzy=10,0.1,15 -password.in * * * gdi * diff -resolve_nodes_0.pdf * * * gdi * diff -resolve_nodes_0.pdf * * * * * fuzzy -resolve_nodes_0.pdf * * * * fontations fuzzy=10,0.1,15 -scrollable_widgets1.in * * * gdi * diff -scrollable_widgets2.in * * * gdi * diff -scrollable_widgets2.in * * * * fontations fuzzy=10,0.1,15 -static_list_box_caption.pdf * * * gdi * diff -static_list_box_caption.pdf * * * * fontations fuzzy=10,0.1,15 -static_password_field_rotate.pdf * * * gdi * diff -static_password_field_rotate.pdf * * * * fontations fuzzy=15,0.1,15 -text_form_custom_font.in * * * gdi * diff -text_form_multiline.in * * * gdi * diff -text_form_multiline.in * * * * fontations fuzzy=10,0.1,15 -xfa_bmp_image.in * * * gdi * diff -xfa_gif_image.in * * * gdi * diff -xfa_jpg_image.in * * * gdi * diff -xfa_node_caption.pdf * * * gdi * diff -xfa_node_caption.pdf * * * * fontations fuzzy=10,0.1,15 -xfa_node_caption.pdf mac * * skia * fuzzy -xfa_png_image.in * * * gdi * diff -xfa_rectangle_node.in * * * gdi * diff -xfa_tiff_image.in * * * gdi * diff -xfa_tiff_lzw_image.in * * * gdi * diff -xfa_tiff_packbits_image.in * * * gdi * diff +barcode_test.pdf * * gdi * diff +barcode_test.pdf * * * fontations fuzzy=10,0.1,15 +bug_1026918.in * * gdi * diff +bug_1072440.in * * gdi * diff +bug_1072440.in * * * fontations fuzzy=10,0.1,15 +bug_113910.in * * gdi * diff +bug_1282.in * * gdi * diff +bug_1286970.in * * gdi * diff +bug_1304714.in * * gdi * diff +bug_1337.in * * gdi * diff +bug_1372651.in * * gdi * diff +bug_1372651.in * * * fontations fuzzy=10,0.1,15 +bug_477200528.in * * gdi * diff +bug_477200528.in * * * fontations fuzzy=10,0.1,15 +bug_725389.in * * gdi * diff +bug_725389.in * * * fontations fuzzy=10,0.1,15 +bug_733528.in * * gdi * diff +bug_733528.in * * * fontations fuzzy=10,0.1,15 +bug_736695_1.in * * gdi * diff +bug_736695_2.in * * gdi * diff +bug_736695_2.in * * * fontations fuzzy=10,0.1,15 +bug_736695_3.in * * gdi * diff +bug_736695_4.in * * gdi * diff +bug_983137.in * * gdi * diff +checkbox_radiobutton.in * * gdi * diff +checkbox_radiobutton_hide.in * * gdi * diff +checkbox_radiobutton_reset.in * * gdi * diff +combobox_form.in * * gdi * diff +dynamic_list_box_allow_multiple_selection.pdf * * gdi * diff +dynamic_list_box_allow_multiple_selection.pdf * * * fontations fuzzy=10,0.1,15 +dynamic_password_field_background_fill.pdf * * gdi * diff +dynamic_password_field_background_fill.pdf mac * skia * fuzzy +dynamic_password_field_background_fill.pdf * * * fontations fuzzy=10,0.1,15 +dynamic_table_color_and_width.pdf * * gdi * diff +dynamic_table_color_and_width.pdf * * * fontations fuzzy=10,0.1,15 +password.in * * gdi * diff +resolve_nodes_0.pdf * * gdi * diff +resolve_nodes_0.pdf * * * * fuzzy +resolve_nodes_0.pdf * * * fontations fuzzy=10,0.1,15 +scrollable_widgets1.in * * gdi * diff +scrollable_widgets2.in * * gdi * diff +scrollable_widgets2.in * * * fontations fuzzy=10,0.1,15 +static_list_box_caption.pdf * * gdi * diff +static_list_box_caption.pdf * * * fontations fuzzy=10,0.1,15 +static_password_field_rotate.pdf * * gdi * diff +static_password_field_rotate.pdf * * * fontations fuzzy=15,0.1,15 +text_form_custom_font.in * * gdi * diff +text_form_multiline.in * * gdi * diff +text_form_multiline.in * * * fontations fuzzy=10,0.1,15 +xfa_bmp_image.in * * gdi * diff +xfa_gif_image.in * * gdi * diff +xfa_jpg_image.in * * gdi * diff +xfa_node_caption.pdf * * gdi * diff +xfa_node_caption.pdf * * * fontations fuzzy=10,0.1,15 +xfa_node_caption.pdf mac * skia * fuzzy +xfa_png_image.in * * gdi * diff +xfa_rectangle_node.in * * gdi * diff +xfa_tiff_image.in * * gdi * diff +xfa_tiff_lzw_image.in * * gdi * diff +xfa_tiff_packbits_image.in * * gdi * diff # TODO(crbug.com/42271068): Remove after associated bug is fixed -bug_1015233.in * * * gdi * diff -bug_1099446.in * * * gdi * diff -bug_1161.in * * * gdi * diff -bug_1236.in * * * gdi_skia * diff -bug_1288_1.in * * * gdi_skia * diff -bug_1330.in * * * gdi * diff -bug_1395648.in * * * gdi_skia * diff -bug_1396266.in * * * gdi_skia * diff -bug_1430333.in * * * gdi_skia * diff -bug_1822.in * * * gdi * diff -bug_1847.in * * * gdi_skia * diff -bug_1949.in * * * gdi_skia * diff -bug_1995.in * * * gdi_skia * diff -bug_41153500.in * * * gdi * diff -bug_42270979_1.in * * * gdi * diff -bug_42270979_3.in * * * gdi * diff -bug_632.in * * * gdi * diff -bug_632.in * * * * fontations fuzzy=10,0.1,15 -bug_660850.in * * * gdi * diff -long_dashed_line.in * * * gdi * diff -matte.in * * * gdi_skia * diff +bug_1015233.in * * gdi * diff +bug_1099446.in * * gdi * diff +bug_1161.in * * gdi * diff +bug_1236.in * * gdi_skia * diff +bug_1288_1.in * * gdi_skia * diff +bug_1330.in * * gdi * diff +bug_1395648.in * * gdi_skia * diff +bug_1396266.in * * gdi_skia * diff +bug_1430333.in * * gdi_skia * diff +bug_1822.in * * gdi * diff +bug_1847.in * * gdi_skia * diff +bug_1949.in * * gdi_skia * diff +bug_1995.in * * gdi_skia * diff +bug_41153500.in * * gdi * diff +bug_42270979_1.in * * gdi * diff +bug_42270979_3.in * * gdi * diff +bug_632.in * * gdi * diff +bug_632.in * * * fontations fuzzy=10,0.1,15 +bug_660850.in * * gdi * diff +long_dashed_line.in * * gdi * diff +matte.in * * gdi_skia * diff # TODO(crbug.com/361002664): Remove after associated bug is fixed -smask_blend.in * * * gdi * diff +smask_blend.in * * gdi * diff # TODO(crbug.com/459586268): Remove this entry once macOS support for Intel # hardware goes away. The test expectation is just different enough from the ARM # rendering that fuzzy matching is not enough for it to match. The difference # looks like it may be due to several rounding errors combining for a bigger # than normal pixel value difference. -bug_1430333.in mac_x86 * * skia * diff -bug_1746.in mac_x86 * * skia * diff +bug_1430333.in mac_x86 * skia * diff +bug_1746.in mac_x86 * skia * diff # # Merged from SUPPRESSIONS_IMAGE_DIFF and SUPPRESSIONS_EXACT_MATCHING; these # name no test that appears above. # -2_9_stamp2.pdf mac * * skia * fuzzy -2_9_stamp2.pdf * * * * fontations fuzzy=10,0.1,15 -2_halftone.pdf mac * * skia * fuzzy -3_image_imagemask.pdf mac * * skia * fuzzy -FRC_3.5_CF_Strf_stmf_DefaultCryptFilter.pdf * * * * * blank -FRC_3.5_EncryptMetadata_T.pdf * * * * * blank -FRC_3.5_Encrypt_is_damage.pdf * * * * * blank -FRC_3.5_Filter_PubSec_SubFilter_s5.pdf * * * * * blank -FRC_3.5_Filter_PubSec_Sub_SubFilter_s4.pdf * * * * * blank -FRC_8.4.1_Annotations_Border.pdf mac * * skia * fuzzy -FRC_8.4.1_Annotations_Border.pdf * * * * fontations fuzzy=10,0.1,15 -MouseEvents.pdf * * * * * blank -Oneof.pdf * * * * * blank -annotation_circle.pdf mac * * skia * fuzzy -annotation_circle.pdf * * * * fontations fuzzy=10,0.1,15 -annotation_circle_dash.pdf mac * * skia * fuzzy -annotation_circle_dash.pdf * * * * fontations fuzzy=10,0.1,15 -annotation_ellipse.pdf mac * * skia * fuzzy -annotation_ellipse.pdf * * * * fontations fuzzy=10,0.1,15 -annotation_ellipse_fill.pdf mac * * skia * fuzzy -annotation_ellipse_fill.pdf * * * * fontations fuzzy=10,0.1,15 -annotation_ellipse_fill_dash.pdf mac * * skia * fuzzy -annotation_ellipse_fill_dash.pdf * * * * fontations fuzzy=10,0.1,15 -annotation_freetext.pdf mac * * skia * fuzzy -annotation_freetext.pdf * * * * fontations fuzzy=10,0.1,15 -annotation_ink.pdf mac * * skia * fuzzy -annotation_ink.pdf * * * * fontations fuzzy=10,0.1,15 -annotation_ink_dash.pdf mac * * skia * fuzzy -annotation_ink_dash.pdf * * * * fontations fuzzy=10,0.1,15 -annotation_ink_dot.pdf mac * * skia * fuzzy -annotation_ink_dot.pdf * * * * fontations fuzzy=10,0.1,15 -annotation_ink_multiple.pdf mac * * skia * fuzzy -annotation_ink_multiple.pdf * * * * fontations fuzzy=10,0.1,15 -annotation_square.pdf mac * * skia * fuzzy -annotation_square.pdf * * * * fontations fuzzy=10,0.1,15 -annotation_square_dash.pdf mac * * skia * fuzzy -annotation_square_dash.pdf * * * * fontations fuzzy=10,0.1,15 -annotation_squiggly.pdf mac * * skia * fuzzy -annotation_squiggly.pdf * * * * fontations fuzzy=10,0.1,15 -annotation_squiggly_opacity.pdf mac * * skia * fuzzy -annotation_squiggly_opacity.pdf * * * * fontations fuzzy=10,0.1,15 -annotation_strikeout.pdf mac * * skia * fuzzy -annotation_strikeout.pdf * * * * fontations fuzzy=10,0.1,15 -annotation_text.pdf mac * * skia * fuzzy -annotation_text.pdf * * * * fontations fuzzy=10,0.1,15 -bug_651304.pdf * * * * * blank -ch_9_android.pdf mac * * skia * fuzzy -ch_9_android.pdf * * * * fontations fuzzy=10,0.1,15 -en_uicase_2_.pdf mac * * skia * fuzzy -en_uicase_2_.pdf * * * * fontations fuzzy=10,0.1,15 -image_foxit.pdf * * * * * fuzzy=10,0.35,10.0 -image_transformer_other.in mac * * skia * fuzzy -outline.pdf * * * * * blank -radial_shading_point_at_border.in mac * * skia * fuzzy -radial_shading_point_at_border_no_extend.in mac * * skia * fuzzy -shade.in mac * * skia * fuzzy -shading_2_15.pdf mac * * skia * fuzzy -shading_2_17.pdf mac * * skia * fuzzy -shading_2_4.pdf mac * * skia * fuzzy -shading_2_7.pdf mac * * skia * fuzzy -shading_2_8.pdf mac * * skia * fuzzy -shading_2_9.pdf mac * * skia * fuzzy -zh_file_structure.pdf mac * * skia * fuzzy -zh_file_structure.pdf * * * * fontations diff -zh_page.pdf mac * * skia * fuzzy -zh_page.pdf * * * * fontations fuzzy=20,0.1,15 -zh_webdav.pdf mac * * skia * fuzzy -zh_webdav.pdf * * * * fontations fuzzy=10,0.1,15 +2_9_stamp2.pdf mac * skia * fuzzy +2_9_stamp2.pdf * * * fontations fuzzy=10,0.1,15 +2_halftone.pdf mac * skia * fuzzy +3_image_imagemask.pdf mac * skia * fuzzy +FRC_3.5_CF_Strf_stmf_DefaultCryptFilter.pdf * * * * blank +FRC_3.5_EncryptMetadata_T.pdf * * * * blank +FRC_3.5_Encrypt_is_damage.pdf * * * * blank +FRC_3.5_Filter_PubSec_SubFilter_s5.pdf * * * * blank +FRC_3.5_Filter_PubSec_Sub_SubFilter_s4.pdf * * * * blank +FRC_8.4.1_Annotations_Border.pdf mac * skia * fuzzy +FRC_8.4.1_Annotations_Border.pdf * * * fontations fuzzy=10,0.1,15 +MouseEvents.pdf * * * * blank +Oneof.pdf * * * * blank +annotation_circle.pdf mac * skia * fuzzy +annotation_circle.pdf * * * fontations fuzzy=10,0.1,15 +annotation_circle_dash.pdf mac * skia * fuzzy +annotation_circle_dash.pdf * * * fontations fuzzy=10,0.1,15 +annotation_ellipse.pdf mac * skia * fuzzy +annotation_ellipse.pdf * * * fontations fuzzy=10,0.1,15 +annotation_ellipse_fill.pdf mac * skia * fuzzy +annotation_ellipse_fill.pdf * * * fontations fuzzy=10,0.1,15 +annotation_ellipse_fill_dash.pdf mac * skia * fuzzy +annotation_ellipse_fill_dash.pdf * * * fontations fuzzy=10,0.1,15 +annotation_freetext.pdf mac * skia * fuzzy +annotation_freetext.pdf * * * fontations fuzzy=10,0.1,15 +annotation_ink.pdf mac * skia * fuzzy +annotation_ink.pdf * * * fontations fuzzy=10,0.1,15 +annotation_ink_dash.pdf mac * skia * fuzzy +annotation_ink_dash.pdf * * * fontations fuzzy=10,0.1,15 +annotation_ink_dot.pdf mac * skia * fuzzy +annotation_ink_dot.pdf * * * fontations fuzzy=10,0.1,15 +annotation_ink_multiple.pdf mac * skia * fuzzy +annotation_ink_multiple.pdf * * * fontations fuzzy=10,0.1,15 +annotation_square.pdf mac * skia * fuzzy +annotation_square.pdf * * * fontations fuzzy=10,0.1,15 +annotation_square_dash.pdf mac * skia * fuzzy +annotation_square_dash.pdf * * * fontations fuzzy=10,0.1,15 +annotation_squiggly.pdf mac * skia * fuzzy +annotation_squiggly.pdf * * * fontations fuzzy=10,0.1,15 +annotation_squiggly_opacity.pdf mac * skia * fuzzy +annotation_squiggly_opacity.pdf * * * fontations fuzzy=10,0.1,15 +annotation_strikeout.pdf mac * skia * fuzzy +annotation_strikeout.pdf * * * fontations fuzzy=10,0.1,15 +annotation_text.pdf mac * skia * fuzzy +annotation_text.pdf * * * fontations fuzzy=10,0.1,15 +bug_651304.pdf * * * * blank +ch_9_android.pdf mac * skia * fuzzy +ch_9_android.pdf * * * fontations fuzzy=10,0.1,15 +en_uicase_2_.pdf mac * skia * fuzzy +en_uicase_2_.pdf * * * fontations fuzzy=10,0.1,15 +image_foxit.pdf * * * * fuzzy=10,0.35,10.0 +image_transformer_other.in mac * skia * fuzzy +outline.pdf * * * * blank +radial_shading_point_at_border.in mac * skia * fuzzy +radial_shading_point_at_border_no_extend.in mac * skia * fuzzy +shade.in mac * skia * fuzzy +shading_2_15.pdf mac * skia * fuzzy +shading_2_17.pdf mac * skia * fuzzy +shading_2_4.pdf mac * skia * fuzzy +shading_2_7.pdf mac * skia * fuzzy +shading_2_8.pdf mac * skia * fuzzy +shading_2_9.pdf mac * skia * fuzzy +zh_file_structure.pdf mac * skia * fuzzy +zh_file_structure.pdf * * * fontations diff +zh_page.pdf mac * skia * fuzzy +zh_page.pdf * * * fontations fuzzy=20,0.1,15 +zh_webdav.pdf mac * skia * fuzzy +zh_webdav.pdf * * * fontations fuzzy=10,0.1,15 # # Fontations, naming no test that appears above. # -2_color_lab.pdf * * * * fontations diff -FRC_4.5.3_DeviceCMYK_K1.pdf * * * * fontations diff -FRC_4.5.3_DeviceRGB_RG1.pdf * * * * fontations diff -FRC_8.5_Catalog_OpenAction.pdf linux,win * * * fontations diff -FRC_8.5_Page_O_URI.pdf * * * * fontations diff -bug_1021762.in * * * * fontations fuzzy -bug_601362.in * * * * fontations diff -bug_736703.in * * * * fontations diff -bug_846.in * * * * fontations diff +2_color_lab.pdf * * * fontations diff +FRC_4.5.3_DeviceCMYK_K1.pdf * * * fontations diff +FRC_4.5.3_DeviceRGB_RG1.pdf * * * fontations diff +FRC_8.5_Catalog_OpenAction.pdf linux,win * * fontations diff +FRC_8.5_Page_O_URI.pdf * * * fontations diff +bug_1021762.in * * * fontations fuzzy +bug_601362.in * * * fontations diff +bug_736703.in * * * fontations diff +bug_846.in * * * fontations diff # # Fontations fuzzy matching, naming no test that appears above. # -050_extra_m.pdf * * * * fontations fuzzy=10,0.1,15 -2_8_stamp1.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_10_8.2.2_Prev_remove_all.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_10_8.2.4__remove_ModDate_value.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_11_8.2.2_Prev_remove_obj.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_11_8.2.4__remove_ModDate_all.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_12_8.2.2__Next_remove_value.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_12_8.2.4__remove_ModDate_obj_.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_13_8.2.2__Next_remove_all.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_13_8.2.4_remove_Size_value.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_14_8.2.2__Next_remove_obj.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_14_8.2.4_remove_Size_all.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_15_8.2.2__Next_exchange.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_15_8.2.4_remove_Size_obj.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_16_8.2.2__Next_add.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_16_8.2.4__remove_CompressedSize__value.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_17_8.2.2__T8.4_First_remove_value.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_17_8.2.4__remove_CompressedSize__all.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_18_8.2.2__T8.4_First_remove_all.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_18_8.2.4__remove_CompressedSize__obj.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_19_8.2.2__T8.4_First_remove_obj.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_19_8.2.4__remove_CreationDate_value.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_1_8.2.2__Title_edit.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_1_8.2.4__original.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_20_8.2.2__T8.4_First_remove_value2.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_20_8.2.4__remove_CreationDate_all.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_21_8.2.2__T8.4_First_remove_all2.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_21_8.2.4__remove_CreationDate_obj.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_22_8.2.2__T8.4_First_remove_obj2.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_22_8.2.4__remove_Order_value.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_23_8.2.2__T8.4_Last_remove_value.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_23_8.2.4__remove_Order_all.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_24_8.2.2__T8.4_Last_remove_all.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_24_8.2.4__remove_Order_obj.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_25_8.2.2__T8.4_Last_remove_obj.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_26_8.2.2__T8.4_Last_remove_value2.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_27_8.2.2__T8.4_Last_remove_all2.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_28_8.2.2__T8.4_Last_remove_obj2.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_29_8.2.2__T8.4_First_Last_exchange.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_2_8.2.2__Title_remove_value.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_2_8.2.4__add_type_.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_3.5_P_4_Password_1.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_3.5_P__1852_Password_1.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_3.5_P__2584_Password_1.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_3.5_P__2616_Password_1.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_3.5_P__2880_Password_1.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_3.5_P__3376_Password_1.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_3.5_P__3392_Password_1.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_3.5_P__3608_Password_1.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_3.5_P__3900_Password_1.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_31_8.2.2_add_dest_entry.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_32_8.2.2_A_Support_action.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_33_8.2.2_A_empty.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_34_8.2.2_A_remove.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_35_8.2.2_A_remove_A_item.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_36_8.2.2_Dest.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_37_8.2.2_Dest_empty.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_38_8.2.2_Dest_remove.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_39_8.2.2_C_edit.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_3_8.2.2__Title_remove_all.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_3_8.2.4__add_type_value.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_4.5.3_DeviceCMYK_k.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_4.5.3_DeviceGray_G1.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_4.5.3_DeviceGray_g.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_4.5.3_DeviceRGB_rg.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_4.5.4_CalGray_gamma.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_4.5.4_CalGray_whitepoint.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_4.5.4_CalRGB_gamma.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_4.5.4_CalRGB_matrix.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_4.5.4_CalRGB_whitepoint.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_4.5.4_ICCBased.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_4.5.4_Lab.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_4.5.4_RI_Absolute.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_4.5.4_RI_Perceptual.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_4.5.4_RI_Relative.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_4.5.4_RI_Saturation.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_4.5.4_Separation.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_4.5.5_DeviceN.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_4.5.5_Indexed.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_40_8.2.2_C_empty1.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_41_8.2.2_C_empty2.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_42_8.2.2_C_empty3.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_43_8.2.2_C_empty.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_44_8.2.2_C_remove.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_45_8.2.2_F_edit_F_1_2_3.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_46_8.2.2_F_edit_F__1__2__3.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_47_8.2.2_F_edit_F_32__32.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_48_8.2.2_F_edit_F_100__100.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_49_8.2.2_F_empty.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_4_8.2.2_Parent_edit2.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_4_8.2.4__remove_FileName_value.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_50_8.2.2_F_remove.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_51_8.2.2_T_8.4__Count_edit_count_100.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_52_8.2.2_T_8.4__Count_edit_count_0.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_53_8.2.2_T_8.4__Count_empty.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_54_8.2.2_T_8.4__Count_empty1.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_55_8.2.2_T_8.4__Count_remove.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_56_8.2.2_C_edit_C__1.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_57_8.2.2_C_edit_C_2.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_58_8.2.2_Count_edit_count__2.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_5_8.2.2_Parent_remove_value.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_5_8.2.4__remove_FileName_all.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_6_8.2.2_Parent_remove_all.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_6_8.2.4__remove_FileName_obj.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_7_8.2.2_Parent_remove_obj.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_7_8.2.4__remove_Description_value.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.4.1_Annotations_AP_N_.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.4.1_Annotations_AP_N_R_.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.4.1_Annotations_C.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.4.1_Annotations_M_text_string_.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.4.1_Annotations_P.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.4.1_Annotations_Rect.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.4.2_Annotation_Flags_F_Hidden.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.4.2_Annotation_Flags_F_Invisible.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.4.2_Annotation_Flags_F_Locked.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.4.2_Annotation_Flags_F_LockedContents.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.4.2_Annotation_Flags_F_NoRotate.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.4.2_Annotation_Flags_F_NoView.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.4.2_Annotation_Flags_F_NoZoom.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.4.2_Annotation_Flags_F_Print.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.4.2_Annotation_Flags_F_ReadOnly.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.4.2_Annotation_Flags_F_ToggleNoView.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.4.3_Border_Stypes_D_different_values.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.4.3_Border_Stypes_D_remove.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.4.3_Border_Stypes_I_different_values.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.4.3_Border_Stypes_I_remove.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.4.3_Border_Stypes_S_different_values_BE_.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.4.3_Border_Stypes_S_different_values_BS_.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.4.3_Border_Stypes_S_not_exist_BS_.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.4.3_Border_Stypes_S_remove_BE_.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.4.3_Border_Stypes_S_remove_BS_.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.4.3_Border_Stypes_Type_add.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.4.3_Border_Stypes_Type_not_exist_default_.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.4.3_Border_Stypes_W_remove.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.5_Catalog_WC.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.5_DP.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.5_DS.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.5_Link_URL.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.5_Outline_A.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.5_Page_PV_Named_Phantom.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.5_Screen_Fo_JavaScript.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.5_Screen_Rendition.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.5_WP.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8.5_WS.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8_8.2.2_Parent_edit.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_8_8.2.4__remove__Description_all.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_9_8.2.2_Prev_remove_value.pdf * * * * fontations fuzzy=10,0.1,15 -FRC_9_8.2.4__remove__Description_obj.pdf * * * * fontations fuzzy=10,0.1,15 -annotation_highlight_no_content.pdf * * * * fontations fuzzy=10,0.1,15 -bug_113910.in * * * * fontations fuzzy=10,0.1,15 -bug_1308.pdf * * * * fontations fuzzy=15,0.1,15 -bug_1308_1.in * * * * fontations fuzzy=10,0.1,15 -bug_1355.in * * * * fontations fuzzy=15,0.1,15 -bug_1388_2.in * * * * fontations fuzzy=10,0.1,15 -bug_1388_3.in * * * * fontations fuzzy=10,0.1,15 -bug_1402.in * * * * fontations fuzzy=10,0.1,15 -bug_1752.in * * * * fontations fuzzy=10,0.1,15 -bug_1772.in * * * * fontations fuzzy=10,0.1,15 -bug_1922.in * * * * fontations fuzzy=10,0.1,15 -bug_42270459.in * * * * fontations fuzzy=10,0.1,15 -bug_432208037.in * * * * fontations fuzzy=10,0.1,15 -bug_493126_endobj_bug.pdf * * * * fontations fuzzy=10,0.1,15 -bug_493126_endobj_bug_weirdWS.pdf * * * * fontations fuzzy=10,0.1,15 -bug_524043_1.in * * * * fontations fuzzy=10,0.1,15 -bug_524043_2.in * * * * fontations fuzzy=10,0.1,15 -bug_524043_3.in * * * * fontations fuzzy=10,0.1,15 -bug_524043_4.in * * * * fontations fuzzy=10,0.1,15 -bug_524043_5.in * * * * fontations fuzzy=10,0.1,15 -bug_524043_7.in * * * * fontations fuzzy=10,0.1,15 -bug_528103.in * * * * fontations fuzzy=10,0.1,15 -bug_543018_1.in * * * * fontations fuzzy=10,0.1,15 -bug_543018_2.in * * * * fontations fuzzy=10,0.1,15 -bug_551258_1.in * * * * fontations fuzzy=10,0.1,15 -bug_665467.in * * * * fontations fuzzy=10,0.1,15 -bug_736695_3.in * * * * fontations fuzzy=10,0.1,15 -bug_820345.in * * * * fontations fuzzy=10,0.1,15 -bug_845697.in * * * * fontations fuzzy=10,0.1,15 -bug_909762.in * * * * fontations fuzzy=10,0.1,15 -bug_925736.pdf * * * * fontations fuzzy=10,0.1,15 -ch_7_10.pdf * * * * fontations fuzzy=10,0.1,15 -ch_7_11.pdf * * * * fontations fuzzy=10,0.1,15 -ch_7_12.pdf * * * * fontations fuzzy=10,0.1,15 -ch_7_14.pdf * * * * fontations fuzzy=10,0.1,15 -ch_7_15.pdf * * * * fontations fuzzy=10,0.1,15 -font_size.in * * * * fontations fuzzy=10,0.1,15 -form_textfield_selected_ltr.in * * * * fontations fuzzy=10,0.1,15 -form_textfield_selected_rtl.in * * * * fontations fuzzy=10,0.1,15 -foxittext.pdf * * * * fontations fuzzy=10,0.1,15 -freetext_annotation_with_da.in * * * * fontations fuzzy=10,0.1,15 -freetext_annotation_without_da.pdf * * * * fontations fuzzy=10,0.1,15 -generation_numbers1.pdf * * * * fontations fuzzy=10,0.1,15 -generation_numbers2.pdf * * * * fontations fuzzy=10,0.1,15 -password.in * * * * fontations fuzzy=10,0.1,15 -scrollable_widgets1.in * * * * fontations fuzzy=10,0.1,15 -test_m.pdf * * * * fontations fuzzy=10,0.1,15 +050_extra_m.pdf * * * fontations fuzzy=10,0.1,15 +2_8_stamp1.pdf * * * fontations fuzzy=10,0.1,15 +FRC_10_8.2.2_Prev_remove_all.pdf * * * fontations fuzzy=10,0.1,15 +FRC_10_8.2.4__remove_ModDate_value.pdf * * * fontations fuzzy=10,0.1,15 +FRC_11_8.2.2_Prev_remove_obj.pdf * * * fontations fuzzy=10,0.1,15 +FRC_11_8.2.4__remove_ModDate_all.pdf * * * fontations fuzzy=10,0.1,15 +FRC_12_8.2.2__Next_remove_value.pdf * * * fontations fuzzy=10,0.1,15 +FRC_12_8.2.4__remove_ModDate_obj_.pdf * * * fontations fuzzy=10,0.1,15 +FRC_13_8.2.2__Next_remove_all.pdf * * * fontations fuzzy=10,0.1,15 +FRC_13_8.2.4_remove_Size_value.pdf * * * fontations fuzzy=10,0.1,15 +FRC_14_8.2.2__Next_remove_obj.pdf * * * fontations fuzzy=10,0.1,15 +FRC_14_8.2.4_remove_Size_all.pdf * * * fontations fuzzy=10,0.1,15 +FRC_15_8.2.2__Next_exchange.pdf * * * fontations fuzzy=10,0.1,15 +FRC_15_8.2.4_remove_Size_obj.pdf * * * fontations fuzzy=10,0.1,15 +FRC_16_8.2.2__Next_add.pdf * * * fontations fuzzy=10,0.1,15 +FRC_16_8.2.4__remove_CompressedSize__value.pdf * * * fontations fuzzy=10,0.1,15 +FRC_17_8.2.2__T8.4_First_remove_value.pdf * * * fontations fuzzy=10,0.1,15 +FRC_17_8.2.4__remove_CompressedSize__all.pdf * * * fontations fuzzy=10,0.1,15 +FRC_18_8.2.2__T8.4_First_remove_all.pdf * * * fontations fuzzy=10,0.1,15 +FRC_18_8.2.4__remove_CompressedSize__obj.pdf * * * fontations fuzzy=10,0.1,15 +FRC_19_8.2.2__T8.4_First_remove_obj.pdf * * * fontations fuzzy=10,0.1,15 +FRC_19_8.2.4__remove_CreationDate_value.pdf * * * fontations fuzzy=10,0.1,15 +FRC_1_8.2.2__Title_edit.pdf * * * fontations fuzzy=10,0.1,15 +FRC_1_8.2.4__original.pdf * * * fontations fuzzy=10,0.1,15 +FRC_20_8.2.2__T8.4_First_remove_value2.pdf * * * fontations fuzzy=10,0.1,15 +FRC_20_8.2.4__remove_CreationDate_all.pdf * * * fontations fuzzy=10,0.1,15 +FRC_21_8.2.2__T8.4_First_remove_all2.pdf * * * fontations fuzzy=10,0.1,15 +FRC_21_8.2.4__remove_CreationDate_obj.pdf * * * fontations fuzzy=10,0.1,15 +FRC_22_8.2.2__T8.4_First_remove_obj2.pdf * * * fontations fuzzy=10,0.1,15 +FRC_22_8.2.4__remove_Order_value.pdf * * * fontations fuzzy=10,0.1,15 +FRC_23_8.2.2__T8.4_Last_remove_value.pdf * * * fontations fuzzy=10,0.1,15 +FRC_23_8.2.4__remove_Order_all.pdf * * * fontations fuzzy=10,0.1,15 +FRC_24_8.2.2__T8.4_Last_remove_all.pdf * * * fontations fuzzy=10,0.1,15 +FRC_24_8.2.4__remove_Order_obj.pdf * * * fontations fuzzy=10,0.1,15 +FRC_25_8.2.2__T8.4_Last_remove_obj.pdf * * * fontations fuzzy=10,0.1,15 +FRC_26_8.2.2__T8.4_Last_remove_value2.pdf * * * fontations fuzzy=10,0.1,15 +FRC_27_8.2.2__T8.4_Last_remove_all2.pdf * * * fontations fuzzy=10,0.1,15 +FRC_28_8.2.2__T8.4_Last_remove_obj2.pdf * * * fontations fuzzy=10,0.1,15 +FRC_29_8.2.2__T8.4_First_Last_exchange.pdf * * * fontations fuzzy=10,0.1,15 +FRC_2_8.2.2__Title_remove_value.pdf * * * fontations fuzzy=10,0.1,15 +FRC_2_8.2.4__add_type_.pdf * * * fontations fuzzy=10,0.1,15 +FRC_3.5_P_4_Password_1.pdf * * * fontations fuzzy=10,0.1,15 +FRC_3.5_P__1852_Password_1.pdf * * * fontations fuzzy=10,0.1,15 +FRC_3.5_P__2584_Password_1.pdf * * * fontations fuzzy=10,0.1,15 +FRC_3.5_P__2616_Password_1.pdf * * * fontations fuzzy=10,0.1,15 +FRC_3.5_P__2880_Password_1.pdf * * * fontations fuzzy=10,0.1,15 +FRC_3.5_P__3376_Password_1.pdf * * * fontations fuzzy=10,0.1,15 +FRC_3.5_P__3392_Password_1.pdf * * * fontations fuzzy=10,0.1,15 +FRC_3.5_P__3608_Password_1.pdf * * * fontations fuzzy=10,0.1,15 +FRC_3.5_P__3900_Password_1.pdf * * * fontations fuzzy=10,0.1,15 +FRC_31_8.2.2_add_dest_entry.pdf * * * fontations fuzzy=10,0.1,15 +FRC_32_8.2.2_A_Support_action.pdf * * * fontations fuzzy=10,0.1,15 +FRC_33_8.2.2_A_empty.pdf * * * fontations fuzzy=10,0.1,15 +FRC_34_8.2.2_A_remove.pdf * * * fontations fuzzy=10,0.1,15 +FRC_35_8.2.2_A_remove_A_item.pdf * * * fontations fuzzy=10,0.1,15 +FRC_36_8.2.2_Dest.pdf * * * fontations fuzzy=10,0.1,15 +FRC_37_8.2.2_Dest_empty.pdf * * * fontations fuzzy=10,0.1,15 +FRC_38_8.2.2_Dest_remove.pdf * * * fontations fuzzy=10,0.1,15 +FRC_39_8.2.2_C_edit.pdf * * * fontations fuzzy=10,0.1,15 +FRC_3_8.2.2__Title_remove_all.pdf * * * fontations fuzzy=10,0.1,15 +FRC_3_8.2.4__add_type_value.pdf * * * fontations fuzzy=10,0.1,15 +FRC_4.5.3_DeviceCMYK_k.pdf * * * fontations fuzzy=10,0.1,15 +FRC_4.5.3_DeviceGray_G1.pdf * * * fontations fuzzy=10,0.1,15 +FRC_4.5.3_DeviceGray_g.pdf * * * fontations fuzzy=10,0.1,15 +FRC_4.5.3_DeviceRGB_rg.pdf * * * fontations fuzzy=10,0.1,15 +FRC_4.5.4_CalGray_gamma.pdf * * * fontations fuzzy=10,0.1,15 +FRC_4.5.4_CalGray_whitepoint.pdf * * * fontations fuzzy=10,0.1,15 +FRC_4.5.4_CalRGB_gamma.pdf * * * fontations fuzzy=10,0.1,15 +FRC_4.5.4_CalRGB_matrix.pdf * * * fontations fuzzy=10,0.1,15 +FRC_4.5.4_CalRGB_whitepoint.pdf * * * fontations fuzzy=10,0.1,15 +FRC_4.5.4_ICCBased.pdf * * * fontations fuzzy=10,0.1,15 +FRC_4.5.4_Lab.pdf * * * fontations fuzzy=10,0.1,15 +FRC_4.5.4_RI_Absolute.pdf * * * fontations fuzzy=10,0.1,15 +FRC_4.5.4_RI_Perceptual.pdf * * * fontations fuzzy=10,0.1,15 +FRC_4.5.4_RI_Relative.pdf * * * fontations fuzzy=10,0.1,15 +FRC_4.5.4_RI_Saturation.pdf * * * fontations fuzzy=10,0.1,15 +FRC_4.5.4_Separation.pdf * * * fontations fuzzy=10,0.1,15 +FRC_4.5.5_DeviceN.pdf * * * fontations fuzzy=10,0.1,15 +FRC_4.5.5_Indexed.pdf * * * fontations fuzzy=10,0.1,15 +FRC_40_8.2.2_C_empty1.pdf * * * fontations fuzzy=10,0.1,15 +FRC_41_8.2.2_C_empty2.pdf * * * fontations fuzzy=10,0.1,15 +FRC_42_8.2.2_C_empty3.pdf * * * fontations fuzzy=10,0.1,15 +FRC_43_8.2.2_C_empty.pdf * * * fontations fuzzy=10,0.1,15 +FRC_44_8.2.2_C_remove.pdf * * * fontations fuzzy=10,0.1,15 +FRC_45_8.2.2_F_edit_F_1_2_3.pdf * * * fontations fuzzy=10,0.1,15 +FRC_46_8.2.2_F_edit_F__1__2__3.pdf * * * fontations fuzzy=10,0.1,15 +FRC_47_8.2.2_F_edit_F_32__32.pdf * * * fontations fuzzy=10,0.1,15 +FRC_48_8.2.2_F_edit_F_100__100.pdf * * * fontations fuzzy=10,0.1,15 +FRC_49_8.2.2_F_empty.pdf * * * fontations fuzzy=10,0.1,15 +FRC_4_8.2.2_Parent_edit2.pdf * * * fontations fuzzy=10,0.1,15 +FRC_4_8.2.4__remove_FileName_value.pdf * * * fontations fuzzy=10,0.1,15 +FRC_50_8.2.2_F_remove.pdf * * * fontations fuzzy=10,0.1,15 +FRC_51_8.2.2_T_8.4__Count_edit_count_100.pdf * * * fontations fuzzy=10,0.1,15 +FRC_52_8.2.2_T_8.4__Count_edit_count_0.pdf * * * fontations fuzzy=10,0.1,15 +FRC_53_8.2.2_T_8.4__Count_empty.pdf * * * fontations fuzzy=10,0.1,15 +FRC_54_8.2.2_T_8.4__Count_empty1.pdf * * * fontations fuzzy=10,0.1,15 +FRC_55_8.2.2_T_8.4__Count_remove.pdf * * * fontations fuzzy=10,0.1,15 +FRC_56_8.2.2_C_edit_C__1.pdf * * * fontations fuzzy=10,0.1,15 +FRC_57_8.2.2_C_edit_C_2.pdf * * * fontations fuzzy=10,0.1,15 +FRC_58_8.2.2_Count_edit_count__2.pdf * * * fontations fuzzy=10,0.1,15 +FRC_5_8.2.2_Parent_remove_value.pdf * * * fontations fuzzy=10,0.1,15 +FRC_5_8.2.4__remove_FileName_all.pdf * * * fontations fuzzy=10,0.1,15 +FRC_6_8.2.2_Parent_remove_all.pdf * * * fontations fuzzy=10,0.1,15 +FRC_6_8.2.4__remove_FileName_obj.pdf * * * fontations fuzzy=10,0.1,15 +FRC_7_8.2.2_Parent_remove_obj.pdf * * * fontations fuzzy=10,0.1,15 +FRC_7_8.2.4__remove_Description_value.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.4.1_Annotations_AP_N_.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.4.1_Annotations_AP_N_R_.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.4.1_Annotations_C.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.4.1_Annotations_M_text_string_.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.4.1_Annotations_P.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.4.1_Annotations_Rect.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.4.2_Annotation_Flags_F_Hidden.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.4.2_Annotation_Flags_F_Invisible.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.4.2_Annotation_Flags_F_Locked.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.4.2_Annotation_Flags_F_LockedContents.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.4.2_Annotation_Flags_F_NoRotate.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.4.2_Annotation_Flags_F_NoView.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.4.2_Annotation_Flags_F_NoZoom.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.4.2_Annotation_Flags_F_Print.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.4.2_Annotation_Flags_F_ReadOnly.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.4.2_Annotation_Flags_F_ToggleNoView.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.4.3_Border_Stypes_D_different_values.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.4.3_Border_Stypes_D_remove.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.4.3_Border_Stypes_I_different_values.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.4.3_Border_Stypes_I_remove.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.4.3_Border_Stypes_S_different_values_BE_.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.4.3_Border_Stypes_S_different_values_BS_.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.4.3_Border_Stypes_S_not_exist_BS_.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.4.3_Border_Stypes_S_remove_BE_.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.4.3_Border_Stypes_S_remove_BS_.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.4.3_Border_Stypes_Type_add.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.4.3_Border_Stypes_Type_not_exist_default_.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.4.3_Border_Stypes_W_remove.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.5_Catalog_WC.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.5_DP.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.5_DS.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.5_Link_URL.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.5_Outline_A.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.5_Page_PV_Named_Phantom.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.5_Screen_Fo_JavaScript.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.5_Screen_Rendition.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.5_WP.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8.5_WS.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8_8.2.2_Parent_edit.pdf * * * fontations fuzzy=10,0.1,15 +FRC_8_8.2.4__remove__Description_all.pdf * * * fontations fuzzy=10,0.1,15 +FRC_9_8.2.2_Prev_remove_value.pdf * * * fontations fuzzy=10,0.1,15 +FRC_9_8.2.4__remove__Description_obj.pdf * * * fontations fuzzy=10,0.1,15 +annotation_highlight_no_content.pdf * * * fontations fuzzy=10,0.1,15 +bug_113910.in * * * fontations fuzzy=10,0.1,15 +bug_1308.pdf * * * fontations fuzzy=15,0.1,15 +bug_1308_1.in * * * fontations fuzzy=10,0.1,15 +bug_1355.in * * * fontations fuzzy=15,0.1,15 +bug_1388_2.in * * * fontations fuzzy=10,0.1,15 +bug_1388_3.in * * * fontations fuzzy=10,0.1,15 +bug_1402.in * * * fontations fuzzy=10,0.1,15 +bug_1752.in * * * fontations fuzzy=10,0.1,15 +bug_1772.in * * * fontations fuzzy=10,0.1,15 +bug_1922.in * * * fontations fuzzy=10,0.1,15 +bug_42270459.in * * * fontations fuzzy=10,0.1,15 +bug_432208037.in * * * fontations fuzzy=10,0.1,15 +bug_493126_endobj_bug.pdf * * * fontations fuzzy=10,0.1,15 +bug_493126_endobj_bug_weirdWS.pdf * * * fontations fuzzy=10,0.1,15 +bug_524043_1.in * * * fontations fuzzy=10,0.1,15 +bug_524043_2.in * * * fontations fuzzy=10,0.1,15 +bug_524043_3.in * * * fontations fuzzy=10,0.1,15 +bug_524043_4.in * * * fontations fuzzy=10,0.1,15 +bug_524043_5.in * * * fontations fuzzy=10,0.1,15 +bug_524043_7.in * * * fontations fuzzy=10,0.1,15 +bug_528103.in * * * fontations fuzzy=10,0.1,15 +bug_543018_1.in * * * fontations fuzzy=10,0.1,15 +bug_543018_2.in * * * fontations fuzzy=10,0.1,15 +bug_551258_1.in * * * fontations fuzzy=10,0.1,15 +bug_665467.in * * * fontations fuzzy=10,0.1,15 +bug_736695_3.in * * * fontations fuzzy=10,0.1,15 +bug_820345.in * * * fontations fuzzy=10,0.1,15 +bug_845697.in * * * fontations fuzzy=10,0.1,15 +bug_909762.in * * * fontations fuzzy=10,0.1,15 +bug_925736.pdf * * * fontations fuzzy=10,0.1,15 +ch_7_10.pdf * * * fontations fuzzy=10,0.1,15 +ch_7_11.pdf * * * fontations fuzzy=10,0.1,15 +ch_7_12.pdf * * * fontations fuzzy=10,0.1,15 +ch_7_14.pdf * * * fontations fuzzy=10,0.1,15 +ch_7_15.pdf * * * fontations fuzzy=10,0.1,15 +font_size.in * * * fontations fuzzy=10,0.1,15 +form_textfield_selected_ltr.in * * * fontations fuzzy=10,0.1,15 +form_textfield_selected_rtl.in * * * fontations fuzzy=10,0.1,15 +foxittext.pdf * * * fontations fuzzy=10,0.1,15 +freetext_annotation_with_da.in * * * fontations fuzzy=10,0.1,15 +freetext_annotation_without_da.pdf * * * fontations fuzzy=10,0.1,15 +generation_numbers1.pdf * * * fontations fuzzy=10,0.1,15 +generation_numbers2.pdf * * * fontations fuzzy=10,0.1,15 +password.in * * * fontations fuzzy=10,0.1,15 +scrollable_widgets1.in * * * fontations fuzzy=10,0.1,15 +test_m.pdf * * * fontations fuzzy=10,0.1,15 diff --git a/testing/embedder_test.cpp b/testing/embedder_test.cpp index 887d44e197..46a4e0e8c6 100644 --- a/testing/embedder_test.cpp +++ b/testing/embedder_test.cpp @@ -297,19 +297,30 @@ std::string_view GetCpuArchSuffix() { #endif // BUILDFLAG(IS_APPLE) && !defined(ARCH_CPU_ARM64) } -std::string GetEmbedderTestExpectationPath( - std::string_view expectation_png_name) { +std::string GetEmbedderTestExpectationPath(std::string_view expectation_name, + std::string_view expectation_ext) { std::string path = PathService::GetTestFilePath("embedder_tests"); if (path.empty()) { return std::string(); } path.push_back(PATH_SEPARATOR); - path.append(expectation_png_name); - path.append(".png"); + path.append(expectation_name); + path.push_back('.'); + path.append(expectation_ext); return path; } +std::string GetEmbedderTestPngExpectationPath( + std::string_view expectation_name) { + return GetEmbedderTestExpectationPath(expectation_name, "png"); +} + +std::string GetEmbedderTestDisplayListExpectationPath( + std::string_view expectation_name) { + return GetEmbedderTestExpectationPath(expectation_name, "dump.txt"); +} + std::vector GetEmbedderTestExpectationsWithSuffixPath( std::string_view expectation_png_name) { const std::string basename(expectation_png_name); @@ -342,7 +353,7 @@ std::vector GetEmbedderTestExpectationsWithSuffixPath( std::vector results; for (const auto& name : expectation_names) { - results.push_back(GetEmbedderTestExpectationPath(name)); + results.push_back(GetEmbedderTestPngExpectationPath(name)); if (results.back().empty()) { return {}; } @@ -1174,6 +1185,34 @@ void EmbedderTest::VerifySavedDocumentWithExpectationSuffix( options); } +void EmbedderTest::VerifySavedRenderingWithDisplayList( + FPDF_PAGE page, + std::string_view expectation_name, + int flags) { + CHECK(page); + CHECK(saved_document()); + std::string display_list = RenderSavedPageWithFlagsToDisplayList(page, flags); + CompareDisplayList(display_list, expectation_name); +} + +void EmbedderTest::VerifySavedDocumentWithDisplayList( + std::string_view expectation_name, + int flags) { + ScopedSavedDoc saved_doc = OpenScopedSavedDocument(); + if (!saved_doc) { + ADD_FAILURE() << "Failed to open saved document"; + return; + } + + ScopedSavedPage page = LoadScopedSavedPage(0); + if (!page) { + ADD_FAILURE() << "Failed to load page 0 from saved document"; + return; + } + + VerifySavedRenderingWithDisplayList(page.get(), expectation_name, flags); +} + ScopedFPDFBitmap EmbedderTest::VerifySavedDocumentCommon() { ScopedSavedDoc saved_doc = OpenScopedSavedDocument(); if (!saved_doc) { @@ -1236,7 +1275,8 @@ void EmbedderTest::WriteBitmapToPng(FPDF_BITMAP bitmap, // static void EmbedderTest::CompareBitmap(FPDF_BITMAP bitmap, std::string_view expectation_png_name) { - std::string png_path = GetEmbedderTestExpectationPath(expectation_png_name); + std::string png_path = + GetEmbedderTestPngExpectationPath(expectation_png_name); SCOPED_TRACE(testing::Message() << "CompareBitmap() with " << png_path); DiffOptions options = kExactDiffOptions; if (EmbedderTestEnvironment::GetInstance()->fontations()) { @@ -1288,6 +1328,23 @@ void EmbedderTest::CompareBitmapWithExpectationSuffix( ReportMissingExpectation(bitmap); } +// static +void EmbedderTest::CompareDisplayList(const std::string& display_list, + std::string_view expectation_name) { + std::string path = + GetEmbedderTestDisplayListExpectationPath(expectation_name); + SCOPED_TRACE(testing::Message() << "CompareDisplayList() with " << path); + std::vector expected_data = GetFileContents(path.c_str()); + if (expected_data.empty()) { + ADD_FAILURE() << "Missing or empty expectation file: " << path; + return; + } + std::string_view expected_text( + reinterpret_cast(expected_data.data()), + expected_data.size()); + EXPECT_EQ(display_list, expected_text); +} + // static int EmbedderTest::WriteBlockCallback(FPDF_FILEWRITE* pFileWrite, const void* data, diff --git a/testing/embedder_test.h b/testing/embedder_test.h index 8236ede7ad..19ebdfc03c 100644 --- a/testing/embedder_test.h +++ b/testing/embedder_test.h @@ -383,6 +383,11 @@ class EmbedderTest : public ::testing::Test, std::string_view expectation_png_name, const DiffOptions& options = kExactDiffOptions); + // Check `display_list` matches the expectation file named `expectation_name` + // under testing/resources/embedder_tests/. + static void CompareDisplayList(const std::string& display_list, + std::string_view expectation_name); + void ClearString() { data_string_.clear(); } const std::string& GetString() const { return data_string_; } @@ -409,6 +414,11 @@ class EmbedderTest : public ::testing::Test, void VerifySavedDocumentWithExpectationSuffix( std::string_view expectation_png_name, const DiffOptions& options = kExactDiffOptions); + void VerifySavedRenderingWithDisplayList(FPDF_PAGE page, + std::string_view expectation_name, + int flags = 0); + void VerifySavedDocumentWithDisplayList(std::string_view expectation_name, + int flags = 0); void SetWholeFileAvailable(); diff --git a/testing/embedder_test_constants.h b/testing/embedder_test_constants.h index c6f84e9bf7..d1c68d4a1d 100644 --- a/testing/embedder_test_constants.h +++ b/testing/embedder_test_constants.h @@ -23,10 +23,6 @@ inline constexpr char kBug890322Png[] = "bug_890322"; // Expectation file basename for rendering hello_world.pdf or bug_455199.pdf. inline constexpr char kHelloWorldPng[] = "hello_world"; -// Expectation file basename for rendering hello_world.pdf after removing -// "Goodbye, world!". -inline constexpr char kHelloWorldRemovedPng[] = "hello_world_removed"; - // Expectation file basename for rendering many_rectangles.pdf. inline constexpr char kManyRectanglesPng[] = "many_rectangles"; diff --git a/testing/pdfium_test/pdfium_test.cc b/testing/pdfium_test/pdfium_test.cc index ba62536d58..dd881e2fe7 100644 --- a/testing/pdfium_test/pdfium_test.cc +++ b/testing/pdfium_test/pdfium_test.cc @@ -1889,6 +1889,14 @@ void Processor::ProcessPdf(const std::string& name, } Idle(form.get()); } + + // Clear per-page caches on every repetition, to measure image decode + // on every repeat. + for (auto& [_, page] : form_callbacks.loaded_pages) { + FORM_OnBeforeClosePage(page.get(), form.get()); + } + form_callbacks.loaded_pages.clear(); + Idle(form.get()); } FORM_DoDocumentAAction(form.get(), FPDFDOC_AACTION_WC); diff --git a/testing/resources/embedder_tests/blank_page_200x200.dump.txt b/testing/resources/embedder_tests/blank_page_200x200.dump.txt new file mode 100644 index 0000000000..246c185f58 --- /dev/null +++ b/testing/resources/embedder_tests/blank_page_200x200.dump.txt @@ -0,0 +1,6 @@ +SaveState +SetBaseClip [0,0,200,200] +SetClip_PathFill rule=winding matrix=none points=[move(0.0000,200.0000) line(0.0000,0.0000) line(200.0000,0.0000) line(200.0000,200.0000) line(0.0000,200.0000,close)] +SaveState +RestoreState +RestoreState diff --git a/testing/resources/embedder_tests/blank_page_612x792.dump.txt b/testing/resources/embedder_tests/blank_page_612x792.dump.txt new file mode 100644 index 0000000000..c12b8ef305 --- /dev/null +++ b/testing/resources/embedder_tests/blank_page_612x792.dump.txt @@ -0,0 +1,6 @@ +SaveState +SetBaseClip [0,0,612,792] +SetClip_PathFill rule=winding matrix=none points=[move(0.0000,792.0000) line(0.0000,0.0000) line(612.0000,0.0000) line(612.0000,792.0000) line(0.0000,792.0000,close)] +SaveState +RestoreState +RestoreState diff --git a/testing/resources/embedder_tests/blue_path.dump.txt b/testing/resources/embedder_tests/blue_path.dump.txt new file mode 100644 index 0000000000..c1c5aa1ec9 --- /dev/null +++ b/testing/resources/embedder_tests/blue_path.dump.txt @@ -0,0 +1,10 @@ +SaveState +SetBaseClip [0,0,612,792] +SetClip_PathFill rule=winding matrix=none points=[move(0.0000,792.0000) line(0.0000,0.0000) line(612.0000,0.0000) line(612.0000,792.0000) line(0.0000,792.0000,close)] +SaveState +FillRect [10,762,30,782] color=0xffff0000 +FillRect [100,652,140,692] color=0x8000ff00 +DrawPath fill=0xc8000000 stroke=0x00000000 rule=even-odd stroke_state=[none] matrix=[1.0000,0.0000,0.0000,-1.0000,0.0000,792.0000] points=[move(400.0000,100.0000) line(400.0000,200.0000) line(300.0000,100.0000,close)] +DrawPath fill=0xff0000ff stroke=0x00000000 rule=winding stroke_state=[none] matrix=[1.0000,0.0000,0.0000,-1.0000,0.0000,792.0000] points=[move(200.0000,200.0000) line(230.0000,230.0000) bezier(250.0000,250.0000) bezier(280.0000,280.0000) bezier(300.0000,300.0000) line(325.0000,325.0000) line(350.0000,325.0000) bezier(375.0000,330.0000) bezier(390.0000,360.0000) bezier(400.0000,400.0000,close)] +RestoreState +RestoreState diff --git a/testing/resources/embedder_tests/blue_path_agg.png b/testing/resources/embedder_tests/blue_path_agg.png deleted file mode 100644 index c9522e4318..0000000000 Binary files a/testing/resources/embedder_tests/blue_path_agg.png and /dev/null differ diff --git a/testing/resources/embedder_tests/blue_path_saved.dump.txt b/testing/resources/embedder_tests/blue_path_saved.dump.txt new file mode 100644 index 0000000000..4264efc986 --- /dev/null +++ b/testing/resources/embedder_tests/blue_path_saved.dump.txt @@ -0,0 +1,10 @@ +SaveState +SetBaseClip [0,0,612,792] +SetClip_PathFill rule=winding matrix=none points=[move(0.0000,792.0000) line(0.0000,0.0000) line(612.0000,0.0000) line(612.0000,792.0000) line(0.0000,792.0000,close)] +SaveState +FillRect [10,762,30,782] color=0xffff0000 +FillRect [100,652,140,692] color=0x8000ff00 +DrawPath fill=0xc8000000 stroke=0x00000000 rule=even-odd stroke_state=[width=1.0000 cap=butt join=miter miter=10.0000] matrix=[1.0000,0.0000,0.0000,-1.0000,0.0000,792.0000] points=[move(400.0000,100.0000) line(400.0000,200.0000) line(300.0000,100.0000) line(400.0000,100.0000,close)] +DrawPath fill=0xff0000ff stroke=0x00000000 rule=winding stroke_state=[width=1.0000 cap=butt join=miter miter=10.0000] matrix=[1.0000,0.0000,0.0000,-1.0000,0.0000,792.0000] points=[move(200.0000,200.0000) line(230.0000,230.0000) bezier(250.0000,250.0000) bezier(280.0000,280.0000) bezier(300.0000,300.0000) line(325.0000,325.0000) line(350.0000,325.0000) bezier(375.0000,330.0000) bezier(390.0000,360.0000) bezier(400.0000,400.0000) line(200.0000,200.0000,close)] +RestoreState +RestoreState diff --git a/testing/resources/embedder_tests/blue_path_skia.png b/testing/resources/embedder_tests/blue_path_skia.png deleted file mode 100644 index 57a6e70e24..0000000000 Binary files a/testing/resources/embedder_tests/blue_path_skia.png and /dev/null differ diff --git a/testing/resources/embedder_tests/blue_rectangle_alpha.dump.txt b/testing/resources/embedder_tests/blue_rectangle_alpha.dump.txt new file mode 100644 index 0000000000..22e4537462 --- /dev/null +++ b/testing/resources/embedder_tests/blue_rectangle_alpha.dump.txt @@ -0,0 +1,7 @@ +SaveState +SetBaseClip [0,0,612,792] +SetClip_PathFill rule=winding matrix=none points=[move(0.0000,792.0000) line(0.0000,0.0000) line(612.0000,0.0000) line(612.0000,792.0000) line(0.0000,792.0000,close)] +SaveState +FillRect [10,682,110,782] color=0xb40000ff +RestoreState +RestoreState diff --git a/testing/resources/embedder_tests/blue_rectangle_alpha.png b/testing/resources/embedder_tests/blue_rectangle_alpha.png deleted file mode 100644 index 078af070d8..0000000000 Binary files a/testing/resources/embedder_tests/blue_rectangle_alpha.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bottom_text.dump.txt b/testing/resources/embedder_tests/bottom_text.dump.txt new file mode 100644 index 0000000000..49bb915338 --- /dev/null +++ b/testing/resources/embedder_tests/bottom_text.dump.txt @@ -0,0 +1,7 @@ +SaveState +SetBaseClip [0,0,612,792] +SetClip_PathFill rule=winding matrix=none points=[move(0.0000,792.0000) line(0.0000,0.0000) line(612.0000,0.0000) line(612.0000,792.0000) line(0.0000,792.0000,close)] +SaveState +DrawDeviceText font="Arimo" size=12.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,20.0000,772.0000] glyphs=[(idx=44,u=U+0049,origin=(0.0000,0.0000)) (idx=10,u=U+0027,origin=(3.3360,0.0000)) (idx=80,u=U+006D,origin=(5.6280,0.0000)) (idx=3,u=U+0020,origin=(15.6240,0.0000)) (idx=68,u=U+0061,origin=(18.9600,0.0000)) (idx=87,u=U+0074,origin=(25.6320,0.0000)) (idx=3,u=U+0020,origin=(28.9680,0.0000)) (idx=87,u=U+0074,origin=(32.3040,0.0000)) (idx=75,u=U+0068,origin=(35.6400,0.0000)) (idx=72,u=U+0065,origin=(42.3120,0.0000)) (idx=3,u=U+0020,origin=(48.9840,0.0000)) (idx=69,u=U+0062,origin=(52.3200,0.0000)) (idx=82,u=U+006F,origin=(58.9920,0.0000)) (idx=87,u=U+0074,origin=(65.6640,0.0000)) (idx=87,u=U+0074,origin=(69.0000,0.0000)) (idx=82,u=U+006F,origin=(72.3360,0.0000)) (idx=80,u=U+006D,origin=(79.0080,0.0000)) (idx=3,u=U+0020,origin=(89.0040,0.0000)) (idx=82,u=U+006F,origin=(92.3400,0.0000)) (idx=73,u=U+0066,origin=(99.0120,0.0000)) (idx=3,u=U+0020,origin=(102.3480,0.0000)) (idx=87,u=U+0074,origin=(105.6840,0.0000)) (idx=75,u=U+0068,origin=(109.0200,0.0000)) (idx=72,u=U+0065,origin=(115.6920,0.0000)) (idx=3,u=U+0020,origin=(122.3640,0.0000)) (idx=83,u=U+0070,origin=(125.7000,0.0000)) (idx=68,u=U+0061,origin=(132.3720,0.0000)) (idx=74,u=U+0067,origin=(139.0440,0.0000)) (idx=72,u=U+0065,origin=(145.7160,0.0000))] +RestoreState +RestoreState diff --git a/testing/resources/embedder_tests/bottom_text_added_bold_and_stretched_text.dump.txt b/testing/resources/embedder_tests/bottom_text_added_bold_and_stretched_text.dump.txt new file mode 100644 index 0000000000..0943ef31db --- /dev/null +++ b/testing/resources/embedder_tests/bottom_text_added_bold_and_stretched_text.dump.txt @@ -0,0 +1,9 @@ +SaveState +SetBaseClip [0,0,612,792] +SetClip_PathFill rule=winding matrix=none points=[move(0.0000,792.0000) line(0.0000,0.0000) line(612.0000,0.0000) line(612.0000,792.0000) line(0.0000,792.0000,close)] +SaveState +DrawDeviceText font="Arimo" size=12.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,20.0000,772.0000] glyphs=[(idx=44,u=U+0049,origin=(0.0000,0.0000)) (idx=10,u=U+0027,origin=(3.3360,0.0000)) (idx=80,u=U+006D,origin=(5.6280,0.0000)) (idx=3,u=U+0020,origin=(15.6240,0.0000)) (idx=68,u=U+0061,origin=(18.9600,0.0000)) (idx=87,u=U+0074,origin=(25.6320,0.0000)) (idx=3,u=U+0020,origin=(28.9680,0.0000)) (idx=87,u=U+0074,origin=(32.3040,0.0000)) (idx=75,u=U+0068,origin=(35.6400,0.0000)) (idx=72,u=U+0065,origin=(42.3120,0.0000)) (idx=3,u=U+0020,origin=(48.9840,0.0000)) (idx=69,u=U+0062,origin=(52.3200,0.0000)) (idx=82,u=U+006F,origin=(58.9920,0.0000)) (idx=87,u=U+0074,origin=(65.6640,0.0000)) (idx=87,u=U+0074,origin=(69.0000,0.0000)) (idx=82,u=U+006F,origin=(72.3360,0.0000)) (idx=80,u=U+006D,origin=(79.0080,0.0000)) (idx=3,u=U+0020,origin=(89.0040,0.0000)) (idx=82,u=U+006F,origin=(92.3400,0.0000)) (idx=73,u=U+0066,origin=(99.0120,0.0000)) (idx=3,u=U+0020,origin=(102.3480,0.0000)) (idx=87,u=U+0074,origin=(105.6840,0.0000)) (idx=75,u=U+0068,origin=(109.0200,0.0000)) (idx=72,u=U+0065,origin=(115.6920,0.0000)) (idx=3,u=U+0020,origin=(122.3640,0.0000)) (idx=83,u=U+0070,origin=(125.7000,0.0000)) (idx=68,u=U+0061,origin=(132.3720,0.0000)) (idx=74,u=U+0067,origin=(139.0440,0.0000)) (idx=72,u=U+0065,origin=(145.7160,0.0000))] +DrawDeviceText font="Tinos" size=15.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,100.0000,192.0000] glyphs=[(idx=43,u=U+0048,origin=(0.0000,0.0000)) (idx=76,u=U+0069,origin=(11.6700,0.0000)) (idx=15,u=U+002C,origin=(15.8400,0.0000)) (idx=3,u=U+0020,origin=(19.5900,0.0000)) (idx=44,u=U+0049,origin=(23.3400,0.0000)) (idx=10,u=U+0027,origin=(29.1750,0.0000)) (idx=80,u=U+006D,origin=(33.3450,0.0000)) (idx=3,u=U+0020,origin=(45.8400,0.0000)) (idx=37,u=U+0042,origin=(49.5900,0.0000)) (idx=82,u=U+006F,origin=(59.5950,0.0000)) (idx=79,u=U+006C,origin=(67.0950,0.0000)) (idx=71,u=U+0064,origin=(71.2650,0.0000)) (idx=17,u=U+002E,origin=(79.6050,0.0000)) (idx=3,u=U+0020,origin=(83.3550,0.0000)) (idx=55,u=U+0054,origin=(87.1050,0.0000)) (idx=76,u=U+0069,origin=(97.1100,0.0000)) (idx=80,u=U+006D,origin=(101.2800,0.0000)) (idx=72,u=U+0065,origin=(113.7750,0.0000)) (idx=86,u=U+0073,origin=(120.4350,0.0000)) (idx=3,u=U+0020,origin=(126.2700,0.0000)) (idx=49,u=U+004E,origin=(130.0200,0.0000)) (idx=72,u=U+0065,origin=(140.8500,0.0000)) (idx=90,u=U+0077,origin=(147.5100,0.0000)) (idx=3,u=U+0020,origin=(158.3400,0.0000)) (idx=53,u=U+0052,origin=(162.0900,0.0000)) (idx=82,u=U+006F,origin=(172.9200,0.0000)) (idx=80,u=U+006D,origin=(180.4200,0.0000)) (idx=68,u=U+0061,origin=(192.9150,0.0000)) (idx=81,u=U+006E,origin=(200.4150,0.0000)) (idx=3,u=U+0020,origin=(208.7550,0.0000)) (idx=37,u=U+0042,origin=(212.5050,0.0000)) (idx=82,u=U+006F,origin=(222.5100,0.0000)) (idx=79,u=U+006C,origin=(230.0100,0.0000)) (idx=71,u=U+0064,origin=(234.1800,0.0000)) (idx=17,u=U+002E,origin=(242.5200,0.0000))] +DrawDeviceText font="Cousine" size=20.0000 color=0xff000000 matrix=[1.0000,-1.5000,2.0000,-0.5000,200.0000,592.0000] glyphs=[(idx=38,u=U+0043,origin=(0.0000,0.0000)) (idx=68,u=U+0061,origin=(12.0000,0.0000)) (idx=81,u=U+006E,origin=(24.0000,0.0000)) (idx=3,u=U+0020,origin=(36.0000,0.0000)) (idx=92,u=U+0079,origin=(48.0000,0.0000)) (idx=82,u=U+006F,origin=(60.0000,0.0000)) (idx=88,u=U+0075,origin=(72.0000,0.0000)) (idx=3,u=U+0020,origin=(84.0000,0.0000)) (idx=85,u=U+0072,origin=(96.0000,0.0000)) (idx=72,u=U+0065,origin=(108.0000,0.0000)) (idx=68,u=U+0061,origin=(120.0000,0.0000)) (idx=71,u=U+0064,origin=(132.0000,0.0000)) (idx=3,u=U+0020,origin=(144.0000,0.0000)) (idx=80,u=U+006D,origin=(156.0000,0.0000)) (idx=72,u=U+0065,origin=(168.0000,0.0000)) (idx=34,u=U+003F,origin=(180.0000,0.0000)) (idx=3,u=U+0020,origin=(192.0000,0.0000)) (idx=31,u=U+003C,origin=(204.0000,0.0000)) (idx=29,u=U+003A,origin=(216.0000,0.0000)) (idx=12,u=U+0029,origin=(228.0000,0.0000)) (idx=33,u=U+003E,origin=(240.0000,0.0000))] +RestoreState +RestoreState diff --git a/testing/resources/embedder_tests/bottom_text_added_bold_and_stretched_text_agg.png b/testing/resources/embedder_tests/bottom_text_added_bold_and_stretched_text_agg.png deleted file mode 100644 index 423319384f..0000000000 Binary files a/testing/resources/embedder_tests/bottom_text_added_bold_and_stretched_text_agg.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bottom_text_added_bold_and_stretched_text_agg_mac.png b/testing/resources/embedder_tests/bottom_text_added_bold_and_stretched_text_agg_mac.png deleted file mode 100644 index fc24e4c671..0000000000 Binary files a/testing/resources/embedder_tests/bottom_text_added_bold_and_stretched_text_agg_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bottom_text_added_bold_and_stretched_text_skia_linux.png b/testing/resources/embedder_tests/bottom_text_added_bold_and_stretched_text_skia_linux.png deleted file mode 100644 index a696b87a0f..0000000000 Binary files a/testing/resources/embedder_tests/bottom_text_added_bold_and_stretched_text_skia_linux.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bottom_text_added_bold_and_stretched_text_skia_mac.png b/testing/resources/embedder_tests/bottom_text_added_bold_and_stretched_text_skia_mac.png deleted file mode 100644 index dc607077e5..0000000000 Binary files a/testing/resources/embedder_tests/bottom_text_added_bold_and_stretched_text_skia_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bottom_text_added_bold_and_stretched_text_skia_mac_x86.png b/testing/resources/embedder_tests/bottom_text_added_bold_and_stretched_text_skia_mac_x86.png deleted file mode 100644 index a7ce02d077..0000000000 Binary files a/testing/resources/embedder_tests/bottom_text_added_bold_and_stretched_text_skia_mac_x86.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bottom_text_added_bold_and_stretched_text_skia_win.png b/testing/resources/embedder_tests/bottom_text_added_bold_and_stretched_text_skia_win.png deleted file mode 100644 index 08476a6b56..0000000000 Binary files a/testing/resources/embedder_tests/bottom_text_added_bold_and_stretched_text_skia_win.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bottom_text_added_bold_text.dump.txt b/testing/resources/embedder_tests/bottom_text_added_bold_text.dump.txt new file mode 100644 index 0000000000..67e0ddd472 --- /dev/null +++ b/testing/resources/embedder_tests/bottom_text_added_bold_text.dump.txt @@ -0,0 +1,8 @@ +SaveState +SetBaseClip [0,0,612,792] +SetClip_PathFill rule=winding matrix=none points=[move(0.0000,792.0000) line(0.0000,0.0000) line(612.0000,0.0000) line(612.0000,792.0000) line(0.0000,792.0000,close)] +SaveState +DrawDeviceText font="Arimo" size=12.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,20.0000,772.0000] glyphs=[(idx=44,u=U+0049,origin=(0.0000,0.0000)) (idx=10,u=U+0027,origin=(3.3360,0.0000)) (idx=80,u=U+006D,origin=(5.6280,0.0000)) (idx=3,u=U+0020,origin=(15.6240,0.0000)) (idx=68,u=U+0061,origin=(18.9600,0.0000)) (idx=87,u=U+0074,origin=(25.6320,0.0000)) (idx=3,u=U+0020,origin=(28.9680,0.0000)) (idx=87,u=U+0074,origin=(32.3040,0.0000)) (idx=75,u=U+0068,origin=(35.6400,0.0000)) (idx=72,u=U+0065,origin=(42.3120,0.0000)) (idx=3,u=U+0020,origin=(48.9840,0.0000)) (idx=69,u=U+0062,origin=(52.3200,0.0000)) (idx=82,u=U+006F,origin=(58.9920,0.0000)) (idx=87,u=U+0074,origin=(65.6640,0.0000)) (idx=87,u=U+0074,origin=(69.0000,0.0000)) (idx=82,u=U+006F,origin=(72.3360,0.0000)) (idx=80,u=U+006D,origin=(79.0080,0.0000)) (idx=3,u=U+0020,origin=(89.0040,0.0000)) (idx=82,u=U+006F,origin=(92.3400,0.0000)) (idx=73,u=U+0066,origin=(99.0120,0.0000)) (idx=3,u=U+0020,origin=(102.3480,0.0000)) (idx=87,u=U+0074,origin=(105.6840,0.0000)) (idx=75,u=U+0068,origin=(109.0200,0.0000)) (idx=72,u=U+0065,origin=(115.6920,0.0000)) (idx=3,u=U+0020,origin=(122.3640,0.0000)) (idx=83,u=U+0070,origin=(125.7000,0.0000)) (idx=68,u=U+0061,origin=(132.3720,0.0000)) (idx=74,u=U+0067,origin=(139.0440,0.0000)) (idx=72,u=U+0065,origin=(145.7160,0.0000))] +DrawDeviceText font="Tinos" size=15.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,100.0000,192.0000] glyphs=[(idx=43,u=U+0048,origin=(0.0000,0.0000)) (idx=76,u=U+0069,origin=(11.6700,0.0000)) (idx=15,u=U+002C,origin=(15.8400,0.0000)) (idx=3,u=U+0020,origin=(19.5900,0.0000)) (idx=44,u=U+0049,origin=(23.3400,0.0000)) (idx=10,u=U+0027,origin=(29.1750,0.0000)) (idx=80,u=U+006D,origin=(33.3450,0.0000)) (idx=3,u=U+0020,origin=(45.8400,0.0000)) (idx=37,u=U+0042,origin=(49.5900,0.0000)) (idx=82,u=U+006F,origin=(59.5950,0.0000)) (idx=79,u=U+006C,origin=(67.0950,0.0000)) (idx=71,u=U+0064,origin=(71.2650,0.0000)) (idx=17,u=U+002E,origin=(79.6050,0.0000)) (idx=3,u=U+0020,origin=(83.3550,0.0000)) (idx=55,u=U+0054,origin=(87.1050,0.0000)) (idx=76,u=U+0069,origin=(97.1100,0.0000)) (idx=80,u=U+006D,origin=(101.2800,0.0000)) (idx=72,u=U+0065,origin=(113.7750,0.0000)) (idx=86,u=U+0073,origin=(120.4350,0.0000)) (idx=3,u=U+0020,origin=(126.2700,0.0000)) (idx=49,u=U+004E,origin=(130.0200,0.0000)) (idx=72,u=U+0065,origin=(140.8500,0.0000)) (idx=90,u=U+0077,origin=(147.5100,0.0000)) (idx=3,u=U+0020,origin=(158.3400,0.0000)) (idx=53,u=U+0052,origin=(162.0900,0.0000)) (idx=82,u=U+006F,origin=(172.9200,0.0000)) (idx=80,u=U+006D,origin=(180.4200,0.0000)) (idx=68,u=U+0061,origin=(192.9150,0.0000)) (idx=81,u=U+006E,origin=(200.4150,0.0000)) (idx=3,u=U+0020,origin=(208.7550,0.0000)) (idx=37,u=U+0042,origin=(212.5050,0.0000)) (idx=82,u=U+006F,origin=(222.5100,0.0000)) (idx=79,u=U+006C,origin=(230.0100,0.0000)) (idx=71,u=U+0064,origin=(234.1800,0.0000)) (idx=17,u=U+002E,origin=(242.5200,0.0000))] +RestoreState +RestoreState diff --git a/testing/resources/embedder_tests/bottom_text_added_bold_text_agg.png b/testing/resources/embedder_tests/bottom_text_added_bold_text_agg.png deleted file mode 100644 index 773671d03c..0000000000 Binary files a/testing/resources/embedder_tests/bottom_text_added_bold_text_agg.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bottom_text_added_bold_text_agg_mac.png b/testing/resources/embedder_tests/bottom_text_added_bold_text_agg_mac.png deleted file mode 100644 index 7e2aeff84d..0000000000 Binary files a/testing/resources/embedder_tests/bottom_text_added_bold_text_agg_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bottom_text_added_bold_text_skia_linux.png b/testing/resources/embedder_tests/bottom_text_added_bold_text_skia_linux.png deleted file mode 100644 index 015a80908d..0000000000 Binary files a/testing/resources/embedder_tests/bottom_text_added_bold_text_skia_linux.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bottom_text_added_bold_text_skia_mac.png b/testing/resources/embedder_tests/bottom_text_added_bold_text_skia_mac.png deleted file mode 100644 index 7fd1057c33..0000000000 Binary files a/testing/resources/embedder_tests/bottom_text_added_bold_text_skia_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bottom_text_added_bold_text_skia_win.png b/testing/resources/embedder_tests/bottom_text_added_bold_text_skia_win.png deleted file mode 100644 index 1352d27967..0000000000 Binary files a/testing/resources/embedder_tests/bottom_text_added_bold_text_skia_win.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bottom_text_agg.png b/testing/resources/embedder_tests/bottom_text_agg.png deleted file mode 100644 index 62ca5c01ad..0000000000 Binary files a/testing/resources/embedder_tests/bottom_text_agg.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bottom_text_agg_mac.png b/testing/resources/embedder_tests/bottom_text_agg_mac.png deleted file mode 100644 index 3bc4e0570b..0000000000 Binary files a/testing/resources/embedder_tests/bottom_text_agg_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bottom_text_skia_linux.png b/testing/resources/embedder_tests/bottom_text_skia_linux.png deleted file mode 100644 index cc9d46c40c..0000000000 Binary files a/testing/resources/embedder_tests/bottom_text_skia_linux.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bottom_text_skia_mac.png b/testing/resources/embedder_tests/bottom_text_skia_mac.png deleted file mode 100644 index 78b710e939..0000000000 Binary files a/testing/resources/embedder_tests/bottom_text_skia_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bottom_text_skia_win.png b/testing/resources/embedder_tests/bottom_text_skia_win.png deleted file mode 100644 index b84d61ae1a..0000000000 Binary files a/testing/resources/embedder_tests/bottom_text_skia_win.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bug_1302455_edit_both_forms.dump.txt b/testing/resources/embedder_tests/bug_1302455_edit_both_forms.dump.txt new file mode 100644 index 0000000000..a69fa49575 --- /dev/null +++ b/testing/resources/embedder_tests/bug_1302455_edit_both_forms.dump.txt @@ -0,0 +1,14 @@ +SaveState +SetBaseClip [0,0,300,300] +SetClip_PathFill rule=winding matrix=none points=[move(0.0000,300.0000) line(0.0000,0.0000) line(300.0000,0.0000) line(300.0000,300.0000) line(0.0000,300.0000,close)] +SaveState +RestoreState +RestoreState +SaveState +DrawDeviceText font="Arimo" size=25.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,101.0000,193.6750] glyphs=[(idx=36,u=U+0041,origin=(0.0000,0.0000))] +RestoreState +FillRect [100,200,200,170] color=0x64dde4ff +SaveState +DrawDeviceText font="Arimo" size=25.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,101.0000,133.6750] glyphs=[(idx=37,u=U+0042,origin=(0.0000,0.0000))] +RestoreState +FillRect [100,140,200,110] color=0x64dde4ff diff --git a/testing/resources/embedder_tests/bug_1302455_edit_both_forms_agg.png b/testing/resources/embedder_tests/bug_1302455_edit_both_forms_agg.png deleted file mode 100644 index 98a828669c..0000000000 Binary files a/testing/resources/embedder_tests/bug_1302455_edit_both_forms_agg.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bug_1302455_edit_both_forms_agg_mac.png b/testing/resources/embedder_tests/bug_1302455_edit_both_forms_agg_mac.png deleted file mode 100644 index f8c0222cee..0000000000 Binary files a/testing/resources/embedder_tests/bug_1302455_edit_both_forms_agg_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bug_1302455_edit_both_forms_skia_linux.png b/testing/resources/embedder_tests/bug_1302455_edit_both_forms_skia_linux.png deleted file mode 100644 index 48ee4e3e72..0000000000 Binary files a/testing/resources/embedder_tests/bug_1302455_edit_both_forms_skia_linux.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bug_1302455_edit_both_forms_skia_mac.png b/testing/resources/embedder_tests/bug_1302455_edit_both_forms_skia_mac.png deleted file mode 100644 index 6e3d11ca82..0000000000 Binary files a/testing/resources/embedder_tests/bug_1302455_edit_both_forms_skia_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bug_1302455_edit_both_forms_skia_win.png b/testing/resources/embedder_tests/bug_1302455_edit_both_forms_skia_win.png deleted file mode 100644 index 40e663d6a9..0000000000 Binary files a/testing/resources/embedder_tests/bug_1302455_edit_both_forms_skia_win.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bug_1302455_edit_first_form.dump.txt b/testing/resources/embedder_tests/bug_1302455_edit_first_form.dump.txt new file mode 100644 index 0000000000..f806783755 --- /dev/null +++ b/testing/resources/embedder_tests/bug_1302455_edit_first_form.dump.txt @@ -0,0 +1,14 @@ +SaveState +SetBaseClip [0,0,300,300] +SetClip_PathFill rule=winding matrix=none points=[move(0.0000,300.0000) line(0.0000,0.0000) line(300.0000,0.0000) line(300.0000,300.0000) line(0.0000,300.0000,close)] +SaveState +RestoreState +RestoreState +SaveState +DrawDeviceText font="Arimo" size=25.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,101.0000,193.6750] glyphs=[(idx=36,u=U+0041,origin=(0.0000,0.0000))] +RestoreState +FillRect [100,200,200,170] color=0x64dde4ff +SaveState +FillRect [100,110,200,140] color=0xffff0000 +RestoreState +FillRect [100,140,200,110] color=0x64dde4ff diff --git a/testing/resources/embedder_tests/bug_1302455_edit_first_form_agg.png b/testing/resources/embedder_tests/bug_1302455_edit_first_form_agg.png deleted file mode 100644 index 23e37a2588..0000000000 Binary files a/testing/resources/embedder_tests/bug_1302455_edit_first_form_agg.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bug_1302455_edit_first_form_agg_mac.png b/testing/resources/embedder_tests/bug_1302455_edit_first_form_agg_mac.png deleted file mode 100644 index f702fbcf3d..0000000000 Binary files a/testing/resources/embedder_tests/bug_1302455_edit_first_form_agg_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bug_1302455_edit_first_form_skia_linux.png b/testing/resources/embedder_tests/bug_1302455_edit_first_form_skia_linux.png deleted file mode 100644 index eb49f0f23d..0000000000 Binary files a/testing/resources/embedder_tests/bug_1302455_edit_first_form_skia_linux.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bug_1302455_edit_first_form_skia_mac.png b/testing/resources/embedder_tests/bug_1302455_edit_first_form_skia_mac.png deleted file mode 100644 index 18035f3a7a..0000000000 Binary files a/testing/resources/embedder_tests/bug_1302455_edit_first_form_skia_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bug_1302455_edit_first_form_skia_win.png b/testing/resources/embedder_tests/bug_1302455_edit_first_form_skia_win.png deleted file mode 100644 index 3c2468571d..0000000000 Binary files a/testing/resources/embedder_tests/bug_1302455_edit_first_form_skia_win.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bug_1302455_edit_second_form.dump.txt b/testing/resources/embedder_tests/bug_1302455_edit_second_form.dump.txt new file mode 100644 index 0000000000..02bc82b17b --- /dev/null +++ b/testing/resources/embedder_tests/bug_1302455_edit_second_form.dump.txt @@ -0,0 +1,14 @@ +SaveState +SetBaseClip [0,0,300,300] +SetClip_PathFill rule=winding matrix=none points=[move(0.0000,300.0000) line(0.0000,0.0000) line(300.0000,0.0000) line(300.0000,300.0000) line(0.0000,300.0000,close)] +SaveState +RestoreState +RestoreState +SaveState +FillRect [100,170,200,200] color=0xffff0000 +RestoreState +FillRect [100,200,200,170] color=0x64dde4ff +SaveState +DrawDeviceText font="Arimo" size=25.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,101.0000,133.6750] glyphs=[(idx=37,u=U+0042,origin=(0.0000,0.0000))] +RestoreState +FillRect [100,140,200,110] color=0x64dde4ff diff --git a/testing/resources/embedder_tests/bug_1302455_edit_second_form_agg.png b/testing/resources/embedder_tests/bug_1302455_edit_second_form_agg.png deleted file mode 100644 index af0a50b909..0000000000 Binary files a/testing/resources/embedder_tests/bug_1302455_edit_second_form_agg.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bug_1302455_edit_second_form_agg_mac.png b/testing/resources/embedder_tests/bug_1302455_edit_second_form_agg_mac.png deleted file mode 100644 index f18aa4048b..0000000000 Binary files a/testing/resources/embedder_tests/bug_1302455_edit_second_form_agg_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bug_1302455_edit_second_form_skia_linux.png b/testing/resources/embedder_tests/bug_1302455_edit_second_form_skia_linux.png deleted file mode 100644 index 5d7db1b70b..0000000000 Binary files a/testing/resources/embedder_tests/bug_1302455_edit_second_form_skia_linux.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bug_1302455_edit_second_form_skia_mac.png b/testing/resources/embedder_tests/bug_1302455_edit_second_form_skia_mac.png deleted file mode 100644 index ea1cbdc1ca..0000000000 Binary files a/testing/resources/embedder_tests/bug_1302455_edit_second_form_skia_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bug_1302455_edit_second_form_skia_win.png b/testing/resources/embedder_tests/bug_1302455_edit_second_form_skia_win.png deleted file mode 100644 index 63428e6d1f..0000000000 Binary files a/testing/resources/embedder_tests/bug_1302455_edit_second_form_skia_win.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bug_1302455_read_only.dump.txt b/testing/resources/embedder_tests/bug_1302455_read_only.dump.txt new file mode 100644 index 0000000000..c091f2b2c1 --- /dev/null +++ b/testing/resources/embedder_tests/bug_1302455_read_only.dump.txt @@ -0,0 +1,14 @@ +SaveState +SetBaseClip [0,0,300,300] +SetClip_PathFill rule=winding matrix=none points=[move(0.0000,300.0000) line(0.0000,0.0000) line(300.0000,0.0000) line(300.0000,300.0000) line(0.0000,300.0000,close)] +SaveState +RestoreState +RestoreState +SaveState +FillRect [100,170,200,200] color=0xffff0000 +RestoreState +FillRect [100,200,200,170] color=0x64dde4ff +SaveState +FillRect [100,110,200,140] color=0xffff0000 +RestoreState +FillRect [100,140,200,110] color=0x64dde4ff diff --git a/testing/resources/embedder_tests/bug_1302455_read_only_agg.png b/testing/resources/embedder_tests/bug_1302455_read_only_agg.png deleted file mode 100644 index c04a0dd0f7..0000000000 Binary files a/testing/resources/embedder_tests/bug_1302455_read_only_agg.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bug_1302455_read_only_skia.png b/testing/resources/embedder_tests/bug_1302455_read_only_skia.png deleted file mode 100644 index 2887a76f8b..0000000000 Binary files a/testing/resources/embedder_tests/bug_1302455_read_only_skia.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bug_1549.dump.txt b/testing/resources/embedder_tests/bug_1549.dump.txt new file mode 100644 index 0000000000..680337539c --- /dev/null +++ b/testing/resources/embedder_tests/bug_1549.dump.txt @@ -0,0 +1,8 @@ +SaveState +SetBaseClip [0,0,100,150] +SetClip_PathFill rule=winding matrix=none points=[move(0.0000,150.0000) line(0.0000,0.0000) line(100.0000,0.0000) line(100.0000,150.0000) line(0.0000,150.0000,close)] +SaveState +StartDIBits size=[1,1] bpp=8 matrix=[20.0000,0.0000,0.0000,-20.0000,0.0000,50.0000] alpha=1.0000 color=0x00000000 +FillRect [30,90,80,130] color=0xff00aeef +RestoreState +RestoreState diff --git a/testing/resources/embedder_tests/bug_1549.png b/testing/resources/embedder_tests/bug_1549.png deleted file mode 100644 index c13b9e1d4c..0000000000 Binary files a/testing/resources/embedder_tests/bug_1549.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bug_1549_incorrect.dump.txt b/testing/resources/embedder_tests/bug_1549_incorrect.dump.txt new file mode 100644 index 0000000000..eb26afd950 --- /dev/null +++ b/testing/resources/embedder_tests/bug_1549_incorrect.dump.txt @@ -0,0 +1,7 @@ +SaveState +SetBaseClip [0,0,100,150] +SetClip_PathFill rule=winding matrix=none points=[move(0.0000,150.0000) line(0.0000,0.0000) line(100.0000,0.0000) line(100.0000,150.0000) line(0.0000,150.0000,close)] +SaveState +FillRect [30,90,80,130] color=0xff000000 +RestoreState +RestoreState diff --git a/testing/resources/embedder_tests/bug_1549_incorrect.png b/testing/resources/embedder_tests/bug_1549_incorrect.png deleted file mode 100644 index f9ea989058..0000000000 Binary files a/testing/resources/embedder_tests/bug_1549_incorrect.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bug_1549_removed.dump.txt b/testing/resources/embedder_tests/bug_1549_removed.dump.txt new file mode 100644 index 0000000000..9877effa41 --- /dev/null +++ b/testing/resources/embedder_tests/bug_1549_removed.dump.txt @@ -0,0 +1,7 @@ +SaveState +SetBaseClip [0,0,100,150] +SetClip_PathFill rule=winding matrix=none points=[move(0.0000,150.0000) line(0.0000,0.0000) line(100.0000,0.0000) line(100.0000,150.0000) line(0.0000,150.0000,close)] +SaveState +FillRect [30,90,80,130] color=0xff00aeef +RestoreState +RestoreState diff --git a/testing/resources/embedder_tests/bug_1549_removed.png b/testing/resources/embedder_tests/bug_1549_removed.png deleted file mode 100644 index b20a5eaba9..0000000000 Binary files a/testing/resources/embedder_tests/bug_1549_removed.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bug_410996566.dump.txt b/testing/resources/embedder_tests/bug_410996566.dump.txt new file mode 100644 index 0000000000..e06cf305ce --- /dev/null +++ b/testing/resources/embedder_tests/bug_410996566.dump.txt @@ -0,0 +1,7 @@ +SaveState +SetBaseClip [0,0,200,200] +SetClip_PathFill rule=winding matrix=none points=[move(0.0000,200.0000) line(0.0000,0.0000) line(200.0000,0.0000) line(200.0000,200.0000) line(0.0000,200.0000,close)] +SaveState +DrawDeviceText font="Tinos" size=12.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,20.0000,150.0000] glyphs=[(idx=43,u=U+0048,origin=(0.0000,0.0000)) (idx=72,u=U+0065,origin=(9.8640,0.0000)) (idx=79,u=U+006C,origin=(15.1920,0.0000)) (idx=79,u=U+006C,origin=(20.9280,0.0000)) (idx=82,u=U+006F,origin=(24.2640,0.0000)) (idx=15,u=U+002C,origin=(28.4640,0.0000)) (idx=3,u=U+0020,origin=(31.4640,0.0000)) (idx=90,u=U+0077,origin=(34.4640,0.0000)) (idx=82,u=U+006F,origin=(43.1280,0.0000)) (idx=85,u=U+0072,origin=(49.1280,0.0000)) (idx=79,u=U+006C,origin=(53.1240,0.0000)) (idx=71,u=U+0064,origin=(56.4600,0.0000)) (idx=4,u=U+0021,origin=(68.4600,0.0000))] +RestoreState +RestoreState diff --git a/testing/resources/embedder_tests/bug_410996566.png b/testing/resources/embedder_tests/bug_410996566.png deleted file mode 100644 index ec98812825..0000000000 Binary files a/testing/resources/embedder_tests/bug_410996566.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bug_410996566_agg_mac.png b/testing/resources/embedder_tests/bug_410996566_agg_mac.png deleted file mode 100644 index f779087370..0000000000 Binary files a/testing/resources/embedder_tests/bug_410996566_agg_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bug_410996566_skia.png b/testing/resources/embedder_tests/bug_410996566_skia.png deleted file mode 100644 index e8d3703086..0000000000 Binary files a/testing/resources/embedder_tests/bug_410996566_skia.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bug_410996566_skia_mac.png b/testing/resources/embedder_tests/bug_410996566_skia_mac.png deleted file mode 100644 index a2b1fa711b..0000000000 Binary files a/testing/resources/embedder_tests/bug_410996566_skia_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bug_410996566_skia_win.png b/testing/resources/embedder_tests/bug_410996566_skia_win.png deleted file mode 100644 index ff47df6f7f..0000000000 Binary files a/testing/resources/embedder_tests/bug_410996566_skia_win.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bug_535730401.dump.txt b/testing/resources/embedder_tests/bug_535730401.dump.txt new file mode 100644 index 0000000000..5973718014 --- /dev/null +++ b/testing/resources/embedder_tests/bug_535730401.dump.txt @@ -0,0 +1,27 @@ +SaveState +SetBaseClip [0,0,300,300] +SetClip_PathFill rule=winding matrix=none points=[move(0.0000,300.0000) line(0.0000,0.0000) line(300.0000,0.0000) line(300.0000,300.0000) line(0.0000,300.0000,close)] +SaveState +DrawDeviceText font="Arimo" size=12.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,100.0000,150.0000] glyphs=[(idx=55,u=U+0054,origin=(0.0000,0.0000)) (idx=72,u=U+0065,origin=(7.3320,0.0000)) (idx=86,u=U+0073,origin=(14.0040,0.0000)) (idx=87,u=U+0074,origin=(20.0040,0.0000)) (idx=3,u=U+0020,origin=(23.3400,0.0000)) (idx=41,u=U+0046,origin=(26.6760,0.0000)) (idx=82,u=U+006F,origin=(34.0080,0.0000)) (idx=85,u=U+0072,origin=(40.6800,0.0000)) (idx=80,u=U+006D,origin=(44.6760,0.0000))] +RestoreState +RestoreState +SaveState +RestoreState +SaveState +DrawDeviceText font="Arimo" size=12.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,101.0000,241.6640] glyphs=[(idx=40,u=U+0045,origin=(0.0000,0.0000)) (idx=79,u=U+006C,origin=(8.0040,0.0000)) (idx=72,u=U+0065,origin=(10.6680,0.0000)) (idx=83,u=U+0070,origin=(17.3400,0.0000)) (idx=75,u=U+0068,origin=(24.0120,0.0000)) (idx=68,u=U+0061,origin=(30.6840,0.0000)) (idx=81,u=U+006E,origin=(37.3560,0.0000)) (idx=87,u=U+0074,origin=(44.0280,0.0000))] +RestoreState +FillRect [100,250,200,225] color=0x64dde4ff +SaveState +RestoreState +FillRect [100,290,200,265] color=0x64dde4ff +FillRect [101,171,199,199] color=0x00000000 +DrawPath fill=0x00000000 stroke=0x00000000 rule=even-odd stroke_state=[none] matrix=[1.0000,0.0000,0.0000,-1.0000,100.0000,200.0000] points=[move(0.0000,0.0000) line(0.0000,30.0000) line(100.0000,30.0000) line(100.0000,0.0000) line(0.0000,0.0000,close) move(1.0000,1.0000) line(1.0000,29.0000) line(99.0000,29.0000) line(99.0000,1.0000) line(1.0000,1.0000,close)] +SaveState +SetClip_PathFill rule=winding matrix=none points=[move(101.0000,171.0000) line(101.0000,199.0000) line(199.0000,199.0000) line(199.0000,171.0000) line(101.0000,171.0000,close)] +DrawDeviceText font="Arimo" size=12.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,101.0000,189.1400] glyphs=[(idx=36,u=U+0041,origin=(0.0000,0.0000)) (idx=3,u=U+0020,origin=(8.0040,0.0000))] +DrawDeviceText font="Tinos" size=12.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,122.7800,189.1400] glyphs=[(idx=2507,u=U+05E9,origin=(0.0000,0.0000))] +DrawDeviceText font="Arimo" size=12.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,119.4440,189.1400] glyphs=[(idx=3,u=U+0020,origin=(0.0000,0.0000))] +DrawDeviceText font="Tinos" size=12.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,112.3400,189.1400] glyphs=[(idx=2496,u=U+05DE,origin=(0.0000,0.0000))] +DrawDeviceText font="Arimo" size=12.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,131.2760,189.1400] glyphs=[(idx=3,u=U+0020,origin=(0.0000,0.0000)) (idx=37,u=U+0042,origin=(3.3360,0.0000))] +RestoreState +DrawPath fill=0x00000000 stroke=0xff000000 rule=even-odd stroke_state=[width=0.4000 cap=butt join=miter miter=10.0000] matrix=[1.0000,0.0000,0.0000,-1.0000,100.0000,200.0000] points=[move(42.8160,8.3280) line(42.8160,21.7200)] diff --git a/testing/resources/embedder_tests/bug_535730401.png b/testing/resources/embedder_tests/bug_535730401.png deleted file mode 100644 index 9cd89de150..0000000000 Binary files a/testing/resources/embedder_tests/bug_535730401.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bug_535730401_combobox.dump.txt b/testing/resources/embedder_tests/bug_535730401_combobox.dump.txt new file mode 100644 index 0000000000..06337f092f --- /dev/null +++ b/testing/resources/embedder_tests/bug_535730401_combobox.dump.txt @@ -0,0 +1,39 @@ +SaveState +SetBaseClip [0,0,300,600] +SetClip_PathFill rule=winding matrix=none points=[move(0.0000,600.0000) line(0.0000,0.0000) line(300.0000,0.0000) line(300.0000,600.0000) line(0.0000,600.0000,close)] +SaveState +DrawDeviceText font="Arimo" size=12.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,100.0000,150.0000] glyphs=[(idx=55,u=U+0054,origin=(0.0000,0.0000)) (idx=72,u=U+0065,origin=(7.3320,0.0000)) (idx=86,u=U+0073,origin=(14.0040,0.0000)) (idx=87,u=U+0074,origin=(20.0040,0.0000)) (idx=3,u=U+0020,origin=(23.3400,0.0000)) (idx=41,u=U+0046,origin=(26.6760,0.0000)) (idx=82,u=U+006F,origin=(34.0080,0.0000)) (idx=85,u=U+0072,origin=(40.6800,0.0000)) (idx=80,u=U+006D,origin=(44.6760,0.0000))] +RestoreState +RestoreState +SaveState +DrawDeviceText font="Arimo" size=12.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,101.0000,189.1640] glyphs=[(idx=37,u=U+0042,origin=(0.0000,0.0000)) (idx=68,u=U+0061,origin=(8.0040,0.0000)) (idx=81,u=U+006E,origin=(14.6760,0.0000)) (idx=68,u=U+0061,origin=(21.3480,0.0000)) (idx=81,u=U+006E,origin=(28.0200,0.0000)) (idx=68,u=U+0061,origin=(34.6920,0.0000))] +FillRect [186,171,199,199] color=0xffdcdcdc +DrawPath fill=0xffffffff stroke=0x00000000 rule=winding stroke_state=[width=1.0000 cap=butt join=miter miter=10.0000] matrix=[1.0000,0.0000,0.0000,-1.0000,100.0000,200.0000] points=[move(87.0000,2.0000) line(87.0000,28.0000) line(98.0000,28.0000) line(97.0000,27.0000) line(88.0000,27.0000) line(88.0000,3.0000)] +DrawPath fill=0xff808080 stroke=0x00000000 rule=winding stroke_state=[width=1.0000 cap=butt join=miter miter=10.0000] matrix=[1.0000,0.0000,0.0000,-1.0000,100.0000,200.0000] points=[move(98.0000,28.0000) line(98.0000,2.0000) line(87.0000,2.0000) line(88.0000,3.0000) line(97.0000,3.0000) line(97.0000,27.0000)] +DrawPath fill=0xff000000 stroke=0x00000000 rule=even-odd stroke_state=[width=1.0000 cap=butt join=miter miter=10.0000] matrix=[1.0000,0.0000,0.0000,-1.0000,100.0000,200.0000] points=[move(86.0000,1.0000) line(99.0000,1.0000) line(99.0000,29.0000) line(86.0000,29.0000) line(86.0000,1.0000,close) move(87.0000,2.0000) line(98.0000,2.0000) line(98.0000,28.0000) line(87.0000,28.0000) line(87.0000,2.0000,close)] +DrawPath fill=0xff000000 stroke=0x00000000 rule=winding stroke_state=[width=1.0000 cap=butt join=miter miter=10.0000] matrix=[1.0000,0.0000,0.0000,-1.0000,100.0000,200.0000] points=[move(89.5000,16.5000) line(95.5000,16.5000) line(92.5000,13.5000) line(89.5000,16.5000)] +RestoreState +FillRect [100,200,200,170] color=0x64dde4ff +SaveState +FillRect [186,71,199,99] color=0xffdcdcdc +DrawPath fill=0xffffffff stroke=0x00000000 rule=winding stroke_state=[width=1.0000 cap=butt join=miter miter=10.0000] matrix=[1.0000,0.0000,0.0000,-1.0000,100.0000,100.0000] points=[move(87.0000,2.0000) line(87.0000,28.0000) line(98.0000,28.0000) line(97.0000,27.0000) line(88.0000,27.0000) line(88.0000,3.0000)] +DrawPath fill=0xff808080 stroke=0x00000000 rule=winding stroke_state=[width=1.0000 cap=butt join=miter miter=10.0000] matrix=[1.0000,0.0000,0.0000,-1.0000,100.0000,100.0000] points=[move(98.0000,28.0000) line(98.0000,2.0000) line(87.0000,2.0000) line(88.0000,3.0000) line(97.0000,3.0000) line(97.0000,27.0000)] +DrawPath fill=0xff000000 stroke=0x00000000 rule=even-odd stroke_state=[width=1.0000 cap=butt join=miter miter=10.0000] matrix=[1.0000,0.0000,0.0000,-1.0000,100.0000,100.0000] points=[move(86.0000,1.0000) line(99.0000,1.0000) line(99.0000,29.0000) line(86.0000,29.0000) line(86.0000,1.0000,close) move(87.0000,2.0000) line(98.0000,2.0000) line(98.0000,28.0000) line(87.0000,28.0000) line(87.0000,2.0000,close)] +DrawPath fill=0xff000000 stroke=0x00000000 rule=winding stroke_state=[width=1.0000 cap=butt join=miter miter=10.0000] matrix=[1.0000,0.0000,0.0000,-1.0000,100.0000,100.0000] points=[move(89.5000,16.5000) line(95.5000,16.5000) line(92.5000,13.5000) line(89.5000,16.5000)] +RestoreState +FillRect [101,221,199,249] color=0x00000000 +DrawPath fill=0x00000000 stroke=0x00000000 rule=even-odd stroke_state=[none] matrix=[1.0000,0.0000,0.0000,-1.0000,100.0000,250.0000] points=[move(0.0000,0.0000) line(0.0000,30.0000) line(100.0000,30.0000) line(100.0000,0.0000) line(0.0000,0.0000,close) move(1.0000,1.0000) line(1.0000,29.0000) line(99.0000,29.0000) line(99.0000,1.0000) line(1.0000,1.0000,close)] +SaveState +SetClip_PathFill rule=winding matrix=none points=[move(101.0000,221.0000) line(101.0000,249.0000) line(185.0000,249.0000) line(185.0000,221.0000) line(101.0000,221.0000,close)] +DrawDeviceText font="Arimo" size=12.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,101.0000,239.1400] glyphs=[(idx=36,u=U+0041,origin=(0.0000,0.0000)) (idx=3,u=U+0020,origin=(8.0040,0.0000))] +DrawDeviceText font="Tinos" size=12.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,122.7800,239.1400] glyphs=[(idx=2507,u=U+05E9,origin=(0.0000,0.0000))] +DrawDeviceText font="Arimo" size=12.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,119.4440,239.1400] glyphs=[(idx=3,u=U+0020,origin=(0.0000,0.0000))] +DrawDeviceText font="Tinos" size=12.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,112.3400,239.1400] glyphs=[(idx=2496,u=U+05DE,origin=(0.0000,0.0000))] +DrawDeviceText font="Arimo" size=12.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,131.2760,239.1400] glyphs=[(idx=3,u=U+0020,origin=(0.0000,0.0000)) (idx=37,u=U+0042,origin=(3.3360,0.0000))] +RestoreState +DrawPath fill=0x00000000 stroke=0xff000000 rule=even-odd stroke_state=[width=0.4000 cap=butt join=miter miter=10.0000] matrix=[1.0000,0.0000,0.0000,-1.0000,100.0000,250.0000] points=[move(42.8160,8.3280) line(42.8160,21.7200)] +FillRect [188,223,197,247] color=0xffdcdcdc +DrawPath fill=0xffffffff stroke=0x00000000 rule=even-odd stroke_state=[width=1.0000 cap=butt join=miter miter=10.0000] matrix=[1.0000,0.0000,0.0000,-1.0000,100.0000,250.0000] points=[move(87.0000,2.0000) line(87.0000,28.0000) line(98.0000,28.0000) line(97.0000,27.0000) line(88.0000,27.0000) line(88.0000,3.0000) line(87.0000,2.0000)] +DrawPath fill=0xff6e6e6e stroke=0x00000000 rule=even-odd stroke_state=[width=1.0000 cap=butt join=miter miter=10.0000] matrix=[1.0000,0.0000,0.0000,-1.0000,100.0000,250.0000] points=[move(98.0000,28.0000) line(98.0000,2.0000) line(87.0000,2.0000) line(88.0000,3.0000) line(97.0000,3.0000) line(97.0000,27.0000) line(98.0000,28.0000)] +DrawPath fill=0xff000000 stroke=0x00000000 rule=even-odd stroke_state=[width=1.0000 cap=butt join=miter miter=10.0000] matrix=[1.0000,0.0000,0.0000,-1.0000,100.0000,250.0000] points=[move(86.0000,1.0000) line(86.0000,29.0000) line(99.0000,29.0000) line(99.0000,1.0000) line(86.0000,1.0000,close) move(87.0000,2.0000) line(87.0000,28.0000) line(98.0000,28.0000) line(98.0000,2.0000) line(87.0000,2.0000,close)] +DrawPath fill=0xff000000 stroke=0x00000000 rule=even-odd stroke_state=[none] matrix=[1.0000,0.0000,0.0000,-1.0000,100.0000,250.0000] points=[move(89.5000,16.5000) line(95.5000,16.5000) line(92.5000,13.5000) line(89.5000,16.5000)] diff --git a/testing/resources/embedder_tests/bug_535730401_combobox.png b/testing/resources/embedder_tests/bug_535730401_combobox.png deleted file mode 100644 index 72d69ab4f5..0000000000 Binary files a/testing/resources/embedder_tests/bug_535730401_combobox.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bug_535730401_combobox_mac.png b/testing/resources/embedder_tests/bug_535730401_combobox_mac.png deleted file mode 100644 index fefe2c7f1e..0000000000 Binary files a/testing/resources/embedder_tests/bug_535730401_combobox_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bug_535730401_combobox_skia_linux.png b/testing/resources/embedder_tests/bug_535730401_combobox_skia_linux.png deleted file mode 100644 index af631d6384..0000000000 Binary files a/testing/resources/embedder_tests/bug_535730401_combobox_skia_linux.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bug_535730401_combobox_skia_mac.png b/testing/resources/embedder_tests/bug_535730401_combobox_skia_mac.png deleted file mode 100644 index 4f7e93bb14..0000000000 Binary files a/testing/resources/embedder_tests/bug_535730401_combobox_skia_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bug_535730401_combobox_skia_win.png b/testing/resources/embedder_tests/bug_535730401_combobox_skia_win.png deleted file mode 100644 index 346fce9411..0000000000 Binary files a/testing/resources/embedder_tests/bug_535730401_combobox_skia_win.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bug_535730401_mac.png b/testing/resources/embedder_tests/bug_535730401_mac.png deleted file mode 100644 index 7be356085f..0000000000 Binary files a/testing/resources/embedder_tests/bug_535730401_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bug_535730401_skia_linux.png b/testing/resources/embedder_tests/bug_535730401_skia_linux.png deleted file mode 100644 index 18b8913895..0000000000 Binary files a/testing/resources/embedder_tests/bug_535730401_skia_linux.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bug_535730401_skia_mac.png b/testing/resources/embedder_tests/bug_535730401_skia_mac.png deleted file mode 100644 index 9c22e2783f..0000000000 Binary files a/testing/resources/embedder_tests/bug_535730401_skia_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/bug_535730401_skia_win.png b/testing/resources/embedder_tests/bug_535730401_skia_win.png deleted file mode 100644 index ef7d6b3fc1..0000000000 Binary files a/testing/resources/embedder_tests/bug_535730401_skia_win.png and /dev/null differ diff --git a/testing/resources/embedder_tests/encrypted.dump.txt b/testing/resources/embedder_tests/encrypted.dump.txt new file mode 100644 index 0000000000..aab3297c9c --- /dev/null +++ b/testing/resources/embedder_tests/encrypted.dump.txt @@ -0,0 +1,11 @@ +SaveState +SetBaseClip [0,0,612,792] +SetClip_PathFill rule=winding matrix=none points=[move(0.0000,792.0000) line(0.0000,0.0000) line(612.0000,0.0000) line(612.0000,792.0000) line(0.0000,792.0000,close)] +SaveState +DrawDeviceText font="Tinos" size=1.0000 color=0xff000000 matrix=[9.0000,0.0000,0.0000,-9.0000,5.0000,787.0000] glyphs=[(idx=73,u=U+0066,origin=(0.0000,0.0000)) (idx=76,u=U+0069,origin=(0.3330,0.0000)) (idx=79,u=U+006C,origin=(0.6110,0.0000)) (idx=72,u=U+0065,origin=(0.8890,0.0000)) (idx=29,u=U+003A,origin=(1.3330,0.0000)) (idx=18,u=U+002F,origin=(1.6110,0.0000)) (idx=18,u=U+002F,origin=(1.8890,0.0000)) (idx=18,u=U+002F,origin=(2.1670,0.0000)) (idx=38,u=U+0043,origin=(2.4450,0.0000)) (idx=95,u=U+007C,origin=(3.1120,0.0000)) (idx=18,u=U+002F,origin=(3.3120,0.0000)) (idx=56,u=U+0055,origin=(3.5900,0.0000)) (idx=86,u=U+0073,origin=(4.3120,0.0000)) (idx=72,u=U+0065,origin=(4.7010,0.0000)) (idx=85,u=U+0072,origin=(5.1450,0.0000)) (idx=86,u=U+0073,origin=(5.4780,0.0000)) (idx=18,u=U+002F,origin=(5.8670,0.0000)) (idx=56,u=U+0055,origin=(6.1450,0.0000)) (idx=86,u=U+0073,origin=(6.8670,0.0000)) (idx=72,u=U+0065,origin=(7.2560,0.0000)) (idx=85,u=U+0072,origin=(7.7000,0.0000)) (idx=18,u=U+002F,origin=(8.0330,0.0000)) (idx=39,u=U+0044,origin=(8.3110,0.0000)) (idx=72,u=U+0065,origin=(9.0330,0.0000)) (idx=86,u=U+0073,origin=(9.4770,0.0000)) (idx=78,u=U+006B,origin=(9.8660,0.0000)) (idx=87,u=U+0074,origin=(10.3660,0.0000)) (idx=82,u=U+006F,origin=(10.6440,0.0000)) (idx=83,u=U+0070,origin=(11.1440,0.0000)) (idx=18,u=U+002F,origin=(11.6440,0.0000)) (idx=20,u=U+0031,origin=(11.9220,0.0000)) (idx=17,u=U+002E,origin=(12.4220,0.0000)) (idx=87,u=U+0074,origin=(12.6720,0.0000)) (idx=91,u=U+0078,origin=(12.9500,0.0000)) (idx=87,u=U+0074,origin=(13.4500,0.0000))] +DrawDeviceText font="Tinos" size=1.0000 color=0xff000000 matrix=[9.0000,0.0000,0.0000,-9.0000,128.5430,787.0000] glyphs=[(idx=62,u=U+005B,origin=(0.0000,0.0000)) (idx=24,u=U+0035,origin=(0.3330,0.0000)) (idx=18,u=U+002F,origin=(0.8330,0.0000)) (idx=21,u=U+0032,origin=(1.1110,0.0000)) (idx=20,u=U+0031,origin=(1.6110,0.0000)) (idx=18,u=U+002F,origin=(2.1110,0.0000)) (idx=21,u=U+0032,origin=(2.3890,0.0000)) (idx=19,u=U+0030,origin=(2.8890,0.0000)) (idx=20,u=U+0031,origin=(3.3890,0.0000)) (idx=25,u=U+0036,origin=(3.8890,0.0000)) (idx=3,u=U+0020,origin=(4.3890,0.0000)) (idx=25,u=U+0036,origin=(4.6390,0.0000)) (idx=29,u=U+003A,origin=(5.1390,0.0000)) (idx=21,u=U+0032,origin=(5.4170,0.0000)) (idx=23,u=U+0034,origin=(5.9170,0.0000)) (idx=29,u=U+003A,origin=(6.4170,0.0000)) (idx=19,u=U+0030,origin=(6.6950,0.0000)) (idx=19,u=U+0030,origin=(7.1950,0.0000)) (idx=3,u=U+0020,origin=(7.6950,0.0000)) (idx=36,u=U+0041,origin=(7.9450,0.0000)) (idx=48,u=U+004D,origin=(8.6670,0.0000)) (idx=64,u=U+005D,origin=(9.5560,0.0000))] +FillRect [10,26,602,756] color=0xffffffff +DrawDeviceText font="Tinos" size=1.0000 color=0xff000000 matrix=[12.0000,0.0000,0.0000,-12.0000,16.0000,42.7500] glyphs=[(idx=87,u=U+0074,origin=(0.0000,0.0000)) (idx=72,u=U+0065,origin=(0.2780,0.0000)) (idx=86,u=U+0073,origin=(0.7220,0.0000)) (idx=87,u=U+0074,origin=(1.1110,0.0000))] +FillRect [10,762,30,782] color=0xffff0000 +RestoreState +RestoreState diff --git a/testing/resources/embedder_tests/encrypted_agg.png b/testing/resources/embedder_tests/encrypted_agg.png deleted file mode 100644 index 300f7102bb..0000000000 Binary files a/testing/resources/embedder_tests/encrypted_agg.png and /dev/null differ diff --git a/testing/resources/embedder_tests/encrypted_agg_mac.png b/testing/resources/embedder_tests/encrypted_agg_mac.png deleted file mode 100644 index 0138ca932d..0000000000 Binary files a/testing/resources/embedder_tests/encrypted_agg_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/encrypted_skia_linux.png b/testing/resources/embedder_tests/encrypted_skia_linux.png deleted file mode 100644 index fc14bf2207..0000000000 Binary files a/testing/resources/embedder_tests/encrypted_skia_linux.png and /dev/null differ diff --git a/testing/resources/embedder_tests/encrypted_skia_mac.png b/testing/resources/embedder_tests/encrypted_skia_mac.png deleted file mode 100644 index 496bb4bf99..0000000000 Binary files a/testing/resources/embedder_tests/encrypted_skia_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/encrypted_skia_win.png b/testing/resources/embedder_tests/encrypted_skia_win.png deleted file mode 100644 index 0c12000d1a..0000000000 Binary files a/testing/resources/embedder_tests/encrypted_skia_win.png and /dev/null differ diff --git a/testing/resources/embedder_tests/focused_text_form_with_abc.dump.txt b/testing/resources/embedder_tests/focused_text_form_with_abc.dump.txt new file mode 100644 index 0000000000..31f026e580 --- /dev/null +++ b/testing/resources/embedder_tests/focused_text_form_with_abc.dump.txt @@ -0,0 +1,14 @@ +SaveState +SetBaseClip [0,0,300,300] +SetClip_PathFill rule=winding matrix=none points=[move(0.0000,300.0000) line(0.0000,0.0000) line(300.0000,0.0000) line(300.0000,300.0000) line(0.0000,300.0000,close)] +SaveState +DrawDeviceText font="Arimo" size=12.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,100.0000,150.0000] glyphs=[(idx=55,u=U+0054,origin=(0.0000,0.0000)) (idx=72,u=U+0065,origin=(7.3320,0.0000)) (idx=86,u=U+0073,origin=(14.0040,0.0000)) (idx=87,u=U+0074,origin=(20.0040,0.0000)) (idx=3,u=U+0020,origin=(23.3400,0.0000)) (idx=41,u=U+0046,origin=(26.6760,0.0000)) (idx=82,u=U+006F,origin=(34.0080,0.0000)) (idx=85,u=U+0072,origin=(40.6800,0.0000)) (idx=80,u=U+006D,origin=(44.6760,0.0000))] +RestoreState +RestoreState +FillRect [101,171,199,199] color=0x00000000 +DrawPath fill=0x00000000 stroke=0x00000000 rule=even-odd stroke_state=[none] matrix=[1.0000,0.0000,0.0000,-1.0000,100.0000,200.0000] points=[move(0.0000,0.0000) line(0.0000,30.0000) line(100.0000,30.0000) line(100.0000,0.0000) line(0.0000,0.0000,close) move(1.0000,1.0000) line(1.0000,29.0000) line(99.0000,29.0000) line(99.0000,1.0000) line(1.0000,1.0000,close)] +SaveState +SetClip_PathFill rule=winding matrix=none points=[move(101.0000,171.0000) line(101.0000,199.0000) line(199.0000,199.0000) line(199.0000,171.0000) line(101.0000,171.0000,close)] +DrawDeviceText font="Arimo" size=12.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,101.0000,189.1640] glyphs=[(idx=36,u=U+0041,origin=(0.0000,0.0000)) (idx=37,u=U+0042,origin=(8.0040,0.0000)) (idx=38,u=U+0043,origin=(16.0080,0.0000))] +RestoreState +DrawPath fill=0x00000000 stroke=0xff000000 rule=even-odd stroke_state=[width=0.4000 cap=butt join=miter miter=10.0000] matrix=[1.0000,0.0000,0.0000,-1.0000,100.0000,200.0000] points=[move(25.8720,8.3040) line(25.8720,21.6960)] diff --git a/testing/resources/embedder_tests/focused_text_form_with_abc_agg.png b/testing/resources/embedder_tests/focused_text_form_with_abc_agg.png deleted file mode 100644 index 12f8afa3a6..0000000000 Binary files a/testing/resources/embedder_tests/focused_text_form_with_abc_agg.png and /dev/null differ diff --git a/testing/resources/embedder_tests/focused_text_form_with_abc_agg_mac.png b/testing/resources/embedder_tests/focused_text_form_with_abc_agg_mac.png deleted file mode 100644 index c3de4ffab4..0000000000 Binary files a/testing/resources/embedder_tests/focused_text_form_with_abc_agg_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/focused_text_form_with_abc_skia_linux.png b/testing/resources/embedder_tests/focused_text_form_with_abc_skia_linux.png deleted file mode 100644 index fcc0387a1f..0000000000 Binary files a/testing/resources/embedder_tests/focused_text_form_with_abc_skia_linux.png and /dev/null differ diff --git a/testing/resources/embedder_tests/focused_text_form_with_abc_skia_mac.png b/testing/resources/embedder_tests/focused_text_form_with_abc_skia_mac.png deleted file mode 100644 index accad382a4..0000000000 Binary files a/testing/resources/embedder_tests/focused_text_form_with_abc_skia_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/focused_text_form_with_abc_skia_win.png b/testing/resources/embedder_tests/focused_text_form_with_abc_skia_win.png deleted file mode 100644 index a244278c16..0000000000 Binary files a/testing/resources/embedder_tests/focused_text_form_with_abc_skia_win.png and /dev/null differ diff --git a/testing/resources/embedder_tests/form_object_with_image_removed_image.dump.txt b/testing/resources/embedder_tests/form_object_with_image_removed_image.dump.txt new file mode 100644 index 0000000000..7c4f49e735 --- /dev/null +++ b/testing/resources/embedder_tests/form_object_with_image_removed_image.dump.txt @@ -0,0 +1,8 @@ +SaveState +SetBaseClip [0,0,200,300] +SetClip_PathFill rule=winding matrix=none points=[move(0.0000,300.0000) line(0.0000,0.0000) line(200.0000,0.0000) line(200.0000,300.0000) line(0.0000,300.0000,close)] +SaveState +SaveState +RestoreState +RestoreState +RestoreState diff --git a/testing/resources/embedder_tests/form_object_with_image_removed_image.png b/testing/resources/embedder_tests/form_object_with_image_removed_image.png deleted file mode 100644 index efd3b8d20d..0000000000 Binary files a/testing/resources/embedder_tests/form_object_with_image_removed_image.png and /dev/null differ diff --git a/testing/resources/embedder_tests/hello_world.dump.txt b/testing/resources/embedder_tests/hello_world.dump.txt new file mode 100644 index 0000000000..2a03794224 --- /dev/null +++ b/testing/resources/embedder_tests/hello_world.dump.txt @@ -0,0 +1,8 @@ +SaveState +SetBaseClip [0,0,200,200] +SetClip_PathFill rule=winding matrix=none points=[move(0.0000,200.0000) line(0.0000,0.0000) line(200.0000,0.0000) line(200.0000,200.0000) line(0.0000,200.0000,close)] +SaveState +DrawDeviceText font="Tinos" size=12.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,20.0000,150.0000] glyphs=[(idx=43,u=U+0048,origin=(0.0000,0.0000)) (idx=72,u=U+0065,origin=(8.6640,0.0000)) (idx=79,u=U+006C,origin=(13.9920,0.0000)) (idx=79,u=U+006C,origin=(17.3280,0.0000)) (idx=82,u=U+006F,origin=(20.6640,0.0000)) (idx=15,u=U+002C,origin=(26.6640,0.0000)) (idx=3,u=U+0020,origin=(29.6640,0.0000)) (idx=90,u=U+0077,origin=(32.6640,0.0000)) (idx=82,u=U+006F,origin=(41.3280,0.0000)) (idx=85,u=U+0072,origin=(47.3280,0.0000)) (idx=79,u=U+006C,origin=(51.3240,0.0000)) (idx=71,u=U+0064,origin=(54.6600,0.0000)) (idx=4,u=U+0021,origin=(60.6600,0.0000))] +DrawDeviceText font="Arimo" size=16.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,20.0000,100.0000] glyphs=[(idx=42,u=U+0047,origin=(0.0000,0.0000)) (idx=82,u=U+006F,origin=(12.4480,0.0000)) (idx=82,u=U+006F,origin=(21.3440,0.0000)) (idx=71,u=U+0064,origin=(30.2400,0.0000)) (idx=69,u=U+0062,origin=(39.1360,0.0000)) (idx=92,u=U+0079,origin=(48.0320,0.0000)) (idx=72,u=U+0065,origin=(56.0320,0.0000)) (idx=15,u=U+002C,origin=(64.9280,0.0000)) (idx=3,u=U+0020,origin=(69.3760,0.0000)) (idx=90,u=U+0077,origin=(73.8240,0.0000)) (idx=82,u=U+006F,origin=(85.3760,0.0000)) (idx=85,u=U+0072,origin=(94.2720,0.0000)) (idx=79,u=U+006C,origin=(99.6000,0.0000)) (idx=71,u=U+0064,origin=(103.1520,0.0000)) (idx=4,u=U+0021,origin=(112.0480,0.0000))] +RestoreState +RestoreState diff --git a/testing/resources/embedder_tests/hello_world_removed.dump.txt b/testing/resources/embedder_tests/hello_world_removed.dump.txt new file mode 100644 index 0000000000..7748e58874 --- /dev/null +++ b/testing/resources/embedder_tests/hello_world_removed.dump.txt @@ -0,0 +1,7 @@ +SaveState +SetBaseClip [0,0,200,200] +SetClip_PathFill rule=winding matrix=none points=[move(0.0000,200.0000) line(0.0000,0.0000) line(200.0000,0.0000) line(200.0000,200.0000) line(0.0000,200.0000,close)] +SaveState +DrawDeviceText font="Tinos" size=12.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,20.0000,150.0000] glyphs=[(idx=43,u=U+0048,origin=(0.0000,0.0000)) (idx=72,u=U+0065,origin=(8.6640,0.0000)) (idx=79,u=U+006C,origin=(13.9920,0.0000)) (idx=79,u=U+006C,origin=(17.3280,0.0000)) (idx=82,u=U+006F,origin=(20.6640,0.0000)) (idx=15,u=U+002C,origin=(26.6640,0.0000)) (idx=3,u=U+0020,origin=(29.6640,0.0000)) (idx=90,u=U+0077,origin=(32.6640,0.0000)) (idx=82,u=U+006F,origin=(41.3280,0.0000)) (idx=85,u=U+0072,origin=(47.3280,0.0000)) (idx=79,u=U+006C,origin=(51.3240,0.0000)) (idx=71,u=U+0064,origin=(54.6600,0.0000)) (idx=4,u=U+0021,origin=(60.6600,0.0000))] +RestoreState +RestoreState diff --git a/testing/resources/embedder_tests/hello_world_removed_agg.png b/testing/resources/embedder_tests/hello_world_removed_agg.png deleted file mode 100644 index 7d2eab4ae5..0000000000 Binary files a/testing/resources/embedder_tests/hello_world_removed_agg.png and /dev/null differ diff --git a/testing/resources/embedder_tests/hello_world_removed_agg_mac.png b/testing/resources/embedder_tests/hello_world_removed_agg_mac.png deleted file mode 100644 index 32c124a958..0000000000 Binary files a/testing/resources/embedder_tests/hello_world_removed_agg_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/hello_world_removed_hello_world.dump.txt b/testing/resources/embedder_tests/hello_world_removed_hello_world.dump.txt new file mode 100644 index 0000000000..c7498f231b --- /dev/null +++ b/testing/resources/embedder_tests/hello_world_removed_hello_world.dump.txt @@ -0,0 +1,7 @@ +SaveState +SetBaseClip [0,0,200,200] +SetClip_PathFill rule=winding matrix=none points=[move(0.0000,200.0000) line(0.0000,0.0000) line(200.0000,0.0000) line(200.0000,200.0000) line(0.0000,200.0000,close)] +SaveState +DrawDeviceText font="Arimo" size=16.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,20.0000,100.0000] glyphs=[(idx=42,u=U+0047,origin=(0.0000,0.0000)) (idx=82,u=U+006F,origin=(12.4480,0.0000)) (idx=82,u=U+006F,origin=(21.3440,0.0000)) (idx=71,u=U+0064,origin=(30.2400,0.0000)) (idx=69,u=U+0062,origin=(39.1360,0.0000)) (idx=92,u=U+0079,origin=(48.0320,0.0000)) (idx=72,u=U+0065,origin=(56.0320,0.0000)) (idx=15,u=U+002C,origin=(64.9280,0.0000)) (idx=3,u=U+0020,origin=(69.3760,0.0000)) (idx=90,u=U+0077,origin=(73.8240,0.0000)) (idx=82,u=U+006F,origin=(85.3760,0.0000)) (idx=85,u=U+0072,origin=(94.2720,0.0000)) (idx=79,u=U+006C,origin=(99.6000,0.0000)) (idx=71,u=U+0064,origin=(103.1520,0.0000)) (idx=4,u=U+0021,origin=(112.0480,0.0000))] +RestoreState +RestoreState diff --git a/testing/resources/embedder_tests/hello_world_removed_hello_world_agg.png b/testing/resources/embedder_tests/hello_world_removed_hello_world_agg.png deleted file mode 100644 index e586357f04..0000000000 Binary files a/testing/resources/embedder_tests/hello_world_removed_hello_world_agg.png and /dev/null differ diff --git a/testing/resources/embedder_tests/hello_world_removed_hello_world_agg_mac.png b/testing/resources/embedder_tests/hello_world_removed_hello_world_agg_mac.png deleted file mode 100644 index bb5a667604..0000000000 Binary files a/testing/resources/embedder_tests/hello_world_removed_hello_world_agg_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/hello_world_removed_hello_world_skia_linux.png b/testing/resources/embedder_tests/hello_world_removed_hello_world_skia_linux.png deleted file mode 100644 index 1f9395913f..0000000000 Binary files a/testing/resources/embedder_tests/hello_world_removed_hello_world_skia_linux.png and /dev/null differ diff --git a/testing/resources/embedder_tests/hello_world_removed_hello_world_skia_mac.png b/testing/resources/embedder_tests/hello_world_removed_hello_world_skia_mac.png deleted file mode 100644 index 01ea206e60..0000000000 Binary files a/testing/resources/embedder_tests/hello_world_removed_hello_world_skia_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/hello_world_removed_hello_world_skia_win.png b/testing/resources/embedder_tests/hello_world_removed_hello_world_skia_win.png deleted file mode 100644 index 179b5775a6..0000000000 Binary files a/testing/resources/embedder_tests/hello_world_removed_hello_world_skia_win.png and /dev/null differ diff --git a/testing/resources/embedder_tests/hello_world_removed_skia_linux.png b/testing/resources/embedder_tests/hello_world_removed_skia_linux.png deleted file mode 100644 index f0804e07d5..0000000000 Binary files a/testing/resources/embedder_tests/hello_world_removed_skia_linux.png and /dev/null differ diff --git a/testing/resources/embedder_tests/hello_world_removed_skia_mac.png b/testing/resources/embedder_tests/hello_world_removed_skia_mac.png deleted file mode 100644 index 9bd01fdde4..0000000000 Binary files a/testing/resources/embedder_tests/hello_world_removed_skia_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/hello_world_removed_skia_win.png b/testing/resources/embedder_tests/hello_world_removed_skia_win.png deleted file mode 100644 index 1af9e44411..0000000000 Binary files a/testing/resources/embedder_tests/hello_world_removed_skia_win.png and /dev/null differ diff --git a/testing/resources/embedder_tests/hello_world_split_streams_removed_hello_world.dump.txt b/testing/resources/embedder_tests/hello_world_split_streams_removed_hello_world.dump.txt new file mode 100644 index 0000000000..bc63450252 --- /dev/null +++ b/testing/resources/embedder_tests/hello_world_split_streams_removed_hello_world.dump.txt @@ -0,0 +1,8 @@ +SaveState +SetBaseClip [0,0,200,200] +SetClip_PathFill rule=winding matrix=none points=[move(0.0000,200.0000) line(0.0000,0.0000) line(200.0000,0.0000) line(200.0000,200.0000) line(0.0000,200.0000,close)] +SaveState +DrawDeviceText font="Arimo" size=16.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,20.0000,100.0000] glyphs=[(idx=42,u=U+0047,origin=(0.0000,0.0000)) (idx=82,u=U+006F,origin=(12.4480,0.0000)) (idx=82,u=U+006F,origin=(21.3440,0.0000)) (idx=71,u=U+0064,origin=(30.2400,0.0000)) (idx=69,u=U+0062,origin=(39.1360,0.0000)) (idx=92,u=U+0079,origin=(48.0320,0.0000)) (idx=72,u=U+0065,origin=(56.0320,0.0000)) (idx=15,u=U+002C,origin=(64.9280,0.0000)) (idx=3,u=U+0020,origin=(69.3760,0.0000)) (idx=90,u=U+0077,origin=(73.8240,0.0000)) (idx=82,u=U+006F,origin=(85.3760,0.0000)) (idx=85,u=U+0072,origin=(94.2720,0.0000)) (idx=79,u=U+006C,origin=(99.6000,0.0000)) (idx=71,u=U+0064,origin=(103.1520,0.0000)) (idx=4,u=U+0021,origin=(112.0480,0.0000))] +DrawDeviceText font="Tinos" size=12.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,20.0000,150.0000] glyphs=[(idx=42,u=U+0047,origin=(0.0000,0.0000)) (idx=85,u=U+0072,origin=(8.6640,0.0000)) (idx=72,u=U+0065,origin=(12.6600,0.0000)) (idx=72,u=U+0065,origin=(17.9880,0.0000)) (idx=87,u=U+0074,origin=(23.3160,0.0000)) (idx=76,u=U+0069,origin=(26.6520,0.0000)) (idx=81,u=U+006E,origin=(29.9880,0.0000)) (idx=74,u=U+0067,origin=(35.9880,0.0000)) (idx=86,u=U+0073,origin=(41.9880,0.0000)) (idx=15,u=U+002C,origin=(46.6560,0.0000)) (idx=3,u=U+0020,origin=(49.6560,0.0000)) (idx=90,u=U+0077,origin=(52.6560,0.0000)) (idx=82,u=U+006F,origin=(61.3200,0.0000)) (idx=85,u=U+0072,origin=(67.3200,0.0000)) (idx=79,u=U+006C,origin=(71.3160,0.0000)) (idx=71,u=U+0064,origin=(74.6520,0.0000)) (idx=4,u=U+0021,origin=(80.6520,0.0000))] +RestoreState +RestoreState diff --git a/testing/resources/embedder_tests/hello_world_split_streams_removed_hello_world_agg.png b/testing/resources/embedder_tests/hello_world_split_streams_removed_hello_world_agg.png deleted file mode 100644 index ee56252ad9..0000000000 Binary files a/testing/resources/embedder_tests/hello_world_split_streams_removed_hello_world_agg.png and /dev/null differ diff --git a/testing/resources/embedder_tests/hello_world_split_streams_removed_hello_world_agg_mac.png b/testing/resources/embedder_tests/hello_world_split_streams_removed_hello_world_agg_mac.png deleted file mode 100644 index c3ab023465..0000000000 Binary files a/testing/resources/embedder_tests/hello_world_split_streams_removed_hello_world_agg_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/hello_world_split_streams_removed_hello_world_skia_linux.png b/testing/resources/embedder_tests/hello_world_split_streams_removed_hello_world_skia_linux.png deleted file mode 100644 index bdf9f5b655..0000000000 Binary files a/testing/resources/embedder_tests/hello_world_split_streams_removed_hello_world_skia_linux.png and /dev/null differ diff --git a/testing/resources/embedder_tests/hello_world_split_streams_removed_hello_world_skia_mac.png b/testing/resources/embedder_tests/hello_world_split_streams_removed_hello_world_skia_mac.png deleted file mode 100644 index 83a4d29298..0000000000 Binary files a/testing/resources/embedder_tests/hello_world_split_streams_removed_hello_world_skia_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/hello_world_split_streams_removed_hello_world_skia_win.png b/testing/resources/embedder_tests/hello_world_split_streams_removed_hello_world_skia_win.png deleted file mode 100644 index 286070a9c9..0000000000 Binary files a/testing/resources/embedder_tests/hello_world_split_streams_removed_hello_world_skia_win.png and /dev/null differ diff --git a/testing/resources/embedder_tests/japanese_cid_font_text.dump.txt b/testing/resources/embedder_tests/japanese_cid_font_text.dump.txt new file mode 100644 index 0000000000..14fe0e4247 --- /dev/null +++ b/testing/resources/embedder_tests/japanese_cid_font_text.dump.txt @@ -0,0 +1,8 @@ +SaveState +SetBaseClip [0,0,612,792] +SetClip_PathFill rule=winding matrix=none points=[move(0.0000,792.0000) line(0.0000,0.0000) line(612.0000,0.0000) line(612.0000,792.0000) line(0.0000,792.0000,close)] +SaveState +DrawDeviceText font="Noto Sans CJK JP" size=12.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,200.0000,592.0000] glyphs=[(idx=34,u=U+0041,origin=(0.0000,0.0000)) (idx=35,u=U+0042,origin=(7.2840,0.0000)) (idx=36,u=U+0043,origin=(15.1680,0.0000)) (idx=37,u=U+0044,origin=(22.8240,0.0000)) (idx=38,u=U+0045,origin=(31.0680,0.0000)) (idx=39,u=U+0046,origin=(38.1240,0.0000)) (idx=40,u=U+0047,origin=(44.7480,0.0000)) (idx=73,u=U+0068,origin=(53.0160,0.0000)) (idx=74,u=U+0069,origin=(60.3000,0.0000)) (idx=75,u=U+006A,origin=(63.6000,0.0000)) (idx=76,u=U+006B,origin=(66.9000,0.0000)) (idx=77,u=U+006C,origin=(73.5240,0.0000)) (idx=78,u=U+006D,origin=(76.9440,0.0000)) (idx=79,u=U+006E,origin=(88.0560,0.0000)) (idx=80,u=U+006F,origin=(95.3880,0.0000)) (idx=81,u=U+0070,origin=(102.6600,0.0000)) (idx=15,u=U+002E,origin=(110.1000,0.0000))] +DrawDeviceText font="Noto Sans CJK JP" size=18.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,100.0000,292.0000] glyphs=[(idx=1471,u=U+3053,origin=(0.0000,0.0000)) (idx=1535,u=U+3093,origin=(18.0000,0.0000)) (idx=1495,u=U+306B,origin=(36.0000,0.0000)) (idx=1485,u=U+3061,origin=(54.0000,0.0000)) (idx=1499,u=U+306F,origin=(72.0000,0.0000)) (idx=9861,u=U+4E16,origin=(90.0000,0.0000)) (idx=27506,u=U+754C,origin=(108.0000,0.0000)) (idx=1391,u=U+3002,origin=(126.0000,0.0000)) (idx=1471,u=U+3053,origin=(144.0000,0.0000)) (idx=1471,u=U+3053,origin=(162.0000,0.0000)) (idx=1495,u=U+306B,origin=(180.0000,0.0000)) (idx=18,u=U+0031,origin=(198.0000,0.0000)) (idx=27554,u=U+756A,origin=(207.9900,0.0000))] +RestoreState +RestoreState diff --git a/testing/resources/embedder_tests/japanese_cid_font_text_agg.png b/testing/resources/embedder_tests/japanese_cid_font_text_agg.png deleted file mode 100644 index 7bdc0a9b42..0000000000 Binary files a/testing/resources/embedder_tests/japanese_cid_font_text_agg.png and /dev/null differ diff --git a/testing/resources/embedder_tests/japanese_cid_font_text_skia.png b/testing/resources/embedder_tests/japanese_cid_font_text_skia.png deleted file mode 100644 index c61676073b..0000000000 Binary files a/testing/resources/embedder_tests/japanese_cid_font_text_skia.png and /dev/null differ diff --git a/testing/resources/embedder_tests/loaded_text.dump.txt b/testing/resources/embedder_tests/loaded_text.dump.txt new file mode 100644 index 0000000000..b0d53a359c --- /dev/null +++ b/testing/resources/embedder_tests/loaded_text.dump.txt @@ -0,0 +1,7 @@ +SaveState +SetBaseClip [0,0,612,792] +SetClip_PathFill rule=winding matrix=none points=[move(0.0000,792.0000) line(0.0000,0.0000) line(612.0000,0.0000) line(612.0000,792.0000) line(0.0000,792.0000,close)] +SaveState +DrawDeviceText font="Arimo" size=12.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,400.0000,392.0000] glyphs=[(idx=44,u=U+0049,origin=(0.0000,0.0000)) (idx=3,u=U+0020,origin=(3.3240,0.0000)) (idx=68,u=U+0061,origin=(6.6480,0.0000)) (idx=80,u=U+006D,origin=(13.3200,0.0000)) (idx=3,u=U+0020,origin=(23.3160,0.0000)) (idx=87,u=U+0074,origin=(26.6400,0.0000)) (idx=72,u=U+0065,origin=(29.9640,0.0000)) (idx=86,u=U+0073,origin=(36.6360,0.0000)) (idx=87,u=U+0074,origin=(42.6360,0.0000)) (idx=76,u=U+0069,origin=(45.9600,0.0000)) (idx=81,u=U+006E,origin=(48.6240,0.0000)) (idx=74,u=U+0067,origin=(55.2960,0.0000)) (idx=3,u=U+0020,origin=(61.9680,0.0000)) (idx=80,u=U+006D,origin=(65.2920,0.0000)) (idx=92,u=U+0079,origin=(75.2880,0.0000)) (idx=3,u=U+0020,origin=(81.2880,0.0000)) (idx=79,u=U+006C,origin=(84.6120,0.0000)) (idx=82,u=U+006F,origin=(87.2760,0.0000)) (idx=68,u=U+0061,origin=(93.9480,0.0000)) (idx=71,u=U+0064,origin=(100.6200,0.0000)) (idx=72,u=U+0065,origin=(107.2920,0.0000)) (idx=71,u=U+0064,origin=(113.9640,0.0000)) (idx=3,u=U+0020,origin=(120.6360,0.0000)) (idx=73,u=U+0066,origin=(123.9600,0.0000)) (idx=82,u=U+006F,origin=(127.2840,0.0000)) (idx=81,u=U+006E,origin=(133.9560,0.0000)) (idx=87,u=U+0074,origin=(140.6280,0.0000)) (idx=15,u=U+002C,origin=(143.9520,0.0000)) (idx=3,u=U+0020,origin=(147.2760,0.0000)) (idx=58,u=U+0057,origin=(150.6000,0.0000)) (idx=40,u=U+0045,origin=(161.9160,0.0000)) (idx=40,u=U+0045,origin=(169.9080,0.0000)) (idx=17,u=U+002E,origin=(177.9000,0.0000))] +RestoreState +RestoreState diff --git a/testing/resources/embedder_tests/loaded_text_agg.png b/testing/resources/embedder_tests/loaded_text_agg.png deleted file mode 100644 index 36a781949e..0000000000 Binary files a/testing/resources/embedder_tests/loaded_text_agg.png and /dev/null differ diff --git a/testing/resources/embedder_tests/loaded_text_agg_mac.png b/testing/resources/embedder_tests/loaded_text_agg_mac.png deleted file mode 100644 index 1cc489d046..0000000000 Binary files a/testing/resources/embedder_tests/loaded_text_agg_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/loaded_text_skia_linux.png b/testing/resources/embedder_tests/loaded_text_skia_linux.png deleted file mode 100644 index a5c8591295..0000000000 Binary files a/testing/resources/embedder_tests/loaded_text_skia_linux.png and /dev/null differ diff --git a/testing/resources/embedder_tests/loaded_text_skia_mac.png b/testing/resources/embedder_tests/loaded_text_skia_mac.png deleted file mode 100644 index b25c5eccb9..0000000000 Binary files a/testing/resources/embedder_tests/loaded_text_skia_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/loaded_text_skia_win.png b/testing/resources/embedder_tests/loaded_text_skia_win.png deleted file mode 100644 index d9adc8946f..0000000000 Binary files a/testing/resources/embedder_tests/loaded_text_skia_win.png and /dev/null differ diff --git a/testing/resources/embedder_tests/rectangles.dump.txt b/testing/resources/embedder_tests/rectangles.dump.txt new file mode 100644 index 0000000000..b2d23ce470 --- /dev/null +++ b/testing/resources/embedder_tests/rectangles.dump.txt @@ -0,0 +1,14 @@ +SaveState +SetBaseClip [0,0,200,300] +SetClip_PathFill rule=winding matrix=none points=[move(0.0000,300.0000) line(0.0000,0.0000) line(200.0000,0.0000) line(200.0000,300.0000) line(0.0000,300.0000,close)] +SaveState +DrawPath fill=0xff000000 stroke=0xff000000 rule=even-odd stroke_state=[width=1.0000 cap=butt join=miter miter=10.0000] matrix=[1.0000,0.0000,0.0000,-1.0000,0.0000,300.0000] points=[move(0.0000,290.0000) line(10.0000,290.0000) line(10.0000,300.0000) line(0.0000,300.0000) line(0.0000,290.0000,close)] +DrawPath fill=0xff000000 stroke=0xff000000 rule=even-odd stroke_state=[width=1.0000 cap=butt join=miter miter=10.0000] matrix=[1.0000,0.0000,0.0000,-1.0000,0.0000,300.0000] points=[move(10.0000,150.0000) line(60.0000,150.0000) line(60.0000,180.0000) line(10.0000,180.0000) line(10.0000,150.0000,close)] +DrawPath fill=0xff0000ff stroke=0xff000000 rule=even-odd stroke_state=[width=1.0000 cap=butt join=miter miter=10.0000] matrix=[1.0000,0.0000,0.0000,-1.0000,0.0000,300.0000] points=[move(190.0000,290.0000) line(200.0000,290.0000) line(200.0000,300.0000) line(190.0000,300.0000) line(190.0000,290.0000,close)] +DrawPath fill=0xff0000ff stroke=0xff000000 rule=even-odd stroke_state=[width=1.0000 cap=butt join=miter miter=10.0000] matrix=[1.0000,0.0000,0.0000,-1.0000,0.0000,300.0000] points=[move(70.0000,232.0000) line(120.0000,232.0000) line(120.0000,262.0000) line(70.0000,262.0000) line(70.0000,232.0000,close)] +DrawPath fill=0xff00ff00 stroke=0xff000000 rule=even-odd stroke_state=[width=1.0000 cap=butt join=miter miter=10.0000] matrix=[1.0000,0.0000,0.0000,-1.0000,0.0000,300.0000] points=[move(190.0000,0.0000) line(200.0000,0.0000) line(200.0000,10.0000) line(190.0000,10.0000) line(190.0000,0.0000,close)] +DrawPath fill=0xff00ff00 stroke=0xff000000 rule=even-odd stroke_state=[width=1.0000 cap=butt join=miter miter=10.0000] matrix=[1.0000,0.0000,0.0000,-1.0000,0.0000,300.0000] points=[move(130.0000,150.0000) line(180.0000,150.0000) line(180.0000,180.0000) line(130.0000,180.0000) line(130.0000,150.0000,close)] +DrawPath fill=0xffff0000 stroke=0xff000000 rule=even-odd stroke_state=[width=1.0000 cap=butt join=miter miter=10.0000] matrix=[1.0000,0.0000,0.0000,-1.0000,0.0000,300.0000] points=[move(0.0000,0.0000) line(10.0000,0.0000) line(10.0000,10.0000) line(0.0000,10.0000) line(0.0000,0.0000,close)] +DrawPath fill=0xffff0000 stroke=0xff000000 rule=even-odd stroke_state=[width=1.0000 cap=butt join=miter miter=10.0000] matrix=[1.0000,0.0000,0.0000,-1.0000,0.0000,300.0000] points=[move(70.0000,67.0000) line(120.0000,67.0000) line(120.0000,97.0000) line(70.0000,97.0000) line(70.0000,67.0000,close)] +RestoreState +RestoreState diff --git a/testing/resources/embedder_tests/red_green_rectangles.dump.txt b/testing/resources/embedder_tests/red_green_rectangles.dump.txt new file mode 100644 index 0000000000..50e0f55219 --- /dev/null +++ b/testing/resources/embedder_tests/red_green_rectangles.dump.txt @@ -0,0 +1,8 @@ +SaveState +SetBaseClip [0,0,612,792] +SetClip_PathFill rule=winding matrix=none points=[move(0.0000,792.0000) line(0.0000,0.0000) line(612.0000,0.0000) line(612.0000,792.0000) line(0.0000,792.0000,close)] +SaveState +FillRect [10,762,30,782] color=0xffff0000 +FillRect [100,652,140,692] color=0x8000ff00 +RestoreState +RestoreState diff --git a/testing/resources/embedder_tests/red_green_rectangles.png b/testing/resources/embedder_tests/red_green_rectangles.png deleted file mode 100644 index 1ea06deddf..0000000000 Binary files a/testing/resources/embedder_tests/red_green_rectangles.png and /dev/null differ diff --git a/testing/resources/embedder_tests/red_green_rectangles_black_triangle.dump.txt b/testing/resources/embedder_tests/red_green_rectangles_black_triangle.dump.txt new file mode 100644 index 0000000000..66d6ba1580 --- /dev/null +++ b/testing/resources/embedder_tests/red_green_rectangles_black_triangle.dump.txt @@ -0,0 +1,9 @@ +SaveState +SetBaseClip [0,0,612,792] +SetClip_PathFill rule=winding matrix=none points=[move(0.0000,792.0000) line(0.0000,0.0000) line(612.0000,0.0000) line(612.0000,792.0000) line(0.0000,792.0000,close)] +SaveState +FillRect [10,762,30,782] color=0xffff0000 +FillRect [100,652,140,692] color=0x8000ff00 +DrawPath fill=0xc8000000 stroke=0x00000000 rule=even-odd stroke_state=[none] matrix=[1.0000,0.0000,0.0000,-1.0000,0.0000,792.0000] points=[move(400.0000,100.0000) line(400.0000,200.0000) line(300.0000,100.0000,close)] +RestoreState +RestoreState diff --git a/testing/resources/embedder_tests/red_green_rectangles_black_triangle.png b/testing/resources/embedder_tests/red_green_rectangles_black_triangle.png deleted file mode 100644 index aab221cc30..0000000000 Binary files a/testing/resources/embedder_tests/red_green_rectangles_black_triangle.png and /dev/null differ diff --git a/testing/resources/embedder_tests/red_rectangle.dump.txt b/testing/resources/embedder_tests/red_rectangle.dump.txt new file mode 100644 index 0000000000..0f2c0ca2a0 --- /dev/null +++ b/testing/resources/embedder_tests/red_rectangle.dump.txt @@ -0,0 +1,7 @@ +SaveState +SetBaseClip [0,0,612,792] +SetClip_PathFill rule=winding matrix=none points=[move(0.0000,792.0000) line(0.0000,0.0000) line(612.0000,0.0000) line(612.0000,792.0000) line(0.0000,792.0000,close)] +SaveState +FillRect [10,762,30,782] color=0xffff0000 +RestoreState +RestoreState diff --git a/testing/resources/embedder_tests/red_rectangle.png b/testing/resources/embedder_tests/red_rectangle.png deleted file mode 100644 index 62a6986248..0000000000 Binary files a/testing/resources/embedder_tests/red_rectangle.png and /dev/null differ diff --git a/testing/resources/embedder_tests/red_rectangle_alpha.dump.txt b/testing/resources/embedder_tests/red_rectangle_alpha.dump.txt new file mode 100644 index 0000000000..b3e0e612ea --- /dev/null +++ b/testing/resources/embedder_tests/red_rectangle_alpha.dump.txt @@ -0,0 +1,7 @@ +SaveState +SetBaseClip [0,0,612,792] +SetClip_PathFill rule=winding matrix=none points=[move(0.0000,792.0000) line(0.0000,0.0000) line(612.0000,0.0000) line(612.0000,792.0000) line(0.0000,792.0000,close)] +SaveState +FillRect [10,682,110,782] color=0x80ff0000 +RestoreState +RestoreState diff --git a/testing/resources/embedder_tests/red_rectangle_alpha.png b/testing/resources/embedder_tests/red_rectangle_alpha.png deleted file mode 100644 index 25d7265c4f..0000000000 Binary files a/testing/resources/embedder_tests/red_rectangle_alpha.png and /dev/null differ diff --git a/testing/resources/embedder_tests/save_multiple_fonts.dump.txt b/testing/resources/embedder_tests/save_multiple_fonts.dump.txt new file mode 100644 index 0000000000..95bc107a46 --- /dev/null +++ b/testing/resources/embedder_tests/save_multiple_fonts.dump.txt @@ -0,0 +1,10 @@ +SaveState +SetBaseClip [0,0,200,200] +SetClip_PathFill rule=winding matrix=none points=[move(0.0000,200.0000) line(0.0000,0.0000) line(200.0000,0.0000) line(200.0000,200.0000) line(0.0000,200.0000,close)] +SaveState +DrawDeviceText font="Tinos" size=12.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,20.0000,150.0000] glyphs=[(idx=43,u=U+0048,origin=(0.0000,0.0000)) (idx=72,u=U+0065,origin=(8.6640,0.0000)) (idx=79,u=U+006C,origin=(13.9920,0.0000)) (idx=79,u=U+006C,origin=(17.3280,0.0000)) (idx=82,u=U+006F,origin=(20.6640,0.0000)) (idx=15,u=U+002C,origin=(26.6640,0.0000)) (idx=3,u=U+0020,origin=(29.6640,0.0000)) (idx=90,u=U+0077,origin=(32.6640,0.0000)) (idx=82,u=U+006F,origin=(41.3280,0.0000)) (idx=85,u=U+0072,origin=(47.3280,0.0000)) (idx=79,u=U+006C,origin=(51.3240,0.0000)) (idx=71,u=U+0064,origin=(54.6600,0.0000)) (idx=4,u=U+0021,origin=(60.6600,0.0000))] +DrawDeviceText font="Arimo" size=16.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,20.0000,100.0000] glyphs=[(idx=42,u=U+0047,origin=(0.0000,0.0000)) (idx=82,u=U+006F,origin=(12.4480,0.0000)) (idx=82,u=U+006F,origin=(21.3440,0.0000)) (idx=71,u=U+0064,origin=(30.2400,0.0000)) (idx=69,u=U+0062,origin=(39.1360,0.0000)) (idx=92,u=U+0079,origin=(48.0320,0.0000)) (idx=72,u=U+0065,origin=(56.0320,0.0000)) (idx=15,u=U+002C,origin=(64.9280,0.0000)) (idx=3,u=U+0020,origin=(69.3760,0.0000)) (idx=90,u=U+0077,origin=(73.8240,0.0000)) (idx=82,u=U+006F,origin=(85.3760,0.0000)) (idx=85,u=U+0072,origin=(94.2720,0.0000)) (idx=79,u=U+006C,origin=(99.6000,0.0000)) (idx=71,u=U+0064,origin=(103.1520,0.0000)) (idx=4,u=U+0021,origin=(112.0480,0.0000))] +DrawDeviceText font="Noto Sans SC Regular" size=24.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,10.0000,190.0000] glyphs=[(idx=9,u=U+8FD9,origin=(0.0000,0.0000)) (idx=6,u=U+662F,origin=(24.0000,0.0000)) (idx=7,u=U+7B2C,origin=(48.0000,0.0000)) (idx=3,u=U+4E00,origin=(72.0000,0.0000)) (idx=5,u=U+F906,origin=(96.0000,0.0000)) (idx=2,u=U+3002,origin=(120.0000,0.0000))] +DrawDeviceText font="Arimo" size=24.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,10.0000,50.0000] glyphs=[(idx=43,u=U+0048,origin=(0.0000,0.0000)) (idx=72,u=U+0065,origin=(17.3280,0.0000)) (idx=79,u=U+006C,origin=(30.6720,0.0000)) (idx=79,u=U+006C,origin=(36.0000,0.0000)) (idx=82,u=U+006F,origin=(41.3280,0.0000)) (idx=3,u=U+00A0,origin=(54.6720,0.0000)) (idx=68,u=U+0061,origin=(61.3200,0.0000)) (idx=74,u=U+0067,origin=(74.6640,0.0000)) (idx=68,u=U+0061,origin=(88.0080,0.0000)) (idx=76,u=U+0069,origin=(101.3520,0.0000)) (idx=81,u=U+006E,origin=(106.6800,0.0000)) (idx=17,u=U+002E,origin=(120.0240,0.0000))] +RestoreState +RestoreState diff --git a/testing/resources/embedder_tests/save_multiple_fonts_agg_linux.png b/testing/resources/embedder_tests/save_multiple_fonts_agg_linux.png deleted file mode 100644 index f386af8115..0000000000 Binary files a/testing/resources/embedder_tests/save_multiple_fonts_agg_linux.png and /dev/null differ diff --git a/testing/resources/embedder_tests/save_multiple_fonts_agg_mac.png b/testing/resources/embedder_tests/save_multiple_fonts_agg_mac.png deleted file mode 100644 index 2c8b7c32c1..0000000000 Binary files a/testing/resources/embedder_tests/save_multiple_fonts_agg_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/save_multiple_fonts_agg_win.png b/testing/resources/embedder_tests/save_multiple_fonts_agg_win.png deleted file mode 100644 index b4537f9808..0000000000 Binary files a/testing/resources/embedder_tests/save_multiple_fonts_agg_win.png and /dev/null differ diff --git a/testing/resources/embedder_tests/save_multiple_fonts_skia_linux.png b/testing/resources/embedder_tests/save_multiple_fonts_skia_linux.png deleted file mode 100644 index 8fdfab78c6..0000000000 Binary files a/testing/resources/embedder_tests/save_multiple_fonts_skia_linux.png and /dev/null differ diff --git a/testing/resources/embedder_tests/save_multiple_fonts_skia_mac.png b/testing/resources/embedder_tests/save_multiple_fonts_skia_mac.png deleted file mode 100644 index 4e37f2bb14..0000000000 Binary files a/testing/resources/embedder_tests/save_multiple_fonts_skia_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/save_multiple_fonts_skia_win.png b/testing/resources/embedder_tests/save_multiple_fonts_skia_win.png deleted file mode 100644 index 8544b0d61d..0000000000 Binary files a/testing/resources/embedder_tests/save_multiple_fonts_skia_win.png and /dev/null differ diff --git a/testing/resources/embedder_tests/save_new_text.dump.txt b/testing/resources/embedder_tests/save_new_text.dump.txt new file mode 100644 index 0000000000..24cbbc1bb4 --- /dev/null +++ b/testing/resources/embedder_tests/save_new_text.dump.txt @@ -0,0 +1,9 @@ +SaveState +SetBaseClip [0,0,200,200] +SetClip_PathFill rule=winding matrix=none points=[move(0.0000,200.0000) line(0.0000,0.0000) line(200.0000,0.0000) line(200.0000,200.0000) line(0.0000,200.0000,close)] +SaveState +DrawDeviceText font="Tinos" size=12.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,20.0000,150.0000] glyphs=[(idx=43,u=U+0048,origin=(0.0000,0.0000)) (idx=72,u=U+0065,origin=(8.6640,0.0000)) (idx=79,u=U+006C,origin=(13.9920,0.0000)) (idx=79,u=U+006C,origin=(17.3280,0.0000)) (idx=82,u=U+006F,origin=(20.6640,0.0000)) (idx=15,u=U+002C,origin=(26.6640,0.0000)) (idx=3,u=U+0020,origin=(29.6640,0.0000)) (idx=90,u=U+0077,origin=(32.6640,0.0000)) (idx=82,u=U+006F,origin=(41.3280,0.0000)) (idx=85,u=U+0072,origin=(47.3280,0.0000)) (idx=79,u=U+006C,origin=(51.3240,0.0000)) (idx=71,u=U+0064,origin=(54.6600,0.0000)) (idx=4,u=U+0021,origin=(60.6600,0.0000))] +DrawDeviceText font="Arimo" size=16.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,20.0000,100.0000] glyphs=[(idx=42,u=U+0047,origin=(0.0000,0.0000)) (idx=82,u=U+006F,origin=(12.4480,0.0000)) (idx=82,u=U+006F,origin=(21.3440,0.0000)) (idx=71,u=U+0064,origin=(30.2400,0.0000)) (idx=69,u=U+0062,origin=(39.1360,0.0000)) (idx=92,u=U+0079,origin=(48.0320,0.0000)) (idx=72,u=U+0065,origin=(56.0320,0.0000)) (idx=15,u=U+002C,origin=(64.9280,0.0000)) (idx=3,u=U+0020,origin=(69.3760,0.0000)) (idx=90,u=U+0077,origin=(73.8240,0.0000)) (idx=82,u=U+006F,origin=(85.3760,0.0000)) (idx=85,u=U+0072,origin=(94.2720,0.0000)) (idx=79,u=U+006C,origin=(99.6000,0.0000)) (idx=71,u=U+0064,origin=(103.1520,0.0000)) (idx=4,u=U+0021,origin=(112.0480,0.0000))] +DrawDeviceText font="Noto Sans SC Regular" size=24.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,10.0000,190.0000] glyphs=[(idx=9,u=U+8FD9,origin=(0.0000,0.0000)) (idx=6,u=U+662F,origin=(24.0000,0.0000)) (idx=7,u=U+7B2C,origin=(48.0000,0.0000)) (idx=3,u=U+4E00,origin=(72.0000,0.0000)) (idx=5,u=U+F906,origin=(96.0000,0.0000)) (idx=2,u=U+3002,origin=(120.0000,0.0000))] +RestoreState +RestoreState diff --git a/testing/resources/embedder_tests/save_new_text_agg_linux.png b/testing/resources/embedder_tests/save_new_text_agg_linux.png deleted file mode 100644 index 365f242520..0000000000 Binary files a/testing/resources/embedder_tests/save_new_text_agg_linux.png and /dev/null differ diff --git a/testing/resources/embedder_tests/save_new_text_agg_mac.png b/testing/resources/embedder_tests/save_new_text_agg_mac.png deleted file mode 100644 index d8c636200a..0000000000 Binary files a/testing/resources/embedder_tests/save_new_text_agg_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/save_new_text_agg_win.png b/testing/resources/embedder_tests/save_new_text_agg_win.png deleted file mode 100644 index d99d14487d..0000000000 Binary files a/testing/resources/embedder_tests/save_new_text_agg_win.png and /dev/null differ diff --git a/testing/resources/embedder_tests/save_new_text_skia_linux.png b/testing/resources/embedder_tests/save_new_text_skia_linux.png deleted file mode 100644 index 924fe264ed..0000000000 Binary files a/testing/resources/embedder_tests/save_new_text_skia_linux.png and /dev/null differ diff --git a/testing/resources/embedder_tests/save_new_text_skia_mac.png b/testing/resources/embedder_tests/save_new_text_skia_mac.png deleted file mode 100644 index 7d411f5124..0000000000 Binary files a/testing/resources/embedder_tests/save_new_text_skia_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/save_new_text_skia_win.png b/testing/resources/embedder_tests/save_new_text_skia_win.png deleted file mode 100644 index bc6a3ed3c3..0000000000 Binary files a/testing/resources/embedder_tests/save_new_text_skia_win.png and /dev/null differ diff --git a/testing/resources/embedder_tests/set_positions_bengali2.dump.txt b/testing/resources/embedder_tests/set_positions_bengali2.dump.txt new file mode 100644 index 0000000000..06be2d9032 --- /dev/null +++ b/testing/resources/embedder_tests/set_positions_bengali2.dump.txt @@ -0,0 +1,7 @@ +SaveState +SetBaseClip [0,0,200,200] +SetClip_PathFill rule=winding matrix=none points=[move(0.0000,200.0000) line(0.0000,0.0000) line(200.0000,0.0000) line(200.0000,200.0000) line(0.0000,200.0000,close)] +SaveState +DrawDeviceText font="Noto Sans Bengali" size=20.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,40.0000,140.0000] glyphs=[(idx=3,u=U+09AA,origin=(0.0000,0.0000)) (idx=9,u=U+09BF,origin=(14.3200,0.0000)) (idx=5,u=U+09B0,origin=(19.6400,0.0000)) (idx=1,u=U+0995,origin=(31.5600,0.0000)) (idx=30,u=U+001E,origin=(47.7000,0.0000)) (idx=2,u=U+09A8,origin=(62.6600,0.0000)) (idx=8,u=U+09BE,origin=(74.7400,0.0000))] +RestoreState +RestoreState diff --git a/testing/resources/embedder_tests/set_positions_bengali2.png b/testing/resources/embedder_tests/set_positions_bengali2.png deleted file mode 100644 index 36b42b75f3..0000000000 Binary files a/testing/resources/embedder_tests/set_positions_bengali2.png and /dev/null differ diff --git a/testing/resources/embedder_tests/set_positions_bengali2_skia.png b/testing/resources/embedder_tests/set_positions_bengali2_skia.png deleted file mode 100644 index 22ebafe7a8..0000000000 Binary files a/testing/resources/embedder_tests/set_positions_bengali2_skia.png and /dev/null differ diff --git a/testing/resources/embedder_tests/set_positions_bengali2_skia_mac.png b/testing/resources/embedder_tests/set_positions_bengali2_skia_mac.png deleted file mode 100644 index 36b42b75f3..0000000000 Binary files a/testing/resources/embedder_tests/set_positions_bengali2_skia_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/set_positions_bengali2_skia_win.png b/testing/resources/embedder_tests/set_positions_bengali2_skia_win.png deleted file mode 100644 index a406306399..0000000000 Binary files a/testing/resources/embedder_tests/set_positions_bengali2_skia_win.png and /dev/null differ diff --git a/testing/resources/embedder_tests/set_positions_bengali3.dump.txt b/testing/resources/embedder_tests/set_positions_bengali3.dump.txt new file mode 100644 index 0000000000..dac2a8ddea --- /dev/null +++ b/testing/resources/embedder_tests/set_positions_bengali3.dump.txt @@ -0,0 +1,9 @@ +SaveState +SetBaseClip [0,0,200,200] +SetClip_PathFill rule=winding matrix=none points=[move(0.0000,200.0000) line(0.0000,0.0000) line(200.0000,0.0000) line(200.0000,200.0000) line(0.0000,200.0000,close)] +SaveState +DrawDeviceText font="Noto Sans Bengali" size=20.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,40.0000,140.0000] glyphs=[(idx=4,u=U+09AA,origin=(0.0000,0.0000)) (idx=10,u=U+09BF,origin=(14.3200,0.0000)) (idx=6,u=U+09B0,origin=(19.6400,0.0000)) (idx=2,u=U+0995,origin=(31.5600,0.0000)) (idx=21,u=U+0015,origin=(47.7000,0.0000)) (idx=24,u=U+0018,origin=(55.7400,0.0000))] +DrawDeviceText font="Noto Sans Bengali" size=20.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,88.7400,141.6000] glyphs=[(idx=36,u=U+0024,origin=(0.0000,0.0000))] +DrawDeviceText font="Noto Sans Bengali" size=20.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,101.0200,140.0000] glyphs=[(idx=3,u=U+09A8,origin=(0.0000,0.0000)) (idx=9,u=U+09BE,origin=(12.0400,0.0000))] +RestoreState +RestoreState diff --git a/testing/resources/embedder_tests/set_positions_bengali3.png b/testing/resources/embedder_tests/set_positions_bengali3.png deleted file mode 100644 index 49a70e8eec..0000000000 Binary files a/testing/resources/embedder_tests/set_positions_bengali3.png and /dev/null differ diff --git a/testing/resources/embedder_tests/set_positions_bengali3_skia.png b/testing/resources/embedder_tests/set_positions_bengali3_skia.png deleted file mode 100644 index 1dd860da63..0000000000 Binary files a/testing/resources/embedder_tests/set_positions_bengali3_skia.png and /dev/null differ diff --git a/testing/resources/embedder_tests/set_positions_bengali3_skia_mac.png b/testing/resources/embedder_tests/set_positions_bengali3_skia_mac.png deleted file mode 100644 index b07d1d6200..0000000000 Binary files a/testing/resources/embedder_tests/set_positions_bengali3_skia_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/set_positions_bengali3_skia_mac_x86.png b/testing/resources/embedder_tests/set_positions_bengali3_skia_mac_x86.png deleted file mode 100644 index f3620cd8b1..0000000000 Binary files a/testing/resources/embedder_tests/set_positions_bengali3_skia_mac_x86.png and /dev/null differ diff --git a/testing/resources/embedder_tests/set_positions_bengali3_skia_win.png b/testing/resources/embedder_tests/set_positions_bengali3_skia_win.png deleted file mode 100644 index 8fde85e1be..0000000000 Binary files a/testing/resources/embedder_tests/set_positions_bengali3_skia_win.png and /dev/null differ diff --git a/testing/resources/embedder_tests/split_streams_removed_stream1.dump.txt b/testing/resources/embedder_tests/split_streams_removed_stream1.dump.txt new file mode 100644 index 0000000000..4a8f41a1c6 --- /dev/null +++ b/testing/resources/embedder_tests/split_streams_removed_stream1.dump.txt @@ -0,0 +1,22 @@ +SaveState +SetBaseClip [0,0,200,200] +SetClip_PathFill rule=winding matrix=none points=[move(0.0000,200.0000) line(0.0000,0.0000) line(200.0000,0.0000) line(200.0000,200.0000) line(0.0000,200.0000,close)] +SaveState +DrawDeviceText font="Cousine" size=9.0000 color=0xb3000000 matrix=[1.0000,0.0000,0.0000,-1.0000,120.0000,100.0000] glyphs=[(idx=55,u=U+0054,origin=(0.0000,0.0000)) (idx=72,u=U+0065,origin=(5.4000,0.0000)) (idx=86,u=U+0073,origin=(10.8000,0.0000)) (idx=87,u=U+0074,origin=(16.2000,0.0000)) (idx=3,u=U+0020,origin=(21.6000,0.0000)) (idx=20,u=U+0031,origin=(27.0000,0.0000))] +DrawDeviceText font="Tinos" size=9.0000 color=0xb300000d matrix=[0.9956,0.3418,0.3418,-0.9956,119.9120,106.8358] glyphs=[(idx=55,u=U+0054,origin=(0.0000,0.0000)) (idx=72,u=U+0065,origin=(6.0030,0.0000)) (idx=86,u=U+0073,origin=(9.9990,0.0000)) (idx=87,u=U+0074,origin=(13.5000,0.0000)) (idx=3,u=U+0020,origin=(16.4970,0.0000)) (idx=21,u=U+0032,origin=(18.7470,0.0000))] +DrawDeviceText font="Cousine" size=9.0000 color=0xb300001a matrix=[0.8722,0.6789,0.6789,-0.8722,117.4440,113.5773] glyphs=[(idx=55,u=U+0054,origin=(0.0000,0.0000)) (idx=72,u=U+0065,origin=(5.4000,0.0000)) (idx=86,u=U+0073,origin=(10.8000,0.0000)) (idx=87,u=U+0074,origin=(16.2000,0.0000)) (idx=3,u=U+0020,origin=(21.6000,0.0000)) (idx=22,u=U+0033,origin=(27.0000,0.0000))] +DrawDeviceText font="Tinos" size=9.0000 color=0xb3000028 matrix=[0.6333,0.9694,0.9694,-0.6333,112.6660,119.3870] glyphs=[(idx=55,u=U+0054,origin=(0.0000,0.0000)) (idx=72,u=U+0065,origin=(6.0030,0.0000)) (idx=86,u=U+0073,origin=(9.9990,0.0000)) (idx=87,u=U+0074,origin=(13.5000,0.0000)) (idx=3,u=U+0020,origin=(16.4970,0.0000)) (idx=23,u=U+0034,origin=(18.7470,0.0000))] +DrawDeviceText font="Cousine" size=9.0000 color=0xb3000035 matrix=[0.2972,1.1735,1.1735,-0.2972,105.9430,123.4697] glyphs=[(idx=55,u=U+0054,origin=(0.0000,0.0000)) (idx=72,u=U+0065,origin=(5.4000,0.0000)) (idx=86,u=U+0073,origin=(10.8000,0.0000)) (idx=87,u=U+0074,origin=(16.2000,0.0000)) (idx=3,u=U+0020,origin=(21.6000,0.0000)) (idx=24,u=U+0035,origin=(27.0000,0.0000))] +DrawDeviceText font="Tinos" size=9.0000 color=0xb3000043 matrix=[-0.1043,1.2588,1.2588,0.1043,97.9138,125.1769] glyphs=[(idx=55,u=U+0054,origin=(0.0000,0.0000)) (idx=72,u=U+0065,origin=(6.0030,0.0000)) (idx=86,u=U+0073,origin=(9.9990,0.0000)) (idx=87,u=U+0074,origin=(13.5000,0.0000)) (idx=3,u=U+0020,origin=(16.4970,0.0000)) (idx=25,u=U+0036,origin=(18.7470,0.0000))] +DrawDeviceText font="Cousine" size=9.0000 color=0xb3000050 matrix=[-0.5285,1.2050,1.2050,0.5285,89.4291,124.0993] glyphs=[(idx=55,u=U+0054,origin=(0.0000,0.0000)) (idx=72,u=U+0065,origin=(5.4000,0.0000)) (idx=86,u=U+0073,origin=(10.8000,0.0000)) (idx=87,u=U+0074,origin=(16.2000,0.0000)) (idx=3,u=U+0020,origin=(21.6000,0.0000)) (idx=26,u=U+0037,origin=(27.0000,0.0000))] +DrawDeviceText font="Tinos" size=9.0000 color=0xb300005d matrix=[-0.9268,1.0068,1.0068,0.9268,81.4639,120.1356] glyphs=[(idx=55,u=U+0054,origin=(0.0000,0.0000)) (idx=72,u=U+0065,origin=(6.0030,0.0000)) (idx=86,u=U+0073,origin=(9.9990,0.0000)) (idx=87,u=U+0074,origin=(13.5000,0.0000)) (idx=3,u=U+0020,origin=(16.4970,0.0000)) (idx=27,u=U+0038,origin=(18.7470,0.0000))] +DrawDeviceText font="Cousine" size=9.0000 color=0xb300006b matrix=[-1.2498,0.6763,0.6763,1.2498,75.0044,113.5269] glyphs=[(idx=55,u=U+0054,origin=(0.0000,0.0000)) (idx=72,u=U+0065,origin=(5.4000,0.0000)) (idx=86,u=U+0073,origin=(10.8000,0.0000)) (idx=87,u=U+0074,origin=(16.2000,0.0000)) (idx=3,u=U+0020,origin=(21.6000,0.0000)) (idx=28,u=U+0039,origin=(27.0000,0.0000))] +DrawDeviceText font="Tinos" size=9.0000 color=0xb3000078 matrix=[-1.4536,0.2426,0.2426,1.4536,70.9283,104.8512] glyphs=[(idx=55,u=U+0054,origin=(0.0000,0.0000)) (idx=72,u=U+0065,origin=(6.0030,0.0000)) (idx=86,u=U+0073,origin=(9.9990,0.0000)) (idx=87,u=U+0074,origin=(13.5000,0.0000)) (idx=3,u=U+0020,origin=(16.4970,0.0000)) (idx=20,u=U+0031,origin=(18.7470,0.0000)) (idx=19,u=U+0030,origin=(23.2470,0.0000))] +DrawDeviceText font="Cousine" size=9.0000 color=0xb3000086 matrix=[-1.5055,-0.2512,-0.2512,1.5055,69.8900,94.9760] glyphs=[(idx=55,u=U+0054,origin=(0.0000,0.0000)) (idx=72,u=U+0065,origin=(5.4000,0.0000)) (idx=86,u=U+0073,origin=(10.8000,0.0000)) (idx=87,u=U+0074,origin=(16.2000,0.0000)) (idx=3,u=U+0020,origin=(21.6000,0.0000)) (idx=20,u=U+0031,origin=(27.0000,0.0000)) (idx=20,u=U+0031,origin=(32.4000,0.0000))] +DrawDeviceText font="Tinos" size=9.0000 color=0xb3000093 matrix=[-1.3886,-0.7515,-0.7515,1.3886,72.2271,84.9700] glyphs=[(idx=55,u=U+0054,origin=(0.0000,0.0000)) (idx=72,u=U+0065,origin=(6.0030,0.0000)) (idx=86,u=U+0073,origin=(9.9990,0.0000)) (idx=87,u=U+0074,origin=(13.5000,0.0000)) (idx=3,u=U+0020,origin=(16.4970,0.0000)) (idx=20,u=U+0031,origin=(18.7470,0.0000)) (idx=21,u=U+0032,origin=(23.2470,0.0000))] +DrawDeviceText font="Cousine" size=9.0000 color=0xb30000a1 matrix=[-1.1050,-1.2004,-1.2004,1.1050,77.8992,75.9920] glyphs=[(idx=55,u=U+0054,origin=(0.0000,0.0000)) (idx=72,u=U+0065,origin=(5.4000,0.0000)) (idx=86,u=U+0073,origin=(10.8000,0.0000)) (idx=87,u=U+0074,origin=(16.2000,0.0000)) (idx=3,u=U+0020,origin=(21.6000,0.0000)) (idx=20,u=U+0031,origin=(27.0000,0.0000)) (idx=22,u=U+0033,origin=(32.4000,0.0000))] +DrawDeviceText font="Tinos" size=9.0000 color=0xb30000ae matrix=[-0.6765,-1.5424,-1.5424,0.6765,86.4692,69.1530] glyphs=[(idx=55,u=U+0054,origin=(0.0000,0.0000)) (idx=72,u=U+0065,origin=(6.0030,0.0000)) (idx=86,u=U+0073,origin=(9.9990,0.0000)) (idx=87,u=U+0074,origin=(13.5000,0.0000)) (idx=3,u=U+0020,origin=(16.4970,0.0000)) (idx=20,u=U+0031,origin=(18.7470,0.0000)) (idx=23,u=U+0034,origin=(23.2470,0.0000))] +DrawDeviceText font="Cousine" size=9.0000 color=0xb30000bb matrix=[-0.1434,-1.7309,-1.7309,0.1434,97.1315,65.3820] glyphs=[(idx=55,u=U+0054,origin=(0.0000,0.0000)) (idx=72,u=U+0065,origin=(5.4000,0.0000)) (idx=86,u=U+0073,origin=(10.8000,0.0000)) (idx=87,u=U+0074,origin=(16.2000,0.0000)) (idx=3,u=U+0020,origin=(21.6000,0.0000)) (idx=20,u=U+0031,origin=(27.0000,0.0000)) (idx=24,u=U+0035,origin=(32.4000,0.0000))] +DrawDeviceText font="Cousine" size=9.0000 color=0xb30000f1 matrix=[1.8419,-0.6323,-0.6323,-1.8419,136.8370,87.3540] glyphs=[(idx=55,u=U+0054,origin=(0.0000,0.0000)) (idx=72,u=U+0065,origin=(5.4000,0.0000)) (idx=86,u=U+0073,origin=(10.8000,0.0000)) (idx=87,u=U+0074,origin=(16.2000,0.0000)) (idx=3,u=U+0020,origin=(21.6000,0.0000)) (idx=20,u=U+0031,origin=(27.0000,0.0000)) (idx=28,u=U+0039,origin=(32.4000,0.0000))] +RestoreState +RestoreState diff --git a/testing/resources/embedder_tests/split_streams_removed_stream1_agg.png b/testing/resources/embedder_tests/split_streams_removed_stream1_agg.png deleted file mode 100644 index 4b1202eba0..0000000000 Binary files a/testing/resources/embedder_tests/split_streams_removed_stream1_agg.png and /dev/null differ diff --git a/testing/resources/embedder_tests/split_streams_removed_stream1_agg_mac.png b/testing/resources/embedder_tests/split_streams_removed_stream1_agg_mac.png deleted file mode 100644 index 673fc30fea..0000000000 Binary files a/testing/resources/embedder_tests/split_streams_removed_stream1_agg_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/split_streams_removed_stream1_agg_mac_x86.png b/testing/resources/embedder_tests/split_streams_removed_stream1_agg_mac_x86.png deleted file mode 100644 index 10ef7ad53e..0000000000 Binary files a/testing/resources/embedder_tests/split_streams_removed_stream1_agg_mac_x86.png and /dev/null differ diff --git a/testing/resources/embedder_tests/split_streams_removed_stream1_skia_linux.png b/testing/resources/embedder_tests/split_streams_removed_stream1_skia_linux.png deleted file mode 100644 index 726e0fa4e0..0000000000 Binary files a/testing/resources/embedder_tests/split_streams_removed_stream1_skia_linux.png and /dev/null differ diff --git a/testing/resources/embedder_tests/split_streams_removed_stream1_skia_mac.png b/testing/resources/embedder_tests/split_streams_removed_stream1_skia_mac.png deleted file mode 100644 index bc91c5c9f4..0000000000 Binary files a/testing/resources/embedder_tests/split_streams_removed_stream1_skia_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/split_streams_removed_stream1_skia_mac_x86.png b/testing/resources/embedder_tests/split_streams_removed_stream1_skia_mac_x86.png deleted file mode 100644 index d1780d5199..0000000000 Binary files a/testing/resources/embedder_tests/split_streams_removed_stream1_skia_mac_x86.png and /dev/null differ diff --git a/testing/resources/embedder_tests/split_streams_removed_stream1_skia_win.png b/testing/resources/embedder_tests/split_streams_removed_stream1_skia_win.png deleted file mode 100644 index 830206a74c..0000000000 Binary files a/testing/resources/embedder_tests/split_streams_removed_stream1_skia_win.png and /dev/null differ diff --git a/testing/resources/embedder_tests/text_form.dump.txt b/testing/resources/embedder_tests/text_form.dump.txt new file mode 100644 index 0000000000..e6064e9bb3 --- /dev/null +++ b/testing/resources/embedder_tests/text_form.dump.txt @@ -0,0 +1,10 @@ +SaveState +SetBaseClip [0,0,300,300] +SetClip_PathFill rule=winding matrix=none points=[move(0.0000,300.0000) line(0.0000,0.0000) line(300.0000,0.0000) line(300.0000,300.0000) line(0.0000,300.0000,close)] +SaveState +DrawDeviceText font="Arimo" size=12.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,100.0000,150.0000] glyphs=[(idx=55,u=U+0054,origin=(0.0000,0.0000)) (idx=72,u=U+0065,origin=(7.3320,0.0000)) (idx=86,u=U+0073,origin=(14.0040,0.0000)) (idx=87,u=U+0074,origin=(20.0040,0.0000)) (idx=3,u=U+0020,origin=(23.3400,0.0000)) (idx=41,u=U+0046,origin=(26.6760,0.0000)) (idx=82,u=U+006F,origin=(34.0080,0.0000)) (idx=85,u=U+0072,origin=(40.6800,0.0000)) (idx=80,u=U+006D,origin=(44.6760,0.0000))] +RestoreState +RestoreState +SaveState +RestoreState +FillRect [100,200,200,170] color=0x64dde4ff diff --git a/testing/resources/embedder_tests/text_form_no_highlight.dump.txt b/testing/resources/embedder_tests/text_form_no_highlight.dump.txt new file mode 100644 index 0000000000..0439661107 --- /dev/null +++ b/testing/resources/embedder_tests/text_form_no_highlight.dump.txt @@ -0,0 +1,9 @@ +SaveState +SetBaseClip [0,0,300,300] +SetClip_PathFill rule=winding matrix=none points=[move(0.0000,300.0000) line(0.0000,0.0000) line(300.0000,0.0000) line(300.0000,300.0000) line(0.0000,300.0000,close)] +SaveState +DrawDeviceText font="Arimo" size=12.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,100.0000,150.0000] glyphs=[(idx=55,u=U+0054,origin=(0.0000,0.0000)) (idx=72,u=U+0065,origin=(7.3320,0.0000)) (idx=86,u=U+0073,origin=(14.0040,0.0000)) (idx=87,u=U+0074,origin=(20.0040,0.0000)) (idx=3,u=U+0020,origin=(23.3400,0.0000)) (idx=41,u=U+0046,origin=(26.6760,0.0000)) (idx=82,u=U+006F,origin=(34.0080,0.0000)) (idx=85,u=U+0072,origin=(40.6800,0.0000)) (idx=80,u=U+006D,origin=(44.6760,0.0000))] +RestoreState +RestoreState +SaveState +RestoreState diff --git a/testing/resources/embedder_tests/text_form_no_highlight_agg.png b/testing/resources/embedder_tests/text_form_no_highlight_agg.png deleted file mode 100644 index 5594a89266..0000000000 Binary files a/testing/resources/embedder_tests/text_form_no_highlight_agg.png and /dev/null differ diff --git a/testing/resources/embedder_tests/text_form_no_highlight_agg_mac.png b/testing/resources/embedder_tests/text_form_no_highlight_agg_mac.png deleted file mode 100644 index b46c5a4f1d..0000000000 Binary files a/testing/resources/embedder_tests/text_form_no_highlight_agg_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/text_form_no_highlight_skia_linux.png b/testing/resources/embedder_tests/text_form_no_highlight_skia_linux.png deleted file mode 100644 index 94ed1ced92..0000000000 Binary files a/testing/resources/embedder_tests/text_form_no_highlight_skia_linux.png and /dev/null differ diff --git a/testing/resources/embedder_tests/text_form_no_highlight_skia_mac.png b/testing/resources/embedder_tests/text_form_no_highlight_skia_mac.png deleted file mode 100644 index 5b02ce7cd0..0000000000 Binary files a/testing/resources/embedder_tests/text_form_no_highlight_skia_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/text_form_no_highlight_skia_win.png b/testing/resources/embedder_tests/text_form_no_highlight_skia_win.png deleted file mode 100644 index 1cd2dfcecd..0000000000 Binary files a/testing/resources/embedder_tests/text_form_no_highlight_skia_win.png and /dev/null differ diff --git a/testing/resources/embedder_tests/truetype_font_text.dump.txt b/testing/resources/embedder_tests/truetype_font_text.dump.txt new file mode 100644 index 0000000000..1316de2ca7 --- /dev/null +++ b/testing/resources/embedder_tests/truetype_font_text.dump.txt @@ -0,0 +1,8 @@ +SaveState +SetBaseClip [0,0,612,792] +SetClip_PathFill rule=winding matrix=none points=[move(0.0000,792.0000) line(0.0000,0.0000) line(612.0000,0.0000) line(612.0000,792.0000) line(0.0000,792.0000,close)] +SaveState +DrawDeviceText font="Arimo" size=12.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,400.0000,392.0000] glyphs=[(idx=44,u=U+0049,origin=(0.0000,0.0000)) (idx=3,u=U+0020,origin=(3.3240,0.0000)) (idx=68,u=U+0061,origin=(6.6480,0.0000)) (idx=80,u=U+006D,origin=(13.3200,0.0000)) (idx=3,u=U+0020,origin=(23.3160,0.0000)) (idx=87,u=U+0074,origin=(26.6400,0.0000)) (idx=72,u=U+0065,origin=(29.9640,0.0000)) (idx=86,u=U+0073,origin=(36.6360,0.0000)) (idx=87,u=U+0074,origin=(42.6360,0.0000)) (idx=76,u=U+0069,origin=(45.9600,0.0000)) (idx=81,u=U+006E,origin=(48.6240,0.0000)) (idx=74,u=U+0067,origin=(55.2960,0.0000)) (idx=3,u=U+0020,origin=(61.9680,0.0000)) (idx=80,u=U+006D,origin=(65.2920,0.0000)) (idx=92,u=U+0079,origin=(75.2880,0.0000)) (idx=3,u=U+0020,origin=(81.2880,0.0000)) (idx=79,u=U+006C,origin=(84.6120,0.0000)) (idx=82,u=U+006F,origin=(87.2760,0.0000)) (idx=68,u=U+0061,origin=(93.9480,0.0000)) (idx=71,u=U+0064,origin=(100.6200,0.0000)) (idx=72,u=U+0065,origin=(107.2920,0.0000)) (idx=71,u=U+0064,origin=(113.9640,0.0000)) (idx=3,u=U+0020,origin=(120.6360,0.0000)) (idx=73,u=U+0066,origin=(123.9600,0.0000)) (idx=82,u=U+006F,origin=(127.2840,0.0000)) (idx=81,u=U+006E,origin=(133.9560,0.0000)) (idx=87,u=U+0074,origin=(140.6280,0.0000)) (idx=15,u=U+002C,origin=(143.9520,0.0000)) (idx=3,u=U+0020,origin=(147.2760,0.0000)) (idx=58,u=U+0057,origin=(150.6000,0.0000)) (idx=40,u=U+0045,origin=(161.9160,0.0000)) (idx=40,u=U+0045,origin=(169.9080,0.0000)) (idx=17,u=U+002E,origin=(177.9000,0.0000))] +DrawDeviceText font="Arimo" size=15.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,200.0000,592.0000] glyphs=[(idx=37,u=U+0042,origin=(0.0000,0.0000)) (idx=76,u=U+0069,origin=(9.9900,0.0000)) (idx=74,u=U+0067,origin=(13.3200,0.0000)) (idx=74,u=U+0067,origin=(21.6600,0.0000)) (idx=72,u=U+0065,origin=(30.0000,0.0000)) (idx=85,u=U+0072,origin=(38.3400,0.0000)) (idx=3,u=U+0020,origin=(43.3350,0.0000)) (idx=73,u=U+0066,origin=(47.4900,0.0000)) (idx=82,u=U+006F,origin=(51.6450,0.0000)) (idx=81,u=U+006E,origin=(59.9850,0.0000)) (idx=87,u=U+0074,origin=(68.3250,0.0000)) (idx=3,u=U+0020,origin=(72.4800,0.0000)) (idx=86,u=U+0073,origin=(76.6350,0.0000)) (idx=76,u=U+0069,origin=(84.1350,0.0000)) (idx=93,u=U+007A,origin=(87.4650,0.0000)) (idx=72,u=U+0065,origin=(94.9650,0.0000))] +RestoreState +RestoreState diff --git a/testing/resources/embedder_tests/truetype_font_text_agg.png b/testing/resources/embedder_tests/truetype_font_text_agg.png deleted file mode 100644 index 1f18fb53f0..0000000000 Binary files a/testing/resources/embedder_tests/truetype_font_text_agg.png and /dev/null differ diff --git a/testing/resources/embedder_tests/truetype_font_text_agg_mac.png b/testing/resources/embedder_tests/truetype_font_text_agg_mac.png deleted file mode 100644 index dd99daa6a2..0000000000 Binary files a/testing/resources/embedder_tests/truetype_font_text_agg_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/truetype_font_text_skia_linux.png b/testing/resources/embedder_tests/truetype_font_text_skia_linux.png deleted file mode 100644 index b9e1d3a09d..0000000000 Binary files a/testing/resources/embedder_tests/truetype_font_text_skia_linux.png and /dev/null differ diff --git a/testing/resources/embedder_tests/truetype_font_text_skia_mac.png b/testing/resources/embedder_tests/truetype_font_text_skia_mac.png deleted file mode 100644 index c2f857f918..0000000000 Binary files a/testing/resources/embedder_tests/truetype_font_text_skia_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/truetype_font_text_skia_win.png b/testing/resources/embedder_tests/truetype_font_text_skia_win.png deleted file mode 100644 index 6cb0761f2e..0000000000 Binary files a/testing/resources/embedder_tests/truetype_font_text_skia_win.png and /dev/null differ diff --git a/testing/resources/embedder_tests/unfocused_text_form_with_abc.dump.txt b/testing/resources/embedder_tests/unfocused_text_form_with_abc.dump.txt new file mode 100644 index 0000000000..3d9dba8198 --- /dev/null +++ b/testing/resources/embedder_tests/unfocused_text_form_with_abc.dump.txt @@ -0,0 +1,11 @@ +SaveState +SetBaseClip [0,0,300,300] +SetClip_PathFill rule=winding matrix=none points=[move(0.0000,300.0000) line(0.0000,0.0000) line(300.0000,0.0000) line(300.0000,300.0000) line(0.0000,300.0000,close)] +SaveState +DrawDeviceText font="Arimo" size=12.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,100.0000,150.0000] glyphs=[(idx=55,u=U+0054,origin=(0.0000,0.0000)) (idx=72,u=U+0065,origin=(7.3320,0.0000)) (idx=86,u=U+0073,origin=(14.0040,0.0000)) (idx=87,u=U+0074,origin=(20.0040,0.0000)) (idx=3,u=U+0020,origin=(23.3400,0.0000)) (idx=41,u=U+0046,origin=(26.6760,0.0000)) (idx=82,u=U+006F,origin=(34.0080,0.0000)) (idx=85,u=U+0072,origin=(40.6800,0.0000)) (idx=80,u=U+006D,origin=(44.6760,0.0000))] +RestoreState +RestoreState +SaveState +DrawDeviceText font="Arimo" size=12.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,101.0000,189.1640] glyphs=[(idx=36,u=U+0041,origin=(0.0000,0.0000)) (idx=37,u=U+0042,origin=(8.0040,0.0000)) (idx=38,u=U+0043,origin=(16.0080,0.0000))] +RestoreState +FillRect [100,200,200,170] color=0x64dde4ff diff --git a/testing/resources/embedder_tests/unfocused_text_form_with_abc_agg.png b/testing/resources/embedder_tests/unfocused_text_form_with_abc_agg.png deleted file mode 100644 index f9b833c56d..0000000000 Binary files a/testing/resources/embedder_tests/unfocused_text_form_with_abc_agg.png and /dev/null differ diff --git a/testing/resources/embedder_tests/unfocused_text_form_with_abc_agg_mac.png b/testing/resources/embedder_tests/unfocused_text_form_with_abc_agg_mac.png deleted file mode 100644 index b40b0342a9..0000000000 Binary files a/testing/resources/embedder_tests/unfocused_text_form_with_abc_agg_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/unfocused_text_form_with_abc_skia_linux.png b/testing/resources/embedder_tests/unfocused_text_form_with_abc_skia_linux.png deleted file mode 100644 index 048a59a4e0..0000000000 Binary files a/testing/resources/embedder_tests/unfocused_text_form_with_abc_skia_linux.png and /dev/null differ diff --git a/testing/resources/embedder_tests/unfocused_text_form_with_abc_skia_mac.png b/testing/resources/embedder_tests/unfocused_text_form_with_abc_skia_mac.png deleted file mode 100644 index b55c8b18d6..0000000000 Binary files a/testing/resources/embedder_tests/unfocused_text_form_with_abc_skia_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/unfocused_text_form_with_abc_skia_win.png b/testing/resources/embedder_tests/unfocused_text_form_with_abc_skia_win.png deleted file mode 100644 index a99e0a47c8..0000000000 Binary files a/testing/resources/embedder_tests/unfocused_text_form_with_abc_skia_win.png and /dev/null differ diff --git a/testing/resources/embedder_tests/vertical_text_positioned.dump.txt b/testing/resources/embedder_tests/vertical_text_positioned.dump.txt new file mode 100644 index 0000000000..ffcaa85312 --- /dev/null +++ b/testing/resources/embedder_tests/vertical_text_positioned.dump.txt @@ -0,0 +1,9 @@ +SaveState +SetBaseClip [0,0,200,200] +SetClip_PathFill rule=winding matrix=none points=[move(0.0000,200.0000) line(0.0000,0.0000) line(200.0000,0.0000) line(200.0000,200.0000) line(0.0000,200.0000,close)] +SaveState +DrawDeviceText font="Untitled1" size=12.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,10.0000,10.0000] glyphs=[(idx=41,u=U+0048,origin=(-4.3320,-9.8160)) (idx=70,u=U+0065,origin=(-3.3360,-19.6920)) (idx=77,u=U+006C,origin=(-1.3320,-29.5080)) (idx=77,u=U+006C,origin=(-1.3320,-40.5240)) (idx=80,u=U+006F,origin=(-3.3360,-51.6000)) (idx=1,u=U+0020,origin=(-1.6680,-60.2760))] +DrawDeviceText font="Untitled1" size=12.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,10.0000,69.0760] glyphs=[(idx=56,u=U+0057,origin=(-5.6640,-9.8160)) (idx=80,u=U+006F,origin=(-3.3360,-18.4920)) (idx=83,u=U+0072,origin=(-1.9920,-27.1680)) (idx=77,u=U+006C,origin=(-1.3320,-38.1840)) (idx=69,u=U+0064,origin=(-3.3360,-49.2000)) (idx=2,u=U+0021,origin=(-1.6680,-60.2160))] +DrawDeviceText font="Untitled1" size=12.0000 color=0xff000000 matrix=[1.0000,0.0000,0.0000,-1.0000,110.0000,10.0000] glyphs=[(idx=41,u=U+0048,origin=(-4.3320,-9.8160)) (idx=70,u=U+0065,origin=(-3.3360,-19.6920)) (idx=77,u=U+006C,origin=(-1.3320,-29.5080)) (idx=77,u=U+006C,origin=(-1.3320,-40.5240)) (idx=80,u=U+006F,origin=(-3.3360,-51.6000))] +RestoreState +RestoreState diff --git a/testing/resources/embedder_tests/vertical_text_positioned.png b/testing/resources/embedder_tests/vertical_text_positioned.png deleted file mode 100644 index 1d356fc48d..0000000000 Binary files a/testing/resources/embedder_tests/vertical_text_positioned.png and /dev/null differ diff --git a/testing/resources/embedder_tests/vertical_text_positioned_skia.png b/testing/resources/embedder_tests/vertical_text_positioned_skia.png deleted file mode 100644 index db6af7b0cf..0000000000 Binary files a/testing/resources/embedder_tests/vertical_text_positioned_skia.png and /dev/null differ diff --git a/testing/resources/embedder_tests/vertical_text_positioned_skia_mac.png b/testing/resources/embedder_tests/vertical_text_positioned_skia_mac.png deleted file mode 100644 index 40853b503e..0000000000 Binary files a/testing/resources/embedder_tests/vertical_text_positioned_skia_mac.png and /dev/null differ diff --git a/testing/resources/embedder_tests/vertical_text_positioned_skia_win.png b/testing/resources/embedder_tests/vertical_text_positioned_skia_win.png deleted file mode 100644 index 44f2a935c0..0000000000 Binary files a/testing/resources/embedder_tests/vertical_text_positioned_skia_win.png and /dev/null differ diff --git a/testing/tools/pngdiffer.py b/testing/tools/pngdiffer.py index f31cfecd4a..56c8a5c146 100755 --- a/testing/tools/pngdiffer.py +++ b/testing/tools/pngdiffer.py @@ -119,6 +119,7 @@ def _ParseTolerances(self, algorithm, extra_flags): delta = 3 mse = 0.05 win_mse = 15.0 + ssim = 1.0 for flag in extra_flags: if flag.startswith('--fuzzy='): params = flag[len('--fuzzy='):].split(',') @@ -128,7 +129,9 @@ def _ParseTolerances(self, algorithm, extra_flags): mse = float(params[1]) if len(params) > 2 and params[2]: win_mse = float(params[2]) - return delta, mse, win_mse + if len(params) > 3 and params[3]: + ssim = float(params[3]) + return delta, mse, win_mse, ssim def EvaluateMatch(self, metrics, image_matching_algorithm): if not metrics.dims_match: @@ -149,14 +152,17 @@ def EvaluateMatch(self, metrics, image_matching_algorithm): f'mse={metrics.mse:.6f}') if algorithm == FUZZY_MATCHING: - delta, mse, win_mse = self._ParseTolerances(algorithm, extra_flags) - if (metrics.max_delta <= delta and (mse <= 0.0 or metrics.mse <= mse) and - (win_mse <= 0.0 or metrics.win_mse <= win_mse)): + delta, mse, win_mse, ssim = self._ParseTolerances(algorithm, extra_flags) + mse_passed = ( + metrics.max_delta <= delta and (mse <= 0.0 or metrics.mse <= mse) and + (win_mse <= 0.0 or metrics.win_mse <= win_mse)) + if mse_passed or metrics.mean_ssim > ssim: return True, None return False, ( f'exceeds fuzzy: max_delta={metrics.max_delta} (max {delta}), ' f'mse={metrics.mse:.6f} (max {mse}), ' - f'win_mse={metrics.win_mse:.6f} (max {win_mse})') + f'win_mse={metrics.win_mse:.6f} (max {win_mse}), ' + f'mean_ssim={metrics.mean_ssim:.6f} (min {ssim})') return False, f'Unknown algorithm {algorithm}' diff --git a/testing/tools/suppressor.py b/testing/tools/suppressor.py index d7c4c9925b..b589f4e088 100755 --- a/testing/tools/suppressor.py +++ b/testing/tools/suppressor.py @@ -14,7 +14,7 @@ def _ParseFuzzyAction(token): if token == 'fuzzy': return '--fuzzy' params = token[len('fuzzy='):].split(',') - if not (1 <= len(params) <= 3): + if not (1 <= len(params) <= 4): raise ValueError(f'Invalid fuzzy option format: {token}') try: delta = int(params[0]) @@ -32,6 +32,10 @@ def _ParseFuzzyAction(token): if val < 0.0: raise ValueError( f'Negative value {val} not allowed in fuzzy option: {token}') + if len(params) == 4 and float(params[3]) > 1.0: + raise ValueError( + f'SSIM score {params[3]} out of range [0.0, 1.0] in fuzzy option: ' + f'{token}') return f'--{token}' @@ -39,13 +43,12 @@ def _ParseFuzzyAction(token): # the test file name, which is unconstrained. _VALID_COLUMN_VALUES = { 1: {'*', 'win', 'mac', 'mac_arm', 'mac_x86', 'linux'}, - 2: {'*', 'nov8', 'v8'}, - 3: {'*', 'noxfa', 'xfa'}, - 4: {'*', 'agg', 'gdi', 'gdi_agg', 'gdi_skia', 'skia'}, - 5: {'*', 'freetype', 'fontations'}, + 2: {'*', 'nov8', 'v8', 'xfa'}, + 3: {'*', 'agg', 'gdi', 'gdi_agg', 'gdi_skia', 'skia'}, + 4: {'*', 'freetype', 'fontations'}, } -# Legal keywords for the action in column 6. +# Legal keywords for the action in column 5. _VALID_ACTIONS = {'diff', 'blank', 'fuzzy', 'skip'} @@ -67,8 +70,8 @@ def _ParseAction(token): def _SuppressionSpecificity(item): - """Scores columns 1-5 as a little-endian specificity bitmask.""" - return sum((item[col] != '*') << (col - 1) for col in range(1, 6)) + """Scores columns 1-4 as a little-endian specificity bitmask.""" + return sum((item[col] != '*') << (col - 1) for col in range(1, 5)) class Suppressor: @@ -89,19 +92,23 @@ def __init__(self, finder, features, js_disabled, xfa_disabled, self._LoadSuppressions(finder) def _LoadSuppressions(self, finder): - v8_option = "v8" if self.has_v8 else "nov8" - xfa_option = "xfa" if self.has_xfa else "noxfa" + if not self.has_v8: + engine_option = 'nov8' + elif not self.has_xfa: + engine_option = 'v8' + else: + engine_option = 'xfa' with open(os.path.join(finder.TestingDir(), 'SUPPRESSIONS')) as f: os_name = common.os_name() mac_platform = common.mac_platform() if os_name == 'mac' else None fuzzy_specificity = {} for item in self._ExtractSuppressions(f): - if len(item) != 7: + if len(item) != 6: raise ValueError(f'Unexpected column count in suppressions: {item}') _ValidatePredicates(item) - keyword, flags = _ParseAction(item[6]) - if not self._MatchSuppression(item, os_name, mac_platform, v8_option, - xfa_option, self.rendering_option, + keyword, flags = _ParseAction(item[5]) + if not self._MatchSuppression(item, os_name, mac_platform, + engine_option, self.rendering_option, self.font_engine): continue filename = item[0] @@ -142,16 +149,14 @@ def _MatchRenderer(rendering_option, rendering_option_column): return 'gdi' in rendering_option_column return False - def _MatchSuppression(self, item, os_name, mac_platform, js, xfa, + def _MatchSuppression(self, item, os_name, mac_platform, engine, rendering_option, font_engine): os_column = item[1].split(",") - js_column = item[2].split(",") - xfa_column = item[3].split(",") - rendering_option_column = item[4].split(",") - font_engine_column = item[5].split(",") + engine_column = item[2].split(",") + rendering_option_column = item[3].split(",") + font_engine_column = item[4].split(",") return (Suppressor._MatchOs(os_name, mac_platform, os_column) and - ('*' in js_column or js in js_column) and - ('*' in xfa_column or xfa in xfa_column) and + ('*' in engine_column or engine in engine_column) and Suppressor._MatchRenderer(rendering_option, rendering_option_column) and ('*' in font_engine_column or font_engine in font_engine_column)) diff --git a/third_party/.clang-format-ignore b/third_party/.clang-format-ignore new file mode 100644 index 0000000000..c3fc01cef3 --- /dev/null +++ b/third_party/.clang-format-ignore @@ -0,0 +1,5 @@ +# Ignore all vendored third-party code. If any first-party code need to be +# formatted, please put a config under your own directory to void this one. +# https://clang.llvm.org/docs/ClangFormat.html#clang-format-ignore + +** diff --git a/xfa/fgas/font/cfgas_fontmgr.h b/xfa/fgas/font/cfgas_fontmgr.h index 3094dedca8..8c558fe7e6 100644 --- a/xfa/fgas/font/cfgas_fontmgr.h +++ b/xfa/fgas/font/cfgas_fontmgr.h @@ -59,7 +59,6 @@ inline bool operator==(const FX_FONTDESCRIPTOR& left, class CFGAS_FontDescriptor { public: struct Rank { - public: UNOWNED_PTR_EXCLUSION CFGAS_FontDescriptor* font; // POD struct. int32_t penalty;