Bug 72022 - Web Inspector: [SuggestBox] Correctly position the box under the first character of the suggestion prefix.
Summary: Web Inspector: [SuggestBox] Correctly position the box under the first charac...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Alexander Pavlov (apavlov)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-10 06:27 PST by Alexander Pavlov (apavlov)
Modified: 2011-11-10 09:07 PST (History)
10 users (show)

See Also:


Attachments
Patch (7.17 KB, patch)
2011-11-10 08:15 PST, Alexander Pavlov (apavlov)
no flags Details | Formatted Diff | Diff
Patch (10.32 KB, patch)
2011-11-10 08:59 PST, Alexander Pavlov (apavlov)
pfeldman: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Pavlov (apavlov) 2011-11-10 06:27:31 PST
Patch to follow
Comment 1 Alexander Pavlov (apavlov) 2011-11-10 08:15:39 PST
Created attachment 114506 [details]
Patch
Comment 2 Pavel Feldman 2011-11-10 08:20:18 PST
Comment on attachment 114506 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=114506&action=review

> Source/WebCore/inspector/front-end/TextPrompt.js:869
> +     * @param {*=} anchorBox

This is not nice.

> Source/WebCore/inspector/front-end/TextPrompt.js:884
> +            anchorBox = this._anchorBox || this._inputElement.boxInWindow(window, this._parentElement);

This is a strange control flow: if given, use, otherwise check if it has been used, otherwise do something.
Comment 3 Alexander Pavlov (apavlov) 2011-11-10 08:59:01 PST
Created attachment 114514 [details]
Patch
Comment 4 Pavel Feldman 2011-11-10 09:02:55 PST
Comment on attachment 114514 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=114514&action=review

> Source/WebCore/inspector/front-end/TextPrompt.js:383
> +        var anchorElement = textRange.startContainer.ownerDocument.createElement("span");

document.createElement
Comment 5 Alexander Pavlov (apavlov) 2011-11-10 09:07:19 PST
Committed r99867: <http://trac.webkit.org/changeset/99867>