| 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 1524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1535 } | 1535 } |
| 1536 | 1536 |
| 1537 return document->isPageBoxVisible(pageNumber); | 1537 return document->isPageBoxVisible(pageNumber); |
| 1538 } | 1538 } |
| 1539 | 1539 |
| 1540 String Internals::layerTreeAsText(Document* document, ExceptionCode& ec) const | 1540 String Internals::layerTreeAsText(Document* document, ExceptionCode& ec) const |
| 1541 { | 1541 { |
| 1542 return layerTreeAsText(document, 0, ec); | 1542 return layerTreeAsText(document, 0, ec); |
| 1543 } | 1543 } |
| 1544 | 1544 |
| 1545 PassRefPtr<NodeList> Internals::paintOrderListBeforePromote(Element* element, Ex
ceptionCode& ec) |
| 1546 { |
| 1547 if (!element) { |
| 1548 ec = INVALID_ACCESS_ERR; |
| 1549 return 0; |
| 1550 } |
| 1551 |
| 1552 element->document()->updateLayout(); |
| 1553 |
| 1554 RenderObject* renderer = element->renderer(); |
| 1555 if (!renderer || !renderer->isBox()) { |
| 1556 ec = INVALID_ACCESS_ERR; |
| 1557 return 0; |
| 1558 } |
| 1559 |
| 1560 RenderLayer* layer = toRenderBox(renderer)->layer(); |
| 1561 if (!layer) { |
| 1562 ec = INVALID_ACCESS_ERR; |
| 1563 return 0; |
| 1564 } |
| 1565 |
| 1566 return layer->paintOrderListBeforePromote(); |
| 1567 } |
| 1568 |
| 1569 PassRefPtr<NodeList> Internals::paintOrderListAfterPromote(Element* element, Exc
eptionCode& ec) |
| 1570 { |
| 1571 if (!element) { |
| 1572 ec = INVALID_ACCESS_ERR; |
| 1573 return 0; |
| 1574 } |
| 1575 |
| 1576 element->document()->updateLayout(); |
| 1577 |
| 1578 RenderObject* renderer = element->renderer(); |
| 1579 if (!renderer || !renderer->isBox()) { |
| 1580 ec = INVALID_ACCESS_ERR; |
| 1581 return 0; |
| 1582 } |
| 1583 |
| 1584 RenderLayer* layer = toRenderBox(renderer)->layer(); |
| 1585 if (!layer) { |
| 1586 ec = INVALID_ACCESS_ERR; |
| 1587 return 0; |
| 1588 } |
| 1589 |
| 1590 return layer->paintOrderListAfterPromote(); |
| 1591 } |
| 1592 |
| 1545 String Internals::layerTreeAsText(Document* document, unsigned flags, ExceptionC
ode& ec) const | 1593 String Internals::layerTreeAsText(Document* document, unsigned flags, ExceptionC
ode& ec) const |
| 1546 { | 1594 { |
| 1547 if (!document || !document->frame()) { | 1595 if (!document || !document->frame()) { |
| 1548 ec = INVALID_ACCESS_ERR; | 1596 ec = INVALID_ACCESS_ERR; |
| 1549 return String(); | 1597 return String(); |
| 1550 } | 1598 } |
| 1551 | 1599 |
| 1552 LayerTreeFlags layerTreeFlags = 0; | 1600 LayerTreeFlags layerTreeFlags = 0; |
| 1553 if (flags & LAYER_TREE_INCLUDES_VISIBLE_RECTS) | 1601 if (flags & LAYER_TREE_INCLUDES_VISIBLE_RECTS) |
| 1554 layerTreeFlags |= LayerTreeFlagsIncludeVisibleRects; | 1602 layerTreeFlags |= LayerTreeFlagsIncludeVisibleRects; |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1934 | 1982 |
| 1935 RenderObject* renderer = select->renderer(); | 1983 RenderObject* renderer = select->renderer(); |
| 1936 if (!renderer->isMenuList()) | 1984 if (!renderer->isMenuList()) |
| 1937 return false; | 1985 return false; |
| 1938 | 1986 |
| 1939 RenderMenuList* menuList = toRenderMenuList(renderer); | 1987 RenderMenuList* menuList = toRenderMenuList(renderer); |
| 1940 return menuList->popupIsVisible(); | 1988 return menuList->popupIsVisible(); |
| 1941 } | 1989 } |
| 1942 | 1990 |
| 1943 } | 1991 } |
| OLD | NEW |