1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 00:27:43 +00:00

LibWeb: Allow <input type="button/submit/reset"> to be styled

Previously we used a native ui button to draw the buttons.
These buttons can however not be styled with css.
To allow these to be styled with css, we create a button with
the UA stylesheet that resembles the system ui button.
This commit is contained in:
Vrins 2022-02-21 02:16:21 +01:00 committed by Linus Groh
parent c8f6a20c02
commit a8cfb34551
3 changed files with 16 additions and 9 deletions

View file

@ -117,6 +117,10 @@ void InlineFormattingContext::dimension_box_on_line(Box const& box, LayoutMode l
box_state.margin_right = computed_values.margin().right.resolved(box, width_of_containing_block).to_px(box);
box_state.border_right = computed_values.border_right().width;
box_state.padding_right = computed_values.padding().right.resolved(box, width_of_containing_block).to_px(box);
box_state.padding_top = computed_values.padding().top.resolved(box, width_of_containing_block).to_px(box);
box_state.padding_bottom = computed_values.padding().bottom.resolved(box, width_of_containing_block).to_px(box);
box_state.margin_top = computed_values.margin().top.resolved(box, width_of_containing_block).to_px(box);
box_state.margin_bottom = computed_values.margin().bottom.resolved(box, width_of_containing_block).to_px(box);
if (is<ReplacedBox>(box)) {
auto& replaced = verify_cast<ReplacedBox>(box);