Skip to content

Commit

Permalink
Revert "[PEPC] Add restrictions to word-spacing for PEPC"
Browse files Browse the repository at this point in the history
This reverts commit a9f36840453444407809fe6c622dcc87ba91ef34.

Reason for revert: tests break on Webkit Linux Leak
https://ci.chromium.org/ui/p/chromium/builders/ci/WebKit%20Linux%20Leak/61510/overview

Original change's description:
> [PEPC] Add restrictions to word-spacing for PEPC
>
> Bug: 1462930
> Change-Id: I30edd87589dd222cd069c33cffeb5b4d4716671d
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5352970
> Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org>
> Commit-Queue: Andy Paicu <andypaicu@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1273334}

Bug: 1462930
Change-Id: I4cde6efd65fab935c4f768986142c3abbe0d28c1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5372906
Auto-Submit: Nicolas Ouellet-Payeur <nicolaso@chromium.org>
Reviewed-by: Andy Paicu <andypaicu@chromium.org>
Owners-Override: Nicolas Ouellet-Payeur <nicolaso@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Nicolas Ouellet-Payeur <nicolaso@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1273369}
  • Loading branch information
Nicolas Ouellet-Payeur authored and BruceDai committed Mar 25, 2024
1 parent 75b1242 commit b940e61
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 82 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,53 +1,38 @@
<!DOCTYPE html>
<meta charset=utf-8>
<link rel="help" href="https://github.com/WICG/PEPC/blob/main/explainer.md#locking-the-pepc-style">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<body>
<!--The permission element should have some limits for specific properties:
* font-weight is adjusted to be at least 200.
* font-style should only have "normal" or "italic" values.
* word-spacing should be at most 0.5 of the font size, and non-negative.
-->
<style>
#id1 {
font-weight: 100;
font-style: oblique 30deg;
word-spacing: 1em;
font-size: 100px;
}
#id2 {
font-weight: 300;
font-style: italic;
word-spacing: 0.4em;
font-size: 100px;
}
#id3 {
word-spacing: -1px;
}
</style>


<permission id="id1" type="geolocation">
<permission id="id2" type="camera">
<permission id="id3" type="microphone">

<script>
test(function(){
var el_outside_bounds = document.getElementById("id1");
assert_equals(getComputedStyle(el_outside_bounds).fontWeight, "200", "font-weight");
assert_equals(getComputedStyle(el_outside_bounds).fontStyle, "normal", "font-style");
assert_equals(getComputedStyle(el_outside_bounds).wordSpacing, "50px", "word-spacing");

var el_negative_bounds = document.getElementById("id3");
assert_equals(getComputedStyle(el_negative_bounds).wordSpacing, "0px", "word-spacing, negative");
}, "Properties with out-of-bounds values should be corrected");

test(function(){
var el_inside_bounds = document.getElementById("id2");
assert_equals(getComputedStyle(el_inside_bounds).fontWeight, "300", "font-weight");
assert_equals(getComputedStyle(el_inside_bounds).fontStyle, "italic", "font-style");
assert_equals(getComputedStyle(el_inside_bounds).wordSpacing, "40px", "word-spacing");
}, "Properties with values in bounds should not be modified");
</script>
</body>
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<!DOCTYPE html>
<meta charset=utf-8>
<link rel="help" href="https://github.com/WICG/PEPC/blob/main/explainer.md#locking-the-pepc-style">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<body>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<!DOCTYPE html>
<meta charset=utf-8>
<link rel="help" href="https://github.com/WICG/PEPC/blob/main/explainer.md#locking-the-pepc-style">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<body>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<!DOCTYPE html>
<meta charset=utf-8>
<link rel="help" href="https://github.com/WICG/PEPC/blob/main/explainer.md#locking-the-pepc-style">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<body>
Expand Down

0 comments on commit b940e61

Please sign in to comment.