[Webkit-unassigned] [Bug 21095] Search should jump in all matches in Elements panel
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Apr 2 08:16:27 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=21095
--- Comment #1 from Sammy <83.samarth at gmail.com> 2012-04-02 08:16:28 PST ---
The problem here seems to be in 2 parts
1). Individual matches in a node are not calculated hence giving wrong count.
- I have done the changes for it and will upload the patch soon.
2). Jumping of matched element is not exclusive.
- This seems to be an issue in javascript which is handling highlighting search results. The js is actually wrapping full element node as well as text nodes in a single outer-span-element. Reg-ex search is then performed for the text value (which is "element-node" + "text-node")of this outer-span-element (which eventually will always be same for matches in element node or text node).
For ex: <div id="website"> we all love web </div>
In inpector, this gets wrapped in outer span as
<span class="highlight">
<span class="webkit-html-tag"> "<" </span>
<span class="webkit-html-tag-name"> div </span>
<span class="webkit-html-tag-attribute">
<span class="webkit-html-attribute-name">id</span>
<span class="webkit-html-attribute-value"> website </span>
</span>
<span class="webkit-html-text-node"> we all love website </span>
<span class="webkit-html-tag"> "<" <span>/div</span> </span>
</span>
Actual text which gets search, for highlighting, is the text value of outer span - "<div id="website"> we all love web </div>". So eventhough DOM Agent's perform search returns back actual node (text, comment, element) ; regex for highlighting happens for all instances of match in this text. Hence not jumping to individual matches.
I am looking into the js changes needed. Will upload the patch for it soon!!
--
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