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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 #include "InspectorOverlay.h" | 68 #include "InspectorOverlay.h" |
69 #include "InstrumentingAgents.h" | 69 #include "InstrumentingAgents.h" |
70 #include "InternalSettings.h" | 70 #include "InternalSettings.h" |
71 #include "IntRect.h" | 71 #include "IntRect.h" |
72 #include "Language.h" | 72 #include "Language.h" |
73 #include "MallocStatistics.h" | 73 #include "MallocStatistics.h" |
74 #include "MemoryCache.h" | 74 #include "MemoryCache.h" |
75 #include "MockPagePopupDriver.h" | 75 #include "MockPagePopupDriver.h" |
76 #include "NodeRenderingContext.h" | 76 #include "NodeRenderingContext.h" |
77 #include "Page.h" | 77 #include "Page.h" |
| 78 #include "PaintOrderLists.h" |
78 #include "PrintContext.h" | 79 #include "PrintContext.h" |
79 #include "PseudoElement.h" | 80 #include "PseudoElement.h" |
80 #include "Range.h" | 81 #include "Range.h" |
81 #include "RenderMenuList.h" | 82 #include "RenderMenuList.h" |
82 #include "RenderObject.h" | 83 #include "RenderObject.h" |
83 #include "RenderTreeAsText.h" | 84 #include "RenderTreeAsText.h" |
84 #include "RuntimeEnabledFeatures.h" | 85 #include "RuntimeEnabledFeatures.h" |
85 #include "SchemeRegistry.h" | 86 #include "SchemeRegistry.h" |
86 #include "ScrollingCoordinator.h" | 87 #include "ScrollingCoordinator.h" |
87 #include "SelectRuleFeatureSet.h" | 88 #include "SelectRuleFeatureSet.h" |
(...skipping 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1539 } | 1540 } |
1540 | 1541 |
1541 return document->isPageBoxVisible(pageNumber); | 1542 return document->isPageBoxVisible(pageNumber); |
1542 } | 1543 } |
1543 | 1544 |
1544 String Internals::layerTreeAsText(Document* document, ExceptionCode& ec) const | 1545 String Internals::layerTreeAsText(Document* document, ExceptionCode& ec) const |
1545 { | 1546 { |
1546 return layerTreeAsText(document, 0, ec); | 1547 return layerTreeAsText(document, 0, ec); |
1547 } | 1548 } |
1548 | 1549 |
| 1550 String Internals::paintOrderListsAsText(Element* element, ExceptionCode& ec) |
| 1551 { |
| 1552 if (!element) { |
| 1553 ec = INVALID_ACCESS_ERR; |
| 1554 return String(); |
| 1555 } |
| 1556 |
| 1557 element->document()->updateLayout(); |
| 1558 |
| 1559 RenderObject* renderer = element->renderer(); |
| 1560 if (!renderer || !renderer->isBox()) { |
| 1561 ec = INVALID_ACCESS_ERR; |
| 1562 return String(); |
| 1563 } |
| 1564 |
| 1565 RenderLayer* layer = toRenderBox(renderer)->layer(); |
| 1566 if (!layer) { |
| 1567 ec = INVALID_ACCESS_ERR; |
| 1568 return String(); |
| 1569 } |
| 1570 |
| 1571 return layer->paintOrderListsAsText(); |
| 1572 } |
| 1573 |
| 1574 PassRefPtr<PaintOrderLists> Internals::paintOrderLists(Element* element, Excepti
onCode& ec) |
| 1575 { |
| 1576 if (!element) { |
| 1577 ec = INVALID_ACCESS_ERR; |
| 1578 return 0; |
| 1579 } |
| 1580 |
| 1581 element->document()->updateLayout(); |
| 1582 |
| 1583 RenderObject* renderer = element->renderer(); |
| 1584 if (!renderer || !renderer->isBox()) { |
| 1585 ec = INVALID_ACCESS_ERR; |
| 1586 return 0; |
| 1587 } |
| 1588 |
| 1589 RenderLayer* layer = toRenderBox(renderer)->layer(); |
| 1590 if (!layer) { |
| 1591 ec = INVALID_ACCESS_ERR; |
| 1592 return 0; |
| 1593 } |
| 1594 |
| 1595 return layer->paintOrderLists(); |
| 1596 } |
| 1597 |
1549 String Internals::layerTreeAsText(Document* document, unsigned flags, ExceptionC
ode& ec) const | 1598 String Internals::layerTreeAsText(Document* document, unsigned flags, ExceptionC
ode& ec) const |
1550 { | 1599 { |
1551 if (!document || !document->frame()) { | 1600 if (!document || !document->frame()) { |
1552 ec = INVALID_ACCESS_ERR; | 1601 ec = INVALID_ACCESS_ERR; |
1553 return String(); | 1602 return String(); |
1554 } | 1603 } |
1555 | 1604 |
1556 LayerTreeFlags layerTreeFlags = 0; | 1605 LayerTreeFlags layerTreeFlags = 0; |
1557 if (flags & LAYER_TREE_INCLUDES_VISIBLE_RECTS) | 1606 if (flags & LAYER_TREE_INCLUDES_VISIBLE_RECTS) |
1558 layerTreeFlags |= LayerTreeFlagsIncludeVisibleRects; | 1607 layerTreeFlags |= LayerTreeFlagsIncludeVisibleRects; |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1968 | 2017 |
1969 RenderObject* renderer = select->renderer(); | 2018 RenderObject* renderer = select->renderer(); |
1970 if (!renderer->isMenuList()) | 2019 if (!renderer->isMenuList()) |
1971 return false; | 2020 return false; |
1972 | 2021 |
1973 RenderMenuList* menuList = toRenderMenuList(renderer); | 2022 RenderMenuList* menuList = toRenderMenuList(renderer); |
1974 return menuList->popupIsVisible(); | 2023 return menuList->popupIsVisible(); |
1975 } | 2024 } |
1976 | 2025 |
1977 } | 2026 } |
OLD | NEW |