[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 08:16:44 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit abda11ea4d17d9a00ce7fc57e9fa5a5aaa63c73b
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Dec 8 19:44:04 2003 +0000
Fix the position method to return screen coords like it should and to use the lower left corner instead of
the upper left.
Reviewed by john
* kwq/KWQAccObject.h:
* kwq/KWQAccObject.mm:
(-[KWQAccObject position]):
(-[KWQAccObject size]):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5716 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index aeb2ec1..0480e1d 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,15 @@
+2003-12-05 David Hyatt <hyatt at apple.com>
+
+ Fix the position method to return screen coords like it should and to use the lower left corner instead of
+ the upper left.
+
+ Reviewed by john
+
+ * kwq/KWQAccObject.h:
+ * kwq/KWQAccObject.mm:
+ (-[KWQAccObject position]):
+ (-[KWQAccObject size]):
+
2003-12-07 Darin Adler <darin at apple.com>
Reviewed by John.
diff --git a/WebCore/kwq/KWQAccObject.h b/WebCore/kwq/KWQAccObject.h
index dbfe510..27cab18 100644
--- a/WebCore/kwq/KWQAccObject.h
+++ b/WebCore/kwq/KWQAccObject.h
@@ -37,11 +37,6 @@ namespace khtml {
-(id)initWithRenderer:(khtml::RenderObject*)renderer;
--(long)x;
--(long)y;
--(long)width;
--(long)height;
-
-(BOOL)detached;
-(void)detach;
diff --git a/WebCore/kwq/KWQAccObject.mm b/WebCore/kwq/KWQAccObject.mm
index 666835b..4b604f2 100644
--- a/WebCore/kwq/KWQAccObject.mm
+++ b/WebCore/kwq/KWQAccObject.mm
@@ -47,6 +47,7 @@ using DOM::ElementImpl;
using DOM::HTMLAnchorElementImpl;
using khtml::RenderObject;
using khtml::RenderWidget;
+using khtml::RenderCanvas;
// FIXME: This will eventually need to really localize.
#define UI_STRING(string, comment) ((NSString *)[NSString stringWithUTF8String:(string)])
@@ -59,38 +60,6 @@ using khtml::RenderWidget;
return self;
}
--(long)x
-{
- if (!m_renderer)
- return 0;
- int x, y;
- m_renderer->absolutePosition(x,y);
- return x;
-}
-
--(long)y
-{
- if (!m_renderer)
- return 0;
- int x, y;
- m_renderer->absolutePosition(x,y);
- return y;
-}
-
--(long)width
-{
- if (!m_renderer)
- return 0;
- return m_renderer->width();
-}
-
--(long)height
-{
- if (!m_renderer)
- return 0;
- return m_renderer->height();
-}
-
-(BOOL)detached
{
return !m_renderer;
@@ -306,12 +275,28 @@ using khtml::RenderWidget;
-(NSValue*)position
{
- return [NSValue valueWithPoint: NSMakePoint([self x],[self y])];
+ int x = 0;
+ int y = 0;
+ if (m_renderer) {
+ m_renderer->absolutePosition(x, y);
+ y += m_renderer->height(); // The API wants the lower-left corner, not the upper-left.
+ }
+ NSPoint point = NSMakePoint(x, y);
+ if (m_renderer && m_renderer->canvas() && m_renderer->canvas()->view()) {
+ NSView* view = m_renderer->canvas()->view()->getDocumentView();
+ point = [[view window] convertBaseToScreen: [view convertPoint: point toView:nil]];
+ }
+ return [NSValue valueWithPoint: point];
}
-(NSValue*)size
{
- return [NSValue valueWithSize: NSMakeSize([self width],[self height])];
+ long width = 0, height = 0;
+ if (m_renderer) {
+ width = m_renderer->width();
+ height = m_renderer->height();
+ }
+ return [NSValue valueWithSize: NSMakeSize(width, height)];
}
-(BOOL)accessibilityIsIgnored
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list