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

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

Issue 2150933002: Fix crash when removing contents from a document having multiple bodies (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 5 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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 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 27 matching lines...) Expand all
38 : LayoutBlock(nullptr) 38 : LayoutBlock(nullptr)
39 , m_scrollableArea(scrollableArea) 39 , m_scrollableArea(scrollableArea)
40 , m_scrollbar(scrollbar) 40 , m_scrollbar(scrollbar)
41 , m_part(part) 41 , m_part(part)
42 { 42 {
43 ASSERT(m_scrollableArea); 43 ASSERT(m_scrollableArea);
44 } 44 }
45 45
46 LayoutScrollbarPart::~LayoutScrollbarPart() 46 LayoutScrollbarPart::~LayoutScrollbarPart()
47 { 47 {
48 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS
49 // We may not have invalidated the painting layer for now, but the
50 // scrollable area will invalidate during paint invalidation.
51 endShouldKeepAlive();
52 #endif
48 } 53 }
49 54
50 static void recordScrollbarPartStats(Document& document, ScrollbarPart part) 55 static void recordScrollbarPartStats(Document& document, ScrollbarPart part)
51 { 56 {
52 switch (part) { 57 switch (part) {
53 case BackButtonStartPart: 58 case BackButtonStartPart:
54 case ForwardButtonStartPart: 59 case ForwardButtonStartPart:
55 case BackButtonEndPart: 60 case BackButtonEndPart:
56 case ForwardButtonEndPart: 61 case ForwardButtonEndPart:
57 UseCounter::count(document, UseCounter::CSSSelectorPseudoScrollbarButton ); 62 UseCounter::count(document, UseCounter::CSSSelectorPseudoScrollbarButton );
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 } 222 }
218 223
219 LayoutRect LayoutScrollbarPart::visualRect() const 224 LayoutRect LayoutScrollbarPart::visualRect() const
220 { 225 {
221 // This returns the combined bounds of all scrollbar parts, which is suffici ent for correctness 226 // This returns the combined bounds of all scrollbar parts, which is suffici ent for correctness
222 // but not as tight as it could be. 227 // but not as tight as it could be.
223 return m_scrollableArea->visualRectForScrollbarParts(); 228 return m_scrollableArea->visualRectForScrollbarParts();
224 } 229 }
225 230
226 } // namespace blink 231 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698