[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
mjs
mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:07:41 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 71d265235642f12bbaaed2d44f41ea3abc281dc0
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Oct 30 22:42:26 2003 +0000
Reviewed by Dave.
- fixed 3468129 - REGRESSION: FOUC occurs on Surfin' Safari
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLElement::getValueProperty): Don't force layout for image
width/height if you can determine it statically from the attribute.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5324 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index a292aae..8a0ac52 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,13 @@
+2003-10-30 Maciej Stachowiak <mjs at apple.com>
+
+ Reviewed by Dave.
+
+ - fixed 3468129 - REGRESSION: FOUC occurs on Surfin' Safari
+
+ * khtml/ecma/kjs_html.cpp:
+ (KJS::HTMLElement::getValueProperty): Don't force layout for image
+ width/height if you can determine it statically from the attribute.
+
=== Safari-112 ===
2003-10-30 Ken Kocienda <kocienda at apple.com>
diff --git a/WebCore/khtml/ecma/kjs_html.cpp b/WebCore/khtml/ecma/kjs_html.cpp
index 682abca..604d1d6 100644
--- a/WebCore/khtml/ecma/kjs_html.cpp
+++ b/WebCore/khtml/ecma/kjs_html.cpp
@@ -1529,24 +1529,16 @@ Value KJS::HTMLElement::getValueProperty(ExecState *exec, int token) const
case ImageAlign: return String(image.align());
case ImageAlt: return String(image.alt());
case ImageBorder: return Number(image.border());
+ case ImageHeight: return Number(image.height());
case ImageHspace: return Number(image.hspace());
case ImageIsMap: return Boolean(image.isMap());
case ImageLongDesc: return String(image.longDesc());
case ImageSrc: return String(image.src());
case ImageUseMap: return String(image.useMap());
case ImageVspace: return Number(image.vspace());
- default:
- // these attributes need layout
- DOM::DocumentImpl* docimpl = node.handle()->getDocument();
- if (docimpl) {
- docimpl->updateLayout();
- }
- switch (token) {
- case ImageHeight: return Number(image.height());
- case ImageWidth: return Number(image.width());
- case ImageX: return Number(image.x());
- case ImageY: return Number(image.y());
- }
+ case ImageWidth: return Number(image.width());
+ case ImageX: return Number(image.x());
+ case ImageY: return Number(image.y());
}
}
break;
diff --git a/WebCore/khtml/html/html_imageimpl.cpp b/WebCore/khtml/html/html_imageimpl.cpp
index 37b9341..c983c77 100644
--- a/WebCore/khtml/html/html_imageimpl.cpp
+++ b/WebCore/khtml/html/html_imageimpl.cpp
@@ -218,7 +218,25 @@ void HTMLImageElementImpl::detach()
long HTMLImageElementImpl::width() const
{
- if (!m_render) return getAttribute(ATTR_WIDTH).toInt();
+ if (!m_render) {
+ // check the attribute first for an explicit pixel value
+ DOM::DOMString attrWidth = getAttribute(ATTR_WIDTH);
+ bool ok;
+ long width = attrWidth.string().toLong(&ok);
+ if (ok) {
+ return width;
+ }
+ }
+
+ DOM::DocumentImpl* docimpl = getDocument();
+ if (docimpl) {
+ docimpl->updateLayout();
+ }
+
+ if (!m_renderer) {
+ return 0;
+ }
+
// ### make a unified call for this
if (changed() || m_render->needsLayout()) {
@@ -232,13 +250,23 @@ long HTMLImageElementImpl::width() const
long HTMLImageElementImpl::height() const
{
- if (!m_render) return getAttribute(ATTR_HEIGHT).toInt();
+ if (!m_render) {
+ // check the attribute first for an explicit pixel value
+ DOM::DOMString attrHeight = getAttribute(ATTR_HEIGHT);
+ bool ok;
+ long height = attrHeight.string().toLong(&ok);
+ if (ok) {
+ return Number(height);
+ }
+ }
- // ### make a unified call for this
- if (changed() || m_render->needsLayout()) {
- getDocument()->updateRendering();
- if (getDocument()->view())
- getDocument()->view()->layout();
+ DOM::DocumentImpl* docimpl = getDocument();
+ if (docimpl) {
+ docimpl->updateLayout();
+ }
+
+ if (!m_renderer) {
+ return 0;
}
return m_render->contentHeight();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list