[fuchsia] enable_pdf = true
This change builds PDF-specific code on Fuchsia, but Chrome does not yet support rendering PDF files because that depends on code behind the `BUILDFLAG(ENABLE_PLUGINS)`. This is tracked in crbug.com/1306610. Since `enable_basic_printing` is now enabled on Fuchsia, this change also causes `enable_print_preview` to be true on Fuchsia, though this feature may not work either. Bug: 1273277, 1306610, 1272829 Change-Id: I7843a7c92536822e131603d7565b177372a03c75 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3518625 Auto-Submit: David Dorwin <ddorwin@chromium.org> Reviewed-by: K. Moon <kmoon@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> Cr-Commit-Position: refs/heads/main@{#986196}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
85e244a859
commit
b8ff2faf9f
chrome
fuchsia/engine
pdf
testing/buildbot/filters
@ -17,7 +17,6 @@
|
||||
#include "chrome/test/base/browser_with_test_window_test.h"
|
||||
#include "components/prefs/pref_service.h"
|
||||
#include "components/web_modal/web_contents_modal_dialog_manager.h"
|
||||
#include "content/public/browser/plugin_service.h"
|
||||
#include "content/public/browser/site_instance.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
#include "content/public/browser/web_ui.h"
|
||||
|
@ -2309,17 +2309,26 @@ if (!is_android) {
|
||||
}
|
||||
|
||||
if (enable_pdf) {
|
||||
sources += [
|
||||
"../browser/pdf/pdf_extension_test.cc",
|
||||
"../browser/pdf/pdf_find_request_manager_browsertest.cc",
|
||||
"../browser/plugins/pdf_iframe_navigation_throttle_browsertest.cc",
|
||||
]
|
||||
# Tests in other test .cc files have PDF-related tests depending on these
|
||||
# so always depend on them.
|
||||
deps += [
|
||||
":pdf_extension_test_utils",
|
||||
"//components/pdf/browser",
|
||||
"//pdf:features",
|
||||
"//pdf:internal",
|
||||
]
|
||||
|
||||
# TODO(crbug.com/1306610): Remove this condition and merge the deps once
|
||||
# the tests can be built without PPAPI support.
|
||||
if (enable_plugins) {
|
||||
sources += [
|
||||
"../browser/pdf/pdf_extension_test.cc",
|
||||
"../browser/pdf/pdf_find_request_manager_browsertest.cc",
|
||||
"../browser/plugins/pdf_iframe_navigation_throttle_browsertest.cc",
|
||||
]
|
||||
deps += [
|
||||
"//pdf:features",
|
||||
"//pdf:internal",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
if (safe_browsing_mode != 0) {
|
||||
@ -4203,7 +4212,6 @@ if (!is_android) {
|
||||
sources += [
|
||||
"../browser/printing/pdf_nup_converter_client_browsertest.cc",
|
||||
"../browser/printing/print_browsertest.cc",
|
||||
"../browser/printing/print_preview_dialog_controller_browsertest.cc",
|
||||
"../browser/printing/pwg_raster_converter_browsertest.cc",
|
||||
"../browser/printing/test_print_preview_dialog_cloned_observer.cc",
|
||||
"../browser/printing/test_print_preview_dialog_cloned_observer.h",
|
||||
@ -4212,6 +4220,15 @@ if (!is_android) {
|
||||
"../browser/ui/webui/print_preview/print_preview_ui_browsertest.cc",
|
||||
]
|
||||
deps += [ "//printing:test_support" ]
|
||||
|
||||
if (enable_plugins) {
|
||||
# These tests depends on the PluginService and PluginPrefs.
|
||||
# TODO(crbug.com/1306610): Move back to the list above once they can be
|
||||
# built without PPAPI support.
|
||||
sources += [
|
||||
"../browser/printing/print_preview_dialog_controller_browsertest.cc",
|
||||
]
|
||||
}
|
||||
}
|
||||
if (enable_paint_preview) {
|
||||
sources += [
|
||||
|
@ -166,6 +166,12 @@ component("web_engine_core") {
|
||||
]
|
||||
|
||||
assert_no_deps = [
|
||||
# Although `enable_pdf` is true for Fuchsia, PDF code should not be linked
|
||||
# into WebEngine because it does not have the necessary infrastructure and
|
||||
# this would unnecessarily increase the package size.
|
||||
"//components/pdf/*",
|
||||
"//pdf/*",
|
||||
|
||||
# Pepper code should not be included as plugins are disabled.
|
||||
# Exclude everything except "//ppapi/buildflags/*", which is allowed.
|
||||
"//ppapi:*",
|
||||
|
13
pdf/BUILD.gn
13
pdf/BUILD.gn
@ -5,6 +5,7 @@
|
||||
import("//build/buildflag_header.gni")
|
||||
import("//build/config/features.gni")
|
||||
import("//pdf/features.gni")
|
||||
import("//ppapi/buildflags/buildflags.gni")
|
||||
import("//testing/libfuzzer/fuzzer_test.gni")
|
||||
import("//testing/test.gni")
|
||||
import("//third_party/pdfium/pdfium.gni")
|
||||
@ -64,6 +65,7 @@ if (enable_pdf) {
|
||||
# TODO(crbug.com/1158929): Eliminate chrome_find_request_manager_browsertest.cc's dependence
|
||||
# on document_loader_impl.h.
|
||||
"//chrome/test:browser_tests",
|
||||
"//chrome/test:browser_tests__exec", # Fuchsia variant.
|
||||
]
|
||||
|
||||
sources = [
|
||||
@ -154,6 +156,7 @@ if (enable_pdf) {
|
||||
|
||||
deps = [
|
||||
":accessibility",
|
||||
":buildflags",
|
||||
":features",
|
||||
":ppapi_migration",
|
||||
"//base",
|
||||
@ -162,7 +165,6 @@ if (enable_pdf) {
|
||||
"//components/strings",
|
||||
"//gin",
|
||||
"//net",
|
||||
"//pdf:buildflags",
|
||||
"//printing",
|
||||
"//third_party/blink/public:blink_headers",
|
||||
"//third_party/blink/public/common:headers",
|
||||
@ -211,6 +213,7 @@ if (enable_pdf) {
|
||||
visibility = [
|
||||
":*",
|
||||
"//components:components_browsertests",
|
||||
"//components:components_browsertests__exec", # Fuchsia variant.
|
||||
"//components/pdf/renderer",
|
||||
"//components/pdf/renderer:unit_tests",
|
||||
]
|
||||
@ -261,6 +264,12 @@ if (enable_pdf) {
|
||||
}
|
||||
|
||||
static_library("pdf_view_web_plugin") {
|
||||
# The PDF viewer relies on plugin infrastructure, which is currently tied to
|
||||
# PPAPI support. Fuchsia does not have plugins enabled and is in a state
|
||||
# where this code builds but does not work in Chrome.
|
||||
# TODO(crbug.com/1306610): Remove this assert when this is no longer true.
|
||||
assert(enable_plugins || is_fuchsia)
|
||||
|
||||
visibility = [
|
||||
":*",
|
||||
"//components/pdf/renderer",
|
||||
@ -383,6 +392,7 @@ if (enable_pdf) {
|
||||
deps = [
|
||||
":accessibility",
|
||||
":assert_enums",
|
||||
":buildflags",
|
||||
":features",
|
||||
":internal",
|
||||
":pdf",
|
||||
@ -396,7 +406,6 @@ if (enable_pdf) {
|
||||
"//gin",
|
||||
"//mojo/core/embedder",
|
||||
"//mojo/public/cpp/bindings",
|
||||
"//pdf:buildflags",
|
||||
"//printing",
|
||||
"//skia",
|
||||
"//testing/gmock",
|
||||
|
@ -17,9 +17,5 @@ declare_args() {
|
||||
# feature is enabled for the PDF viewer.
|
||||
enable_ink = enable_cros_media_app
|
||||
|
||||
# TODO(crbug.com/702993): Currently disabled on Fuchsia because the PDF Viewer
|
||||
# currently depends on PPAPI. It does not make sense to port PPAPI, which is
|
||||
# being deprecated, to Fuchsia. Once the PDF Viewer no longer uses PPAPI, the
|
||||
# PDF Viewer should be enabled on Fuchsia, like on other desktop platforms.
|
||||
enable_pdf = !is_android && !is_ios && !is_chromecast && !is_fuchsia
|
||||
enable_pdf = !is_android && !is_ios && !is_chromecast
|
||||
}
|
||||
|
@ -563,3 +563,36 @@
|
||||
-WorkerDevToolsTest.PauseInSharedWorkerInitialization
|
||||
-ZoomBubbleDialogTest.InvokeUi_default
|
||||
-ZoomControllerBrowserTest.RestoredPageScaleFromNavigation
|
||||
|
||||
# TODO(crbug.com/1306610): Remove this condition and merge the deps once PDF
|
||||
# rendering no longer requires PPAPI support.
|
||||
-All/PrintBackendPrintBrowserTest.UpdatePrintSettings/0
|
||||
-All/PrintBackendPrintBrowserTest.UpdatePrintSettings/1
|
||||
-BackForwardCachePrintBrowserTest.DisableCaching
|
||||
-PdfPluginContextMenuBrowserTest.FullPagePdfFullscreenItems
|
||||
-PdfPluginContextMenuBrowserTest.FullPagePdfHasPageItems
|
||||
-PdfPluginContextMenuBrowserTest.IframedPdfHasNoPageItems
|
||||
-PdfPluginContextMenuBrowserTest.Rotate
|
||||
-PdfToPwgRasterBrowserTest.Test*
|
||||
-PortalBrowserTest.PdfViewerLoadsInPortal
|
||||
-PrintBackendPrintBrowserTestService.Start*
|
||||
-PrintBrowserTest.LazyLoadedIframeFetched
|
||||
-PrintBrowserTest.LazyLoadedImagesFetched
|
||||
-PrintBrowserTest.LegacyLayoutEngineFallback
|
||||
-PrintBrowserTest.MultipagePrint
|
||||
-PrintBrowserTest.NoScrollingVerticalRl
|
||||
-PrintBrowserTest.PDFPluginNotKeyboardFocusable
|
||||
-PrintBrowserTest.PrintNup
|
||||
-PrintBrowserTest.ResetPageScaleAfterPrintPreview
|
||||
-PrintBrowserTest.SelectionContainsIframe
|
||||
-PrintBrowserTest.WindowDotPrint
|
||||
-PrintExtensionBrowserTest.PrintOptionPage
|
||||
-PrintPreviewDestinationDialogTest.PrinterList
|
||||
-PrintPreviewDestinationDialogTest.UserAccounts
|
||||
-SitePerProcessPrintBrowserTest.BasicPrint
|
||||
-SitePerProcessPrintBrowserTest.PrintNup
|
||||
-SitePerProcessPrintBrowserTest.SubframeUnavailableBeforePrint
|
||||
-SitePerProcessPrintBrowserTest.SubframeUnavailableDuringPrint
|
||||
-SitePerProcessPrintExtensionBrowserTest.PrintOptionPage
|
||||
-WebViewPdfTest.ContextMenuNavigationInMimeHandlerView
|
||||
-WebViewPdfTest.Shim_TestDialogInPdf
|
||||
|
Reference in New Issue
Block a user