ladybird/Userland/Libraries/LibWeb/Layout
Daniel Bertalan d7b6cc6421 Everywhere: Prevent risky implicit casts of (Nonnull)RefPtr
Our existing implementation did not check the element type of the other
pointer in the constructors and move assignment operators. This meant
that some operations that would require explicit casting on raw pointers
were done implicitly, such as:
- downcasting a base class to a derived class (e.g. `Kernel::Inode` =>
  `Kernel::ProcFSDirectoryInode` in Kernel/ProcFS.cpp),
- casting to an unrelated type (e.g. `Promise<bool>` => `Promise<Empty>`
  in LibIMAP/Client.cpp)

This, of course, allows gross violations of the type system, and makes
the need to type-check less obvious before downcasting. Luckily, while
adding the `static_ptr_cast`s, only two truly incorrect usages were
found; in the other instances, our casts just needed to be made
explicit.
2021-09-03 23:20:23 +02:00
..
BlockBox.cpp LibWeb: Remove unused header includes 2021-08-01 08:10:16 +02:00
BlockBox.h AK: Rename downcast<T> => verify_cast<T> 2021-06-24 19:57:01 +02:00
BlockFormattingContext.cpp AK: Rename downcast<T> => verify_cast<T> 2021-06-24 19:57:01 +02:00
BlockFormattingContext.h LibWeb: Expose size calculation of BlockFormattingContext 2021-06-06 01:46:06 +04:30
Box.cpp LibWeb: Remove unused header includes 2021-08-01 08:10:16 +02:00
Box.h LibWeb: Add box-shadow rendering 2021-07-24 22:16:48 +02:00
BoxModelMetrics.cpp
BoxModelMetrics.h
BreakNode.cpp
BreakNode.h AK: Rename downcast<T> => verify_cast<T> 2021-06-24 19:57:01 +02:00
ButtonBox.cpp
ButtonBox.h
CanvasBox.cpp
CanvasBox.h
CheckBox.cpp
CheckBox.h
FlexFormattingContext.cpp Everywhere: Use tobyase@serenityos.org for my copyright headers 2021-08-09 21:43:05 +02:00
FlexFormattingContext.h
FormattingContext.cpp AK: Rename downcast<T> => verify_cast<T> 2021-06-24 19:57:01 +02:00
FormattingContext.h
FrameBox.cpp LibWeb+Browser: Remove unnecessary InProcessWebView.h includes 2021-08-24 16:37:28 +02:00
FrameBox.h AK: Rename downcast<T> => verify_cast<T> 2021-06-24 19:57:01 +02:00
ImageBox.cpp AK: Rename downcast<T> => verify_cast<T> 2021-06-24 19:57:01 +02:00
ImageBox.h
InitialContainingBlockBox.cpp
InitialContainingBlockBox.h LibWeb: Add fast_is<Layout::InitialContainingBlockBox> 2021-08-18 11:45:39 +02:00
InlineFormattingContext.cpp AK: Rename downcast<T> => verify_cast<T> 2021-06-24 19:57:01 +02:00
InlineFormattingContext.h
InlineNode.cpp LibWeb: Paint inspection outline for InlineNodes :^) 2021-08-23 15:59:29 +02:00
InlineNode.h LibWeb: Paint inspection outline for InlineNodes :^) 2021-08-23 15:59:29 +02:00
Label.cpp
Label.h
LabelableNode.h
LayoutPosition.cpp
LayoutPosition.h
LineBox.cpp LibWeb: Properly handle newlines at the end of LineBoxes 2021-08-29 01:43:09 +02:00
LineBox.h
LineBoxFragment.cpp LibWeb: Return correct selection_rect when the node is at the end 2021-08-15 15:14:37 +02:00
LineBoxFragment.h
ListItemBox.cpp Everywhere: Use tobyase@serenityos.org for my copyright headers 2021-08-09 21:43:05 +02:00
ListItemBox.h
ListItemMarkerBox.cpp Everywhere: Use tobyase@serenityos.org for my copyright headers 2021-08-09 21:43:05 +02:00
ListItemMarkerBox.h Everywhere: Use tobyase@serenityos.org for my copyright headers 2021-08-09 21:43:05 +02:00
Node.cpp LibWeb: Make Node::root return a reference 2021-09-02 22:53:19 +02:00
Node.h LibWeb: Add fast_is<Layout::InitialContainingBlockBox> 2021-08-18 11:45:39 +02:00
RadioButton.cpp
RadioButton.h
ReplacedBox.cpp
ReplacedBox.h AK: Rename downcast<T> => verify_cast<T> 2021-06-24 19:57:01 +02:00
SVGBox.cpp
SVGBox.h
SVGGraphicsBox.cpp AK: Rename downcast<T> => verify_cast<T> 2021-06-24 19:57:01 +02:00
SVGGraphicsBox.h
SVGPathBox.cpp
SVGPathBox.h AK: Rename downcast<T> => verify_cast<T> 2021-06-24 19:57:01 +02:00
SVGSVGBox.cpp LibWeb: Clear SVG context after SVGSVGBox children are painted 2021-08-05 20:17:08 +02:00
SVGSVGBox.h AK: Rename downcast<T> => verify_cast<T> 2021-06-24 19:57:01 +02:00
TableBox.cpp
TableBox.h
TableCellBox.cpp AK: Rename downcast<T> => verify_cast<T> 2021-06-24 19:57:01 +02:00
TableCellBox.h
TableFormattingContext.cpp
TableFormattingContext.h
TableRowBox.cpp
TableRowBox.h
TableRowGroupBox.cpp
TableRowGroupBox.h
TextNode.cpp LibWeb: Rename wrap_breaks to respect_linebreaks 2021-08-29 01:43:09 +02:00
TextNode.h LibWeb: Rename wrap_breaks to respect_linebreaks 2021-08-29 01:43:09 +02:00
TreeBuilder.cpp Everywhere: Prevent risky implicit casts of (Nonnull)RefPtr 2021-09-03 23:20:23 +02:00
TreeBuilder.h LibWeb: Ignore svg elements outside of <svg> when building layout tree 2021-08-05 20:17:08 +02:00