WebKit Bugzilla
Attachment 345845 Details for
Bug 188045
: [WebIDL] Element's scrollLeft and scrollTop should be unrestricted double
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
188045.patch (text/plain), 4.46 KB, created by
Frédéric Wang (:fredw)
on 2018-07-26 08:17:38 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Frédéric Wang (:fredw)
Created:
2018-07-26 08:17:38 PDT
Size:
4.46 KB
patch
obsolete
>diff --git a/Source/WebCore/dom/Element.cpp b/Source/WebCore/dom/Element.cpp >index 2263349c220..5de29903c7d 100644 >--- a/Source/WebCore/dom/Element.cpp >+++ b/Source/WebCore/dom/Element.cpp >@@ -935,7 +935,7 @@ double Element::clientHeight() > return 0; > } > >-int Element::scrollLeft() >+double Element::scrollLeft() > { > document().updateLayoutIgnorePendingStylesheets(); > >@@ -944,7 +944,7 @@ int Element::scrollLeft() > return 0; > } > >-int Element::scrollTop() >+double Element::scrollTop() > { > document().updateLayoutIgnorePendingStylesheets(); > >@@ -953,7 +953,7 @@ int Element::scrollTop() > return 0; > } > >-void Element::setScrollLeft(int newLeft) >+void Element::setScrollLeft(double newLeft) > { > document().updateLayoutIgnorePendingStylesheets(); > >@@ -964,7 +964,7 @@ void Element::setScrollLeft(int newLeft) > } > } > >-void Element::setScrollTop(int newTop) >+void Element::setScrollTop(double newTop) > { > document().updateLayoutIgnorePendingStylesheets(); > >diff --git a/Source/WebCore/dom/Element.h b/Source/WebCore/dom/Element.h >index 842a2080e66..7c72937112a 100644 >--- a/Source/WebCore/dom/Element.h >+++ b/Source/WebCore/dom/Element.h >@@ -166,10 +166,10 @@ public: > WEBCORE_EXPORT double clientWidth(); > WEBCORE_EXPORT double clientHeight(); > >- virtual int scrollLeft(); >- virtual int scrollTop(); >- virtual void setScrollLeft(int); >- virtual void setScrollTop(int); >+ virtual double scrollLeft(); >+ virtual double scrollTop(); >+ virtual void setScrollLeft(double); >+ virtual void setScrollTop(double); > virtual int scrollWidth(); > virtual int scrollHeight(); > >diff --git a/Source/WebCore/dom/Element.idl b/Source/WebCore/dom/Element.idl >index 72f9a148151..1142c8c4942 100644 >--- a/Source/WebCore/dom/Element.idl >+++ b/Source/WebCore/dom/Element.idl >@@ -78,8 +78,8 @@ > void scrollTo(unrestricted double x, unrestricted double y); > void scrollBy(optional ScrollToOptions option); > void scrollBy(unrestricted double x, unrestricted double y); >- attribute long scrollTop; // FIXME(webkit.org/b/188045): should be unrestricted double. >- attribute long scrollLeft; // FIXME(webkit.org/b/188045): should be unrestricted double. >+ attribute unrestricted double scrollTop; >+ attribute unrestricted double scrollLeft; > readonly attribute long scrollWidth; > readonly attribute long scrollHeight; > readonly attribute double clientTop; // FIXME: Should be of type long. >diff --git a/Source/WebCore/html/HTMLBodyElement.cpp b/Source/WebCore/html/HTMLBodyElement.cpp >index 8442ac92428..7092d320ccf 100644 >--- a/Source/WebCore/html/HTMLBodyElement.cpp >+++ b/Source/WebCore/html/HTMLBodyElement.cpp >@@ -242,7 +242,7 @@ static int adjustForZoom(int value, const Frame& frame) > return static_cast<int>(value / zoomFactor); > } > >-int HTMLBodyElement::scrollLeft() >+double HTMLBodyElement::scrollLeft() > { > if (isFirstBodyElementOfDocument()) { > document().updateLayoutIgnorePendingStylesheets(); >@@ -257,7 +257,7 @@ int HTMLBodyElement::scrollLeft() > return HTMLElement::scrollLeft(); > } > >-void HTMLBodyElement::setScrollLeft(int scrollLeft) >+void HTMLBodyElement::setScrollLeft(double scrollLeft) > { > if (isFirstBodyElementOfDocument()) { > document().updateLayoutIgnorePendingStylesheets(); >@@ -272,7 +272,7 @@ void HTMLBodyElement::setScrollLeft(int scrollLeft) > HTMLElement::setScrollLeft(scrollLeft); > } > >-int HTMLBodyElement::scrollTop() >+double HTMLBodyElement::scrollTop() > { > if (isFirstBodyElementOfDocument()) { > document().updateLayoutIgnorePendingStylesheets(); >@@ -287,7 +287,7 @@ int HTMLBodyElement::scrollTop() > return HTMLElement::scrollTop(); > } > >-void HTMLBodyElement::setScrollTop(int scrollTop) >+void HTMLBodyElement::setScrollTop(double scrollTop) > { > if (isFirstBodyElementOfDocument()) { > document().updateLayoutIgnorePendingStylesheets(); >diff --git a/Source/WebCore/html/HTMLBodyElement.h b/Source/WebCore/html/HTMLBodyElement.h >index 9197ecc0a30..ba84f282441 100644 >--- a/Source/WebCore/html/HTMLBodyElement.h >+++ b/Source/WebCore/html/HTMLBodyElement.h >@@ -52,11 +52,11 @@ private: > > bool supportsFocus() const final; > >- int scrollLeft() final; >- void setScrollLeft(int) final; >+ double scrollLeft() final; >+ void setScrollLeft(double) final; > >- int scrollTop() final; >- void setScrollTop(int) final; >+ double scrollTop() final; >+ void setScrollTop(double) final; > > void scrollTo(const ScrollToOptions&, ScrollClamping) final; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188045
: 345845