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

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

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 #ifndef PaintLayerScrollableArea_h 44 #ifndef PaintLayerScrollableArea_h
45 #define PaintLayerScrollableArea_h 45 #define PaintLayerScrollableArea_h
46 46
47 #include "core/CoreExport.h" 47 #include "core/CoreExport.h"
48 #include "core/layout/ScrollAnchor.h" 48 #include "core/layout/ScrollAnchor.h"
49 #include "core/layout/ScrollEnums.h" 49 #include "core/layout/ScrollEnums.h"
50 #include "core/paint/PaintInvalidationCapableScrollableArea.h" 50 #include "core/paint/PaintInvalidationCapableScrollableArea.h"
51 #include "core/paint/PaintLayerFragment.h" 51 #include "core/paint/PaintLayerFragment.h"
52 #include "platform/heap/Handle.h" 52 #include "platform/heap/Handle.h"
53 #include "wtf/PtrUtil.h"
54 #include <memory>
55 53
56 namespace blink { 54 namespace blink {
57 55
58 enum ResizerHitTestType { 56 enum ResizerHitTestType {
59 ResizerForPointer, 57 ResizerForPointer,
60 ResizerForTouch 58 ResizerForTouch
61 }; 59 };
62 60
63 class ComputedStyle; 61 class ComputedStyle;
64 class HitTestResult; 62 class HitTestResult;
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 void updateCompositingLayersAfterScroll(); 450 void updateCompositingLayersAfterScroll();
453 451
454 PaintLayerScrollableAreaRareData* rareData() 452 PaintLayerScrollableAreaRareData* rareData()
455 { 453 {
456 return m_rareData.get(); 454 return m_rareData.get();
457 } 455 }
458 456
459 PaintLayerScrollableAreaRareData& ensureRareData() 457 PaintLayerScrollableAreaRareData& ensureRareData()
460 { 458 {
461 if (!m_rareData) 459 if (!m_rareData)
462 m_rareData = wrapUnique(new PaintLayerScrollableAreaRareData()); 460 m_rareData = adoptPtr(new PaintLayerScrollableAreaRareData());
463 return *m_rareData.get(); 461 return *m_rareData.get();
464 } 462 }
465 463
466 // PaintInvalidationCapableScrollableArea 464 // PaintInvalidationCapableScrollableArea
467 LayoutBox& boxForScrollControlPaintInvalidation() const { return box(); } 465 LayoutBox& boxForScrollControlPaintInvalidation() const { return box(); }
468 466
469 PaintLayer& m_layer; 467 PaintLayer& m_layer;
470 468
471 // Keeps track of whether the layer is currently resizing, so events can cau se resizing to start and stop. 469 // Keeps track of whether the layer is currently resizing, so events can cau se resizing to start and stop.
472 unsigned m_inResizeMode : 1; 470 unsigned m_inResizeMode : 1;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 IntPoint m_cachedOverlayScrollbarOffset; 502 IntPoint m_cachedOverlayScrollbarOffset;
505 503
506 // LayoutObject to hold our custom scroll corner. 504 // LayoutObject to hold our custom scroll corner.
507 LayoutScrollbarPart* m_scrollCorner; 505 LayoutScrollbarPart* m_scrollCorner;
508 506
509 // LayoutObject to hold our custom resizer. 507 // LayoutObject to hold our custom resizer.
510 LayoutScrollbarPart* m_resizer; 508 LayoutScrollbarPart* m_resizer;
511 509
512 ScrollAnchor m_scrollAnchor; 510 ScrollAnchor m_scrollAnchor;
513 511
514 std::unique_ptr<PaintLayerScrollableAreaRareData> m_rareData; 512 OwnPtr<PaintLayerScrollableAreaRareData> m_rareData;
515 513
516 #if ENABLE(ASSERT) 514 #if ENABLE(ASSERT)
517 bool m_hasBeenDisposed; 515 bool m_hasBeenDisposed;
518 #endif 516 #endif
519 }; 517 };
520 518
521 DEFINE_TYPE_CASTS(PaintLayerScrollableArea, ScrollableArea, scrollableArea, 519 DEFINE_TYPE_CASTS(PaintLayerScrollableArea, ScrollableArea, scrollableArea,
522 scrollableArea->isPaintLayerScrollableArea(), 520 scrollableArea->isPaintLayerScrollableArea(),
523 scrollableArea.isPaintLayerScrollableArea()); 521 scrollableArea.isPaintLayerScrollableArea());
524 522
525 } // namespace blink 523 } // namespace blink
526 524
527 #endif // LayerScrollableArea_h 525 #endif // LayerScrollableArea_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayer.cpp ('k') | third_party/WebKit/Source/core/paint/PaintLayerStackingNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698