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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutPart.cpp

Issue 2181953004: Changed ComputedStyle's EVisibility to be an enum class and fixed naming (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_move_computedstyle_around
Patch Set: Rebase Created 4 years, 4 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Simon Hausmann <hausmann@kde.org> 3 * (C) 2000 Simon Hausmann <hausmann@kde.org>
4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) 4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de)
5 * Copyright (C) 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2009 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 LayoutReplaced::styleDidChange(diff, oldStyle); 222 LayoutReplaced::styleDidChange(diff, oldStyle);
223 Widget* widget = this->widget(); 223 Widget* widget = this->widget();
224 224
225 if (!widget) 225 if (!widget)
226 return; 226 return;
227 227
228 // If the iframe has custom scrollbars, recalculate their style. 228 // If the iframe has custom scrollbars, recalculate their style.
229 if (widget && widget->isFrameView()) 229 if (widget && widget->isFrameView())
230 toFrameView(widget)->recalculateCustomScrollbarStyle(); 230 toFrameView(widget)->recalculateCustomScrollbarStyle();
231 231
232 if (style()->visibility() != VISIBLE) { 232 if (style()->visibility() != EVisibility::Visible) {
233 widget->hide(); 233 widget->hide();
234 } else { 234 } else {
235 widget->show(); 235 widget->show();
236 } 236 }
237 } 237 }
238 238
239 void LayoutPart::layout() 239 void LayoutPart::layout()
240 { 240 {
241 ASSERT(needsLayout()); 241 ASSERT(needsLayout());
242 LayoutAnalyzer::Scope analyzer(*this); 242 LayoutAnalyzer::Scope analyzer(*this);
(...skipping 24 matching lines...) Expand all
267 Widget* widget = this->widget(); 267 Widget* widget = this->widget();
268 if (!widget) 268 if (!widget)
269 return; 269 return;
270 270
271 if (!style()) 271 if (!style())
272 return; 272 return;
273 273
274 if (!needsLayout()) 274 if (!needsLayout())
275 updateWidgetGeometryInternal(); 275 updateWidgetGeometryInternal();
276 276
277 if (style()->visibility() != VISIBLE) { 277 if (style()->visibility() != EVisibility::Visible) {
278 widget->hide(); 278 widget->hide();
279 } else { 279 } else {
280 widget->show(); 280 widget->show();
281 // FIXME: Why do we issue a full paint invalidation in this case, but no t the other? 281 // FIXME: Why do we issue a full paint invalidation in this case, but no t the other?
282 setShouldDoFullPaintInvalidation(); 282 setShouldDoFullPaintInvalidation();
283 } 283 }
284 } 284 }
285 285
286 // Widgets are always placed on integer boundaries, so rounding the size is actu ally 286 // Widgets are always placed on integer boundaries, so rounding the size is actu ally
287 // the desired behavior. This function is here because it's otherwise seldom wha t we 287 // the desired behavior. This function is here because it's otherwise seldom wha t we
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 369
370 bool LayoutPart::isThrottledFrameView() const 370 bool LayoutPart::isThrottledFrameView() const
371 { 371 {
372 if (!widget() || !widget()->isFrameView()) 372 if (!widget() || !widget()->isFrameView())
373 return false; 373 return false;
374 const FrameView* frameView = toFrameView(widget()); 374 const FrameView* frameView = toFrameView(widget());
375 return frameView->shouldThrottleRendering(); 375 return frameView->shouldThrottleRendering();
376 } 376 }
377 377
378 } // namespace blink 378 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698