Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Side by Side Diff: Source/core/testing/Internals.cpp

Issue 14858004: Clean up the way layout tests force elements to opt in/out of composited scrolling. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/testing/Internals.h ('k') | Source/core/testing/Internals.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « Source/core/testing/Internals.h ('k') | Source/core/testing/Internals.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698