| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |