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

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

Issue 2761673005: Optimize scroll adjustment for paint invalidation
Patch Set: - Created 3 years, 9 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 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2010 Google Inc. All rights reserved. 7 * Copyright (C) 2010 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 1456 matching lines...) Expand 10 before | Expand all | Expand 10 after
1467 rootElementStyle = rootElement->ensureComputedStyle(); 1467 rootElementStyle = rootElement->ensureComputedStyle();
1468 if (rootElementStyle->hasBackground()) 1468 if (rootElementStyle->hasBackground())
1469 return false; 1469 return false;
1470 1470
1471 if (node() != document().firstBodyElement()) 1471 if (node() != document().firstBodyElement())
1472 return false; 1472 return false;
1473 1473
1474 return true; 1474 return true;
1475 } 1475 }
1476 1476
1477 IntSize LayoutBoxModelObject::scrollAdjustmentForPaintInvalidation() const {
1478 if (!hasOverflowClip() || usesCompositedScrolling())
1479 return IntSize();
1480 return -toLayoutBox(this)->scrolledContentOffset();
1481 }
1482
1477 } // namespace blink 1483 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBoxModelObject.h ('k') | third_party/WebKit/Source/core/layout/LayoutObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698