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

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

Issue 1537133002: Renaming: distinguish ancestor, container and paintInvalidationContainer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@SelectionInvalidation
Patch Set: Created 5 years 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 2642 matching lines...) Expand 10 before | Expand all | Expand 10 after
2653 } 2653 }
2654 2654
2655 GapRects LayoutBlockFlow::selectionGapRectsForPaintInvalidation(const LayoutBoxM odelObject* paintInvalidationContainer) const 2655 GapRects LayoutBlockFlow::selectionGapRectsForPaintInvalidation(const LayoutBoxM odelObject* paintInvalidationContainer) const
2656 { 2656 {
2657 ASSERT(!needsLayout()); 2657 ASSERT(!needsLayout());
2658 2658
2659 if (!shouldPaintSelectionGaps()) 2659 if (!shouldPaintSelectionGaps())
2660 return GapRects(); 2660 return GapRects();
2661 2661
2662 TransformState transformState(TransformState::ApplyTransformDirection, Float Point()); 2662 TransformState transformState(TransformState::ApplyTransformDirection, Float Point());
2663 mapLocalToContainer(paintInvalidationContainer, transformState, ApplyContain erFlip | UseTransforms); 2663 mapLocalToAncestor(paintInvalidationContainer, transformState, ApplyContaine rFlip | UseTransforms);
2664 LayoutPoint offsetFromPaintInvalidationContainer = roundedLayoutPoint(transf ormState.mappedPoint()); 2664 LayoutPoint offsetFromPaintInvalidationContainer = roundedLayoutPoint(transf ormState.mappedPoint());
2665 2665
2666 if (hasOverflowClip()) 2666 if (hasOverflowClip())
2667 offsetFromPaintInvalidationContainer -= scrolledContentOffset(); 2667 offsetFromPaintInvalidationContainer -= scrolledContentOffset();
2668 2668
2669 LayoutUnit lastTop = 0; 2669 LayoutUnit lastTop = 0;
2670 LayoutUnit lastLeft = logicalLeftSelectionOffset(this, lastTop); 2670 LayoutUnit lastLeft = logicalLeftSelectionOffset(this, lastTop);
2671 LayoutUnit lastRight = logicalRightSelectionOffset(this, lastTop); 2671 LayoutUnit lastRight = logicalRightSelectionOffset(this, lastTop);
2672 2672
2673 return selectionGaps(this, offsetFromPaintInvalidationContainer, LayoutSize( ), lastTop, lastLeft, lastRight); 2673 return selectionGaps(this, offsetFromPaintInvalidationContainer, LayoutSize( ), lastTop, lastLeft, lastRight);
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
3124 FrameView* frameView = document().view(); 3124 FrameView* frameView = document().view();
3125 LayoutUnit top = (style()->position() == FixedPosition) ? 0 : frameView->scr ollOffset().height(); 3125 LayoutUnit top = (style()->position() == FixedPosition) ? 0 : frameView->scr ollOffset().height();
3126 int visibleHeight = frameView->visibleContentRect(IncludeScrollbars).height( ); 3126 int visibleHeight = frameView->visibleContentRect(IncludeScrollbars).height( );
3127 if (size().height() < visibleHeight) 3127 if (size().height() < visibleHeight)
3128 top += (visibleHeight - size().height()) / 2; 3128 top += (visibleHeight - size().height()) / 2;
3129 setY(top); 3129 setY(top);
3130 dialog->setCentered(top); 3130 dialog->setCentered(top);
3131 } 3131 }
3132 3132
3133 } // namespace blink 3133 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698