Skip to content

Commit

Permalink
Merge r174807 - REGRESSION (r169024): Undetermined text is not displa…
Browse files Browse the repository at this point in the history
…yed in the search field of Adobe Help Website

https://bugs.webkit.org/show_bug.cgi?id=137679
rdar://problem/18450335

Reviewed by Enrica Casucci.

Source/WebCore:

Test: platform/mac/editing/input/selected-composed-text-painting.html

* rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paint): We do not paint
selection beckground for unconfirmed text with underlines, so we should use a regular
style for text painting, as well.

LayoutTests:

* platform/mac/editing/input/selected-composed-text-painting-expected.html: Added.
* platform/mac/editing/input/selected-composed-text-painting.html: Added.

Canonical link: https://commits.webkit.org/154760.124@webkitgtk/2.6
git-svn-id: https://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.6@174980 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
aproskuryakov authored and carlosgcampos committed Oct 21, 2014
1 parent aa4e493 commit 413ae57
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 0 deletions.
11 changes: 11 additions & 0 deletions LayoutTests/ChangeLog
@@ -1,3 +1,14 @@
2014-10-16 Alexey Proskuryakov <ap@apple.com>

REGRESSION (r169024): Undetermined text is not displayed in the search field of Adobe Help Website
https://bugs.webkit.org/show_bug.cgi?id=137679
rdar://problem/18450335

Reviewed by Enrica Casucci.

* platform/mac/editing/input/selected-composed-text-painting-expected.html: Added.
* platform/mac/editing/input/selected-composed-text-painting.html: Added.

2014-10-14 Zalan Bujtas <zalan@apple.com>

REGRESSION (Safari 7.1/8.0): Border-radius and overflow hidden renders incorrectly.
Expand Down
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<body>
<p>Test that selected unconfirmed text ignores ::selection rules.
To test manually, type anything using Kotoeri Hiragana, and press down arrow. The text should not become invisible.</p>
<input id="test" type="text">
<script>

var test = document.getElementById('test');
test.focus();

var markedText = textInputController.makeAttributedString("ひらがな");
markedText.addAttribute("NSUnderline", 2);
textInputController.setMarkedText(markedText, 0, 4);

</script>
</body>
</html>
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<body>
<style>
::selection {
background: #447099;
color: #fff
}

</style>
<p>Test that selected unconfirmed text ignores ::selection rules.
To test manually, type anything using Kotoeri Hiragana, and press down arrow. The text should not become invisible.</p>
<input id="test" type="text">
<script>

var test = document.getElementById('test');
test.focus();

var markedText = textInputController.makeAttributedString("ひらがな");
markedText.addAttribute("NSUnderline", 2);
textInputController.setMarkedText(markedText, 0, 4);

</script>
</body>
</html>
14 changes: 14 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,17 @@
2014-10-16 Alexey Proskuryakov <ap@apple.com>

REGRESSION (r169024): Undetermined text is not displayed in the search field of Adobe Help Website
https://bugs.webkit.org/show_bug.cgi?id=137679
rdar://problem/18450335

Reviewed by Enrica Casucci.

Test: platform/mac/editing/input/selected-composed-text-painting.html

* rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paint): We do not paint
selection beckground for unconfirmed text with underlines, so we should use a regular
style for text painting, as well.

2014-10-14 Jer Noble <jer.noble@apple.com>

REGRESSION (r159208): Crash when clicking scrubber after navigating away/back to video
Expand Down
4 changes: 4 additions & 0 deletions Source/WebCore/rendering/InlineTextBox.cpp
Expand Up @@ -537,6 +537,10 @@ void InlineTextBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset,
const ShadowData* selectionShadow;
TextPaintStyle selectionPaintStyle = computeTextSelectionPaintStyle(textPaintStyle, renderer(), lineStyle, paintInfo, paintSelectedTextOnly, paintSelectedTextSeparately, selectionShadow);

// Text with custom underlines does not have selection background painted, so selection paint style is not appropriate for it.
if (useCustomUnderlines)
selectionPaintStyle = textPaintStyle;

// Set our font.
const Font& font = fontToUse(lineStyle, renderer());
// 1. Paint backgrounds behind text if needed. Examples of such backgrounds include selection
Expand Down

0 comments on commit 413ae57

Please sign in to comment.