| 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 1582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1593 | 1593 |
| 1594 element->document()->updateLayout(); | 1594 element->document()->updateLayout(); |
| 1595 | 1595 |
| 1596 RenderObject* renderer = element->renderer(); | 1596 RenderObject* renderer = element->renderer(); |
| 1597 if (!renderer || !renderer->isBox()) { | 1597 if (!renderer || !renderer->isBox()) { |
| 1598 ec = InvalidAccessError; | 1598 ec = InvalidAccessError; |
| 1599 return String(); | 1599 return String(); |
| 1600 } | 1600 } |
| 1601 | 1601 |
| 1602 RenderLayer* layer = toRenderBox(renderer)->layer(); | 1602 RenderLayer* layer = toRenderBox(renderer)->layer(); |
| 1603 if (!layer) { | 1603 if (!layer |
| 1604 ec = InvalidAccessError; | 1604 || !layer->backing() |
| 1605 return String(); | 1605 || !layer->backing()->graphicsLayer()) { |
| 1606 } | |
| 1607 | |
| 1608 if (!layer->backing() || !layer->backing()->graphicsLayer()) { | |
| 1609 // Don't raise exception in these cases which may be normally used in te
sts. | 1606 // Don't raise exception in these cases which may be normally used in te
sts. |
| 1610 return String(); | 1607 return String(); |
| 1611 } | 1608 } |
| 1612 | 1609 |
| 1613 return layer->backing()->graphicsLayer()->layerTreeAsText(flags); | 1610 return layer->backing()->graphicsLayer()->layerTreeAsText(flags); |
| 1614 } | 1611 } |
| 1615 | 1612 |
| 1616 void Internals::setNeedsCompositedScrolling(Element* element, unsigned needsComp
ositedScrolling, ExceptionCode& ec) | 1613 void Internals::setNeedsCompositedScrolling(Element* element, unsigned needsComp
ositedScrolling, ExceptionCode& ec) |
| 1617 { | 1614 { |
| 1618 if (!element) { | 1615 if (!element) { |
| (...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2049 | 2046 |
| 2050 RenderObject* renderer = select->renderer(); | 2047 RenderObject* renderer = select->renderer(); |
| 2051 if (!renderer->isMenuList()) | 2048 if (!renderer->isMenuList()) |
| 2052 return false; | 2049 return false; |
| 2053 | 2050 |
| 2054 RenderMenuList* menuList = toRenderMenuList(renderer); | 2051 RenderMenuList* menuList = toRenderMenuList(renderer); |
| 2055 return menuList->popupIsVisible(); | 2052 return menuList->popupIsVisible(); |
| 2056 } | 2053 } |
| 2057 | 2054 |
| 2058 } | 2055 } |
| OLD | NEW |