According to W3C spec document.width and height are deprecated.
For Tizen next version's, to support backward compatibility implement
document.width and document.height.
Reference: https://review.tizen.org/gerrit/278684
Change-Id: I0d656e980d814138683d0cac987b8e77cf609888
Signed-off-by: venu.musham <venu.musham@samsung.com>
return GetPage() && GetPage()->GetFocusController().IsDocumentFocused(*this);
}
+int Document::width() {
+ UpdateStyleAndLayout(DocumentUpdateReason::kBeginMainFrame);
+ if (!GetLayoutView())
+ return 0;
+
+ return GetLayoutView()->DocumentRect().Width().ToInt();
+}
+
+int Document::height() {
+ UpdateStyleAndLayout(DocumentUpdateReason::kBeginMainFrame);
+ if (!GetLayoutView())
+ return 0;
+
+ return GetLayoutView()->DocumentRect().Height().ToInt();
+}
+
const AtomicString& Document::BodyAttributeValue(
const QualifiedName& name) const {
if (auto* bodyElement = body())
// May return nullptr when PerformanceManager instrumentation is disabled.
DocumentResourceCoordinator* GetResourceCoordinator();
+ int width();
+ int height();
+
const AtomicString& bgColor() const;
void setBgColor(const AtomicString&);
const AtomicString& fgColor() const;
// HTML obsolete features
// https://html.spec.whatwg.org/C/#Document-partial
+ readonly attribute long width;
+ readonly attribute long height;
+
[Measure] readonly attribute HTMLCollection anchors;
[Measure] readonly attribute HTMLCollection applets;