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 1877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1888 frame()->loader()->reload(endToEnd); | 1888 frame()->loader()->reload(endToEnd); |
1889 } | 1889 } |
1890 | 1890 |
1891 #if ENABLE(ENCRYPTED_MEDIA_V2) | 1891 #if ENABLE(ENCRYPTED_MEDIA_V2) |
1892 void Internals::initializeMockCDM() | 1892 void Internals::initializeMockCDM() |
1893 { | 1893 { |
1894 CDM::registerCDMFactory(MockCDM::create, MockCDM::supportsKeySytem); | 1894 CDM::registerCDMFactory(MockCDM::create, MockCDM::supportsKeySytem); |
1895 } | 1895 } |
1896 #endif | 1896 #endif |
1897 | 1897 |
| 1898 PassRefPtr<ClientRect> Internals::selectionBounds(ExceptionCode& ec) |
| 1899 { |
| 1900 Document* document = contextDocument(); |
| 1901 if (!document || !document->frame() || !document->frame()->selection()) { |
| 1902 ec = INVALID_ACCESS_ERR; |
| 1903 return 0; |
| 1904 } |
| 1905 |
| 1906 return ClientRect::create(document->frame()->selection()->bounds()); |
| 1907 } |
| 1908 |
1898 String Internals::markerTextForListItem(Element* element, ExceptionCode& ec) | 1909 String Internals::markerTextForListItem(Element* element, ExceptionCode& ec) |
1899 { | 1910 { |
1900 if (!element) { | 1911 if (!element) { |
1901 ec = INVALID_ACCESS_ERR; | 1912 ec = INVALID_ACCESS_ERR; |
1902 return String(); | 1913 return String(); |
1903 } | 1914 } |
1904 return WebCore::markerTextForListItem(element); | 1915 return WebCore::markerTextForListItem(element); |
1905 } | 1916 } |
1906 | 1917 |
1907 String Internals::getImageSourceURL(Element* element, ExceptionCode& ec) | 1918 String Internals::getImageSourceURL(Element* element, ExceptionCode& ec) |
(...skipping 14 matching lines...) Expand all Loading... |
1922 | 1933 |
1923 RenderObject* renderer = select->renderer(); | 1934 RenderObject* renderer = select->renderer(); |
1924 if (!renderer->isMenuList()) | 1935 if (!renderer->isMenuList()) |
1925 return false; | 1936 return false; |
1926 | 1937 |
1927 RenderMenuList* menuList = toRenderMenuList(renderer); | 1938 RenderMenuList* menuList = toRenderMenuList(renderer); |
1928 return menuList->popupIsVisible(); | 1939 return menuList->popupIsVisible(); |
1929 } | 1940 } |
1930 | 1941 |
1931 } | 1942 } |
OLD | NEW |