aboutsummaryrefslogblamecommitdiff
path: root/www/waterfox/files/patch-bug1426042
blob: 2176a6dd69bba78d89b97c5ecb5c089bb376229c (plain) (tree)






























                                                                                                                             
commit df0b53a2bec2
Author: Jonathan Kew <jkew@mozilla.com>
Date:   Fri Jan 5 13:58:51 2018 +0000

    Bug 1426042 - Ensure we don't forget to set bidi data when required on a zero-length trailing frame. r=dholbert, a=gchang
    
    --HG--
    extra : source : a37695e59774af91ca8e9e50bee369364cf4feaa
---
 layout/base/nsBidiPresUtils.cpp   | 7 +++++++
 layout/reftests/bidi/reftest.list | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git layout/base/nsBidiPresUtils.cpp layout/base/nsBidiPresUtils.cpp
index 6ac7cf64afe9..3fa6a4e030c9 100644
--- layout/base/nsBidiPresUtils.cpp
+++ layout/base/nsBidiPresUtils.cpp
@@ -888,6 +888,13 @@ nsBidiPresUtils::ResolveParagraph(BidiParagraphData* aBpd)
     if (runLength <= 0) {
       // Get the next run of text from the Bidi engine
       if (++numRun >= runCount) {
+        // We've run out of runs of text; but don't forget to store bidi data
+        // to the frame before breaking out of the loop (bug 1426042).
+        storeBidiDataToFrame();
+        if (isTextFrame) {
+          frame->AdjustOffsetsForBidi(contentOffset,
+                                      contentOffset + fragmentLength);
+        }
         break;
       }
       int32_t lineOffset = logicalLimit;