[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
cblu
cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:09:53 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit b044404269b6ef216290e0a426966629f9c081d5
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Nov 6 23:37:53 2003 +0000
Fixed:
<rdar://problem/3275118>: Dragging from missing-image link stretches missing-image icon to size of missing image
<rdar://problem/3476225>: assert dragging non-existant images
Reviewed by rjw.
* khtml/rendering/render_image.h:
(khtml::RenderImage::isDisplayingError): new method, returns true for the broken image
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge elementAtPoint:]): only provide info if there is an image and the image is not broken
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5411 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 67b4136..a34ad1c 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,16 @@
+2003-11-06 Chris Blumenberg <cblu at apple.com>
+
+ Fixed:
+ <rdar://problem/3275118>: Dragging from missing-image link stretches missing-image icon to size of missing image
+ <rdar://problem/3476225>: assert dragging non-existant images
+
+ Reviewed by rjw.
+
+ * khtml/rendering/render_image.h:
+ (khtml::RenderImage::isDisplayingError): new method, returns true for the broken image
+ * kwq/WebCoreBridge.mm:
+ (-[WebCoreBridge elementAtPoint:]): only provide info if there is an image and the image is not broken
+
2003-11-06 Ken Kocienda <kocienda at apple.com>
Reviewed by Richard
diff --git a/WebCore/khtml/rendering/render_image.h b/WebCore/khtml/rendering/render_image.h
index c83ed9e..ff8e0d6 100644
--- a/WebCore/khtml/rendering/render_image.h
+++ b/WebCore/khtml/rendering/render_image.h
@@ -75,6 +75,8 @@ public:
// Called to set generated content images (e.g., :before/:after generated images).
void setContentObject(CachedObject* co);
+ virtual bool isDisplayingError() const { return berrorPic; }
+
private:
bool isWidthSpecified() const;
bool isHeightSpecified() const;
diff --git a/WebCore/kwq/WebCoreBridge.mm b/WebCore/kwq/WebCoreBridge.mm
index d292097..a30c618 100644
--- a/WebCore/kwq/WebCoreBridge.mm
+++ b/WebCore/kwq/WebCoreBridge.mm
@@ -747,41 +747,44 @@ static HTMLFormElementImpl *formElementFromDOMElement(id <WebDOMElement>element)
NodeImpl *node = nodeInfo.innerNonSharedNode();
if (node && node->renderer() && node->renderer()->isImage()) {
- ElementImpl *i = static_cast<ElementImpl*>(node);
-
- // FIXME: Code copied from RenderImage::updateFromElement; should share.
- DOMString attr;
- if (idFromNode(i) == ID_OBJECT) {
- attr = i->getAttribute(ATTR_DATA);
- } else {
- attr = i->getAttribute(ATTR_SRC);
- }
- if (!attr.isEmpty()) {
- [element setObject:_part->xmlDocImpl()->completeURL(attr.string()).getNSString() forKey:WebCoreElementImageURLKey];
- }
- // FIXME: Code copied from RenderImage::updateFromElement; should share.
- DOMString alt;
- if (idFromNode(i) == ID_INPUT)
- alt = static_cast<HTMLInputElementImpl *>(i)->altText();
- else if (idFromNode(i) == ID_IMG)
- alt = static_cast<HTMLImageElementImpl *>(i)->altText();
- if (!alt.isNull()) {
- QString altText = alt.string();
- altText.replace('\\', _part->backslashAsCurrencySymbol());
- [element setObject:altText.getNSString() forKey:WebCoreElementImageAltStringKey];
- }
-
RenderImage *r = static_cast<RenderImage *>(node->renderer());
- int x, y;
- if (r->absolutePosition(x, y)) {
- NSValue *rect = [NSValue valueWithRect:NSMakeRect(x, y, r->contentWidth(), r->contentHeight())];
- [element setObject:rect forKey:WebCoreElementImageRectKey];
- }
-
NSImage *image = r->pixmap().image();
- if (image) {
- [element setObject:image forKey:WebCoreElementImageKey];
+ // Only return image information if there is an image.
+ if (image && !r->isDisplayingError()) {
+ [element setObject:r->pixmap().image() forKey:WebCoreElementImageKey];
+
+ int x, y;
+ if (r->absolutePosition(x, y)) {
+ NSValue *rect = [NSValue valueWithRect:NSMakeRect(x, y, r->contentWidth(), r->contentHeight())];
+ [element setObject:rect forKey:WebCoreElementImageRectKey];
+ }
+
+ ElementImpl *i = static_cast<ElementImpl*>(node);
+
+ // FIXME: Code copied from RenderImage::updateFromElement; should share.
+ DOMString attr;
+ if (idFromNode(i) == ID_OBJECT) {
+ attr = i->getAttribute(ATTR_DATA);
+ } else {
+ attr = i->getAttribute(ATTR_SRC);
+ }
+ if (!attr.isEmpty()) {
+ QString URLString = parseURL(attr).string();
+ [element setObject:_part->xmlDocImpl()->completeURL(URLString).getNSString() forKey:WebCoreElementImageURLKey];
+ }
+
+ // FIXME: Code copied from RenderImage::updateFromElement; should share.
+ DOMString alt;
+ if (idFromNode(i) == ID_INPUT)
+ alt = static_cast<HTMLInputElementImpl *>(i)->altText();
+ else if (idFromNode(i) == ID_IMG)
+ alt = static_cast<HTMLImageElementImpl *>(i)->altText();
+ if (!alt.isNull()) {
+ QString altText = alt.string();
+ altText.replace('\\', _part->backslashAsCurrencySymbol());
+ [element setObject:altText.getNSString() forKey:WebCoreElementImageAltStringKey];
+ }
}
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list