mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-08 04:02:52 +00:00
This currently uses a gross hack where it subtracts 11px from the previous sibling bottom to calculate its top. This should be fixed by switching to a proper two-phase line layouting model, were we first distribute inline elements into lines and figure out their horizontal positions and heights; then compute the needed line heights and position inline elements there vertically.
18 lines
398 B
C++
18 lines
398 B
C++
#pragma once
|
|
|
|
#include <LibHTML/Layout/LayoutNode.h>
|
|
|
|
class Element;
|
|
|
|
class LayoutInline : public LayoutNode {
|
|
public:
|
|
LayoutInline(const Node&, StyleProperties&&);
|
|
virtual ~LayoutInline() override;
|
|
|
|
virtual const char* class_name() const override { return "LayoutInline"; }
|
|
virtual bool is_inline() const override { return true; }
|
|
|
|
virtual void layout() override;
|
|
|
|
private:
|
|
};
|