diff --git a/layout/generic/nsBulletFrame.cpp b/layout/generic/nsBulletFrame.cpp index 9e49ac81bec9..1642c0a50b5e 100644 --- a/layout/generic/nsBulletFrame.cpp +++ b/layout/generic/nsBulletFrame.cpp @@ -1261,7 +1261,7 @@ nsBulletFrame::GetDesiredSize(nsIPresContext* aCX, } aCX->GetPixelsToTwips(&p2t); bulletSize = NSIntPixelsToTwips(bulletSize, p2t); - mPadding.bottom = ascent / 8; + mPadding.bottom = NSIntPixelsToTwips((nscoord) NSToIntRound((float)ascent / (8.0f * p2t)),p2t); aMetrics.width = mPadding.right + bulletSize; aMetrics.height = mPadding.bottom + bulletSize; aMetrics.ascent = mPadding.bottom + bulletSize; diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp index cc6e2066477b..eeffdb657d05 100644 --- a/layout/generic/nsFrame.cpp +++ b/layout/generic/nsFrame.cpp @@ -4571,14 +4571,25 @@ void DR_State::InitFrameTypeTable() { AddFrameTypeInfo(nsLayoutAtoms::areaFrame, "area", "area"); AddFrameTypeInfo(nsLayoutAtoms::blockFrame, "block", "block"); + AddFrameTypeInfo(nsLayoutAtoms::boxFrame, "box", "box"); AddFrameTypeInfo(nsLayoutAtoms::brFrame, "br", "br"); AddFrameTypeInfo(nsLayoutAtoms::bulletFrame, "bullet", "bullet"); + AddFrameTypeInfo(nsLayoutAtoms::comboBoxFrame, "combo", "comboBox"); + AddFrameTypeInfo(nsLayoutAtoms::fieldSetFrame, "field", "fieldset"); + AddFrameTypeInfo(nsLayoutAtoms::fileControlFrame, "file", "fileControl"); + AddFrameTypeInfo(nsLayoutAtoms::formControlFrame, "form", "form"); AddFrameTypeInfo(nsLayoutAtoms::gfxButtonControlFrame, "button", "gfxButtonControl"); + AddFrameTypeInfo(nsLayoutAtoms::gfxCheckBoxFrame, "check", "gfxCheckBox"); + AddFrameTypeInfo(nsLayoutAtoms::gfxRadioControlFrame, "radio", "gfxRadioControl"); AddFrameTypeInfo(nsLayoutAtoms::hrFrame, "hr", "hr"); AddFrameTypeInfo(nsLayoutAtoms::htmlFrameInnerFrame, "frameI", "htmlFrameInner"); AddFrameTypeInfo(nsLayoutAtoms::htmlFrameOuterFrame, "frameO", "htmlFrameOuter"); AddFrameTypeInfo(nsLayoutAtoms::imageFrame, "img", "image"); + AddFrameTypeInfo(nsLayoutAtoms::imageControlFrame, "imgC", "imageControl"); AddFrameTypeInfo(nsLayoutAtoms::inlineFrame, "inline", "inline"); + AddFrameTypeInfo(nsLayoutAtoms::isIndexFrame, "index", "isIndex"); + AddFrameTypeInfo(nsLayoutAtoms::labelFrame, "label", "label"); + AddFrameTypeInfo(nsLayoutAtoms::legendFrame, "legend", "legend"); AddFrameTypeInfo(nsLayoutAtoms::letterFrame, "letter", "letter"); AddFrameTypeInfo(nsLayoutAtoms::lineFrame, "line", "line"); AddFrameTypeInfo(nsLayoutAtoms::listControlFrame, "select", "select"); @@ -4599,6 +4610,7 @@ void DR_State::InitFrameTypeTable() AddFrameTypeInfo(nsLayoutAtoms::tableRowFrame, "row", "tableRow"); AddFrameTypeInfo(nsLayoutAtoms::textInputFrame, "textCtl", "textInput"); AddFrameTypeInfo(nsLayoutAtoms::textFrame, "text", "text"); + AddFrameTypeInfo(nsLayoutAtoms::textInputFrame, "textInp", "textInput"); AddFrameTypeInfo(nsLayoutAtoms::viewportFrame, "VP", "viewport"); AddFrameTypeInfo(nsnull, "unknown", "unknown"); } diff --git a/layout/html/base/src/nsBulletFrame.cpp b/layout/html/base/src/nsBulletFrame.cpp index 9e49ac81bec9..1642c0a50b5e 100644 --- a/layout/html/base/src/nsBulletFrame.cpp +++ b/layout/html/base/src/nsBulletFrame.cpp @@ -1261,7 +1261,7 @@ nsBulletFrame::GetDesiredSize(nsIPresContext* aCX, } aCX->GetPixelsToTwips(&p2t); bulletSize = NSIntPixelsToTwips(bulletSize, p2t); - mPadding.bottom = ascent / 8; + mPadding.bottom = NSIntPixelsToTwips((nscoord) NSToIntRound((float)ascent / (8.0f * p2t)),p2t); aMetrics.width = mPadding.right + bulletSize; aMetrics.height = mPadding.bottom + bulletSize; aMetrics.ascent = mPadding.bottom + bulletSize; diff --git a/layout/html/base/src/nsFrame.cpp b/layout/html/base/src/nsFrame.cpp index cc6e2066477b..eeffdb657d05 100644 --- a/layout/html/base/src/nsFrame.cpp +++ b/layout/html/base/src/nsFrame.cpp @@ -4571,14 +4571,25 @@ void DR_State::InitFrameTypeTable() { AddFrameTypeInfo(nsLayoutAtoms::areaFrame, "area", "area"); AddFrameTypeInfo(nsLayoutAtoms::blockFrame, "block", "block"); + AddFrameTypeInfo(nsLayoutAtoms::boxFrame, "box", "box"); AddFrameTypeInfo(nsLayoutAtoms::brFrame, "br", "br"); AddFrameTypeInfo(nsLayoutAtoms::bulletFrame, "bullet", "bullet"); + AddFrameTypeInfo(nsLayoutAtoms::comboBoxFrame, "combo", "comboBox"); + AddFrameTypeInfo(nsLayoutAtoms::fieldSetFrame, "field", "fieldset"); + AddFrameTypeInfo(nsLayoutAtoms::fileControlFrame, "file", "fileControl"); + AddFrameTypeInfo(nsLayoutAtoms::formControlFrame, "form", "form"); AddFrameTypeInfo(nsLayoutAtoms::gfxButtonControlFrame, "button", "gfxButtonControl"); + AddFrameTypeInfo(nsLayoutAtoms::gfxCheckBoxFrame, "check", "gfxCheckBox"); + AddFrameTypeInfo(nsLayoutAtoms::gfxRadioControlFrame, "radio", "gfxRadioControl"); AddFrameTypeInfo(nsLayoutAtoms::hrFrame, "hr", "hr"); AddFrameTypeInfo(nsLayoutAtoms::htmlFrameInnerFrame, "frameI", "htmlFrameInner"); AddFrameTypeInfo(nsLayoutAtoms::htmlFrameOuterFrame, "frameO", "htmlFrameOuter"); AddFrameTypeInfo(nsLayoutAtoms::imageFrame, "img", "image"); + AddFrameTypeInfo(nsLayoutAtoms::imageControlFrame, "imgC", "imageControl"); AddFrameTypeInfo(nsLayoutAtoms::inlineFrame, "inline", "inline"); + AddFrameTypeInfo(nsLayoutAtoms::isIndexFrame, "index", "isIndex"); + AddFrameTypeInfo(nsLayoutAtoms::labelFrame, "label", "label"); + AddFrameTypeInfo(nsLayoutAtoms::legendFrame, "legend", "legend"); AddFrameTypeInfo(nsLayoutAtoms::letterFrame, "letter", "letter"); AddFrameTypeInfo(nsLayoutAtoms::lineFrame, "line", "line"); AddFrameTypeInfo(nsLayoutAtoms::listControlFrame, "select", "select"); @@ -4599,6 +4610,7 @@ void DR_State::InitFrameTypeTable() AddFrameTypeInfo(nsLayoutAtoms::tableRowFrame, "row", "tableRow"); AddFrameTypeInfo(nsLayoutAtoms::textInputFrame, "textCtl", "textInput"); AddFrameTypeInfo(nsLayoutAtoms::textFrame, "text", "text"); + AddFrameTypeInfo(nsLayoutAtoms::textInputFrame, "textInp", "textInput"); AddFrameTypeInfo(nsLayoutAtoms::viewportFrame, "VP", "viewport"); AddFrameTypeInfo(nsnull, "unknown", "unknown"); }