Skip to content

Commit

Permalink
Bug 1524411 - Null-check kid in nsLayoutUtils::GetFirstLinePosition()…
Browse files Browse the repository at this point in the history
…. r=dholbert

Differential Revision: https://phabricator.services.mozilla.com/D34247

--HG--
extra : moz-landing-system : lando
  • Loading branch information
aethanyc committed Jun 13, 2019
1 parent efb4e81 commit dbbf8bb
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
15 changes: 15 additions & 0 deletions layout/base/crashtests/1524411.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<style>
:not(text) {
break-inside: avoid;
}
* {
columns: 0px;
padding-top: 87px;
}
</style>
<ol style="font: 1em/1 Ahem, sans-serif">
A
A
<li style="rotate:1deg; float:left">
<hr>
A
1 change: 1 addition & 0 deletions layout/base/crashtests/crashtests.list
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,7 @@ load 1510485.html
pref(layout.css.column-span.enabled,true) load 1511535.html
load 1511563.html
pref(layout.css.column-span.enabled,true) load 1524382.html
pref(layout.css.column-span.enabled,true) load 1524411.html
pref(layout.css.column-span.enabled,true) load 1533885.html
pref(layout.css.column-span.enabled,true) load 1534146.html
load 1535945.html
Expand Down
2 changes: 1 addition & 1 deletion layout/base/nsLayoutUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6320,7 +6320,7 @@ bool nsLayoutUtils::GetFirstLinePosition(WritingMode aWM,
LinePosition kidPosition;
nsIFrame* kid = aFrame->PrincipalChildList().FirstChild();
// If aFrame is fieldset, kid might be a legend frame here, but that's ok.
if (GetFirstLinePosition(aWM, kid, &kidPosition)) {
if (kid && GetFirstLinePosition(aWM, kid, &kidPosition)) {
*aResult = kidPosition +
kid->GetLogicalNormalPosition(aWM, aFrame->GetSize()).B(aWM);
return true;
Expand Down

0 comments on commit dbbf8bb

Please sign in to comment.