Bug 81766 - Web Inspector: get rid of isInEditMode, use isBeingEdited on particular element.
Summary: Web Inspector: get rid of isInEditMode, use isBeingEdited on particular element.
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: Pavel Feldman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-21 05:22 PDT by Pavel Feldman
Modified: 2012-03-21 09:33 PDT (History)
10 users (show)

See Also:


Attachments
Patch (47.70 KB, patch)
2012-03-21 05:59 PDT, Pavel Feldman
yurys: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Feldman 2012-03-21 05:22:38 PDT
We should check even target and its ancestors for being edited, not use some global property.
Comment 1 Pavel Feldman 2012-03-21 05:59:29 PDT
Created attachment 133026 [details]
Patch
Comment 2 Yury Semikhatsky 2012-03-21 09:24:12 PDT
Comment on attachment 133026 [details]
Patch

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

> Source/WebCore/ChangeLog:8
> +        We should check even target and its ancestors for being edited, not use some

even -> event

> Source/WebCore/inspector/front-end/UIUtils.js:192
> +    while (element && element.nodeType === Node.ELEMENT_NODE) {

Instead of element.nodeType === Node.ELEMENT_NODE you can just use element.parentElement below.

> Source/WebCore/inspector/front-end/utilities.js:381
> +    this.stopImmediatePropagation();

It was stopPropagation, are you sure this change won't break any listener?
Comment 3 Pavel Feldman 2012-03-21 09:28:46 PDT
> even -> event

Done.

> 
> Instead of element.nodeType === Node.ELEMENT_NODE you can just use element.parentElement below.
>

Done.
 
> > Source/WebCore/inspector/front-end/utilities.js:381
> > +    this.stopImmediatePropagation();
> 
> It was stopPropagation, are you sure this change won't break any listener?

stopImmediatePropagation implies stopPropagation, so it should work.
Comment 4 Pavel Feldman 2012-03-21 09:33:28 PDT
Committed r111551: <http://trac.webkit.org/changeset/111551>