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.
Created attachment 26327 [details]
Adds enclosingBlock to QWebHitTestResult
Adds the new API
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?
I think it's Block due to the fact that it refers to something inside WebKit - an HTML Block.
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?