Diff
Modified: trunk/Source/WebCore/ChangeLog (158180 => 158181)
--- trunk/Source/WebCore/ChangeLog 2013-10-29 05:14:42 UTC (rev 158180)
+++ trunk/Source/WebCore/ChangeLog 2013-10-29 05:18:24 UTC (rev 158181)
@@ -1,5 +1,14 @@
2013-10-28 Andreas Kling <[email protected]>
+ applyTextTransform() should take a const RenderStyle&.
+ <https://webkit.org/b/123434>
+
+ This function is always called with an existing RenderStyle object.
+
+ Reviewed by Anders Carlsson.
+
+2013-10-28 Andreas Kling <[email protected]>
+
RenderSVGResource::applyResource() should take a const RenderStyle&.
<https://webkit.org/b/123433>
Modified: trunk/Source/WebCore/rendering/RenderListBox.cpp (158180 => 158181)
--- trunk/Source/WebCore/rendering/RenderListBox.cpp 2013-10-29 05:14:42 UTC (rev 158180)
+++ trunk/Source/WebCore/rendering/RenderListBox.cpp 2013-10-29 05:18:24 UTC (rev 158181)
@@ -128,7 +128,7 @@
}
if (!text.isEmpty()) {
- applyTextTransform(&style(), text, ' ');
+ applyTextTransform(style(), text, ' ');
// FIXME: Why is this always LTR? Can't text direction affect the width?
TextRun textRun = constructTextRun(this, itemFont, text, style(), TextRun::AllowTrailingExpansion);
textRun.disableRoundingHacks();
@@ -396,7 +396,7 @@
itemText = toHTMLOptionElement(listItemElement)->textIndentedToRespectGroupLabel();
else if (isHTMLOptGroupElement(listItemElement))
itemText = toHTMLOptGroupElement(listItemElement)->groupLabelText();
- applyTextTransform(&style(), itemText, ' ');
+ applyTextTransform(style(), itemText, ' ');
Color textColor = listItemElement->renderStyle() ? listItemElement->renderStyle()->visitedDependentColor(CSSPropertyColor) : style().visitedDependentColor(CSSPropertyColor);
if (isOptionElement && toHTMLOptionElement(listItemElement)->selected()) {
Modified: trunk/Source/WebCore/rendering/RenderMenuList.cpp (158180 => 158181)
--- trunk/Source/WebCore/rendering/RenderMenuList.cpp 2013-10-29 05:14:42 UTC (rev 158180)
+++ trunk/Source/WebCore/rendering/RenderMenuList.cpp 2013-10-29 05:18:24 UTC (rev 158181)
@@ -180,7 +180,7 @@
continue;
String text = toHTMLOptionElement(element)->textIndentedToRespectGroupLabel();
- applyTextTransform(&style(), text, ' ');
+ applyTextTransform(style(), text, ' ');
if (theme()->popupOptionSupportsTextIndent()) {
// Add in the option's text indent. We can't calculate percentage values for now.
float optionWidth = 0;
@@ -393,7 +393,7 @@
else if (isHTMLOptionElement(element))
itemString = toHTMLOptionElement(element)->textIndentedToRespectGroupLabel();
- applyTextTransform(&style(), itemString, ' ');
+ applyTextTransform(style(), itemString, ' ');
return itemString;
}
Modified: trunk/Source/WebCore/rendering/RenderText.cpp (158180 => 158181)
--- trunk/Source/WebCore/rendering/RenderText.cpp 2013-10-29 05:14:42 UTC (rev 158180)
+++ trunk/Source/WebCore/rendering/RenderText.cpp 2013-10-29 05:18:24 UTC (rev 158181)
@@ -915,22 +915,19 @@
return prev;
}
-void applyTextTransform(const RenderStyle* style, String& text, UChar previousCharacter)
+void applyTextTransform(const RenderStyle& style, String& text, UChar previousCharacter)
{
- if (!style)
- return;
-
- switch (style->textTransform()) {
+ switch (style.textTransform()) {
case TTNONE:
break;
case CAPITALIZE:
makeCapitalized(&text, previousCharacter);
break;
case UPPERCASE:
- text = text.upper(style->locale());
+ text = text.upper(style.locale());
break;
case LOWERCASE:
- text = text.lower(style->locale());
+ text = text.lower(style.locale());
break;
}
}
@@ -945,7 +942,7 @@
ASSERT(m_text);
- applyTextTransform(&style(), m_text, previousCharacter());
+ applyTextTransform(style(), m_text, previousCharacter());
// We use the same characters here as for list markers.
// See the listMarkerText function in RenderListMarker.cpp.
@@ -1014,7 +1011,7 @@
return text();
String text = originalText();
- applyTextTransform(&style(), text, previousCharacter());
+ applyTextTransform(style(), text, previousCharacter());
return text;
}
Modified: trunk/Source/WebCore/rendering/RenderText.h (158180 => 158181)
--- trunk/Source/WebCore/rendering/RenderText.h 2013-10-29 05:14:42 UTC (rev 158180)
+++ trunk/Source/WebCore/rendering/RenderText.h 2013-10-29 05:18:24 UTC (rev 158181)
@@ -228,7 +228,7 @@
return parent()->firstLineStyle();
}
-void applyTextTransform(const RenderStyle*, String&, UChar);
+void applyTextTransform(const RenderStyle&, String&, UChar);
inline RenderText* Text::renderer() const
{