blob: df37c0b9072863934140d1ca62895ef84ff036d9 [file] [log] [blame]
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/ui.gni")
import("//sky/engine/config.gni")
import("//testing/test.gni")
source_set("platform") {
sources = [
"CalculationValue.h",
"Decimal.cpp",
"Decimal.h",
"FloatConversion.h",
"Language.cpp",
"Language.h",
"LayoutUnit.h",
"Length.cpp",
"Length.h",
"LengthBox.cpp",
"LengthBox.h",
"LengthFunctions.cpp",
"LengthFunctions.h",
"LengthPoint.h",
"LengthSize.h",
"NotImplemented.h",
"Partitions.cpp",
"Partitions.h",
"PlatformExport.h",
"PurgeableVector.cpp",
"PurgeableVector.h",
"SharedBuffer.cpp",
"SharedBuffer.h",
"animation/AnimationUtilities.h",
"animation/AnimationValue.h",
"animation/KeyframeValueList.cpp",
"animation/KeyframeValueList.h",
"animation/TimingFunction.cpp",
"animation/TimingFunction.h",
"animation/UnitBezier.h",
"exported/Platform.cpp",
"exported/sky_settings.cc",
"exported/WebCString.cpp",
"exported/WebCommon.cpp",
"exported/linux/WebFontInfo.cpp",
"exported/linux/WebFontRenderStyle.cpp",
"fonts/AlternateFontFamily.h",
"fonts/Character.cpp",
"fonts/Character.h",
"fonts/CustomFontData.h",
"fonts/FixedPitchFontType.h",
"fonts/Font.cpp",
"fonts/Font.h",
"fonts/FontBaseline.h",
"fonts/FontCache.cpp",
"fonts/FontCache.h",
"fonts/FontCacheClient.h",
"fonts/FontCacheKey.h",
"fonts/FontCustomPlatformData.h",
"fonts/FontData.cpp",
"fonts/FontData.h",
"fonts/FontDataCache.cpp",
"fonts/FontDataCache.h",
"fonts/FontDescription.cpp",
"fonts/FontDescription.h",
"fonts/FontFaceCreationParams.h",
"fonts/FontFallbackList.cpp",
"fonts/FontFallbackList.h",
"fonts/FontFamily.cpp",
"fonts/FontFamily.h",
"fonts/FontFeatureSettings.cpp",
"fonts/FontFeatureSettings.h",
"fonts/FontMetrics.h",
"fonts/FontOrientation.h",
"fonts/FontPlatformData.cpp",
"fonts/FontPlatformData.h",
"fonts/FontPlatformFeatures.h",
"fonts/FontRenderStyle.h",
"fonts/FontSelector.h",
"fonts/FontSmoothingMode.h",
"fonts/FontTraits.h",
"fonts/FontWidthVariant.h",
"fonts/Glyph.h",
"fonts/GlyphBuffer.h",
"fonts/GlyphMetricsMap.h",
"fonts/GlyphPage.h",
"fonts/GlyphPageTreeNode.cpp",
"fonts/GlyphPageTreeNode.h",
"fonts/Latin1TextIterator.h",
"fonts/SegmentedFontData.cpp",
"fonts/SegmentedFontData.h",
"fonts/SimpleFontData.cpp",
"fonts/SimpleFontData.h",
"fonts/TextBlob.h",
"fonts/TextRenderingMode.h",
"fonts/TypesettingFeatures.h",
"fonts/VDMXParser.cpp",
"fonts/VDMXParser.h",
"fonts/WidthCache.h",
"fonts/WidthIterator.cpp",
"fonts/WidthIterator.h",
"fonts/android/FontCacheAndroid.cpp",
"fonts/harfbuzz/FontHarfBuzz.cpp",
"fonts/harfbuzz/HarfBuzzFace.cpp",
"fonts/harfbuzz/HarfBuzzFace.h",
"fonts/harfbuzz/HarfBuzzFaceSkia.cpp",
"fonts/harfbuzz/HarfBuzzShaper.cpp",
"fonts/harfbuzz/HarfBuzzShaper.h",
"fonts/linux/FontCacheLinux.cpp",
"fonts/linux/FontPlatformDataLinux.cpp",
"fonts/opentype/OpenTypeTypes.h",
"fonts/skia/FontCacheSkia.cpp",
"fonts/skia/FontCustomPlatformDataSkia.cpp",
"fonts/skia/FontPlatformDataSkia.cpp",
"fonts/skia/SimpleFontDataSkia.cpp",
"geometry/FloatBox.h",
"geometry/FloatBoxExtent.h",
"geometry/FloatPoint.cpp",
"geometry/FloatPoint.h",
"geometry/FloatPoint3D.cpp",
"geometry/FloatPoint3D.h",
"geometry/FloatQuad.cpp",
"geometry/FloatQuad.h",
"geometry/FloatRect.cpp",
"geometry/FloatRect.h",
"geometry/FloatRoundedRect.cpp",
"geometry/FloatRoundedRect.h",
"geometry/FloatSize.cpp",
"geometry/FloatSize.h",
"geometry/IntPoint.h",
"geometry/IntRect.cpp",
"geometry/IntRect.h",
"geometry/IntRectExtent.h",
"geometry/IntSize.h",
"geometry/IntSizeHash.h",
"geometry/LayoutBoxExtent.cpp",
"geometry/LayoutBoxExtent.h",
"geometry/LayoutPoint.h",
"geometry/LayoutRect.cpp",
"geometry/LayoutRect.h",
"geometry/LayoutSize.h",
"geometry/Region.cpp",
"geometry/Region.h",
"geometry/RoundedRect.cpp",
"geometry/RoundedRect.h",
"geometry/TransformState.cpp",
"geometry/TransformState.h",
"graphics/Color.cpp",
"graphics/Color.h",
"graphics/ColorSpace.cpp",
"graphics/ColorSpace.h",
"graphics/DashArray.h",
"graphics/DrawLooperBuilder.cpp",
"graphics/DrawLooperBuilder.h",
"graphics/FrameData.cpp",
"graphics/FrameData.h",
"graphics/GeneratedImage.cpp",
"graphics/GeneratedImage.h",
"graphics/Gradient.cpp",
"graphics/Gradient.h",
"graphics/GradientGeneratedImage.cpp",
"graphics/GradientGeneratedImage.h",
"graphics/GraphicsContext.cpp",
"graphics/GraphicsContext.h",
"graphics/GraphicsContextState.cpp",
"graphics/GraphicsContextState.h",
"graphics/GraphicsContextStateSaver.h",
"graphics/GraphicsTypes.cpp",
"graphics/GraphicsTypes.h",
"graphics/Image.cpp",
"graphics/Image.h",
"graphics/ImageFilter.cpp",
"graphics/ImageFilter.h",
"graphics/ImageObserver.cpp",
"graphics/ImageObserver.h",
"graphics/ImageOrientation.cpp",
"graphics/ImageOrientation.h",
"graphics/Path.cpp",
"graphics/Path.h",
"graphics/PathTraversalState.cpp",
"graphics/PathTraversalState.h",
"graphics/Pattern.cpp",
"graphics/Pattern.h",
"graphics/RegionTracker.cpp",
"graphics/RegionTracker.h",
"graphics/StrokeData.cpp",
"graphics/StrokeData.h",
"graphics/skia/SkSizeHash.h",
"graphics/skia/SkiaUtils.cpp",
"graphics/skia/SkiaUtils.h",
"heap/Handle.h",
"text/BidiCharacterRun.cpp",
"text/BidiCharacterRun.h",
"text/BidiContext.cpp",
"text/BidiContext.h",
"text/BidiResolver.h",
"text/BidiRunList.h",
"text/BidiTextRun.cpp",
"text/BidiTextRun.h",
"text/DateTimeFormat.cpp",
"text/DateTimeFormat.h",
"text/DecodeEscapeSequences.h",
"text/LineEnding.cpp",
"text/LineEnding.h",
"text/LocaleToScriptMapping.cpp",
"text/LocaleToScriptMapping.h",
"text/NonCJKGlyphOrientation.h",
"text/ParserUtilities.h",
"text/QuotedPrintable.cpp",
"text/QuotedPrintable.h",
"text/SegmentedString.cpp",
"text/SegmentedString.h",
"text/StringTruncator.cpp",
"text/StringTruncator.h",
"text/SuffixTree.h",
"text/SurrogatePairAwareTextIterator.cpp",
"text/SurrogatePairAwareTextIterator.h",
"text/TextBoundaries.cpp",
"text/TextBoundaries.h",
"text/TextBreakIterator.cpp",
"text/TextBreakIterator.h",
"text/TextBreakIteratorICU.cpp",
"text/TextBreakIteratorInternalICU.cpp",
"text/TextBreakIteratorInternalICU.h",
"text/TextCheckerClient.h",
"text/TextChecking.h",
"text/TextDecoration.h",
"text/TextDirection.h",
"text/TextPath.h",
"text/TextRun.cpp",
"text/TextRun.h",
"text/TextRunIterator.h",
"text/TextStream.cpp",
"text/TextStream.h",
"text/UnicodeBidi.h",
"text/UnicodeRange.cpp",
"text/UnicodeRange.h",
"text/UnicodeUtilities.cpp",
"text/UnicodeUtilities.h",
"transforms/AffineTransform.cpp",
"transforms/AffineTransform.h",
"transforms/IdentityTransformOperation.h",
"transforms/InterpolatedTransformOperation.cpp",
"transforms/InterpolatedTransformOperation.h",
"transforms/Matrix3DTransformOperation.cpp",
"transforms/Matrix3DTransformOperation.h",
"transforms/MatrixTransformOperation.cpp",
"transforms/MatrixTransformOperation.h",
"transforms/PerspectiveTransformOperation.cpp",
"transforms/PerspectiveTransformOperation.h",
"transforms/RotateTransformOperation.cpp",
"transforms/RotateTransformOperation.h",
"transforms/ScaleTransformOperation.cpp",
"transforms/ScaleTransformOperation.h",
"transforms/SkewTransformOperation.cpp",
"transforms/SkewTransformOperation.h",
"transforms/TransformOperation.h",
"transforms/TransformOperations.cpp",
"transforms/TransformOperations.h",
"transforms/TransformationMatrix.cpp",
"transforms/TransformationMatrix.h",
"transforms/TranslateTransformOperation.cpp",
"transforms/TranslateTransformOperation.h",
]
if (!is_mac) {
sources += [
"fonts/opentype/OpenTypeVerticalData.cpp",
"fonts/opentype/OpenTypeVerticalData.h",
]
}
if (is_ios || is_mac) {
sources += [ "fonts/apple/FontPlatformDataApple.cpp" ]
}
if (is_ios) {
sources += [ "fonts/apple/FontCacheIOS.mm" ]
}
if (is_mac && !is_ios) {
sources += [ "fonts/apple/FontCacheMac.cpp" ]
}
configs += [
"//sky/engine:config",
"//sky/engine:non_test_config",
]
defines = [
"BLINK_PLATFORM_IMPLEMENTATION=1",
"INSIDE_BLINK",
]
include_dirs = [ "$root_build_dir" ]
deps = [
"//base:base",
"//mojo/application",
"//mojo/environment:chromium",
"//mojo/public/c/system",
"//mojo/public/cpp/bindings",
"//mojo/public/cpp/system",
"//mojo/public/cpp/utility",
"//mojo/services/network/interfaces",
"//skia",
"//sky/engine/wtf",
"//third_party/harfbuzz-ng",
]
forward_dependent_configs_from = [
"//skia",
]
if (is_android) {
# Add in some Linux files also shared with Android.
set_sources_assignment_filter([])
sources += [
"exported/linux/WebFontRenderStyle.cpp",
"fonts/linux/FontPlatformDataLinux.cpp",
]
set_sources_assignment_filter(sources_assignment_filter)
}
if (is_linux) {
direct_dependent_configs = [ "//build/config/linux:fontconfig" ]
}
}
test("platform_unittests") {
output_name = "sky_platform_unittests"
sources = [
"DecimalTest.cpp",
"LayoutUnitTest.cpp",
"PurgeableVectorTest.cpp",
"TestingPlatformSupport.cpp",
"TestingPlatformSupport.h",
"animation/TimingFunctionTest.cpp",
"animation/UnitBezierTest.cpp",
"fonts/FontCacheTest.cpp",
"fonts/FontDescriptionTest.cpp",
"fonts/FontTest.cpp",
"fonts/GlyphPageTreeNodeTest.cpp",
"fonts/android/FontCacheAndroidTest.cpp",
"geometry/FloatBoxTest.cpp",
"geometry/FloatBoxTestHelpers.cpp",
"geometry/FloatRoundedRectTest.cpp",
"geometry/RegionTest.cpp",
"geometry/RoundedRectTest.cpp",
"testing/RunAllTests.cpp",
"text/BidiResolverTest.cpp",
"text/SegmentedStringTest.cpp",
"text/UnicodeUtilitiesTest.cpp",
"transforms/TransformOperationsTest.cpp",
"transforms/TransformationMatrixTest.cpp",
]
configs += [ "//sky/engine:config" ]
deps = [
":platform",
"//base",
"//base/allocator",
"//base/test:test_support",
"//skia",
"//testing/gmock",
"//testing/gtest",
"//sky/engine/wtf",
"//sky/engine/wtf:test_support",
]
# TODO(abarth): This is a lie - this test is not embedded in an environment
# that injects the system thunks, so system calls don't actually work. This
# just tricks the linker into thinking that an implementation of these calls
# will be injected at runtime so the link succeeds.
deps += [ "//mojo/public/platform/native:system" ]
defines = [ "INSIDE_BLINK" ]
include_dirs = [ "$root_build_dir" ]
}