New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 682515 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug-Regression

Blocking:
issue 463348



Sign in to add a comment

Contenteditable input cursor often rendered incompletely or otherwise broken

Reported by timotij...@gmail.com, Jan 19 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2985.0 Safari/537.36

Example URL:
https://www.mediawiki.org/wiki/Project:Sandbox/Empty?veaction=edit

Steps to reproduce the problem:
1. Select a content editable area.
2. Observe text input cursor.

What is the expected behavior?

What went wrong?
The blinking cursor rendering (the vertical pipe) is often broken. Sometimes only the top of bottom third of it is visible. Other times, when it's supposed to be invisible for a frame, part of it stays behind. (See attached screen capture.)

I can consistently reproduce this on the above url.

* editing-w-devtools: Editing a non-empty content editable area, showing the cursor bug, with DevTools open.
* editing-emptypage: Editing a empty content editable area (aside from the inline slug).

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 57.0.2985.0  Channel: canary
OS Version: OS X 10.11.6
Flash Version: 

While I can consistently reproduce it on https://www.mediawiki.org/wiki/Project:Sandbox/Empty?veaction=edit, on other pages it appears to depend on some kind of context I don't yet fully understand. For example, it appears to happen most often next to an <a> or <img> element, and not so often when the cursor is within a text node.

See also:
* https://wikimedia.github.io/VisualEditor/demos/ve/desktop-dist.html#!pages/simple.html
* https://wikimedia.github.io/VisualEditor/demos/ve/desktop-dist.html#!pages/empty.html
 
editing-w-devtools.mov
3.9 MB Download
editing-emptypage.mov
425 KB Download

Comment 1 by tkent@chromium.org, Jan 19 2017

Blocking: 463348
Labels: Needs-Triage-M57
Cc: rbasuvula@chromium.org
Labels: -Type-Bug -Needs-Triage-M57 hasbisect-per-revision M-57 OS-Linux OS-Windows Type-Bug-Regression
Owner: wkorman@chromium.org
Status: Assigned (was: Unconfirmed)
Tested on chrome stable #55.0.2883.87, beta #56.0.2924.67 and Canary #57.0.2985.0 on Mac 10.12.2 and was able to reproduce the issue.

Below are the Bisect Details:
-----------------------------
Good build: 56.0.2888.0 (Revision: 424625)
Bad build: 56.0.2889.0 (Revision: 424926)

You are probably looking for a change made after 424789 (known good), but no later than 424790 (first known bad).

CHANGE-LOG URL:
---------------
https://chromium.googlesource.com/chromium/src/+log/8f1bc3342cf9167f24a03ea85c71f6212cca30f1..c0d0bd4e6f7e38c0208b78b2df9750ba7b0ceb0d

From the CL above, assigning the issue to the concern owner

@wkorman: 
------------------
Could you please look into the issue, pardon me if it has nothing to do with your changes and if possible please assign it to concern owner.

Review-Url: https://codereview.chromium.org/2401363003

Note: Able to reproduce the issue in Win 7 & Ubuntu 14.04.

Components: -Blink Blink>Editing

Comment 5 by yosin@chromium.org, Jan 23 2017

Components: -Blink>Editing Blink>Editing>Selection

Comment 6 by yosin@chromium.org, Jan 23 2017

Can we assume |m_visualRect.contatins(drawingRect)| in CaretBase::paintCaret()?
Note: |m_visualRect| is updated in |CaretBase::invalidateLocalCaretRect()|

Some layout tests are failed. So, assertion |m_visualRect.contatins(drawingRect)| is failed some cases.
Is it OK to paint outside invalidate rectangle?

void CaretBase::paintCaret(Node* node,
                           GraphicsContext& context,
                           const LayoutRect& caretLocalRect,
                           const LayoutPoint& paintOffset,
                           DisplayItem::Type displayItemType) {
  if (DrawingRecorder::useCachedDrawingIfPossible(context, *this,
                                                  displayItemType))
    return;

  LayoutRect drawingRect = caretLocalRect;
  if (LayoutBlock* layoutObject = caretLayoutObject(node))
    layoutObject->flipForWritingMode(drawingRect);
  drawingRect.moveBy(paintOffset);
  DCHECK(m_visualRect.contains(drawingRect));

  const Color caretColor =
      node->layoutObject()->resolveColor(CSSPropertyCaretColor);
  IntRect paintRect = pixelSnappedIntRect(drawingRect);
  DrawingRecorder drawingRecorder(context, *this, DisplayItem::kCaret,
                                  paintRect);
  context.fillRect(paintRect, caretColor);
}



wkorman@ Gentle Ping! Could you please let us know is there any latest update available on this issue?

Thanks!
Cc: chrishtr@chromium.org wangxianzhu@chromium.org
I can reproduce in Linux 58.0.3004.3 (Official Build) dev (64-bit) by visiting:

https://wikimedia.github.io/VisualEditor/demos/ve/desktop-dist.html#!pages/simple.html

and clicking in "was" to left of the linked "popularised" text, and then hitting right arrow until caret is just before the first 'p'. The caret ceases blinking while in this position but typing will insert text before the 'p'.

The caret blinks correctly even in this position in FireFox for comparison.

Re: c#6 I don't think it's ok to paint outside the invalidation rectangle. We recently modified caret invalidate/paint in https://codereview.chromium.org/2665823002 so I will make sure issue still repros at ToT as that change is not in current dev build.
These issues look fixed at ToT near certainly due to https://codereview.chromium.org/2665823002. Congrats to author of that change. We can consider merging to M57 if we feel warranted, though I would personally suggest waiting for it to ship normally in M58. The fixing change is not trivial. Open to thoughts.
I also think we should wait. Either just wait for m58, or wait after a few canary/dev builds and merge to m57 if we see no problems.
Status: Fixed (was: Assigned)
Marking fixed, any build after r448799 should be fixed. 58.0.3006.0 was the first version to include that change.

Sign in to add a comment