|| oldStyle->columnSpan() != newStyle->columnSpan()
|| oldStyle->specifiesAutoColumns() != newStyle->specifiesAutoColumns()
|| !oldStyle->contentDataEquivalent(newStyle)
- || oldStyle->hasTextCombine() != newStyle->hasTextCombine()
- || oldStyle->flowThread() != newStyle->flowThread()
- || oldStyle->regionThread() != newStyle->regionThread())
+ || oldStyle->hasTextCombine() != newStyle->hasTextCombine())
return Reattach;
if (*oldStyle == *newStyle)
&& rareInheritedData.get() == other->rareInheritedData.get();
}
-static bool positionedObjectMoved(const LengthBox& a, const LengthBox& b, const Length& width)
+static bool positionedObjectMovedOnly(const LengthBox& a, const LengthBox& b, const Length& width)
{
// If any unit types are different, then we can't guarantee
// that this was just a movement.
return false;
if (!a.top().isIntrinsicOrAuto() && !a.bottom().isIntrinsicOrAuto())
return false;
- // If our width is auto and left or right is specified then this
+ // If our width is auto and left or right is specified and changed then this
// is not just a movement - we need to resize to our container.
- if ((!a.left().isIntrinsicOrAuto() || !a.right().isIntrinsicOrAuto()) && width.isIntrinsicOrAuto())
+ if (width.isIntrinsicOrAuto()
+ && ((!a.left().isIntrinsicOrAuto() && a.left() != b.left())
+ || (!a.right().isIntrinsicOrAuto() && a.right() != b.right())))
return false;
// One of the units is fixed or percent in both directions and stayed
|| rareNonInheritedData->marginAfterCollapse != other->rareNonInheritedData->marginAfterCollapse
|| rareNonInheritedData->lineClamp != other->rareNonInheritedData->lineClamp
|| rareNonInheritedData->textOverflow != other->rareNonInheritedData->textOverflow
- || rareNonInheritedData->m_regionFragment != other->rareNonInheritedData->m_regionFragment
|| rareNonInheritedData->m_wrapFlow != other->rareNonInheritedData->m_wrapFlow
|| rareNonInheritedData->m_wrapThrough != other->rareNonInheritedData->m_wrapThrough
|| rareNonInheritedData->m_shapeMargin != other->rareNonInheritedData->m_shapeMargin
&& *rareNonInheritedData->m_multiCol.get() != *other->rareNonInheritedData->m_multiCol.get())
return StyleDifferenceLayout;
- if (rareNonInheritedData->m_transform.get() != other->rareNonInheritedData->m_transform.get()
- && *rareNonInheritedData->m_transform.get() != *other->rareNonInheritedData->m_transform.get()) {
+ if (!transformDataEquivalent(other)) {
// Don't return early here; instead take note of the type of
// change, and deal with it when looking at compositing.
changedContextSensitiveProperties |= ContextSensitivePropertyTransform;
|| rareInheritedData->m_textOrientation != other->rareInheritedData->m_textOrientation
|| rareInheritedData->m_tabSize != other->rareInheritedData->m_tabSize
|| rareInheritedData->m_lineBoxContain != other->rareInheritedData->m_lineBoxContain
- || rareInheritedData->m_lineGrid != other->rareInheritedData->m_lineGrid
- || rareInheritedData->m_lineSnap != other->rareInheritedData->m_lineSnap
- || rareInheritedData->m_lineAlign != other->rareInheritedData->m_lineAlign
|| rareInheritedData->listStyleImage != other->rareInheritedData->listStyleImage
|| rareInheritedData->textStrokeWidth != other->rareInheritedData->textStrokeWidth)
return StyleDifferenceLayout;
// optimization to work properly.
if (position() != StaticPosition && surround->offset != other->surround->offset) {
// Optimize for the case where a positioned layer is moving but not changing size.
- if (position() == AbsolutePosition && positionedObjectMoved(surround->offset, other->surround->offset, m_box->width()) && repaintOnlyDiff(other, changedContextSensitiveProperties) == StyleDifferenceEqual)
+ if ((position() == AbsolutePosition || position() == FixedPosition)
+ && positionedObjectMovedOnly(surround->offset, other->surround->offset, m_box->width())
+ && repaintOnlyDiff(other, changedContextSensitiveProperties) == StyleDifferenceEqual)
return StyleDifferenceLayoutPositionedMovementOnly;
// FIXME: We would like to use SimplifiedLayout for relative positioning, but we can't quite do that yet.
// We need to make sure SimplifiedLayout can operate correctly on RenderInlines (we will need
const FontDescription& RenderStyle::fontDescription() const { return inherited->font.fontDescription(); }
float RenderStyle::specifiedFontSize() const { return fontDescription().specifiedSize(); }
float RenderStyle::computedFontSize() const { return fontDescription().computedSize(); }
-int RenderStyle::fontSize() const { return inherited->font.pixelSize(); }
+int RenderStyle::fontSize() const { return fontDescription().computedPixelSize(); }
-float RenderStyle::wordSpacing() const { return inherited->font.wordSpacing(); }
-float RenderStyle::letterSpacing() const { return inherited->font.letterSpacing(); }
+float RenderStyle::wordSpacing() const { return fontDescription().wordSpacing(); }
+float RenderStyle::letterSpacing() const { return fontDescription().letterSpacing(); }
bool RenderStyle::setFontDescription(const FontDescription& v)
{
if (inherited->font.fontDescription() != v) {
- inherited.access()->font = Font(v, inherited->font.letterSpacing(), inherited->font.wordSpacing());
+ inherited.access()->font = Font(v);
return true;
}
return false;
return lh.value();
}
-void RenderStyle::setWordSpacing(float v) { inherited.access()->font.setWordSpacing(v); }
-void RenderStyle::setLetterSpacing(float v) { inherited.access()->font.setLetterSpacing(v); }
+void RenderStyle::setWordSpacing(float v) { inherited.access()->font.mutableFontDescription().setWordSpacing(v); }
+void RenderStyle::setLetterSpacing(float v) { inherited.access()->font.mutableFontDescription().setLetterSpacing(v); }
void RenderStyle::setFontSize(float size)
{