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

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, adding back TestExpectation Created 5 years, 6 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/core/paint/ViewPainter.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) 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 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 } 361 }
362 362
363 return true; 363 return true;
364 } 364 }
365 365
366 bool FillLayer::hasOpaqueImage(const LayoutObject* layoutObject) const 366 bool FillLayer::hasOpaqueImage(const LayoutObject* layoutObject) const
367 { 367 {
368 if (!m_image) 368 if (!m_image)
369 return false; 369 return false;
370 370
371 // TODO(trchen): Should check blend mode before composite mode.
371 if (m_composite == CompositeClear || m_composite == CompositeCopy) 372 if (m_composite == CompositeClear || m_composite == CompositeCopy)
372 return true; 373 return true;
373 374
374 if (m_blendMode != WebBlendModeNormal) 375 if (m_blendMode != WebBlendModeNormal)
375 return false; 376 return false;
376 377
377 if (m_composite == CompositeSourceOver) 378 if (m_composite == CompositeSourceOver)
378 return m_image->knownToBeOpaque(layoutObject); 379 return m_image->knownToBeOpaque(layoutObject);
379 380
380 return false; 381 return false;
381 } 382 }
382 383
383 bool FillLayer::hasRepeatXY() const 384 bool FillLayer::hasRepeatXY() const
384 { 385 {
385 return m_repeatX == RepeatFill && m_repeatY == RepeatFill; 386 return m_repeatX == RepeatFill && m_repeatY == RepeatFill;
386 } 387 }
387 388
388 } // namespace blink 389 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/paint/ViewPainter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698