[prev in list] [next in list] [prev in thread] [next in thread] 

List:       konq-bugs
Subject:    [Bug 68954] [test case] "title" property of Anchor tags not properly
From:       Leo Savernik <l.savernik () aon ! at>
Date:       2004-04-30 11:56:27
Message-ID: 20040430115627.7802.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
      
http://bugs.kde.org/show_bug.cgi?id=68954      
l.savernik aon at changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From l.savernik aon at  2004-04-30 13:56 -------
CVS commit by savernik: 

Fixed broken tooltips on title attributes.

I'll try hard to get that fix into the branch, too.

CCMAIL: 68954-done bugs kde org, 79163-done bugs kde org


  M +19 -0     rendering/render_inline.cpp   1.10
  M +3 -0      rendering/render_inline.h   1.8
  M +10 -1     rendering/render_object.h   1.184
  M +5 -5      rendering/render_text.cpp   1.245
  M +4 -4      rendering/render_text.h   1.112
  M +2 -30     xml/dom_nodeimpl.cpp   1.233
  M +1 -2      xml/dom_nodeimpl.h   1.156


--- kdelibs/khtml/rendering/render_inline.cpp  #1.9:1.10
 @ -441,2 +441,21  @ void RenderInline::caretPos(int offset, 
 }
 
+inline int minXPos(const RenderInline *o)
+{
+    int retval=6666666;
+    if (!o->firstLineBox()) return 0;
+    for (InlineRunBox* curr = o->firstLineBox(); curr; curr = curr->nextLineBox())
+        retval = kMin( retval, int( curr->m_x ));
+    return retval;
+}
+
+int RenderInline::inlineXPos() const
+{
+    return minXPos(this);
+}
+
+int RenderInline::inlineYPos() const
+{
+    return firstLineBox() ? firstLineBox()->yPos() : 0;
+}
+

--- kdelibs/khtml/rendering/render_inline.h  #1.7:1.8
 @ -62,4 +62,7  @ public:
     virtual int height() const;
 
+    virtual int inlineXPos() const;
+    virtual int inlineYPos() const;
+
     // used to calculate offsetWidth/Height.  Overridden by inlines (render_flow) to return
     // the remaining width on a given line (and the height of a single line).

--- kdelibs/khtml/rendering/render_object.h  #1.183:1.184
 @ -443,4 +443,13  @ public:
     virtual int yPos() const { return 0; }
 
+    /** Leftmost coordinate of this inline element relative to containing
+     * block. Always zero for non-inline elements.
+     */
+    virtual int inlineXPos() const { return 0; }
+    /** Topmost coordinate of this inline element relative to containing
+     * block. Always zero for non-inline elements.
+     */
+    virtual int inlineYPos() const { return 0; }
+
     // calculate client position of box
     virtual bool absolutePosition(int &/*xPos*/, int &/*yPos*/, bool fixed = false);

--- kdelibs/khtml/rendering/render_text.cpp  #1.244:1.245
 @ -1161,12 +1161,12  @ int RenderText::minXPos() const
 }
 
-int RenderText::xPos() const
+int RenderText::inlineXPos() const
 {
-    return 0;//m_lines.isEmpty() ? 0 : m_lines[0]->xPos();
+    return minXPos();
 }
 
-int RenderText::yPos() const
+int RenderText::inlineYPos() const
 {
-    return 0;//m_lines.isEmpty() ? 0 : m_lines[0]->yPos();
+    return m_lines.isEmpty() ? 0 : m_lines[0]->yPos();
 }
 

--- kdelibs/khtml/rendering/render_text.h  #1.111:1.112
 @ -208,6 +208,6  @ public:
     int minXPos() const;
 
-    virtual int xPos() const;
-    virtual int yPos() const;
+    virtual int inlineXPos() const;
+    virtual int inlineYPos() const;
 
     bool hasReturn() const { return m_hasReturn; }

--- kdelibs/khtml/xml/dom_nodeimpl.cpp  #1.232:1.233
 @ -348,5 +348,6  @ QRect NodeImpl::getRect() const
     int _x, _y;
     if(m_render && m_render->absolutePosition(_x, _y))
-        return QRect( _x, _y, m_render->width(), m_render->height() );
+        return QRect( _x + m_render->inlineXPos(), _y + m_render->inlineYPos(),
+                        m_render->width(), m_render->height() );
 
     return QRect();
 @ -1500,33 +1501,4  @ bool NodeBaseImpl::getLowerRightCorner(i
 }
 
-QRect NodeBaseImpl::getRect() const
-{
-    int xPos, yPos;
-    if (!getUpperLeftCorner(xPos,yPos))
-    {
-        xPos=0;
-        yPos=0;
-    }
-    int xEnd, yEnd;
-    if (!getLowerRightCorner(xEnd,yEnd))
-    {
-        if (xPos)
-            xEnd = xPos;
-        if (yPos)
-            yEnd = yPos;
-    }
-    else
-    {
-        if (xPos==0)
-            xPos = xEnd;
-        if (yPos==0)
-            yPos = yEnd;
-    }
-    if ( xEnd <= xPos || yEnd <= yPos )
-        return QRect( QPoint( xPos, yPos ), QSize() );
-
-    return QRect(xPos, yPos, xEnd - xPos, yEnd - yPos);
-}
-
 void NodeBaseImpl::setFocus(bool received)
 {

--- kdelibs/khtml/xml/dom_nodeimpl.h  #1.155:1.156
 @ -428,5 +428,4  @ public:
     virtual void detach();
 
-    virtual QRect getRect() const;
     bool getUpperLeftCorner(int &xPos, int &yPos) const;
     bool getLowerRightCorner(int &xPos, int &yPos) const;
_______________________________________________
Konq-bugs mailing list
Konq-bugs@mail.kde.org
https://mail.kde.org/mailman/listinfo/konq-bugs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic