A later patch will move the `OrderedHashTable` fields to object slots.
Use local variables in a few places to prepare for that change.
Differential Revision: https://phabricator.services.mozilla.com/D227150
Change `clear` to destroy all elements and then shrink the table only if needed,
similar to how `remove` is implemented.
This eliminates a `free` and `malloc` if there are only a few elements but it's also
simpler because it avoids calling `init` more than once which is a footgun.
Differential Revision: https://phabricator.services.mozilla.com/D227011
This restores behavior from before bug 1835864, effectively.
The top level image document's root element has transparent background.
Before that patch, we used to blend that with
GetDefaultBackgroundColorDraw(), which was white.
This should generally not change behavior, because the page frame itself
is white, but it does on PrintTargetWindows (probably a cairo bug?),
where it causes our page content clip not to apply.
In any case, restoring behavior here is trivial, so let's do that for
now, I'll file a follow-up bug for the underlying issue.
Differential Revision: https://phabricator.services.mozilla.com/D228514
Automatic update from web-platform-tests
webnn: Support block-wise quantization for DirectML backend
Block-wise quantization divides input tensors into smaller blocks that
are independently quantized, resulting in faster optimization and high
precision quantization [1]. It is used for popular language models,
such as phi-3 mini int4 quantized model [2]. Related WG issue [3] has
been opened to discussion.
Firstly, this CL validates scale and zero point tensors for block-wise
quantization. Besides, this CL also implements the block-wise
quantization in DirectML backend by using DML_OPERATOR_QUANTIZE and
DML_OPERATOR_DEQUANTIZE which are available in FL >= 6.3.
More validation and conformance tests are added to verify the
implementation.
[1]: https://arxiv.org/abs/2110.02861
[2]: https://huggingface.co/microsoft/Phi-3-mini-4k-instruct
[3]: https://github.com/webmachinelearning/webnn/issues/779
Bug: 40206287
Change-Id: I977b0be57deebd7afcae216edc3ddc3818b8c09f
Cq-Include-Trybots: luci.chromium.try:mac14.arm64-blink-rel, mac14-blink-rel, mac15.arm64-blink-rel, mac15-blink-rel, linux-blink-rel
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5964816
Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: ningxin hu <ningxin.hu@intel.com>
Commit-Queue: ningxin hu <ningxin.hu@intel.com>
Cr-Commit-Position: refs/heads/main@{#1380767}
--
wpt-commits: 8686b7a6d288d3b2c22b5ddb5a21773619b22b85
wpt-pr: 49083
Automatic update from web-platform-tests
[wdspec] add `bluetooth` module (#49066)
Add BiDi bluetooth module and and some wdspec tests.
https://webbluetoothcg.github.io/web-bluetooth
--
wpt-commits: 7b542308b66f77878714f851a8baac291ee2a39e
wpt-pr: 49066
Automatic update from web-platform-tests
moveBefore: don't fire focusin/focusout
Following spec conversation at WHATNOT, this will be deferred
until we receive community feedback.
Bug: 40150299
Change-Id: I18dc4ebd50d52fa83ea3a4cc8cf376e7b33d835b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5992801
Commit-Queue: Dominic Farolino <dom@chromium.org>
Reviewed-by: Dominic Farolino <dom@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1380625}
--
wpt-commits: e44f4535f4fe673f00e6f487c6240a4c4647b5a6
wpt-pr: 49076
Automatic update from web-platform-tests
Change Observer: Fix flaky test caused by cleanup code
The cleanup code for `directory_test`s may fail when it attempts to
remove a a entry that no longer exists. This changes it to ignore when
it fails to remove an entry since it doesn't matter as long as it
doesn't exist anymore.
This may be due to a race issue where cleanup code from a previous test
hadn't finished deleting all its entries when `directory_test` takes a
snapshot of them. But it does before `directory_test` can remove the
entry.
Fixed: 377480361
Change-Id: I5c173ba6afae5ddf7db0a4d8d154319dd5f0fb85
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6001305
Reviewed-by: Daseul Lee <dslee@chromium.org>
Commit-Queue: Nathan Memmott <memmott@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1380545}
--
wpt-commits: 1cf0f9e3f20987cbc6fe4da6450d8689197b0778
wpt-pr: 49065
Automatic update from web-platform-tests
Nearest neighbor images should not use higher quality
We recently fixed a bug [1] where the discardable image map was not
preserving image quality values. This fix exposed a bug where nearest
neighbor filtering would incorrectly re-use higher-quality images.
Nearest neighbor filtering is used for `image-rendering: pixelated` and
should not use higher-quality filtering.
[1] https://crrev.com/0eb474d6793456826037bf33212ccba9da236402
Bug: 376304003
Change-Id: Icbf4f0640efbb065f32c95daa94144f82da39805
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6000966
Commit-Queue: Philip Rogers <pdr@chromium.org>
Auto-Submit: Philip Rogers <pdr@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1380505}
--
wpt-commits: a0e2da634c7d60190696187fd07ee18484bb992c
wpt-pr: 49072
Automatic update from web-platform-tests
[line-clamp] [text-box-trim] Make block-in-inlines work
This patch makes block-in-inlines work together with
`line-clamp: auto` and `text-box-trim`. There are a few reasons why
they did not previously work:
- The code in `BlockLayoutAlgorithm::FinishInflow` that handled the
interaction of these features assumed that, with `trim-end`, every
fragment with a break token would have a non-null `TrimBlockEndBy`
set. This is not true for block-in-inline wrapper lines, so this was
causing a crash.
This code is used when figuring out how many lines fit in the given
height, and it does so by always trimming by the end, and then,
after we know this line fits, re-adding that trimmed block size.
For block-in-inlines, if the inside trimmed, that trimmed block size
would have already been added when laying out the inner block.
Therefore, if there is no `TrimBlockEndBy`, we don't need to add
any block size.
- Another issue is that, when doing relayout for `text-box-trim`,
which is now only needed with block-in-inlines, the number of lines
until clamp was set to the number of lines until clamp that the
previous block layout algorithm had when it aborted. This resulted
in any lines that were laid out twice being counted twice. This
number should instead be reset to its initial value at relayout
time. Therefore we added an `initial_lines_until_clamp` field to
`BlockLineClampData` to store this value.
- Finally, although the block-in-inline tracked by
`BlockLayoutAlgorithm::last_non_empty_inflow_child_` might not be
the one that contains the last line before clamp, this shouldn't
matter after https://crrev.com/c/5987915. However, if a block ends
with a block-in-inline which comes after the clamp point, it would
cause an unnecessary relayout, because the trim-end has already been
applied to the last line before clamp in the current layout.
Therefore, we don't do this layout when we have clamped previously.
Bug: 40336192, 40254880, 372531320
Change-Id: Id228951b5db3c4bf799010e730983558567e9ddd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5987917
Commit-Queue: Andreu Botella <abotella@igalia.com>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1380464}
--
wpt-commits: 3241773f5849083927b5a25175326b0306f2dafc
wpt-pr: 49030
Automatic update from web-platform-tests
layout: Fix caching of streching flex items in row flex
When a flex item stretches in the cross axis in a row flex, the flex
container layout should depend on block constraints. In this case the
cross axis is the block axis (assuming horizontal writing modes --
vertical are not yet supported). This changes fixes an issue where the
cached layout was used in this case when stretching should trigger a new
layout.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
--
wpt-commits: dedba61aa239e5d5194fe5a49ddc2766712f22bc
wpt-pr: 49062
Automatic update from web-platform-tests
Increase chunking of Firefox Android
Recent runs have been timing out
--
wpt-commits: 574a24ed700ed2499facbb3281ed1edb1592d793
wpt-pr: 49067
Automatic update from web-platform-tests
[@container] Add parsing tests for comma separated queries
Also add a test that '@container {}' is not a valid rule.
Change-Id: Id8662623617a682d9408017db74c20ec362cc7ae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6001964
Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1380338}
--
wpt-commits: e2223779e96d8d4435b7c34075ff3e7f54db5c85
wpt-pr: 49061
Automatic update from web-platform-tests
Move Chromium implementation specific WPT.
The specification does not define the maximum depth/width.
However, the current WPT limit them. Let me move such WPTs to Chromium
specific locations.
In the coming CL, I will also write the WPT to ask the minimum
depth/width as a response to:
https://github.com/w3c/ServiceWorker/pull/1714
Change-Id: I722667fbdc69aed32d8fa66d3e17050bf33c480a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5999015
Reviewed-by: Keita Suzuki <suzukikeita@chromium.org>
Reviewed-by: Shunya Shishido <sisidovski@chromium.org>
Commit-Queue: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1380071}
--
wpt-commits: af915520cc0da850f5031cdfb5172657ab7091a4
wpt-pr: 49047