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

Issue 620298 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Selection newline highlight can be incorrectly shown for 'display: inline-block' with successive inlines.

Reported by cyril.au...@gmail.com, Jun 15 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2763.0 Safari/537.36

Example URL:

Steps to reproduce the problem:
1. https://jsfiddle.net/crl/grkapoed/1/
2. select text around the link
3. observe the selection just after the link while hovering or not the link with the mouse

What is the expected behavior?
uniform selection 

What went wrong?
it seems the selection after the link is twice as opaque as elsewhere, maybe because the ::after element is still being painted?

Does it occur on multiple sites: No

Is it a problem with a plugin? No 

Did this work before? N/A 

Does this work in other browsers? Yes 

Chrome version: 53.0.2763.0  Channel: dev
OS Version: 10.0
Flash Version: Shockwave Flash 22.0 r0
 
doubleselectionchrome.JPG
10.6 KB View Download
Components: Blink>CSS

Comment 2 by nainar@chromium.org, Jun 17 2016

Labels: Needs-Bisect
Status: Untriaged (was: Unconfirmed)
Labels: -Type-Compat -Needs-Bisect M-53 hasbisect OS-Linux OS-Mac Type-Bug-Regression
Owner: wkorman@chromium.org
Status: Assigned (was: Untriaged)
cyril.auburtin@ Thanks for the issue,

Able to reproduce the issue on windows 7, Linux Ubuntu 14.04 and Mac 10.11.5 using chrome version 51.0.2704.103 and canary 53.0.2772.0.
This is regression issue broken in M47. Please find the bisect information as below

Narrow bisect
==============
Good : 47.0.2517.0  --   (official build revision 350263)
Bad:: 47.0.2518.0  --   (official build revision 350532)

CHANGELOG URL:
====================  https://chromium.googlesource.com/chromium/src/+log/8f939fa3d3862e1be2a2696268b8c56497eab62d..fc336926514596ca46b1c1e2973f48c1b6766df1

Blink CL:
===============
https://chromium.googlesource.com/chromium/blink/+log/4ff1e4c..875d622

Possible suspect from the above blink CL
https://chromium.googlesource.com/chromium/blink/+/875d622e225086fdaa6271aeead263267e4dcb31

wkorman@ Could you please look into this issue if it is rleated to your change,else please route this to an appropriate dev person.

Thanks,
Components: -Blink>CSS Blink>Paint
Project Member

Comment 5 by sheriffbot@chromium.org, Jul 5 2016

Labels: -M-53 M-54 MovedFrom-53
Moving this nonessential bug to the next milestone.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Possibly related:

http://crrev.com/1727113007
Summary: Selection newline highlight can be incorrectly shown for 'display: inline-block' with successive inlines. (was: multiple layers of text selection are applied (CSS))
Reduced test case attached. It looks like making the anchor 'display: inline-block' leads to existing logic concluding that a newline highlight is required (we think the end of the block implies a line wrap), but since it is an inline block, we don't actually want that highlight.

Potential solution is to not show newline highlight for inline-block, or, if we do, actually make sure there aren't any further inlines on the line.
ellipsis-selection.html
123 bytes View Download
Cc: chrishtr@chromium.org wkorman@chromium.org
 Issue 697237  has been merged into this issue.
 Issue 591386  has been merged into this issue.
Notes re: attached sample minimal test case scrutinizing re:
logic in InlineTextBox::hasWrappedSelectionNewline --

- each of the two inline text boxes we expect to see based on the
  test case contents has a separate RootInlineBox
- SelectionState of 'x' is SelectionStart
- SelectionState of ',' is SelectionEnd
- for both 'x' and ',' (root().lastLeafChild() == this) is true
- for 'x', root().firstSelectedBox() and root().lastSelectedBox()
  are both the single InlineTextBox for 'x' itself
- for ',', root().firstSelectedBox() is the empty InlineBox
  ...010 (see below) and root().lastSelectedBox() is the
  InlineTextBox for ','.  I'm not yet sure why we have what seems
  like a dummy/placeholder empty InlineBox in the second
  RootInlineBox, perhaps an artifact of how we implement display:
  inline-block.

= line tree for 'x'

LayoutBlockFlow 0x3eb67561c270         	DIV style="display:inline-block"
  RootInlineBox 0x3eb675654010         	LayoutBlockFlow 0x3eb67561c270 {pos=0,0 size=8,17} baseline=14/9
*   InlineTextBox 0x3eb675644010       	LayoutText 0x3eb67562c010                                                 (0,1) "x"

= line tree for ','

LayoutBlockFlow 0x3eb67561c140         	BODY
  RootInlineBox 0x3eb6756540d0         	LayoutBlockFlow 0x3eb67561c140 {pos=0,0 size=12,17} baseline=14/9
    InlineBox 0x3eb675660010           	LayoutBlockFlow 0x3eb67561c270 {pos=0,0 size=8,18} baseline=14/14
*   InlineTextBox 0x3eb675644088       	LayoutText 0x3eb67562c0d8                                                 (0,1) ","

= layout tree

  LayoutBlockFlow {HTML} at (0,0) size 800x36
    LayoutBlockFlow {BODY} at (8,8) size 784x20
      LayoutBlockFlow {DIV} at (0,0) size 8x20
        LayoutText {#text} at (0,0) size 8x19
          text run at (0,0) width 8: "x"
      LayoutText {#text} at (8,0) size 4x19
        text run at (8,0) width 4: ","

697237.html
59 bytes View Download
Cc: -wkorman@chromium.org
Labels: -OS-Linux -OS-Windows -OS-Mac OS-All
http://crrev.com/2728263002 in review.
Project Member

Comment 12 by bugdroid1@chromium.org, Mar 8 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a120b02dfcaecf58c41dd1ab19baac901249b197

commit a120b02dfcaecf58c41dd1ab19baac901249b197
Author: wkorman <wkorman@chromium.org>
Date: Wed Mar 08 09:28:05 2017

Omit wrapped selection for text under inline containing block.

If the containing block 'A' for a collection of inline text boxes
is inline and the selection continues, we no longer paint a
wrapped selection highlight for the last inline text box in 'A'.

BUG= 620298 

Review-Url: https://codereview.chromium.org/2728263002
Cr-Commit-Position: refs/heads/master@{#455414}

[delete] https://crrev.com/c71e0a42a3eb47e551bafaa4e5d53f481a9bf89e/third_party/WebKit/LayoutTests/fast/text/flexbox-selection-expected.html
[delete] https://crrev.com/c71e0a42a3eb47e551bafaa4e5d53f481a9bf89e/third_party/WebKit/LayoutTests/fast/text/flexbox-selection-nested-expected.html
[add] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/LayoutTests/paint/selection/text-selection-inline-block-expected.png
[add] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/LayoutTests/paint/selection/text-selection-inline-block-expected.txt
[add] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/LayoutTests/paint/selection/text-selection-inline-block-rtl-expected.png
[add] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/LayoutTests/paint/selection/text-selection-inline-block-rtl-expected.txt
[add] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/LayoutTests/paint/selection/text-selection-inline-block-rtl.html
[add] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/LayoutTests/paint/selection/text-selection-inline-block.html
[add] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/LayoutTests/platform/linux/fast/text/flexbox-selection-expected.png
[add] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/LayoutTests/platform/linux/fast/text/flexbox-selection-expected.txt
[add] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/LayoutTests/platform/linux/fast/text/flexbox-selection-nested-expected.png
[add] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/LayoutTests/platform/linux/fast/text/flexbox-selection-nested-expected.txt
[add] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/LayoutTests/platform/linux/paint/selection/text-selection-inline-block-expected.png
[add] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/LayoutTests/platform/linux/paint/selection/text-selection-inline-block-expected.txt
[add] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/LayoutTests/platform/linux/paint/selection/text-selection-inline-block-rtl-expected.png
[add] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/LayoutTests/platform/linux/paint/selection/text-selection-inline-block-rtl-expected.txt
[add] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/text/flexbox-selection-expected.png
[add] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/text/flexbox-selection-nested-expected.png
[add] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/text/flexbox-selection-expected.png
[add] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/text/flexbox-selection-expected.txt
[add] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/text/flexbox-selection-nested-expected.png
[add] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/LayoutTests/platform/mac-mac10.11/fast/text/flexbox-selection-nested-expected.txt
[add] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/LayoutTests/platform/mac-mac10.11/paint/selection/text-selection-inline-block-expected.png
[add] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/LayoutTests/platform/mac-mac10.11/paint/selection/text-selection-inline-block-expected.txt
[add] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/LayoutTests/platform/mac-mac10.11/paint/selection/text-selection-inline-block-rtl-expected.png
[add] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/LayoutTests/platform/mac-mac10.11/paint/selection/text-selection-inline-block-rtl-expected.txt
[add] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/text/flexbox-selection-nested-expected.png
[add] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/LayoutTests/platform/mac-retina/fast/text/flexbox-selection-expected.png
[add] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/LayoutTests/platform/mac-retina/fast/text/flexbox-selection-expected.txt
[add] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/LayoutTests/platform/mac-retina/fast/text/flexbox-selection-nested-expected.png
[add] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/LayoutTests/platform/mac-retina/fast/text/flexbox-selection-nested-expected.txt
[add] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/LayoutTests/platform/mac-retina/paint/selection/text-selection-inline-block-expected.png
[add] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/LayoutTests/platform/mac-retina/paint/selection/text-selection-inline-block-expected.txt
[add] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/LayoutTests/platform/mac-retina/paint/selection/text-selection-inline-block-rtl-expected.png
[add] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/LayoutTests/platform/mac-retina/paint/selection/text-selection-inline-block-rtl-expected.txt
[add] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/LayoutTests/platform/win/fast/text/flexbox-selection-expected.png
[add] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/LayoutTests/platform/win/fast/text/flexbox-selection-expected.txt
[add] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/LayoutTests/platform/win/fast/text/flexbox-selection-nested-expected.png
[add] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/LayoutTests/platform/win/fast/text/flexbox-selection-nested-expected.txt
[add] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/LayoutTests/platform/win/paint/selection/text-selection-inline-block-expected.png
[add] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/LayoutTests/platform/win/paint/selection/text-selection-inline-block-expected.txt
[add] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/LayoutTests/platform/win/paint/selection/text-selection-inline-block-rtl-expected.png
[add] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/LayoutTests/platform/win/paint/selection/text-selection-inline-block-rtl-expected.txt
[add] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/LayoutTests/platform/win7/fast/text/flexbox-selection-expected.png
[add] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/LayoutTests/platform/win7/fast/text/flexbox-selection-nested-expected.png
[modify] https://crrev.com/a120b02dfcaecf58c41dd1ab19baac901249b197/third_party/WebKit/Source/core/layout/line/InlineTextBox.cpp

Status: Fixed (was: Assigned)

Sign in to add a comment