| 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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 717 if (const FrameView::ResizerAreaSet* resizerAreas = frameView->resizerAreas(
)) { | 717 if (const FrameView::ResizerAreaSet* resizerAreas = frameView->resizerAreas(
)) { |
| 718 for (FrameView::ResizerAreaSet::const_iterator it = resizerAreas->begin(
), end = resizerAreas->end(); it != end; ++it) { | 718 for (FrameView::ResizerAreaSet::const_iterator it = resizerAreas->begin(
), end = resizerAreas->end(); it != end; ++it) { |
| 719 RenderBox* box = *it; | 719 RenderBox* box = *it; |
| 720 IntRect bounds = box->absoluteBoundingBoxRect(); | 720 IntRect bounds = box->absoluteBoundingBoxRect(); |
| 721 IntRect corner = box->layer()->scrollableArea()->touchResizerCornerR
ect(bounds); | 721 IntRect corner = box->layer()->scrollableArea()->touchResizerCornerR
ect(bounds); |
| 722 corner.moveBy(offset); | 722 corner.moveBy(offset); |
| 723 shouldHandleScrollGestureOnMainThreadRegion.unite(corner); | 723 shouldHandleScrollGestureOnMainThreadRegion.unite(corner); |
| 724 } | 724 } |
| 725 } | 725 } |
| 726 | 726 |
| 727 if (const HashSet<RefPtr<Widget> >* children = frameView->children()) { | 727 if (const WillBeHeapHashSet<RefPtrWillBeMember<Widget> >* children = frameVi
ew->children()) { |
| 728 for (HashSet<RefPtr<Widget> >::const_iterator it = children->begin(), en
d = children->end(); it != end; ++it) { | 728 for (WillBeHeapHashSet<RefPtrWillBeMember<Widget> >::const_iterator it =
children->begin(), end = children->end(); it != end; ++it) { |
| 729 if (!(*it)->isPluginView()) | 729 if (!(*it)->isPluginView()) |
| 730 continue; | 730 continue; |
| 731 | 731 |
| 732 PluginView* pluginView = toPluginView(it->get()); | 732 PluginView* pluginView = toPluginView(it->get()); |
| 733 if (pluginView->wantsWheelEvents()) | 733 if (pluginView->wantsWheelEvents()) |
| 734 shouldHandleScrollGestureOnMainThreadRegion.unite(pluginView->fr
ameRect()); | 734 shouldHandleScrollGestureOnMainThreadRegion.unite(pluginView->fr
ameRect()); |
| 735 } | 735 } |
| 736 } | 736 } |
| 737 | 737 |
| 738 const FrameTree& tree = frame->tree(); | 738 const FrameTree& tree = frame->tree(); |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 969 bool frameIsScrollable = frameView && frameView->isScrollable(); | 969 bool frameIsScrollable = frameView && frameView->isScrollable(); |
| 970 if (frameIsScrollable != m_wasFrameScrollable) | 970 if (frameIsScrollable != m_wasFrameScrollable) |
| 971 return true; | 971 return true; |
| 972 | 972 |
| 973 if (WebLayer* scrollLayer = frameView ? toWebLayer(frameView->layerForScroll
ing()) : 0) | 973 if (WebLayer* scrollLayer = frameView ? toWebLayer(frameView->layerForScroll
ing()) : 0) |
| 974 return blink::WebSize(frameView->contentsSize()) != scrollLayer->bounds(
); | 974 return blink::WebSize(frameView->contentsSize()) != scrollLayer->bounds(
); |
| 975 return false; | 975 return false; |
| 976 } | 976 } |
| 977 | 977 |
| 978 } // namespace blink | 978 } // namespace blink |
| OLD | NEW |