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

Side by Side Diff: WebCore/rendering/RenderTableCell.cpp

Issue 556023: Merge 53291 - WebCore: Fix for crash with gradient on table cell. Pass the c... (Closed) Base URL: svn://chrome-svn/chrome/branches/WebKit/249s/
Patch Set: Created 10 years, 11 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 | « WebCore/rendering/RenderBoxModelObject.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) 1997 Martin Jones (mjones@kde.org) 2 * Copyright (C) 1997 Martin Jones (mjones@kde.org)
3 * (C) 1997 Torben Weis (weis@kde.org) 3 * (C) 1997 Torben Weis (weis@kde.org)
4 * (C) 1998 Waldo Bastian (bastian@kde.org) 4 * (C) 1998 Waldo Bastian (bastian@kde.org)
5 * (C) 1999 Lars Knoll (knoll@kde.org) 5 * (C) 1999 Lars Knoll (knoll@kde.org)
6 * (C) 1999 Antti Koivisto (koivisto@kde.org) 6 * (C) 1999 Antti Koivisto (koivisto@kde.org)
7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after
824 if (bgLayer->hasImage() || c.isValid()) { 824 if (bgLayer->hasImage() || c.isValid()) {
825 // We have to clip here because the background would paint 825 // We have to clip here because the background would paint
826 // on top of the borders otherwise. This only matters for cells and row s. 826 // on top of the borders otherwise. This only matters for cells and row s.
827 bool shouldClip = backgroundObject->hasLayer() && (backgroundObject == t his || backgroundObject == parent()) && tableElt->collapseBorders(); 827 bool shouldClip = backgroundObject->hasLayer() && (backgroundObject == t his || backgroundObject == parent()) && tableElt->collapseBorders();
828 if (shouldClip) { 828 if (shouldClip) {
829 IntRect clipRect(tx + borderLeft(), ty + borderTop(), 829 IntRect clipRect(tx + borderLeft(), ty + borderTop(),
830 w - borderLeft() - borderRight(), h - borderTop() - borderBottom ()); 830 w - borderLeft() - borderRight(), h - borderTop() - borderBottom ());
831 paintInfo.context->save(); 831 paintInfo.context->save();
832 paintInfo.context->clip(clipRect); 832 paintInfo.context->clip(clipRect);
833 } 833 }
834 paintFillLayers(paintInfo, c, bgLayer, tx, ty, w, h); 834 paintFillLayers(paintInfo, c, bgLayer, tx, ty, w, h, CompositeSourceOver , backgroundObject);
835 if (shouldClip) 835 if (shouldClip)
836 paintInfo.context->restore(); 836 paintInfo.context->restore();
837 } 837 }
838 } 838 }
839 839
840 void RenderTableCell::paintBoxDecorations(PaintInfo& paintInfo, int tx, int ty) 840 void RenderTableCell::paintBoxDecorations(PaintInfo& paintInfo, int tx, int ty)
841 { 841 {
842 RenderTable* tableElt = table(); 842 RenderTable* tableElt = table();
843 if (!tableElt->collapseBorders() && style()->emptyCells() == HIDE && !firstC hild()) 843 if (!tableElt->collapseBorders() && style()->emptyCells() == HIDE && !firstC hild())
844 return; 844 return;
(...skipping 24 matching lines...) Expand all
869 if (!tableElt->collapseBorders() && style()->emptyCells() == HIDE && !firstC hild()) 869 if (!tableElt->collapseBorders() && style()->emptyCells() == HIDE && !firstC hild())
870 return; 870 return;
871 871
872 int w = width(); 872 int w = width();
873 int h = height(); 873 int h = height();
874 874
875 paintMaskImages(paintInfo, tx, ty, w, h); 875 paintMaskImages(paintInfo, tx, ty, w, h);
876 } 876 }
877 877
878 } // namespace WebCore 878 } // namespace WebCore
OLDNEW
« no previous file with comments | « WebCore/rendering/RenderBoxModelObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698