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

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

Issue 1101793003: Expose minContentWidth/maxContentWidth and a callback for computing them. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: make variable names consistent Created 5 years, 8 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "sky/engine/config.h" 5 #include "sky/engine/config.h"
6 #include "sky/engine/core/rendering/RenderCustomLayout.h" 6 #include "sky/engine/core/rendering/RenderCustomLayout.h"
7 7
8 #include "sky/engine/core/rendering/RenderLayer.h" 8 #include "sky/engine/core/rendering/RenderLayer.h"
9 #include "sky/engine/core/layout/LayoutCallback.h" 9 #include "sky/engine/core/layout/LayoutCallback.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 RenderCustomLayout::RenderCustomLayout(ContainerNode* node) 13 RenderCustomLayout::RenderCustomLayout(ContainerNode* node)
14 : RenderBlock(node) 14 : RenderBlock(node)
15 { 15 {
16 } 16 }
17 17
18 RenderCustomLayout::~RenderCustomLayout() 18 RenderCustomLayout::~RenderCustomLayout()
19 { 19 {
20 } 20 }
21 21
22 void RenderCustomLayout::computePreferredLogicalWidths()
23 {
24 ASSERT(node()->isElementNode());
25 toElement(node())->intrinsicWidthsComputer()->handleEvent();
26 clearPreferredLogicalWidthsDirty();
27 }
28
22 void RenderCustomLayout::layout() 29 void RenderCustomLayout::layout()
23 { 30 {
24 ASSERT(node()->isElementNode()); 31 ASSERT(node()->isElementNode());
25 toElement(node())->layoutManager()->handleEvent(); 32 toElement(node())->layoutManager()->handleEvent();
26 clearNeedsLayout(); 33 clearNeedsLayout();
27 } 34 }
28 35
29 const char* RenderCustomLayout::renderName() const 36 const char* RenderCustomLayout::renderName() const
30 { 37 {
31 return "RenderCustomLayout"; 38 return "RenderCustomLayout";
32 } 39 }
33 40
34 } // namespace blink 41 } // namespace blink
35 42
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698