[Webkit-unassigned] [Bug 35125] [Qt] Web Inspector Does Not Highlight Elements
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jan 19 09:26:10 PST 2011
https://bugs.webkit.org/show_bug.cgi?id=35125
--- Comment #20 from Ragner Magalhaes <ragner.magalhaes at openbossa.org> 2011-01-19 09:26:10 PST ---
Hi Simon,
thank you for your review.
(In reply to comment #18)
> (From update of attachment 74311 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=74311&action=review
>
> r- because of the rect issue Antonio pointed out and because of the save() / restore() that should be optimized to not be executed in the common case when there is no highlighted node. Otherwise the patch is going in the right direction I'd say :)
The inspector controller draws a label out of the highlighted rect on top or on bottom(https://bug-35125-attachments.webkit.org/attachment.cgi?id=74312)
I don't know how to fix the rect issue because is not possible
to get the label's size/position, the controller just build it in the draw method.
What could I do about the label issue?
>
> > WebKit/qt/Api/qwebframe.cpp:415
> > +#if ENABLE(INSPECTOR)
> > + context->save();
> > + frame->page()->inspectorController()->drawNodeHighlight(*context);
> > + context->restore();
> > +#endif
>
> It appears that this code is in QWebFramePrivate::renderRelativeCoords. In the _common_ case we would now end up calling save() and restore() on the graphics context each time we render content, where _most_ of the time drawNodeHighlight() returns immediately. save() and restore() are expensive operations we should avoid if necessary.
>
> I suggest to either add a function tin InspectorController that allows us to perform a check here to see if we need to call drawNodeHighlight() and only then do save() / restore() or alternatively change the implementation of drawNodeHighligh() to do the save() / restore() pair.
Ok,
I will think about and propose a new patch :D
Thank you
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list