Open Bug 1892684 Opened 5 months ago Updated 2 months ago

Text indent is shifted when the Conditional breakpoint panel is open

Categories

(DevTools :: Debugger, defect, P2)

defect

Tracking

(Not tracked)

ASSIGNED

People

(Reporter: bomsy, Assigned: bomsy)

References

(Blocks 2 open bugs)

Details

(Keywords: leave-open)

Attachments

(2 files, 1 obsolete file)

In Bug 1887649 support for showing Conditional breakpoints. When the conditional breakpoints panel is open the line just above (See screenshot) is indented incorrectly as compared to the others. This issue is likely due to the ViewPlugin which does not support defining the block property . An alternative is to use StateFields instead, which supports the block property.

Severity: -- → S3
Priority: -- → P2

Highlights of this patch

  • Fixes the line shifting issue in the related bug as the block property can be used in Decoration.widget.
  • Uses Statefields. With StateFields codemirror has more control over updates, avoiding possible crashes like in Bug 1898157
  • Changes from using conditions on markers to using positions, this means we can just render the marker at the
    desired location without always needing to loop over the all the lines of the viewport. Most times the number of positions to mark
    are a lot lesser that the no of lines in the viewport.
  • When explicitly updating a marker only the required decoration is updated.
Assignee: nobody → hmanilla
Status: NEW → ASSIGNED
Keywords: leave-open
No longer blocks: 1773246
Depends on: 1905380

Comment on attachment 9407807 [details]
Bug 1892684 - [devtools] Refactor lineContentMarkers to use StateFields from ViewPlugins r=#devtools-reviewers

Revision D213012 was moved to bug 1905380. Setting attachment 9407807 [details] to obsolete.

Attachment #9407807 - Attachment is obsolete: true

The story here :-
CM6 adds a padding of 6px as a space between the gutter and the editor content.
The consequence of this the conditional panel will have a 6px gap on the left side.

Prior to this patch i removed the padding on the .cm-line element which contains the
conditional panel, this causes the content on the line to shift and ..viola ..the BUG.

To fix this, i'm adding 6px padding-inline-start to compensate.

Meh solution ... :)

Depends on D213012

Pushed by hmanilla@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/038c252a0953 [devtools] Fix the text indent when the conditional panel is open r=devtools-reviewers,nchevobbe

Bomsy, I guess we can close the bug?

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: