chromium: 63.0.3239.132 -> 64.0.3282.119

This commit is contained in:
Danny Rawlins 2018-01-30 13:08:22 +11:00
parent aa7183c928
commit d19a561dfa
13 changed files with 830 additions and 81 deletions

View File

@ -124,6 +124,8 @@ drwxr-xr-x root/root usr/lib/chromium/resources/inspector/coverage/
-rw-r--r-- root/root usr/lib/chromium/resources/inspector/coverage/coverage_module.js
drwxr-xr-x root/root usr/lib/chromium/resources/inspector/coverage_test_runner/
-rw-r--r-- root/root usr/lib/chromium/resources/inspector/coverage_test_runner/coverage_test_runner_module.js
drwxr-xr-x root/root usr/lib/chromium/resources/inspector/cpu_profiler_test_runner/
-rw-r--r-- root/root usr/lib/chromium/resources/inspector/cpu_profiler_test_runner/cpu_profiler_test_runner_module.js
drwxr-xr-x root/root usr/lib/chromium/resources/inspector/data_grid/
-rw-r--r-- root/root usr/lib/chromium/resources/inspector/data_grid/data_grid_module.js
drwxr-xr-x root/root usr/lib/chromium/resources/inspector/data_grid_test_runner/
@ -185,10 +187,10 @@ drwxr-xr-x root/root usr/lib/chromium/resources/inspector/extensions_test_runner
drwxr-xr-x root/root usr/lib/chromium/resources/inspector/formatter/
-rw-r--r-- root/root usr/lib/chromium/resources/inspector/formatter/formatter_module.js
-rw-r--r-- root/root usr/lib/chromium/resources/inspector/formatter_worker.js
drwxr-xr-x root/root usr/lib/chromium/resources/inspector/gonzales/
-rw-r--r-- root/root usr/lib/chromium/resources/inspector/gonzales/gonzales_module.js
drwxr-xr-x root/root usr/lib/chromium/resources/inspector/har_importer/
-rw-r--r-- root/root usr/lib/chromium/resources/inspector/har_importer/har_importer_module.js
drwxr-xr-x root/root usr/lib/chromium/resources/inspector/heap_profiler_test_runner/
-rw-r--r-- root/root usr/lib/chromium/resources/inspector/heap_profiler_test_runner/heap_profiler_test_runner_module.js
drwxr-xr-x root/root usr/lib/chromium/resources/inspector/heap_snapshot_model/
-rw-r--r-- root/root usr/lib/chromium/resources/inspector/heap_snapshot_model/heap_snapshot_model_module.js
-rw-r--r-- root/root usr/lib/chromium/resources/inspector/heap_snapshot_worker.js
@ -222,16 +224,10 @@ drwxr-xr-x root/root usr/lib/chromium/resources/inspector/product_registry_impl/
-rw-r--r-- root/root usr/lib/chromium/resources/inspector/product_registry_impl/product_registry_impl_module.js
drwxr-xr-x root/root usr/lib/chromium/resources/inspector/profiler/
-rw-r--r-- root/root usr/lib/chromium/resources/inspector/profiler/profiler_module.js
drwxr-xr-x root/root usr/lib/chromium/resources/inspector/profiler_test_runner/
-rw-r--r-- root/root usr/lib/chromium/resources/inspector/profiler_test_runner/profiler_test_runner_module.js
drwxr-xr-x root/root usr/lib/chromium/resources/inspector/quick_open/
-rw-r--r-- root/root usr/lib/chromium/resources/inspector/quick_open/quick_open_module.js
drwxr-xr-x root/root usr/lib/chromium/resources/inspector/resources/
-rw-r--r-- root/root usr/lib/chromium/resources/inspector/resources/resources_module.js
drwxr-xr-x root/root usr/lib/chromium/resources/inspector/sass/
-rw-r--r-- root/root usr/lib/chromium/resources/inspector/sass/sass_module.js
drwxr-xr-x root/root usr/lib/chromium/resources/inspector/sass_test_runner/
-rw-r--r-- root/root usr/lib/chromium/resources/inspector/sass_test_runner/sass_test_runner_module.js
drwxr-xr-x root/root usr/lib/chromium/resources/inspector/screencast/
-rw-r--r-- root/root usr/lib/chromium/resources/inspector/screencast/screencast_module.js
drwxr-xr-x root/root usr/lib/chromium/resources/inspector/sdk_test_runner/

View File

@ -1,6 +1,11 @@
c339707e894fbc721b612bd061d1a36d chromium-63.0.3239.132.tar.xz
e2edf460318c9227ec4726440d8731ca chromium-clang-r1.patch
5f413e9d719b2f0f7ab12e951eb3a7f9 chromium-exclude_unwind_tables.patch
60b6e9c55e584db6872c1349a6630572 chromium-webrtc-r0.patch
d144ace1ee63acdf7dd149b013c83088 chromium-64.0.3282.119-constexpr-1.patch
5b72bcaba2ad920c524cd92a7a6125fe chromium-64.0.3282.119.tar.xz
27dbd1479d469346d1ffe27c7e7c0011 chromium-clang-r2.patch
21f73763be6c44ce3df0f1cbbfbff440 chromium-cups-r0.patch
3e30a8e6629c931a640d65d4ab02b939 chromium-exclude_unwind_tables.patch
cb40c4153943f9eb5e38e90ba2f8b382 chromium-memcpy-r0.patch
e42a8b91ea55b4765b9b2b9e2437a9d0 chromium-omnibox-unescape-fragment.patch
254061cb349cff714230b7cca83b0a4c chromium-skia-harmony.patch
40ff364c3a581e5f7ec4a84d785ab6a4 chromium-use-fromUTF8-for-UnicodeString-construction.patch
64968626706b07721983ac59fb3babbf chromium.sh
3354997dd0bfde3443499133a6e16a85 last-commit-position.patch

View File

@ -1,10 +1,15 @@
untrusted comment: verify with /etc/ports/opt.pub
RWSE3ohX2g5d/emoLECWTZB8g1DZVyOgH+j/ine99NMNUc/4lofRnWNOZNrwEYDZYwtLdQv0JZ5Nfq5UjpNOisa6KsDY4QUcyA8=
SHA256 (Pkgfile) = c68d2bbdd6f6d37e1012880c289ed2a88c0c5c34b6230b8c39bb3ea1a87f2e3e
SHA256 (.footprint) = 7886836592cc13787d9f1ea173d9e22c7e0e12e1ebe65632311279c86ced91b0
SHA256 (chromium-63.0.3239.132.tar.xz) = 84c46c2c42faaa102abe0647ee1213615a2522627124924c2741ddc2161b3d8d
RWSE3ohX2g5d/eMT5dMXGD/Cjir9qaOlX5vQrQjKugSDAZj9lj9orWVCuFEq4PqVk+EpjkiBaPE/Jaf/7fON+UzzsKTplp3ZRgs=
SHA256 (Pkgfile) = 1344a0a071676087345b642c05f74dfbd35ec97280bd74939a8c06b0b15c9538
SHA256 (.footprint) = e1e6cdeeb1dc4e10e1b0f3e743f69fae1c35e4db1f455cd9e65e5bf0387d9d7e
SHA256 (chromium-64.0.3282.119.tar.xz) = 342ea80a925d85f5155b2b423a0d3cbcf2ee5729bf107c601d7d902315d03127
SHA256 (last-commit-position.patch) = d3dc397956a26ec045e76c25c57a1fac5fc0acff94306b2a670daee7ba15709e
SHA256 (chromium.sh) = 7b182d0ae1e9ef841f8cd0b403a304babd548bf60b5e3808b2144bebdbb7c154
SHA256 (chromium-exclude_unwind_tables.patch) = e53dc6f259acd39df13874f8a0f440528fae764b859dd71447991a5b1fac7c9c
SHA256 (chromium-clang-r1.patch) = ab5368a3e3a67fa63b33fefc6788ad5b4a79089ef4db1011a14c3bee9fdf70c6
SHA256 (chromium-webrtc-r0.patch) = bcb2f4588cf5dcf75cde855c7431e94fdcc34bdd68b876a90f65ab9938594562
SHA256 (chromium-64.0.3282.119-constexpr-1.patch) = 9982464badc03879c5f73ed18a719661f00aad51da078bae032293e656bfaf6d
SHA256 (chromium-exclude_unwind_tables.patch) = 9478f1ec1a3c53425306cf41c2d0555c215a4f106955d9d6adfff38044530ce8
SHA256 (chromium-use-fromUTF8-for-UnicodeString-construction.patch) = c82c830bac7ab328a76d85fb141e150a17d02d97138a6daa4720a8a8c371a402
SHA256 (chromium-omnibox-unescape-fragment.patch) = 814eb2cecb10cb697e24036b08aac41e88d0e38971741f9e946200764e2401ae
SHA256 (chromium-skia-harmony.patch) = feca54ab09ac0fc9d0626770a6b899a6ac5a12173c7d0c1005bc3964ec83e7b3
SHA256 (chromium-memcpy-r0.patch) = 455f0029987d9f0532bd9a5250669af5146a9c2b65b776d4a6e2499e8aca7bb4
SHA256 (chromium-clang-r2.patch) = 4495e8b29dae242c79ffe4beefc5171eb3c7aacb7e9aebfd2d4d69b9d8c958d3
SHA256 (chromium-cups-r0.patch) = 34cfc58664c67901f498dcff5e0d27edfb821bf1472c224981880903a0a3d243

View File

@ -4,13 +4,18 @@
# Depends on: dbus-glib gperf gtk gtk3 libevent libexif libgcrypt ninja nodejs nss pciutils speech-dispatcher xorg-libxscrnsaver xorg-libxt yasm
name=chromium
version=63.0.3239.132
version=64.0.3282.119
release=1
source=(https://commondatastorage.googleapis.com/$name-browser-official/$name-$version.tar.xz
last-commit-position.patch $name.sh
chromium-64.0.3282.119-constexpr-1.patch
chromium-exclude_unwind_tables.patch
chromium-clang-r1.patch
chromium-webrtc-r0.patch)
chromium-use-fromUTF8-for-UnicodeString-construction.patch
chromium-omnibox-unescape-fragment.patch
chromium-skia-harmony.patch
chromium-memcpy-r0.patch
chromium-clang-r2.patch
chromium-cups-r0.patch)
build() {
cd $name-$version
@ -26,12 +31,35 @@ build() {
# we don't use git sources
patch -p1 -i $SRC/last-commit-position.patch
# https://chromium-review.googlesource.com/c/chromium/src/+/71257
# Corrects error call to non-constexpr function
patch -p1 -i $SRC/chromium-64.0.3282.119-constexpr-1.patch
wget https://chromium.googlesource.com/chromium/src.git/+/$version?format=TEXT -O ../chromium-$version.txt
# https://crbug.com/710701
local _chrome_build_hash=$(base64 -d ../chromium-$version.txt |
grep -Po '^parent \K[0-9a-f]{40}$')
if [[ -z $_chrome_build_hash ]]; then
error "Unable to find Chrome build hash."
return 1
fi
echo "LASTCHANGE=$_chrome_build_hash-" >build/util/LASTCHANGE
# https://chromium-review.googlesource.com/c/chromium/src/+/712575
patch -p1 -i $SRC/chromium-exclude_unwind_tables.patch
# https://crbug.com/772655
patch -p1 -i $SRC/chromium-use-fromUTF8-for-UnicodeString-construction.patch
# https://crbug.com/789163
patch -p1 -i $SRC/chromium-omnibox-unescape-fragment.patch
# https://crbug.com/skia/6663#c10
patch -p4 -i $SRC/chromium-skia-harmony.patch
# Fixes from Gentoo
patch -p1 -i $SRC/chromium-clang-r1.patch
patch -p1 -i $SRC/chromium-webrtc-r0.patch
patch -p1 -i $SRC/chromium-memcpy-r0.patch
patch -p1 -i $SRC/chromium-clang-r2.patch
patch -p1 -i $SRC/chromium-cups-r0.patch
mkdir -p third_party/node/linux/node-linux-x64/bin
ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/

View File

@ -0,0 +1,98 @@
Submitted By: DJ Lucas <dj_AT_linuxfromscratch_DOT_org>
Date: 2018-01-28
Initial Package Version: 64.0.3282.119
Upstream Status: Committed
Origin: Upstream
Description: Corrects error call to non-constexpr function
From 030017a4855c7b6e7f2ff8d9566c146f31eb301b Mon Sep 17 00:00:00 2001
From: Kai Ninomiya <kainino@chromium.org>
Date: Wed, 06 Dec 2017 14:06:53 -0800
Subject: [PATCH] Mark StaticType related functions as constexpr
Fixes compilation on some versions of GCC and probably Clang.
Follow-up to http://crrev.com/c/786317
Bug: angleproject:1432
Change-Id: I3fc3ad0f65492f9543eb27fcdce6ca29a9ad06e5
Reviewed-on: https://chromium-review.googlesource.com/812220
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
---
diff --git a/third_party/angle/src/compiler/translator/StaticType.h b/third_party/angle/src/compiler/translator/StaticType.h
index e26e5ff..30b391a 100644
--- a/third_party/angle/src/compiler/translator/StaticType.h
+++ b/third_party/angle/src/compiler/translator/StaticType.h
@@ -160,7 +160,7 @@
TPrecision precision,
TQualifier qualifier,
unsigned char secondarySize>
-const TType *GetForVecMatHelper(unsigned char primarySize)
+constexpr const TType *GetForVecMatHelper(unsigned char primarySize)
{
static_assert(basicType == EbtFloat || basicType == EbtInt || basicType == EbtUInt ||
basicType == EbtBool,
@@ -186,7 +186,7 @@
template <TBasicType basicType,
TPrecision precision = EbpUndefined,
TQualifier qualifier = EvqGlobal>
-const TType *GetForVecMat(unsigned char primarySize, unsigned char secondarySize = 1)
+constexpr const TType *GetForVecMat(unsigned char primarySize, unsigned char secondarySize = 1)
{
static_assert(basicType == EbtFloat || basicType == EbtInt || basicType == EbtUInt ||
basicType == EbtBool,
@@ -208,7 +208,7 @@
}
template <TBasicType basicType, TPrecision precision = EbpUndefined>
-const TType *GetForVec(TQualifier qualifier, unsigned char size)
+constexpr const TType *GetForVec(TQualifier qualifier, unsigned char size)
{
switch (qualifier)
{
diff --git a/third_party/angle/src/compiler/translator/SymbolTable.cpp b/third_party/angle/src/compiler/translator/SymbolTable.cpp
index adf1e4e..90d4c15 100644
--- a/third_party/angle/src/compiler/translator/SymbolTable.cpp
+++ b/third_party/angle/src/compiler/translator/SymbolTable.cpp
@@ -236,7 +236,7 @@
pop();
}
-bool IsGenType(const TType *type)
+constexpr bool IsGenType(const TType *type)
{
if (type)
{
@@ -248,7 +248,7 @@
return false;
}
-bool IsVecType(const TType *type)
+constexpr bool IsVecType(const TType *type)
{
if (type)
{
diff --git a/third_party/angle/src/compiler/translator/Types.h b/third_party/angle/src/compiler/translator/Types.h
index 04f46f1..a54d447 100644
--- a/third_party/angle/src/compiler/translator/Types.h
+++ b/third_party/angle/src/compiler/translator/Types.h
@@ -142,13 +142,13 @@
{
}
- TBasicType getBasicType() const { return type; }
+ constexpr TBasicType getBasicType() const { return type; }
void setBasicType(TBasicType t);
TPrecision getPrecision() const { return precision; }
void setPrecision(TPrecision p) { precision = p; }
- TQualifier getQualifier() const { return qualifier; }
+ constexpr TQualifier getQualifier() const { return qualifier; }
void setQualifier(TQualifier q) { qualifier = q; }
bool isInvariant() const { return invariant; }

View File

@ -1,6 +1,6 @@
--- a/build/config/compiler/BUILD.gn.orig 2017-10-04 08:50:15.014675936 +0000
+++ b/build/config/compiler/BUILD.gn 2017-10-04 08:50:32.831024327 +0000
@@ -429,18 +429,6 @@
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -422,18 +422,6 @@
cflags += [ "-fcolor-diagnostics" ]
}
@ -12,7 +12,7 @@
- "-Xclang",
- "-mllvm",
- "-Xclang",
- "-instcombine-lower-dbg-declare=1",
- "-instcombine-lower-dbg-declare=0",
- ]
- }
-

View File

@ -0,0 +1,45 @@
From 3cf91d8d674a496d533aa106723a632b68ab26ba Mon Sep 17 00:00:00 2001
From: Tom Anderson <thomasanderson@chromium.org>
Date: Tue, 12 Dec 2017 23:31:56 +0000
Subject: [PATCH] Fix use_cups=false build
BUG=793801
R=thestig@chromium.org
Change-Id: I60ee6ec48d2686d0b42ca25311a9b76009ce9768
Reviewed-on: https://chromium-review.googlesource.com/823245
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523602}
---
chrome/service/cloud_print/print_system.cc | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/chrome/service/cloud_print/print_system.cc b/chrome/service/cloud_print/print_system.cc
index ac94c804f9..4ceba96919 100644
--- a/chrome/service/cloud_print/print_system.cc
+++ b/chrome/service/cloud_print/print_system.cc
@@ -5,6 +5,7 @@
#include "chrome/service/cloud_print/print_system.h"
#include "base/guid.h"
+#include "build/build_config.h"
namespace cloud_print {
@@ -35,5 +36,11 @@ std::string PrintSystem::GenerateProxyId() {
return base::GenerateGUID();
}
-} // namespace cloud_print
+#if defined(OS_LINUX) && !defined(USE_CUPS)
+scoped_refptr<PrintSystem> PrintSystem::CreateInstance(
+ const base::DictionaryValue*) {
+ return nullptr;
+}
+#endif
+} // namespace cloud_print
--
2.15.1

View File

@ -1,21 +1,8 @@
From 1fc37227522ccd314f82ec893ed15c6129296604 Mon Sep 17 00:00:00 2001
From: Paul Jensen <pauljensen@chromium.org>
Date: Wed, 11 Oct 2017 08:37:34 -0400
Subject: [PATCH] Move exclude_unwind_tables back into declare_args
There is desire to adjust this flag manually.
BUG=762629
R=thakis@chromium.org
Change-Id: I3bd134c19270cd1f729b3ea078674e734493d4ab
---
diff --git a/build/config/compiler/compiler.gni b/build/config/compiler/compiler.gni
index ad40fd9..50e19a4 100644
--- a/build/config/compiler/compiler.gni
+++ b/build/config/compiler/compiler.gni
@@ -68,18 +68,18 @@
@@ -68,19 +68,19 @@
# Whether or not we should use position independent code.
use_pic = true
@ -25,8 +12,9 @@ index ad40fd9..50e19a4 100644
+ # server. For unofficial (e.g. development) builds and non-Chrome branded
+ # (e.g. Cronet which doesn't use Crashpad, crbug.com/479283) builds it's
+ # useful to be able to unwind at runtime.
+ exclude_unwind_tables = (is_chrome_branded && is_official_build) ||
+ (is_chromecast && !is_cast_desktop_build && !is_debug)
+ exclude_unwind_tables =
+ (is_chrome_branded && is_official_build) ||
+ (is_chromecast && !is_cast_desktop_build && !is_debug && !is_fuchsia)
}
assert(!is_cfi || use_thin_lto, "CFI requires ThinLTO")
@ -36,8 +24,9 @@ index ad40fd9..50e19a4 100644
-# For unofficial (e.g. development) builds and non-Chrome branded (e.g. Cronet
-# which doesn't use Crashpad, crbug.com/479283) builds it's useful to be able
-# to unwind at runtime.
-exclude_unwind_tables = (is_chrome_branded && is_official_build) ||
- (is_chromecast && !is_cast_desktop_build && !is_debug)
-exclude_unwind_tables =
- (is_chrome_branded && is_official_build) ||
- (is_chromecast && !is_cast_desktop_build && !is_debug && !is_fuchsia)
-
# If true, optimize for size. Does not affect windows builds.
# Linux & Mac favor speed over size.

View File

@ -0,0 +1,35 @@
From 4942f56ceb6d60d6f54ebca8e6eba8ba01c278e8 Mon Sep 17 00:00:00 2001
From: Tomas Popela <tomas.popela@gmail.com>
Date: Thu, 7 Dec 2017 22:33:34 +0000
Subject: [PATCH] memcpy used without including string.h
Compiling Chromium with Clang 4.0.1 and using libstdc++ will fail on using
memcpy without including string.h.
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: Idced1d5de3baf6b520d4a2d61774120642ead1a8
Reviewed-on: https://chromium-review.googlesource.com/813737
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
Reviewed-by: vmpstr <vmpstr@chromium.org>
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#522579}
---
cc/paint/raw_memory_transfer_cache_entry.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/cc/paint/raw_memory_transfer_cache_entry.cc b/cc/paint/raw_memory_transfer_cache_entry.cc
index 9e4660c685ee..95ad50b1a338 100644
--- a/cc/paint/raw_memory_transfer_cache_entry.cc
+++ b/cc/paint/raw_memory_transfer_cache_entry.cc
@@ -4,6 +4,8 @@
#include "cc/paint/raw_memory_transfer_cache_entry.h"
+#include <string.h>
+
namespace cc {
ClientRawMemoryTransferCacheEntry::ClientRawMemoryTransferCacheEntry(
--
2.15.1

View File

@ -0,0 +1,437 @@
commit 03f9a90d8a783f9d1a94935ac298338a1e694380
Author: Eric Lawrence <elawrence@chromium.org>
Date: Sat Dec 16 04:48:11 2017 +0000
Reland of 'Unescape fragment for display in Omnibox'
The original landing broke EGTests for iOS Simulator and Device which
were not run by the CQ. This change includes updated EGTests.
TBR=pkasting@chromium.org
Bug: 789163, 643458
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: Ie30afcb7bcba5affc7266d72a10b7f8dc0074314
Reviewed-on: https://chromium-review.googlesource.com/830093
Reviewed-by: Eric Lawrence <elawrence@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Eugene But <eugenebut@chromium.org>
Commit-Queue: Eric Lawrence <elawrence@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524591}
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc
index 6e5dff47f7ec..24f1056d49d5 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views_browsertest.cc
@@ -462,3 +462,13 @@ IN_PROC_BROWSER_TEST_F(OmniboxViewViewsTest, TextElideStatus) {
EXPECT_EQ(omnibox_view_views->GetRenderText()->elide_behavior(),
gfx::NO_ELIDE);
}
+
+IN_PROC_BROWSER_TEST_F(OmniboxViewViewsTest, FragmentUnescapedForDisplay) {
+ OmniboxView* view = nullptr;
+ ASSERT_NO_FATAL_FAILURE(GetOmniboxViewForBrowser(browser(), &view));
+ ui_test_utils::NavigateToURL(browser(),
+ GURL("https://www.google.com/#%E2%98%83"));
+
+ EXPECT_EQ(view->GetText(),
+ base::UTF8ToUTF16("https://www.google.com/#\u2603"));
+}
diff --git a/components/url_formatter/elide_url_unittest.cc b/components/url_formatter/elide_url_unittest.cc
index 5e0384af72a2..d403ce065f45 100644
--- a/components/url_formatter/elide_url_unittest.cc
+++ b/components/url_formatter/elide_url_unittest.cc
@@ -347,15 +347,16 @@ TEST(TextEliderTest, TestElisionSpecialCases) {
kEllipsisStr + "berkeley.edu:4430/" + kEllipsisStr + "/arbitfilename"},
// Unescaping.
- {"http://www/%E4%BD%A0%E5%A5%BD?q=%E4%BD%A0%E5%A5%BD#\xe4\xbd\xa0",
- "www/\xe4\xbd\xa0\xe5\xa5\xbd?q=\xe4\xbd\xa0\xe5\xa5\xbd#" +
+ {"http://www/%E4%BD%A0%E5%A5%BD?"
+ "q=%E4%BD%A0%E5%A5%BD#\xe4\xbd\xa0\xe4\xbd\xa0\xe4\xbd\xa0",
+ "www/\xe4\xbd\xa0\xe5\xa5\xbd?q=\xe4\xbd\xa0\xe5\xa5\xbd#\xe4\xbd\xa0" +
kEllipsisStr},
// Invalid unescaping for path. The ref will always be valid UTF-8. We
// don't bother to do too many edge cases, since these are handled by the
// escaper unittest.
{"http://www/%E4%A0%E5%A5%BD?q=%E4%BD%A0%E5%A5%BD#\xe4\xbd\xa0",
- "www/%E4%A0%E5%A5%BD?q=\xe4\xbd\xa0\xe5\xa5\xbd#" + kEllipsisStr},
+ "www/%E4%A0%E5%A5%BD?q=\xe4\xbd\xa0\xe5\xa5\xbd#\xe4\xbd\xa0"},
};
RunElisionTest(testcases);
diff --git a/components/url_formatter/url_formatter.cc b/components/url_formatter/url_formatter.cc
index d5c0d314a5de..c422e3d98a72 100644
--- a/components/url_formatter/url_formatter.cc
+++ b/components/url_formatter/url_formatter.cc
@@ -586,11 +586,10 @@ base::string16 FormatUrlWithAdjustments(
NonHostComponentTransform(unescape_rules),
&url_string, &new_parsed->query, adjustments);
- // Ref. This is valid, unescaped UTF-8, so we can just convert.
if (parsed.ref.is_valid())
url_string.push_back('#');
AppendFormattedComponent(spec, parsed.ref,
- NonHostComponentTransform(net::UnescapeRule::NONE),
+ NonHostComponentTransform(unescape_rules),
&url_string, &new_parsed->ref, adjustments);
}
diff --git a/components/url_formatter/url_formatter_unittest.cc b/components/url_formatter/url_formatter_unittest.cc
index 6fd3ece50f7d..5aaf31105a43 100644
--- a/components/url_formatter/url_formatter_unittest.cc
+++ b/components/url_formatter/url_formatter_unittest.cc
@@ -828,7 +828,7 @@ TEST(UrlFormatterTest, FormatUrl) {
{"With a port number and a reference",
"http://www.google.com:8080/#\xE3\x82\xB0", default_format_type,
- net::UnescapeRule::NORMAL, L"http://www.google.com:8080/#%E3%82%B0", 7},
+ net::UnescapeRule::NORMAL, L"http://www.google.com:8080/#\x30B0", 7},
// -------- IDN tests --------
{"Japanese IDN with ja", "http://xn--l8jvb1ey91xtjb.jp",
@@ -1119,7 +1119,7 @@ TEST(UrlFormatterTest, FormatUrlParsed) {
kFormatUrlOmitNothing, net::UnescapeRule::NORMAL, &parsed,
nullptr, nullptr);
EXPECT_EQ(WideToUTF16(L"http://\x30B0:\x30FC@\x30B0\x30FC\x30B0\x30EB.jp:8080"
- L"/\x30B0/?q=\x30B0#%E3%82%B0"),
+ L"/\x30B0/?q=\x30B0#\x30B0"),
formatted);
EXPECT_EQ(WideToUTF16(L"\x30B0"),
formatted.substr(parsed.username.begin, parsed.username.len));
@@ -1133,7 +1133,7 @@ TEST(UrlFormatterTest, FormatUrlParsed) {
formatted.substr(parsed.path.begin, parsed.path.len));
EXPECT_EQ(WideToUTF16(L"q=\x30B0"),
formatted.substr(parsed.query.begin, parsed.query.len));
- EXPECT_EQ(WideToUTF16(L"%E3%82%B0"),
+ EXPECT_EQ(WideToUTF16(L"\x30B0"),
formatted.substr(parsed.ref.begin, parsed.ref.len));
// Omit_username_password + unescape case.
@@ -1143,7 +1143,7 @@ TEST(UrlFormatterTest, FormatUrlParsed) {
kFormatUrlOmitUsernamePassword, net::UnescapeRule::NORMAL,
&parsed, nullptr, nullptr);
EXPECT_EQ(WideToUTF16(L"http://\x30B0\x30FC\x30B0\x30EB.jp:8080"
- L"/\x30B0/?q=\x30B0#%E3%82%B0"),
+ L"/\x30B0/?q=\x30B0#\x30B0"),
formatted);
EXPECT_FALSE(parsed.username.is_valid());
EXPECT_FALSE(parsed.password.is_valid());
@@ -1155,7 +1155,7 @@ TEST(UrlFormatterTest, FormatUrlParsed) {
formatted.substr(parsed.path.begin, parsed.path.len));
EXPECT_EQ(WideToUTF16(L"q=\x30B0"),
formatted.substr(parsed.query.begin, parsed.query.len));
- EXPECT_EQ(WideToUTF16(L"%E3%82%B0"),
+ EXPECT_EQ(WideToUTF16(L"\x30B0"),
formatted.substr(parsed.ref.begin, parsed.ref.len));
// View-source case.
@@ -1389,9 +1389,12 @@ TEST(UrlFormatterTest, FormatUrlWithOffsets) {
kFormatUrlOmitNothing, net::UnescapeRule::SPACES, unescape_offsets);
const size_t ref_offsets[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
- 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
- 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49};
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
+ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, kNpos, kNpos, kNpos, kNpos, kNpos, kNpos, kNpos, kNpos,
+ 32, kNpos, kNpos, kNpos, kNpos, kNpos, kNpos, kNpos, kNpos, 33};
+
// Unescape to "http://www.google.com/foo.html#\x30B0\x30B0z".
CheckAdjustedOffsets("http://www.google.com/foo.html#%E3%82%B0%E3%82%B0z",
kFormatUrlOmitNothing, net::UnescapeRule::NORMAL,
diff --git a/ios/chrome/browser/web/push_and_replace_state_navigation_egtest.mm b/ios/chrome/browser/web/push_and_replace_state_navigation_egtest.mm
index b67f2a08d0a0..431ad368f07d 100644
--- a/ios/chrome/browser/web/push_and_replace_state_navigation_egtest.mm
+++ b/ios/chrome/browser/web/push_and_replace_state_navigation_egtest.mm
@@ -59,40 +59,42 @@ const char* kReplaceStateRootPathSpaceURL = "http://ios/rep lace";
// Push 3 URLs. Verify that the URL changed and the status was updated.
[ChromeEarlGrey tapWebViewElementWithID:@"pushStateHashWithObject"];
[self assertStatusText:@"pushStateHashWithObject"
- withURL:pushStateHashWithObjectURL
+ withOmniboxText:pushStateHashWithObjectURL.GetContent()
pageLoaded:NO];
[ChromeEarlGrey tapWebViewElementWithID:@"pushStateRootPath"];
[self assertStatusText:@"pushStateRootPath"
- withURL:pushStateRootPathURL
+ withOmniboxText:pushStateRootPathURL.GetContent()
pageLoaded:NO];
[ChromeEarlGrey tapWebViewElementWithID:@"pushStatePathSpace"];
[self assertStatusText:@"pushStatePathSpace"
- withURL:pushStatePathSpaceURL
+ withOmniboxText:pushStatePathSpaceURL.GetContent()
pageLoaded:NO];
// Go back and check that the page doesn't load and the status text is updated
// by the popstate event.
[[EarlGrey selectElementWithMatcher:BackButton()] performAction:grey_tap()];
[self assertStatusText:@"pushStateRootPath"
- withURL:pushStateRootPathURL
+ withOmniboxText:pushStateRootPathURL.GetContent()
pageLoaded:NO];
[[EarlGrey selectElementWithMatcher:BackButton()] performAction:grey_tap()];
[self assertStatusText:@"pushStateHashWithObject"
- withURL:pushStateHashWithObjectURL
+ withOmniboxText:pushStateHashWithObjectURL.GetContent()
pageLoaded:NO];
[ChromeEarlGrey tapWebViewElementWithID:@"goBack"];
const GURL historyTestURL = web::test::HttpServer::MakeUrl(kHistoryTestUrl);
- [self assertStatusText:NULL withURL:historyTestURL pageLoaded:NO];
+ [self assertStatusText:nil
+ withOmniboxText:historyTestURL.GetContent()
+ pageLoaded:NO];
// Go forward 2 pages and check that the page doesn't load and the status text
// is updated by the popstate event.
[ChromeEarlGrey tapWebViewElementWithID:@"goForward2"];
[self assertStatusText:@"pushStateRootPath"
- withURL:pushStateRootPathURL
+ withOmniboxText:pushStateRootPathURL.GetContent()
pageLoaded:NO];
}
@@ -108,7 +110,7 @@ const char* kReplaceStateRootPathSpaceURL = "http://ios/rep lace";
web::test::HttpServer::MakeUrl(kReplaceStateHashWithObjectURL);
[ChromeEarlGrey tapWebViewElementWithID:@"replaceStateHashWithObject"];
[self assertStatusText:@"replaceStateHashWithObject"
- withURL:replaceStateHashWithObjectURL
+ withOmniboxText:replaceStateHashWithObjectURL.GetContent()
pageLoaded:NO];
[[EarlGrey selectElementWithMatcher:BackButton()] performAction:grey_tap()];
@@ -119,7 +121,7 @@ const char* kReplaceStateRootPathSpaceURL = "http://ios/rep lace";
[[EarlGrey selectElementWithMatcher:ForwardButton()]
performAction:grey_tap()];
[self assertStatusText:@"replaceStateHashWithObject"
- withURL:replaceStateHashWithObjectURL
+ withOmniboxText:replaceStateHashWithObjectURL.GetContent()
pageLoaded:YES];
// Push URL then replace it. Do this twice.
@@ -127,44 +129,44 @@ const char* kReplaceStateRootPathSpaceURL = "http://ios/rep lace";
web::test::HttpServer::MakeUrl(kPushStateHashStringURL);
[ChromeEarlGrey tapWebViewElementWithID:@"pushStateHashString"];
[self assertStatusText:@"pushStateHashString"
- withURL:pushStateHashStringURL
+ withOmniboxText:pushStateHashStringURL.GetContent()
pageLoaded:NO];
const GURL replaceStateHashStringURL =
web::test::HttpServer::MakeUrl(kReplaceStateHashStringURL);
[ChromeEarlGrey tapWebViewElementWithID:@"replaceStateHashString"];
[self assertStatusText:@"replaceStateHashString"
- withURL:replaceStateHashStringURL
+ withOmniboxText:replaceStateHashStringURL.GetContent()
pageLoaded:NO];
const GURL pushStatePathURL =
web::test::HttpServer::MakeUrl(kPushStatePathURL);
[ChromeEarlGrey tapWebViewElementWithID:@"pushStatePath"];
[self assertStatusText:@"pushStatePath"
- withURL:pushStatePathURL
+ withOmniboxText:pushStatePathURL.GetContent()
pageLoaded:NO];
const GURL replaceStateRootPathSpaceURL =
web::test::HttpServer::MakeUrl(kReplaceStateRootPathSpaceURL);
[ChromeEarlGrey tapWebViewElementWithID:@"replaceStateRootPathSpace"];
[self assertStatusText:@"replaceStateRootPathSpace"
- withURL:replaceStateRootPathSpaceURL
+ withOmniboxText:replaceStateRootPathSpaceURL.GetContent()
pageLoaded:NO];
// Go back and check URLs.
[[EarlGrey selectElementWithMatcher:BackButton()] performAction:grey_tap()];
[self assertStatusText:@"replaceStateHashString"
- withURL:replaceStateHashStringURL
+ withOmniboxText:replaceStateHashStringURL.GetContent()
pageLoaded:NO];
[[EarlGrey selectElementWithMatcher:BackButton()] performAction:grey_tap()];
[self assertStatusText:@"replaceStateHashWithObject"
- withURL:replaceStateHashWithObjectURL
+ withOmniboxText:replaceStateHashWithObjectURL.GetContent()
pageLoaded:NO];
// Go forward and check URL.
[ChromeEarlGrey tapWebViewElementWithID:@"goForward2"];
[self assertStatusText:@"replaceStateRootPathSpace"
- withURL:replaceStateRootPathSpaceURL
+ withOmniboxText:replaceStateRootPathSpaceURL.GetContent()
pageLoaded:NO];
}
@@ -180,11 +182,11 @@ const char* kReplaceStateRootPathSpaceURL = "http://ios/rep lace";
web::test::HttpServer::MakeUrl(kPushStateHashStringURL);
[ChromeEarlGrey tapWebViewElementWithID:@"pushStateHashString"];
[self assertStatusText:@"pushStateHashString"
- withURL:pushStateHashStringURL
+ withOmniboxText:pushStateHashStringURL.GetContent()
pageLoaded:NO];
[ChromeEarlGrey tapWebViewElementWithID:@"pushStateHashString"];
[self assertStatusText:@"pushStateHashString"
- withURL:pushStateHashStringURL
+ withOmniboxText:pushStateHashStringURL.GetContent()
pageLoaded:NO];
// Load a non-pushed URL.
@@ -194,7 +196,7 @@ const char* kReplaceStateRootPathSpaceURL = "http://ios/rep lace";
[ChromeEarlGrey loadURL:historyTestURL];
[ChromeEarlGrey tapWebViewElementWithID:@"pushStateHashString"];
[self assertStatusText:@"pushStateHashString"
- withURL:pushStateHashStringURL
+ withOmniboxText:pushStateHashStringURL.GetContent()
pageLoaded:NO];
// At this point the history looks like this:
@@ -202,38 +204,54 @@ const char* kReplaceStateRootPathSpaceURL = "http://ios/rep lace";
// Go back (to second history.html) and verify page did not load.
[[EarlGrey selectElementWithMatcher:BackButton()] performAction:grey_tap()];
- [self assertStatusText:nil withURL:historyTestURL pageLoaded:NO];
+ [self assertStatusText:nil
+ withOmniboxText:historyTestURL.GetContent()
+ pageLoaded:NO];
// Go back twice (to second #string) and verify page did load.
[[EarlGrey selectElementWithMatcher:BackButton()] performAction:grey_tap()];
[[EarlGrey selectElementWithMatcher:BackButton()] performAction:grey_tap()];
- [self assertStatusText:nil withURL:pushStateHashStringURL pageLoaded:YES];
+ [self assertStatusText:nil
+ withOmniboxText:pushStateHashStringURL.GetContent()
+ pageLoaded:YES];
// Go back once (to first #string) and verify page did not load.
[[EarlGrey selectElementWithMatcher:BackButton()] performAction:grey_tap()];
[self assertStatusText:@"pushStateHashString"
- withURL:pushStateHashStringURL
+ withOmniboxText:pushStateHashStringURL.GetContent()
pageLoaded:NO];
// Go forward 4 entries at once (to third #string) and verify page did load.
[ChromeEarlGrey tapWebViewElementWithID:@"goForward4"];
- [self assertStatusText:nil withURL:pushStateHashStringURL pageLoaded:YES];
+ [self assertStatusText:nil
+ withOmniboxText:pushStateHashStringURL.GetContent()
+ pageLoaded:YES];
// Go back 4 entries at once (to first #string) and verify page did load.
[ChromeEarlGrey tapWebViewElementWithID:@"goBack4"];
- [self assertStatusText:NULL withURL:pushStateHashStringURL pageLoaded:YES];
+ [self assertStatusText:nil
+ withOmniboxText:pushStateHashStringURL.GetContent()
+ pageLoaded:YES];
}
// Tests calling pushState with unicode characters.
- (void)testHtml5HistoryPushUnicodeCharacters {
- const GURL pushStateUnicodeURLEncoded = web::test::HttpServer::MakeUrl(
- "http://ios/testing/data/http_server_files/"
- "history.html#unicode%E1%84%91");
- const GURL pushStateUnicode2URLEncoded = web::test::HttpServer::MakeUrl(
- "http://ios/testing/data/http_server_files/"
- "history.html#unicode2%E2%88%A2");
+ // The GURL object %-escapes Unicode characters in the URL's fragment,
+ // but the omnibox decodes them back to Unicode for display.
+ std::string pushStateUnicode =
+ web::test::HttpServer::MakeUrl(
+ "http://ios/testing/data/http_server_files/"
+ "history.html#unicode")
+ .GetContent() +
+ "\xe1\x84\x91";
+ std::string pushStateUnicode2 =
+ web::test::HttpServer::MakeUrl(
+ "http://ios/testing/data/http_server_files/"
+ "history.html#unicode2")
+ .GetContent() +
+ "\xe2\x88\xa2";
const char pushStateUnicodeLabel[] = "Action: pushStateUnicodeᄑ";
NSString* pushStateUnicodeStatus = @"pushStateUnicodeᄑ";
const char pushStateUnicode2Label[] = "Action: pushStateUnicode2∢";
@@ -242,21 +260,16 @@ const char* kReplaceStateRootPathSpaceURL = "http://ios/rep lace";
web::test::SetUpFileBasedHttpServer();
[ChromeEarlGrey loadURL:web::test::HttpServer::MakeUrl(kHistoryTestUrl)];
- // TODO(crbug.com/643458): The fact that the URL shows %-escaped is due to
- // NSURL escaping to make UIWebView/JS happy. See if it's possible to
- // represent differently such that it displays unescaped.
// Do 2 push states with unicode characters.
[ChromeEarlGrey tapWebViewElementWithID:@"pushStateUnicode"];
[[EarlGrey
- selectElementWithMatcher:chrome_test_util::OmniboxText(
- pushStateUnicodeURLEncoded.GetContent())]
+ selectElementWithMatcher:chrome_test_util::OmniboxText(pushStateUnicode)]
assertWithMatcher:grey_notNil()];
[ChromeEarlGrey waitForWebViewContainingText:pushStateUnicodeLabel];
[ChromeEarlGrey tapWebViewElementWithID:@"pushStateUnicode2"];
[[EarlGrey
- selectElementWithMatcher:chrome_test_util::OmniboxText(
- pushStateUnicode2URLEncoded.GetContent())]
+ selectElementWithMatcher:chrome_test_util::OmniboxText(pushStateUnicode2)]
assertWithMatcher:grey_notNil()];
[ChromeEarlGrey waitForWebViewContainingText:pushStateUnicode2Label];
@@ -266,18 +279,18 @@ const char* kReplaceStateRootPathSpaceURL = "http://ios/rep lace";
[ChromeEarlGrey tapWebViewElementWithID:@"pushStatePath"];
[self assertStatusText:@"pushStatePath"
- withURL:pushStatePathURL
+ withOmniboxText:pushStatePathURL.GetContent()
pageLoaded:NO];
// Go back and check the unicode in the URL and status.
[[EarlGrey selectElementWithMatcher:BackButton()] performAction:grey_tap()];
[self assertStatusText:pushStateUnicode2Status
- withURL:pushStateUnicode2URLEncoded
+ withOmniboxText:pushStateUnicode2
pageLoaded:NO];
[[EarlGrey selectElementWithMatcher:BackButton()] performAction:grey_tap()];
[self assertStatusText:pushStateUnicodeStatus
- withURL:pushStateUnicodeURLEncoded
+ withOmniboxText:pushStateUnicode
pageLoaded:NO];
}
@@ -321,10 +334,11 @@ const char* kReplaceStateRootPathSpaceURL = "http://ios/rep lace";
#pragma mark - Utility methods
-// Assert that status text |status| is displayed in the webview, that "onloaded"
-// text is displayed if pageLoaded is YES, and that the URL is as expected.
+// Assert that status text |status|, if non-nil, is displayed in the webview,
+// that the omnibox text is as expected, and that "onload" text is displayed if
+// pageLoaded is YES.
- (void)assertStatusText:(NSString*)status
- withURL:(const GURL&)urlToVerify
+ withOmniboxText:(const std::string&)omniboxText
pageLoaded:(BOOL)pageLoaded {
if (pageLoaded) {
[ChromeEarlGrey waitForWebViewContainingText:"onload"];
@@ -332,14 +346,14 @@ const char* kReplaceStateRootPathSpaceURL = "http://ios/rep lace";
[ChromeEarlGrey waitForWebViewNotContainingText:"onload"];
}
- if (status != NULL) {
+ if (status != nil) {
NSString* statusLabel = [NSString stringWithFormat:@"Action: %@", status];
[ChromeEarlGrey
waitForWebViewContainingText:base::SysNSStringToUTF8(statusLabel)];
}
- [[EarlGrey selectElementWithMatcher:chrome_test_util::OmniboxText(
- urlToVerify.GetContent())]
+ [[EarlGrey
+ selectElementWithMatcher:chrome_test_util::OmniboxText(omniboxText)]
assertWithMatcher:grey_notNil()];
}

View File

@ -0,0 +1,77 @@
--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/skia/src/ports/SkFontHost_FreeType.cpp.orig 2017-10-10 17:42:06.956950985 +0200
+++ qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/skia/src/ports/SkFontHost_FreeType.cpp 2017-10-10 17:46:05.824187787 +0200
@@ -99,8 +99,6 @@
FreeTypeLibrary()
: fGetVarDesignCoordinates(nullptr)
, fLibrary(nullptr)
- , fIsLCDSupported(false)
- , fLCDExtra(0)
{
if (FT_New_Library(&gFTMemory, &fLibrary)) {
return;
@@ -147,12 +145,7 @@
}
#endif
- // Setup LCD filtering. This reduces color fringes for LCD smoothed glyphs.
- // The default has changed over time, so this doesn't mean the same thing to all users.
- if (FT_Library_SetLcdFilter(fLibrary, FT_LCD_FILTER_DEFAULT) == 0) {
- fIsLCDSupported = true;
- fLCDExtra = 2; //Using a filter adds one full pixel to each side.
- }
+ FT_Library_SetLcdFilter(fLibrary, FT_LCD_FILTER_DEFAULT);
}
~FreeTypeLibrary() {
if (fLibrary) {
@@ -161,8 +153,6 @@
}
FT_Library library() { return fLibrary; }
- bool isLCDSupported() { return fIsLCDSupported; }
- int lcdExtra() { return fLCDExtra; }
// FT_Get_{MM,Var}_{Blend,Design}_Coordinates were added in FreeType 2.7.1.
// Prior to this there was no way to get the coordinates out of the FT_Face.
@@ -173,8 +163,6 @@
private:
FT_Library fLibrary;
- bool fIsLCDSupported;
- int fLCDExtra;
// FT_Library_SetLcdFilterWeights was introduced in FreeType 2.4.0.
// The following platforms provide FreeType of at least 2.4.0.
@@ -704,17 +692,6 @@
rec->fTextSize = SkIntToScalar(1 << 14);
}
- if (isLCD(*rec)) {
- // TODO: re-work so that FreeType is set-up and selected by the SkFontMgr.
- SkAutoMutexAcquire ama(gFTMutex);
- ref_ft_library();
- if (!gFTLibrary->isLCDSupported()) {
- // If the runtime Freetype library doesn't support LCD, disable it here.
- rec->fMaskFormat = SkMask::kA8_Format;
- }
- unref_ft_library();
- }
-
SkPaint::Hinting h = rec->getHinting();
if (SkPaint::kFull_Hinting == h && !isLCD(*rec)) {
// collapse full->normal hinting if we're not doing LCD
@@ -1115,11 +1092,11 @@
void SkScalerContext_FreeType::updateGlyphIfLCD(SkGlyph* glyph) {
if (isLCD(fRec)) {
if (fLCDIsVert) {
- glyph->fHeight += gFTLibrary->lcdExtra();
- glyph->fTop -= gFTLibrary->lcdExtra() >> 1;
+ glyph->fHeight += 2;
+ glyph->fTop -= 1;
} else {
- glyph->fWidth += gFTLibrary->lcdExtra();
- glyph->fLeft -= gFTLibrary->lcdExtra() >> 1;
+ glyph->fWidth += 2;
+ glyph->fLeft -= 1;
}
}
}

View File

@ -0,0 +1,68 @@
From e58fa0ba66272c5f28828b15d06c7e42a9882b3b Mon Sep 17 00:00:00 2001
From: Jungshik Shin <jshin@chromium.org>
Date: Sat, 16 Dec 2017 04:19:27 +0000
Subject: [PATCH] Use fromUTF8() for UnicodeString construction from UTF-8
Chrome's copy of ICU is built with U_CHARSET_IS_UTF8=1 so that |char *|
buffer is treated as UTF-8 when constructing UnicodeString() regardless
of the default encoding of the current locale on Linux or non-Unicode code
page on Windows.
However, some Linux distros do not set U_CHARSET_IS_UTF=1 when building
ICU and Chromium build with system_icu crashes when Chromium is run in
non-UTF-8 locale (e.g. 'C').
To make Chromium work in a non-UTF-8 locale (which is pretty rare these
days), use 'icu::UnicodeString::fromUTF8(StringPiece)' instead of
'icu::UnicodeString(const char*)'.
Bug: 772655
Test: components_unittests --gtest_filter=*IDN*
Test: Chromium built with system_icu does not crash in C locale.
Change-Id: I0daa284ec06b8e83814fc70eb8e9e5c96444ebfa
Reviewed-on: https://chromium-review.googlesource.com/831247
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Jungshik Shin <jshin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524586}
---
components/url_formatter/idn_spoof_checker.cc | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/components/url_formatter/idn_spoof_checker.cc b/components/url_formatter/idn_spoof_checker.cc
index a88c5e8f8331..aee748d8a4d5 100644
--- a/components/url_formatter/idn_spoof_checker.cc
+++ b/components/url_formatter/idn_spoof_checker.cc
@@ -110,8 +110,8 @@ IDNSpoofChecker::IDNSpoofChecker() {
// These Cyrillic letters look like Latin. A domain label entirely made of
// these letters is blocked as a simplified whole-script-spoofable.
- cyrillic_letters_latin_alike_ =
- icu::UnicodeSet(icu::UnicodeString("[асԁеһіјӏорԛѕԝхуъЬҽпгѵѡ]"), status);
+ cyrillic_letters_latin_alike_ = icu::UnicodeSet(
+ icu::UnicodeString::fromUTF8("[асԁеһіјӏорԛѕԝхуъЬҽпгѵѡ]"), status);
cyrillic_letters_latin_alike_.freeze();
cyrillic_letters_ =
@@ -141,8 +141,8 @@ IDNSpoofChecker::IDNSpoofChecker() {
UParseError parse_error;
diacritic_remover_.reset(icu::Transliterator::createFromRules(
UNICODE_STRING_SIMPLE("DropAcc"),
- icu::UnicodeString("::NFD; ::[:Nonspacing Mark:] Remove; ::NFC;"
- " ł > l; ø > o; đ > d;"),
+ icu::UnicodeString::fromUTF8("::NFD; ::[:Nonspacing Mark:] Remove; ::NFC;"
+ " ł > l; ø > o; đ > d;"),
UTRANS_FORWARD, parse_error, status));
// Supplement the Unicode confusable list by the following mapping.
@@ -158,7 +158,7 @@ IDNSpoofChecker::IDNSpoofChecker() {
// - U+0D1F (ട) => s
extra_confusable_mapper_.reset(icu::Transliterator::createFromRules(
UNICODE_STRING_SIMPLE("ExtraConf"),
- icu::UnicodeString(
+ icu::UnicodeString::fromUTF8(
"ӏ > l; [кĸκ] > k; п > n; [ƅь] > b; в > b; м > m; н > h; "
"т > t; [шщ] > w; ട > s;"),
UTRANS_FORWARD, parse_error, status));
--
2.15.1

View File

@ -1,34 +0,0 @@
From 7f90e2cceda0458cf56026eb6ccffb961a47804b Mon Sep 17 00:00:00 2001
From: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Date: Fri, 13 Oct 2017 15:49:32 +0200
Subject: [PATCH] IWYU: Include math.h for round(3).
math.h was being implicitly included, which can break the build with
alternative libc implementations.
Bug: None
Change-Id: I969b320b65d0f44abb33d3e1036cfbcb859a4952
Reviewed-on: https://webrtc-review.googlesource.com/9384
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Raphael Kubo da Costa (rakuco) <raphael.kubo.da.costa@intel.com>
Cr-Commit-Position: refs/heads/master@{#20292}
---
p2p/base/port.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/p2p/base/port.cc b/p2p/base/port.cc
index a1b478d11..81aa0aadb 100644
--- a/third_party/webrtc/p2p/base/port.cc
+++ b/third_party/webrtc/p2p/base/port.cc
@@ -10,6 +10,8 @@
#include "p2p/base/port.h"
+#include <math.h>
+
#include <algorithm>
#include <vector>
--
2.15.0.rc2