Mid-word break can occur between a character and a combining mark
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Aug 2011 03:34:36 +0000 (03:34 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Aug 2011 03:34:36 +0000 (03:34 +0000)
https://bugs.webkit.org/show_bug.cgi?id=66529

Reviewed by Simon Fraser.

No test added because I could not find a combining mark with a non-zero advance in
any of the system fonts and tests fonts.

* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::LineBreaker::nextLineBreak): Disallow a mid-word break before a
combining mark.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@93384 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBlockLineLayout.cpp

index 58c3aa806cec48a319ef6ba111c19bd9e94cd5af..65911fa038eb3c7bdaeed20a86992d2b89757ee7 100644 (file)
@@ -1,3 +1,17 @@
+2011-08-18  Dan Bernstein  <mitz@apple.com>
+
+        Mid-word break can occur between a character and a combining mark
+        https://bugs.webkit.org/show_bug.cgi?id=66529
+
+        Reviewed by Simon Fraser.
+
+        No test added because I could not find a combining mark with a non-zero advance in
+        any of the system fonts and tests fonts. 
+
+        * rendering/RenderBlockLineLayout.cpp:
+        (WebCore::RenderBlock::LineBreaker::nextLineBreak): Disallow a mid-word break before a
+        combining mark.
+
 2011-08-18  Kent Tamura  <tkent@chromium.org>
 
         REGRESSION(r90971): Null pointer dereference with placeholder and webkit-scrollbar-corner
 2011-08-18  Kent Tamura  <tkent@chromium.org>
 
         REGRESSION(r90971): Null pointer dereference with placeholder and webkit-scrollbar-corner
index 0c2e6e105df260fdb62653070132f05b34d9b553..f0122e641d362e9d5f86dab237446a722207d0ca 100644 (file)
@@ -2299,7 +2299,7 @@ InlineIterator RenderBlock::LineBreaker::nextLineBreak(InlineBidiResolver& resol
                         breakWords = false;
                     }
 
                         breakWords = false;
                     }
 
-                    if (midWordBreak && !U16_IS_TRAIL(c)) {
+                    if (midWordBreak && !U16_IS_TRAIL(c) && !(U_GET_GC_MASK(c) & U_GC_M_MASK)) {
                         // Remember this as a breakable position in case
                         // adding the end width forces a break.
                         lBreak.moveTo(current.m_obj, current.m_pos, current.m_nextBreakablePosition);
                         // Remember this as a breakable position in case
                         // adding the end width forces a break.
                         lBreak.moveTo(current.m_obj, current.m_pos, current.m_nextBreakablePosition);