WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
104902
Web Inspector: "Add Attribute" context menu on closing tag should apply on the opening tag on Elements Panel
https://bugs.webkit.org/show_bug.cgi?id=104902
Summary
Web Inspector: "Add Attribute" context menu on closing tag should apply on th...
Vivek Galatage
Reported
2012-12-13 04:14:04 PST
Web Inspector: "Add Attribute" context menu shouldn't appear on closing tag on Elements Panel. Steps: 1. Open any page with inspector open 2. Navigate to Elements panel 3. Expand some nodes so you can view the closing tag separately 4. Perform action (right click for linux/windows) to open context menu on the Closing Tag. 5. "Add Attribute" context menu item is shown 6. Go ahead with adding some attribute value 7. The attribute is seen even on the closing tag e.g. <div id="test"> ... </div id="test"> Expected: The "Add Attribute" on a closing tag shouldn't be shown Patch to follow.
Attachments
Patch
(2.06 KB, patch)
2012-12-13 04:17 PST
,
Vivek Galatage
no flags
Details
Formatted Diff
Diff
Patch
(2.55 KB, patch)
2012-12-13 04:59 PST
,
Vivek Galatage
no flags
Details
Formatted Diff
Diff
Patch
(2.55 KB, patch)
2012-12-13 06:41 PST
,
Vivek Galatage
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Vivek Galatage
Comment 1
2012-12-13 04:17:28 PST
Created
attachment 179247
[details]
Patch
Alexander Pavlov (apavlov)
Comment 2
2012-12-13 04:26:19 PST
Perhaps, instead of forbidding to add attributes on the closing tag, we might automatically add them to the opening tag? If |this| is the closing tag, you can bind this._addNewAttribute() to the opening tag using this.findTreeElement(this.representedObject), something like this: contextMenu.appendItem(..., this._addNewAttribute.bind(this._elementCloseTag ? this.treeOutline.findTreeElement(this.representedObject) : this));
Vivek Galatage
Comment 3
2012-12-13 04:59:27 PST
Created
attachment 179252
[details]
Patch
Alexander Pavlov (apavlov)
Comment 4
2012-12-13 05:05:42 PST
Comment on
attachment 179252
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=179252&action=review
The code looks good, just a minor ChangeLog fix is needed.
> Source/WebCore/ChangeLog:8 > + The context menu action on the Closing Tag takes to the Opening tag for adding the attribute.
There should be no caps in the middle of the sentence. Also, "takes" -> "scrolls to"
> Source/WebCore/ChangeLog:10 > + No new tests as UI tweak.
No new tests, as this is a UI change. (I've seen a guideline somewhere that imposes the use of common English rather than slang-ish/ambiguous terms, like "tweak".)
Vivek Galatage
Comment 5
2012-12-13 06:41:04 PST
Created
attachment 179264
[details]
Patch
Alexander Pavlov (apavlov)
Comment 6
2012-12-13 06:52:18 PST
Comment on
attachment 179264
[details]
Patch r=me
WebKit Review Bot
Comment 7
2012-12-13 07:25:22 PST
Comment on
attachment 179264
[details]
Patch Clearing flags on attachment: 179264 Committed
r137594
: <
http://trac.webkit.org/changeset/137594
>
WebKit Review Bot
Comment 8
2012-12-13 07:25:26 PST
All reviewed patches have been landed. Closing bug.
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