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

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

Issue 101763008: Fix some problems reported by clang static analyzer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 months 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/InlineTextBox.cpp ('k') | Source/core/rendering/RenderLayer.cpp » ('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 901 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 // tree to see which parent inline is the isolate. We could change enter Isolate 912 // tree to see which parent inline is the isolate. We could change enter Isolate
913 // to take a RenderObject and do this logic there, but that would be a l ayering 913 // to take a RenderObject and do this logic there, but that would be a l ayering
914 // violation for BidiResolver (which knows nothing about RenderObject). 914 // violation for BidiResolver (which knows nothing about RenderObject).
915 RenderInline* isolatedInline = toRenderInline(highestContainingIsolateWi thinRoot(startObj, currentRoot)); 915 RenderInline* isolatedInline = toRenderInline(highestContainingIsolateWi thinRoot(startObj, currentRoot));
916 ASSERT(isolatedInline); 916 ASSERT(isolatedInline);
917 917
918 InlineBidiResolver isolatedResolver; 918 InlineBidiResolver isolatedResolver;
919 LineMidpointState& isolatedLineMidpointState = isolatedResolver.midpoint State(); 919 LineMidpointState& isolatedLineMidpointState = isolatedResolver.midpoint State();
920 isolatedLineMidpointState = topResolver.midpointStateForIsolatedRun(isol atedRun); 920 isolatedLineMidpointState = topResolver.midpointStateForIsolatedRun(isol atedRun);
921 EUnicodeBidi unicodeBidi = isolatedInline->style()->unicodeBidi(); 921 EUnicodeBidi unicodeBidi = isolatedInline->style()->unicodeBidi();
922 TextDirection direction = isolatedInline->style()->direction(); 922 TextDirection direction;
923 if (unicodeBidi == Plaintext) { 923 if (unicodeBidi == Plaintext) {
924 if (isNewUBAParagraph) 924 if (isNewUBAParagraph)
925 direction = determinePlaintextDirectionality(isolatedInline, sta rtObj); 925 direction = determinePlaintextDirectionality(isolatedInline, sta rtObj);
926 else 926 else
927 direction = determinePlaintextDirectionality(isolatedInline); 927 direction = determinePlaintextDirectionality(isolatedInline);
928 } else { 928 } else {
929 ASSERT(unicodeBidi == Isolate || unicodeBidi == IsolateOverride); 929 ASSERT(unicodeBidi == Isolate || unicodeBidi == IsolateOverride);
930 direction = isolatedInline->style()->direction(); 930 direction = isolatedInline->style()->direction();
931 } 931 }
932 isolatedResolver.setStatus(statusWithDirection(direction, isOverride(uni codeBidi))); 932 isolatedResolver.setStatus(statusWithDirection(direction, isOverride(uni codeBidi)));
(...skipping 1482 matching lines...) Expand 10 before | Expand all | Expand 10 after
2415 lineGridBox->alignBoxesInBlockDirection(logicalHeight(), textBoxDataMap, ver ticalPositionCache); 2415 lineGridBox->alignBoxesInBlockDirection(logicalHeight(), textBoxDataMap, ver ticalPositionCache);
2416 2416
2417 setLineGridBox(lineGridBox); 2417 setLineGridBox(lineGridBox);
2418 2418
2419 // FIXME: If any of the characteristics of the box change compared to the ol d one, then we need to do a deep dirtying 2419 // FIXME: If any of the characteristics of the box change compared to the ol d one, then we need to do a deep dirtying
2420 // (similar to what happens when the page height changes). Ideally, though, we only do this if someone is actually snapping 2420 // (similar to what happens when the page height changes). Ideally, though, we only do this if someone is actually snapping
2421 // to this grid. 2421 // to this grid.
2422 } 2422 }
2423 2423
2424 } 2424 }
OLDNEW
« no previous file with comments | « Source/core/rendering/InlineTextBox.cpp ('k') | Source/core/rendering/RenderLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698