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

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

Issue 714933002: Set relayoutChildren to 'true' only if size change happens in Table (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: wrong patch Created 6 years, 1 month 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
« no previous file with comments | « Source/core/rendering/compositing/RenderLayerCompositor.cpp ('k') | no next file » | 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 1181 matching lines...) Expand 10 before | Expand all | Expand 10 after
1192 1192
1193 unsigned Internals::touchEventHandlerCount(Document* document) 1193 unsigned Internals::touchEventHandlerCount(Document* document)
1194 { 1194 {
1195 ASSERT(document); 1195 ASSERT(document);
1196 return eventHandlerCount(*document, EventHandlerRegistry::TouchEvent); 1196 return eventHandlerCount(*document, EventHandlerRegistry::TouchEvent);
1197 } 1197 }
1198 1198
1199 static RenderLayer* findRenderLayerForGraphicsLayer(RenderLayer* searchRoot, Gra phicsLayer* graphicsLayer, IntSize* layerOffset, String* layerType) 1199 static RenderLayer* findRenderLayerForGraphicsLayer(RenderLayer* searchRoot, Gra phicsLayer* graphicsLayer, IntSize* layerOffset, String* layerType)
1200 { 1200 {
1201 *layerOffset = IntSize(); 1201 *layerOffset = IntSize();
1202 if (searchRoot->hasCompositedLayerMapping() && graphicsLayer == searchRoot-> compositedLayerMapping()->mainGraphicsLayer()) { 1202
1203 if (searchRoot->compositedLayerMapping() && graphicsLayer == searchRoot->com positedLayerMapping()->mainGraphicsLayer()) {
1203 LayoutRect rect; 1204 LayoutRect rect;
1204 RenderLayer::mapRectToPaintBackingCoordinates(searchRoot->renderer(), re ct); 1205 RenderLayer::mapRectToPaintBackingCoordinates(searchRoot->renderer(), re ct);
1205 *layerOffset = IntSize(rect.x(), rect.y()); 1206 *layerOffset = IntSize(rect.x(), rect.y());
1206 return searchRoot; 1207 return searchRoot;
1207 } 1208 }
1208 1209
1209 GraphicsLayer* layerForScrolling = searchRoot->scrollableArea() ? searchRoot ->scrollableArea()->layerForScrolling() : 0; 1210 GraphicsLayer* layerForScrolling = searchRoot->scrollableArea() ? searchRoot ->scrollableArea()->layerForScrolling() : 0;
1210 if (graphicsLayer == layerForScrolling) { 1211 if (graphicsLayer == layerForScrolling) {
1211 *layerType = "scrolling"; 1212 *layerType = "scrolling";
1212 return searchRoot; 1213 return searchRoot;
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
1585 ASSERT(element); 1586 ASSERT(element);
1586 element->document().updateLayout(); 1587 element->document().updateLayout();
1587 1588
1588 RenderObject* renderer = element->renderer(); 1589 RenderObject* renderer = element->renderer();
1589 if (!renderer || !renderer->isBox()) { 1590 if (!renderer || !renderer->isBox()) {
1590 exceptionState.throwDOMException(InvalidAccessError, renderer ? "The pro vided element's renderer is not a box." : "The provided element has no renderer. "); 1591 exceptionState.throwDOMException(InvalidAccessError, renderer ? "The pro vided element's renderer is not a box." : "The provided element has no renderer. ");
1591 return String(); 1592 return String();
1592 } 1593 }
1593 1594
1594 RenderLayer* layer = toRenderBox(renderer)->layer(); 1595 RenderLayer* layer = toRenderBox(renderer)->layer();
1595 if (!layer 1596 if (!layer)
1596 || !layer->hasCompositedLayerMapping() 1597 return String();
1597 || !layer->compositedLayerMapping()->mainGraphicsLayer()) { 1598
1599 CompositedLayerMapping* compositedLayerMapping = layer->compositedLayerMappi ng();
1600 if (!compositedLayerMapping || !compositedLayerMapping->mainGraphicsLayer()) {
1598 // Don't raise exception in these cases which may be normally used in te sts. 1601 // Don't raise exception in these cases which may be normally used in te sts.
1599 return String(); 1602 return String();
1600 } 1603 }
1601 1604
1602 return layer->compositedLayerMapping()->mainGraphicsLayer()->layerTreeAsText (flags); 1605 return compositedLayerMapping->mainGraphicsLayer()->layerTreeAsText(flags);
1603 } 1606 }
1604 1607
1605 String Internals::scrollingStateTreeAsText(Document*) const 1608 String Internals::scrollingStateTreeAsText(Document*) const
1606 { 1609 {
1607 return String(); 1610 return String();
1608 } 1611 }
1609 1612
1610 String Internals::mainThreadScrollingReasons(Document* document, ExceptionState& exceptionState) const 1613 String Internals::mainThreadScrollingReasons(Document* document, ExceptionState& exceptionState) const
1611 { 1614 {
1612 ASSERT(document); 1615 ASSERT(document);
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
2349 } 2352 }
2350 toHTMLPlugInElement(element)->setPlaceholder(DictionaryPluginPlaceholder::cr eate(element->document(), options)); 2353 toHTMLPlugInElement(element)->setPlaceholder(DictionaryPluginPlaceholder::cr eate(element->document(), options));
2351 } 2354 }
2352 2355
2353 Iterator* Internals::iterator(ScriptState* scriptState, ExceptionState& exceptio nState) 2356 Iterator* Internals::iterator(ScriptState* scriptState, ExceptionState& exceptio nState)
2354 { 2357 {
2355 return new InternalsIterator; 2358 return new InternalsIterator;
2356 } 2359 }
2357 2360
2358 } // namespace blink 2361 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/rendering/compositing/RenderLayerCompositor.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698