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

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

Issue 1971843002: Fix paint invalidation rect of LayoutView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutView.h ('k') | no next file » | 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 // Ditto when not in compositing mode. 316 // Ditto when not in compositing mode.
317 if (!usesCompositing()) 317 if (!usesCompositing())
318 return LayoutBlockFlow::visualOverflowRect(); 318 return LayoutBlockFlow::visualOverflowRect();
319 319
320 // In normal compositing mode, LayoutView doesn't actually apply clipping 320 // In normal compositing mode, LayoutView doesn't actually apply clipping
321 // on its descendants. Instead their visual overflow is propagated to 321 // on its descendants. Instead their visual overflow is propagated to
322 // compositor()->m_rootContentLayer for accelerated scrolling. 322 // compositor()->m_rootContentLayer for accelerated scrolling.
323 return LayoutRect(documentRect()); 323 return LayoutRect(documentRect());
324 } 324 }
325 325
326 LayoutRect LayoutView::localOverflowRectForPaintInvalidation() const
327 {
328 // TODO(wangxianzhu): This is only required without rootLayerScrolls (though it is also correct
329 // but unnecessary with rootLayerScrolls) because of the special LayoutView overflow model.
330 return visualOverflowRect();
331 }
332
326 void LayoutView::mapLocalToAncestor(const LayoutBoxModelObject* ancestor, Transf ormState& transformState, MapCoordinatesFlags mode) const 333 void LayoutView::mapLocalToAncestor(const LayoutBoxModelObject* ancestor, Transf ormState& transformState, MapCoordinatesFlags mode) const
327 { 334 {
328 if (!ancestor && mode & UseTransforms && shouldUseTransformFromContainer(0)) { 335 if (!ancestor && mode & UseTransforms && shouldUseTransformFromContainer(0)) {
329 TransformationMatrix t; 336 TransformationMatrix t;
330 getTransformFromContainer(0, LayoutSize(), t); 337 getTransformFromContainer(0, LayoutSize(), t);
331 transformState.applyTransform(t); 338 transformState.applyTransform(t);
332 } 339 }
333 340
334 if ((mode & IsFixed) && m_frameView) { 341 if ((mode & IsFixed) && m_frameView) {
335 transformState.move(toIntSize(m_frameView->scrollPosition())); 342 transformState.move(toIntSize(m_frameView->scrollPosition()));
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after
1035 // ASSERT(!frame()->isMainFrame()) here. All main frame scrolling should 1042 // ASSERT(!frame()->isMainFrame()) here. All main frame scrolling should
1036 // be handled by the ViewportScrollCallback. 1043 // be handled by the ViewportScrollCallback.
1037 1044
1038 if (!frameView()) 1045 if (!frameView())
1039 return ScrollResult(false, false, delta.width(), delta.height()); 1046 return ScrollResult(false, false, delta.width(), delta.height());
1040 1047
1041 return frameView()->getScrollableArea()->userScroll(granularity, delta); 1048 return frameView()->getScrollableArea()->userScroll(granularity, delta);
1042 } 1049 }
1043 1050
1044 } // namespace blink 1051 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutView.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698