Title: [161028] trunk/Source/WebCore
Revision
161028
Author
[email protected]
Date
2013-12-23 15:25:31 -0800 (Mon, 23 Dec 2013)

Log Message

Fix the iOS build following <http://trac.webkit.org/changeset/160236>
(https://bugs.webkit.org/show_bug.cgi?id=125239)

* rendering/RenderBlock.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::containingBlockLogicalWidthForPositioned): Substitute view() for &view().
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollTo): Fix indentation of closing brace.
* rendering/RenderLayerCompositor.cpp: Include MainFrame.h.
(WebCore::RenderLayerCompositor::contentsScaleMultiplierForNewTiles): Check that page->mainFrame().view()
is non-null; also add explicit #else clause.
(WebCore::RenderLayerCompositor::ensureRootLayer): Fix up main frame check.
* rendering/RenderTheme.h:
(WebCore::RenderTheme::paintFileUploadIconDecorations): Substitute rect for r.
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::paintTextFieldDecorations): Use .get() to access underlying NeverDestroyed item.
(WebCore::RenderThemeIOS::systemFont):
* rendering/RenderView.cpp:
(WebCore::fixedPositionOffset): Substitute frameView.scrollOffset() for frameView->scrollOffset().

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (161027 => 161028)


--- trunk/Source/WebCore/ChangeLog	2013-12-23 23:17:25 UTC (rev 161027)
+++ trunk/Source/WebCore/ChangeLog	2013-12-23 23:25:31 UTC (rev 161028)
@@ -1,3 +1,25 @@
+2013-12-23  Daniel Bates  <[email protected]>
+
+        Fix the iOS build following <http://trac.webkit.org/changeset/160236>
+        (https://bugs.webkit.org/show_bug.cgi?id=125239)
+
+        * rendering/RenderBlock.h:
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::containingBlockLogicalWidthForPositioned): Substitute view() for &view().
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::scrollTo): Fix indentation of closing brace.
+        * rendering/RenderLayerCompositor.cpp: Include MainFrame.h.
+        (WebCore::RenderLayerCompositor::contentsScaleMultiplierForNewTiles): Check that page->mainFrame().view()
+        is non-null; also add explicit #else clause.
+        (WebCore::RenderLayerCompositor::ensureRootLayer): Fix up main frame check.
+        * rendering/RenderTheme.h:
+        (WebCore::RenderTheme::paintFileUploadIconDecorations): Substitute rect for r.
+        * rendering/RenderThemeIOS.mm:
+        (WebCore::RenderThemeIOS::paintTextFieldDecorations): Use .get() to access underlying NeverDestroyed item.
+        (WebCore::RenderThemeIOS::systemFont):
+        * rendering/RenderView.cpp:
+        (WebCore::fixedPositionOffset): Substitute frameView.scrollOffset() for frameView->scrollOffset().
+
 2013-12-23  Ryosuke Niwa  <[email protected]>
 
         Minor optimization in FrameSelection::setNonDirectionalSelectionIfNeeded()

Modified: trunk/Source/WebCore/rendering/RenderBlock.h (161027 => 161028)


--- trunk/Source/WebCore/rendering/RenderBlock.h	2013-12-23 23:17:25 UTC (rev 161027)
+++ trunk/Source/WebCore/rendering/RenderBlock.h	2013-12-23 23:25:31 UTC (rev 161028)
@@ -344,6 +344,9 @@
     LayoutUnit startOffsetForContent() const { return style().isLeftToRightDirection() ? logicalLeftOffsetForContent() : logicalWidth() - logicalRightOffsetForContent(); }
     LayoutUnit endOffsetForContent() const { return !style().isLeftToRightDirection() ? logicalLeftOffsetForContent() : logicalWidth() - logicalRightOffsetForContent(); }
 
+    LayoutUnit logicalLeftSelectionOffset(RenderBlock& rootBlock, LayoutUnit position, const LogicalSelectionOffsetCaches&);
+    LayoutUnit logicalRightSelectionOffset(RenderBlock& rootBlock, LayoutUnit position, const LogicalSelectionOffsetCaches&);
+
     LayoutUnit computeStartPositionDeltaForChildAvoidingFloats(const RenderBox& child, LayoutUnit childMarginStart, RenderRegion* = 0);
 
     void placeRunInIfNeeded(RenderObject& newChild);
@@ -437,9 +440,6 @@
 
     void setDesiredColumnCountAndWidth(int, LayoutUnit);
 
-    LayoutUnit logicalLeftSelectionOffset(RenderBlock& rootBlock, LayoutUnit position, const LogicalSelectionOffsetCaches&);
-    LayoutUnit logicalRightSelectionOffset(RenderBlock& rootBlock, LayoutUnit position, const LogicalSelectionOffsetCaches&);
-
 public:
     virtual void computeOverflow(LayoutUnit oldClientAfterEdge, bool recomputeFloats = false);
     void clearLayoutOverflow();

Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (161027 => 161028)


--- trunk/Source/WebCore/rendering/RenderBox.cpp	2013-12-23 23:17:25 UTC (rev 161027)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp	2013-12-23 23:25:31 UTC (rev 161028)
@@ -3051,7 +3051,7 @@
 #if PLATFORM(IOS)
             if (view().hasCustomFixedPosition(*this)) {
                 const RenderBox& containingBlockBox = toRenderBox(*containingBlock);
-                return customContainingBlockLogicalWidth(containingBlockBox.style(), &view(), containingBlockBox);
+                return customContainingBlockLogicalWidth(containingBlockBox.style(), view(), containingBlockBox);
             }
 #endif
             return toRenderBox(containingBlock)->clientLogicalWidth();

Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (161027 => 161028)


--- trunk/Source/WebCore/rendering/RenderLayer.cpp	2013-12-23 23:17:25 UTC (rev 161027)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp	2013-12-23 23:25:31 UTC (rev 161028)
@@ -2334,7 +2334,7 @@
             updateCompositingLayersAfterScroll();
 #endif
         return;
-}
+    }
     m_scrollOffset = newScrollOffset;
 
     InspectorInstrumentation::willScrollLayer(&renderer().frame());

Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (161027 => 161028)


--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2013-12-23 23:17:25 UTC (rev 161027)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2013-12-23 23:25:31 UTC (rev 161028)
@@ -66,6 +66,7 @@
 #include <wtf/text/StringBuilder.h>
 
 #if PLATFORM(IOS)
+#include "MainFrame.h"
 #include "Region.h"
 #include "RenderScrollbar.h"
 #include "TileCache.h"
@@ -2658,15 +2659,18 @@
 {
 #if PLATFORM(IOS)
     TileCache* tileCache = nullptr;
-    if (Page* page = this->page())
-        tileCache = page->mainFrame().view().tileCache();
+    if (Page* page = this->page()) {
+        if (FrameView* frameView = page->mainFrame().view())
+            tileCache = frameView->tileCache();
+    }
 
     if (!tileCache)
         return 1;
 
     return tileCache->tilingMode() == TileCache::Zooming ? 0.125 : 1;
+#else
+    return 1;
 #endif
-    return 1;
 }
 
 void RenderLayerCompositor::didCommitChangesForLayer(const GraphicsLayer*) const
@@ -3042,8 +3046,7 @@
 #if PLATFORM(IOS)
         // Page scale is applied above this on iOS, so we'll just say that our root layer applies it.
         Frame& frame = m_renderView.frameView().frame();
-        Page* page = frame.page();
-        if (page && &page->mainFrame() == &frame)
+        if (frame.isMainFrame())
             m_rootContentLayer->setAppliesPageScale();
 #endif
 

Modified: trunk/Source/WebCore/rendering/RenderTheme.h (161027 => 161028)


--- trunk/Source/WebCore/rendering/RenderTheme.h	2013-12-23 23:17:25 UTC (rev 161027)
+++ trunk/Source/WebCore/rendering/RenderTheme.h	2013-12-23 23:25:31 UTC (rev 161028)
@@ -238,6 +238,9 @@
     virtual String fileListDefaultLabel(bool multipleFilesAllowed) const;
     virtual String fileListNameForWidth(const FileList*, const Font&, int width, bool multipleFilesAllowed) const;
 
+    enum FileUploadDecorations { SingleFile, MultipleFiles };
+    virtual bool paintFileUploadIconDecorations(RenderObject* /*inputRenderer*/, RenderObject* /*buttonRenderer*/, const PaintInfo&, const IntRect&, Icon*, FileUploadDecorations) { return true; }
+
 protected:
     // The platform selection color.
     virtual Color platformActiveSelectionBackgroundColor() const;
@@ -293,9 +296,6 @@
     virtual bool paintPushButtonDecorations(RenderObject*, const PaintInfo&, const IntRect&) { return true; }
     virtual bool paintSquareButtonDecorations(RenderObject*, const PaintInfo&, const IntRect&) { return true; }
 
-    enum FileUploadDecorations { SingleFile, MultipleFiles };
-    virtual bool paintFileUploadIconDecorations(RenderObject* /*inputRenderer*/, RenderObject* /*buttonRenderer*/, const PaintInfo&, const IntRect&, Icon*, FileUploadDecorations) { return true; }
-    
 #if ENABLE(METER_ELEMENT)
     virtual void adjustMeterStyle(StyleResolver*, RenderStyle*, Element*) const;
     virtual bool paintMeter(RenderObject*, const PaintInfo&, const IntRect&);

Modified: trunk/Source/WebCore/rendering/RenderThemeIOS.mm (161027 => 161028)


--- trunk/Source/WebCore/rendering/RenderThemeIOS.mm	2013-12-23 23:17:25 UTC (rev 161027)
+++ trunk/Source/WebCore/rendering/RenderThemeIOS.mm	2013-12-23 23:25:31 UTC (rev 161028)
@@ -465,7 +465,7 @@
 
     GraphicsContextStateSaver stateSaver(*paintInfo.context);
 
-    paintInfo.context->clipRoundedRect(style.getRoundedBorderFor(r));
+    paintInfo.context->clipRoundedRect(style.getRoundedBorderFor(rect));
 
     // This gradient gets drawn black when printing.
     // Do not draw the gradient if there is no visible top border.
@@ -1078,18 +1078,18 @@
     if (userTextSize != contentSizeCategory()) {
         userTextSize = contentSizeCategory();
 
-        headlineFont.setIsAbsoluteSize(false);
-        bodyFont.setIsAbsoluteSize(false);
-        subheadlineFont.setIsAbsoluteSize(false);
-        footnoteFont.setIsAbsoluteSize(false);
-        caption1Font.setIsAbsoluteSize(false);
-        caption2Font.setIsAbsoluteSize(false);
-        shortHeadlineFont.setIsAbsoluteSize(false);
-        shortBodyFont.setIsAbsoluteSize(false);
-        shortSubheadlineFont.setIsAbsoluteSize(false);
-        shortFootnoteFont.setIsAbsoluteSize(false);
-        shortCaption1Font.setIsAbsoluteSize(false);
-        tallBodyFont.setIsAbsoluteSize(false);
+        headlineFont.get().setIsAbsoluteSize(false);
+        bodyFont.get().setIsAbsoluteSize(false);
+        subheadlineFont.get().setIsAbsoluteSize(false);
+        footnoteFont.get().setIsAbsoluteSize(false);
+        caption1Font.get().setIsAbsoluteSize(false);
+        caption2Font.get().setIsAbsoluteSize(false);
+        shortHeadlineFont.get().setIsAbsoluteSize(false);
+        shortBodyFont.get().setIsAbsoluteSize(false);
+        shortSubheadlineFont.get().setIsAbsoluteSize(false);
+        shortFootnoteFont.get().setIsAbsoluteSize(false);
+        shortCaption1Font.get().setIsAbsoluteSize(false);
+        tallBodyFont.get().setIsAbsoluteSize(false);
     }
 
     FontDescription* cachedDesc;
@@ -1097,86 +1097,86 @@
     CFStringRef textStyle;
     switch (valueID) {
     case CSSValueAppleSystemHeadline:
-        cachedDesc = &headlineFont;
+        cachedDesc = &headlineFont.get();
         textStyle = kCTUIFontTextStyleHeadline;
-        if (!headlineFont.isAbsoluteSize())
+        if (!headlineFont.get().isAbsoluteSize())
             fontDescriptor = adoptCF(CTFontDescriptorCreateWithTextStyle(textStyle, userTextSize, 0));
         break;
     case CSSValueAppleSystemBody:
-        cachedDesc = &bodyFont;
+        cachedDesc = &bodyFont.get();
         textStyle = kCTUIFontTextStyleBody;
-        if (!bodyFont.isAbsoluteSize())
+        if (!bodyFont.get().isAbsoluteSize())
             fontDescriptor = adoptCF(CTFontDescriptorCreateWithTextStyle(textStyle, userTextSize, 0));
         break;
     case CSSValueAppleSystemSubheadline:
-        cachedDesc = &subheadlineFont;
+        cachedDesc = &subheadlineFont.get();
         textStyle = kCTUIFontTextStyleSubhead;
-        if (!subheadlineFont.isAbsoluteSize())
+        if (!subheadlineFont.get().isAbsoluteSize())
             fontDescriptor = adoptCF(CTFontDescriptorCreateWithTextStyle(textStyle, userTextSize, 0));
         break;
     case CSSValueAppleSystemFootnote:
-        cachedDesc = &footnoteFont;
+        cachedDesc = &footnoteFont.get();
         textStyle = kCTUIFontTextStyleFootnote;
-        if (!footnoteFont.isAbsoluteSize())
+        if (!footnoteFont.get().isAbsoluteSize())
             fontDescriptor = adoptCF(CTFontDescriptorCreateWithTextStyle(textStyle, userTextSize, 0));
         break;
     case CSSValueAppleSystemCaption1:
-        cachedDesc = &caption1Font;
+        cachedDesc = &caption1Font.get();
         textStyle = kCTUIFontTextStyleCaption1;
-        if (!caption1Font.isAbsoluteSize())
+        if (!caption1Font.get().isAbsoluteSize())
             fontDescriptor = adoptCF(CTFontDescriptorCreateWithTextStyle(textStyle, userTextSize, 0));
         break;
     case CSSValueAppleSystemCaption2:
-        cachedDesc = &caption2Font;
+        cachedDesc = &caption2Font.get();
         textStyle = kCTUIFontTextStyleCaption2;
-        if (!caption2Font.isAbsoluteSize())
+        if (!caption2Font.get().isAbsoluteSize())
             fontDescriptor = adoptCF(CTFontDescriptorCreateWithTextStyle(textStyle, userTextSize, 0));
         break;
 
     // Short version.
     case CSSValueAppleSystemShortHeadline:
-        cachedDesc = &shortHeadlineFont;
+        cachedDesc = &shortHeadlineFont.get();
         textStyle = kCTUIFontTextStyleShortHeadline;
-        if (!shortHeadlineFont.isAbsoluteSize())
+        if (!shortHeadlineFont.get().isAbsoluteSize())
             fontDescriptor = adoptCF(CTFontDescriptorCreateWithTextStyle(textStyle, userTextSize, 0));
         break;
     case CSSValueAppleSystemShortBody:
-        cachedDesc = &shortBodyFont;
+        cachedDesc = &shortBodyFont.get();
         textStyle = kCTUIFontTextStyleShortBody;
-        if (!shortBodyFont.isAbsoluteSize())
+        if (!shortBodyFont.get().isAbsoluteSize())
             fontDescriptor = adoptCF(CTFontDescriptorCreateWithTextStyle(textStyle, userTextSize, 0));
         break;
     case CSSValueAppleSystemShortSubheadline:
-        cachedDesc = &shortSubheadlineFont;
+        cachedDesc = &shortSubheadlineFont.get();
         textStyle = kCTUIFontTextStyleShortSubhead;
-        if (!shortSubheadlineFont.isAbsoluteSize())
+        if (!shortSubheadlineFont.get().isAbsoluteSize())
             fontDescriptor = adoptCF(CTFontDescriptorCreateWithTextStyle(textStyle, userTextSize, 0));
         break;
     case CSSValueAppleSystemShortFootnote:
-        cachedDesc = &shortFootnoteFont;
+        cachedDesc = &shortFootnoteFont.get();
         textStyle = kCTUIFontTextStyleShortFootnote;
-        if (!shortFootnoteFont.isAbsoluteSize())
+        if (!shortFootnoteFont.get().isAbsoluteSize())
             fontDescriptor = adoptCF(CTFontDescriptorCreateWithTextStyle(textStyle, userTextSize, 0));
         break;
     case CSSValueAppleSystemShortCaption1:
-        cachedDesc = &shortCaption1Font;
+        cachedDesc = &shortCaption1Font.get();
         textStyle = kCTUIFontTextStyleShortCaption1;
-        if (!shortCaption1Font.isAbsoluteSize())
+        if (!shortCaption1Font.get().isAbsoluteSize())
             fontDescriptor = adoptCF(CTFontDescriptorCreateWithTextStyle(textStyle, userTextSize, 0));
         break;
 
     // Tall version.
     case CSSValueAppleSystemTallBody:
-        cachedDesc = &tallBodyFont;
+        cachedDesc = &tallBodyFont.get();
         textStyle = kCTUIFontTextStyleTallBody;
-        if (!tallBodyFont.isAbsoluteSize())
+        if (!tallBodyFont.get().isAbsoluteSize())
             fontDescriptor = adoptCF(CTFontDescriptorCreateWithTextStyle(textStyle, userTextSize, 0));
         break;
 
     default:
         textStyle = kCTFontDescriptorTextStyleEmphasized;
-        cachedDesc = &systemFont;
-        if (!systemFont.isAbsoluteSize())
+        cachedDesc = &systemFont.get();
+        if (!systemFont.get().isAbsoluteSize())
             fontDescriptor = adoptCF(CTFontDescriptorCreateForUIType(kCTFontSystemFontType, 0, nullptr));
     }
 

Modified: trunk/Source/WebCore/rendering/RenderView.cpp (161027 => 161028)


--- trunk/Source/WebCore/rendering/RenderView.cpp	2013-12-23 23:17:25 UTC (rev 161027)
+++ trunk/Source/WebCore/rendering/RenderView.cpp	2013-12-23 23:25:31 UTC (rev 161028)
@@ -369,7 +369,7 @@
 #if PLATFORM(IOS)
 static inline LayoutSize fixedPositionOffset(const FrameView& frameView)
 {
-    return frameView.useCustomFixedPositionLayoutRect() ? (frameView.customFixedPositionLayoutRect().location() - LayoutPoint()) : frameView->scrollOffset();
+    return frameView.useCustomFixedPositionLayoutRect() ? (frameView.customFixedPositionLayoutRect().location() - LayoutPoint()) : frameView.scrollOffset();
 }
 #endif
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to