Bug 23044 - New API for QWebHitTestResult for enclosingBlock()
Summary: New API for QWebHitTestResult for enclosingBlock()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other All
: P2 Enhancement
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-30 15:29 PST by Adam Treat
Modified: 2009-01-04 09:41 PST (History)
1 user (show)

See Also:


Attachments
Adds enclosingBlock to QWebHitTestResult (3.39 KB, patch)
2008-12-30 15:30 PST, Adam Treat
staikos: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Treat 2008-12-30 15:29:38 PST
Hi,

Currently the QWebHitTestResult does not have any API for returning a rect for the smallest enclosing block element of the hit test.  This can be useful information for some features.  Attached is a patch which adds this ability.

Cheers,

Adam
Comment 1 Adam Treat 2008-12-30 15:30:49 PST
Created attachment 26327 [details]
Adds enclosingBlock to QWebHitTestResult

Adds the new API
Comment 2 Holger Freyther 2009-01-03 11:41:56 PST
Two minor questions:
   - Is there a reason to not go with the coding style guidelines? E.g. the two types should be Foo* var instead of Foo *var.

   - Is there any other API in Qt that is using the word Block for rectangles? 
Comment 3 George Staikos 2009-01-04 08:10:09 PST
I think it's Block due to the fact that it refers to something inside WebKit - an HTML Block.
Comment 4 Adam Treat 2009-01-04 09:41:44 PST
As George mentioned, the 'Block' is in reference to the fact that it is returning a rect for the enclosing HTML Block element.

As for the coding style guidelines, I was matching what was in the rest of qwebframe.cpp as this is API code, not WebCore code hence it should match the Qt style guidelines.  Has this changed?