Commit Graph

324 Commits

Author SHA1 Message Date
Moonchild 9b1406f183 Merge pull request 'Fix up -moz-tab-size and unprefix it.' (#1674) from athenian200/UXP:tab-size-length into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1674
2020-10-30 22:36:49 +00:00
athenian200 d22717ff98 Issue #1673 - Part 5: Fix brace style and missed -moz-tab-size reference. 2020-10-29 13:16:53 -05:00
athenian200 9ffc5e6c92 Issue #1673 - Part 4: Unprefix -moz-tab-size.
While we do fail a couple of tests, the other mainstream browsers also fail them and I think our implementation of tab-size is good enough to be unprefixed at this point. Having this patch also makes testing easier.
2020-10-28 14:17:51 -05:00
athenian200 a2c26490b4 Issue #1673 - Part 3: Bring minimum tab advance up to spec.
This provides a clearer rule for the minimum tab advance that brings us to alignment with the spec and both major browsers.
2020-10-28 14:17:16 -05:00
athenian200 7c2bcc48c4 Issue #1673 - Part 2: Make tab-size animatable and fix typos.
There were a few typos in the previous patch and this patch also makes tab-size animatable which didn't really require much of a change at all.
2020-10-28 14:17:02 -05:00
athenian200 49765b53af Issue #1673 - Part 1: Allow tab-size to accept <length>.
Currently -moz-tab-size only accepts <number> values, and both Chrome and Firefox currently support <length> values and have for some time now. So with this you would be able to support sizes in px or em, for instance. This was implemented in Firefox 53 and was trivial to backport.
2020-10-28 14:16:42 -05:00
Moonchild 6a4c3caa8e Issue #1656 - Nuke the remaining vim lines in UXP
Closes #1656
2020-10-26 19:09:16 +00:00
Moonchild 6eba9263cc [layout] Re-order rowgroups if reflowing.
This logic was missing for tfoot. See existing code in second hunk.
2020-10-23 11:10:13 +00:00
Moonchild 2cd89d5845 [layout] Avoid negative availSize.BSizes in paginated table reflow. 2020-10-23 10:36:09 +00:00
Moonchild 3b224b2b26 [DOM] When failing to create a channel and an image request, make sure to set
the image blocking status appropriately.

This is the same status as we do for known no-data protocols and ensures we
treat these two cases the same.
2020-10-22 20:43:08 +00:00
Moonchild e8ae76d473 Merge branch 'master' of https://github.com/MoonchildProductions/UXP 2020-10-20 09:52:16 +00:00
Moonchild 5072843ee3 Issue #1671 - Unprefix ::-moz-selection
This actually keeps both pseudo-elements for now, since the prefixed version is
still used internally, but we need the unprefixed version for web compat.
Note: while unprefixing a non-spec-compliant pseudo here, it's exactly in line
with what other browsers do. Nobody is following the spec here and at least
we'll be doing what everyone else is with our unprefixed version.
2020-10-20 09:49:51 +00:00
athenian200 95b4e5084b Merge branch 'master' of https://github.com/MoonchildProductions/UXP into caret_color 2020-10-18 10:45:55 -05:00
athenian200 1fc996152b Issue #1668 - Part 2: Visited color and auto support for caret-color property.
Mozilla's original implementation of this failed a couple of tests, but this seems to solve all the problems. Basically, the caret-color wasn't able to be set differently based on whether a link was visited, and the auto value implementation was incomplete. The only test we fail now is the one where you have grey text on a grey background and the caret is supposed to be visible, but I think that may have been removed from the spec. Even if it wasn't, no other browser supports it anyway.
2020-10-18 10:12:53 -05:00
athenian200 8e3832bacb Issue #1668 - Part 1: Implement support for caret-color property.
This CSS property allows input carets (that blinking input cursor you see in text fields), to be given a custom color. This was implemented in Firefox 53, and it was such a minor feature that no one ever missed it, but I don't see any harm in implementing this.

https://bugzilla.mozilla.org/show_bug.cgi?id=1063162
2020-10-18 10:04:12 -05:00
Moonchild dadef50bdc Issue #1666 - Implement overflow-wrap: anywhere
This aligns with the current spec regarding overflow-wrap: break-word and
overflow-wrap: anywhere in if it affects intrinsic sized due to considering
soft-wrap opportunities or not.
See CSS Text Module Level 3, Editor’s Draft, 1 October 2020, Section 5.5
2020-10-03 14:52:47 +00:00
Moonchild 8e18743ab8 Issue #1665 - Take overflow-wrap into account when calculating min-content intrinsic size. 2020-10-03 12:45:27 +00:00
athenian200 b8c604196b Issue #1647 - Followup: Remove excessive VARIANT_OPACITY statements.
I got very anxious about making sure I included VARIANT_OPACITY in all the places VARIANT_NUMBER was included to make sure it couldn't possibly break unexpectedly, and that led to me accidentally breaking a mechanism that prevented percentages from serializing as numbers in other parts of the code. It was a total accident, and these additions were unnecessary. Basically, the situation is that there was one part of the code where it determines what's allowed for the flex statement (and possibly other statements) by checking whether it got stored as a "number", and basically only disallows percentages if it attempted to store/serialize them as percentages.

However, it only got to that part of the code because I accidentally allowed VARIANT_OPACITY as a valid way for certain tokens to parse where it wasn't necessary. If it tries to parse it that way under very specific circumstances... percentages will be marked valid and fed through the system as numbers rather than being rejected and not serialized at all, because the check to disallow percentages there relied on them being stored as percentages.

It's a really weird thing to have a problem with in a lot of ways, because if percentages aren't allowed in a field, you would think people wouldn't try to use them there, much less depend on the broken behavior that results from them not parsing as a related value.
2020-09-30 14:09:10 -05:00
Moonchild e0bda22462 Issue #1656 - Part 10: Manual cleanup. 2020-09-24 09:22:12 +00:00
Moonchild 6b9f2095a3 Issue #1656 - Part 9: Single-line-comment style. 2020-09-24 08:56:05 +00:00
Moonchild 4a42352e64 Issue #1656 - Part 8: Devtools and misc. 2020-09-24 08:10:23 +00:00
Moonchild d5a2c45aad Issue #1656 - Part 6: Clean up the build files 2020-09-23 15:52:00 +00:00
Moonchild 7523b9ea04 Issue #1656 - Part 4: Manual cleanup 2020-09-23 15:37:46 +00:00
Moonchild 528b88d704 Issue #1656 - Part 3: Nuke more vim config lines in the tree.
Another S&R run with some smarter matching.
2020-09-23 15:14:30 +00:00
Moonchild 5d97621bb9 Issue #1656 - Part 2b: Unmangle one more lost little UTF-8 victim. 2020-09-23 14:57:31 +00:00
Moonchild 7572f37186 Issue #1656 - Part 2: Unmangle some unfortunate UTF-8 victims.
The poor fellows got lost in an ASCII-interpretation of the world.
2020-09-23 14:52:16 +00:00
Moonchild a680bdc637 Issue #1656 - Part 1: Nuke most vim config lines in the tree.
Since these are just interpreted comments, there's 0 impact on actual code.
This removes all lines that match /* vim: set(.*)tw=80: */ with S&R -- there are
a few others scattered around which will be removed manually in a second part.
2020-09-23 13:55:00 +00:00
Moonchild 388b9c8022 Issue #1655: Update MediaQueryList to the current draft spec.
This make MediaQueryList inherit from EventTarget and adds MediaQueryListEvent
as an interface as well as the onchange() method.
This should not affect compatibility with other code; the event object is a
MediaQueryListEvent instance, which is recognized as a MediaListQuery instance.
2020-09-23 08:24:14 +00:00
Moonchild c1988898f2 Merge pull request #1654 from athenian200/opacity_percentage
Implement percentage for CSS opacity keywords
2020-09-18 10:23:00 +00:00
athenian200 b5c9f8e24e Issue #1647 - Part 2: Implement VARIANT_OPACITY to correctly serialize.
Even though percentages are already treated as floats internally by the style system for computation purposes, you have to go out of your way to stop them from being read back out as percentages. What I do here amounts to storing the percentage token in the "wrong" container, the one normally used for floats. This allows a value that was read in as a percentage to be read back out as something else, which is normally prevented by the design of the style system.
2020-09-17 16:01:38 -05:00
athenian200 51764ac722 Issue #1647 - Part 1: Implement percentage for CSS opacity keywords
This preliminary step allows percentages to be computed and display correctly,
but unfortunately it fails a test after changing VARIANT_HN to VARIANT_HPN because that allows values to be serialized as percentages. However, not doing this means percentages are rejected as valid values for the user to input. The way the style system is setup makes it hard to change this for opacity without changing it for everything else, especially since some code-saving speed hacks in Bug 636029 and Bug 441367 that make a lot of assumptions about this stuff very rigid.
2020-09-16 17:34:03 -05:00
Moonchild b6b868b1bd Issue #1643 - Part 4: Hook up all the plumbing. 2020-09-16 19:39:33 +00:00
Moonchild 85f915543c Merge pull request #1651 from athenian200/link_element_disabled
Clean up local variables from <link> disabled issue.
2020-09-13 11:17:55 +00:00
Moonchild 9eb8b61b8c Issue #1650 - Add null check.
There are situations where nsCSSClipPathinstance->CreateClipPath(dt)
returns null. We need to check for this before trying to use its
functions. If there is no clip path, then always return "no hit".
2020-09-12 20:20:02 +02:00
athenian200 1f65f171aa Issue #1629 - Part 5: Remove pointless local variables.
Since the local variable is always initialized to false, we don't actually need to declare it and can just pass "false" directly as a parameter to the PrepareSheet function's bool. I was worried about code readability at first, but some well-placed comments took care of that.
2020-09-09 01:40:15 -05:00
athenian200 8f95bacca4 Issue #1629 - Part 4: Ensure isExplicitlyEnabled is false upon sheet creation.
This clarifies the assumptions the code is making and the order in which the variables pass through the loading process. The new variable is set after the sheet is created and prepared, and is assumed to be false in the beginning.
2020-09-06 13:51:08 -05:00
athenian200 6b2c3b61b1 Issue #1641 - Implement CSS flow-root keyword
This is just a clean port of 1322191 and follow-up 1325970. It really seems to add create a new way to access existing code relating to block formatting and floating elements rather than implementing new functionality, and it is mercifully straightforwards.
2020-09-03 18:55:28 -05:00
Moonchild 7ca7fe802e Merge pull request #1632 from athenian200/link_element_disabled
Respond to disabled attribute set on <link> elements from HTML
2020-08-18 12:17:17 +00:00
Gaming4JC 22c6728132 Issue #1620 - Intrinsic Aspect Ratio: Debug Follow up.
Newly introduced aspect-ratio property did not have CSS_PROP_LIST_EXCLUDE_INTERNAL defines, resulting in the following assertion:
\!nsCSSProps::PropHasFlags(p, (1<<28)) (properties defined outside of #ifndef CSS_PROP_LIST_EXCLUDE_INTERNAL sections must not have the CSS_PROPERTY_INTERNAL flag), at ...layout/style/nsCSSProps.cpp:289

This patch resolves the assertion by adding #ifndef around the aspect-ratio property.
2020-08-16 14:08:38 -04:00
athenian200 6862326357 Issue #1629 - Part 2: Implement the Explicitly Enabled flag.
This part of the bug was significantly complicated by the following major refactors:

https://bugzilla.mozilla.org/show_bug.cgi?id=1456435
https://bugzilla.mozilla.org/show_bug.cgi?id=1459498

As best as I can tell, we just need to implement the explicitly enabled
flag on every instance of GetStyleSheetInfo, make sure
aIsExplicitlyEnabled is false in every situation except the one where
the disabled content attribute is removed from a link element, and
enable alternate stylesheets if this flag is set on them. So we take the
explicitly enabled flag as an input to PrepareSheet, and also add it to
LoadStyleLink and LoadInlineStyle. I also decided not to defer loading of
alternate stylesheets that have been explicitly enabled.
2020-08-13 01:09:58 -05:00
Moonchild d3383327a7 [CSS] Alias -webkit-appearance for compatibility reasons
Since this is supported as an alias by Firefox and Edge for the same
reasons and we have websites using this to (attempt to) override the
system-provided styling with their own, leaving out the only supported
keyword we'd otherwise have (with -moz- prefix) but still stating
-webkit-.

TODO: unprefix this completely and make the vendor prefixes aliases.
2020-08-10 12:13:10 +02:00
Andy 644f617e66 Issue #1620 - Remove Development Comments 2020-08-07 14:31:36 -07:00
Andy 3ed884a6ad Issue #1620 - Use Intrinsic Aspect Ratio for Images
https://bugzilla.mozilla.org/show_bug.cgi?id=1547231
https://bugzilla.mozilla.org/show_bug.cgi?id=1559094
https://bugzilla.mozilla.org/show_bug.cgi?id=1633434
https://bugzilla.mozilla.org/show_bug.cgi?id=1565690
https://bugzilla.mozilla.org/show_bug.cgi?id=1602047

Make use of Aspect Ratios in Image frames before Images are loaded.
- Check for width and height HTML properties and create a ratio with them.
- Overwrite HTML size values with actual image dimensions on load.
- Collapse any frames with srcless images.

Comments:
dom/html/nsGenericHTMLElement.cpp:1483
layout/generic/nsImageFrame.cpp:289
2020-08-04 13:56:45 -07:00
Andy a90b8d98e8 Issue #1619 - Nits Picked 2020-08-02 08:01:58 -07:00
Andy ba0a2e796d Issue #1619 - Add Vertical Writing Testcase
Ensures aspect ratio numerator and denominator aren't swapped in vertical writing modes.
https://bugzilla.mozilla.org/show_bug.cgi?id=1548768
2020-08-01 20:54:54 -07:00
Andy e664d43699 Issue #1619 - Missing Dimension Computation
This existed in Firefox before this bug.
I don't know if it came from a previous bug or was removed post-fork.
2020-07-31 22:42:38 -07:00
Andy 232f987cf4 Issue #1619 - Convert Intrinsic Ratio to Float
https://bugzilla.mozilla.org/show_bug.cgi?id=1547792

Aspect Ratio handling simplified by using floating point integers:
- Multiplication of value (or inverse value) to a known side for Scaling
- No unequal equal values such as "4/3" vs "8/6" vs "20/15"
- Truly "Empty" aspect ratios, even if one dimension is not 0
2020-07-31 13:01:18 -07:00
Lootyhoof d18faf8193 Issue MoonchildProductions/UXP#1578 - Add global menubar support for GTK 2020-06-09 13:41:53 +01:00
Moonchild fdb918dea1 Merge pull request #1576 from win7-7/1379306-pr
Fix the wrong position when we calculate the position for position:absolute child
2020-06-04 21:34:32 +02:00
win7-7 fb564353f2 issue #1575 - Fix the wrong position when we calculate the position for position:absolute child and add reftests
Use |GetUsedBorder| instead of |GetComputedBorder| when we calculate the position for position:absolute child.
2020-06-02 11:55:46 +03:00