Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Side by Side Diff: Source/core/rendering/RenderBlockLineLayout.cpp

Issue 39783004: Fake Bidi run does not need to be always created (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Trying again Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/rendering/RenderBlockFlow.h ('k') | Source/platform/text/BidiResolver.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 } 444 }
445 445
446 // Adding a pair of midpoints before a character will split it out into a new li ne box. 446 // Adding a pair of midpoints before a character will split it out into a new li ne box.
447 static inline void ensureCharacterGetsLineBox(LineMidpointState& lineMidpointSta te, InlineIterator& textParagraphSeparator) 447 static inline void ensureCharacterGetsLineBox(LineMidpointState& lineMidpointSta te, InlineIterator& textParagraphSeparator)
448 { 448 {
449 InlineIterator midpoint(0, textParagraphSeparator.m_obj, textParagraphSepara tor.m_pos); 449 InlineIterator midpoint(0, textParagraphSeparator.m_obj, textParagraphSepara tor.m_pos);
450 startIgnoringSpaces(lineMidpointState, InlineIterator(0, textParagraphSepara tor.m_obj, textParagraphSeparator.m_pos - 1)); 450 startIgnoringSpaces(lineMidpointState, InlineIterator(0, textParagraphSepara tor.m_obj, textParagraphSeparator.m_pos - 1));
451 stopIgnoringSpaces(lineMidpointState, InlineIterator(0, textParagraphSeparat or.m_obj, textParagraphSeparator.m_pos)); 451 stopIgnoringSpaces(lineMidpointState, InlineIterator(0, textParagraphSeparat or.m_obj, textParagraphSeparator.m_pos));
452 } 452 }
453 453
454 void RenderBlockFlow::appendRunsForObject(BidiRunList<BidiRun>& runs, int start, int end, RenderObject* obj, InlineBidiResolver& resolver)
455 {
456 adjustMidpointsAndAppendRunsForObjectIfNeeded(obj, start, end, resolver, App endingRunsForObject, &runs);
457 }
458
459 static inline InlineBox* createInlineBoxForRenderer(RenderObject* obj, bool isRo otLineBox, bool isOnlyRun = false) 454 static inline InlineBox* createInlineBoxForRenderer(RenderObject* obj, bool isRo otLineBox, bool isOnlyRun = false)
460 { 455 {
461 if (isRootLineBox) 456 if (isRootLineBox)
462 return toRenderBlock(obj)->createAndAppendRootInlineBox(); 457 return toRenderBlock(obj)->createAndAppendRootInlineBox();
463 458
464 if (obj->isText()) { 459 if (obj->isText()) {
465 InlineTextBox* textBox = toRenderText(obj)->createInlineTextBox(); 460 InlineTextBox* textBox = toRenderText(obj)->createInlineTextBox();
466 // We only treat a box as text for a <br> if we are on a line by ourself or in strict mode 461 // We only treat a box as text for a <br> if we are on a line by ourself or in strict mode
467 // (Note the use of strict mode. In "almost strict" mode, we don't trea t the box for <br> as text.) 462 // (Note the use of strict mode. In "almost strict" mode, we don't trea t the box for <br> as text.)
468 if (obj->isBR()) 463 if (obj->isBR())
(...skipping 3054 matching lines...) Expand 10 before | Expand all | Expand 10 after
3523 lineGridBox->alignBoxesInBlockDirection(logicalHeight(), textBoxDataMap, ver ticalPositionCache); 3518 lineGridBox->alignBoxesInBlockDirection(logicalHeight(), textBoxDataMap, ver ticalPositionCache);
3524 3519
3525 setLineGridBox(lineGridBox); 3520 setLineGridBox(lineGridBox);
3526 3521
3527 // FIXME: If any of the characteristics of the box change compared to the ol d one, then we need to do a deep dirtying 3522 // FIXME: If any of the characteristics of the box change compared to the ol d one, then we need to do a deep dirtying
3528 // (similar to what happens when the page height changes). Ideally, though, we only do this if someone is actually snapping 3523 // (similar to what happens when the page height changes). Ideally, though, we only do this if someone is actually snapping
3529 // to this grid. 3524 // to this grid.
3530 } 3525 }
3531 3526
3532 } 3527 }
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBlockFlow.h ('k') | Source/platform/text/BidiResolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698