Adding "explicit" keyword in rendering related constructors
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Sep 2013 05:40:09 +0000 (05:40 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Sep 2013 05:40:09 +0000 (05:40 +0000)
https://bugs.webkit.org/show_bug.cgi?id=121398

Patch by Santosh Mahto <santosh.ma@samsung.com> on 2013-09-15
Reviewed by Andreas Kling.

Adding explicit in below constructor.
All files belong to Source/WebCore/rendering/ path.

* rendering/AutoTableLayout.h:
* rendering/ClipPathOperation.h:
(WebCore::ClipPathOperation::ClipPathOperation):
(WebCore::ShapeClipPathOperation::ShapeClipPathOperation):
* rendering/FixedTableLayout.h:
* rendering/FloatingObjects.h:
(WebCore::FloatingObject::FloatingObject):
* rendering/FlowThreadController.h:
* rendering/HitTestResult.h:
* rendering/ImageQualityController.h:
* rendering/InlineBox.h:
(WebCore::InlineBox::InlineBox):
(WebCore::InlineBox::InlineBoxBitfields::InlineBoxBitfields):
* rendering/InlineFlowBox.h:
(WebCore::InlineFlowBox::InlineFlowBox):
* rendering/InlineTextBox.h:
(WebCore::InlineTextBox::InlineTextBox):
* rendering/LayoutState.h:
* rendering/LogicalSelectionOffsetCaches.h:
(WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches):
* rendering/RenderBoxModelObject.h:
* rendering/RenderFlexibleBox.h:
* rendering/RenderFrameSet.h:
(WebCore::FrameEdgeInfo::FrameEdgeInfo):
* rendering/RenderGeometryMap.h:
* rendering/RenderImage.h:
* rendering/RenderImageResourceStyleImage.h:
* rendering/RenderLayerFilterInfo.h:
* rendering/RenderMultiColumnSet.h:
* rendering/RenderNamedFlowThread.h:
* rendering/RenderReplaced.h:
* rendering/RenderSearchField.h:
* rendering/RenderSelectionInfo.h:
(WebCore::RenderSelectionInfoBase::RenderSelectionInfoBase):
(WebCore::RenderBlockSelectionInfo::RenderBlockSelectionInfo):
* rendering/RenderTableSection.h:
* rendering/RenderTextControl.h:
* rendering/RenderTextControlSingleLine.h:
* rendering/TrailingFloatsRootInlineBox.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@155833 268f45cc-cd09-0410-ab3c-d52691b4dbfc

29 files changed:
Source/WebCore/ChangeLog
Source/WebCore/rendering/AutoTableLayout.h
Source/WebCore/rendering/ClipPathOperation.h
Source/WebCore/rendering/FixedTableLayout.h
Source/WebCore/rendering/FloatingObjects.h
Source/WebCore/rendering/FlowThreadController.h
Source/WebCore/rendering/HitTestResult.h
Source/WebCore/rendering/ImageQualityController.h
Source/WebCore/rendering/InlineBox.h
Source/WebCore/rendering/InlineFlowBox.h
Source/WebCore/rendering/InlineTextBox.h
Source/WebCore/rendering/LayoutState.h
Source/WebCore/rendering/LogicalSelectionOffsetCaches.h
Source/WebCore/rendering/RenderBoxModelObject.h
Source/WebCore/rendering/RenderFlexibleBox.h
Source/WebCore/rendering/RenderFrameSet.h
Source/WebCore/rendering/RenderGeometryMap.h
Source/WebCore/rendering/RenderImage.h
Source/WebCore/rendering/RenderImageResourceStyleImage.h
Source/WebCore/rendering/RenderLayerFilterInfo.h
Source/WebCore/rendering/RenderMultiColumnSet.h
Source/WebCore/rendering/RenderNamedFlowThread.h
Source/WebCore/rendering/RenderReplaced.h
Source/WebCore/rendering/RenderSearchField.h
Source/WebCore/rendering/RenderSelectionInfo.h
Source/WebCore/rendering/RenderTableSection.h
Source/WebCore/rendering/RenderTextControl.h
Source/WebCore/rendering/RenderTextControlSingleLine.h
Source/WebCore/rendering/TrailingFloatsRootInlineBox.h

index 32d3f37..3ccd69a 100644 (file)
@@ -1,3 +1,53 @@
+2013-09-15  Santosh Mahto  <santosh.ma@samsung.com>
+
+        Adding "explicit" keyword in rendering related constructors
+        https://bugs.webkit.org/show_bug.cgi?id=121398
+
+        Reviewed by Andreas Kling.
+
+        Adding explicit in below constructor.
+        All files belong to Source/WebCore/rendering/ path.
+
+        * rendering/AutoTableLayout.h:
+        * rendering/ClipPathOperation.h:
+        (WebCore::ClipPathOperation::ClipPathOperation):
+        (WebCore::ShapeClipPathOperation::ShapeClipPathOperation):
+        * rendering/FixedTableLayout.h:
+        * rendering/FloatingObjects.h:
+        (WebCore::FloatingObject::FloatingObject):
+        * rendering/FlowThreadController.h:
+        * rendering/HitTestResult.h:
+        * rendering/ImageQualityController.h:
+        * rendering/InlineBox.h:
+        (WebCore::InlineBox::InlineBox):
+        (WebCore::InlineBox::InlineBoxBitfields::InlineBoxBitfields):
+        * rendering/InlineFlowBox.h:
+        (WebCore::InlineFlowBox::InlineFlowBox):
+        * rendering/InlineTextBox.h:
+        (WebCore::InlineTextBox::InlineTextBox):
+        * rendering/LayoutState.h:
+        * rendering/LogicalSelectionOffsetCaches.h:
+        (WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches):
+        * rendering/RenderBoxModelObject.h:
+        * rendering/RenderFlexibleBox.h:
+        * rendering/RenderFrameSet.h:
+        (WebCore::FrameEdgeInfo::FrameEdgeInfo):
+        * rendering/RenderGeometryMap.h:
+        * rendering/RenderImage.h:
+        * rendering/RenderImageResourceStyleImage.h:
+        * rendering/RenderLayerFilterInfo.h:
+        * rendering/RenderMultiColumnSet.h:
+        * rendering/RenderNamedFlowThread.h:
+        * rendering/RenderReplaced.h:
+        * rendering/RenderSearchField.h:
+        * rendering/RenderSelectionInfo.h:
+        (WebCore::RenderSelectionInfoBase::RenderSelectionInfoBase):
+        (WebCore::RenderBlockSelectionInfo::RenderBlockSelectionInfo):
+        * rendering/RenderTableSection.h:
+        * rendering/RenderTextControl.h:
+        * rendering/RenderTextControlSingleLine.h:
+        * rendering/TrailingFloatsRootInlineBox.h:
+
 2013-09-15  Gustavo Noronha Silva  <gns@gnome.org>
 
         Unreviewed make distcheck fix.
index a1fdad0..1b61651 100644 (file)
@@ -33,7 +33,7 @@ class RenderTableCell;
 
 class AutoTableLayout : public TableLayout {
 public:
-    AutoTableLayout(RenderTable*);
+    explicit AutoTableLayout(RenderTable*);
     ~AutoTableLayout();
 
     virtual void computeIntrinsicLogicalWidths(LayoutUnit& minWidth, LayoutUnit& maxWidth) OVERRIDE;
index a1f77e2..57bc980 100644 (file)
@@ -55,7 +55,7 @@ public:
     virtual bool isSameType(const ClipPathOperation& o) const { return o.getOperationType() == m_type; }
 
 protected:
-    ClipPathOperation(OperationType type)
+    explicit ClipPathOperation(OperationType type)
         : m_type(type)
     {
     }
@@ -120,7 +120,7 @@ private:
         return m_shape == other->m_shape;
     }
 
-    ShapeClipPathOperation(PassRefPtr<BasicShape> shape)
+    explicit ShapeClipPathOperation(PassRefPtr<BasicShape> shape)
         : ClipPathOperation(SHAPE)
         , m_shape(shape)
     {
index 68ba084..ee9ea9c 100644 (file)
@@ -32,7 +32,7 @@ class RenderTable;
 
 class FixedTableLayout : public TableLayout {
 public:
-    FixedTableLayout(RenderTable*);
+    explicit FixedTableLayout(RenderTable*);
 
     virtual void computeIntrinsicLogicalWidths(LayoutUnit& minWidth, LayoutUnit& maxWidth) OVERRIDE;
     virtual void applyPreferredLogicalWidthQuirks(LayoutUnit& minWidth, LayoutUnit& maxWidth) const OVERRIDE;
index 8fede07..31e63fd 100644 (file)
@@ -41,7 +41,7 @@ public:
     // Note that Type uses bits so you can use FloatLeftRight as a mask to query for both left and right.
     enum Type { FloatLeft = 1, FloatRight = 2, FloatLeftRight = 3 };
 
-    FloatingObject(EFloat type)
+    explicit FloatingObject(EFloat type)
         : m_renderer(0)
         , m_originatingLine(0)
         , m_paginationStrut(0)
index 254b4ce..e5c7b21 100644 (file)
@@ -93,7 +93,7 @@ public:
 #endif
 
 protected:
-    FlowThreadController(RenderView*);
+    explicit FlowThreadController(RenderView*);
     void updateFlowThreadsChainIfNecessary();
     void resetFlowThreadsWithAutoHeightRegions();
 
index d13dba3..ec520f8 100644 (file)
@@ -51,10 +51,10 @@ public:
     typedef ListHashSet<RefPtr<Node> > NodeSet;
 
     HitTestResult();
-    HitTestResult(const LayoutPoint&);
+    explicit HitTestResult(const LayoutPoint&);
     // Pass non-negative padding values to perform a rect-based hit test.
     HitTestResult(const LayoutPoint& centerPoint, unsigned topPadding, unsigned rightPadding, unsigned bottomPadding, unsigned leftPadding);
-    HitTestResult(const HitTestLocation&);
+    explicit HitTestResult(const HitTestLocation&);
     HitTestResult(const HitTestResult&);
     ~HitTestResult();
     HitTestResult& operator=(const HitTestResult&);
index 59886ac..74648de 100644 (file)
@@ -51,7 +51,7 @@ private:
     typedef HashMap<const void*, LayoutSize> LayerSizeMap;
     typedef HashMap<RenderBoxModelObject*, LayerSizeMap> ObjectLayerSizeMap;
 
-    ImageQualityController(const RenderView&);
+    explicit ImageQualityController(const RenderView&);
 
     void removeLayer(RenderBoxModelObject*, LayerSizeMap* innerMap, const void* layer);
     void set(RenderBoxModelObject*, LayerSizeMap* innerMap, const void* layer, const LayoutSize&);
index 515fc5a..71eb985 100644 (file)
@@ -34,7 +34,7 @@ class RootInlineBox;
 // some RenderObject (i.e., it represents a portion of that RenderObject).
 class InlineBox {
 public:
-    InlineBox(RenderObject& renderer)
+    explicit InlineBox(RenderObject& renderer)
         : m_next(0)
         , m_prev(0)
         , m_parent(0)
@@ -323,7 +323,7 @@ public:
 
     class InlineBoxBitfields {
     public:
-        InlineBoxBitfields(bool firstLine = false, bool constructed = false, bool dirty = false, bool extracted = false, bool isHorizontal = true)
+        explicit InlineBoxBitfields(bool firstLine = false, bool constructed = false, bool dirty = false, bool extracted = false, bool isHorizontal = true)
             : m_firstLine(firstLine)
             , m_constructed(constructed)
             , m_bidiEmbeddingLevel(0)
index 6e9ee53..2da00bd 100644 (file)
@@ -40,7 +40,7 @@ typedef HashMap<const InlineTextBox*, pair<Vector<const SimpleFontData*>, GlyphO
 
 class InlineFlowBox : public InlineBox {
 public:
-    InlineFlowBox(RenderObject& renderer)
+    explicit InlineFlowBox(RenderObject& renderer)
         : InlineBox(renderer)
         , m_firstChild(0)
         , m_lastChild(0)
index bd78ba7..21db469 100644 (file)
@@ -47,7 +47,7 @@ Color correctedTextColor(Color textColor, Color backgroundColor);
 
 class InlineTextBox : public InlineBox {
 public:
-    InlineTextBox(RenderObject& renderer)
+    explicit InlineTextBox(RenderObject& renderer)
         : InlineBox(renderer)
         , m_prevTextBox(0)
         , m_nextTextBox(0)
index d7749c5..d476490 100644 (file)
@@ -67,7 +67,7 @@ public:
     }
 
     LayoutState(LayoutState*, RenderBox*, const LayoutSize& offset, LayoutUnit pageHeight, bool pageHeightChanged, ColumnInfo*);
-    LayoutState(RenderObject*);
+    explicit LayoutState(RenderObject*);
 
     void destroy(RenderArena*);
 
index 3c59fb6..658e022 100644 (file)
@@ -133,7 +133,7 @@ public:
         
     };
 
-    LogicalSelectionOffsetCaches(RenderBlock* rootBlock)
+    explicit LogicalSelectionOffsetCaches(RenderBlock* rootBlock)
     {
         ASSERT(rootBlock->isSelectionRoot());
         RenderObject* parent = rootBlock->parent();
index 1efd2c4..757a37f 100644 (file)
@@ -61,7 +61,7 @@ class StickyPositionViewportConstraints;
 
 class RenderBoxModelObject : public RenderLayerModelObject {
 public:
-    RenderBoxModelObject(Element*);
+    explicit RenderBoxModelObject(Element*);
     virtual ~RenderBoxModelObject();
     
     LayoutSize relativePositionOffset() const;
index 203f697..faae540 100644 (file)
@@ -37,7 +37,7 @@ namespace WebCore {
 
 class RenderFlexibleBox : public RenderBlock {
 public:
-    RenderFlexibleBox(Element*);
+    explicit RenderFlexibleBox(Element*);
     virtual ~RenderFlexibleBox();
 
     static RenderFlexibleBox* createAnonymous(Document&);
index 3071d0f..d595474 100644 (file)
@@ -34,7 +34,7 @@ class RenderFrame;
 enum FrameEdge { LeftFrameEdge, RightFrameEdge, TopFrameEdge, BottomFrameEdge };
 
 struct FrameEdgeInfo {
-    FrameEdgeInfo(bool preventResize = false, bool allowBorder = true)
+    explicit FrameEdgeInfo(bool preventResize = false, bool allowBorder = true)
         : m_preventResize(4)
         , m_allowBorder(4)
     {
index 00c41f7..92d5209 100644 (file)
@@ -74,7 +74,7 @@ struct RenderGeometryMapStep {
 class RenderGeometryMap {
     WTF_MAKE_NONCOPYABLE(RenderGeometryMap);
 public:
-    RenderGeometryMap(MapCoordinatesFlags = UseTransforms);
+    explicit RenderGeometryMap(MapCoordinatesFlags = UseTransforms);
     ~RenderGeometryMap();
 
     MapCoordinatesFlags mapCoordinatesFlags() const { return m_mapCoordinatesFlags; }
index 5137826..413ae41 100644 (file)
@@ -35,7 +35,7 @@ class HTMLMapElement;
 
 class RenderImage : public RenderReplaced {
 public:
-    RenderImage(Element*);
+    explicit RenderImage(Element*);
     virtual ~RenderImage();
 
     static RenderImage* createAnonymous(Document&);
index 008ccfa..f43ff72 100644 (file)
@@ -60,7 +60,7 @@ public:
     virtual WrappedImagePtr imagePtr() const { return m_styleImage->data(); }
 
 private:
-    RenderImageResourceStyleImage(StyleImage*);
+    explicit RenderImageResourceStyleImage(StyleImage*);
     RefPtr<StyleImage> m_styleImage;
 };
 
index 697252c..d257e39 100644 (file)
@@ -74,7 +74,7 @@ public:
 #endif
 
 private:
-    FilterInfo(RenderLayer&);
+    explicit FilterInfo(RenderLayer&);
     ~FilterInfo();
 
     friend void WTF::deleteOwnedPtr<FilterInfo>(FilterInfo*);
index d8a9f69..2f4898f 100644 (file)
@@ -98,7 +98,7 @@ public:
     void prepareForLayout();
 
 private:
-    RenderMultiColumnSet(RenderFlowThread*);
+    explicit RenderMultiColumnSet(RenderFlowThread*);
 
     virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logicalTop, LogicalExtentComputedValues&) const OVERRIDE;
 
index 91b49ac..d04287a 100644 (file)
@@ -85,7 +85,7 @@ protected:
     void resetMarkForDestruction();
 
 private:
-    RenderNamedFlowThread(PassRefPtr<WebKitNamedFlow>);
+    explicit RenderNamedFlowThread(PassRefPtr<WebKitNamedFlow>);
 
     virtual const char* renderName() const OVERRIDE;
     virtual bool isRenderNamedFlowThread() const OVERRIDE { return true; }
index 4f01dff..5bdd0bc 100644 (file)
@@ -28,7 +28,7 @@ namespace WebCore {
 
 class RenderReplaced : public RenderBox {
 public:
-    RenderReplaced(Element*);
+    explicit RenderReplaced(Element*);
     RenderReplaced(Element*, const LayoutSize& intrinsicSize);
     virtual ~RenderReplaced();
 
index 3935df9..d4114d3 100644 (file)
@@ -33,7 +33,7 @@ class SearchPopupMenu;
 
 class RenderSearchField FINAL : public RenderTextControlSingleLine, private PopupMenuClient {
 public:
-    RenderSearchField(HTMLInputElement&);
+    explicit RenderSearchField(HTMLInputElement&);
     virtual ~RenderSearchField();
 
     void updateCancelButtonVisibility() const;
index 50dff70..67365c6 100644 (file)
@@ -40,7 +40,7 @@ public:
     {
     }
 
-    RenderSelectionInfoBase(RenderObject* o)
+    explicit RenderSelectionInfoBase(RenderObject* o)
         : m_object(o)
         , m_repaintContainer(o->containerForRepaint())
         , m_state(o->selectionState())
@@ -81,7 +81,7 @@ private:
 // This struct is used when the selection changes to cache the old and new state of the selection for each RenderBlock.
 class RenderBlockSelectionInfo : public RenderSelectionInfoBase {
 public:
-    RenderBlockSelectionInfo(RenderBlock* b)
+    explicit RenderBlockSelectionInfo(RenderBlock* b)
         : RenderSelectionInfoBase(b)
         , m_rects(b->canUpdateSelectionOnRootLineBoxes() ? block()->selectionGapRectsForRepaint(m_repaintContainer) : GapRects())
     { 
index a135124..98c465e 100644 (file)
@@ -62,7 +62,7 @@ class RenderTableRow;
 
 class RenderTableSection FINAL : public RenderBox {
 public:
-    RenderTableSection(Element*);
+    explicit RenderTableSection(Element*);
     virtual ~RenderTableSection();
 
     RenderObject* firstChild() const { return m_children.firstChild(); }
index 150c12c..bd2e50c 100644 (file)
@@ -37,7 +37,7 @@ public:
     virtual PassRefPtr<RenderStyle> createInnerTextStyle(const RenderStyle* startStyle) const = 0;
 
 protected:
-    RenderTextControl(HTMLTextFormControlElement&);
+    explicit RenderTextControl(HTMLTextFormControlElement&);
 
     // This convenience function should not be made public because innerTextElement may outlive the render tree.
     HTMLElement* innerTextElement() const;
index a006daa..418dc7e 100644 (file)
@@ -32,7 +32,7 @@ class HTMLInputElement;
 
 class RenderTextControlSingleLine : public RenderTextControl {
 public:
-    RenderTextControlSingleLine(HTMLInputElement&);
+    explicit RenderTextControlSingleLine(HTMLInputElement&);
     virtual ~RenderTextControlSingleLine();
     // FIXME: Move create*Style() to their classes.
     virtual PassRefPtr<RenderStyle> createInnerTextStyle(const RenderStyle* startStyle) const;
index a37ac0d..3e53106 100644 (file)
@@ -32,7 +32,7 @@ namespace WebCore {
 
 class TrailingFloatsRootInlineBox FINAL : public RootInlineBox {
 public:
-    TrailingFloatsRootInlineBox(RenderBlock& block)
+    explicit TrailingFloatsRootInlineBox(RenderBlock& block)
         : RootInlineBox(block)
     {
         setHasVirtualLogicalHeight();