OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * Copyright (C) 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2013 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
735 if (!s_pagePopupDriver) | 735 if (!s_pagePopupDriver) |
736 s_pagePopupDriver = MockPagePopupDriver::create(page->mainFrame()).leakP
tr(); | 736 s_pagePopupDriver = MockPagePopupDriver::create(page->mainFrame()).leakP
tr(); |
737 page->chrome().client()->setPagePopupDriver(s_pagePopupDriver); | 737 page->chrome().client()->setPagePopupDriver(s_pagePopupDriver); |
738 } | 738 } |
739 | 739 |
740 PassRefPtr<PagePopupController> Internals::pagePopupController() | 740 PassRefPtr<PagePopupController> Internals::pagePopupController() |
741 { | 741 { |
742 return s_pagePopupDriver ? s_pagePopupDriver->pagePopupController() : 0; | 742 return s_pagePopupDriver ? s_pagePopupDriver->pagePopupController() : 0; |
743 } | 743 } |
744 | 744 |
| 745 PassRefPtr<ClientRect> Internals::unscaledViewportRect(ExceptionCode& ec) |
| 746 { |
| 747 Document* document = contextDocument(); |
| 748 if (!document || !document->view()) { |
| 749 ec = INVALID_ACCESS_ERR; |
| 750 return ClientRect::create(); |
| 751 } |
| 752 |
| 753 return ClientRect::create(document->view()->visibleContentRect()); |
| 754 } |
| 755 |
745 PassRefPtr<ClientRect> Internals::absoluteCaretBounds(ExceptionCode& ec) | 756 PassRefPtr<ClientRect> Internals::absoluteCaretBounds(ExceptionCode& ec) |
746 { | 757 { |
747 Document* document = contextDocument(); | 758 Document* document = contextDocument(); |
748 if (!document || !document->frame() || !document->frame()->selection()) { | 759 if (!document || !document->frame() || !document->frame()->selection()) { |
749 ec = INVALID_ACCESS_ERR; | 760 ec = INVALID_ACCESS_ERR; |
750 return ClientRect::create(); | 761 return ClientRect::create(); |
751 } | 762 } |
752 | 763 |
753 return ClientRect::create(document->frame()->selection()->absoluteCaretBound
s()); | 764 return ClientRect::create(document->frame()->selection()->absoluteCaretBound
s()); |
754 } | 765 } |
(...skipping 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1946 | 1957 |
1947 RenderObject* renderer = select->renderer(); | 1958 RenderObject* renderer = select->renderer(); |
1948 if (!renderer->isMenuList()) | 1959 if (!renderer->isMenuList()) |
1949 return false; | 1960 return false; |
1950 | 1961 |
1951 RenderMenuList* menuList = toRenderMenuList(renderer); | 1962 RenderMenuList* menuList = toRenderMenuList(renderer); |
1952 return menuList->popupIsVisible(); | 1963 return menuList->popupIsVisible(); |
1953 } | 1964 } |
1954 | 1965 |
1955 } | 1966 } |
OLD | NEW |