summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/HTML
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML')
-rw-r--r--Userland/Libraries/LibWeb/HTML/HTMLElement.cpp4
-rw-r--r--Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLElement.cpp
index cd281a7ea3..30df1d0256 100644
--- a/Userland/Libraries/LibWeb/HTML/HTMLElement.cpp
+++ b/Userland/Libraries/LibWeb/HTML/HTMLElement.cpp
@@ -199,7 +199,7 @@ int HTMLElement::offset_width() const
// 2. Return the width of the axis-aligned bounding box of the border boxes of all fragments generated by the element’s principal box,
// ignoring any transforms that apply to the element and its ancestors.
// FIXME: Account for inline boxes.
- return paint_box()->border_box_width();
+ return paint_box()->border_box_width().value();
}
// https://drafts.csswg.org/cssom-view/#dom-htmlelement-offsetheight
@@ -215,7 +215,7 @@ int HTMLElement::offset_height() const
// 2. Return the height of the axis-aligned bounding box of the border boxes of all fragments generated by the element’s principal box,
// ignoring any transforms that apply to the element and its ancestors.
// FIXME: Account for inline boxes.
- return paint_box()->border_box_height();
+ return paint_box()->border_box_height().value();
}
// https://html.spec.whatwg.org/multipage/links.html#cannot-navigate
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp
index 129a0a123a..a74bc35d4f 100644
--- a/Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp
+++ b/Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp
@@ -102,7 +102,7 @@ unsigned HTMLImageElement::width() const
// Return the rendered width of the image, in CSS pixels, if the image is being rendered.
if (auto* paint_box = this->paint_box())
- return paint_box->content_width();
+ return paint_box->content_width().value();
// NOTE: This step seems to not be in the spec, but all browsers do it.
auto width_attr = get_attribute(HTML::AttributeNames::width);
@@ -130,7 +130,7 @@ unsigned HTMLImageElement::height() const
// Return the rendered height of the image, in CSS pixels, if the image is being rendered.
if (auto* paint_box = this->paint_box())
- return paint_box->content_height();
+ return paint_box->content_height().value();
// NOTE: This step seems to not be in the spec, but all browsers do it.
auto height_attr = get_attribute(HTML::AttributeNames::height);