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

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

Issue 13462003: Add support for accelerated fixed root background (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@background-attachment-fixed2
Patch Set: Moved the layout tests. 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
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 1455 matching lines...) Expand 10 before | Expand all | Expand 10 after
1466 } 1466 }
1467 1467
1468 return document->isPageBoxVisible(pageNumber); 1468 return document->isPageBoxVisible(pageNumber);
1469 } 1469 }
1470 1470
1471 String Internals::layerTreeAsText(Document* document, ExceptionCode& ec) const 1471 String Internals::layerTreeAsText(Document* document, ExceptionCode& ec) const
1472 { 1472 {
1473 return layerTreeAsText(document, 0, ec); 1473 return layerTreeAsText(document, 0, ec);
1474 } 1474 }
1475 1475
1476 String Internals::layerTreeAsText(Document* document, unsigned flags, ExceptionC ode& ec) const
1477 {
1478 if (!document || !document->frame()) {
1479 ec = INVALID_ACCESS_ERR;
1480 return String();
1481 }
1482
1483 LayerTreeFlags layerTreeFlags = 0;
1484 if (flags & LAYER_TREE_INCLUDES_VISIBLE_RECTS)
1485 layerTreeFlags |= LayerTreeFlagsIncludeVisibleRects;
1486 if (flags & LAYER_TREE_INCLUDES_TILE_CACHES)
1487 layerTreeFlags |= LayerTreeFlagsIncludeTileCaches;
1488 if (flags & LAYER_TREE_INCLUDES_REPAINT_RECTS)
1489 layerTreeFlags |= LayerTreeFlagsIncludeRepaintRects;
1490 if (flags & LAYER_TREE_INCLUDES_PAINTING_PHASES)
1491 layerTreeFlags |= LayerTreeFlagsIncludePaintingPhases;
1492 if (flags & LAYER_TREE_INCLUDES_ROOT_LAYER)
1493 layerTreeFlags |= LayerTreeFlagsIncludeRootLayer;
1494
1495 return document->frame()->layerTreeAsText(layerTreeFlags);
1496 }
1497
1476 static PassRefPtr<NodeList> paintOrderList(Element* element, ExceptionCode& ec, RenderLayer::PaintOrderListType type) 1498 static PassRefPtr<NodeList> paintOrderList(Element* element, ExceptionCode& ec, RenderLayer::PaintOrderListType type)
1477 { 1499 {
1478 if (!element) { 1500 if (!element) {
1479 ec = INVALID_ACCESS_ERR; 1501 ec = INVALID_ACCESS_ERR;
1480 return 0; 1502 return 0;
1481 } 1503 }
1482 1504
1483 element->document()->updateLayout(); 1505 element->document()->updateLayout();
1484 1506
1485 RenderObject* renderer = element->renderer(); 1507 RenderObject* renderer = element->renderer();
(...skipping 16 matching lines...) Expand all
1502 PassRefPtr<NodeList> Internals::paintOrderListBeforePromote(Element* element, Ex ceptionCode& ec) 1524 PassRefPtr<NodeList> Internals::paintOrderListBeforePromote(Element* element, Ex ceptionCode& ec)
1503 { 1525 {
1504 return paintOrderList(element, ec, RenderLayer::BeforePromote); 1526 return paintOrderList(element, ec, RenderLayer::BeforePromote);
1505 } 1527 }
1506 1528
1507 PassRefPtr<NodeList> Internals::paintOrderListAfterPromote(Element* element, Exc eptionCode& ec) 1529 PassRefPtr<NodeList> Internals::paintOrderListAfterPromote(Element* element, Exc eptionCode& ec)
1508 { 1530 {
1509 return paintOrderList(element, ec, RenderLayer::AfterPromote); 1531 return paintOrderList(element, ec, RenderLayer::AfterPromote);
1510 } 1532 }
1511 1533
1512 String Internals::layerTreeAsText(Document* document, unsigned flags, ExceptionC ode& ec) const
1513 {
1514 if (!document || !document->frame()) {
1515 ec = INVALID_ACCESS_ERR;
1516 return String();
1517 }
1518
1519 LayerTreeFlags layerTreeFlags = 0;
1520 if (flags & LAYER_TREE_INCLUDES_VISIBLE_RECTS)
1521 layerTreeFlags |= LayerTreeFlagsIncludeVisibleRects;
1522 if (flags & LAYER_TREE_INCLUDES_TILE_CACHES)
1523 layerTreeFlags |= LayerTreeFlagsIncludeTileCaches;
1524 if (flags & LAYER_TREE_INCLUDES_REPAINT_RECTS)
1525 layerTreeFlags |= LayerTreeFlagsIncludeRepaintRects;
1526 if (flags & LAYER_TREE_INCLUDES_PAINTING_PHASES)
1527 layerTreeFlags |= LayerTreeFlagsIncludePaintingPhases;
1528
1529 return document->frame()->layerTreeAsText(layerTreeFlags);
1530 }
1531
1532 void Internals::setNeedsCompositedScrolling(Element* element, unsigned needsComp ositedScrolling, ExceptionCode& ec) 1534 void Internals::setNeedsCompositedScrolling(Element* element, unsigned needsComp ositedScrolling, ExceptionCode& ec)
1533 { 1535 {
1534 if (!element) { 1536 if (!element) {
1535 ec = INVALID_ACCESS_ERR; 1537 ec = INVALID_ACCESS_ERR;
1536 return; 1538 return;
1537 } 1539 }
1538 1540
1539 element->document()->updateLayout(); 1541 element->document()->updateLayout();
1540 1542
1541 RenderObject* renderer = element->renderer(); 1543 RenderObject* renderer = element->renderer();
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
1944 1946
1945 RenderObject* renderer = select->renderer(); 1947 RenderObject* renderer = select->renderer();
1946 if (!renderer->isMenuList()) 1948 if (!renderer->isMenuList())
1947 return false; 1949 return false;
1948 1950
1949 RenderMenuList* menuList = toRenderMenuList(renderer); 1951 RenderMenuList* menuList = toRenderMenuList(renderer);
1950 return menuList->popupIsVisible(); 1952 return menuList->popupIsVisible();
1951 } 1953 }
1952 1954
1953 } 1955 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698