Bug 23044

Summary: New API for QWebHitTestResult for enclosingBlock()
Product: WebKit Reporter: Adam Treat <manyoso>
Component: WebKit QtAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Enhancement CC: staikos
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: All   
Attachments:
Description Flags
Adds enclosingBlock to QWebHitTestResult staikos: review+

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?