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

Side by Side Diff: sky/engine/core/rendering/RenderObject.cpp

Issue 865383003: Consolidate callers to scheduleVisualUpdate. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « sky/engine/core/rendering/RenderObject.h ('k') | sky/engine/platform/RuntimeEnabledFeatures.in » ('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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 1921 matching lines...) Expand 10 before | Expand all | Expand 10 after
1932 } 1932 }
1933 1933
1934 void RenderObject::imageChanged(ImageResource* image, const IntRect* rect) 1934 void RenderObject::imageChanged(ImageResource* image, const IntRect* rect)
1935 { 1935 {
1936 imageChanged(static_cast<WrappedImagePtr>(image), rect); 1936 imageChanged(static_cast<WrappedImagePtr>(image), rect);
1937 } 1937 }
1938 1938
1939 void RenderObject::imageChanged(WrappedImagePtr, const IntRect*) 1939 void RenderObject::imageChanged(WrappedImagePtr, const IntRect*)
1940 { 1940 {
1941 if (parent()) 1941 if (parent())
1942 scheduleVisualUpdate(); 1942 document().scheduleVisualUpdate();
1943 } 1943 }
1944 1944
1945 Element* RenderObject::offsetParent() const 1945 Element* RenderObject::offsetParent() const
1946 { 1946 {
1947 if (isDocumentElement()) 1947 if (isDocumentElement())
1948 return 0; 1948 return 0;
1949 1949
1950 Node* node = 0; 1950 Node* node = 0;
1951 for (RenderObject* ancestor = parent(); ancestor; ancestor = ancestor->paren t()) { 1951 for (RenderObject* ancestor = parent(); ancestor; ancestor = ancestor->paren t()) {
1952 // Spec: http://www.w3.org/TR/cssom-view/#offset-attributes 1952 // Spec: http://www.w3.org/TR/cssom-view/#offset-attributes
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
2040 { 2040 {
2041 ASSERT_NOT_REACHED(); 2041 ASSERT_NOT_REACHED();
2042 return false; 2042 return false;
2043 } 2043 }
2044 2044
2045 bool RenderObject::isRelayoutBoundaryForInspector() const 2045 bool RenderObject::isRelayoutBoundaryForInspector() const
2046 { 2046 {
2047 return objectIsRelayoutBoundary(this); 2047 return objectIsRelayoutBoundary(this);
2048 } 2048 }
2049 2049
2050 void RenderObject::scheduleVisualUpdate()
2051 {
2052 frame()->page()->animator().scheduleVisualUpdate();
2053 }
2054
2055 bool RenderObject::isAllowedToModifyRenderTreeStructure(Document& document) 2050 bool RenderObject::isAllowedToModifyRenderTreeStructure(Document& document)
2056 { 2051 {
2057 return document.lifecycle().stateAllowsRenderTreeMutations(); 2052 return document.lifecycle().stateAllowsRenderTreeMutations();
2058 } 2053 }
2059 2054
2060 } // namespace blink 2055 } // namespace blink
2061 2056
2062 #ifndef NDEBUG 2057 #ifndef NDEBUG
2063 2058
2064 void showTree(const blink::RenderObject* object) 2059 void showTree(const blink::RenderObject* object)
(...skipping 17 matching lines...) Expand all
2082 { 2077 {
2083 if (object1) { 2078 if (object1) {
2084 const blink::RenderObject* root = object1; 2079 const blink::RenderObject* root = object1;
2085 while (root->parent()) 2080 while (root->parent())
2086 root = root->parent(); 2081 root = root->parent();
2087 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 2082 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
2088 } 2083 }
2089 } 2084 }
2090 2085
2091 #endif 2086 #endif
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderObject.h ('k') | sky/engine/platform/RuntimeEnabledFeatures.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698