Bug 1867939, part 4: Implemented the ::target-text CSS Pseudo Element. r=emilio,devtools-reviewers,nchevobbe
This patch implements the `::target-text` pseudo element. Similarly to the Custom Highlight API, this is done implementing a new Selection type. Differential Revision: https://phabricator.services.mozilla.com/D195687
This commit is contained in:
@@ -5676,6 +5676,10 @@ bool nsTextFrame::GetSelectionTextColors(SelectionType aSelectionType,
|
||||
aHighlightName, aBackground);
|
||||
return hasForeground || hasBackground;
|
||||
}
|
||||
case SelectionType::eTargetText: {
|
||||
aTextPaintStyle.GetTargetTextColors(aForeground, aBackground);
|
||||
return true;
|
||||
}
|
||||
case SelectionType::eURLSecondary:
|
||||
aTextPaintStyle.GetURLSecondaryColor(aForeground);
|
||||
*aBackground = NS_RGBA(0, 0, 0, 0);
|
||||
|
||||
Reference in New Issue
Block a user