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 1513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1524 if (flags & LAYER_TREE_INCLUDES_TILE_CACHES) | 1524 if (flags & LAYER_TREE_INCLUDES_TILE_CACHES) |
1525 layerTreeFlags |= LayerTreeFlagsIncludeTileCaches; | 1525 layerTreeFlags |= LayerTreeFlagsIncludeTileCaches; |
1526 if (flags & LAYER_TREE_INCLUDES_REPAINT_RECTS) | 1526 if (flags & LAYER_TREE_INCLUDES_REPAINT_RECTS) |
1527 layerTreeFlags |= LayerTreeFlagsIncludeRepaintRects; | 1527 layerTreeFlags |= LayerTreeFlagsIncludeRepaintRects; |
1528 if (flags & LAYER_TREE_INCLUDES_PAINTING_PHASES) | 1528 if (flags & LAYER_TREE_INCLUDES_PAINTING_PHASES) |
1529 layerTreeFlags |= LayerTreeFlagsIncludePaintingPhases; | 1529 layerTreeFlags |= LayerTreeFlagsIncludePaintingPhases; |
1530 | 1530 |
1531 return document->frame()->layerTreeAsText(layerTreeFlags); | 1531 return document->frame()->layerTreeAsText(layerTreeFlags); |
1532 } | 1532 } |
1533 | 1533 |
| 1534 void Internals::setNeedsCompositedScrolling(Element* element, unsigned needsComp
ositedScrolling, ExceptionCode& ec) |
| 1535 { |
| 1536 if (!element) { |
| 1537 ec = INVALID_ACCESS_ERR; |
| 1538 return; |
| 1539 } |
| 1540 |
| 1541 element->document()->updateLayout(); |
| 1542 |
| 1543 RenderObject* renderer = element->renderer(); |
| 1544 if (!renderer || !renderer->isBox()) { |
| 1545 ec = INVALID_ACCESS_ERR; |
| 1546 return; |
| 1547 } |
| 1548 |
| 1549 RenderLayer* layer = toRenderBox(renderer)->layer(); |
| 1550 if (!layer) { |
| 1551 ec = INVALID_ACCESS_ERR; |
| 1552 return; |
| 1553 } |
| 1554 |
| 1555 layer->setForceNeedsCompositedScrolling(static_cast<RenderLayer::ForceNeedsC
ompositedScrollingMode>(needsCompositedScrolling)); |
| 1556 } |
| 1557 |
1534 String Internals::repaintRectsAsText(Document* document, ExceptionCode& ec) cons
t | 1558 String Internals::repaintRectsAsText(Document* document, ExceptionCode& ec) cons
t |
1535 { | 1559 { |
1536 if (!document || !document->frame()) { | 1560 if (!document || !document->frame()) { |
1537 ec = INVALID_ACCESS_ERR; | 1561 ec = INVALID_ACCESS_ERR; |
1538 return String(); | 1562 return String(); |
1539 } | 1563 } |
1540 | 1564 |
1541 return document->frame()->trackedRepaintRectsAsText(); | 1565 return document->frame()->trackedRepaintRectsAsText(); |
1542 } | 1566 } |
1543 | 1567 |
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1922 | 1946 |
1923 RenderObject* renderer = select->renderer(); | 1947 RenderObject* renderer = select->renderer(); |
1924 if (!renderer->isMenuList()) | 1948 if (!renderer->isMenuList()) |
1925 return false; | 1949 return false; |
1926 | 1950 |
1927 RenderMenuList* menuList = toRenderMenuList(renderer); | 1951 RenderMenuList* menuList = toRenderMenuList(renderer); |
1928 return menuList->popupIsVisible(); | 1952 return menuList->popupIsVisible(); |
1929 } | 1953 } |
1930 | 1954 |
1931 } | 1955 } |
OLD | NEW |