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