| OLD | NEW |
| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 #include "core/frame/BrowserControls.h" | 48 #include "core/frame/BrowserControls.h" |
| 49 #include "core/frame/EventHandlerRegistry.h" | 49 #include "core/frame/EventHandlerRegistry.h" |
| 50 #include "core/frame/FrameHost.h" | 50 #include "core/frame/FrameHost.h" |
| 51 #include "core/frame/LocalFrame.h" | 51 #include "core/frame/LocalFrame.h" |
| 52 #include "core/frame/Location.h" | 52 #include "core/frame/Location.h" |
| 53 #include "core/frame/PageScaleConstraintsSet.h" | 53 #include "core/frame/PageScaleConstraintsSet.h" |
| 54 #include "core/frame/PerformanceMonitor.h" | 54 #include "core/frame/PerformanceMonitor.h" |
| 55 #include "core/frame/RemoteFrame.h" | 55 #include "core/frame/RemoteFrame.h" |
| 56 #include "core/frame/RemoteFrameView.h" | 56 #include "core/frame/RemoteFrameView.h" |
| 57 #include "core/frame/Settings.h" | 57 #include "core/frame/Settings.h" |
| 58 #include "core/frame/UseCounter.h" |
| 58 #include "core/frame/VisualViewport.h" | 59 #include "core/frame/VisualViewport.h" |
| 59 #include "core/html/HTMLFrameElement.h" | 60 #include "core/html/HTMLFrameElement.h" |
| 60 #include "core/html/HTMLPlugInElement.h" | 61 #include "core/html/HTMLPlugInElement.h" |
| 61 #include "core/html/TextControlElement.h" | 62 #include "core/html/TextControlElement.h" |
| 62 #include "core/html/parser/TextResourceDecoder.h" | 63 #include "core/html/parser/TextResourceDecoder.h" |
| 63 #include "core/input/EventHandler.h" | 64 #include "core/input/EventHandler.h" |
| 64 #include "core/inspector/InspectorInstrumentation.h" | 65 #include "core/inspector/InspectorInstrumentation.h" |
| 65 #include "core/inspector/InspectorTraceEvents.h" | 66 #include "core/inspector/InspectorTraceEvents.h" |
| 66 #include "core/layout/LayoutAnalyzer.h" | 67 #include "core/layout/LayoutAnalyzer.h" |
| 67 #include "core/layout/LayoutCounter.h" | 68 #include "core/layout/LayoutCounter.h" |
| (...skipping 3681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3749 | 3750 |
| 3750 if (!layerForScrolling()) | 3751 if (!layerForScrolling()) |
| 3751 return; | 3752 return; |
| 3752 WebLayer* layer = layerForScrolling()->platformLayer(); | 3753 WebLayer* layer = layerForScrolling()->platformLayer(); |
| 3753 if (!layer) | 3754 if (!layer) |
| 3754 return; | 3755 return; |
| 3755 layer->setUserScrollable(userInputScrollable(HorizontalScrollbar), | 3756 layer->setUserScrollable(userInputScrollable(HorizontalScrollbar), |
| 3756 userInputScrollable(VerticalScrollbar)); | 3757 userInputScrollable(VerticalScrollbar)); |
| 3757 } | 3758 } |
| 3758 | 3759 |
| 3760 void FrameView::sendScrollbarUseUMA(ScrollbarPart part, |
| 3761 ScrollbarOrientation orientation) { |
| 3762 UseCounter::Feature scrollbarUseUMA; |
| 3763 switch (part) { |
| 3764 case BackButtonStartPart: |
| 3765 case ForwardButtonStartPart: |
| 3766 case BackButtonEndPart: |
| 3767 case ForwardButtonEndPart: |
| 3768 scrollbarUseUMA = |
| 3769 (orientation == VerticalScrollbar |
| 3770 ? UseCounter::ScrollbarUseVerticalScrollbarButton |
| 3771 : UseCounter::ScrollbarUseHorizontalScrollbarButton); |
| 3772 break; |
| 3773 case ThumbPart: |
| 3774 scrollbarUseUMA = |
| 3775 (orientation == VerticalScrollbar |
| 3776 ? UseCounter::ScrollbarUseVerticalScrollbarThumb |
| 3777 : UseCounter::ScrollbarUseHorizontalScrollbarThumb); |
| 3778 break; |
| 3779 case BackTrackPart: |
| 3780 case ForwardTrackPart: |
| 3781 scrollbarUseUMA = |
| 3782 (orientation == VerticalScrollbar |
| 3783 ? UseCounter::ScrollbarUseVerticalScrollbarTrack |
| 3784 : UseCounter::ScrollbarUseHorizontalScrollbarTrack); |
| 3785 break; |
| 3786 default: |
| 3787 return; |
| 3788 } |
| 3789 |
| 3790 UseCounter::count(&frame(), scrollbarUseUMA); |
| 3791 } |
| 3792 |
| 3759 IntSize FrameView::visibleContentSize( | 3793 IntSize FrameView::visibleContentSize( |
| 3760 IncludeScrollbarsInRect scrollbarInclusion) const { | 3794 IncludeScrollbarsInRect scrollbarInclusion) const { |
| 3761 return scrollbarInclusion == ExcludeScrollbars | 3795 return scrollbarInclusion == ExcludeScrollbars |
| 3762 ? excludeScrollbars(frameRect().size()) | 3796 ? excludeScrollbars(frameRect().size()) |
| 3763 : frameRect().size(); | 3797 : frameRect().size(); |
| 3764 } | 3798 } |
| 3765 | 3799 |
| 3766 IntRect FrameView::visibleContentRect( | 3800 IntRect FrameView::visibleContentRect( |
| 3767 IncludeScrollbarsInRect scrollbarInclusion) const { | 3801 IncludeScrollbarsInRect scrollbarInclusion) const { |
| 3768 return IntRect(IntPoint(flooredIntSize(m_scrollOffset)), | 3802 return IntRect(IntPoint(flooredIntSize(m_scrollOffset)), |
| (...skipping 1229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4998 // This is the top-level frame, so no mapping necessary. | 5032 // This is the top-level frame, so no mapping necessary. |
| 4999 if (m_frame->isMainFrame()) | 5033 if (m_frame->isMainFrame()) |
| 5000 return; | 5034 return; |
| 5001 | 5035 |
| 5002 LayoutRect viewportIntersectionRect(remoteViewportIntersection()); | 5036 LayoutRect viewportIntersectionRect(remoteViewportIntersection()); |
| 5003 transformState.move( | 5037 transformState.move( |
| 5004 LayoutSize(-viewportIntersectionRect.x(), -viewportIntersectionRect.y())); | 5038 LayoutSize(-viewportIntersectionRect.x(), -viewportIntersectionRect.y())); |
| 5005 } | 5039 } |
| 5006 | 5040 |
| 5007 } // namespace blink | 5041 } // namespace blink |
| OLD | NEW |