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

Side by Side Diff: third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp

Issue 2194423002: Schedule animation when setting base background color, rather than forcing an update. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: none 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) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 } 399 }
400 400
401 void WebFrameWidgetImpl::setBaseBackgroundColor(WebColor color) 401 void WebFrameWidgetImpl::setBaseBackgroundColor(WebColor color)
402 { 402 {
403 if (m_baseBackgroundColor == color) 403 if (m_baseBackgroundColor == color)
404 return; 404 return;
405 405
406 m_baseBackgroundColor = color; 406 m_baseBackgroundColor = color;
407 407
408 m_localRoot->frameView()->setBaseBackgroundColor(color); 408 m_localRoot->frameView()->setBaseBackgroundColor(color);
409
410 updateAllLifecyclePhases();
411 } 409 }
412 410
413 void WebFrameWidgetImpl::scheduleAnimation() 411 void WebFrameWidgetImpl::scheduleAnimation()
414 { 412 {
415 if (m_layerTreeView) { 413 if (m_layerTreeView) {
416 m_layerTreeView->setNeedsBeginFrame(); 414 m_layerTreeView->setNeedsBeginFrame();
417 return; 415 return;
418 } 416 }
419 if (m_client) 417 if (m_client)
420 m_client->scheduleAnimation(); 418 m_client->scheduleAnimation();
(...skipping 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after
1461 } 1459 }
1462 1460
1463 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const 1461 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const
1464 { 1462 {
1465 if (!m_imeAcceptEvents) 1463 if (!m_imeAcceptEvents)
1466 return nullptr; 1464 return nullptr;
1467 return focusedLocalFrameInWidget(); 1465 return focusedLocalFrameInWidget();
1468 } 1466 }
1469 1467
1470 } // namespace blink 1468 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | third_party/WebKit/Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698