Commit Graph
251 Commits
Author SHA1 Message Date
serge-sans-paille a1755db116 Bug 2034001 - Remove unused include of <ctype.h> r=profiler-reviewers,firefox-style-system-reviewers,emilio,canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D295789
2026-04-25 07:09:20 +00:00
Alexandru Marc 52197ec05d Revert "Bug 2034001 - Remove unused include of <ctype.h> r=profiler-reviewers,firefox-style-system-reviewers,emilio,canaltinova"
This reverts commit e4406d802d.
2026-04-24 15:08:37 +00:00
serge-sans-paille e4406d802d Bug 2034001 - Remove unused include of <ctype.h> r=profiler-reviewers,firefox-style-system-reviewers,emilio,canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D295789
2026-04-24 14:19:28 +00:00
Sylvestre Ledru 55481ac4b5 Bug 2023419 - Remove Emacs/Vim modelines from layout/ r=emilio,firefox-style-system-reviewers,layout-reviewers
replaced by .editorconfig

Differential Revision: https://phabricator.services.mozilla.com/D287852
2026-03-17 12:05:43 +00:00
Emilio Cobos Álvarez 4d4fcbb13b Bug 1998621 - Use a quoted string for view transition dynamic animation names. r=view-transitions-reviewers,boris
Fix a quoting issue that is exposed by japanese-tag.html

The quoting issue got introduced by bug 1986533 which converted this
code to work on UTF-8 strings rather than utf-16.

Differential Revision: https://phabricator.services.mozilla.com/D271850
2025-11-22 16:55:50 +00:00
serge-sans-paille c3b06ff4b4 Bug 1997165 - Remove unused mfbt inclusion in layout/** r=emilio,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,dshin,dholbert
Differential Revision: https://phabricator.services.mozilla.com/D270577
2025-10-29 22:18:06 +00:00
Lando f0f84ad911 Bug 1986533: apply code formatting via Lando
# ignore-this-changeset
2025-09-18 13:25:27 +00:00
Emilio Cobos Álvarez 08fa6498a4 Bug 1986533 - Quote invalid font-family descriptors in FontFace constructor and family setter. r=layout-reviewers,firefox-style-system-reviewers,dshin
Existing tests will be modified as needed for this, and a WPT added for
this edge case.

Differential Revision: https://phabricator.services.mozilla.com/D265128
2025-09-18 13:25:11 +00:00
Fatih Kilic eed44c4862 Bug 1968607 - Part 1: Replace CSP with PolicyContainer. r=tschuster,webidl,smaug
We are making changes to many files. Very huge chunk of the changes are just renaming CSP -> PolicyContainer. Part 1 and part 2 are solely separated as frontend and backend. The unfortunate thing is, I mistakenly placed IDL changes in part 1, and many of those IDL changes affect frontend code too. I'm sorry for this inconvinience and hard to review patch(es).

(FWIW before this rewrite we had another patch stack. It is 25 patches and I believe isn't as comprehensive as this one. It also didn't replace CSP's inheritance but was copied alongside with CSP, but we decided to change our method and make policy conttainer contain CSP and copy it around after some discussion and reviews)

Differential Revision: https://phabricator.services.mozilla.com/D249248
2025-07-11 05:39:17 +00:00
Emilio Cobos Álvarez a8a2311474 Bug 1976457 - Sort includes in layout/. r=janv,dshin
Interesting bit is layout/.clang-format, the rest is all automated.

Differential Revision: https://phabricator.services.mozilla.com/D256616
2025-07-09 13:24:00 +00:00
Jonathan Watt b21dc1a9c9 Bug 1931736. Add missing braces around if/loop statements in layout/style/. r=layout-reviewers,emilio
Depends on D229252

Differential Revision: https://phabricator.services.mozilla.com/D229253
2024-11-17 05:04:00 +00:00
Tom Schuster 940baabb7a Bug 1397308 - Implement CSP 'Is element nonceable?' check. r=emilio,hsivonen,freddyb
Differential Revision: https://phabricator.services.mozilla.com/D198150
2024-01-26 14:56:32 +00:00
Jonathan Kew 53ec4d49b6 Bug 1865482 - Make CSS :lang() matching more correctly follow the BCP4647 Extended Filtering algorithm. r=layout-reviewers,emilio
The matching behavior implemented in bug 1857742 did not quite follow the spec,
particularly with regard to language *ranges* (as used in the :lang() pseudo)
that are not themselves valid language *tags*.

This updates the LangTagCompare function to more correctly follow the BCP4647
"Extended Filtering" algorithm, and adjusts the relevant WPT tests (originally
from bug 1857742) to reflect the corrected behavior.

Differential Revision: https://phabricator.services.mozilla.com/D194054
2023-11-20 13:44:06 +00:00
Jonathan Kew ce08c4a822 Bug 1857742 - patch 2 - Use oxilangtag rather than unic_langid to parse lang tags for nsStyleUtil::LangTagCompare. r=layout-reviewers,dholbert,TYLin
Differential Revision: https://phabricator.services.mozilla.com/D193892
2023-11-18 10:36:01 +00:00
Jonathan Kew 15c9086646 Bug 1848491 - Handle private subtags in the lang attribute and :lang() selector. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D186133
2023-08-16 14:26:44 +00:00
Cristian Tuns 546b6c269e Backed out 2 changesets (bug 1848491) for causing reftest failures in unicode-lang.html CLOSED TREE
Backed out changeset cc1e56d6f6ab (bug 1848491)
Backed out changeset c2e6e49bdeef (bug 1848491)
2023-08-16 09:21:04 -04:00
Jonathan Kew 62a200daf4 Bug 1848491 - Handle private subtags in the lang attribute and :lang() selector. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D186133
2023-08-16 11:55:06 +00:00
Jonathan Kew b25a8a4752 Bug 1121792 - Use more complete BCP47/RFC4647 language-range matching rather than simple prefix-dash match for the :lang() pseudo. r=emilio
This is a Selectors-4 enhancement to the spec for the :lang() pseudo-class.
It seems Safari has been shipping this behavior for some time.

Differential Revision: https://phabricator.services.mozilla.com/D174999
2023-04-12 21:46:46 +00:00
Narcis Beleuzu 8563e607b8 Backed out 6 changesets (bug 1121792) for mochitest failures in malloc_usable_size . CLOSED TREE
Backed out changeset 879211a561cc (bug 1121792)
Backed out changeset 195d689a6b12 (bug 1121792)
Backed out changeset 9726f4b6035a (bug 1121792)
Backed out changeset be24fa5c3e70 (bug 1121792)
Backed out changeset 2e4e3ae6cddd (bug 1121792)
Backed out changeset e535870263d8 (bug 1121792)
2023-04-12 22:26:19 +03:00
Jonathan Kew 059b18171d Bug 1121792 - Use more complete BCP47/RFC4647 language-range matching rather than simple prefix-dash match for the :lang() pseudo. r=emilio
This is a Selectors-4 enhancement to the spec for the :lang() pseudo-class.
It seems Safari has been shipping this behavior for some time.

Differential Revision: https://phabricator.services.mozilla.com/D174999
2023-04-12 16:05:11 +00:00
Tom Schuster 2365bbceed Bug 1797070 - CSP: Add a basic implementation of unsafe-hashes behind a flag. r=freddyb
Differential Revision: https://phabricator.services.mozilla.com/D160046
2022-11-07 17:56:23 +00:00
Tom Schuster be14fa8164 Bug 1529338 - Implement CSP 'style-src-elem' and 'style-src-attr' directives. r=freddyb,emilio,dveditz
Differential Revision: https://phabricator.services.mozilla.com/D151926
2022-08-01 12:32:59 +00:00
Emilio Cobos Álvarez 42a711655b Bug 1773558 - Move fixed-point font types to Rust. r=layout-reviewers,jfkthame
Now that cbindgen and rust support const generics, it seems more simple.

This centralizes all the relevant font constants etc in rust and avoids
conversions when going from rust to C++ and vice versa.

Differential Revision: https://phabricator.services.mozilla.com/D148847
2022-06-13 00:59:23 +00:00
Noemi Erli fbf29a9961 Backed out changeset 7585591a9bad (bug 1773558) for causing failures in system-fonts.html 2022-06-12 19:02:33 +03:00
Emilio Cobos Álvarez 152643ec11 Bug 1773558 - Move fixed-point font types to Rust. r=layout-reviewers,jfkthame
Now that cbindgen and rust support const generics, it seems more simple.

This centralizes all the relevant font constants etc in rust and avoids
conversions when going from rust to C++ and vice versa.

Differential Revision: https://phabricator.services.mozilla.com/D148847
2022-06-12 10:48:58 +00:00
Daniel Holbert 781ff15964 Bug 1754095: Fix non-unified build errors in layout/style, and mark it as safe to build in non-unified mode. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D138082
2022-02-08 00:35:19 +00:00
Masatoshi Kimura d7e7aeef59 Bug 1683464 - Reduce nsContentPolicyType usage. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D100181
2021-01-07 15:18:52 +00:00
Razvan Maries fa9e0155c3 Backed out 4 changesets (bug 1683464) for multiple perma failures. CLOSED TREE
Backed out changeset a5d315c017d0 (bug 1683464)
Backed out changeset 5f91001e4923 (bug 1683464)
Backed out changeset 1b7fe904e8af (bug 1683464)
Backed out changeset eb1c479fddca (bug 1683464)
2021-01-05 16:47:22 +02:00
Masatoshi Kimura 0dd1d361fa Bug 1683464 - Reduce nsContentPolicyType usage. r=ckerschb
Depends on D100180

Differential Revision: https://phabricator.services.mozilla.com/D100181
2021-01-05 12:21:46 +00:00
Botond Ballo 6c3a14c597 Bug 1629732 - Fix non-unified build errors in layout/style. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D71454
2020-04-19 00:59:06 +00:00
Christoph Kerschbaumer ae73f1a2cb Bug 1374612 - CSP: Hide nonce values from the DOM. r=smaug,annevk
Differential Revision: https://phabricator.services.mozilla.com/D62811
2020-02-29 12:35:46 +00:00
shindli 0767c8420c Backed out changeset ec4c2b2a561b (bug 1374612) for causing wpt permafails in /html/dom/reflection-metadata.html CLOSED TREE 2020-02-27 22:46:44 +02:00
Christoph Kerschbaumer 8b9708a5ac Bug 1374612 - CSP: Hide nonce values from the DOM. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D62811
2020-02-27 18:08:54 +00:00
Dorel Luca 4f94caa31d Backed out changeset 59fe98b41d80 (bug 1374612) for WPT failures in /html/dom/idlharness.https.html. CLOSED TREE 2020-02-27 14:08:48 +02:00
Christoph Kerschbaumer b27dfad2ee Bug 1374612 - CSP: Hide nonce values from the DOM. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D62811
2020-02-27 09:32:04 +00:00
Emilio Cobos Álvarez 543f59c8cb Bug 1617472 - Remove nsCSSKeywords and related infrastructure. r=heycam
Seeya

Depends on D63795

Differential Revision: https://phabricator.services.mozilla.com/D63796
2020-02-24 13:30:48 +00:00
Emilio Cobos Álvarez 79b850131a Bug 1609737 - Forbid accessing the length and percentage parts of a LengthPercentage separately. r=boris
This is just not a thing you can do if you have min() / max() / etc, as the min
/ max value may depend on the percentage basis.

Differential Revision: https://phabricator.services.mozilla.com/D60168
2020-01-23 09:18:39 +00:00
Cosmin Sabou f8db387430 Backed out 2 changesets (bug 1609737) for causing build bustages on nsCSSRenderingGradients after backing out Bug 1609711. CLOSED TREE
Backed out changeset d12980bbc425 (bug 1609737)
Backed out changeset 51f3f1a1efb8 (bug 1609737)
2020-01-23 07:39:48 +02:00
Emilio Cobos Álvarez 562d6881dc Bug 1609737 - Forbid accessing the length and percentage parts of a LengthPercentage separately. r=boris
This is just not a thing you can do if you have min() / max() / etc, as the min
/ max value may depend on the percentage basis.

Differential Revision: https://phabricator.services.mozilla.com/D60168
2020-01-23 00:36:27 +00:00
Jonathan Kingston 0f3d8659c7 Bug 1606774 - Change GetAttribute to GetAttr where possible r=baku
Differential Revision: https://phabricator.services.mozilla.com/D58585
2020-01-03 23:40:53 +00:00
Gabriele Svelto eeb9bfc398 Bug 1600545 - Remove useless inclusions of header files generated from IDL files in accessible/, browser/, caps/, chrome/, devtools/, docshell/, editor/, extensions/, gfx/, hal/, image/, intl/, ipc/, js/, layout/, and media/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

Differential Revision: https://phabricator.services.mozilla.com/D55443
2019-12-06 09:16:44 +00:00
jeffin143 96580d1c30 Bug 1598348 : convert NS_STYLE_OBJECT_FIT_* to an enum class in nsStyleConsts.h r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D54153
2019-11-25 15:40:50 +00:00
Christoph Kerschbaumer c244d55633 Bug 1580710: Expose functionality on the CSP Object to allow skipping the inline style checks. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D45631
2019-09-16 23:47:19 +00:00
Emilio Cobos Álvarez ffb949c2b1 Bug 1575608 - Avoid manual paint-order glue code. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D42913
2019-08-21 19:47:53 +00:00
Emilio Cobos Álvarez 3244910d0e Bug 1561738 - Remove nsStyleCoord. r=boris
And move the useful bits of it somewhere else (ServoStyleConstInlines.h for the
inline function definitions, and nsFrame.cpp for the static assertions).

Differential Revision: https://phabricator.services.mozilla.com/D36120
2019-06-28 12:44:44 +02:00
Cosmin Sabou a5a1cf97a8 Backed out 3 changesets (bug 1561738) for causing build bustages on nsGridContainerFrame.cpp CLOSED TREE
Backed out changeset 98f100abc2ba (bug 1561738)
Backed out changeset 9ed20d0fb9ba (bug 1561738)
Backed out changeset 483b1e134ace (bug 1561738)
2019-06-28 13:27:09 +03:00
Emilio Cobos Álvarez a622c42ad4 Bug 1561738 - Remove nsStyleCoord. r=boris
And move the useful bits of it somewhere else (ServoStyleConstInlines.h for the
inline function definitions, and nsFrame.cpp for the static assertions).

Differential Revision: https://phabricator.services.mozilla.com/D36120
2019-06-28 09:46:26 +00:00
Christoph Kerschbaumer 29451e9f5e Bug 965637: Move CSP from Principal into Client, part 1: backend changes. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D27654
2019-05-21 23:14:27 +00:00
Ryan Hunt a96492f0f6 Bug 1523969 part 14 - Move method definition inline comments to new line in 'layout/'. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D21115
2019-02-25 16:09:24 -06:00
Masayuki Nakano 281fa14d64 Bug 998941 - part 1-7: Make HTMLEditor set InputEvent.data to serialized color value when InputEvent.inputType is "formatBackColor" or "formatForeColor" r=smaug,m_kato,emilio
Although neither Chrome nor Safari does not set InputEvent.data when the event
is caused by `document.execCommand()` with `backColor`, `foreColor` nor
`hiliteColor`, Safari supports styling color with touchbar and in that case,
Safari sets it (*1).

Additionally, currently Safari uses `rgb()` to represents a color value and
using same rule to serializing color value for CSS OM matches Safari's behavior
and can represent any valid color values.

This patch makes given color value parsed and then serialized with same code
in style system.  If the value is `currentcolor`, `inherit`, `initial` or `reset`, sets
the value as-is for now.  Additionally, when given value is invalid, sets the value
as-is for forward compatibility.

Note that automated tests will be added into input-events-exec-command.html
by the last patch.

1. https://github.com/w3c/input-events/issues/94#issuecomment-461061517

Differential Revision: https://phabricator.services.mozilla.com/D19295
2019-02-19 06:31:28 +00:00