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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutTableCell.cpp

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 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
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 16 matching lines...) Expand all
27 #include "core/HTMLNames.h" 27 #include "core/HTMLNames.h"
28 #include "core/css/StylePropertySet.h" 28 #include "core/css/StylePropertySet.h"
29 #include "core/html/HTMLTableCellElement.h" 29 #include "core/html/HTMLTableCellElement.h"
30 #include "core/layout/LayoutAnalyzer.h" 30 #include "core/layout/LayoutAnalyzer.h"
31 #include "core/layout/LayoutTableCol.h" 31 #include "core/layout/LayoutTableCol.h"
32 #include "core/layout/SubtreeLayoutScope.h" 32 #include "core/layout/SubtreeLayoutScope.h"
33 #include "core/paint/TableCellPainter.h" 33 #include "core/paint/TableCellPainter.h"
34 #include "core/style/CollapsedBorderValue.h" 34 #include "core/style/CollapsedBorderValue.h"
35 #include "platform/geometry/FloatQuad.h" 35 #include "platform/geometry/FloatQuad.h"
36 #include "platform/geometry/TransformState.h" 36 #include "platform/geometry/TransformState.h"
37 #include "wtf/PtrUtil.h"
37 38
38 namespace blink { 39 namespace blink {
39 40
40 using namespace HTMLNames; 41 using namespace HTMLNames;
41 42
42 struct SameSizeAsLayoutTableCell : public LayoutBlockFlow { 43 struct SameSizeAsLayoutTableCell : public LayoutBlockFlow {
43 unsigned bitfields; 44 unsigned bitfields;
44 int paddings[2]; 45 int paddings[2];
45 void* pointer; 46 void* pointer;
46 }; 47 };
(...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after
915 computeCollapsedBeforeBorder(), 916 computeCollapsedBeforeBorder(),
916 computeCollapsedAfterBorder() 917 computeCollapsedAfterBorder()
917 }; 918 };
918 919
919 bool changed = false; 920 bool changed = false;
920 if (!newValues.startBorder.isVisible() && !newValues.endBorder.isVisible() & & !newValues.beforeBorder.isVisible() && !newValues.afterBorder.isVisible()) { 921 if (!newValues.startBorder.isVisible() && !newValues.endBorder.isVisible() & & !newValues.beforeBorder.isVisible() && !newValues.afterBorder.isVisible()) {
921 changed = !!m_collapsedBorderValues; 922 changed = !!m_collapsedBorderValues;
922 m_collapsedBorderValues = nullptr; 923 m_collapsedBorderValues = nullptr;
923 } else if (!m_collapsedBorderValues) { 924 } else if (!m_collapsedBorderValues) {
924 changed = true; 925 changed = true;
925 m_collapsedBorderValues = adoptPtr(new CollapsedBorderValues(newValues)) ; 926 m_collapsedBorderValues = wrapUnique(new CollapsedBorderValues(newValues ));
926 } else { 927 } else {
927 // We check visuallyEquals so that the table cell is invalidated only if a changed 928 // We check visuallyEquals so that the table cell is invalidated only if a changed
928 // collapsed border is visible in the first place. 929 // collapsed border is visible in the first place.
929 changed = !m_collapsedBorderValues->startBorder.visuallyEquals(newValues .startBorder) 930 changed = !m_collapsedBorderValues->startBorder.visuallyEquals(newValues .startBorder)
930 || !m_collapsedBorderValues->endBorder.visuallyEquals(newValues.endB order) 931 || !m_collapsedBorderValues->endBorder.visuallyEquals(newValues.endB order)
931 || !m_collapsedBorderValues->beforeBorder.visuallyEquals(newValues.b eforeBorder) 932 || !m_collapsedBorderValues->beforeBorder.visuallyEquals(newValues.b eforeBorder)
932 || !m_collapsedBorderValues->afterBorder.visuallyEquals(newValues.af terBorder); 933 || !m_collapsedBorderValues->afterBorder.visuallyEquals(newValues.af terBorder);
933 if (changed) 934 if (changed)
934 *m_collapsedBorderValues = newValues; 935 *m_collapsedBorderValues = newValues;
935 } 936 }
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
1009 bool LayoutTableCell::backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localR ect) const 1010 bool LayoutTableCell::backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localR ect) const
1010 { 1011 {
1011 // If this object has layer, the area of collapsed borders should be transpa rent 1012 // If this object has layer, the area of collapsed borders should be transpa rent
1012 // to expose the collapsed borders painted on the underlying layer. 1013 // to expose the collapsed borders painted on the underlying layer.
1013 if (hasLayer() && table()->collapseBorders()) 1014 if (hasLayer() && table()->collapseBorders())
1014 return false; 1015 return false;
1015 return LayoutBlockFlow::backgroundIsKnownToBeOpaqueInRect(localRect); 1016 return LayoutBlockFlow::backgroundIsKnownToBeOpaqueInRect(localRect);
1016 } 1017 }
1017 1018
1018 } // namespace blink 1019 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTableCell.h ('k') | third_party/WebKit/Source/core/layout/LayoutTestHelper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698