Changeset 168279 in webkit
- Timestamp:
- May 5, 2014 4:32:34 AM (10 years ago)
- Location:
- releases/WebKitGTK/webkit-2.4/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
releases/WebKitGTK/webkit-2.4/Source/WebCore/ChangeLog
r168278 r168279 1 2014-04-17 David Kilzer <ddkilzer@apple.com> 2 3 Tidy up isIsolatedInline() and highestContainingIsolateWithinRoot() 4 <http://webkit.org/b/131117> 5 6 Reviewed by Daniel Bates. 7 8 Based on review feedback for r166650. 9 10 * rendering/InlineIterator.h: 11 (WebCore::isIsolatedInline): 12 - Switch argument to a reference since it is never called with a 13 nullptr. 14 (WebCore::highestContainingIsolateWithinRoot): 15 - Switch first argument to a reference since it's never a 16 nullptr. 17 - Use nullptr for pointer initialization. 18 - Switch while() loop to for() loop. Pass reference to 19 isIsolatedInline(). 20 (WebCore::numberOfIsolateAncestors): 21 - Switch while() loop to for() loop. Pass reference to 22 isIsolatedInline(). 23 * rendering/RenderBlockLineLayout.cpp: 24 (WebCore::constructBidiRunsForSegment): 25 - Rename startObj to startObject. 26 - No longer need to pass the address of startObject here. 27 1 28 2014-04-02 David Kilzer <ddkilzer@apple.com> 2 29 -
releases/WebKitGTK/webkit-2.4/Source/WebCore/rendering/InlineIterator.h
r168278 r168279 409 409 } 410 410 411 static inline bool isIsolatedInline(RenderObject* object) 412 { 413 ASSERT(object); 414 return object->isRenderInline() && isIsolated(object->style().unicodeBidi()); 415 } 416 417 static inline RenderObject* highestContainingIsolateWithinRoot(RenderObject* object, RenderObject* root) 418 { 419 ASSERT(object); 420 RenderObject* containingIsolateObject = 0; 421 while (object && object != root) { 422 if (isIsolatedInline(object)) 411 static inline bool isIsolatedInline(RenderObject& object) 412 { 413 return object.isRenderInline() && isIsolated(object.style().unicodeBidi()); 414 } 415 416 static inline RenderObject* highestContainingIsolateWithinRoot(RenderObject& initialObject, RenderObject* root) 417 { 418 RenderObject* containingIsolateObject = nullptr; 419 for (RenderObject* object = &initialObject; object && object != root; object = object->parent()) { 420 if (isIsolatedInline(*object)) 423 421 containingIsolateObject = object; 424 425 object = object->parent();426 422 } 427 423 return containingIsolateObject; … … 430 426 static inline unsigned numberOfIsolateAncestors(const InlineIterator& iter) 431 427 { 432 RenderObject* object = iter.renderer();433 if (!object)434 return 0;435 428 unsigned count = 0; 436 while (object && object != iter.root()) { 437 if (isIsolatedInline(object)) 429 typedef RenderObject* RenderObjectPtr; 430 for (RenderObjectPtr object = iter.renderer(), root = iter.root(); object && object != root; object = object->parent()) { 431 if (isIsolatedInline(*object)) 438 432 count++; 439 object = object->parent();440 433 } 441 434 return count; -
releases/WebKitGTK/webkit-2.4/Source/WebCore/rendering/RenderBlockLineLayout.cpp
r168278 r168279 897 897 topResolver.isolatedRuns().removeLast(); 898 898 899 RenderObject& startObj = isolatedRun->renderer();899 RenderObject& startObject = isolatedRun->renderer(); 900 900 901 901 // Only inlines make sense with unicode-bidi: isolate (blocks are already isolated). … … 904 904 // to take a RenderObject and do this logic there, but that would be a layering 905 905 // violation for BidiResolver (which knows nothing about RenderObject). 906 RenderInline* isolatedInline = toRenderInline(highestContainingIsolateWithinRoot( &startObj, currentRoot));906 RenderInline* isolatedInline = toRenderInline(highestContainingIsolateWithinRoot(startObject, currentRoot)); 907 907 ASSERT(isolatedInline); 908 908 … … 918 918 isolatedResolver.setStatus(BidiStatus(direction, isOverride(unicodeBidi))); 919 919 920 setUpResolverToResumeInIsolate(isolatedResolver, isolatedInline, &startObj );920 setUpResolverToResumeInIsolate(isolatedResolver, isolatedInline, &startObject); 921 921 922 922 // The starting position is the beginning of the first run within the isolate that was identified 923 923 // during the earlier call to createBidiRunsForLine. This can be but is not necessarily the 924 924 // first run within the isolate. 925 InlineIterator iter = InlineIterator(isolatedInline, &startObj , isolatedRun->m_start);925 InlineIterator iter = InlineIterator(isolatedInline, &startObject, isolatedRun->m_start); 926 926 isolatedResolver.setPositionIgnoringNestedIsolates(iter); 927 927
Note: See TracChangeset
for help on using the changeset viewer.