diff options
-rw-r--r-- | .gn | 2 | ||||
-rw-r--r-- | core/fxge/cfx_color.h | 14 | ||||
-rw-r--r-- | fpdfsdk/BUILD.gn | 1 | ||||
-rw-r--r-- | fpdfsdk/fpdfxfa/BUILD.gn | 1 | ||||
-rw-r--r-- | fpdfsdk/pwl/cpwl_wnd.h | 14 | ||||
-rw-r--r-- | fxjs/BUILD.gn | 6 | ||||
-rw-r--r-- | fxjs/cjs_color.cpp | 1 | ||||
-rw-r--r-- | fxjs/cjs_color.h | 1 | ||||
-rw-r--r-- | fxjs/cjs_field.cpp | 1 | ||||
-rw-r--r-- | fxjs/cjs_publicmethods.cpp | 2 | ||||
-rw-r--r-- | fxjs/cjs_runtime.cpp | 1 | ||||
-rw-r--r-- | fxjs/ijs_runtime.cpp | 1 | ||||
-rw-r--r-- | xfa/fxfa/BUILD.gn | 1 | ||||
-rw-r--r-- | xfa/fxfa/parser/BUILD.gn | 5 |
14 files changed, 32 insertions, 19 deletions
@@ -20,6 +20,7 @@ check_targets = [ "//core/fxcrt/*", "//fpdfsdk/*", "//fxbarcode/*", + "//fxjs/*", "//samples/*", "//testing/:*", "//testing/fuzzers/*", @@ -28,5 +29,4 @@ check_targets = [ # TODO(thestig): Work on these. #"//core/*", - #"//fxjs/*", ] diff --git a/core/fxge/cfx_color.h b/core/fxge/cfx_color.h index aaa533cacb..d6fabad989 100644 --- a/core/fxge/cfx_color.h +++ b/core/fxge/cfx_color.h @@ -61,4 +61,18 @@ struct CFX_Color { float fColor4; }; +inline bool operator==(const CFX_Color& c1, const CFX_Color& c2) { + return c1.nColorType == c2.nColorType && c1.fColor1 - c2.fColor1 < 0.0001 && + c1.fColor1 - c2.fColor1 > -0.0001 && + c1.fColor2 - c2.fColor2 < 0.0001 && + c1.fColor2 - c2.fColor2 > -0.0001 && + c1.fColor3 - c2.fColor3 < 0.0001 && + c1.fColor3 - c2.fColor3 > -0.0001 && + c1.fColor4 - c2.fColor4 < 0.0001 && c1.fColor4 - c2.fColor4 > -0.0001; +} + +inline bool operator!=(const CFX_Color& c1, const CFX_Color& c2) { + return !(c1 == c2); +} + #endif // CORE_FXGE_CFX_COLOR_H_ diff --git a/fpdfsdk/BUILD.gn b/fpdfsdk/BUILD.gn index cf1fdbf85b..0a696d3b71 100644 --- a/fpdfsdk/BUILD.gn +++ b/fpdfsdk/BUILD.gn @@ -63,6 +63,7 @@ jumbo_source_set("fpdfsdk") { "pwl", ] allow_circular_includes_from = [ + "../fxjs", "formfiller", "pwl", ] diff --git a/fpdfsdk/fpdfxfa/BUILD.gn b/fpdfsdk/fpdfxfa/BUILD.gn index baa615db46..a1c6170826 100644 --- a/fpdfsdk/fpdfxfa/BUILD.gn +++ b/fpdfsdk/fpdfxfa/BUILD.gn @@ -28,6 +28,7 @@ jumbo_source_set("fpdfxfa") { "../../xfa/fxfa", "../../xfa/fxfa/parser", ] + allow_circular_includes_from = [ "../../fxjs" ] configs += [ "../../:pdfium_core_config" ] visibility = [ "../../*" ] } diff --git a/fpdfsdk/pwl/cpwl_wnd.h b/fpdfsdk/pwl/cpwl_wnd.h index cc6662be30..93938db648 100644 --- a/fpdfsdk/pwl/cpwl_wnd.h +++ b/fpdfsdk/pwl/cpwl_wnd.h @@ -78,20 +78,6 @@ struct CPWL_Dash { int32_t nPhase; }; -inline bool operator==(const CFX_Color& c1, const CFX_Color& c2) { - return c1.nColorType == c2.nColorType && c1.fColor1 - c2.fColor1 < 0.0001 && - c1.fColor1 - c2.fColor1 > -0.0001 && - c1.fColor2 - c2.fColor2 < 0.0001 && - c1.fColor2 - c2.fColor2 > -0.0001 && - c1.fColor3 - c2.fColor3 < 0.0001 && - c1.fColor3 - c2.fColor3 > -0.0001 && - c1.fColor4 - c2.fColor4 < 0.0001 && c1.fColor4 - c2.fColor4 > -0.0001; -} - -inline bool operator!=(const CFX_Color& c1, const CFX_Color& c2) { - return !(c1 == c2); -} - #define PWL_SCROLLBAR_WIDTH 12.0f #define PWL_SCROLLBAR_TRANSPARENCY 150 #define PWL_DEFAULT_BLACKCOLOR CFX_Color(CFX_Color::kGray, 0) diff --git a/fxjs/BUILD.gn b/fxjs/BUILD.gn index a197d78f13..673386becb 100644 --- a/fxjs/BUILD.gn +++ b/fxjs/BUILD.gn @@ -104,6 +104,12 @@ jumbo_source_set("fxjs") { "jse_define.h", ] deps += [ + "../core/fdrm", + "../core/fpdfapi/font", + "../core/fpdfapi/page", + "../core/fpdfapi/parser", + "../core/fpdfdoc", + "../core/fxge", "//v8", "//v8:v8_libplatform", ] diff --git a/fxjs/cjs_color.cpp b/fxjs/cjs_color.cpp index 06c61f87d4..7ce5c2937c 100644 --- a/fxjs/cjs_color.cpp +++ b/fxjs/cjs_color.cpp @@ -8,6 +8,7 @@ #include <vector> +#include "core/fxge/cfx_color.h" #include "fxjs/cjs_event_context.h" #include "fxjs/cjs_eventhandler.h" #include "fxjs/cjs_object.h" diff --git a/fxjs/cjs_color.h b/fxjs/cjs_color.h index b1bd211395..4e28166cd2 100644 --- a/fxjs/cjs_color.h +++ b/fxjs/cjs_color.h @@ -9,7 +9,6 @@ #include <vector> -#include "fpdfsdk/pwl/cpwl_wnd.h" #include "fxjs/js_define.h" class CJS_Color final : public CJS_Object { diff --git a/fxjs/cjs_field.cpp b/fxjs/cjs_field.cpp index 35e2bb51b0..a7366264a5 100644 --- a/fxjs/cjs_field.cpp +++ b/fxjs/cjs_field.cpp @@ -11,6 +11,7 @@ #include <utility> #include "core/fpdfapi/font/cpdf_font.h" +#include "core/fpdfdoc/cpdf_formcontrol.h" #include "core/fpdfdoc/cpdf_formfield.h" #include "core/fpdfdoc/cpdf_interactiveform.h" #include "fpdfsdk/cpdfsdk_interactiveform.h" diff --git a/fxjs/cjs_publicmethods.cpp b/fxjs/cjs_publicmethods.cpp index 2e0603c982..fb65cc4098 100644 --- a/fxjs/cjs_publicmethods.cpp +++ b/fxjs/cjs_publicmethods.cpp @@ -17,8 +17,10 @@ #include <utility> #include <vector> +#include "core/fpdfdoc/cpdf_formcontrol.h" #include "core/fpdfdoc/cpdf_interactiveform.h" #include "core/fxcrt/fx_extension.h" +#include "core/fxge/cfx_color.h" #include "fpdfsdk/cpdfsdk_formfillenvironment.h" #include "fpdfsdk/cpdfsdk_interactiveform.h" #include "fxjs/cjs_color.h" diff --git a/fxjs/cjs_runtime.cpp b/fxjs/cjs_runtime.cpp index 539594cd90..3bc8448435 100644 --- a/fxjs/cjs_runtime.cpp +++ b/fxjs/cjs_runtime.cpp @@ -39,7 +39,6 @@ #include "fxjs/cjs_util.h" #include "fxjs/cjs_zoomtype.h" #include "fxjs/js_define.h" -#include "public/fpdf_formfill.h" #include "third_party/base/ptr_util.h" #ifdef PDF_ENABLE_XFA diff --git a/fxjs/ijs_runtime.cpp b/fxjs/ijs_runtime.cpp index 50abd39c8b..34a846e9e3 100644 --- a/fxjs/ijs_runtime.cpp +++ b/fxjs/ijs_runtime.cpp @@ -4,7 +4,6 @@ #include "fxjs/ijs_runtime.h" -#include "fpdfsdk/cpdfsdk_helpers.h" #include "fxjs/cjs_runtimestub.h" #include "third_party/base/ptr_util.h" diff --git a/xfa/fxfa/BUILD.gn b/xfa/fxfa/BUILD.gn index e87d772006..d6417b73c7 100644 --- a/xfa/fxfa/BUILD.gn +++ b/xfa/fxfa/BUILD.gn @@ -117,6 +117,7 @@ jumbo_source_set("fxfa") { "parser", ] allow_circular_includes_from = [ + "../../fxjs", "../fgas", "../fwl", "parser", diff --git a/xfa/fxfa/parser/BUILD.gn b/xfa/fxfa/parser/BUILD.gn index e65428e9e6..bd7446db7c 100644 --- a/xfa/fxfa/parser/BUILD.gn +++ b/xfa/fxfa/parser/BUILD.gn @@ -709,7 +709,10 @@ jumbo_source_set("parser") { "../../fgas", "../../fxgraphics", ] - allow_circular_includes_from = [ "../../fgas" ] + allow_circular_includes_from = [ + "../../fgas", + "../../../fxjs", + ] configs += [ "../../../:pdfium_core_config", "../../:xfa_warnings", |