|
|
Remove unsafe getFontMetrics methods
Remove the ComputedStyle::getFontMetrics and Font::getFontMetrics helper
methods as they both assume that the primaryFont method always returns a
valid SimpleFontDataObject. That assumption is both incorrect and unsafe
as it can return nullptr in case fallback to the last-resort-font fails.
By replacing the convince calls with explicit calls and null checks that
type of problems becomes more apparent and can be handled appropriately.
R=wkorman@chromium.org
BUG= 655815
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Committed: https://crrev.com/fdcbab80bc37108f6e03d6906f27831228690350
Cr-Commit-Position: refs/heads/master@{#425437}
Total comments: 13
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+376 lines, -155 lines) |
Patch |
 |
M |
third_party/WebKit/Source/core/css/CSSToLengthConversionData.cpp
|
View
|
|
1 chunk |
+9 lines, -4 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/css/resolver/FontBuilder.cpp
|
View
|
|
1 chunk |
+5 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/layout/LayoutBlock.cpp
|
View
|
1
|
2 chunks |
+9 lines, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
|
View
|
|
2 chunks |
+22 lines, -8 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
|
View
|
|
1 chunk |
+5 lines, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
View
|
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/layout/LayoutInline.cpp
|
View
|
1
|
2 chunks |
+17 lines, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/layout/LayoutListBox.cpp
|
View
|
|
1 chunk |
+4 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/layout/LayoutListMarker.cpp
|
View
|
|
7 chunks |
+26 lines, -6 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/layout/LayoutMenuList.cpp
|
View
|
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/layout/LayoutText.cpp
|
View
|
|
3 chunks |
+15 lines, -4 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/layout/LayoutTextControl.cpp
|
View
|
1
|
1 chunk |
+8 lines, -6 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h
|
View
|
|
1 chunk |
+1 line, -5 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/layout/line/InlineBox.cpp
|
View
|
|
1 chunk |
+10 lines, -9 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/layout/line/InlineFlowBox.cpp
|
View
|
|
2 chunks |
+15 lines, -4 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/layout/line/RootInlineBox.cpp
|
View
|
|
1 chunk |
+6 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp
|
View
|
|
2 chunks |
+10 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.cpp
|
View
|
|
2 chunks |
+8 lines, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngineBaseline.cpp
|
View
|
|
2 chunks |
+13 lines, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/layout/svg/SVGTextQuery.cpp
|
View
|
|
2 chunks |
+15 lines, -5 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/layout/svg/line/SVGInlineTextBox.cpp
|
View
|
|
3 chunks |
+21 lines, -9 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/paint/EllipsisBoxPainter.cpp
|
View
|
|
1 chunk |
+5 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/paint/EmbeddedObjectPainter.cpp
|
View
|
|
2 chunks |
+7 lines, -6 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/paint/FileUploadControlPainter.cpp
|
View
|
|
1 chunk |
+7 lines, -5 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp
|
View
|
|
8 chunks |
+37 lines, -17 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/paint/ListMarkerPainter.cpp
|
View
|
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp
|
View
|
|
2 chunks |
+11 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/paint/TextPainter.cpp
|
View
|
|
2 chunks |
+12 lines, -5 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/style/ComputedStyle.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/style/ComputedStyle.cpp
|
View
|
|
2 chunks |
+1 line, -4 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/svg/SVGLengthContext.cpp
|
View
|
|
3 chunks |
+13 lines, -8 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/testing/Internals.cpp
|
View
|
|
1 chunk |
+7 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
|
View
|
|
3 chunks |
+9 lines, -4 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/DragImage.cpp
|
View
|
|
4 chunks |
+16 lines, -7 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/exported/WebFont.cpp
|
View
|
1
|
1 chunk |
+17 lines, -5 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/fonts/Font.h
|
View
|
1
|
2 chunks |
+3 lines, -4 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/web/ExternalPopupMenu.cpp
|
View
|
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
Total messages: 21 (10 generated)
|