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

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 1340643004: Stop propagating customscrollbar styles across iframe boundaries. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: addressed review comments 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) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 return true; 483 return true;
484 } 484 }
485 485
486 // If the <body> didn't have a custom style, then the root element might. 486 // If the <body> didn't have a custom style, then the root element might.
487 Element* docElement = doc ? doc->documentElement() : 0; 487 Element* docElement = doc ? doc->documentElement() : 0;
488 if (docElement && docElement->layoutObject() && docElement->layoutObject()-> style()->hasPseudoStyle(PseudoIdScrollbar)) { 488 if (docElement && docElement->layoutObject() && docElement->layoutObject()-> style()->hasPseudoStyle(PseudoIdScrollbar)) {
489 customScrollbarElement = docElement; 489 customScrollbarElement = docElement;
490 return true; 490 return true;
491 } 491 }
492 492
493 // If we have an owning ipage/LocalFrame element, then it can set the custom scrollbar also.
494 LayoutPart* frameLayoutObject = m_frame->ownerLayoutObject();
495 if (frameLayoutObject && frameLayoutObject->style()->hasPseudoStyle(PseudoId Scrollbar)) {
496 customScrollbarFrame = m_frame.get();
497 return true;
498 }
499
500 return false; 493 return false;
501 } 494 }
502 495
503 Scrollbar* FrameView::createScrollbar(ScrollbarOrientation orientation) 496 Scrollbar* FrameView::createScrollbar(ScrollbarOrientation orientation)
504 { 497 {
505 Element* customScrollbarElement = nullptr; 498 Element* customScrollbarElement = nullptr;
506 LocalFrame* customScrollbarFrame = nullptr; 499 LocalFrame* customScrollbarFrame = nullptr;
507 if (shouldUseCustomScrollbars(customScrollbarElement, customScrollbarFrame)) 500 if (shouldUseCustomScrollbars(customScrollbarElement, customScrollbarFrame))
508 return LayoutScrollbar::createCustomScrollbar(this, orientation, customS crollbarElement, customScrollbarFrame); 501 return LayoutScrollbar::createCustomScrollbar(this, orientation, customS crollbarElement, customScrollbarFrame);
509 502
(...skipping 3629 matching lines...) Expand 10 before | Expand all | Expand 10 after
4139 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot tling); 4132 return m_subtreeThrottled || (m_hiddenForThrottling && m_crossOriginForThrot tling);
4140 } 4133 }
4141 4134
4142 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const 4135 LayoutBox& FrameView::boxForScrollControlPaintInvalidation() const
4143 { 4136 {
4144 ASSERT(!layoutViewItem().isNull()); 4137 ASSERT(!layoutViewItem().isNull());
4145 return *layoutView(); 4138 return *layoutView();
4146 } 4139 }
4147 4140
4148 } // namespace blink 4141 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698