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 1930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1941 | 1941 |
1942 String Internals::getImageSourceURL(Element* element, ExceptionCode& ec) | 1942 String Internals::getImageSourceURL(Element* element, ExceptionCode& ec) |
1943 { | 1943 { |
1944 if (!element) { | 1944 if (!element) { |
1945 ec = INVALID_ACCESS_ERR; | 1945 ec = INVALID_ACCESS_ERR; |
1946 return String(); | 1946 return String(); |
1947 } | 1947 } |
1948 return element->imageSourceURL(); | 1948 return element->imageSourceURL(); |
1949 } | 1949 } |
1950 | 1950 |
| 1951 String Internals::baseURL(Document* document, ExceptionCode& ec) |
| 1952 { |
| 1953 if (!document) { |
| 1954 ec = INVALID_ACCESS_ERR; |
| 1955 return String(); |
| 1956 } |
| 1957 |
| 1958 return document->baseURL().string(); |
| 1959 } |
| 1960 |
1951 bool Internals::isSelectPopupVisible(Node* node) | 1961 bool Internals::isSelectPopupVisible(Node* node) |
1952 { | 1962 { |
1953 if (!isHTMLSelectElement(node)) | 1963 if (!isHTMLSelectElement(node)) |
1954 return false; | 1964 return false; |
1955 | 1965 |
1956 HTMLSelectElement* select = toHTMLSelectElement(node); | 1966 HTMLSelectElement* select = toHTMLSelectElement(node); |
1957 | 1967 |
1958 RenderObject* renderer = select->renderer(); | 1968 RenderObject* renderer = select->renderer(); |
1959 if (!renderer->isMenuList()) | 1969 if (!renderer->isMenuList()) |
1960 return false; | 1970 return false; |
1961 | 1971 |
1962 RenderMenuList* menuList = toRenderMenuList(renderer); | 1972 RenderMenuList* menuList = toRenderMenuList(renderer); |
1963 return menuList->popupIsVisible(); | 1973 return menuList->popupIsVisible(); |
1964 } | 1974 } |
1965 | 1975 |
1966 } | 1976 } |
OLD | NEW |