| 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 1628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1639 return document->isPageBoxVisible(pageNumber); | 1639 return document->isPageBoxVisible(pageNumber); |
| 1640 } | 1640 } |
| 1641 | 1641 |
| 1642 String Internals::layerTreeAsText(Document* document, ExceptionState& exceptionS
tate) const | 1642 String Internals::layerTreeAsText(Document* document, ExceptionState& exceptionS
tate) const |
| 1643 { | 1643 { |
| 1644 return layerTreeAsText(document, 0, exceptionState); | 1644 return layerTreeAsText(document, 0, exceptionState); |
| 1645 } | 1645 } |
| 1646 | 1646 |
| 1647 String Internals::elementLayerTreeAsText(Element* element, ExceptionState& excep
tionState) const | 1647 String Internals::elementLayerTreeAsText(Element* element, ExceptionState& excep
tionState) const |
| 1648 { | 1648 { |
| 1649 DisableCompositingQueryAsserts disabler; | 1649 FrameView* frameView = element->document().view(); |
| 1650 frameView->updateLayoutAndStyleForPainting(); |
| 1651 |
| 1650 return elementLayerTreeAsText(element, 0, exceptionState); | 1652 return elementLayerTreeAsText(element, 0, exceptionState); |
| 1651 } | 1653 } |
| 1652 | 1654 |
| 1653 static PassRefPtr<NodeList> paintOrderList(Element* element, ExceptionState& exc
eptionState, RenderLayerStackingNode::PaintOrderListType type) | 1655 static PassRefPtr<NodeList> paintOrderList(Element* element, ExceptionState& exc
eptionState, RenderLayerStackingNode::PaintOrderListType type) |
| 1654 { | 1656 { |
| 1655 if (!element) { | 1657 if (!element) { |
| 1656 exceptionState.throwDOMException(InvalidAccessError, ExceptionMessages::
argumentNullOrIncorrectType(1, "Element")); | 1658 exceptionState.throwDOMException(InvalidAccessError, ExceptionMessages::
argumentNullOrIncorrectType(1, "Element")); |
| 1657 return nullptr; | 1659 return nullptr; |
| 1658 } | 1660 } |
| 1659 | 1661 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1764 return layer->needsCompositedScrolling(); | 1766 return layer->needsCompositedScrolling(); |
| 1765 } | 1767 } |
| 1766 | 1768 |
| 1767 String Internals::layerTreeAsText(Document* document, unsigned flags, ExceptionS
tate& exceptionState) const | 1769 String Internals::layerTreeAsText(Document* document, unsigned flags, ExceptionS
tate& exceptionState) const |
| 1768 { | 1770 { |
| 1769 if (!document || !document->frame()) { | 1771 if (!document || !document->frame()) { |
| 1770 exceptionState.throwDOMException(InvalidAccessError, document ? "The doc
ument's frame cannot be retrieved." : "The document provided is invalid."); | 1772 exceptionState.throwDOMException(InvalidAccessError, document ? "The doc
ument's frame cannot be retrieved." : "The document provided is invalid."); |
| 1771 return String(); | 1773 return String(); |
| 1772 } | 1774 } |
| 1773 | 1775 |
| 1776 document->view()->updateLayoutAndStyleForPainting(); |
| 1777 |
| 1774 return document->frame()->layerTreeAsText(flags); | 1778 return document->frame()->layerTreeAsText(flags); |
| 1775 } | 1779 } |
| 1776 | 1780 |
| 1777 String Internals::elementLayerTreeAsText(Element* element, unsigned flags, Excep
tionState& exceptionState) const | 1781 String Internals::elementLayerTreeAsText(Element* element, unsigned flags, Excep
tionState& exceptionState) const |
| 1778 { | 1782 { |
| 1779 if (!element) { | 1783 if (!element) { |
| 1780 exceptionState.throwDOMException(InvalidAccessError, ExceptionMessages::
argumentNullOrIncorrectType(1, "Element")); | 1784 exceptionState.throwDOMException(InvalidAccessError, ExceptionMessages::
argumentNullOrIncorrectType(1, "Element")); |
| 1781 return String(); | 1785 return String(); |
| 1782 } | 1786 } |
| 1783 | 1787 |
| (...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2410 } | 2414 } |
| 2411 | 2415 |
| 2412 String Internals::textSurroundingNode(Node* node, int x, int y, unsigned long ma
xLength) | 2416 String Internals::textSurroundingNode(Node* node, int x, int y, unsigned long ma
xLength) |
| 2413 { | 2417 { |
| 2414 blink::WebPoint point(x, y); | 2418 blink::WebPoint point(x, y); |
| 2415 SurroundingText surroundingText(VisiblePosition(node->renderer()->positionFo
rPoint(static_cast<IntPoint>(point))), maxLength); | 2419 SurroundingText surroundingText(VisiblePosition(node->renderer()->positionFo
rPoint(static_cast<IntPoint>(point))), maxLength); |
| 2416 return surroundingText.content(); | 2420 return surroundingText.content(); |
| 2417 } | 2421 } |
| 2418 | 2422 |
| 2419 } | 2423 } |
| OLD | NEW |