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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutReplaced.cpp

Issue 1813383002: Move all fast-path paint invalidation mapping into PaintInvalidationState (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable fast-path/slow-path comparison because of saturated operations of LayoutUnit Created 4 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2000 Dirk Mueller (mueller@kde.org) 3 * Copyright (C) 2000 Dirk Mueller (mueller@kde.org)
4 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved.
5 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved. 5 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 // The selection state for our containing block hierarchy is updated by the base class call. 731 // The selection state for our containing block hierarchy is updated by the base class call.
732 LayoutBox::setSelectionState(state); 732 LayoutBox::setSelectionState(state);
733 733
734 if (!inlineBoxWrapper()) 734 if (!inlineBoxWrapper())
735 return; 735 return;
736 736
737 // We only include the space below the baseline in our layer's cached paint invalidation rect if the 737 // We only include the space below the baseline in our layer's cached paint invalidation rect if the
738 // image is selected. Since the selection state has changed update the rect. 738 // image is selected. Since the selection state has changed update the rect.
739 if (hasLayer()) { 739 if (hasLayer()) {
740 LayoutRect rect = localOverflowRectForPaintInvalidation(); 740 LayoutRect rect = localOverflowRectForPaintInvalidation();
741 PaintLayer::mapRectToPaintInvalidationBacking(this, &containerForPaintIn validation(), rect); 741 PaintLayer::mapRectToPaintInvalidationBacking(*this, containerForPaintIn validation(), rect);
742 setPreviousPaintInvalidationRect(rect); 742 setPreviousPaintInvalidationRect(rect);
743 } 743 }
744 744
745 if (canUpdateSelectionOnRootLineBoxes()) 745 if (canUpdateSelectionOnRootLineBoxes())
746 inlineBoxWrapper()->root().setHasSelectedChildren(state != SelectionNone ); 746 inlineBoxWrapper()->root().setHasSelectedChildren(state != SelectionNone );
747 } 747 }
748 748
749 void LayoutReplaced::IntrinsicSizingInfo::transpose() 749 void LayoutReplaced::IntrinsicSizingInfo::transpose()
750 { 750 {
751 size = size.transposedSize(); 751 size = size.transposedSize();
752 aspectRatio = aspectRatio.transposedSize(); 752 aspectRatio = aspectRatio.transposedSize();
753 std::swap(hasWidth, hasHeight); 753 std::swap(hasWidth, hasHeight);
754 } 754 }
755 755
756 } // namespace blink 756 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutPart.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutTableCell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698