[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
hyatt
hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:45:10 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 8c96b62598665d9b12098d59349ae93bda039a58
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Jun 12 18:00:35 2003 +0000
Fix for 3289113, body.scrollTop doesn't return the right
value. Fix scrollLeft and scrollTop for body tags to just
use the view's offset. This matches WinIE behavior.
Reviewed by john
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLElement::getValueProperty):
(KJS::HTMLElement::putValue):
* khtml/ecma/kjs_html.h:
* khtml/ecma/kjs_html.lut.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4530 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index f487827..187f976 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,17 @@
+2003-06-12 David Hyatt <hyatt at apple.com>
+
+ Fix for 3289113, body.scrollTop doesn't return the right
+ value. Fix scrollLeft and scrollTop for body tags to just
+ use the view's offset. This matches WinIE behavior.
+
+ Reviewed by john
+
+ * khtml/ecma/kjs_html.cpp:
+ (KJS::HTMLElement::getValueProperty):
+ (KJS::HTMLElement::putValue):
+ * khtml/ecma/kjs_html.h:
+ * khtml/ecma/kjs_html.lut.h:
+
2003-06-12 Darin Adler <darin at apple.com>
Reviewed by John.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index f487827..187f976 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,17 @@
+2003-06-12 David Hyatt <hyatt at apple.com>
+
+ Fix for 3289113, body.scrollTop doesn't return the right
+ value. Fix scrollLeft and scrollTop for body tags to just
+ use the view's offset. This matches WinIE behavior.
+
+ Reviewed by john
+
+ * khtml/ecma/kjs_html.cpp:
+ (KJS::HTMLElement::getValueProperty):
+ (KJS::HTMLElement::putValue):
+ * khtml/ecma/kjs_html.h:
+ * khtml/ecma/kjs_html.lut.h:
+
2003-06-12 Darin Adler <darin at apple.com>
Reviewed by John.
diff --git a/WebCore/khtml/ecma/kjs_html.cpp b/WebCore/khtml/ecma/kjs_html.cpp
index 5c719b1..e69292a 100644
--- a/WebCore/khtml/ecma/kjs_html.cpp
+++ b/WebCore/khtml/ecma/kjs_html.cpp
@@ -657,13 +657,15 @@ const ClassInfo* KJS::HTMLElement::classInfo() const
type KJS::HTMLElement::StyleType DontDelete
sheet KJS::HTMLElement::StyleSheet DontDelete|ReadOnly
@end
- at begin HTMLBodyElementTable 8
+ at begin HTMLBodyElementTable 10
aLink KJS::HTMLElement::BodyALink DontDelete
background KJS::HTMLElement::BodyBackground DontDelete
bgColor KJS::HTMLElement::BodyBgColor DontDelete
link KJS::HTMLElement::BodyLink DontDelete
text KJS::HTMLElement::BodyText DontDelete
vLink KJS::HTMLElement::BodyVLink DontDelete
+ scrollLeft KJS::HTMLElement::BodyScrollLeft DontDelete
+ scrollTop KJS::HTMLElement::BodyScrollTop DontDelete
scrollHeight KJS::HTMLElement::BodyScrollHeight DontDelete|ReadOnly
scrollWidth KJS::HTMLElement::BodyScrollWidth DontDelete|ReadOnly
@end
@@ -1201,6 +1203,10 @@ Value KJS::HTMLElement::getValueProperty(ExecState *exec, int token) const
docimpl->updateLayout();
}
switch (token) {
+ case BodyScrollLeft:
+ return Number(body.ownerDocument().view() ? body.ownerDocument().view()->contentsX() : 0);
+ case BodyScrollTop:
+ return Number(body.ownerDocument().view() ? body.ownerDocument().view()->contentsY() : 0);
case BodyScrollHeight: return Number(body.ownerDocument().view() ? body.ownerDocument().view()->contentsHeight() : 0);
case BodyScrollWidth: return Number(body.ownerDocument().view() ? body.ownerDocument().view()->contentsWidth() : 0);
}
@@ -2214,6 +2220,21 @@ void KJS::HTMLElement::putValue(ExecState *exec, int token, const Value& value,
case BodyLink: { body.setLink(str); return; }
case BodyText: { body.setText(str); return; }
case BodyVLink: { body.setVLink(str); return; }
+ case BodyScrollLeft:
+ case BodyScrollTop: {
+ QScrollView* sview = body.ownerDocument().view();
+ if (sview) {
+ // Update the document's layout before we compute these attributes.
+ DOM::DocumentImpl* docimpl = body.handle()->getDocument();
+ if (docimpl)
+ docimpl->updateLayout();
+ if (token == BodyScrollLeft)
+ sview->setContentsPos(value.toInteger(exec), sview->contentsY());
+ else
+ sview->setContentsPos(sview->contentsX(), value.toInteger(exec));
+ }
+ return;
+ }
}
}
break;
diff --git a/WebCore/khtml/ecma/kjs_html.h b/WebCore/khtml/ecma/kjs_html.h
index d1debc9..bfca951 100644
--- a/WebCore/khtml/ecma/kjs_html.h
+++ b/WebCore/khtml/ecma/kjs_html.h
@@ -82,7 +82,7 @@ namespace KJS {
LinkSheet, TitleText, MetaName, MetaHttpEquiv, MetaContent, MetaScheme,
BaseHref, BaseTarget, IsIndexForm, IsIndexPrompt, StyleDisabled,
StyleSheet, StyleType, StyleMedia, BodyBackground, BodyVLink, BodyText,
- BodyLink, BodyALink, BodyBgColor, BodyScrollHeight, BodyScrollWidth,
+ BodyLink, BodyALink, BodyBgColor, BodyScrollLeft, BodyScrollTop, BodyScrollHeight, BodyScrollWidth,
FormAction, FormEncType, FormElements, FormLength, FormAcceptCharset,
FormReset, FormTarget, FormName, FormMethod, FormSubmit, SelectAdd,
SelectTabIndex, SelectValue, SelectSelectedIndex, SelectLength,
diff --git a/WebCore/khtml/ecma/kjs_html.lut.h b/WebCore/khtml/ecma/kjs_html.lut.h
index 5243ac4..f2d1b55 100644
--- a/WebCore/khtml/ecma/kjs_html.lut.h
+++ b/WebCore/khtml/ecma/kjs_html.lut.h
@@ -176,20 +176,23 @@ const struct HashTable HTMLStyleElementTable = { 2, 5, HTMLStyleElementTableEntr
namespace KJS {
const struct HashEntry HTMLBodyElementTableEntries[] = {
- { "background", KJS::HTMLElement::BodyBackground, DontDelete, 0, &HTMLBodyElementTableEntries[8] },
+ { "link", KJS::HTMLElement::BodyLink, DontDelete, 0, &HTMLBodyElementTableEntries[11] },
{ 0, 0, 0, 0, 0 },
+ { "bgColor", KJS::HTMLElement::BodyBgColor, DontDelete, 0, &HTMLBodyElementTableEntries[12] },
+ { "text", KJS::HTMLElement::BodyText, DontDelete, 0, 0 },
{ 0, 0, 0, 0, 0 },
+ { "aLink", KJS::HTMLElement::BodyALink, DontDelete, 0, 0 },
+ { "background", KJS::HTMLElement::BodyBackground, DontDelete, 0, &HTMLBodyElementTableEntries[10] },
+ { "scrollWidth", KJS::HTMLElement::BodyScrollWidth, DontDelete|ReadOnly, 0, 0 },
{ 0, 0, 0, 0, 0 },
- { "vLink", KJS::HTMLElement::BodyVLink, DontDelete, 0, 0 },
- { "text", KJS::HTMLElement::BodyText, DontDelete, 0, 0 },
- { "link", KJS::HTMLElement::BodyLink, DontDelete, 0, 0 },
- { "aLink", KJS::HTMLElement::BodyALink, DontDelete, 0, &HTMLBodyElementTableEntries[10] },
- { "bgColor", KJS::HTMLElement::BodyBgColor, DontDelete, 0, &HTMLBodyElementTableEntries[9] },
- { "scrollHeight", KJS::HTMLElement::BodyScrollHeight, DontDelete|ReadOnly, 0, 0 },
- { "scrollWidth", KJS::HTMLElement::BodyScrollWidth, DontDelete|ReadOnly, 0, 0 }
+ { 0, 0, 0, 0, 0 },
+ { "vLink", KJS::HTMLElement::BodyVLink, DontDelete, 0, &HTMLBodyElementTableEntries[13] },
+ { "scrollLeft", KJS::HTMLElement::BodyScrollLeft, DontDelete, 0, 0 },
+ { "scrollTop", KJS::HTMLElement::BodyScrollTop, DontDelete, 0, 0 },
+ { "scrollHeight", KJS::HTMLElement::BodyScrollHeight, DontDelete|ReadOnly, 0, 0 }
};
-const struct HashTable HTMLBodyElementTable = { 2, 11, HTMLBodyElementTableEntries, 8 };
+const struct HashTable HTMLBodyElementTable = { 2, 14, HTMLBodyElementTableEntries, 10 };
}; // namespace
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list