Title: [161774] trunk/Source/WebCore
Revision
161774
Author
[email protected]
Date
2014-01-11 12:03:42 -0800 (Sat, 11 Jan 2014)

Log Message

[iOS] Fix the easy half of the build errors in RenderBlock.cpp

* rendering/RenderBlock.cpp:
(WebCore::isNonBlocksOrNonFixedHeightListItems):
(WebCore::oneLineTextMultiplier):
(WebCore::textMultiplier):
(WebCore::RenderBlock::adjustComputedFontSizes):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (161773 => 161774)


--- trunk/Source/WebCore/ChangeLog	2014-01-11 19:56:38 UTC (rev 161773)
+++ trunk/Source/WebCore/ChangeLog	2014-01-11 20:03:42 UTC (rev 161774)
@@ -1,3 +1,13 @@
+2014-01-11  David Kilzer  <[email protected]>
+
+        [iOS] Fix the easy half of the build errors in RenderBlock.cpp
+
+        * rendering/RenderBlock.cpp:
+        (WebCore::isNonBlocksOrNonFixedHeightListItems):
+        (WebCore::oneLineTextMultiplier):
+        (WebCore::textMultiplier):
+        (WebCore::RenderBlock::adjustComputedFontSizes):
+
 2014-01-11  Simon Fraser  <[email protected]>
 
         Change touch-related headers to include WebKitAdditions headers,

Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (161773 => 161774)


--- trunk/Source/WebCore/rendering/RenderBlock.cpp	2014-01-11 19:56:38 UTC (rev 161773)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp	2014-01-11 20:03:42 UTC (rev 161774)
@@ -5604,10 +5604,8 @@
 {
     if (!render->isRenderBlock())
         return true;
-    if (render->isListItem()) {
-        RenderStyle* style = render->style();
-        return style && style->height().type() != Fixed;
-    }
+    if (render->isListItem())
+        return render->style().height().type() != Fixed;
     return false;
 }
 
@@ -5615,12 +5613,12 @@
 //  We've been experimenting with low values for single lines of text.
 static inline float oneLineTextMultiplier(float specifiedSize)
 {
-    return max((1.0f / log10f(specifiedSize) * 1.7f), 1.0f);
+    return std::max((1.0f / log10f(specifiedSize) * 1.7f), 1.0f);
 }
 
 static inline float textMultiplier(float specifiedSize)
 {
-    return max((1.0f / log10f(specifiedSize) * 1.95f), 1.0f);
+    return std::max((1.0f / log10f(specifiedSize) * 1.95f), 1.0f);
 }
 
 void RenderBlock::adjustComputedFontSizes(float size, float visibleWidth)
@@ -5652,8 +5650,8 @@
     for (RenderObject* descendent = traverseNext(this, isNonBlocksOrNonFixedHeightListItems); descendent; descendent = descendent->traverseNext(this, isNonBlocksOrNonFixedHeightListItems)) {
         if (isVisibleRenderText(descendent) && resizeTextPermitted(descendent)) {
             RenderText* text = toRenderText(descendent);
-            RenderStyle* oldStyle = text->style();
-            FontDescription fontDescription = oldStyle->fontDescription();
+            RenderStyle& oldStyle = text->style();
+            FontDescription fontDescription = oldStyle.fontDescription();
             float specifiedSize = fontDescription.specifiedSize();
             float scaledSize = roundf(specifiedSize * scale);
             if (scaledSize > 0 && scaledSize < minFontSize) {
@@ -5666,8 +5664,8 @@
 
                 float candidateNewSize = 0;
                 float lineTextMultiplier = lineCount == ONE_LINE ? oneLineTextMultiplier(specifiedSize) : textMultiplier(specifiedSize);
-                candidateNewSize = roundf(min(minFontSize, specifiedSize * lineTextMultiplier));
-                if (candidateNewSize > specifiedSize && candidateNewSize != fontDescription.computedSize() && text->node() && (!oldStyle || oldStyle->textSizeAdjust().isAuto()))
+                candidateNewSize = roundf(std::min(minFontSize, specifiedSize * lineTextMultiplier));
+                if (candidateNewSize > specifiedSize && candidateNewSize != fontDescription.computedSize() && text->node() && oldStyle.textSizeAdjust().isAuto())
                     document().addAutoSizingNode(text->node(), candidateNewSize);
             }
         }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to