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

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

Issue 16357011: Remove support for -webkit-color-correction (which we've never supported on (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: resolve merge conflicts, obey brace style changes Created 7 years, 6 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/RenderBoxModelObject.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) 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 3610 matching lines...) Expand 10 before | Expand all | Expand 10 after
3621 3621
3622 // Get the selection offsets for the bottom of the gap 3622 // Get the selection offsets for the bottom of the gap
3623 LayoutUnit logicalLeft = max(lastLogicalLeft, logicalLeftSelectionOffset(roo tBlock, logicalBottom)); 3623 LayoutUnit logicalLeft = max(lastLogicalLeft, logicalLeftSelectionOffset(roo tBlock, logicalBottom));
3624 LayoutUnit logicalRight = min(lastLogicalRight, logicalRightSelectionOffset( rootBlock, logicalBottom)); 3624 LayoutUnit logicalRight = min(lastLogicalRight, logicalRightSelectionOffset( rootBlock, logicalBottom));
3625 LayoutUnit logicalWidth = logicalRight - logicalLeft; 3625 LayoutUnit logicalWidth = logicalRight - logicalLeft;
3626 if (logicalWidth <= 0) 3626 if (logicalWidth <= 0)
3627 return LayoutRect(); 3627 return LayoutRect();
3628 3628
3629 LayoutRect gapRect = rootBlock->logicalRectToPhysicalRect(rootBlockPhysicalP osition, LayoutRect(logicalLeft, logicalTop, logicalWidth, logicalHeight)); 3629 LayoutRect gapRect = rootBlock->logicalRectToPhysicalRect(rootBlockPhysicalP osition, LayoutRect(logicalLeft, logicalTop, logicalWidth, logicalHeight));
3630 if (paintInfo) 3630 if (paintInfo)
3631 paintInfo->context->fillRect(pixelSnappedIntRect(gapRect), selectionBack groundColor(), style()->colorSpace()); 3631 paintInfo->context->fillRect(pixelSnappedIntRect(gapRect), selectionBack groundColor());
3632 return gapRect; 3632 return gapRect;
3633 } 3633 }
3634 3634
3635 LayoutRect RenderBlock::logicalLeftSelectionGap(RenderBlock* rootBlock, const La youtPoint& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, 3635 LayoutRect RenderBlock::logicalLeftSelectionGap(RenderBlock* rootBlock, const La youtPoint& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock,
3636 RenderObject* selObj, LayoutUnit logicalLeft, LayoutUnit logicalTop, LayoutUnit logicalHeight, const PaintInfo* paintInfo) 3636 RenderObject* selObj, LayoutUnit logicalLeft, LayoutUnit logicalTop, LayoutUnit logicalHeight, const PaintInfo* paintInfo)
3637 { 3637 {
3638 LayoutUnit rootBlockLogicalTop = blockDirectionOffset(rootBlock, offsetFromR ootBlock) + logicalTop; 3638 LayoutUnit rootBlockLogicalTop = blockDirectionOffset(rootBlock, offsetFromR ootBlock) + logicalTop;
3639 LayoutUnit rootBlockLogicalLeft = max(logicalLeftSelectionOffset(rootBlock, logicalTop), logicalLeftSelectionOffset(rootBlock, logicalTop + logicalHeight)); 3639 LayoutUnit rootBlockLogicalLeft = max(logicalLeftSelectionOffset(rootBlock, logicalTop), logicalLeftSelectionOffset(rootBlock, logicalTop + logicalHeight));
3640 LayoutUnit rootBlockLogicalRight = min(inlineDirectionOffset(rootBlock, offs etFromRootBlock) + floorToInt(logicalLeft), min(logicalRightSelectionOffset(root Block, logicalTop), logicalRightSelectionOffset(rootBlock, logicalTop + logicalH eight))); 3640 LayoutUnit rootBlockLogicalRight = min(inlineDirectionOffset(rootBlock, offs etFromRootBlock) + floorToInt(logicalLeft), min(logicalRightSelectionOffset(root Block, logicalTop), logicalRightSelectionOffset(rootBlock, logicalTop + logicalH eight)));
3641 LayoutUnit rootBlockLogicalWidth = rootBlockLogicalRight - rootBlockLogicalL eft; 3641 LayoutUnit rootBlockLogicalWidth = rootBlockLogicalRight - rootBlockLogicalL eft;
3642 if (rootBlockLogicalWidth <= 0) 3642 if (rootBlockLogicalWidth <= 0)
3643 return LayoutRect(); 3643 return LayoutRect();
3644 3644
3645 LayoutRect gapRect = rootBlock->logicalRectToPhysicalRect(rootBlockPhysicalP osition, LayoutRect(rootBlockLogicalLeft, rootBlockLogicalTop, rootBlockLogicalW idth, logicalHeight)); 3645 LayoutRect gapRect = rootBlock->logicalRectToPhysicalRect(rootBlockPhysicalP osition, LayoutRect(rootBlockLogicalLeft, rootBlockLogicalTop, rootBlockLogicalW idth, logicalHeight));
3646 if (paintInfo) 3646 if (paintInfo)
3647 paintInfo->context->fillRect(pixelSnappedIntRect(gapRect), selObj->selec tionBackgroundColor(), selObj->style()->colorSpace()); 3647 paintInfo->context->fillRect(pixelSnappedIntRect(gapRect), selObj->selec tionBackgroundColor());
3648 return gapRect; 3648 return gapRect;
3649 } 3649 }
3650 3650
3651 LayoutRect RenderBlock::logicalRightSelectionGap(RenderBlock* rootBlock, const L ayoutPoint& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, 3651 LayoutRect RenderBlock::logicalRightSelectionGap(RenderBlock* rootBlock, const L ayoutPoint& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock,
3652 RenderObject* selObj, LayoutUni t logicalRight, LayoutUnit logicalTop, LayoutUnit logicalHeight, const PaintInfo * paintInfo) 3652 RenderObject* selObj, LayoutUni t logicalRight, LayoutUnit logicalTop, LayoutUnit logicalHeight, const PaintInfo * paintInfo)
3653 { 3653 {
3654 LayoutUnit rootBlockLogicalTop = blockDirectionOffset(rootBlock, offsetFromR ootBlock) + logicalTop; 3654 LayoutUnit rootBlockLogicalTop = blockDirectionOffset(rootBlock, offsetFromR ootBlock) + logicalTop;
3655 LayoutUnit rootBlockLogicalLeft = max(inlineDirectionOffset(rootBlock, offse tFromRootBlock) + floorToInt(logicalRight), max(logicalLeftSelectionOffset(rootB lock, logicalTop), logicalLeftSelectionOffset(rootBlock, logicalTop + logicalHei ght))); 3655 LayoutUnit rootBlockLogicalLeft = max(inlineDirectionOffset(rootBlock, offse tFromRootBlock) + floorToInt(logicalRight), max(logicalLeftSelectionOffset(rootB lock, logicalTop), logicalLeftSelectionOffset(rootBlock, logicalTop + logicalHei ght)));
3656 LayoutUnit rootBlockLogicalRight = min(logicalRightSelectionOffset(rootBlock , logicalTop), logicalRightSelectionOffset(rootBlock, logicalTop + logicalHeight )); 3656 LayoutUnit rootBlockLogicalRight = min(logicalRightSelectionOffset(rootBlock , logicalTop), logicalRightSelectionOffset(rootBlock, logicalTop + logicalHeight ));
3657 LayoutUnit rootBlockLogicalWidth = rootBlockLogicalRight - rootBlockLogicalL eft; 3657 LayoutUnit rootBlockLogicalWidth = rootBlockLogicalRight - rootBlockLogicalL eft;
3658 if (rootBlockLogicalWidth <= 0) 3658 if (rootBlockLogicalWidth <= 0)
3659 return LayoutRect(); 3659 return LayoutRect();
3660 3660
3661 LayoutRect gapRect = rootBlock->logicalRectToPhysicalRect(rootBlockPhysicalP osition, LayoutRect(rootBlockLogicalLeft, rootBlockLogicalTop, rootBlockLogicalW idth, logicalHeight)); 3661 LayoutRect gapRect = rootBlock->logicalRectToPhysicalRect(rootBlockPhysicalP osition, LayoutRect(rootBlockLogicalLeft, rootBlockLogicalTop, rootBlockLogicalW idth, logicalHeight));
3662 if (paintInfo) 3662 if (paintInfo)
3663 paintInfo->context->fillRect(pixelSnappedIntRect(gapRect), selObj->selec tionBackgroundColor(), selObj->style()->colorSpace()); 3663 paintInfo->context->fillRect(pixelSnappedIntRect(gapRect), selObj->selec tionBackgroundColor());
3664 return gapRect; 3664 return gapRect;
3665 } 3665 }
3666 3666
3667 void RenderBlock::getSelectionGapInfo(SelectionState state, bool& leftGap, bool& rightGap) 3667 void RenderBlock::getSelectionGapInfo(SelectionState state, bool& leftGap, bool& rightGap)
3668 { 3668 {
3669 bool ltr = style()->isLeftToRightDirection(); 3669 bool ltr = style()->isLeftToRightDirection();
3670 leftGap = (state == RenderObject::SelectionInside) || 3670 leftGap = (state == RenderObject::SelectionInside) ||
3671 (state == RenderObject::SelectionEnd && ltr) || 3671 (state == RenderObject::SelectionEnd && ltr) ||
3672 (state == RenderObject::SelectionStart && !ltr); 3672 (state == RenderObject::SelectionStart && !ltr);
3673 rightGap = (state == RenderObject::SelectionInside) || 3673 rightGap = (state == RenderObject::SelectionInside) ||
(...skipping 4428 matching lines...) Expand 10 before | Expand all | Expand 10 after
8102 { 8102 {
8103 memoryInstrumentation->addRootObject(gColumnInfoMap, WebCoreMemoryTypes::Ren deringStructures); 8103 memoryInstrumentation->addRootObject(gColumnInfoMap, WebCoreMemoryTypes::Ren deringStructures);
8104 memoryInstrumentation->addRootObject(gPositionedDescendantsMap, WebCoreMemor yTypes::RenderingStructures); 8104 memoryInstrumentation->addRootObject(gPositionedDescendantsMap, WebCoreMemor yTypes::RenderingStructures);
8105 memoryInstrumentation->addRootObject(gPercentHeightDescendantsMap, WebCoreMe moryTypes::RenderingStructures); 8105 memoryInstrumentation->addRootObject(gPercentHeightDescendantsMap, WebCoreMe moryTypes::RenderingStructures);
8106 memoryInstrumentation->addRootObject(gPositionedContainerMap, WebCoreMemoryT ypes::RenderingStructures); 8106 memoryInstrumentation->addRootObject(gPositionedContainerMap, WebCoreMemoryT ypes::RenderingStructures);
8107 memoryInstrumentation->addRootObject(gPercentHeightContainerMap, WebCoreMemo ryTypes::RenderingStructures); 8107 memoryInstrumentation->addRootObject(gPercentHeightContainerMap, WebCoreMemo ryTypes::RenderingStructures);
8108 memoryInstrumentation->addRootObject(gDelayedUpdateScrollInfoSet, WebCoreMem oryTypes::RenderingStructures); 8108 memoryInstrumentation->addRootObject(gDelayedUpdateScrollInfoSet, WebCoreMem oryTypes::RenderingStructures);
8109 } 8109 }
8110 8110
8111 } // namespace WebCore 8111 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/InlineTextBox.cpp ('k') | Source/core/rendering/RenderBoxModelObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698