WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
101841
Web Inspector: migrate text editor to mutation observers
https://bugs.webkit.org/show_bug.cgi?id=101841
Summary
Web Inspector: migrate text editor to mutation observers
Pavel Feldman
Reported
2012-11-10 10:04:14 PST
Otherwise, we miss notifications on the removed lines.
Attachments
Patch
(6.33 KB, patch)
2012-11-10 10:07 PST
,
Pavel Feldman
no flags
Details
Formatted Diff
Diff
Patch
(12.52 KB, patch)
2012-11-10 23:06 PST
,
Pavel Feldman
no flags
Details
Formatted Diff
Diff
Patch
(15.16 KB, patch)
2012-11-11 05:52 PST
,
Pavel Feldman
no flags
Details
Formatted Diff
Diff
Patch
(15.66 KB, patch)
2012-11-12 05:03 PST
,
Pavel Feldman
no flags
Details
Formatted Diff
Diff
[Patch] for landing
(17.57 KB, patch)
2012-11-13 00:31 PST
,
Pavel Feldman
vsevik
: review+
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Pavel Feldman
Comment 1
2012-11-10 10:07:56 PST
Created
attachment 173456
[details]
Patch
Pavel Feldman
Comment 2
2012-11-10 23:06:18 PST
Created
attachment 173488
[details]
Patch
Pavel Feldman
Comment 3
2012-11-11 05:52:09 PST
Created
attachment 173501
[details]
Patch
Vsevolod Vlasov
Comment 4
2012-11-12 03:50:14 PST
Comment on
attachment 173501
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=173501&action=review
> Source/WebCore/inspector/front-end/DefaultTextEditor.js:2080 > + if (false) // For paint debugging.
Maybe add a debug flag at the top of this file?
> Source/WebCore/inspector/front-end/DefaultTextEditor.js:2317 > + // console.log(this.element.innerText === this._textModel.text() + "\n");
Ditto
Pavel Feldman
Comment 5
2012-11-12 05:03:50 PST
Created
attachment 173626
[details]
Patch
Vsevolod Vlasov
Comment 6
2012-11-12 05:10:33 PST
Comment on
attachment 173626
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=173626&action=review
> Source/WebCore/inspector/front-end/DefaultTextEditor.js:2147 > + if (mutation.addedNodes.length === 1 && mutation.addedNodes[0].nodeName === "BR")
remove br check?
> Source/WebCore/inspector/front-end/DefaultTextEditor.js:2211 > // Ensure that the newly inserted line row has no lineNumber.
Shouldn't it be assert?
Andrey Adaikin
Comment 7
2012-11-12 05:27:35 PST
Comment on
attachment 173626
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=173626&action=review
>> Source/WebCore/inspector/front-end/DefaultTextEditor.js:2211 >> // Ensure that the newly inserted line row has no lineNumber. > > Shouldn't it be assert?
This is to remove the lineNumber property from a line row being detached from the DOM, as it may be (and will be) cached for a future reuse, and we don't ever want to reuse it with a wrong lineNumber attribute.
Andrey Adaikin
Comment 8
2012-11-12 05:31:38 PST
Comment on
attachment 173626
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=173626&action=review
>>> Source/WebCore/inspector/front-end/DefaultTextEditor.js:2211 >>> // Ensure that the newly inserted line row has no lineNumber. >> >> Shouldn't it be assert? > > This is to remove the lineNumber property from a line row being detached from the DOM, as it may be (and will be) cached for a future reuse, and we don't ever want to reuse it with a wrong lineNumber attribute.
ah we insert a line row here, I missed this... I guess we can get wrong lineNumbers after a drag'n'drop of a peace of code in the editor from one place to another.
Andrey Adaikin
Comment 9
2012-11-12 05:34:24 PST
Comment on
attachment 173626
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=173626&action=review
> Source/WebCore/inspector/front-end/DefaultTextEditor.js:2080 > + if (false) // For paint debugging.
remove?
> Source/WebCore/inspector/front-end/DefaultTextEditor.js:2186 > + // Debug check for validating whether text model matches the DOM representation.
meant to leave this comment?
> Source/WebCore/inspector/front-end/DefaultTextEditor.js:2320 > // This is a "foreign" call outside of this class. Should be before we delete the dirty lines flag.
this comment is no longer valid
Pavel Feldman
Comment 10
2012-11-12 06:35:29 PST
Committed
r134223
: <
http://trac.webkit.org/changeset/134223
>
WebKit Review Bot
Comment 11
2012-11-12 08:10:05 PST
Re-opened since this is blocked by
bug 101939
Pavel Feldman
Comment 12
2012-11-13 00:31:42 PST
Created
attachment 173841
[details]
[Patch] for landing
Pavel Feldman
Comment 13
2012-11-13 00:35:08 PST
Committed
r134379
: <
http://trac.webkit.org/changeset/134379
>
Csaba Osztrogonác
Comment 14
2012-11-13 02:10:57 PST
(In reply to
comment #13
)
> Committed
r134379
: <
http://trac.webkit.org/changeset/134379
>
It broke zillion tests at least on Qt -
http://build.webkit.sed.hu/results/x86-64%20Linux%20Qt%20Release/r134382%20%2845038%29/results.html
Csaba Osztrogonác
Comment 15
2012-11-13 02:13:29 PST
It seems the root of the problem is that mutation observers is disabled on Qt. Is there a reason why is it disabled?
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