Title: [125612] trunk/Source/WebCore
Revision
125612
Author
[email protected]
Date
2012-08-14 15:05:45 -0700 (Tue, 14 Aug 2012)

Log Message

De-inline stuff from RenderStyle.h
https://bugs.webkit.org/show_bug.cgi?id=94019

Patch by Nikhil Bhargava <[email protected]> on 2012-08-14
Reviewed by Eric Seidel.

De-inline things from RenderStyle.h in preparation of fixing a series of
errant includes.

No new tests. Doesn't change functionality

* WebCore.exp.in:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::listStyleImage):
(WebCore::RenderStyle::setListStyleImage):
(WebCore):
(WebCore::RenderStyle::color):
(WebCore::RenderStyle::visitedLinkColor):
(WebCore::RenderStyle::setColor):
(WebCore::RenderStyle::setVisitedLinkColor):
(WebCore::RenderStyle::horizontalBorderSpacing):
(WebCore::RenderStyle::verticalBorderSpacing):
(WebCore::RenderStyle::setHorizontalBorderSpacing):
(WebCore::RenderStyle::setVerticalBorderSpacing):
(WebCore::RenderStyle::font):
(WebCore::RenderStyle::fontMetrics):
(WebCore::RenderStyle::fontDescription):
(WebCore::RenderStyle::fontSize):
(WebCore::RenderStyle::wordSpacing):
(WebCore::RenderStyle::letterSpacing):
(WebCore::RenderStyle::setFontDescription):
(WebCore::RenderStyle::lineHeight):
(WebCore::RenderStyle::setLineHeight):
(WebCore::RenderStyle::computedLineHeight):
(WebCore::RenderStyle::setWordSpacing):
(WebCore::RenderStyle::setLetterSpacing):
* rendering/style/RenderStyle.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (125611 => 125612)


--- trunk/Source/WebCore/ChangeLog	2012-08-14 22:02:19 UTC (rev 125611)
+++ trunk/Source/WebCore/ChangeLog	2012-08-14 22:05:45 UTC (rev 125612)
@@ -1,3 +1,42 @@
+2012-08-14  Nikhil Bhargava  <[email protected]>
+
+        De-inline stuff from RenderStyle.h
+        https://bugs.webkit.org/show_bug.cgi?id=94019
+
+        Reviewed by Eric Seidel.
+
+        De-inline things from RenderStyle.h in preparation of fixing a series of
+        errant includes.
+
+        No new tests. Doesn't change functionality
+
+        * WebCore.exp.in:
+        * rendering/style/RenderStyle.cpp:
+        (WebCore::RenderStyle::listStyleImage):
+        (WebCore::RenderStyle::setListStyleImage):
+        (WebCore):
+        (WebCore::RenderStyle::color):
+        (WebCore::RenderStyle::visitedLinkColor):
+        (WebCore::RenderStyle::setColor):
+        (WebCore::RenderStyle::setVisitedLinkColor):
+        (WebCore::RenderStyle::horizontalBorderSpacing):
+        (WebCore::RenderStyle::verticalBorderSpacing):
+        (WebCore::RenderStyle::setHorizontalBorderSpacing):
+        (WebCore::RenderStyle::setVerticalBorderSpacing):
+        (WebCore::RenderStyle::font):
+        (WebCore::RenderStyle::fontMetrics):
+        (WebCore::RenderStyle::fontDescription):
+        (WebCore::RenderStyle::fontSize):
+        (WebCore::RenderStyle::wordSpacing):
+        (WebCore::RenderStyle::letterSpacing):
+        (WebCore::RenderStyle::setFontDescription):
+        (WebCore::RenderStyle::lineHeight):
+        (WebCore::RenderStyle::setLineHeight):
+        (WebCore::RenderStyle::computedLineHeight):
+        (WebCore::RenderStyle::setWordSpacing):
+        (WebCore::RenderStyle::setLetterSpacing):
+        * rendering/style/RenderStyle.h:
+
 2012-08-14  Andrei Onea  <[email protected]>
 
         [CSSRegions]Region overset property is incorectly computed when content has negative letter spacing and is flowed near to the edge of a region

Modified: trunk/Source/WebCore/WebCore.exp.in (125611 => 125612)


--- trunk/Source/WebCore/WebCore.exp.in	2012-08-14 22:02:19 UTC (rev 125611)
+++ trunk/Source/WebCore/WebCore.exp.in	2012-08-14 22:05:45 UTC (rev 125612)
@@ -1099,7 +1099,9 @@
 __ZNK7WebCore11HistoryItem9urlStringEv
 __ZNK7WebCore11HistoryItem9viewStateEv
 __ZNK7WebCore11RenderLayer19absoluteBoundingBoxEv
+__ZNK7WebCore11RenderStyle11fontMetricsEv
 __ZNK7WebCore11RenderStyle21visitedDependentColorEi
+__ZNK7WebCore11RenderStyle4fontEv
 __ZNK7WebCore11ScriptValue9getStringEPN3JSC9ExecStateERN3WTF6StringE
 __ZNK7WebCore12RenderObject14enclosingLayerEv
 __ZNK7WebCore12RenderObject15localToAbsoluteERKNS_10FloatPointEbb

Modified: trunk/Source/WebCore/rendering/style/RenderStyle.cpp (125611 => 125612)


--- trunk/Source/WebCore/rendering/style/RenderStyle.cpp	2012-08-14 22:02:19 UTC (rev 125611)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.cpp	2012-08-14 22:05:45 UTC (rev 125612)
@@ -942,6 +942,23 @@
     return factor;
 }
 
+StyleImage* RenderStyle::listStyleImage() const { return inherited->list_style_image.get(); }
+void RenderStyle::setListStyleImage(PassRefPtr<StyleImage> v)
+{
+    if (inherited->list_style_image != v)
+        inherited.access()->list_style_image = v;
+}
+
+Color RenderStyle::color() const { return inherited->color; }
+Color RenderStyle::visitedLinkColor() const { return inherited->visitedLinkColor; }
+void RenderStyle::setColor(const Color& v) { SET_VAR(inherited, color, v) };
+void RenderStyle::setVisitedLinkColor(const Color& v) { SET_VAR(inherited, visitedLinkColor, v) }
+
+short RenderStyle::horizontalBorderSpacing() const { return inherited->horizontal_border_spacing; }
+short RenderStyle::verticalBorderSpacing() const { return inherited->vertical_border_spacing; }
+void RenderStyle::setHorizontalBorderSpacing(short v) { SET_VAR(inherited, horizontal_border_spacing, v) }
+void RenderStyle::setVerticalBorderSpacing(short v) { SET_VAR(inherited, vertical_border_spacing, v) }
+
 RoundedRect RenderStyle::getRoundedBorderFor(const LayoutRect& borderRect, RenderView* renderView, bool includeLogicalLeftEdge, bool includeLogicalRightEdge) const
 {
     IntRect snappedBorderRect(pixelSnappedIntRect(borderRect));
@@ -1164,6 +1181,46 @@
     return 0;
 }
 
+const Font& RenderStyle::font() const { return inherited->font; }
+const FontMetrics& RenderStyle::fontMetrics() const { return inherited->font.fontMetrics(); }
+const FontDescription& RenderStyle::fontDescription() const { return inherited->font.fontDescription(); }
+int RenderStyle::fontSize() const { return inherited->font.pixelSize(); }
+
+int RenderStyle::wordSpacing() const { return inherited->font.wordSpacing(); }
+int RenderStyle::letterSpacing() const { return inherited->font.letterSpacing(); }
+
+bool RenderStyle::setFontDescription(const FontDescription& v)
+{
+    if (inherited->font.fontDescription() != v) {
+        inherited.access()->font = Font(v, inherited->font.letterSpacing(), inherited->font.wordSpacing());
+        return true;
+    }
+    return false;
+}
+
+Length RenderStyle::lineHeight() const { return inherited->line_height; }
+void RenderStyle::setLineHeight(Length v) { SET_VAR(inherited, line_height, v); }
+
+int RenderStyle::computedLineHeight(RenderView* renderView) const
+{
+    const Length& lh = inherited->line_height;
+
+    // Negative value means the line height is not set. Use the font's built-in spacing.
+    if (lh.isNegative())
+        return fontMetrics().lineSpacing();
+
+    if (lh.isPercent())
+        return minimumValueForLength(lh, fontSize());
+
+    if (lh.isViewportPercentage())
+        return valueForLength(lh, 0, renderView);
+
+    return lh.value();
+}
+
+void RenderStyle::setWordSpacing(int v) { inherited.access()->font.setWordSpacing(v); }
+void RenderStyle::setLetterSpacing(int v) { inherited.access()->font.setLetterSpacing(v); }
+
 void RenderStyle::setBlendedFontSize(int size)
 {
     FontSelector* currentFontSelector = font().fontSelector();

Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (125611 => 125612)


--- trunk/Source/WebCore/rendering/style/RenderStyle.h	2012-08-14 22:02:19 UTC (rev 125611)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h	2012-08-14 22:05:45 UTC (rev 125612)
@@ -594,18 +594,18 @@
     EClear clear() const { return static_cast<EClear>(noninherited_flags._clear); }
     ETableLayout tableLayout() const { return static_cast<ETableLayout>(noninherited_flags._table_layout); }
 
-    const Font& font() const { return inherited->font; }
-    const FontMetrics& fontMetrics() const { return inherited->font.fontMetrics(); }
-    const FontDescription& fontDescription() const { return inherited->font.fontDescription(); }
-    int fontSize() const { return inherited->font.pixelSize(); }
+    const Font& font() const;
+    const FontMetrics& fontMetrics() const;
+    const FontDescription& fontDescription() const;
+    int fontSize() const;
 
     Length textIndent() const { return rareInheritedData->indent; }
     ETextAlign textAlign() const { return static_cast<ETextAlign>(inherited_flags._text_align); }
     ETextTransform textTransform() const { return static_cast<ETextTransform>(inherited_flags._text_transform); }
     ETextDecoration textDecorationsInEffect() const { return static_cast<ETextDecoration>(inherited_flags._text_decorations); }
     ETextDecoration textDecoration() const { return static_cast<ETextDecoration>(visual->textDecoration); }
-    int wordSpacing() const { return inherited->font.wordSpacing(); }
-    int letterSpacing() const { return inherited->font.letterSpacing(); }
+    int wordSpacing() const;
+    int letterSpacing() const;
 
     float zoom() const { return visual->m_zoom; }
     float effectiveZoom() const { return rareInheritedData->m_effectiveZoom; }
@@ -613,24 +613,9 @@
     TextDirection direction() const { return static_cast<TextDirection>(inherited_flags._direction); }
     bool isLeftToRightDirection() const { return direction() == LTR; }
 
-    Length lineHeight() const { return inherited->line_height; }
-    int computedLineHeight(RenderView* renderView = 0) const
-    {
-        const Length& lh = inherited->line_height;
+    Length lineHeight() const;
+    int computedLineHeight(RenderView* = 0) const;
 
-        // Negative value means the line height is not set.  Use the font's built-in spacing.
-        if (lh.isNegative())
-            return fontMetrics().lineSpacing();
-
-        if (lh.isPercent())
-            return minimumValueForLength(lh, fontSize());
-
-        if (lh.isViewportPercentage())
-            return valueForLength(lh, 0, renderView);
-
-        return lh.value();
-    }
-
     EWhiteSpace whiteSpace() const { return static_cast<EWhiteSpace>(inherited_flags._white_space); }
     static bool autoWrap(EWhiteSpace ws)
     {
@@ -717,8 +702,8 @@
     StyleImage* maskBoxImageSource() const { return rareNonInheritedData->m_maskBoxImage.image(); }
  
     EBorderCollapse borderCollapse() const { return static_cast<EBorderCollapse>(inherited_flags._border_collapse); }
-    short horizontalBorderSpacing() const { return inherited->horizontal_border_spacing; }
-    short verticalBorderSpacing() const { return inherited->vertical_border_spacing; }
+    short horizontalBorderSpacing() const;
+    short verticalBorderSpacing() const;
     EEmptyCell emptyCells() const { return static_cast<EEmptyCell>(inherited_flags._empty_cells); }
     ECaptionSide captionSide() const { return static_cast<ECaptionSide>(inherited_flags._caption_side); }
 
@@ -726,7 +711,7 @@
     short counterReset() const { return rareNonInheritedData->m_counterReset; }
 
     EListStyleType listStyleType() const { return static_cast<EListStyleType>(inherited_flags._list_style_type); }
-    StyleImage* listStyleImage() const { return inherited->list_style_image.get(); }
+    StyleImage* listStyleImage() const;
     EListStylePosition listStylePosition() const { return static_cast<EListStylePosition>(inherited_flags._list_style_position); }
 
     Length marginTop() const { return surround->margin.top(); }
@@ -1116,19 +1101,12 @@
     void setClear(EClear v) { noninherited_flags._clear = v; }
     void setTableLayout(ETableLayout v) { noninherited_flags._table_layout = v; }
 
-    bool setFontDescription(const FontDescription& v)
-    {
-        if (inherited->font.fontDescription() != v) {
-            inherited.access()->font = Font(v, inherited->font.letterSpacing(), inherited->font.wordSpacing());
-            return true;
-        }
-        return false;
-    }
+    bool setFontDescription(const FontDescription&);
 
     // Only used for blending font sizes when animating, or MathML anonymous blocks.
     void setBlendedFontSize(int);
 
-    void setColor(const Color& v) { SET_VAR(inherited, color, v) }
+    void setColor(const Color&);
     void setTextIndent(Length v) { SET_VAR(rareInheritedData, indent, v) }
     void setTextAlign(ETextAlign v) { inherited_flags._text_align = v; }
     void setTextTransform(ETextTransform v) { inherited_flags._text_transform = v; }
@@ -1136,7 +1114,7 @@
     void setTextDecorationsInEffect(ETextDecoration v) { inherited_flags._text_decorations = v; }
     void setTextDecoration(ETextDecoration v) { SET_VAR(visual, textDecoration, v); }
     void setDirection(TextDirection v) { inherited_flags._direction = v; }
-    void setLineHeight(Length v) { SET_VAR(inherited, line_height, v) }
+    void setLineHeight(Length);
     bool setZoom(float);
     void setZoomWithoutReturnValue(float f) { setZoom(f); }
     bool setEffectiveZoom(float);
@@ -1155,8 +1133,8 @@
 
     void setWhiteSpace(EWhiteSpace v) { inherited_flags._white_space = v; }
 
-    void setWordSpacing(int v) { inherited.access()->font.setWordSpacing(v); }
-    void setLetterSpacing(int v) { inherited.access()->font.setLetterSpacing(v); }
+    void setWordSpacing(int);
+    void setLetterSpacing(int);
 
     void clearBackgroundLayers() { m_background.access()->m_background = FillLayer(BackgroundFillLayer); }
     void inheritBackgroundLayers(const FillLayer& parent) { m_background.access()->m_background = parent; }
@@ -1189,8 +1167,8 @@
     void setMaskSize(LengthSize l) { SET_VAR(rareNonInheritedData, m_mask.m_sizeLength, l) }
 
     void setBorderCollapse(EBorderCollapse collapse) { inherited_flags._border_collapse = collapse; }
-    void setHorizontalBorderSpacing(short v) { SET_VAR(inherited, horizontal_border_spacing, v) }
-    void setVerticalBorderSpacing(short v) { SET_VAR(inherited, vertical_border_spacing, v) }
+    void setHorizontalBorderSpacing(short);
+    void setVerticalBorderSpacing(short);
     void setEmptyCells(EEmptyCell v) { inherited_flags._empty_cells = v; }
     void setCaptionSide(ECaptionSide v) { inherited_flags._caption_side = v; }
 
@@ -1201,7 +1179,7 @@
     void setCounterReset(short v) { SET_VAR(rareNonInheritedData, m_counterReset, v) }
 
     void setListStyleType(EListStyleType v) { inherited_flags._list_style_type = v; }
-    void setListStyleImage(PassRefPtr<StyleImage> v) { if (inherited->list_style_image != v) inherited.access()->list_style_image = v; }
+    void setListStyleImage(PassRefPtr<StyleImage>);
     void setListStylePosition(EListStylePosition v) { inherited_flags._list_style_position = v; }
 
     void resetMargin() { SET_VAR(surround, margin, LengthBox(Fixed)) }
@@ -1713,7 +1691,7 @@
     static const FilterOperations& initialFilter() { DEFINE_STATIC_LOCAL(FilterOperations, ops, ()); return ops; }
 #endif
 private:
-    void setVisitedLinkColor(const Color& v) { SET_VAR(inherited, visitedLinkColor, v) }
+    void setVisitedLinkColor(const Color&);
     void setVisitedLinkBackgroundColor(const Color& v) { SET_VAR(rareNonInheritedData, m_visitedLinkBackgroundColor, v) }
     void setVisitedLinkBorderLeftColor(const Color& v) { SET_VAR(rareNonInheritedData, m_visitedLinkBorderLeftColor, v) }
     void setVisitedLinkBorderRightColor(const Color& v) { SET_VAR(rareNonInheritedData, m_visitedLinkBorderRightColor, v) }
@@ -1759,13 +1737,13 @@
     Color borderTopColor() const { return surround->border.top().color(); }
     Color borderBottomColor() const { return surround->border.bottom().color(); }
     Color backgroundColor() const { return m_background->color(); }
-    Color color() const { return inherited->color; }
+    Color color() const;
     Color columnRuleColor() const { return rareNonInheritedData->m_multiCol->m_rule.color(); }
     Color outlineColor() const { return m_background->outline().color(); }
     Color textEmphasisColor() const { return rareInheritedData->textEmphasisColor; }
     Color textFillColor() const { return rareInheritedData->textFillColor; }
     Color textStrokeColor() const { return rareInheritedData->textStrokeColor; }
-    Color visitedLinkColor() const { return inherited->visitedLinkColor; }
+    Color visitedLinkColor() const;
     Color visitedLinkBackgroundColor() const { return rareNonInheritedData->m_visitedLinkBackgroundColor; }
     Color visitedLinkBorderLeftColor() const { return rareNonInheritedData->m_visitedLinkBorderLeftColor; }
     Color visitedLinkBorderRightColor() const { return rareNonInheritedData->m_visitedLinkBorderRightColor; }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to