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

Side by Side Diff: Source/core/style/FillLayer.cpp

Issue 1145993002: Refactor root element background painting (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 5 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
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 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 } 354 }
355 355
356 return true; 356 return true;
357 } 357 }
358 358
359 bool FillLayer::hasOpaqueImage(const LayoutObject* layoutObject) const 359 bool FillLayer::hasOpaqueImage(const LayoutObject* layoutObject) const
360 { 360 {
361 if (!m_image) 361 if (!m_image)
362 return false; 362 return false;
363 363
364 if (m_composite == CompositeClear || m_composite == CompositeCopy) 364 if (m_composite == CompositeClear)
365 return true; 365 return true;
366 366
367 if (m_blendMode != WebBlendModeNormal) 367 if (m_blendMode != WebBlendModeNormal)
368 return false; 368 return false;
369 369
370 if (m_composite == CompositeCopy)
371 return true;
372
370 if (m_composite == CompositeSourceOver) 373 if (m_composite == CompositeSourceOver)
371 return m_image->knownToBeOpaque(layoutObject); 374 return m_image->knownToBeOpaque(layoutObject);
372 375
373 return false; 376 return false;
374 } 377 }
375 378
376 bool FillLayer::hasRepeatXY() const 379 bool FillLayer::hasRepeatXY() const
377 { 380 {
378 return m_repeatX == RepeatFill && m_repeatY == RepeatFill; 381 return m_repeatX == RepeatFill && m_repeatY == RepeatFill;
379 } 382 }
380 383
381 } // namespace blink 384 } // namespace blink
OLDNEW
« Source/core/paint/BoxPainter.cpp ('K') | « Source/core/paint/ViewPainter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698