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 1514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1525 } | 1525 } |
1526 | 1526 |
1527 return document->isPageBoxVisible(pageNumber); | 1527 return document->isPageBoxVisible(pageNumber); |
1528 } | 1528 } |
1529 | 1529 |
1530 String Internals::layerTreeAsText(Document* document, ExceptionCode& ec) const | 1530 String Internals::layerTreeAsText(Document* document, ExceptionCode& ec) const |
1531 { | 1531 { |
1532 return layerTreeAsText(document, 0, ec); | 1532 return layerTreeAsText(document, 0, ec); |
1533 } | 1533 } |
1534 | 1534 |
| 1535 static PassRefPtr<NodeList> paintOrderList(Element* element, ExceptionCode& ec,
RenderLayer::PaintOrderListType type) |
| 1536 { |
| 1537 if (!element) { |
| 1538 ec = INVALID_ACCESS_ERR; |
| 1539 return 0; |
| 1540 } |
| 1541 |
| 1542 element->document()->updateLayout(); |
| 1543 |
| 1544 RenderObject* renderer = element->renderer(); |
| 1545 if (!renderer || !renderer->isBox()) { |
| 1546 ec = INVALID_ACCESS_ERR; |
| 1547 return 0; |
| 1548 } |
| 1549 |
| 1550 RenderLayer* layer = toRenderBox(renderer)->layer(); |
| 1551 if (!layer) { |
| 1552 ec = INVALID_ACCESS_ERR; |
| 1553 return 0; |
| 1554 } |
| 1555 |
| 1556 return layer->paintOrderList(type); |
| 1557 } |
| 1558 |
| 1559 PassRefPtr<NodeList> Internals::paintOrderListBeforePromote(Element* element, Ex
ceptionCode& ec) |
| 1560 { |
| 1561 return paintOrderList(element, ec, RenderLayer::BeforePromote); |
| 1562 } |
| 1563 |
| 1564 PassRefPtr<NodeList> Internals::paintOrderListAfterPromote(Element* element, Exc
eptionCode& ec) |
| 1565 { |
| 1566 return paintOrderList(element, ec, RenderLayer::AfterPromote); |
| 1567 } |
| 1568 |
1535 String Internals::layerTreeAsText(Document* document, unsigned flags, ExceptionC
ode& ec) const | 1569 String Internals::layerTreeAsText(Document* document, unsigned flags, ExceptionC
ode& ec) const |
1536 { | 1570 { |
1537 if (!document || !document->frame()) { | 1571 if (!document || !document->frame()) { |
1538 ec = INVALID_ACCESS_ERR; | 1572 ec = INVALID_ACCESS_ERR; |
1539 return String(); | 1573 return String(); |
1540 } | 1574 } |
1541 | 1575 |
1542 LayerTreeFlags layerTreeFlags = 0; | 1576 LayerTreeFlags layerTreeFlags = 0; |
1543 if (flags & LAYER_TREE_INCLUDES_VISIBLE_RECTS) | 1577 if (flags & LAYER_TREE_INCLUDES_VISIBLE_RECTS) |
1544 layerTreeFlags |= LayerTreeFlagsIncludeVisibleRects; | 1578 layerTreeFlags |= LayerTreeFlagsIncludeVisibleRects; |
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1923 | 1957 |
1924 RenderObject* renderer = select->renderer(); | 1958 RenderObject* renderer = select->renderer(); |
1925 if (!renderer->isMenuList()) | 1959 if (!renderer->isMenuList()) |
1926 return false; | 1960 return false; |
1927 | 1961 |
1928 RenderMenuList* menuList = toRenderMenuList(renderer); | 1962 RenderMenuList* menuList = toRenderMenuList(renderer); |
1929 return menuList->popupIsVisible(); | 1963 return menuList->popupIsVisible(); |
1930 } | 1964 } |
1931 | 1965 |
1932 } | 1966 } |
OLD | NEW |