Fixes font shorthand serialization so that it serializes to "" when non-default subproperties are defined. These subproperties are those defined in #15033.
Adds tests:
- font_should_serialize_to_empty_if_there_are_nondefault_subproperties
- font_should_serialize_all_available_properties
The second test was previously commented out and underwent some cleanup to make it run.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix#15036
<!-- Either: -->
- [X] There are tests for these changes
Source-Repo: https://github.com/servo/servo
Source-Revision: fbd561bc2fc2d5529f805c5ae07c04b3c343bc40
--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 8959c42e64687d29f982cfacf0ec4bd064b535d4
So that we can write gtests easily at next patch.
MozReview-Commit-ID: 8ZWVYO1hDOW
--HG--
extra : rebase_source : 8c3523b06fe284376d59914ecfa3791a91930fc2
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix#16026 (github issue number if applicable).
Source-Repo: https://github.com/servo/servo
Source-Revision: 058b93640f03a8ba434e54f891a4d51d79965c8c
--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : bbc94cb1f679a587dd86c267b07258384a75fb14
<!-- Please describe your changes on the following line: -->
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [Bug 1341642](https://bugzilla.mozilla.org/show_bug.cgi?id=1341642)
<!-- Either: -->
- [X] These changes do not require tests because they are stylo changes.
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Source-Repo: https://github.com/servo/servo
Source-Revision: a2c33ac6e6e18c186e9af45274a7b8499ba1bc4c
--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 9aeaa20c216e7d4c7fb5726b64c2deef33a27f90
This adds release bounds checking to ReplaceElementsAt, InsertElementAt, and
InsertElementsAt to make sure the insertion point is within the current array
bounds.
MozReview-Commit-ID: 1pFr8LuOROI
The cleanup work includes:
part 1: make all methods 'const' for the abstract class of PropertyProvider.
part 2: make nsFontMetrics's StubPropertyProvider final.
part 3: make nsTextFrame's PropertyProvider final.
Make some methods 'const' and some variables 'mutable', so we could let all the
overridden methods stay const.
We also need to make the pass-in parameter of gfxFontGroup's GetHyphenWidth const.
Note that the comment of GetHyphenWidth seem outdated, so I fixed it as well.
part 4: make the member variables in nsTextFrame's PropertyProvider to be 'const'.
Make all the member variables 'const' except mStart, mLength,
mJustificationArrayStart, and mJustificationSpacings.
The static function AdvanceToNextTab is fixed since we only use 2 of the 4 parameters.
part 5: coding style fix for nsTextFrame's PropertyProvider.
MozReview-Commit-ID: 1kbWPwx27aQ