summaryrefslogtreecommitdiff
path: root/layout/generic
Commit message (Collapse)AuthorAge
* WIP: basic scroll-anchoring attempt.scroll-anchoring-wipMoonchild2022-09-30
| | | | This is incomplete and won't build due to prerequisites.
* Revert "Issue #1986 - Use logical coordinates in flex containers."Moonchild2022-09-27
| | | | This reverts commit 2a57b39dbc1cc8b2bb32dedd87707680a1025430.
* Revert "Issue #1986 - Part 2: Add IsItemInlineAxisMainAxis() and rework some ↵Moonchild2022-09-27
| | | | | | nsFrame code." This reverts commit ef4eb3f926821fe87bf9a64be29d859ab5e0a6f5.
* Issue #80 - Re-unify most of the layout engineMoonchild2022-09-08
|
* Issue #1986 - Part 2: Add IsItemInlineAxisMainAxis() and rework some nsFrame ↵Jeremy Andrews2022-08-16
| | | | | | | | 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.
* Issue #1986 - Use logical coordinates in flex containers.Jeremy Andrews2022-08-16
| | | | | This mostly reworks the way nsFlexContainerFrame handles things so that it can deal with more than just height.
* Issue #1970 - Follow-up: Better fix for Unix that works on newer GCC.Jeremy Andrews2022-08-13
| | | | | | | | | | 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.
* Issue #1970 - Follow-up: Fix GTK3 build for SunOS and CentOS.Jeremy Andrews2022-08-13
| | | | This seems to work for me, but I haven't tested anything else yet. Still, seems better to have a fix in the tree than to leave it as-is.
* Issue #1970 - Part 7: Restore proper spacing in select for CJK/asian1970-form-focusring-stylingMoonchild2022-07-24
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Issue #1970 - Part 6: Rename CalcLineHeight(), and cache used line heightMoonchild2022-07-23
| | | | | | | | 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.
* Issue #1805 - Improve stack size limits for all targets.Moonchild2022-07-15
| | | | | | | | | | | | | 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.
* Issue #1916 - Part 2: Add a flag to allow FinishReflowChild to handle ↵Job Bautista2022-06-17
| | | | | | relative positioning, and convert the caller for which this makes sense. Backported from Mozilla bug 1547759.
* Issue #1916 - Part 1: Convert flags passed to ReflowChild, ↵Job Bautista2022-06-17
| | | | | | FinishReflowChild, etc into an enum class. Backported from Mozilla bug 1571250.
* Issue #1914 - Implement white-space: break-spacesMoonchild2022-06-10
| | | | | This also simplifies GetCSSWhitespaceToCompressionMode (FFS with the function names, Mozilla!) to be less fragile.
* Merge branch 'master' into 1829Brian Smith2022-04-28
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: No issue - Update README and SECURITY Issue #1885 - Follow-up: Update error message if invalid rootMargin specified. Issue #1879 - Follow-up: Update config/external/nss/target to security/target. Issue #1885 - Allow unitless rootMargin entries for IntersectionObserver. Issue #1879 - Revert changes to cryptox.h Revert "Issue #1879 - spot-fix typo in cryptox.h" Issue #1879 - spot-fix typo in cryptox.h Issue #21 - Change MappedAttrParser to store its nsIPrincipal instead of nsSVGElement Issue #21 - Remove use counters telemetry Issue #1881 - Interpret empty or whitespace root margin string as zero length Issue #1877 - Resolve NIGHTLY_BUILD conditionals. Issue #1880 - Boot Comic Sans out of the font configuration.
| * Issue #21 - Remove use counters telemetryFranklinDM2022-04-24
| | | | | | | | | | | | 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
* | Issue #1829 - Readd code cleanup that is not Mac related that got clobbered ↵Brian Smith2022-04-26
| | | | | | | | by reverting Issue #1751
* | Issue #1829 - Revert "Issue #1751 -- Remove XP_MACOSX conditionals from /layout"Brian Smith2022-04-26
|/ | | | This reverts commit aa0fd3d68c856504646e1d7eb499bc890ef44101.
* Issue #1370 - Follow-up: Give table wrapper boxes a special case during flex ↵FranklinDM2022-04-17
| | | | | | base size resolution, so that percent main-sizes can be respected This is a workaround, based on https://bugzilla.mozilla.org/show_bug.cgi?id=1455976
* Issue #1836 - Implement Selection.setBaseAndExtent()Moonchild2022-04-08
|
* Merge pull request 'Implement 'content' keyword for 'flex-basis' property ↵Moonchild2022-04-08
|\ | | | | | | | | | | and address spec changes' (#1854) from FranklinDM/UXP-contrib:work_css-flex-basis-content into master Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1854
| * Issue #1370 - Part 4: Treat `flex-basis: content` as `max-content`FranklinDM2022-04-07
| | | | | | | | | | | | This uses a different approach and builds upon the refactoring made in the 576eb6ee01fb9ee3669cad634b26473c2886cab1. Partially based on https://bugzilla.mozilla.org/show_bug.cgi?id=1374540
| * Issue #1370 - Part 3: Implement `content` keyword for `flex-basis` propertyFranklinDM2022-04-07
| | | | | | | | Partially based on https://bugzilla.mozilla.org/show_bug.cgi?id=1105111
| * Issue #1370 - Part 2: Remove redundant special-case code for treating ↵FranklinDM2022-04-07
| | | | | | | | | | | | flex-basis enum values as 'auto' in vertical axis Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1436881
| * Issue #1370 - Part 1: Refactor nsFrame to use a separate function for ↵FranklinDM2022-04-07
| | | | | | | | | | | | handling `flex-basis` This removes the need to keep the `flex-basis` handling code of the ComputeSize* functions in sync since they both call the same function now for this purpose.
* | Issue #1853 - Follow-up: extend attribution mapping to resize and cornerMoonchild2022-04-08
| | | | | | | | | | | | controls to allow themes to respond to scrollbar-width. Also clean up the comments and whitespace a bit.
* | Issue #1853 - Map scrollbar-width to an element attribute.Moonchild2022-04-08
|/ | | | | By mapping this to an attribute, this allows browser themes to respond to the various available scrollbar width settings in CSS.
* Issue #1838 - Part 6: Re-resolve row-gap against the sum of row track sizes ↵FranklinDM2022-04-02
| | | | | | for auto-sized grid containers Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1458902
* Issue #1838 - Part 5: Address follow-up issues to initial flexbox layout for ↵FranklinDM2022-04-02
| | | | | | | | | | | | | `(column|row)-gap` properties Notes: * Bug 1473044 - Make flexbox cross size take row/column gap into account https://bugzilla.mozilla.org/show_bug.cgi?id=1473044 * Bug 1473047 - Re-resolve row-gap percentages after intrinsic block size calculated https://bugzilla.mozilla.org/show_bug.cgi?id=1473047 * Bug 1612401 - Prevent absolute-positioned children from contributing gap size to flexbox's inline-size https://bugzilla.mozilla.org/show_bug.cgi?id=1612401 * Bug 1639627 - Make flex-container percent 'row-gap' values resolve to 0, when they're resolved against an indefinite block-size (essentially reverts Bug 1473047)
* Issue #1838 - Part 4: Implement flexbox layout for `(column|row)-gap` propertiesFranklinDM2022-04-02
| | | | | | | | This implements flexbox layout for the gap properties without the refactoring work performed on `nsFlexContainerFrame`. Partially based on https://bugzilla.mozilla.org/show_bug.cgi?id=1398483 and https://bugzilla.mozilla.org/show_bug.cgi?id=1454822 This excludes the second part of bug 1454822, the width caching implementation, because it is out of scope and currently causes unstable layout with `writing-mode: vertical-lr` (see bug 1709937).
* Issue #1838 - Part 2: Remove `grid-` prefix from `grid-(column|row)-gap` ↵FranklinDM2022-04-02
| | | | | | | | | | | | | | | properties This removes the `grid` prefix from the gap-related properties of grid since they are now part of the box alignment specification. Former grid-gap* properties were aliased to the unprefixed properties to maintain compatibility. The previously multi-column layout only `column-gap` property has been modified to apply to the Grid layout (and Flexbox in a following commit), moving the `mColumnGap` member variable from `nsStyleColumn` to `nsStylePosition`. Notes: * Bug 1398537 - support for percent values in column-gap for multi-column layout landed as part of Issue #1230. However, it was incomplete because it did not update `nsRuleNode` to allow transformation of percentage values for `column-gap`. This was consequently fixed as part of this commit. * Bug 1456166 - this might not apply because we don't have that devtools test in UXP * `nsRuleNode`, `nsCSSParser`, `Declaration`, and other related classes were merged into Stylo. These should be taken into consideration when porting patches from Mozilla. Partially based on https://bugzilla.mozilla.org/show_bug.cgi?id=1398482
* Issue #1838 - Part 1: Remove CSS grid preferenceFranklinDM2022-04-02
| | | | Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1398492
* Issue #21 - Remove Telemetry plumbing and fix build.Moonchild2022-04-02
| | | | | Note this won't give working applications. Requires FE changes and additional js module changes (next part).
* Issue #1830 - Remove --disable-xul config and conditionals.Moonchild2022-04-01
|
* No issue - Clean up some obsolete/archaic code paths.Moonchild2022-04-01
|
* Issue #1751 -- Remove XP_MACOSX conditionals from /layoutMoonchild2021-05-03
|
* Issue #1757 - Reinstate "dom.details_element.enabled" preferenceathenian2002021-03-31
| | | | The removal of this preference was botched, all other surrounding plumbing changes appear to be working okay. The ability to use prefs to control this stylesheet might be useful in the future, so perhaps this is one of those "if it ain't broke, don't fix it" bugs where leaving well enough alone in the first place would have been the best choice.
* Issue #1053 - Remove mobile-specific graphics "optimizations" (=compromises)Moonchild2021-03-10
|
* Issue #1705 - Part 5: Implement scrollbar-width:none for all target platforms.Moonchild2021-01-08
|
* Issue #1705 - Part 3: Rename ScrollbarStyles to ScrollStyles.Moonchild2021-01-06
| | | | | | | | | | | ScrollbarStyles contains values of overflow, (over)scroll-behavior, etc. The only one which is marginally related to scroll _bars_ is overflow, which can be used to hide scrollbar (by making an element not scrollable) or enforce the scrollbar to display. It makes more sense to be called ScrollStyles as it's mainly concerning behavior of scrolling, not scrollbars. Also, with the addition of scrollbar width properties, the current name can be confusing.
* Issue #1705 - Part 2: Add a ShowScrollbar enum to be used in ScrollReflowInput.Moonchild2021-01-06
| | | | | | | | | | | | | | Overflow properties have two purposes: 1. controlling whether the scrollbar should be shown; 2. controlling whether the content is scrollable. However, with the scrollbar-width property being added, scrollability and presence of a scrollbar are no longer tied together. This patch makes a separation between the value of overflow and the presence of a scrollbar by making it clear that for ScrollReflowInput, we only care about whether scrollbar should be shown. This should make it easier to write the logic involving presence of the scrollbar based on webdev choice.
* Issue #1053 - Part 2a: Remove android from /layout (partial)Moonchild2020-12-26
| | | | | This removes android code from base, build, forms, generic, inspector, style, printing, tools and xul.
* Issue #1673 - Part 3: Bring minimum tab advance up to spec.athenian2002020-10-28
| | | | This provides a clearer rule for the minimum tab advance that brings us to alignment with the spec and both major browsers.
* Issue #1673 - Part 2: Make tab-size animatable and fix typos.athenian2002020-10-28
| | | | 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.
* Issue #1673 - Part 1: Allow tab-size to accept <length>.athenian2002020-10-28
| | | | 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.
* Merge branch 'master' of https://github.com/MoonchildProductions/UXPMoonchild2020-10-20
|\
| * Merge branch 'master' of https://github.com/MoonchildProductions/UXP into ↵athenian2002020-10-18
| |\ | | | | | | | | | caret_color
| * | Issue #1668 - Part 2: Visited color and auto support for caret-color property.athenian2002020-10-18
| | | | | | | | | | | | 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.
| * | Issue #1668 - Part 1: Implement support for caret-color property.athenian2002020-10-18
| | | | | | | | | | | | | | | | | | 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
* | | Issue #1671 - Unprefix ::-moz-selectionMoonchild2020-10-20
| |/ |/| | | | | | | | | | | | | 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.