Commit graph

155 commits

Author SHA1 Message Date
Moonchild
bdff76bad2 Issue #2316 - Part 3: Clarify comment 2023-09-27 11:56:53 +08:00
Moonchild
af6a491bfe Issue #2316 - Part 1: Use fallback element sizes for w/h-less SVG
Instead of completely failing the call, use the CSS specified intrinsic
default width/height of 300x150.
2023-09-27 11:38:58 +08:00
Moonchild
2f117eecaa Issue #1656 - Remove more vim control lines.
Vim control lines were re-introduced or not entirely cleaned up.
This nukes them again.
Removing from embedding, extensions, gfx, hal, ipc, layout, mailnews,
media and memory. More to come.
2023-05-05 22:57:19 +08:00
FranklinDM
7c759b2c21 Issue #252 - Follow-up: Include a null check against mDocument 2023-04-08 07:33:48 +08:00
FranklinDM
b2d7504112 Issue #252 - Move getElementsByName from HTMLDocument to Document
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1415176
2023-04-08 07:29:02 +08:00
Job Bautista
b5d5963a4f Issue #2191 - Remove as much old fontconfig support as needed for Harfbuzz update.
Based on Mozilla bugs 1119128, 1285533, and 1421964.

gfx.font_rendering.fontconfig.fontlist.enabled is no longer available.

gfxFontconfigUtils.h still exists, and will be removed in another commit. Just
need more research on bug 1385029.

Tag #1862
2023-04-07 08:23:07 +08:00
Moonchild
dd2697172e Issue #2176 - Don't reconstruct the parent when tearing down display:contents nodes with pseudo-elements.
We need to use StyleChildrenIterator which iterates over them, instead.
This is a bit of a hack but we can't always have our cake.

We need to be a bit careful though, since ::before and ::after are owned
by their own frame, and thus could be unbound from the tree or even dead
after removing the frame.

This basically ports bugs 1435566 and 1438467
2023-03-27 16:10:54 +08:00
FranklinDM
0232bcdfa4 Issue #1592 - Part 1a: Prevent crashing if a slot element was selected via DOM Inspector 2023-03-24 09:03:42 +08:00
FranklinDM
7924a2f60d Issue #2135 - Bug 1329877: Optimize AncestorFilter usage in lazy frame construction 2023-03-06 16:20:24 +08:00
FranklinDM
45c179d01b Issue #2135 - Bug 1453789: Remove Element.createShadowRoot 2023-03-06 16:16:40 +08:00
FranklinDM
b40c87a59a Issue #1375 - Follow-up: Get the insertion point right when reconstructing direct children of a shadow root
This should've been changed alongside bug 1404789 when it landed.
2023-02-28 10:45:05 +08:00
FranklinDM
6a26ce3455 Issue #1375 - Follow-up: Remove shadow tree hacks in the frame constructor
This should've been removed alongside bug 1404789 when it landed.
2023-02-28 10:44:45 +08:00
FranklinDM
ebe27baa23 Issue #1382 - Part 2: Add crash test
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=842114
2023-02-27 11:03:31 +08:00
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
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
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
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
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
FranklinDM
fc9ac112d2 Issue #1873 - Part 3: Fix indentation 2022-04-19 22:10:34 +08:00
FranklinDM
f2a9abd212 Issue #1873 - Part 2: Ensure normalized parent is used for UndisplayedMap handling code
We have four entry points that deal with the parents of display:none/ display:contents content. These are the functions for setting, changing, getting and removing a style context. Or more specifically:

GetStyleContextInMap called by GetDisplay[None|Contents]StyleFor

SetStyleContextInMap called by RegisterDisplay[None|Contents]StyleFor

ChangeStyleContextInMap called by ChangeRegisteredDisplay[None|Contents]StyleFor

UnregisterDisplay[None|Contents]StyleFor okay, this is actually two functions, but they act as a pair

This change makes all these functions call GetApplicableParent up front and act on and pass around the parent that it returns. This is so that throughout the code we are always handling the parent that will be used as the key in the UndisplayedMap entry. This is necessary so that all the code that sets/gets the 'MayHaveChildrenWithLayoutBoxesDisabled' bit on/from an nsIContent object is using the same object, otherwise everything breaks down.

Partially based on part 2 of https://bugzilla.mozilla.org/show_bug.cgi?id=1367214
2022-04-19 22:10:31 +08:00
FranklinDM
c5f6e6155b Issue #1873 - Part 1: Introduce ParentForUndisplayedMap helper method
This introduces the `ParentForUndisplayedMap` helper method to reduce duplication in terms of getting the parent and asserting parent existence.

Partially based on parts of https://bugzilla.mozilla.org/show_bug.cgi?id=1341083
2022-04-19 22:10:26 +08:00
Moonchild
5422762839 Issue #1860 - Follow-up: Fix indentation. 2022-04-19 22:10:14 +08:00
Moonchild
f039cc7ef8 Issue #1860 - Follow-up: Make sure we don't add duplicate frames
Changing to vector makes manipulating display list items more risky.
This is to make sure we don't inadvertently end up with duplicates in
the list of display items avoiding double-free scenarios.
2022-04-19 22:10:10 +08:00
win7-7
070b283e38 Issue #1860 - Change LayerManagerData::mDisplayItems to a vector instead of hashtable
This should improve cache locality and help speed up layer building.
2022-04-19 22:09:59 +08:00
win7-7
c0591cb147 Issue #1861 - Cache the most recent nsGenConNode to speed up future insertions.
Cache the most recent nsGenConNode to speed up future insertions.
2022-04-19 22:05:17 +08:00
FranklinDM
4f059d2c8b Issue #1838 - Part 1: Remove CSS grid preference
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1398492
2022-04-19 21:55:49 +08:00
Jeremy Andrews
74698b4560 Issue #3017 - Shadow boundaries not accounted for in nsFrameManager. 2022-03-22 22:32:49 +08:00
roytam1
bf632ce22a Bug 1730120, close ContentViewer properly if initialization fails, r=nika a=RyanVM 2021-12-14 23:10:14 +08:00
Moonchild
a0ee1f3c0d [layout] Ensure we set the primary frame for native anon content where needed. 2021-07-16 09:21:17 +08:00
Moonchild
02c59100a8 Issue #1751 -- Remove XP_MACOSX conditionals from /layout 2021-05-05 10:29:02 +08:00
athenian200
618fa768c8 Issue #1757 - Reinstate "dom.details_element.enabled" preference
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.
2021-04-02 10:33:54 +08:00
Moonchild
1feafdc819 Issue #1053 - Remove mobile-specific graphics "optimizations" (=compromises) 2021-03-11 10:13:55 +08:00
Moonchild
5fb8c296a0 Issue #1515 - Add null check to nsCSSFrameConstructor::IsValidSibling
With the changes to layout for WebComponents, it is now apparently possible to
pass in null for frame tree items to this function, which would cause a null
deref crash if not checked.
2021-02-04 21:36:14 +08:00
Moonchild
21f707390d Issue #1705 - Part 3: Rename ScrollbarStyles to ScrollStyles.
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.
2021-01-14 22:19:53 +08:00
Moonchild
e993607a88 Issue #1705 - Part 1: Rename nsChangeHint_CSSOverflowChange to *ScrollbarChange.
Prepare for scrollbar-width which should trigger the same kind of change.
2021-01-14 22:19:49 +08:00
Moonchild
7167c960d0 Issue #1053 - Part 2a: Remove android from /layout (partial)
This removes android code from base, build, forms, generic, inspector, style,
printing, tools and xul.
2021-01-01 10:01:05 +08:00
Moonchild
9305760571 Issue #1656 - Part 9: Single-line-comment style. 2020-09-25 22:07:00 +08:00
Moonchild
d5919942ff Issue #1656 - Part 8: Devtools and misc. 2020-09-25 22:06:55 +08:00
Moonchild
0cd673d720 Issue #1656 - Part 6: Clean up the build files 2020-09-25 22:04:23 +08:00
Moonchild
538b420319 Issue #1656 - Part 4: Manual cleanup 2020-09-25 22:04:20 +08:00
Moonchild
30df895eb2 Issue #1656 - Part 3: Nuke more vim config lines in the tree.
Another S&R run with some smarter matching.
2020-09-25 22:04:17 +08:00
Moonchild
8c395520d9 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-25 22:04:12 +08:00
Moonchild
78bcb176ea 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-25 22:04:07 +08:00
Moonchild
57d143dc6e Issue #1643 - Part 4: Hook up all the plumbing. 2020-09-18 20:53:16 +08:00
athenian200
9532970df5 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-04 22:31:00 +08:00