OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
595 bool WebLocalFrameImpl::isFocused() const { | 595 bool WebLocalFrameImpl::isFocused() const { |
596 if (!viewImpl() || !viewImpl()->page()) | 596 if (!viewImpl() || !viewImpl()->page()) |
597 return false; | 597 return false; |
598 | 598 |
599 return this == WebFrame::fromFrame( | 599 return this == WebFrame::fromFrame( |
600 viewImpl()->page()->focusController().focusedFrame()); | 600 viewImpl()->page()->focusController().focusedFrame()); |
601 } | 601 } |
602 | 602 |
603 WebSize WebLocalFrameImpl::scrollOffset() const { | 603 WebSize WebLocalFrameImpl::scrollOffset() const { |
604 if (ScrollableArea* scrollableArea = layoutViewportScrollableArea()) | 604 if (ScrollableArea* scrollableArea = layoutViewportScrollableArea()) |
605 return toIntSize(scrollableArea->scrollPosition()); | 605 return scrollableArea->scrollOffsetInt(); |
606 return WebSize(); | 606 return WebSize(); |
607 } | 607 } |
608 | 608 |
609 void WebLocalFrameImpl::setScrollOffset(const WebSize& offset) { | 609 void WebLocalFrameImpl::setScrollOffset(const WebSize& offset) { |
610 if (ScrollableArea* scrollableArea = layoutViewportScrollableArea()) | 610 if (ScrollableArea* scrollableArea = layoutViewportScrollableArea()) { |
611 scrollableArea->setScrollPosition(IntPoint(offset.width, offset.height), | 611 scrollableArea->setScrollOffset(ScrollOffset(offset.width, offset.height), |
612 ProgrammaticScroll); | 612 ProgrammaticScroll); |
| 613 } |
613 } | 614 } |
614 | 615 |
615 WebSize WebLocalFrameImpl::contentsSize() const { | 616 WebSize WebLocalFrameImpl::contentsSize() const { |
616 if (FrameView* view = frameView()) | 617 if (FrameView* view = frameView()) |
617 return view->contentsSize(); | 618 return view->contentsSize(); |
618 return WebSize(); | 619 return WebSize(); |
619 } | 620 } |
620 | 621 |
621 bool WebLocalFrameImpl::hasVisibleContent() const { | 622 bool WebLocalFrameImpl::hasVisibleContent() const { |
622 if (LayoutPart* layoutObject = frame()->ownerLayoutObject()) { | 623 if (LayoutPart* layoutObject = frame()->ownerLayoutObject()) { |
(...skipping 1697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2320 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; | 2321 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; |
2321 } else if (metric == "wasAlternateProtocolAvailable") { | 2322 } else if (metric == "wasAlternateProtocolAvailable") { |
2322 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; | 2323 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; |
2323 } else if (metric == "connectionInfo") { | 2324 } else if (metric == "connectionInfo") { |
2324 feature = UseCounter::ChromeLoadTimesConnectionInfo; | 2325 feature = UseCounter::ChromeLoadTimesConnectionInfo; |
2325 } | 2326 } |
2326 UseCounter::count(frame(), feature); | 2327 UseCounter::count(frame(), feature); |
2327 } | 2328 } |
2328 | 2329 |
2329 } // namespace blink | 2330 } // namespace blink |
OLD | NEW |