Commit Graph

392 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
65942fcd2c Bug 1472551 - Serialize font properties using Servo. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D1905
2018-07-01 23:00:18 +00:00
Xidorn Quan
c76750cdcb Bug 1471114 part 5 - Remove unused keyword tables. r=emilio
This is done with the following script:
```python
#!/usr/bin/env python3

import re
import subprocess

from pathlib import Path

HEADER = Path("layout/style/nsCSSProps.h")
SOURCE = Path("layout/style/nsCSSProps.cpp")

RE_TABLE = re.compile(r"\b(k\w+KTable)")
rg_result = subprocess.check_output(["rg", r"\bk\w+KTable"], encoding="UTF-8")
to_keep = set()
all = set()
for item in rg_result.splitlines():
    file, line = item.split(':', 1)
    name = RE_TABLE.search(line).group(1)
    path = Path(file)
    if path != HEADER and path != SOURCE:
        to_keep.add(name)
    else:
        all.add(name)

to_remove = all - to_keep
remaining_lines = []
with HEADER.open() as f:
    for line in f:
        m = RE_TABLE.search(line)
        if m is not None and m.group(1) in to_remove:
            print("Removing " + m.group(1))
            continue
        remaining_lines.append(line)
with HEADER.open("w", newline="") as f:
    f.writelines(remaining_lines)

remaining_lines = []
removing = False
RE_DEF = re.compile(r"KTableEntry nsCSSProps::(k\w+KTable)\[\]")
with SOURCE.open() as f:
    for line in f:
        if removing:
            if line == "};\n":
                removing = False
            continue
        m = RE_DEF.search(line)
        if m is not None and m.group(1) in to_remove:
            if remaining_lines[-1] == "\n":
                remaining_lines.pop()
            removing = True
            continue
        remaining_lines.append(line)
with SOURCE.open("w", newline="") as f:
    f.writelines(remaining_lines)
```

MozReview-Commit-ID: FeDZRcBceqV
2018-06-27 15:34:29 +10:00
Xidorn Quan
44dbdcf9ba Bug 1465628 part 1 - Use a static table for property preferences. r=emilio
MozReview-Commit-ID: 7tCdZyAlZc0
2018-05-31 13:49:25 +10:00
Dorel Luca
98ba7a517a Backed out 4 changesets (bug 1465628) for Eslint failure. CLOSED TREE
Backed out changeset 04f276eb2f0e (bug 1465628)
Backed out changeset e9cdff122793 (bug 1465628)
Backed out changeset 6832baa28e3f (bug 1465628)
Backed out changeset e5ac0c7a9fb4 (bug 1465628)
2018-06-05 04:00:30 +03:00
Xidorn Quan
c28f8ce021 Bug 1465628 part 1 - Use a static table for property preferences. r=emilio
MozReview-Commit-ID: 7tCdZyAlZc0
2018-05-31 13:49:25 +10:00
Xidorn Quan
c99fb101b1 Bug 1457802 part 3 - Remove unused keyword tables. r=heycam
MozReview-Commit-ID: A94JflJh368
2018-04-30 09:56:26 +10:00
Xidorn Quan
d15c0375b6 Bug 1457802 part 1 - Remove nsCSSProps::GetColorName which is unused. r=heycam
MozReview-Commit-ID: GybpTh6GYYx
2018-04-30 09:20:53 +10:00
Xidorn Quan
60ccc2c478 Bug 1448759 part 3 - Remove kKeywordTableTable and LookupPropertyValue. r=heycam
MozReview-Commit-ID: F2EbL0hSgPX
2018-04-29 21:41:29 +10:00
Xidorn Quan
03f92561ac Bug 1448759 part 1 - Make KTableEntry an independent type. r=heycam
MozReview-Commit-ID: oZfJAigThN
2018-04-29 21:17:26 +10:00
Xidorn Quan
24229a92ad Bug 1434130 part 15 - Remove kCSSRawPredefinedCounterStyles. r=emilio
MozReview-Commit-ID: 5aiU0VChbpY
2018-04-29 09:03:31 +10:00
Xidorn Quan
1ad9164042 Bug 1434130 part 14 - Remove nsCSSProps::kParseVariantTable. r=emilio
The parsevariant field is not removed from nsCSSPropList.h since that
file is going away soon anyway.

MozReview-Commit-ID: 3nRBQtmZRKG
2018-04-29 09:03:31 +10:00
Xidorn Quan
f0cd165e77 Bug 1456364 part 4 - Convert CSS_PROPERTY_* flags to a typed enum flags. r=emilio
MozReview-Commit-ID: 4mLPe5cH80N
2018-04-26 16:24:33 +02:00
Xidorn Quan
83a152a5a4 Bug 1456364 part 2 - Remove PropertyParseType. r=emilio
MozReview-Commit-ID: 3JDLVKJAlpv
2018-04-26 16:24:31 +02:00
Andreea Pavel
c6bbb5991e Backed out 4 changesets (bug 1456364) for build bustages at /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/dom/AnimationEffectReadOnlyBinding.h:35 on a CLOSED TREE
Backed out changeset 020151240bb8 (bug 1456364)
Backed out changeset bc0aa5224d91 (bug 1456364)
Backed out changeset d919bbe7440c (bug 1456364)
Backed out changeset ab1472823e8a (bug 1456364)
2018-04-26 08:27:45 +03:00
Xidorn Quan
c6acf387e3 Bug 1456364 part 4 - Convert CSS_PROPERTY_* flags to a typed enum flags. r=emilio
MozReview-Commit-ID: 4mLPe5cH80N
2018-04-26 15:00:50 +10:00
Xidorn Quan
b03c6f48f8 Bug 1456364 part 2 - Remove PropertyParseType. r=emilio
MozReview-Commit-ID: 3JDLVKJAlpv
2018-04-26 15:00:50 +10:00
Xidorn Quan
baa14002af Bug 1455576 part 4 - Remove CSS_PROPERTY_PARSE_FUNCTION and CSS_PROPERTY_VALUE_PARSER_FUNCTION flags. r=emilio
These are the only remaining flags that we don't generate from Servo
side. We can now assert flags are equal and switch kFlagsTable to use
ServoCSSPropList.h instead.

MozReview-Commit-ID: 6RhXeCf6DgK
2018-04-26 09:01:02 +10:00
Xidorn Quan
7d1a302649 Bug 1448757 part 3 - Remove nsDOMWindowUtils::GetAnimationTypeForLonghand and nsStyleAnimType. r=hiro
MozReview-Commit-ID: 8KsNSaDfsbN
2018-04-20 14:38:46 +10:00
Xidorn Quan
4d5e62215a Bug 1454830 part 4 - Remove CSS_PROPERTY_VALUE_LIST_USES_COMMAS flag. r=emilio
MozReview-Commit-ID: 48CxJTdtku7
2018-04-20 20:38:12 +10:00
Jonathan Kew
c7874269af Bug 1358450 - Remove the layout.css.float-logical-values.enabled pref, now that we support the logical values everywhere. r=heycam 2017-04-21 11:58:17 +01:00
Xidorn Quan
f34f157e61 Bug 1452534 part 2 - Remove nsCSSProps::kSIDTable. r=emilio
MozReview-Commit-ID: DD7sHVmIRIv
2018-04-09 14:34:15 +10:00
Daniel Holbert
dc15017b37 Bug 1105111 part 2: Add support for 'flex-basis:content' in the style system (gecko / getComputedStyle side). r=mats
MozReview-Commit-ID: E0crFCy7Jfk
2018-04-02 04:30:37 +02:00
Xidorn Quan
e9aef3457a Bug 1449039 part 13 - Remove stylestructoffset arg from CSS_PROPs. r=emilio
MozReview-Commit-ID: B3d8z25kyVk
2018-03-27 14:09:57 +11:00
Xidorn Quan
a88cd84afa Bug 1449039 part 11 - Remove some unused functions in nsCSSProps. r=emilio
MozReview-Commit-ID: 6ielCRb3p1U
2018-03-27 12:51:51 +11:00
Xidorn Quan
73c21654d0 Bug 1449039 part 10 - Remove PredefinedCounterStyleTable. r=emilio
MozReview-Commit-ID: AeYqai3Nr72
2018-03-27 12:51:10 +11:00
Xidorn Quan
4575bec55d Bug 1449039 part 9 - Remove ShorthandsContainingTable. r=emilio
MozReview-Commit-ID: 8seKJRCgxiS
2018-03-27 12:26:45 +11:00
Xidorn Quan
becaa26bdf Bug 1449039 part 8 - Remove bunch of unused CSS_PROPERTY_* flags. r=emilio
MozReview-Commit-ID: 4POeai2hmUp
2018-03-27 11:56:31 +11:00
Xidorn Quan
e371ad073c Bug 1449039 part 7 - Remove CSS_PROPERTY_LOGICAL* flags. r=emilio
MozReview-Commit-ID: E1Uk7VRux39
2018-03-27 11:14:29 +11:00
Xidorn Quan
13bcfebd59 Bug 1449039 part 6 - Remove CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED. r=emilio
MozReview-Commit-ID: IQI2CUUsfUd
2018-03-27 11:09:08 +11:00
Xidorn Quan
ba1c829d83 Bug 1449039 part 5 - Remove CSS_PROPERTY_{ABS,FIX}POS_CB constants. r=emilio
MozReview-Commit-ID: 9QZyI1EsJ6l
2018-03-27 11:05:05 +11:00
Xidorn Quan
dc3215f9a8 Bug 1449039 part 4 - Remove ValueRestrictions and its related flags. r=emilio
MozReview-Commit-ID: 6ajTBhVm8Kt
2018-03-27 10:58:05 +11:00
Xidorn Quan
7734221fdd Bug 1449039 part 2 - Remove LogicalGroup. r=emilio
MozReview-Commit-ID: QMMVxURx8w
2018-03-27 10:34:44 +11:00
Xidorn Quan
10ccf10953 Bug 1449039 part 1 - Remove Property{Count,Index}InStruct. r=emilio
MozReview-Commit-ID: Dw1Tx7ZJQXV
2018-03-27 09:51:05 +11:00
Emilio Cobos Álvarez
ff6075119a Bug 1448661: Remove unused CSS_PROPERTY_IS_ALIAS flag. r=jwatt
MozReview-Commit-ID: 10B4pi2Zwsx
2018-03-25 18:24:01 +02:00
Nicholas Nethercote
624d9b96e0 Bug 1436911 - Avoid the early/late prefs split. r=glandium
All prefs that need to be sent to a new content process are now put into the
shared memory segment, and they are identified by the pref name instead of an
index into a list. The old IPC used at process startup (in XPCOMInitData) is
removed.

Benefits:

- It removes the need for the early prefs list
  (dom/ipc/ContentProcesses.{h,cpp}) and the associated checking, which is ugly
  and often trips people up (e.g. bug 1432979, bug 1439406).

- Using prefnames instead of indices fixes some fragility (fixing bug 1419432).

- It fixes the problem of early prefs being installed as unlocked default
  values even if they are locked and/or have user values.

MozReview-Commit-ID: FRIzHF8Tjd
2018-03-08 15:47:24 +11:00
Daniel Holbert
524736585d Bug 1444481 part 3: #include nsStringFwd.h rather than nsString.h in some layout/style headers. r=xidorn
These files only use references to string types, e.g. "nsAString&", so they
only need forward-declarations of these types -- not the full definition.

Note that the last file here (nsStyleUtil.h) already has an #include for
nsStringFwd.h, which is why that files change is just a pure removal (of the
unnecessary nsString.h #include).

MozReview-Commit-ID: 9sLSyeBS49M
2018-03-09 11:55:12 -08:00
Jonathan Kew
73e7d73f9c Bug 1435692 - patch 2 - Implement the font-optical-sizing property in the Gecko style system, to control whether optical size is automatically applied. r=jwatt
MozReview-Commit-ID: ClcWeX6Hsvm
2018-03-03 22:12:11 +01:00
Brad Werth
c09778c518 Bug 1418930 Part 4: Define a CSS property flag to accompany the image preload flag -- to also use anonymous CORS. r=emilio
MozReview-Commit-ID: 9iQgT3g1m9J
2018-01-25 14:56:39 -08:00
Tom Tromey
7948eb7e25 Bug 1255369 - fix getCSSValuesForProperty for line-style-type; r=xidorn
This fixes InspectorUtils::getCSSValuesForProperty to return the
correct values for line-style-type.

MozReview-Commit-ID: 72Tes6y15j8
2018-01-31 08:50:27 -07:00
Tom Tromey
c70a9fc47a Bug 1430616 - correctly find end of keyword table in InspectorUtils; r=heycam
Currently, InspectorUtils::GetCSSValuesForProperty will not return
"match-parent" for "text-align".  The bug is that InspectorUtils uses
an out-of-date approach to finding the end of the keyword table; and
this approach conflicts with the special "unsafe" handling in
TextAlignUnsafeEnabledPrefChangeCallback:

https://dxr.mozilla.org/mozilla-central/rev/21ddfb9e6cc008e47da89db50e22697dc7b38635/layout/base/nsLayoutUtils.cpp#317-321

MozReview-Commit-ID: 58qfKQwIyMX
2018-01-15 09:14:55 -07:00
Nicholas Nethercote
e142bee515 Bug 1421541 - Overhaul the prefs phase code. r=glandium
This code is used to detect too-early accesses of prefs in content processes.

The patch makes the following changes.

- New terminology: "early" prefs are those sent via the command line; "late"
  prefs are those sent via IPC. Previously the former were "init" prefs and the
  latter didn't have a clear name.

- The phase tracking and checking is now almost completely encapsulated within
  Preferences.cpp. The only exposure to outside code is via the
  AreAllPrefsSetInContentProcess() method, which has a single use.

- The number of states tracked drops from 5 to 3. There's no need to track the
  beginning of the pref-setting operations, because we only need to know if
  they've finished. (This also avoids the weirdness where we could transition
  from END_INIT_PREFS back to BEGIN_INIT_PREFS because of the way -intPrefs,
  -boolPrefs and -stringPrefs were parsed separately.)

MozReview-Commit-ID: IVJWiDxdsDV
2017-11-30 09:14:32 +11:00
Cameron McCormack
bd425ba1f2 Bug 1420383 - Move nsCSSProps::kParserVariantTable into its rightful home in nsCSSProps.cpp. r=xidorn
MozReview-Commit-ID: 7Rg3EYq5GPQ
2017-11-24 18:17:36 +08:00
Botond Ballo
d2150a861f Bug 951793 - Style support for overscroll-behavior. r=heycam
MozReview-Commit-ID: IDAfBZy2D5p
2017-11-25 01:28:58 +01:00
Sebastian Hengst
df2429a1ad Backed out 15 changesets (bug 951793) because it landed before the necessary servo changes. r=backout requested by emilio on a CLOSED TREE
Backed out changeset ca8c86e229df (bug 951793)
Backed out changeset 6eef6403fa71 (bug 951793)
Backed out changeset a5e529f52fb1 (bug 951793)
Backed out changeset 054e837609d0 (bug 951793)
Backed out changeset 713a3c9617ce (bug 951793)
Backed out changeset 884913aa1668 (bug 951793)
Backed out changeset c3340b84e534 (bug 951793)
Backed out changeset 50fe3c6ac486 (bug 951793)
Backed out changeset be4e22e5c257 (bug 951793)
Backed out changeset 7055bd5dfc4e (bug 951793)
Backed out changeset fa6da1e723cf (bug 951793)
Backed out changeset 386f77004d89 (bug 951793)
Backed out changeset fa82cdc01408 (bug 951793)
Backed out changeset 867d8ea5355c (bug 951793)
Backed out changeset e61ac8e48971 (bug 951793)
2017-11-25 01:01:41 +02:00
Botond Ballo
3bc3bacff3 Bug 951793 - Style support for overscroll-behavior. r=heycam
MozReview-Commit-ID: IDAfBZy2D5p
2017-11-22 19:01:11 -05:00
Daniel Holbert
8fea3c215f Bug 1412346 part 5: (automated patch) Switch a bunch of C++ files in layout to use our standard mode lines. r=jfkthame
This patch was generated automatically by the "modeline.py" script, available
here: https://github.com/amccreight/moz-source-tools/blob/master/modeline.py

For every file that is modified in this patch, the changes are as follows:
 (1) The patch changes the file to use the exact C++ mode lines from the
     Mozilla coding style guide, available here:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Mode_Line

 (2) The patch deletes any blank lines between the mode line & the MPL
     boilerplate comment.

 (3) If the file previously had the mode lines and MPL boilerplate in a
     single contiguous C++ comment, then the patch splits them into
     separate C++ comments, to match the boilerplate in the coding style.

MozReview-Commit-ID: EuRsDue63tK
2017-10-27 10:33:53 -07:00
Xidorn Quan
bd24dfd6b4 Bug 1393189 part 4 - Remove kListStyleKTable and CSS keywords only used in this table. r=dholbert
MozReview-Commit-ID: IM0cvCSV6tR
2017-08-29 15:41:37 +10:00
Sylvestre Ledru
9d4a84d778 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG
2017-07-06 14:00:35 +02:00
Nicholas Nethercote
4cbdad69e6 Bug 1374580 (part 2) - Remove nsAFlat{,C}String typedefs. r=froydnj.
All the instances are converted as follows.

- nsAFlatString  --> nsString
- nsAFlatCString --> nsCString
2017-06-20 19:19:05 +10:00
Mats Palmgren
bd90393cc1 Bug 1365614 part 3 - Backout bug 1333482 part 1-9. Removes support for [-webkit-]appearance for now b/c web compat issues. r=bz
MozReview-Commit-ID: IbwWM0FL6HF
2017-05-21 17:15:00 +08:00