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

Side by Side Diff: Source/core/rendering/RenderTextControl.cpp

Issue 547823002: Track reasons for |Node::SetNeedsStyleRecalc| (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: use AtomicString Created 6 years, 2 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 | « Source/core/rendering/RenderObject.cpp ('k') | Source/core/svg/SVGAElement.cpp » ('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) 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
3 * (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 3 * (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 Element* innerEditor = innerEditorElement(); 68 Element* innerEditor = innerEditorElement();
69 if (!innerEditor) 69 if (!innerEditor)
70 return; 70 return;
71 RenderBlock* innerEditorRenderer = toRenderBlock(innerEditor->renderer()); 71 RenderBlock* innerEditorRenderer = toRenderBlock(innerEditor->renderer());
72 if (innerEditorRenderer) { 72 if (innerEditorRenderer) {
73 // We may have set the width and the height in the old style in layout() . 73 // We may have set the width and the height in the old style in layout() .
74 // Reset them now to avoid getting a spurious layout hint. 74 // Reset them now to avoid getting a spurious layout hint.
75 innerEditorRenderer->style()->setHeight(Length()); 75 innerEditorRenderer->style()->setHeight(Length());
76 innerEditorRenderer->style()->setWidth(Length()); 76 innerEditorRenderer->style()->setWidth(Length());
77 innerEditorRenderer->setStyle(createInnerEditorStyle(style())); 77 innerEditorRenderer->setStyle(createInnerEditorStyle(style()));
78 innerEditor->setNeedsStyleRecalc(SubtreeStyleChange); 78 innerEditor->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonFo rTracing::create(StyleChangeReason::Control));
79 } 79 }
80 textFormControlElement()->updatePlaceholderVisibility(false); 80 textFormControlElement()->updatePlaceholderVisibility(false);
81 } 81 }
82 82
83 static inline void updateUserModifyProperty(HTMLTextFormControlElement* node, Re nderStyle* style) 83 static inline void updateUserModifyProperty(HTMLTextFormControlElement* node, Re nderStyle* style)
84 { 84 {
85 style->setUserModify(node->isDisabledOrReadOnly() ? READ_ONLY : READ_WRITE_P LAINTEXT_ONLY); 85 style->setUserModify(node->isDisabledOrReadOnly() ? READ_ONLY : READ_WRITE_P LAINTEXT_ONLY);
86 } 86 }
87 87
88 void RenderTextControl::adjustInnerEditorStyle(RenderStyle* textBlockStyle) cons t 88 void RenderTextControl::adjustInnerEditorStyle(RenderStyle* textBlockStyle) cons t
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 HTMLElement* placeholder = toHTMLTextFormControlElement(node())->placeholder Element(); 294 HTMLElement* placeholder = toHTMLTextFormControlElement(node())->placeholder Element();
295 RenderObject* placeholderRenderer = placeholder ? placeholder->renderer() : 0; 295 RenderObject* placeholderRenderer = placeholder ? placeholder->renderer() : 0;
296 if (!placeholderRenderer) 296 if (!placeholderRenderer)
297 return 0; 297 return 0;
298 if (relayoutChildren) 298 if (relayoutChildren)
299 layoutScope.setChildNeedsLayout(placeholderRenderer); 299 layoutScope.setChildNeedsLayout(placeholderRenderer);
300 return placeholderRenderer; 300 return placeholderRenderer;
301 } 301 }
302 302
303 } // namespace blink 303 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderObject.cpp ('k') | Source/core/svg/SVGAElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698