| 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 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 598 bool WebLocalFrameImpl::isFocused() const { | 598 bool WebLocalFrameImpl::isFocused() const { |
| 599 if (!viewImpl() || !viewImpl()->page()) | 599 if (!viewImpl() || !viewImpl()->page()) |
| 600 return false; | 600 return false; |
| 601 | 601 |
| 602 return this == WebFrame::fromFrame( | 602 return this == WebFrame::fromFrame( |
| 603 viewImpl()->page()->focusController().focusedFrame()); | 603 viewImpl()->page()->focusController().focusedFrame()); |
| 604 } | 604 } |
| 605 | 605 |
| 606 WebSize WebLocalFrameImpl::scrollOffset() const { | 606 WebSize WebLocalFrameImpl::scrollOffset() const { |
| 607 if (ScrollableArea* scrollableArea = layoutViewportScrollableArea()) | 607 if (ScrollableArea* scrollableArea = layoutViewportScrollableArea()) |
| 608 return toIntSize(scrollableArea->scrollPosition()); | 608 return scrollableArea->scrollOffsetInt(); |
| 609 return WebSize(); | 609 return WebSize(); |
| 610 } | 610 } |
| 611 | 611 |
| 612 void WebLocalFrameImpl::setScrollOffset(const WebSize& offset) { | 612 void WebLocalFrameImpl::setScrollOffset(const WebSize& offset) { |
| 613 if (ScrollableArea* scrollableArea = layoutViewportScrollableArea()) | 613 if (ScrollableArea* scrollableArea = layoutViewportScrollableArea()) { |
| 614 scrollableArea->setScrollPosition(IntPoint(offset.width, offset.height), | 614 scrollableArea->setScrollOffset(ScrollOffset(offset.width, offset.height), |
| 615 ProgrammaticScroll); | 615 ProgrammaticScroll); |
| 616 } |
| 616 } | 617 } |
| 617 | 618 |
| 618 WebSize WebLocalFrameImpl::contentsSize() const { | 619 WebSize WebLocalFrameImpl::contentsSize() const { |
| 619 if (FrameView* view = frameView()) | 620 if (FrameView* view = frameView()) |
| 620 return view->contentsSize(); | 621 return view->contentsSize(); |
| 621 return WebSize(); | 622 return WebSize(); |
| 622 } | 623 } |
| 623 | 624 |
| 624 bool WebLocalFrameImpl::hasVisibleContent() const { | 625 bool WebLocalFrameImpl::hasVisibleContent() const { |
| 625 if (LayoutPart* layoutObject = frame()->ownerLayoutObject()) { | 626 if (LayoutPart* layoutObject = frame()->ownerLayoutObject()) { |
| (...skipping 1713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2339 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; | 2340 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; |
| 2340 } else if (metric == "wasAlternateProtocolAvailable") { | 2341 } else if (metric == "wasAlternateProtocolAvailable") { |
| 2341 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; | 2342 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; |
| 2342 } else if (metric == "connectionInfo") { | 2343 } else if (metric == "connectionInfo") { |
| 2343 feature = UseCounter::ChromeLoadTimesConnectionInfo; | 2344 feature = UseCounter::ChromeLoadTimesConnectionInfo; |
| 2344 } | 2345 } |
| 2345 UseCounter::count(frame(), feature); | 2346 UseCounter::count(frame(), feature); |
| 2346 } | 2347 } |
| 2347 | 2348 |
| 2348 } // namespace blink | 2349 } // namespace blink |
| OLD | NEW |