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

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

Issue 566973002: Constify the rendering/ selection code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderBlock.h ('k') | Source/core/rendering/RenderBlockFlow.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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2007 David Smith (catfish.man@gmail.com) 4 * (C) 2007 David Smith (catfish.man@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 2233 matching lines...) Expand 10 before | Expand all | Expand 10 after
2244 2244
2245 if (view() && view()->selectionStart()) { 2245 if (view() && view()->selectionStart()) {
2246 Node* startElement = view()->selectionStart()->node(); 2246 Node* startElement = view()->selectionStart()->node();
2247 if (startElement && startElement->rootEditableElement() == node()) 2247 if (startElement && startElement->rootEditableElement() == node())
2248 return true; 2248 return true;
2249 } 2249 }
2250 2250
2251 return false; 2251 return false;
2252 } 2252 }
2253 2253
2254 GapRects RenderBlock::selectionGapRectsForPaintInvalidation(const RenderLayerMod elObject* paintInvalidationContainer) 2254 GapRects RenderBlock::selectionGapRectsForPaintInvalidation(const RenderLayerMod elObject* paintInvalidationContainer) const
2255 { 2255 {
2256 ASSERT(!needsLayout()); 2256 ASSERT(!needsLayout());
2257 2257
2258 if (!shouldPaintSelectionGaps()) 2258 if (!shouldPaintSelectionGaps())
2259 return GapRects(); 2259 return GapRects();
2260 2260
2261 TransformState transformState(TransformState::ApplyTransformDirection, Float Point()); 2261 TransformState transformState(TransformState::ApplyTransformDirection, Float Point());
2262 mapLocalToContainer(paintInvalidationContainer, transformState, ApplyContain erFlip | UseTransforms); 2262 mapLocalToContainer(paintInvalidationContainer, transformState, ApplyContain erFlip | UseTransforms);
2263 LayoutPoint offsetFromPaintInvalidationContainer = roundedLayoutPoint(transf ormState.mappedPoint()); 2263 LayoutPoint offsetFromPaintInvalidationContainer = roundedLayoutPoint(transf ormState.mappedPoint());
2264 2264
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
2311 LayoutUnit RenderBlock::blockDirectionOffset(const LayoutSize& offsetFromBlock) const 2311 LayoutUnit RenderBlock::blockDirectionOffset(const LayoutSize& offsetFromBlock) const
2312 { 2312 {
2313 return isHorizontalWritingMode() ? offsetFromBlock.height() : offsetFromBloc k.width(); 2313 return isHorizontalWritingMode() ? offsetFromBlock.height() : offsetFromBloc k.width();
2314 } 2314 }
2315 2315
2316 LayoutUnit RenderBlock::inlineDirectionOffset(const LayoutSize& offsetFromBlock) const 2316 LayoutUnit RenderBlock::inlineDirectionOffset(const LayoutSize& offsetFromBlock) const
2317 { 2317 {
2318 return isHorizontalWritingMode() ? offsetFromBlock.width() : offsetFromBlock .height(); 2318 return isHorizontalWritingMode() ? offsetFromBlock.width() : offsetFromBlock .height();
2319 } 2319 }
2320 2320
2321 LayoutRect RenderBlock::logicalRectToPhysicalRect(const LayoutPoint& rootBlockPh ysicalPosition, const LayoutRect& logicalRect) 2321 LayoutRect RenderBlock::logicalRectToPhysicalRect(const LayoutPoint& rootBlockPh ysicalPosition, const LayoutRect& logicalRect) const
2322 { 2322 {
2323 LayoutRect result; 2323 LayoutRect result;
2324 if (isHorizontalWritingMode()) 2324 if (isHorizontalWritingMode())
2325 result = logicalRect; 2325 result = logicalRect;
2326 else 2326 else
2327 result = LayoutRect(logicalRect.y(), logicalRect.x(), logicalRect.height (), logicalRect.width()); 2327 result = LayoutRect(logicalRect.y(), logicalRect.x(), logicalRect.height (), logicalRect.width());
2328 flipForWritingMode(result); 2328 flipForWritingMode(result);
2329 result.moveBy(rootBlockPhysicalPosition); 2329 result.moveBy(rootBlockPhysicalPosition);
2330 return result; 2330 return result;
2331 } 2331 }
2332 2332
2333 GapRects RenderBlock::selectionGaps(RenderBlock* rootBlock, const LayoutPoint& r ootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, 2333 GapRects RenderBlock::selectionGaps(const RenderBlock* rootBlock, const LayoutPo int& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock,
2334 LayoutUnit& lastLogicalTop, LayoutUnit& last LogicalLeft, LayoutUnit& lastLogicalRight, const PaintInfo* paintInfo) 2334 LayoutUnit& lastLogicalTop, LayoutUnit& last LogicalLeft, LayoutUnit& lastLogicalRight, const PaintInfo* paintInfo) const
2335 { 2335 {
2336 // IMPORTANT: Callers of this method that intend for painting to happen need to do a save/restore. 2336 // IMPORTANT: Callers of this method that intend for painting to happen need to do a save/restore.
2337 // Clip out floating and positioned objects when painting selection gaps. 2337 // Clip out floating and positioned objects when painting selection gaps.
2338 if (paintInfo) { 2338 if (paintInfo) {
2339 // Note that we don't clip out overflow for positioned objects. We just stick to the border box. 2339 // Note that we don't clip out overflow for positioned objects. We just stick to the border box.
2340 LayoutRect flippedBlockRect(offsetFromRootBlock.width(), offsetFromRootB lock.height(), width(), height()); 2340 LayoutRect flippedBlockRect(offsetFromRootBlock.width(), offsetFromRootB lock.height(), width(), height());
2341 rootBlock->flipForWritingMode(flippedBlockRect); 2341 rootBlock->flipForWritingMode(flippedBlockRect);
2342 flippedBlockRect.moveBy(rootBlockPhysicalPosition); 2342 flippedBlockRect.moveBy(rootBlockPhysicalPosition);
2343 clipOutPositionedObjects(paintInfo, flippedBlockRect.location(), positio nedObjects()); 2343 clipOutPositionedObjects(paintInfo, flippedBlockRect.location(), positio nedObjects());
2344 if (isBody() || isDocumentElement()) // The <body> must make sure to exa mine its containingBlock's positioned objects. 2344 if (isBody() || isDocumentElement()) // The <body> must make sure to exa mine its containingBlock's positioned objects.
(...skipping 21 matching lines...) Expand all
2366 else 2366 else
2367 result = blockSelectionGaps(rootBlock, rootBlockPhysicalPosition, offset FromRootBlock, lastLogicalTop, lastLogicalLeft, lastLogicalRight, paintInfo); 2367 result = blockSelectionGaps(rootBlock, rootBlockPhysicalPosition, offset FromRootBlock, lastLogicalTop, lastLogicalLeft, lastLogicalRight, paintInfo);
2368 2368
2369 // Go ahead and fill the vertical gap all the way to the bottom of our block if the selection extends past our block. 2369 // Go ahead and fill the vertical gap all the way to the bottom of our block if the selection extends past our block.
2370 if (rootBlock == this && (selectionState() != SelectionBoth && selectionStat e() != SelectionEnd)) 2370 if (rootBlock == this && (selectionState() != SelectionBoth && selectionStat e() != SelectionEnd))
2371 result.uniteCenter(blockSelectionGap(rootBlock, rootBlockPhysicalPositio n, offsetFromRootBlock, lastLogicalTop, lastLogicalLeft, lastLogicalRight, 2371 result.uniteCenter(blockSelectionGap(rootBlock, rootBlockPhysicalPositio n, offsetFromRootBlock, lastLogicalTop, lastLogicalLeft, lastLogicalRight,
2372 logicalHeight(), paintInfo)); 2372 logicalHeight(), paintInfo));
2373 return result; 2373 return result;
2374 } 2374 }
2375 2375
2376 GapRects RenderBlock::blockSelectionGaps(RenderBlock* rootBlock, const LayoutPoi nt& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, 2376 GapRects RenderBlock::blockSelectionGaps(const RenderBlock* rootBlock, const Lay outPoint& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock,
2377 LayoutUnit& lastLogicalTop, LayoutUnit& lastLogicalLeft, LayoutUnit& lastLogicalRight, const PaintInfo* paintInfo) 2377 LayoutUnit& lastLogicalTop, LayoutUnit& lastLogicalLeft, LayoutUnit& lastLogicalRight, const PaintInfo* paintInfo) cons t
2378 { 2378 {
2379 GapRects result; 2379 GapRects result;
2380 2380
2381 // Go ahead and jump right to the first block child that contains some selec ted objects. 2381 // Go ahead and jump right to the first block child that contains some selec ted objects.
2382 RenderBox* curr; 2382 RenderBox* curr;
2383 for (curr = firstChildBox(); curr && curr->selectionState() == SelectionNone ; curr = curr->nextSiblingBox()) { } 2383 for (curr = firstChildBox(); curr && curr->selectionState() == SelectionNone ; curr = curr->nextSiblingBox()) { }
2384 2384
2385 for (bool sawSelectionEnd = false; curr && !sawSelectionEnd; curr = curr->ne xtSiblingBox()) { 2385 for (bool sawSelectionEnd = false; curr && !sawSelectionEnd; curr = curr->ne xtSiblingBox()) {
2386 SelectionState childState = curr->selectionState(); 2386 SelectionState childState = curr->selectionState();
2387 if (childState == SelectionBoth || childState == SelectionEnd) 2387 if (childState == SelectionBoth || childState == SelectionEnd)
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
2436 } 2436 }
2437 2437
2438 IntRect alignSelectionRectToDevicePixels(LayoutRect& rect) 2438 IntRect alignSelectionRectToDevicePixels(LayoutRect& rect)
2439 { 2439 {
2440 LayoutUnit roundedX = rect.x().round(); 2440 LayoutUnit roundedX = rect.x().round();
2441 return IntRect(roundedX, rect.y().round(), 2441 return IntRect(roundedX, rect.y().round(),
2442 (rect.maxX() - roundedX).round(), 2442 (rect.maxX() - roundedX).round(),
2443 snapSizeToPixel(rect.height(), rect.y())); 2443 snapSizeToPixel(rect.height(), rect.y()));
2444 } 2444 }
2445 2445
2446 LayoutRect RenderBlock::blockSelectionGap(RenderBlock* rootBlock, const LayoutPo int& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, 2446 LayoutRect RenderBlock::blockSelectionGap(const RenderBlock* rootBlock, const La youtPoint& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock,
2447 LayoutUnit lastLogicalTop, LayoutUnit lastLogicalLeft, LayoutUnit lastLogicalRight, LayoutUnit logicalBottom, const Pa intInfo* paintInfo) 2447 LayoutUnit lastLogicalTop, LayoutUnit lastLogicalLeft, LayoutUnit lastLogicalRight, LayoutUnit logicalBottom, const Pa intInfo* paintInfo) const
2448 { 2448 {
2449 LayoutUnit logicalTop = lastLogicalTop; 2449 LayoutUnit logicalTop = lastLogicalTop;
2450 LayoutUnit logicalHeight = rootBlock->blockDirectionOffset(offsetFromRootBlo ck) + logicalBottom - logicalTop; 2450 LayoutUnit logicalHeight = rootBlock->blockDirectionOffset(offsetFromRootBlo ck) + logicalBottom - logicalTop;
2451 if (logicalHeight <= 0) 2451 if (logicalHeight <= 0)
2452 return LayoutRect(); 2452 return LayoutRect();
2453 2453
2454 // Get the selection offsets for the bottom of the gap 2454 // Get the selection offsets for the bottom of the gap
2455 LayoutUnit logicalLeft = std::max(lastLogicalLeft, logicalLeftSelectionOffse t(rootBlock, logicalBottom)); 2455 LayoutUnit logicalLeft = std::max(lastLogicalLeft, logicalLeftSelectionOffse t(rootBlock, logicalBottom));
2456 LayoutUnit logicalRight = std::min(lastLogicalRight, logicalRightSelectionOf fset(rootBlock, logicalBottom)); 2456 LayoutUnit logicalRight = std::min(lastLogicalRight, logicalRightSelectionOf fset(rootBlock, logicalBottom));
2457 LayoutUnit logicalWidth = logicalRight - logicalLeft; 2457 LayoutUnit logicalWidth = logicalRight - logicalLeft;
2458 if (logicalWidth <= 0) 2458 if (logicalWidth <= 0)
2459 return LayoutRect(); 2459 return LayoutRect();
2460 2460
2461 LayoutRect gapRect = rootBlock->logicalRectToPhysicalRect(rootBlockPhysicalP osition, LayoutRect(logicalLeft, logicalTop, logicalWidth, logicalHeight)); 2461 LayoutRect gapRect = rootBlock->logicalRectToPhysicalRect(rootBlockPhysicalP osition, LayoutRect(logicalLeft, logicalTop, logicalWidth, logicalHeight));
2462 if (paintInfo) 2462 if (paintInfo)
2463 paintInfo->context->fillRect(alignSelectionRectToDevicePixels(gapRect), selectionBackgroundColor()); 2463 paintInfo->context->fillRect(alignSelectionRectToDevicePixels(gapRect), selectionBackgroundColor());
2464 return gapRect; 2464 return gapRect;
2465 } 2465 }
2466 2466
2467 LayoutRect RenderBlock::logicalLeftSelectionGap(RenderBlock* rootBlock, const La youtPoint& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, 2467 LayoutRect RenderBlock::logicalLeftSelectionGap(const RenderBlock* rootBlock, co nst LayoutPoint& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBloc k,
2468 RenderObject* selObj, LayoutUnit logicalLeft, LayoutUnit logicalTop, LayoutUnit logicalHeight, const PaintInfo* paintInfo) 2468 const RenderObject* selObj, Layo utUnit logicalLeft, LayoutUnit logicalTop, LayoutUnit logicalHeight, const Paint Info* paintInfo) const
2469 { 2469 {
2470 LayoutUnit rootBlockLogicalTop = rootBlock->blockDirectionOffset(offsetFromR ootBlock) + logicalTop; 2470 LayoutUnit rootBlockLogicalTop = rootBlock->blockDirectionOffset(offsetFromR ootBlock) + logicalTop;
2471 LayoutUnit rootBlockLogicalLeft = std::max(logicalLeftSelectionOffset(rootBl ock, logicalTop), logicalLeftSelectionOffset(rootBlock, logicalTop + logicalHeig ht)); 2471 LayoutUnit rootBlockLogicalLeft = std::max(logicalLeftSelectionOffset(rootBl ock, logicalTop), logicalLeftSelectionOffset(rootBlock, logicalTop + logicalHeig ht));
2472 LayoutUnit rootBlockLogicalRight = std::min(rootBlock->inlineDirectionOffset (offsetFromRootBlock) + logicalLeft, std::min(logicalRightSelectionOffset(rootBl ock, logicalTop), logicalRightSelectionOffset(rootBlock, logicalTop + logicalHei ght))); 2472 LayoutUnit rootBlockLogicalRight = std::min(rootBlock->inlineDirectionOffset (offsetFromRootBlock) + logicalLeft, std::min(logicalRightSelectionOffset(rootBl ock, logicalTop), logicalRightSelectionOffset(rootBlock, logicalTop + logicalHei ght)));
2473 LayoutUnit rootBlockLogicalWidth = rootBlockLogicalRight - rootBlockLogicalL eft; 2473 LayoutUnit rootBlockLogicalWidth = rootBlockLogicalRight - rootBlockLogicalL eft;
2474 if (rootBlockLogicalWidth <= 0) 2474 if (rootBlockLogicalWidth <= 0)
2475 return LayoutRect(); 2475 return LayoutRect();
2476 2476
2477 LayoutRect gapRect = rootBlock->logicalRectToPhysicalRect(rootBlockPhysicalP osition, LayoutRect(rootBlockLogicalLeft, rootBlockLogicalTop, rootBlockLogicalW idth, logicalHeight)); 2477 LayoutRect gapRect = rootBlock->logicalRectToPhysicalRect(rootBlockPhysicalP osition, LayoutRect(rootBlockLogicalLeft, rootBlockLogicalTop, rootBlockLogicalW idth, logicalHeight));
2478 if (paintInfo) 2478 if (paintInfo)
2479 paintInfo->context->fillRect(alignSelectionRectToDevicePixels(gapRect), selObj->selectionBackgroundColor()); 2479 paintInfo->context->fillRect(alignSelectionRectToDevicePixels(gapRect), selObj->selectionBackgroundColor());
2480 return gapRect; 2480 return gapRect;
2481 } 2481 }
2482 2482
2483 LayoutRect RenderBlock::logicalRightSelectionGap(RenderBlock* rootBlock, const L ayoutPoint& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, 2483 LayoutRect RenderBlock::logicalRightSelectionGap(const RenderBlock* rootBlock, c onst LayoutPoint& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlo ck,
2484 RenderObject* selObj, LayoutUni t logicalRight, LayoutUnit logicalTop, LayoutUnit logicalHeight, const PaintInfo * paintInfo) 2484 const RenderObject* selObj, Lay outUnit logicalRight, LayoutUnit logicalTop, LayoutUnit logicalHeight, const Pai ntInfo* paintInfo) const
2485 { 2485 {
2486 LayoutUnit rootBlockLogicalTop = rootBlock->blockDirectionOffset(offsetFromR ootBlock) + logicalTop; 2486 LayoutUnit rootBlockLogicalTop = rootBlock->blockDirectionOffset(offsetFromR ootBlock) + logicalTop;
2487 LayoutUnit rootBlockLogicalLeft = std::max(rootBlock->inlineDirectionOffset( offsetFromRootBlock) + logicalRight, max(logicalLeftSelectionOffset(rootBlock, l ogicalTop), logicalLeftSelectionOffset(rootBlock, logicalTop + logicalHeight))); 2487 LayoutUnit rootBlockLogicalLeft = std::max(rootBlock->inlineDirectionOffset( offsetFromRootBlock) + logicalRight, max(logicalLeftSelectionOffset(rootBlock, l ogicalTop), logicalLeftSelectionOffset(rootBlock, logicalTop + logicalHeight)));
2488 LayoutUnit rootBlockLogicalRight = std::min(logicalRightSelectionOffset(root Block, logicalTop), logicalRightSelectionOffset(rootBlock, logicalTop + logicalH eight)); 2488 LayoutUnit rootBlockLogicalRight = std::min(logicalRightSelectionOffset(root Block, logicalTop), logicalRightSelectionOffset(rootBlock, logicalTop + logicalH eight));
2489 LayoutUnit rootBlockLogicalWidth = rootBlockLogicalRight - rootBlockLogicalL eft; 2489 LayoutUnit rootBlockLogicalWidth = rootBlockLogicalRight - rootBlockLogicalL eft;
2490 if (rootBlockLogicalWidth <= 0) 2490 if (rootBlockLogicalWidth <= 0)
2491 return LayoutRect(); 2491 return LayoutRect();
2492 2492
2493 LayoutRect gapRect = rootBlock->logicalRectToPhysicalRect(rootBlockPhysicalP osition, LayoutRect(rootBlockLogicalLeft, rootBlockLogicalTop, rootBlockLogicalW idth, logicalHeight)); 2493 LayoutRect gapRect = rootBlock->logicalRectToPhysicalRect(rootBlockPhysicalP osition, LayoutRect(rootBlockLogicalLeft, rootBlockLogicalTop, rootBlockLogicalW idth, logicalHeight));
2494 if (paintInfo) 2494 if (paintInfo)
2495 paintInfo->context->fillRect(alignSelectionRectToDevicePixels(gapRect), selObj->selectionBackgroundColor()); 2495 paintInfo->context->fillRect(alignSelectionRectToDevicePixels(gapRect), selObj->selectionBackgroundColor());
2496 return gapRect; 2496 return gapRect;
2497 } 2497 }
2498 2498
2499 void RenderBlock::getSelectionGapInfo(SelectionState state, bool& leftGap, bool& rightGap) 2499 void RenderBlock::getSelectionGapInfo(SelectionState state, bool& leftGap, bool& rightGap) const
2500 { 2500 {
2501 bool ltr = style()->isLeftToRightDirection(); 2501 bool ltr = style()->isLeftToRightDirection();
2502 leftGap = (state == RenderObject::SelectionInside) || 2502 leftGap = (state == RenderObject::SelectionInside) ||
2503 (state == RenderObject::SelectionEnd && ltr) || 2503 (state == RenderObject::SelectionEnd && ltr) ||
2504 (state == RenderObject::SelectionStart && !ltr); 2504 (state == RenderObject::SelectionStart && !ltr);
2505 rightGap = (state == RenderObject::SelectionInside) || 2505 rightGap = (state == RenderObject::SelectionInside) ||
2506 (state == RenderObject::SelectionStart && ltr) || 2506 (state == RenderObject::SelectionStart && ltr) ||
2507 (state == RenderObject::SelectionEnd && !ltr); 2507 (state == RenderObject::SelectionEnd && !ltr);
2508 } 2508 }
2509 2509
2510 LayoutUnit RenderBlock::logicalLeftSelectionOffset(RenderBlock* rootBlock, Layou tUnit position) 2510 LayoutUnit RenderBlock::logicalLeftSelectionOffset(const RenderBlock* rootBlock, LayoutUnit position) const
2511 { 2511 {
2512 // The border can potentially be further extended by our containingBlock(). 2512 // The border can potentially be further extended by our containingBlock().
2513 if (rootBlock != this) 2513 if (rootBlock != this)
2514 return containingBlock()->logicalLeftSelectionOffset(rootBlock, position + logicalTop()); 2514 return containingBlock()->logicalLeftSelectionOffset(rootBlock, position + logicalTop());
2515 return logicalLeftOffsetForContent(); 2515 return logicalLeftOffsetForContent();
2516 } 2516 }
2517 2517
2518 LayoutUnit RenderBlock::logicalRightSelectionOffset(RenderBlock* rootBlock, Layo utUnit position) 2518 LayoutUnit RenderBlock::logicalRightSelectionOffset(const RenderBlock* rootBlock , LayoutUnit position) const
2519 { 2519 {
2520 // The border can potentially be further extended by our containingBlock(). 2520 // The border can potentially be further extended by our containingBlock().
2521 if (rootBlock != this) 2521 if (rootBlock != this)
2522 return containingBlock()->logicalRightSelectionOffset(rootBlock, positio n + logicalTop()); 2522 return containingBlock()->logicalRightSelectionOffset(rootBlock, positio n + logicalTop());
2523 return logicalRightOffsetForContent(); 2523 return logicalRightOffsetForContent();
2524 } 2524 }
2525 2525
2526 RenderBlock* RenderBlock::blockBeforeWithinSelectionRoot(LayoutSize& offset) con st 2526 RenderBlock* RenderBlock::blockBeforeWithinSelectionRoot(LayoutSize& offset) con st
2527 { 2527 {
2528 if (isSelectionRoot()) 2528 if (isSelectionRoot())
(...skipping 2280 matching lines...) Expand 10 before | Expand all | Expand 10 after
4809 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const 4809 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const
4810 { 4810 {
4811 showRenderObject(); 4811 showRenderObject();
4812 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) 4812 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box())
4813 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); 4813 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1);
4814 } 4814 }
4815 4815
4816 #endif 4816 #endif
4817 4817
4818 } // namespace blink 4818 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBlock.h ('k') | Source/core/rendering/RenderBlockFlow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698