WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
72731
pvbrowser
QWebHitTestResult and SVG rendering with QWebFrame
https://bugs.webkit.org/show_bug.cgi?id=72731
Summary
QWebHitTestResult and SVG rendering with QWebFrame
pvbrowser
Reported
2011-11-18 08:19:21 PST
I want to know which graphical object within a SVG is clicked. It is done like that: QWebFrame *wf = ... which i use ...; QWebHitTestResult result = wf->hitTestContent(QPoint(x,y)); // x,y from mouse event QWebElement e = result.element(); QRect r = result.boundingRect(); printf("WebKit hitTestResult: xy=%d,%d wh=%d,%d isNull=%d\n", r.x(), r.y(), r.width(), r.height(), e.isNull()); It works on rectangles, circles ... But not on text. There the QWebElement isNull. Probably this is because the XML for the text has no width and height attribute as other objects have. <g id="MyIdentifier" inkscape:label="#g5029"> <rect y="42.362183" x="467" height="33" width="87" id="rect5009" style="fill:#999999;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;" /> <text sodipodi:linespacing="125%" id="text5016" y="63.362183" x="486" style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans;" xml:space="preserve"><tspan y="63.362183" x="486" id="tspan5018" sodipodi:role="line">MyText</tspan></text> </g> If the mouse is clicked above the <rect i can identify "MyIdentifier" But if the mouse is clicked above <text a NULL element is returned although the result.boundingRect() is correctly returned. Since there is no width and height attribute on the text the style fontsize etc... should be used.
Attachments
Add attachment
proposed patch, testcase, etc.
Ahmad Saleem
Comment 1
2022-07-13 04:56:58 PDT
Qt Framework Webkit builds are not supported anymore and there is no build bot of these as such as well. I think this can be marked as "RESOLVED WONTFIX". Thanks!
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug