| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2  * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 
| 3  * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
      ight reserved. | 3  * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
      ight reserved. | 
| 4  * Copyright (C) 2010 Google Inc. All rights reserved. | 4  * Copyright (C) 2010 Google Inc. All rights reserved. | 
| 5  * | 5  * | 
| 6  * This library is free software; you can redistribute it and/or | 6  * This library is free software; you can redistribute it and/or | 
| 7  * modify it under the terms of the GNU Library General Public | 7  * modify it under the terms of the GNU Library General Public | 
| 8  * License as published by the Free Software Foundation; either | 8  * License as published by the Free Software Foundation; either | 
| 9  * version 2 of the License, or (at your option) any later version. | 9  * version 2 of the License, or (at your option) any later version. | 
| 10  * | 10  * | 
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 233         current = next; | 233         current = next; | 
| 234     } | 234     } | 
| 235 | 235 | 
| 236     return current; | 236     return current; | 
| 237 } | 237 } | 
| 238 | 238 | 
| 239 static TextDirection determinePlaintextDirectionality(RenderObject* root, Render
      Object* current = 0, unsigned pos = 0) | 239 static TextDirection determinePlaintextDirectionality(RenderObject* root, Render
      Object* current = 0, unsigned pos = 0) | 
| 240 { | 240 { | 
| 241     InlineIterator iter(root, firstRenderObjectForDirectionalityDetermination(ro
      ot, current), pos); | 241     InlineIterator iter(root, firstRenderObjectForDirectionalityDetermination(ro
      ot, current), pos); | 
| 242     InlineBidiResolver observer; | 242     InlineBidiResolver observer; | 
|  | 243     observer.setStatus(BidiStatus(root->style()->direction(), isOverride(root->s
      tyle()->unicodeBidi()))); | 
| 243     observer.setPositionIgnoringNestedIsolates(iter); | 244     observer.setPositionIgnoringNestedIsolates(iter); | 
| 244     observer.setStatus(BidiStatus(root->style()->direction(), isOverride(root->s
      tyle()->unicodeBidi()))); | 245     return observer.determineParagraphDirectionality(); | 
| 245     while (!iter.atEnd()) { |  | 
| 246         if (observer.inIsolate()) { |  | 
| 247             iter.increment(&observer, InlineIterator::FastIncrementInIsolatedRen
      derer); |  | 
| 248             continue; |  | 
| 249         } |  | 
| 250         if (iter.atParagraphSeparator()) |  | 
| 251             break; |  | 
| 252         if (UChar current = iter.current()) { |  | 
| 253             Direction charDirection = direction(current); |  | 
| 254             if (charDirection == LeftToRight) |  | 
| 255                 return LTR; |  | 
| 256             if (charDirection == RightToLeft || charDirection == RightToLeftArab
      ic) |  | 
| 257                 return RTL; |  | 
| 258         } |  | 
| 259         iter.increment(&observer); |  | 
| 260     } |  | 
| 261     return LTR; |  | 
| 262 } | 246 } | 
| 263 | 247 | 
| 264 static void checkMidpoints(LineMidpointState& lineMidpointState, InlineIterator&
       lBreak) | 248 static void checkMidpoints(LineMidpointState& lineMidpointState, InlineIterator&
       lBreak) | 
| 265 { | 249 { | 
| 266     // Check to see if our last midpoint is a start point beyond the line break.
        If so, | 250     // Check to see if our last midpoint is a start point beyond the line break.
        If so, | 
| 267     // shave it off the list, and shave off a trailing space if the previous end
       point doesn't | 251     // shave it off the list, and shave off a trailing space if the previous end
       point doesn't | 
| 268     // preserve whitespace. | 252     // preserve whitespace. | 
| 269     if (lBreak.m_obj && lineMidpointState.numMidpoints && !(lineMidpointState.nu
      mMidpoints % 2)) { | 253     if (lBreak.m_obj && lineMidpointState.numMidpoints && !(lineMidpointState.nu
      mMidpoints % 2)) { | 
| 270         InlineIterator* midpoints = lineMidpointState.midpoints.data(); | 254         InlineIterator* midpoints = lineMidpointState.midpoints.data(); | 
| 271         InlineIterator& endpoint = midpoints[lineMidpointState.numMidpoints - 2]
      ; | 255         InlineIterator& endpoint = midpoints[lineMidpointState.numMidpoints - 2]
      ; | 
| (...skipping 3103 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3375     lineGridBox->alignBoxesInBlockDirection(logicalHeight(), textBoxDataMap, ver
      ticalPositionCache); | 3359     lineGridBox->alignBoxesInBlockDirection(logicalHeight(), textBoxDataMap, ver
      ticalPositionCache); | 
| 3376 | 3360 | 
| 3377     setLineGridBox(lineGridBox); | 3361     setLineGridBox(lineGridBox); | 
| 3378 | 3362 | 
| 3379     // FIXME: If any of the characteristics of the box change compared to the ol
      d one, then we need to do a deep dirtying | 3363     // FIXME: If any of the characteristics of the box change compared to the ol
      d one, then we need to do a deep dirtying | 
| 3380     // (similar to what happens when the page height changes). Ideally, though, 
      we only do this if someone is actually snapping | 3364     // (similar to what happens when the page height changes). Ideally, though, 
      we only do this if someone is actually snapping | 
| 3381     // to this grid. | 3365     // to this grid. | 
| 3382 } | 3366 } | 
| 3383 | 3367 | 
| 3384 } | 3368 } | 
| OLD | NEW | 
|---|