| 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 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 625 ec = INVALID_ACCESS_ERR; | 625 ec = INVALID_ACCESS_ERR; |
| 626 return 0; | 626 return 0; |
| 627 } | 627 } |
| 628 | 628 |
| 629 if (ElementShadow* shadow = host->shadow()) | 629 if (ElementShadow* shadow = host->shadow()) |
| 630 return shadow->youngestShadowRoot(); | 630 return shadow->youngestShadowRoot(); |
| 631 | 631 |
| 632 return host->createShadowRoot(ec).get(); | 632 return host->createShadowRoot(ec).get(); |
| 633 } | 633 } |
| 634 | 634 |
| 635 ShadowRoot* Internals::createShadowRoot(Element* host, ExceptionCode& ec) | |
| 636 { | |
| 637 if (!host) { | |
| 638 ec = INVALID_ACCESS_ERR; | |
| 639 return 0; | |
| 640 } | |
| 641 return host->createShadowRoot(ec).get(); | |
| 642 } | |
| 643 | |
| 644 ShadowRoot* Internals::shadowRoot(Element* host, ExceptionCode& ec) | 635 ShadowRoot* Internals::shadowRoot(Element* host, ExceptionCode& ec) |
| 645 { | 636 { |
| 646 // FIXME: Internals::shadowRoot() in tests should be converted to youngestSh
adowRoot() or oldestShadowRoot(). | 637 // FIXME: Internals::shadowRoot() in tests should be converted to youngestSh
adowRoot() or oldestShadowRoot(). |
| 647 // https://bugs.webkit.org/show_bug.cgi?id=78465 | 638 // https://bugs.webkit.org/show_bug.cgi?id=78465 |
| 648 return youngestShadowRoot(host, ec); | 639 return youngestShadowRoot(host, ec); |
| 649 } | 640 } |
| 650 | 641 |
| 651 ShadowRoot* Internals::youngestShadowRoot(Element* host, ExceptionCode& ec) | 642 ShadowRoot* Internals::youngestShadowRoot(Element* host, ExceptionCode& ec) |
| 652 { | 643 { |
| 653 if (!host) { | 644 if (!host) { |
| (...skipping 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1993 | 1984 |
| 1994 RenderObject* renderer = select->renderer(); | 1985 RenderObject* renderer = select->renderer(); |
| 1995 if (!renderer->isMenuList()) | 1986 if (!renderer->isMenuList()) |
| 1996 return false; | 1987 return false; |
| 1997 | 1988 |
| 1998 RenderMenuList* menuList = toRenderMenuList(renderer); | 1989 RenderMenuList* menuList = toRenderMenuList(renderer); |
| 1999 return menuList->popupIsVisible(); | 1990 return menuList->popupIsVisible(); |
| 2000 } | 1991 } |
| 2001 | 1992 |
| 2002 } | 1993 } |
| OLD | NEW |