Commit graph

403 commits

Author SHA1 Message Date
Job Bautista
cc6b0f11e7 Issue #2107 - Clean up caret when destroying editor.
Editor changes caret visibility during drag and drop. But when destroying
editor, we don't restore caret state. So we should restore it when destroying
editor.

Co-authored-by: Makoto Kato <m_kato@ga2.so-net.ne.jp>
2023-02-20 11:11:02 +08:00
FranklinDM
4c9665a4ae Issue #2104 - Part 2: Indicate if a label was cropped via the "_is_cropped" attribute 2023-02-08 16:57:11 +08:00
FranklinDM
60c344a56b Issue #2104 - Part 1: Implement "clip" attribute value for XUL string cropping
This implements the "clip" attribute value for the "crop" attribute found in XUL label elements. It functions similarly to having the text-overflow property set to an empty string or "". This shouldn't break previously established behavior as it only adds a new value to be checked.

The behavior of the "none" attribute value in the documentation (https://udn.realityripple.com/docs/Archive/Mozilla/XUL/Attribute/crop) is incorrect. The "none" attribute value literally means "don't crop anything" if you'd check the code and is also equivalent to not setting the "crop" attribute at all. This has always been the case since Firefox 2 (earliest version I checked) and apparently, this section of the documentation was copied verbatim from XULPlanet without even checking if it's correct.
2023-02-08 16:56:51 +08:00
FranklinDM
56e636d8ec Issue #2084 - Part 2: Simplify logic in CSSParserImpl::LookupKeywordPrefixAware
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1259348
2023-01-10 07:41:39 +08:00
FranklinDM
db3ce13f28 Issue #2084 - Part 1: Remove CSSUnprefixingService.js and associated code
It's effectively dead code since it's been supplanted by built-in webkit-prefixed-CSS support (landed before fork point in Firefox 49).

Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1259348
2023-01-10 07:37:30 +08:00
Moonchild
e38f362d44 Issue #2075 - Part 5: Allow logical aliases in the property database. 2023-01-06 20:36:35 +08:00
Moonchild
1b22ef40f9 Issue #2075 - Part 4: Update tests
* Update reftests to use inset-*
* Update property database
* Update logical properties test
2023-01-06 20:36:22 +08:00
Moonchild
07af4123d1 Issue #2075 - Part 2: Update devtools for inset-* 2023-01-06 20:35:53 +08:00
Moonchild
0c37c0db8f Issue #2075 - Part 1: Rename offset-* logical properties to inset-*
This adds aliases behind a pref with the old offset-* names
2023-01-06 20:35:40 +08:00
Job Bautista
ca3361fb57 Issue #2068 - Only wrap the last line of inline elements when positively padding to the right.
This fixes the 21 year old Mozilla bug 122795.

Co-authored-by: Jonathan Kew <jfkthame@gmail.com>
2022-12-30 09:21:14 +08:00
Job Bautista
09cbcd3413 Issue #2063 - Ensure a floated ::first-letter inherits from ::first-line.
This fixes the 24 year old Mozilla bug 13610.

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2022-12-30 09:09:13 +08:00
Martok
3f073056de Issue #2030 - Pref-gate default button event dispatch logic 2022-12-02 23:56:21 +08:00
Martok
4354c7a1bc Issue #2030 - Allow child nodes of button to participate in mouse hit tests
This is needed for web compatibility, even if standards compliance is debatable.
2022-12-02 23:55:57 +08:00
Martok
4d310562d9 Issue #2030 - (chore) refactor event dispatch functions
Based on selected bits of M-C 1461708:
- EventStateManager::CheckForAndDispatchClick() to early-return style
- split EventStateManager::CheckForAndDispatchClick() into:
  EventCausesClickEvents, PostHandleMouseUp, DispatchClickEvents
- Move implementation of UIEvent::GetRangeParent() and UIEvent::RangeOffset() to nsLayoutUtils
2022-12-02 23:55:37 +08:00
Moonchild
1868e88741 Fix some debug assertions.
refactored code porting in assertions causing debug build failures.
2022-10-06 10:26:38 +08:00
roytam1
52a48df032 Revert "Issue #1986 - Use logical coordinates in flex containers."
This reverts commit 7527371d78.
2022-09-29 15:18:18 +08:00
roytam1
c522a01d6c Revert "Issue #1986 - Part 2: Add IsItemInlineAxisMainAxis() and rework some nsFrame code."
This reverts commit c3e18955ad.
2022-09-29 15:18:10 +08:00
roytam1
e46011bcc3 Revert "Issue #1986 - Add in reftests for new behavior."
This reverts commit cf5dfc5e7d.
2022-09-29 15:18:00 +08:00
Moonchild
fa8bc1e81c Issue #1992 - Part 1: Un-prefix -moz-{min|max}-content keywords. 2022-09-23 11:03:34 +08:00
Moonchild
b27475f6a9 Issue #80 - Re-unify most of the layout engine 2022-09-09 10:12:59 +08:00
Moonchild
5dfded811d Issue #80 - reinstated unified building for some large chunks of our code.
This should reduce compile complexity saving time and reducing linker stress.
2022-09-07 10:36:23 +08:00
Jeremy Andrews
cf5dfc5e7d Issue #1986 - Add in reftests for new behavior.
Almost forgot to do this. This is in case we need to revisit this for
regressions in the future and the tests are not available online. Never know
when they might come in handy again.
2022-08-24 09:28:06 +08:00
Jeremy Andrews
c3e18955ad Issue #1986 - Part 2: Add IsItemInlineAxisMainAxis() and rework some nsFrame code.
It turns out part 10 was actually needed, but Bug 1449838 had a significantly
better version of what that code does that was easy enough to backport to what
we have. As far as I can tell, this passes the relevant reftests now.
2022-08-24 09:27:32 +08:00
Jeremy Andrews
7527371d78 Issue #1986 - Use logical coordinates in flex containers.
This mostly reworks the way nsFlexContainerFrame handles things so that it can
deal with more than just height.
2022-08-24 09:27:13 +08:00
Jeremy Andrews
05d0cf7d47 Issue #1970 - Follow-up: Better fix for Unix that works on newer GCC.
My previous fix apparently only worked with GCC 7. Having that return at the
end doesn't seem to hurt anything on Windows, so I see no reason to ifdef it.

I don't remember where I heard this, but I vaguely remember hearing that
ending a function without a return statement may be undefined behavior that
differs between compilers and operating systems. If so, that would explain why
this has behaved so differently across platforms and compilers.
2022-08-24 09:26:55 +08:00
Moonchild
b18a680d4f Issue #1970 - Part 7: Restore proper spacing in select for CJK/asian
The issue is that select elements may contain some non-Latin characters that
need extra block-size to display than the one line-height calculated by using a
Latin font spec in the style.
Before this patch, when a control has an unconstrained block-size, we set
the element's block-size to one line-height in Reflow(), which is intended to
properly initialize `BlockReflowInput::mMinLineHeight` since it uses
`line-height:-moz-block-height`.

However, this simply prevents the display from choosing a larger block-size
after the reflow occurs. Previously, this discrepancy was absorbed by the extra
padding present to make select elements the same intrinsic size as buttons, but
since we did away with that, we're losing the extra space and the font glyphs
get clipped.

This patch fixes the issue by carrying the computed line height over to the
element's display so that its computed block-size is still unconstrained.
This way it can accommodate taller characters in the display text.

After this patch, a <select><option> containing non-Latin characters should have
the same block-size as <button>, and no characters should be clipped.
2022-08-04 14:25:30 +08:00
Moonchild
7203916733 Issue #1970 - Part 6: Rename CalcLineHeight(), and cache used line height
To better distinguish the calculation of line height (still present with args)
and simply getting the line height without args, it's now called GetLineHeight()
This also introduces `mLineHeight` to cache specifically calculated line heights
that aren't "auto" (which is a magic value), and it opens up the possibility to
override it in Part 7.
2022-08-04 14:25:13 +08:00
Moonchild
bbbfa54ee4 Issue #1970 - Part 5: Move combobox/select padding to the select rule.
This doesn't change behavior by default but allows authors to remove the padding
previously enforced to align with focus ring padding, if they wish to.
2022-08-04 14:24:57 +08:00
Moonchild
8101720ca8 Issue #1970 - Part 4: Don't overflow -moz-focus-inner border. 2022-08-04 14:24:41 +08:00
Moonchild
4712b75d5c Issue #1970 - Part 3: Update reftests. 2022-08-04 14:24:28 +08:00
Moonchild
e54e8f61bb Issue #1970 - Part 2: Remove the extra padding on buttons
Extra padding was created for a prospective -moz-focus-inner ring.
We now just size that ring the same as the content frame, inflated by its CSS
padding.
2022-08-04 14:24:10 +08:00
Moonchild
8de47d99c4 Issue #1970 - Part 1: Remove unused moz-focus-outer code for buttons. 2022-08-04 14:23:41 +08:00
Moonchild
5ed7e7d56d Issue #1805 - Improve stack size limits for all targets.
This allows us to use a greater rendering depth for exceedingly-deep DOM trees
in layout, better matching what mainstream browsers are capable of. Note that
for 32-bit Windows the stack size MUST be set to larger than the default or Bad
Things Will Happen™ - we use 1.5 MB for this as a carefully-tuned value.

This needs to be capped specifically for JS use because some JavaScript
obfuscators deliberately trigger stack overflows and would lock up the browser
otherwise as long as there's still stack space to abuse. For web compatibility
we therefore limit this to 2MB in JS only (3x for ASAN) while still allowing
a greater depth for the layout engine.
2022-07-26 22:26:38 +08:00
Job Bautista
5dc15ae641 Issue #1916 - Part 3: Sticky/relative position fixes in nsTableWrapperFrame.
Backported from Mozilla bug 1472602.
Didn't include the change in StickyScrollContainer.cpp because it breaks
 linking to libxul.so in the end. It's not important anyway.
2022-06-22 09:01:54 +08:00
Job Bautista
797ddb4d88 Issue #1916 - Part 2: Add a flag to allow FinishReflowChild to handle relative positioning, and convert the caller for which this makes sense.
Backported from Mozilla bug 1547759.
2022-06-22 09:01:41 +08:00
Job Bautista
0423d83560 Issue #1916 - Part 1: Convert flags passed to ReflowChild, FinishReflowChild, etc into an enum class.
Backported from Mozilla bug 1571250.
2022-06-22 09:01:25 +08:00
Moonchild
afbfbcb1e1 Issue #1914 - Implement white-space: break-spaces
This also simplifies GetCSSWhitespaceToCompressionMode (FFS with the function
names, Mozilla!) to be less fragile.
2022-06-13 09:10:57 +08:00
trav90
c782076add Issue #457 - Remove the constructor from gfxShapedText::CompressedGlyph and make it a trivial class
Also provide a couple of convenience "factory" methods to create simple and complex glyph values.
2022-05-31 09:13:12 +08:00
FranklinDM
d81a856374 Fix property alias indentation 2022-05-04 10:11:06 +08:00
FranklinDM
317b7dec08 Issue #1853 - Follow-up: Add missing end of array marker to scrollbar width keyword table
This prevents the parser from accepting values outside the keyword table.
2022-05-04 10:10:58 +08:00
Brian Smith
d5c43d1d35 Issue #1829 - Readd code cleanup that is not Mac related that got clobbered by reverting Issue #1751 2022-05-04 10:01:23 +08:00
Brian Smith
13fcc4a046 Issue #1829 - Revert "Issue #1751" 2022-05-04 09:40:24 +08:00
roytam1
470a6e4401 Revert "Issue #1860 - Change LayerManagerData::mDisplayItems to a vector instead of hashtable"
This reverts commit 070b283e38.
2022-05-02 23:11:34 +08:00
roytam1
1f85f6ab93 Revert "Issue #1860 - Follow-up: Make sure we don't add duplicate frames"
This reverts commit f039cc7ef8.
2022-05-02 23:11:24 +08:00
roytam1
6be9a7c374 Revert "Issue #1860 - Follow-up: Fix indentation."
This reverts commit 5422762839.
2022-05-02 23:11:16 +08:00
FranklinDM
8a7587b401 Issue #21 - Remove use counters telemetry
This reverts Bug 968923 - Implement some equivalent of Chrome's use counters (on top of telemetry?)

For reference: https://bugzilla.mozilla.org/show_bug.cgi?id=968923
2022-04-28 10:43:09 +08:00
Moonchild
eaf9e756a0 Issue #21 - Remove remaining telemetry structs, callers and flags. 2022-04-28 10:33:44 +08:00
Moonchild
8d800b1cb0 Issue #21 - Remove Telemetry plumbing and fix build.
Note this won't give working applications. Requires FE changes and
additional js module changes (next part).
2022-04-28 10:25:48 +08:00
roytam1
92a1cc3139 Revert "Issue #21 - Remove use counters telemetry"
This reverts commit 8ca9db6b65.
2022-04-27 16:25:00 +08:00
FranklinDM
8ca9db6b65 Issue #21 - Remove use counters telemetry
This reverts Bug 968923 - Implement some equivalent of Chrome's use counters (on top of telemetry?)

For reference: https://bugzilla.mozilla.org/show_bug.cgi?id=968923
2022-04-27 16:15:31 +08:00