Commit 576a5fb8 authored by zalan@apple.com's avatar zalan@apple.com

REGRESSION(r152313): Links in certain twitter postings don't warp correctly on page

https://bugs.webkit.org/show_bug.cgi?id=118435

Reviewed by David Hyatt.

When we find an empty inline in the middle of the word, prefer breaking it before
instead of after to match other browsers' rendering.

Source/WebCore:

Test: fast/text/whitespace/inline-whitespace-wrapping-12.html

* rendering/RenderBlockLineLayout.cpp:
(WebCore::canBreakAtThisPosition):

LayoutTests:

* fast/text/whitespace/inline-whitespace-wrapping-12-expected.html: Added.
* fast/text/whitespace/inline-whitespace-wrapping-12.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153061 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 4da41dc6
2013-07-23 Zalan Bujtas <zalan@apple.com>
REGRESSION(r152313): Links in certain twitter postings don't warp correctly on page
https://bugs.webkit.org/show_bug.cgi?id=118435
Reviewed by David Hyatt.
When we find an empty inline in the middle of the word, prefer breaking it before
instead of after to match other browsers' rendering.
* fast/text/whitespace/inline-whitespace-wrapping-12-expected.html: Added.
* fast/text/whitespace/inline-whitespace-wrapping-12.html: Added.
2013-07-23 Alexey Proskuryakov <ap@apple.com>
Dictionary hotkey does not work on vertical text
<!DOCTYPE html>
<html>
<head>
<style>
div {
width: 60px;
border: 1px solid green;
}
</style>
</head>
<body>
<div>Text should&nbsp;wrap at the green border.</div>
<div>Text shouldwrap at the green border.</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<style>
div {
width: 60px;
border: 1px solid green;
}
</style>
</head>
<body>
<div>Text should<span></span><span>&nbsp;</span>wrap at the green border.</div>
<div>Text should<span></span>wrap at the green border.</div>
</body>
</html>
\ No newline at end of file
2013-07-23 Zalan Bujtas <zalan@apple.com>
REGRESSION(r152313): Links in certain twitter postings don't warp correctly on page
https://bugs.webkit.org/show_bug.cgi?id=118435
Reviewed by David Hyatt.
When we find an empty inline in the middle of the word, prefer breaking it before
instead of after to match other browsers' rendering.
Test: fast/text/whitespace/inline-whitespace-wrapping-12.html
* rendering/RenderBlockLineLayout.cpp:
(WebCore::canBreakAtThisPosition):
2013-07-23 Alexey Proskuryakov <ap@apple.com>
Dictionary hotkey does not work on vertical text
......@@ -2907,11 +2907,7 @@ static bool canBreakAtThisPosition(bool autoWrap, LineWidth& width, InlineIterat
bool canPlaceOnLine = width.fitsOnLine() || !autoWrapWasEverTrueOnLine;
// If we are an empty inline in the middle of a word and don't fit on the line then clear any line break we have and find
// one in the following text instead.
if (!canPlaceOnLine && !canBreakHere && isEmptyInline(current.m_obj))
lBreak.clear();
else if (canPlaceOnLine && canBreakHere)
if (canPlaceOnLine && canBreakHere)
commitLineBreakAtCurrentWidth(width, lBreak, next);
return canBreakHere;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment