[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373
zecke at webkit.org
zecke at webkit.org
Wed Apr 7 23:11:42 UTC 2010
The following commit has been merged in the webkit-1.2 branch:
commit 279154a250c3141f1f678e109f254dc2b53c38d9
Author: zecke at webkit.org <zecke at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Oct 28 10:16:51 2009 +0000
Fix assertion in SVGRenderBase::mapLocalToContainer resulting from HitTestResult::boundinBox()
https://bugs.webkit.org/show_bug.cgi?id=27347
The current HitTestResult methods are not using the (3d)
transformation aware routines. This can lead to an assertion
SVGRenderBase::mapLocalToContainer method.
Remove HitTestResult::boundingBox() as it is only used in
two places and conceptually doesn't belong into a HitTest
which is operating on points. Update the Qt and Win code
to determine the rect themselves in a (3d) transformation
fashion.
Change HitTestResult::imageRect to use the (3d) transformation
aware RenderBox::absoluteContentQuad to avoid running into
an assertion with SVG content.
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::imageRect):
* rendering/HitTestResult.h:
* WebElementPropertyBag.cpp:
(WebElementPropertyBag::Read):
* Api/qwebframe.cpp:
(QWebHitTestResultPrivate::QWebHitTestResultPrivate):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50207 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 1ea4668..38d24eb 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,34 @@
+2009-10-27 Holger Hans Peter Freyther <zecke at selfish.org>
+
+ Reviewed by Simon Fraser.
+
+ Change HitTestResult methods to use (3d) transformation aware methods
+ https://bugs.webkit.org/show_bug.cgi?id=27347
+
+ The current HitTestResult methods are not using the (3d)
+ transformation aware routines. This can lead to an assertion
+ SVGRenderBase::mapLocalToContainer method.
+
+ Change HitTestResult::imageRect to use the (3d) transformation
+ aware RenderBox::absoluteContentQuad to avoid running into
+ an assertion with SVG content.
+
+ Remove HitTestResult::boundingBox() as it is only used in
+ two places and conceptually doesn't belong into a HitTest
+ which is operating on points.
+
+ A classic test case is not possible as the methods are not excercised
+ from within HTML/SVG but from the WebKit API Layer. A unittest
+ for Qt/Gtk+/Mac would need to be written but Qt/Gtk+ currently
+ do not support 3d transformations making it impossible to write
+ a reliable test case and the Mac port is currently not doing
+ unit testing.
+
+
+ * rendering/HitTestResult.cpp: Remove boundingBox() method
+ (WebCore::HitTestResult::imageRect): Use transformation aware method
+ * rendering/HitTestResult.h: Remove boundingBox()
+
2009-10-26 Holger Hans Peter Freyther <zecke at selfish.org>
Reviewed by Eric Seidel.
diff --git a/WebCore/rendering/HitTestResult.cpp b/WebCore/rendering/HitTestResult.cpp
index 0aaddc9..50933c6 100644
--- a/WebCore/rendering/HitTestResult.cpp
+++ b/WebCore/rendering/HitTestResult.cpp
@@ -123,17 +123,6 @@ Frame* HitTestResult::targetFrame() const
return frame->tree()->find(m_innerURLElement->target());
}
-IntRect HitTestResult::boundingBox() const
-{
- if (m_innerNonSharedNode) {
- RenderObject* renderer = m_innerNonSharedNode->renderer();
- if (renderer)
- return renderer->absoluteBoundingBoxRect();
- }
-
- return IntRect();
-}
-
bool HitTestResult::isSelected() const
{
if (!m_innerNonSharedNode)
@@ -246,7 +235,7 @@ IntRect HitTestResult::imageRect() const
{
if (!image())
return IntRect();
- return m_innerNonSharedNode->renderBox()->absoluteContentBox();
+ return m_innerNonSharedNode->renderBox()->absoluteContentQuad().enclosingBoundingBox();
}
KURL HitTestResult::absoluteImageURL() const
diff --git a/WebCore/rendering/HitTestResult.h b/WebCore/rendering/HitTestResult.h
index f29ca41..25e1058 100644
--- a/WebCore/rendering/HitTestResult.h
+++ b/WebCore/rendering/HitTestResult.h
@@ -63,7 +63,6 @@ public:
void setIsOverWidget(bool b) { m_isOverWidget = b; }
Frame* targetFrame() const;
- IntRect boundingBox() const;
bool isSelected() const;
String spellingToolTip(TextDirection&) const;
String replacedString() const;
diff --git a/WebKit/qt/Api/qwebframe.cpp b/WebKit/qt/Api/qwebframe.cpp
index 32fc24a..4ef7250 100644
--- a/WebKit/qt/Api/qwebframe.cpp
+++ b/WebKit/qt/Api/qwebframe.cpp
@@ -1429,7 +1429,6 @@ QWebHitTestResultPrivate::QWebHitTestResultPrivate(const WebCore::HitTestResult
if (!hitTest.innerNode())
return;
pos = hitTest.point();
- boundingRect = hitTest.boundingBox();
WebCore::TextDirection dir;
title = hitTest.title(dir);
linkText = hitTest.textContent();
@@ -1439,6 +1438,7 @@ QWebHitTestResultPrivate::QWebHitTestResultPrivate(const WebCore::HitTestResult
imageUrl = hitTest.absoluteImageURL();
innerNode = hitTest.innerNode();
innerNonSharedNode = hitTest.innerNonSharedNode();
+ boundingRect = innerNonSharedNode ? innerNonSharedNode->renderer()->absoluteBoundingBoxRect(true) : IntRect();
WebCore::Image *img = hitTest.image();
if (img) {
QPixmap *pix = img->nativeImageForCurrentFrame();
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index 893c358..3b6ebdc 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,19 @@
+2009-10-27 Holger Hans Peter Freyther <zecke at selfish.org>
+
+ Reviewed by Simon Fraser.
+
+ Change HitTestResult methods to use (3d) transformation aware methods
+ https://bugs.webkit.org/show_bug.cgi?id=27347
+
+ The HitTestResult::boundingBox method was removed. The
+ RenderObject must be used directly. In contrast to the
+ old HitTestResult::boundingBox method this code must use
+ a (3d) transformation aware method to not run into an
+ assert in SVGRenderBase::mapLocalToContainer.
+
+ * Api/qwebframe.cpp:
+ (QWebHitTestResultPrivate::QWebHitTestResultPrivate):
+
2009-10-27 Kenneth Rohde Christiansen <kenneth at webkit.org>
Rubberstamped by Oliver Hunt.
diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog
index 9fb0c05..ce1317e 100644
--- a/WebKit/win/ChangeLog
+++ b/WebKit/win/ChangeLog
@@ -1,3 +1,19 @@
+2009-10-27 Holger Hans Peter Freyther <zecke at selfish.org>
+
+ Reviewed by Simon Fraser.
+
+ Change HitTestResult methods to use (3d) transformation aware methods
+ https://bugs.webkit.org/show_bug.cgi?id=27347
+
+ The HitTestResult::boundingBox method was removed. The
+ RenderObject must be used directly. In contrast to the
+ old HitTestResult::boundingBox method this code must use
+ a (3d) transformation aware method to not run into an
+ assert in SVGRenderBase::mapLocalToContainer.
+
+ * WebElementPropertyBag.cpp:
+ (WebElementPropertyBag::Read): Replace HitTestResult::boundingBox()
+
2009-10-26 Laszlo Gombos <laszlo.1.gombos at nokia.com>
Reviewed by Darin Adler.
diff --git a/WebKit/win/WebElementPropertyBag.cpp b/WebKit/win/WebElementPropertyBag.cpp
index 151c9e1..44c4258 100644
--- a/WebKit/win/WebElementPropertyBag.cpp
+++ b/WebKit/win/WebElementPropertyBag.cpp
@@ -145,7 +145,9 @@ HRESULT STDMETHODCALLTYPE WebElementPropertyBag::Read(LPCOLESTR pszPropName, VAR
return S_OK;
} else if (isEqual(WebElementImageRectKey, key)) {
V_VT(pVar) = VT_ARRAY;
- V_ARRAY(pVar) = MarshallingHelpers::intRectToSafeArray(m_result->boundingBox());
+ IntRect boundingBox = m_result->innerNonSharedNode() && m_result->innerNonSharedNode()->renderer() ?
+ m_result->innerNonSharedNode()->renderer()->absoluteBoundingBoxRect(true) : IntRect();
+ V_ARRAY(pVar) = MarshallingHelpers::intRectToSafeArray(boundingBox);
return S_OK;
} else if (isEqual(WebElementImageURLKey, key))
return convertStringToVariant(pVar, m_result->absoluteImageURL().string());
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list