Jelajahi Sumber

LibWeb: Stub out Element.currentCSSZoom

Andreas Kling 1 tahun lalu
induk
melakukan
82f8b64017

+ 7 - 0
Userland/Libraries/LibWeb/DOM/Element.cpp

@@ -992,6 +992,13 @@ int Element::client_height() const
     return paintable_box()->absolute_padding_box_rect().height().to_int();
 }
 
+// https://drafts.csswg.org/cssom-view/#dom-element-currentcsszoom
+double Element::current_css_zoom() const
+{
+    dbgln("FIXME: Implement Element::current_css_zoom()");
+    return 1.0;
+}
+
 void Element::inserted()
 {
     Base::inserted();

+ 1 - 0
Userland/Libraries/LibWeb/DOM/Element.h

@@ -134,6 +134,7 @@ public:
     int client_left() const;
     int client_width() const;
     int client_height() const;
+    [[nodiscard]] double current_css_zoom() const;
 
     void for_each_attribute(NOESCAPE Function<void(Attr const&)>) const;
 

+ 1 - 1
Userland/Libraries/LibWeb/DOM/Element.idl

@@ -92,7 +92,7 @@ interface Element : Node {
     readonly attribute long clientLeft;
     readonly attribute long clientWidth;
     readonly attribute long clientHeight;
-    // FIXME: readonly attribute double currentCSSZoom;
+    readonly attribute double currentCSSZoom;
 
     // https://w3c.github.io/DOM-Parsing/#extensions-to-the-element-interface
     [CEReactions, LegacyNullToEmptyString] attribute DOMString outerHTML;