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

Side by Side Diff: Source/core/page/scrolling/ScrollingCoordinator.cpp

Issue 1303413004: Convert some call sites to use explicit LayoutRect->FloatRect conversion. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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/page/TouchAdjustment.cpp ('k') | Source/core/paint/BlockFlowPainter.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) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 Vector<LayoutRect>* glRects; 496 Vector<LayoutRect>* glRects;
497 if (glIter == graphicsRects.end()) 497 if (glIter == graphicsRects.end())
498 glRects = &graphicsRects.add(graphicsLayer, Vector<LayoutRect>()).st oredValue->value; 498 glRects = &graphicsRects.add(graphicsLayer, Vector<LayoutRect>()).st oredValue->value;
499 else 499 else
500 glRects = &glIter->value; 500 glRects = &glIter->value;
501 501
502 // Transform each rect to the co-ordinate space of the graphicsLayer. 502 // Transform each rect to the co-ordinate space of the graphicsLayer.
503 for (size_t i = 0; i < layerIter->value.size(); ++i) { 503 for (size_t i = 0; i < layerIter->value.size(); ++i) {
504 LayoutRect rect = layerIter->value[i]; 504 LayoutRect rect = layerIter->value[i];
505 if (compositedLayer != curLayer) { 505 if (compositedLayer != curLayer) {
506 FloatQuad compositorQuad = geometryMap.mapToContainer(rect, comp ositedLayer->layoutObject()); 506 FloatQuad compositorQuad = geometryMap.mapToContainer(FloatRect( rect), compositedLayer->layoutObject());
507 rect = LayoutRect(compositorQuad.boundingBox()); 507 rect = LayoutRect(compositorQuad.boundingBox());
508 // If the enclosing composited layer itself is scrolled, we have to undo the subtraction 508 // If the enclosing composited layer itself is scrolled, we have to undo the subtraction
509 // of its scroll offset since we want the offset relative to the scrolling content, not 509 // of its scroll offset since we want the offset relative to the scrolling content, not
510 // the element itself. 510 // the element itself.
511 if (compositedLayer->layoutObject()->hasOverflowClip()) 511 if (compositedLayer->layoutObject()->hasOverflowClip())
512 rect.move(compositedLayer->layoutBox()->scrolledContentOffse t()); 512 rect.move(compositedLayer->layoutBox()->scrolledContentOffse t());
513 } 513 }
514 DeprecatedPaintLayer::mapRectToPaintBackingCoordinates(compositedLay er->layoutObject(), rect); 514 DeprecatedPaintLayer::mapRectToPaintBackingCoordinates(compositedLay er->layoutObject(), rect);
515 glRects->append(rect); 515 glRects->append(rect);
516 } 516 }
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
1076 bool frameIsScrollable = frameView && frameView->isScrollable(); 1076 bool frameIsScrollable = frameView && frameView->isScrollable();
1077 if (frameIsScrollable != m_wasFrameScrollable) 1077 if (frameIsScrollable != m_wasFrameScrollable)
1078 return true; 1078 return true;
1079 1079
1080 if (WebLayer* scrollLayer = frameView ? toWebLayer(frameView->layerForScroll ing()) : nullptr) 1080 if (WebLayer* scrollLayer = frameView ? toWebLayer(frameView->layerForScroll ing()) : nullptr)
1081 return WebSize(frameView->contentsSize()) != scrollLayer->bounds(); 1081 return WebSize(frameView->contentsSize()) != scrollLayer->bounds();
1082 return false; 1082 return false;
1083 } 1083 }
1084 1084
1085 } // namespace blink 1085 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/page/TouchAdjustment.cpp ('k') | Source/core/paint/BlockFlowPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698