1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-08 02:27:35 +00:00
serenity/Userland/Libraries/LibWeb/Layout
sin-ack 29583104d2 LibWeb: Refactor all LabelableNode subclasses + input event handling :^)
This commit is messy due to the Paintable and Layout classes being
tangled together.

The RadioButton, CheckBox and ButtonBox classes are now subclasses of
FormAssociatedLabelableNode. This subclass separates these layout nodes
from LabelableNode, which is also the superclass of non-form associated
labelable nodes (Progress).

ButtonPaintable, CheckBoxPaintable and RadioButtonPaintable no longer
call events on DOM nodes directly from their mouse event handlers;
instead, all the functionality is now directly in EventHandler, which
dispatches the related events. handle_mousedown and related methods
return a bool indicating whether the event handling should proceed.

Paintable classes can now return an alternative DOM::Node which should
be the target of the mouse event. Labels use this to indicate that the
labeled control should be the target of the mouse events.

HTMLInputElement put its activation behavior on run_activation_behavior,
which wasn't actually called anywhere and had to be manually called by
other places. We now use activation_behavior which is used by
EventDispatcher.

This commit also brings HTMLInputElement closer to spec by removing the
did_foo functions that did ad-hoc event dispatching and unifies the
behavior under run_input_activation_behavior.
2022-03-16 00:38:31 +01:00
..
BlockContainer.cpp LibWeb: Remove a bunch of no-longer needed #includes 2022-03-11 00:21:49 +01:00
BlockContainer.h LibWeb: Move hit testing to the painting tree 2022-03-11 00:21:49 +01:00
BlockFormattingContext.cpp LibWeb: Only collapse vertical margin between BlockContainer siblings 2022-03-13 00:04:51 +01:00
BlockFormattingContext.h LibWeb: Create list-item markers during layout tree construction 2022-02-21 18:35:12 +01:00
Box.cpp LibWeb: Remove a bunch of no-longer needed #includes 2022-03-11 00:21:49 +01:00
Box.h LibWeb: Remove a bunch of no-longer needed #includes 2022-03-11 00:21:49 +01:00
BoxModelMetrics.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
BoxModelMetrics.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
BreakNode.cpp LibWeb: Let Paintable perform the painting 2022-03-11 00:21:49 +01:00
BreakNode.h LibWeb: Let Paintable perform the painting 2022-03-11 00:21:49 +01:00
ButtonBox.cpp LibWeb: Refactor all LabelableNode subclasses + input event handling :^) 2022-03-16 00:38:31 +01:00
ButtonBox.h LibWeb: Refactor all LabelableNode subclasses + input event handling :^) 2022-03-16 00:38:31 +01:00
CanvasBox.cpp LibWeb: Make Paintable ref-counted 2022-03-11 00:21:49 +01:00
CanvasBox.h LibWeb: Make Paintable ref-counted 2022-03-11 00:21:49 +01:00
CheckBox.cpp LibWeb: Refactor all LabelableNode subclasses + input event handling :^) 2022-03-16 00:38:31 +01:00
CheckBox.h LibWeb: Refactor all LabelableNode subclasses + input event handling :^) 2022-03-16 00:38:31 +01:00
FlexFormattingContext.cpp LibWeb: Give flex containers with percentage cross size some dimensions 2022-03-13 00:04:51 +01:00
FlexFormattingContext.h LibWeb: Add a debug helper to dump current state of an FFC 2022-03-13 00:04:51 +01:00
FormAssociatedLabelableNode.h LibWeb: Refactor all LabelableNode subclasses + input event handling :^) 2022-03-16 00:38:31 +01:00
FormattingContext.cpp LibWeb: Swap min-content and max-content intrinsic sizes if needed 2022-03-13 00:04:51 +01:00
FormattingContext.h LibWeb: Add functions for calculating intrinsic sizes of a Layout::Box 2022-03-13 00:04:51 +01:00
FormattingState.cpp LibWeb: Make Layout::FormattingState copies shallow 2022-03-13 00:04:51 +01:00
FormattingState.h LibWeb: Make Layout::FormattingState copies shallow 2022-03-13 00:04:51 +01:00
FrameBox.cpp LibWeb: Remove a bunch of no-longer needed #includes 2022-03-11 00:21:49 +01:00
FrameBox.h LibWeb: Make Paintable ref-counted 2022-03-11 00:21:49 +01:00
ImageBox.cpp LibWeb: Remove a bunch of no-longer needed #includes 2022-03-11 00:21:49 +01:00
ImageBox.h LibWeb: Make Paintable ref-counted 2022-03-11 00:21:49 +01:00
InitialContainingBlock.cpp LibWeb: Sort stacking context tree once, after fully building it 2022-03-13 18:09:43 +01:00
InitialContainingBlock.h LibWeb: Move hit testing to the painting tree 2022-03-11 00:21:49 +01:00
InlineFormattingContext.cpp LibWeb: Apply the current text-justify value when justifying 2022-03-12 21:51:38 +01:00
InlineFormattingContext.h LibWeb: Apply the current text-justify value when justifying 2022-03-12 21:51:38 +01:00
InlineLevelIterator.cpp LibWeb: Make InlineLevelIterator emit absolutely positioned items 2022-03-08 00:19:49 +01:00
InlineLevelIterator.h LibWeb: Make InlineLevelIterator emit absolutely positioned items 2022-03-08 00:19:49 +01:00
InlineNode.cpp LibWeb: Remove a bunch of no-longer needed #includes 2022-03-11 00:21:49 +01:00
InlineNode.h LibWeb: Make Paintable ref-counted 2022-03-11 00:21:49 +01:00
Label.cpp LibWeb: Remove a bunch of no-longer needed #includes 2022-03-11 00:21:49 +01:00
Label.h LibWeb: Refactor all LabelableNode subclasses + input event handling :^) 2022-03-16 00:38:31 +01:00
LabelableNode.cpp LibWeb: Move mouse event and label logic from layout to painting tree 2022-03-11 00:21:49 +01:00
LabelableNode.h LibWeb: Move mouse event and label logic from layout to painting tree 2022-03-11 00:21:49 +01:00
LayoutPosition.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
LayoutPosition.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
LineBox.cpp LibWeb: Respect inline-axis margins between line box fragments :^) 2022-03-09 18:47:32 +01:00
LineBox.h LibWeb: Respect inline-axis margins between line box fragments :^) 2022-03-09 18:47:32 +01:00
LineBoxFragment.cpp LibWeb: Use Layout::Box::paint_box() accessor in more places 2022-03-11 00:21:49 +01:00
LineBoxFragment.h LibWeb: Move StackingContext and PaintPhase into the Painting namespace 2022-03-11 00:21:49 +01:00
LineBuilder.cpp LibWeb: Refactor text justification code + only justify below threshold 2022-03-12 21:51:38 +01:00
LineBuilder.h LibWeb: Respect inline-axis margins between line box fragments :^) 2022-03-09 18:47:32 +01:00
ListItemBox.cpp LibWeb: Make display: foo box constructors take the Element by pointer 2022-02-25 19:35:34 +01:00
ListItemBox.h LibWeb: Make display: foo box constructors take the Element by pointer 2022-02-25 19:35:34 +01:00
ListItemMarkerBox.cpp LibWeb: Remove a bunch of no-longer needed #includes 2022-03-11 00:21:49 +01:00
ListItemMarkerBox.h LibWeb: Add some fast_is<T> helpers for hot classes on GitHub :^) 2022-03-13 18:09:43 +01:00
Node.cpp LibWeb: Improve how layout nodes decide whether they have definite sizes 2022-03-13 00:04:51 +01:00
Node.h LibWeb: Add some fast_is<T> helpers for hot classes on GitHub :^) 2022-03-13 18:09:43 +01:00
Progress.cpp LibWeb: Remove a bunch of no-longer needed #includes 2022-03-11 00:21:49 +01:00
Progress.h LibWeb: Make Paintable ref-counted 2022-03-11 00:21:49 +01:00
RadioButton.cpp LibWeb: Refactor all LabelableNode subclasses + input event handling :^) 2022-03-16 00:38:31 +01:00
RadioButton.h LibWeb: Refactor all LabelableNode subclasses + input event handling :^) 2022-03-16 00:38:31 +01:00
ReplacedBox.cpp LibWeb: Remove old Layout::Node::split_into_lines() API 2022-01-23 01:22:41 +01:00
ReplacedBox.h LibWeb: Add some fast_is<T> helpers for hot classes on GitHub :^) 2022-03-13 18:09:43 +01:00
SVGBox.cpp LibWeb: Make Layout::SVGBox a BlockContainer again 2022-03-13 00:04:51 +01:00
SVGBox.h LibWeb: Make Layout::SVGBox a BlockContainer again 2022-03-13 00:04:51 +01:00
SVGFormattingContext.cpp LibWeb: Fix height/width copy paste bug in SVGFormattingContext::run 2022-03-14 22:30:22 +01:00
SVGFormattingContext.h LibWeb: Start making our layout system "transactional" 2022-02-21 18:35:12 +01:00
SVGGeometryBox.cpp LibWeb: Remove a bunch of no-longer needed #includes 2022-03-11 00:21:49 +01:00
SVGGeometryBox.h LibWeb: Make Paintable ref-counted 2022-03-11 00:21:49 +01:00
SVGGraphicsBox.cpp LibWeb: Let Paintable perform the painting 2022-03-11 00:21:49 +01:00
SVGGraphicsBox.h LibWeb: Let Paintable perform the painting 2022-03-11 00:21:49 +01:00
SVGSVGBox.cpp LibWeb: Make Paintable ref-counted 2022-03-11 00:21:49 +01:00
SVGSVGBox.h LibWeb: Make Paintable ref-counted 2022-03-11 00:21:49 +01:00
TableBox.cpp LibWeb: Rename Layout::BlockBox => BlockContainer 2021-10-06 20:10:36 +02:00
TableBox.h LibWeb: Rename Layout::BlockBox => BlockContainer 2021-10-06 20:10:36 +02:00
TableCellBox.cpp LibWeb: Remove Layout::Box::width_of_logical_containing_block() 2021-10-27 18:00:51 +02:00
TableCellBox.h LibWeb: Remove Layout::Box::width_of_logical_containing_block() 2021-10-27 18:00:51 +02:00
TableFormattingContext.cpp LibWeb: Compute table cell height after doing its inside layout 2022-02-21 18:35:12 +01:00
TableFormattingContext.h LibWeb: Start making our layout system "transactional" 2022-02-21 18:35:12 +01:00
TableRowBox.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
TableRowBox.h LibWeb: Start work towards modern CSS "display" values 2021-10-06 19:12:52 +02:00
TableRowGroupBox.cpp LibWeb: Make display: foo box constructors take the Element by pointer 2022-02-25 19:35:34 +01:00
TableRowGroupBox.h LibWeb: Make display: foo box constructors take the Element by pointer 2022-02-25 19:35:34 +01:00
TextNode.cpp LibWeb: Remove a bunch of no-longer needed #includes 2022-03-11 00:21:49 +01:00
TextNode.h LibWeb: Move mouse event and label logic from layout to painting tree 2022-03-11 00:21:49 +01:00
TreeBuilder.cpp LibWeb: Don't compute style *again* for elements in Layout::TreeBuilder 2022-03-15 22:43:44 +01:00
TreeBuilder.h LibWeb: Add missing headers 2021-10-20 09:20:18 +01:00