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

Side by Side Diff: Source/web/WebPluginContainerImpl.cpp

Issue 671813002: Use the stateless GC::fillRect variant when possible. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: minor LayerPainter update 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 | Annotate | Revision Log
« no previous file with comments | « Source/web/WebLocalFrameImpl.cpp ('k') | no next file » | 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. 3 * Copyright (C) 2014 Opera Software ASA. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 } 655 }
656 656
657 void WebPluginContainerImpl::willEndLiveResize() 657 void WebPluginContainerImpl::willEndLiveResize()
658 { 658 {
659 if (m_scrollbarGroup) 659 if (m_scrollbarGroup)
660 m_scrollbarGroup->willEndLiveResize(); 660 m_scrollbarGroup->willEndLiveResize();
661 } 661 }
662 662
663 bool WebPluginContainerImpl::paintCustomOverhangArea(GraphicsContext* context, c onst IntRect& horizontalOverhangArea, const IntRect& verticalOverhangArea, const IntRect& dirtyRect) 663 bool WebPluginContainerImpl::paintCustomOverhangArea(GraphicsContext* context, c onst IntRect& horizontalOverhangArea, const IntRect& verticalOverhangArea, const IntRect& dirtyRect)
664 { 664 {
665 context->save(); 665 Color fillColor(0xCC, 0xCC, 0xCC);
666 context->setFillColor(Color(0xCC, 0xCC, 0xCC)); 666 context->fillRect(intersection(horizontalOverhangArea, dirtyRect), fillColor );
667 context->fillRect(intersection(horizontalOverhangArea, dirtyRect)); 667 context->fillRect(intersection(verticalOverhangArea, dirtyRect), fillColor);
668 context->fillRect(intersection(verticalOverhangArea, dirtyRect));
669 context->restore();
670 return true; 668 return true;
671 } 669 }
672 670
673 // Private methods ------------------------------------------------------------- 671 // Private methods -------------------------------------------------------------
674 672
675 WebPluginContainerImpl::WebPluginContainerImpl(HTMLPlugInElement* element, WebPl ugin* webPlugin) 673 WebPluginContainerImpl::WebPluginContainerImpl(HTMLPlugInElement* element, WebPl ugin* webPlugin)
676 : FrameDestructionObserver(element->document().frame()) 674 : FrameDestructionObserver(element->document().frame())
677 , m_element(element) 675 , m_element(element)
678 , m_webPlugin(webPlugin) 676 , m_webPlugin(webPlugin)
679 , m_webLayer(nullptr) 677 , m_webLayer(nullptr)
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
975 973
976 return clipRect; 974 return clipRect;
977 } 975 }
978 976
979 bool WebPluginContainerImpl::pluginShouldPersist() const 977 bool WebPluginContainerImpl::pluginShouldPersist() const
980 { 978 {
981 return m_webPlugin->shouldPersist(); 979 return m_webPlugin->shouldPersist();
982 } 980 }
983 981
984 } // namespace blink 982 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebLocalFrameImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698