Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 234 if (OwnPtr<WebScrollbarLayer> scrollbarLayer = scrollbars.take(scrollableAre a)) | 234 if (OwnPtr<WebScrollbarLayer> scrollbarLayer = scrollbars.take(scrollableAre a)) |
| 235 GraphicsLayer::unregisterContentsLayer(scrollbarLayer->layer()); | 235 GraphicsLayer::unregisterContentsLayer(scrollbarLayer->layer()); |
| 236 } | 236 } |
| 237 | 237 |
| 238 static PassOwnPtr<WebScrollbarLayer> createScrollbarLayer(Scrollbar* scrollbar) | 238 static PassOwnPtr<WebScrollbarLayer> createScrollbarLayer(Scrollbar* scrollbar) |
| 239 { | 239 { |
| 240 ScrollbarTheme* theme = scrollbar->theme(); | 240 ScrollbarTheme* theme = scrollbar->theme(); |
| 241 blink::WebScrollbarThemePainter painter(theme, scrollbar); | 241 blink::WebScrollbarThemePainter painter(theme, scrollbar); |
| 242 OwnPtr<blink::WebScrollbarThemeGeometry> geometry(blink::WebScrollbarThemeGe ometryNative::create(theme)); | 242 OwnPtr<blink::WebScrollbarThemeGeometry> geometry(blink::WebScrollbarThemeGe ometryNative::create(theme)); |
| 243 | 243 |
| 244 OwnPtr<WebScrollbarLayer> scrollbarLayer = adoptPtr(blink::Platform::current ()->compositorSupport()->createScrollbarLayer(new blink::WebScrollbarImpl(scroll bar), painter, geometry.leakPtr())); | 244 OwnPtr<WebScrollbarLayer> scrollbarLayer = adoptPtr(blink::Platform::current ()->compositorSupport()->createScrollbarLayer(WebScrollbarImpl::create(scrollbar ), painter, geometry.leakPtr())); |
| 245 GraphicsLayer::registerContentsLayer(scrollbarLayer->layer()); | 245 GraphicsLayer::registerContentsLayer(scrollbarLayer->layer()); |
| 246 return scrollbarLayer.release(); | 246 return scrollbarLayer.release(); |
| 247 } | 247 } |
| 248 | 248 |
| 249 PassOwnPtr<WebScrollbarLayer> ScrollingCoordinator::createSolidColorScrollbarLay er(ScrollbarOrientation orientation, int thumbThickness, int trackStart, bool is LeftSideVerticalScrollbar) | 249 PassOwnPtr<WebScrollbarLayer> ScrollingCoordinator::createSolidColorScrollbarLay er(ScrollbarOrientation orientation, int thumbThickness, int trackStart, bool is LeftSideVerticalScrollbar) |
| 250 { | 250 { |
| 251 blink::WebScrollbar::Orientation webOrientation = (orientation == Horizontal Scrollbar) ? blink::WebScrollbar::Horizontal : blink::WebScrollbar::Vertical; | 251 blink::WebScrollbar::Orientation webOrientation = (orientation == Horizontal Scrollbar) ? blink::WebScrollbar::Horizontal : blink::WebScrollbar::Vertical; |
| 252 OwnPtr<WebScrollbarLayer> scrollbarLayer = adoptPtr(blink::Platform::current ()->compositorSupport()->createSolidColorScrollbarLayer(webOrientation, thumbThi ckness, trackStart, isLeftSideVerticalScrollbar)); | 252 OwnPtr<WebScrollbarLayer> scrollbarLayer = adoptPtr(blink::Platform::current ()->compositorSupport()->createSolidColorScrollbarLayer(webOrientation, thumbThi ckness, trackStart, isLeftSideVerticalScrollbar)); |
| 253 GraphicsLayer::registerContentsLayer(scrollbarLayer->layer()); | 253 GraphicsLayer::registerContentsLayer(scrollbarLayer->layer()); |
| 254 return scrollbarLayer.release(); | 254 return scrollbarLayer.release(); |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 714 if (const FrameView::ResizerAreaSet* resizerAreas = frameView->resizerAreas( )) { | 714 if (const FrameView::ResizerAreaSet* resizerAreas = frameView->resizerAreas( )) { |
| 715 for (FrameView::ResizerAreaSet::const_iterator it = resizerAreas->begin( ), end = resizerAreas->end(); it != end; ++it) { | 715 for (FrameView::ResizerAreaSet::const_iterator it = resizerAreas->begin( ), end = resizerAreas->end(); it != end; ++it) { |
| 716 RenderBox* box = *it; | 716 RenderBox* box = *it; |
| 717 IntRect bounds = box->absoluteBoundingBoxRect(); | 717 IntRect bounds = box->absoluteBoundingBoxRect(); |
| 718 IntRect corner = box->layer()->scrollableArea()->touchResizerCornerR ect(bounds); | 718 IntRect corner = box->layer()->scrollableArea()->touchResizerCornerR ect(bounds); |
| 719 corner.moveBy(offset); | 719 corner.moveBy(offset); |
| 720 shouldHandleScrollGestureOnMainThreadRegion.unite(corner); | 720 shouldHandleScrollGestureOnMainThreadRegion.unite(corner); |
| 721 } | 721 } |
| 722 } | 722 } |
| 723 | 723 |
| 724 if (const HashSet<RefPtr<Widget> >* children = frameView->children()) { | 724 if (const WillBeHeapHashSet<RefPtrWillBeMember<Widget> >* children = frameVi ew->children()) { |
|
haraken
2014/10/11 17:33:02
ChildrenWidgetSet
sof
2014/10/12 08:16:22
Done.
| |
| 725 for (HashSet<RefPtr<Widget> >::const_iterator it = children->begin(), en d = children->end(); it != end; ++it) { | 725 for (WillBeHeapHashSet<RefPtrWillBeMember<Widget> >::const_iterator it = children->begin(), end = children->end(); it != end; ++it) { |
| 726 if (!(*it)->isPluginView()) | 726 if (!(*it)->isPluginView()) |
| 727 continue; | 727 continue; |
| 728 | 728 |
| 729 PluginView* pluginView = toPluginView(it->get()); | 729 PluginView* pluginView = toPluginView(it->get()); |
| 730 if (pluginView->wantsWheelEvents()) | 730 if (pluginView->wantsWheelEvents()) |
| 731 shouldHandleScrollGestureOnMainThreadRegion.unite(pluginView->fr ameRect()); | 731 shouldHandleScrollGestureOnMainThreadRegion.unite(pluginView->fr ameRect()); |
| 732 } | 732 } |
| 733 } | 733 } |
| 734 | 734 |
| 735 const FrameTree& tree = frame->tree(); | 735 const FrameTree& tree = frame->tree(); |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 975 bool frameIsScrollable = frameView && frameView->isScrollable(); | 975 bool frameIsScrollable = frameView && frameView->isScrollable(); |
| 976 if (frameIsScrollable != m_wasFrameScrollable) | 976 if (frameIsScrollable != m_wasFrameScrollable) |
| 977 return true; | 977 return true; |
| 978 | 978 |
| 979 if (WebLayer* scrollLayer = frameView ? toWebLayer(frameView->layerForScroll ing()) : 0) | 979 if (WebLayer* scrollLayer = frameView ? toWebLayer(frameView->layerForScroll ing()) : 0) |
| 980 return blink::WebSize(frameView->contentsSize()) != scrollLayer->bounds( ); | 980 return blink::WebSize(frameView->contentsSize()) != scrollLayer->bounds( ); |
| 981 return false; | 981 return false; |
| 982 } | 982 } |
| 983 | 983 |
| 984 } // namespace blink | 984 } // namespace blink |
| OLD | NEW |