summaryrefslogtreecommitdiff
path: root/chromium/third_party
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2019-02-08 13:13:08 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2022-12-13 16:43:14 +0100
commit7f62df255c90b2949c87688f7dc96aa4d3f7bedd (patch)
treefffe22597e2cd7e09855f64d6b5a1451ab28910f /chromium/third_party
parent96e3c7e7861539505e48f06dcf3b67dc390e9499 (diff)
downloadqtwebengine-chromium-7f62df255c90b2949c87688f7dc96aa4d3f7bedd.tar.gz
Fix misuse of {} initialization
Narrowing is supposed to be forbidden in {} initialization, but Chromium doesn't appear to care upstream. Change-Id: Ia3d1dac6ef19ef86afcbeee4ed11d807c53faaaa Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'chromium/third_party')
-rw-r--r--chromium/third_party/blink/renderer/core/html/anchor_element_metrics_sender.cc2
-rw-r--r--chromium/third_party/blink/renderer/core/layout/layout_table_section.cc2
-rw-r--r--chromium/third_party/ced/src/compact_enc_det/compact_enc_det.cc4
-rw-r--r--chromium/third_party/ced/src/compact_enc_det/compact_enc_det_generated_tables.h2
4 files changed, 5 insertions, 5 deletions
diff --git a/chromium/third_party/blink/renderer/core/html/anchor_element_metrics_sender.cc b/chromium/third_party/blink/renderer/core/html/anchor_element_metrics_sender.cc
index 52f1c98f790..2035a6c4b5a 100644
--- a/chromium/third_party/blink/renderer/core/html/anchor_element_metrics_sender.cc
+++ b/chromium/third_party/blink/renderer/core/html/anchor_element_metrics_sender.cc
@@ -122,7 +122,7 @@ AnchorElementMetricsSender::AnchorElementMetricsSender(Document& document)
document.View()->RegisterForLifecycleNotifications(this);
intersection_observer_ = IntersectionObserver::Create(
- {}, {INTERSECTION_RATIO_THRESHOLD}, &document,
+ {}, {float(INTERSECTION_RATIO_THRESHOLD)}, &document,
WTF::BindRepeating(&AnchorElementMetricsSender::UpdateVisibleAnchors,
WrapWeakPersistent(this)),
LocalFrameUkmAggregator::kAnchorElementMetricsIntersectionObserver,
diff --git a/chromium/third_party/blink/renderer/core/layout/layout_table_section.cc b/chromium/third_party/blink/renderer/core/layout/layout_table_section.cc
index 73a49803589..e75bd6f57bb 100644
--- a/chromium/third_party/blink/renderer/core/layout/layout_table_section.cc
+++ b/chromium/third_party/blink/renderer/core/layout/layout_table_section.cc
@@ -2087,7 +2087,7 @@ void LayoutTableSection::AdjustRowForPagination(LayoutTableRow& row_object,
row_is_at_top_of_column =
!offset_from_top_of_page ||
offset_from_top_of_page <= OffsetForRepeatedHeader() ||
- offset_from_top_of_page <= Table()->VBorderSpacing();
+ offset_from_top_of_page <= int{Table()->VBorderSpacing()};
}
if (!row_is_at_top_of_column)
diff --git a/chromium/third_party/ced/src/compact_enc_det/compact_enc_det.cc b/chromium/third_party/ced/src/compact_enc_det/compact_enc_det.cc
index fcac75a9311..b6cd50f8e4a 100644
--- a/chromium/third_party/ced/src/compact_enc_det/compact_enc_det.cc
+++ b/chromium/third_party/ced/src/compact_enc_det/compact_enc_det.cc
@@ -1479,7 +1479,7 @@ void InitDetectEncodingState(DetectEncodingState* destatep) {
// {{0x6e,0x6c,0x5f,0x5f, 0x05,0xb2,0xae,0xa0,0x32,0xa1,0x36,0x31,0x42,0x39,0x3b,0x33,0x45,0x11,0x6f,0x00,}}, // "nl__"
// // ASCII-7-bit=178 Latin1=174 UTF8=160 GB=50 CP1252=161 BIG5=49 Latin2=66 CP1251=57 CP1256=59 CP1250=51 Latin5=69 ISO-8859-15=111 [top ASCII-7-bit]
-int ApplyCompressedProb(const char* iprob, int len,
+int ApplyCompressedProb(const unsigned char* iprob, int len,
int weight, DetectEncodingState* destatep) {
int* dst = &destatep->enc_prob[0];
int* dst2 = &destatep->hint_weight[0];
@@ -1528,7 +1528,7 @@ int ApplyCompressedProb(const char* iprob, int len,
// Returns subscript of largest (most probable) value [for unit test]
-int TopCompressedProb(const char* iprob, int len) {
+int TopCompressedProb(const unsigned char* iprob, int len) {
const uint8* prob = reinterpret_cast<const uint8*>(iprob);
const uint8* problimit = prob + len;
int next_prob_sub = 0;
diff --git a/chromium/third_party/ced/src/compact_enc_det/compact_enc_det_generated_tables.h b/chromium/third_party/ced/src/compact_enc_det/compact_enc_det_generated_tables.h
index 317afb66f48..471a20c6d17 100644
--- a/chromium/third_party/ced/src/compact_enc_det/compact_enc_det_generated_tables.h
+++ b/chromium/third_party/ced/src/compact_enc_det/compact_enc_det_generated_tables.h
@@ -165,7 +165,7 @@ static const Encoding kMapToEncoding[NUM_RANKEDENCODING] = {
// Massaged TLD or charset, followed by packed encoding probs
typedef struct {
- char key_prob[20];
+ unsigned char key_prob[20];
} HintEntry;
static const HintEntry kLangHintProbs[] = { // MaxRange 192