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

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

Issue 2734993002: Fix null pointer dereference in PLSA's scrollbarStyleSource. (Closed)
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
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/dom/shadow/img-display-contents-crash-expected.txt ('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) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * 4 *
5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
6 * 6 *
7 * Other contributors: 7 * Other contributors:
8 * Robert O'Callahan <roc+@cs.cmu.edu> 8 * Robert O'Callahan <roc+@cs.cmu.edu>
9 * David Baron <dbaron@fas.harvard.edu> 9 * David Baron <dbaron@fas.harvard.edu>
10 * Christian Biesinger <cbiesinger@gmail.com> 10 * Christian Biesinger <cbiesinger@gmail.com>
(...skipping 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after
1142 if (docElement && docElement->layoutObject() && 1142 if (docElement && docElement->layoutObject() &&
1143 docElement->layoutObject()->style()->hasPseudoStyle( 1143 docElement->layoutObject()->style()->hasPseudoStyle(
1144 PseudoIdScrollbar)) 1144 PseudoIdScrollbar))
1145 return *docElement->layoutObject(); 1145 return *docElement->layoutObject();
1146 } 1146 }
1147 1147
1148 if (layoutObject.styleRef().hasPseudoStyle(PseudoIdScrollbar)) 1148 if (layoutObject.styleRef().hasPseudoStyle(PseudoIdScrollbar))
1149 return layoutObject; 1149 return layoutObject;
1150 1150
1151 if (ShadowRoot* shadowRoot = node->containingShadowRoot()) { 1151 if (ShadowRoot* shadowRoot = node->containingShadowRoot()) {
1152 if (shadowRoot->type() == ShadowRootType::UserAgent) 1152 if (shadowRoot->type() == ShadowRootType::UserAgent) {
1153 return *shadowRoot->host().layoutObject(); 1153 if (LayoutObject* hostLayoutObject = shadowRoot->host().layoutObject())
1154 return *hostLayoutObject;
1155 }
1154 } 1156 }
1155 } 1157 }
1156 1158
1157 return layoutObject; 1159 return layoutObject;
1158 } 1160 }
1159 1161
1160 bool PaintLayerScrollableArea::needsScrollbarReconstruction() const { 1162 bool PaintLayerScrollableArea::needsScrollbarReconstruction() const {
1161 const LayoutObject& styleSource = scrollbarStyleSource(box()); 1163 const LayoutObject& styleSource = scrollbarStyleSource(box());
1162 bool shouldUseCustom = 1164 bool shouldUseCustom =
1163 styleSource.isBox() && 1165 styleSource.isBox() &&
(...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after
2130 2132
2131 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: 2133 void PaintLayerScrollableArea::DelayScrollOffsetClampScope::
2132 clampScrollableAreas() { 2134 clampScrollableAreas() {
2133 for (auto& scrollableArea : *s_needsClamp) 2135 for (auto& scrollableArea : *s_needsClamp)
2134 scrollableArea->clampScrollOffsetAfterOverflowChange(); 2136 scrollableArea->clampScrollOffsetAfterOverflowChange();
2135 delete s_needsClamp; 2137 delete s_needsClamp;
2136 s_needsClamp = nullptr; 2138 s_needsClamp = nullptr;
2137 } 2139 }
2138 2140
2139 } // namespace blink 2141 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/dom/shadow/img-display-contents-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698