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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h

Issue 2262373003: Clip PaintLayerScrollableArea::scrollIntoView return to layer bounds (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix the code style Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 360
361 void positionOverflowControls(); 361 void positionOverflowControls();
362 362
363 // isPointInResizeControl() is used for testing if a pointer/touch position is in the resize control 363 // isPointInResizeControl() is used for testing if a pointer/touch position is in the resize control
364 // area. 364 // area.
365 bool isPointInResizeControl(const IntPoint& absolutePoint, ResizerHitTestTyp e) const; 365 bool isPointInResizeControl(const IntPoint& absolutePoint, ResizerHitTestTyp e) const;
366 bool hitTestOverflowControls(HitTestResult&, const IntPoint& localPoint); 366 bool hitTestOverflowControls(HitTestResult&, const IntPoint& localPoint);
367 367
368 bool hitTestResizerInFragments(const PaintLayerFragments&, const HitTestLoca tion&) const; 368 bool hitTestResizerInFragments(const PaintLayerFragments&, const HitTestLoca tion&) const;
369 369
370 // Returns the new position, after scrolling, of the given rect in absolute
371 // coordinates, clipped by the parent's client rect.
370 LayoutRect scrollIntoView(const LayoutRect&, const ScrollAlignment& alignX, const ScrollAlignment& alignY, ScrollType = ProgrammaticScroll) override; 372 LayoutRect scrollIntoView(const LayoutRect&, const ScrollAlignment& alignX, const ScrollAlignment& alignY, ScrollType = ProgrammaticScroll) override;
371 373
372 // Returns true if scrollable area is in the FrameView's collection of scrol lable areas. This can 374 // Returns true if scrollable area is in the FrameView's collection of scrol lable areas. This can
373 // only happen if we're scrollable, visible to hit test, and do in fact over flow. This means that 375 // only happen if we're scrollable, visible to hit test, and do in fact over flow. This means that
374 // 'overflow: hidden' or 'pointer-events: none' layers never get added to th e FrameView's collection. 376 // 'overflow: hidden' or 'pointer-events: none' layers never get added to th e FrameView's collection.
375 bool scrollsOverflow() const { return m_scrollsOverflow; } 377 bool scrollsOverflow() const { return m_scrollsOverflow; }
376 378
377 // Rectangle encompassing the scroll corner and resizer rect. 379 // Rectangle encompassing the scroll corner and resizer rect.
378 IntRect scrollCornerAndResizerRect() const final; 380 IntRect scrollCornerAndResizerRect() const final;
379 381
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 #endif 545 #endif
544 }; 546 };
545 547
546 DEFINE_TYPE_CASTS(PaintLayerScrollableArea, ScrollableArea, scrollableArea, 548 DEFINE_TYPE_CASTS(PaintLayerScrollableArea, ScrollableArea, scrollableArea,
547 scrollableArea->isPaintLayerScrollableArea(), 549 scrollableArea->isPaintLayerScrollableArea(),
548 scrollableArea.isPaintLayerScrollableArea()); 550 scrollableArea.isPaintLayerScrollableArea());
549 551
550 } // namespace blink 552 } // namespace blink
551 553
552 #endif // LayerScrollableArea_h 554 #endif // LayerScrollableArea_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698