Changeset 180574 in webkit
- Timestamp:
- Feb 24, 2015, 10:47:54 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 7 edited
-
ChangeLog (modified) (1 diff)
-
page/FrameView.cpp (modified) (25 diffs)
-
page/FrameView.h (modified) (1 diff)
-
rendering/RenderObject.cpp (modified) (18 diffs)
-
rendering/RenderObject.h (modified) (15 diffs)
-
rendering/RenderView.cpp (modified) (9 diffs)
-
rendering/RenderView.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r180570 r180574 1 2015-02-24 Simon Fraser <simon.fraser@apple.com> 2 3 Use nullptr in more places in FrameView, RenderView, RenderObject 4 https://bugs.webkit.org/show_bug.cgi?id=141974 5 6 Reviewed by Zalan Bujtas. 7 8 0 -> nullptr in FrameView.h/cpp, RenderView.h/cpp, RenderObject.h/cpp. 9 10 Rename FrameView::m_deferSetNeedsLayouts to FrameView::m_deferSetNeedsLayoutCount 11 to make it more clear that it's a count. 12 13 * page/FrameView.cpp: 14 (WebCore::FrameView::FrameView): 15 (WebCore::FrameView::reset): 16 (WebCore::FrameView::setContentsSize): 17 (WebCore::FrameView::calculateScrollbarModesForLayout): 18 (WebCore::FrameView::layerForScrolling): 19 (WebCore::FrameView::layerForHorizontalScrollbar): 20 (WebCore::FrameView::layerForVerticalScrollbar): 21 (WebCore::FrameView::layerForScrollCorner): 22 (WebCore::FrameView::tiledBacking): 23 (WebCore::FrameView::scrollLayerID): 24 (WebCore::FrameView::layerForOverhangAreas): 25 (WebCore::FrameView::setWantsLayerForTopOverHangArea): 26 (WebCore::FrameView::setWantsLayerForBottomOverHangArea): 27 (WebCore::FrameView::hasCompositedContentIncludingDescendants): 28 (WebCore::FrameView::layoutRoot): 29 (WebCore::FrameView::forceLayoutParentViewIfNeeded): 30 (WebCore::FrameView::layout): 31 (WebCore::FrameView::hostWindow): 32 (WebCore::FrameView::scheduleRelayout): 33 (WebCore::FrameView::scheduleRelayoutOfSubtree): 34 (WebCore::FrameView::needsLayout): 35 (WebCore::FrameView::setNeedsLayout): 36 (WebCore::FrameView::enclosingScrollableArea): 37 (WebCore::FrameView::parentFrameView): 38 (WebCore::FrameView::paintControlTints): 39 (WebCore::FrameView::adjustPageHeightDeprecated): 40 (WebCore::FrameView::axObjectCache): 41 * page/FrameView.h: 42 * rendering/RenderObject.cpp: 43 (WebCore::RenderObject::RenderObject): 44 (WebCore::RenderObject::nextInPreOrderAfterChildren): 45 (WebCore::RenderObject::previousInPreOrder): 46 (WebCore::RenderObject::firstLeafChild): 47 (WebCore::RenderObject::lastLeafChild): 48 (WebCore::RenderObject::traverseNext): 49 (WebCore::RenderObject::firstLineBlock): 50 (WebCore::RenderObject::containerForRepaint): 51 (WebCore::RenderObject::showRenderSubTreeAndMark): 52 (WebCore::RenderObject::localToAbsolute): 53 (WebCore::RenderObject::container): 54 * rendering/RenderObject.h: 55 (WebCore::RenderObject::virtualContinuation): 56 (WebCore::RenderObject::node): 57 (WebCore::RenderObject::nonPseudoNode): 58 (WebCore::RenderObject::localToAbsoluteQuad): 59 (WebCore::RenderObject::absoluteQuads): 60 (WebCore::RenderObject::absoluteClippedOverflowRect): 61 (WebCore::RenderObject::outlineBoundsForRepaint): 62 (WebCore::RenderObject::computeAbsoluteRepaintRect): 63 (WebCore::RenderObject::selectionRect): 64 (WebCore::RenderObject::imageChanged): 65 (WebCore::RenderObject::addFocusRingRects): 66 (WebCore::RenderObject::absoluteOutlineBounds): 67 * rendering/RenderView.cpp: 68 (WebCore::SelectionIterator::next): 69 (WebCore::RenderView::RenderView): 70 (WebCore::RenderView::mapLocalToContainer): 71 (WebCore::RenderView::pushMappingToContainer): 72 (WebCore::RenderView::computeRectForRepaint): 73 (WebCore::rendererAfterPosition): 74 (WebCore::RenderView::splitSelectionBetweenSubtrees): 75 (WebCore::RenderView::rootBackgroundIsEntirelyFixed): 76 * rendering/RenderView.h: 77 1 78 2015-02-24 Yusuke Suzuki <utatane.tea@gmail.com> 2 79 -
trunk/Source/WebCore/page/FrameView.cpp
r180474 r180574 165 165 , m_canHaveScrollbars(true) 166 166 , m_layoutTimer(*this, &FrameView::layoutTimerFired) 167 , m_layoutRoot( 0)167 , m_layoutRoot(nullptr) 168 168 , m_layoutPhase(OutsideLayout) 169 169 , m_inSynchronousPostLayout(false) … … 174 174 , m_mediaType("screen") 175 175 , m_overflowStatusDirty(true) 176 , m_viewportRenderer( 0)176 , m_viewportRenderer(nullptr) 177 177 , m_wasScrolledByUser(false) 178 178 , m_inProgrammaticScroll(false) … … 182 182 , m_shouldUpdateWhileOffscreen(true) 183 183 , m_exposedRect(FloatRect::infiniteRect()) 184 , m_deferSetNeedsLayout s(0)184 , m_deferSetNeedsLayoutCount(0) 185 185 , m_setNeedsLayoutWasDeferred(false) 186 186 , m_speculativeTilingEnabled(false) … … 264 264 m_contentIsOpaque = false; 265 265 m_layoutTimer.stop(); 266 m_layoutRoot = 0;266 m_layoutRoot = nullptr; 267 267 m_delayedLayout = false; 268 268 m_needsFullRepaint = true; … … 564 564 return; 565 565 566 m_deferSetNeedsLayout s++;566 m_deferSetNeedsLayoutCount++; 567 567 568 568 ScrollView::setContentsSize(size); … … 580 580 frame().mainFrame().pageOverlayController().didChangeDocumentSize(); 581 581 582 ASSERT(m_deferSetNeedsLayout s);583 m_deferSetNeedsLayout s--;584 585 if (!m_deferSetNeedsLayout s)582 ASSERT(m_deferSetNeedsLayoutCount); 583 m_deferSetNeedsLayoutCount--; 584 585 if (!m_deferSetNeedsLayoutCount) 586 586 m_setNeedsLayoutWasDeferred = false; // FIXME: Find a way to make the deferred layout actually happen. 587 587 } … … 694 694 void FrameView::calculateScrollbarModesForLayout(ScrollbarMode& hMode, ScrollbarMode& vMode, ScrollbarModesCalculationStrategy strategy) 695 695 { 696 m_viewportRenderer = 0;696 m_viewportRenderer = nullptr; 697 697 698 698 const HTMLFrameOwnerElement* owner = frame().ownerElement(); … … 785 785 RenderView* renderView = this->renderView(); 786 786 if (!renderView) 787 return 0;787 return nullptr; 788 788 return renderView->compositor().scrollLayer(); 789 789 } 790 790 791 791 GraphicsLayer* FrameView::layerForHorizontalScrollbar() const 792 { 793 RenderView* renderView = this->renderView(); 794 if (!renderView) 795 return nullptr; 796 return renderView->compositor().layerForHorizontalScrollbar(); 797 } 798 799 GraphicsLayer* FrameView::layerForVerticalScrollbar() const 800 { 801 RenderView* renderView = this->renderView(); 802 if (!renderView) 803 return nullptr; 804 return renderView->compositor().layerForVerticalScrollbar(); 805 } 806 807 GraphicsLayer* FrameView::layerForScrollCorner() const 808 { 809 RenderView* renderView = this->renderView(); 810 if (!renderView) 811 return nullptr; 812 return renderView->compositor().layerForScrollCorner(); 813 } 814 815 TiledBacking* FrameView::tiledBacking() const 816 { 817 RenderView* renderView = this->renderView(); 818 if (!renderView) 819 return nullptr; 820 821 RenderLayerBacking* backing = renderView->layer()->backing(); 822 if (!backing) 823 return nullptr; 824 825 return backing->graphicsLayer()->tiledBacking(); 826 } 827 828 uint64_t FrameView::scrollLayerID() const 792 829 { 793 830 RenderView* renderView = this->renderView(); 794 831 if (!renderView) 795 832 return 0; 796 return renderView->compositor().layerForHorizontalScrollbar();797 }798 799 GraphicsLayer* FrameView::layerForVerticalScrollbar() const800 {801 RenderView* renderView = this->renderView();802 if (!renderView)803 return 0;804 return renderView->compositor().layerForVerticalScrollbar();805 }806 807 GraphicsLayer* FrameView::layerForScrollCorner() const808 {809 RenderView* renderView = this->renderView();810 if (!renderView)811 return 0;812 return renderView->compositor().layerForScrollCorner();813 }814 815 TiledBacking* FrameView::tiledBacking() const816 {817 RenderView* renderView = this->renderView();818 if (!renderView)819 return 0;820 833 821 834 RenderLayerBacking* backing = renderView->layer()->backing(); … … 823 836 return 0; 824 837 825 return backing->graphicsLayer()->tiledBacking();826 }827 828 uint64_t FrameView::scrollLayerID() const829 {830 RenderView* renderView = this->renderView();831 if (!renderView)832 return 0;833 834 RenderLayerBacking* backing = renderView->layer()->backing();835 if (!backing)836 return 0;837 838 838 return backing->scrollingNodeIDForRole(FrameScrollingNode); 839 839 } … … 853 853 RenderView* renderView = this->renderView(); 854 854 if (!renderView) 855 return 0;855 return nullptr; 856 856 return renderView->compositor().layerForOverhangAreas(); 857 857 } … … 861 861 RenderView* renderView = this->renderView(); 862 862 if (!renderView) 863 return 0;863 return nullptr; 864 864 865 865 return renderView->compositor().updateLayerForTopOverhangArea(wantsLayer); … … 870 870 RenderView* renderView = this->renderView(); 871 871 if (!renderView) 872 return 0;872 return nullptr; 873 873 874 874 return renderView->compositor().updateLayerForBottomOverhangArea(wantsLayer); … … 1017 1017 for (Frame* frame = m_frame.get(); frame; frame = frame->tree().traverseNext(m_frame.get())) { 1018 1018 RenderView* renderView = frame->contentRenderer(); 1019 if (RenderLayerCompositor* compositor = renderView ? &renderView->compositor() : 0) {1019 if (RenderLayerCompositor* compositor = renderView ? &renderView->compositor() : nullptr) { 1020 1020 if (compositor->inCompositingMode()) 1021 1021 return true; … … 1085 1085 RenderObject* FrameView::layoutRoot(bool onlyDuringLayout) const 1086 1086 { 1087 return onlyDuringLayout && layoutPending() ? 0: m_layoutRoot;1087 return onlyDuringLayout && layoutPending() ? nullptr : m_layoutRoot; 1088 1088 } 1089 1089 … … 1104 1104 // If the embedded SVG document appears the first time, the ownerRenderer has already finished 1105 1105 // layout without knowing about the existence of the embedded SVG document, because RenderReplaced 1106 // embeddedContentBox() returns 0, as long as the embedded document isn't loaded yet. Before1106 // embeddedContentBox() returns nullptr, as long as the embedded document isn't loaded yet. Before 1107 1107 // bothering to lay out the SVG document, mark the ownerRenderer needing layout and ask its 1108 1108 // FrameView for a layout. After that the RenderEmbeddedObject (ownerRenderer) carries the … … 1305 1305 root->view().pushLayoutState(*root); 1306 1306 } 1307 LayoutStateDisabler layoutStateDisabler(disableLayoutState ? &root->view() : 0);1307 LayoutStateDisabler layoutStateDisabler(disableLayoutState ? &root->view() : nullptr); 1308 1308 RenderView::RepaintRegionAccumulator repaintRegionAccumulator(&root->view()); 1309 1309 … … 2248 2248 if (Page* page = frame().page()) 2249 2249 return &page->chrome(); 2250 return 0;2250 return nullptr; 2251 2251 } 2252 2252 … … 2461 2461 if (m_layoutRoot) { 2462 2462 m_layoutRoot->markContainingBlocksForLayout(false); 2463 m_layoutRoot = 0;2463 m_layoutRoot = nullptr; 2464 2464 } 2465 2465 if (!m_layoutSchedulingEnabled) … … 2552 2552 // Just do a full relayout. 2553 2553 m_layoutRoot->markContainingBlocksForLayout(false); 2554 m_layoutRoot = 0;2554 m_layoutRoot = nullptr; 2555 2555 newRelayoutRoot.markContainingBlocksForLayout(false); 2556 2556 InspectorInstrumentation::didInvalidateLayout(frame()); … … 2598 2598 || (renderView && renderView->needsLayout()) 2599 2599 || m_layoutRoot 2600 || (m_deferSetNeedsLayout s&& m_setNeedsLayoutWasDeferred);2600 || (m_deferSetNeedsLayoutCount && m_setNeedsLayoutWasDeferred); 2601 2601 } 2602 2602 2603 2603 void FrameView::setNeedsLayout() 2604 2604 { 2605 if (m_deferSetNeedsLayout s) {2605 if (m_deferSetNeedsLayoutCount) { 2606 2606 m_setNeedsLayoutWasDeferred = true; 2607 2607 return; … … 3400 3400 { 3401 3401 // FIXME: Walk up the frame tree and look for a scrollable parent frame or RenderLayer. 3402 return 0;3402 return nullptr; 3403 3403 } 3404 3404 … … 3672 3672 { 3673 3673 if (!parent()) 3674 return 0;3674 return nullptr; 3675 3675 3676 3676 if (Frame* parentFrame = frame().tree().parent()) 3677 3677 return parentFrame->view(); 3678 3678 3679 return 0;3679 return nullptr; 3680 3680 } 3681 3681 … … 3748 3748 if (needsLayout()) 3749 3749 layout(); 3750 PlatformGraphicsContext* const noContext = 0; 3751 GraphicsContext context( noContext);3750 3751 GraphicsContext context((PlatformGraphicsContext*)nullptr); 3752 3752 context.setUpdatingControlTints(true); 3753 3753 if (platformWidget()) { … … 4142 4142 } 4143 4143 // Use a context with painting disabled. 4144 GraphicsContext context((PlatformGraphicsContext*) 0);4144 GraphicsContext context((PlatformGraphicsContext*)nullptr); 4145 4145 renderView->setTruncatedAt(static_cast<int>(floorf(oldBottom))); 4146 4146 IntRect dirtyRect(0, static_cast<int>(floorf(oldTop)), renderView->layoutOverflowRect().maxX(), static_cast<int>(ceilf(oldBottom - oldTop))); … … 4457 4457 if (frame().document()) 4458 4458 return frame().document()->existingAXObjectCache(); 4459 return 0;4459 return nullptr; 4460 4460 } 4461 4461 -
trunk/Source/WebCore/page/FrameView.h
r180063 r180574 711 711 FloatRect m_exposedRect; 712 712 713 unsigned m_deferSetNeedsLayout s;713 unsigned m_deferSetNeedsLayoutCount; 714 714 bool m_setNeedsLayoutWasDeferred; 715 715 -
trunk/Source/WebCore/rendering/RenderObject.cpp
r180273 r180574 108 108 : CachedImageClient() 109 109 , m_node(node) 110 , m_parent( 0)111 , m_previous( 0)112 , m_next( 0)110 , m_parent(nullptr) 111 , m_previous(nullptr) 112 , m_next(nullptr) 113 113 #ifndef NDEBUG 114 114 , m_hasAXObject(false) … … 222 222 { 223 223 if (this == stayWithin) 224 return 0;224 return nullptr; 225 225 226 226 const RenderObject* current = this; … … 229 229 current = current->parent(); 230 230 if (!current || current == stayWithin) 231 return 0;231 return nullptr; 232 232 } 233 233 return next; … … 248 248 { 249 249 if (this == stayWithin) 250 return 0;250 return nullptr; 251 251 252 252 return previousInPreOrder(); … … 265 265 RenderObject* r = firstChildSlow(); 266 266 while (r) { 267 RenderObject* n = 0;267 RenderObject* n = nullptr; 268 268 n = r->firstChildSlow(); 269 269 if (!n) … … 278 278 RenderObject* r = lastChildSlow(); 279 279 while (r) { 280 RenderObject* n = 0;280 RenderObject* n = nullptr; 281 281 n = r->lastChildSlow(); 282 282 if (!n) … … 297 297 } 298 298 if (this == stayWithin) 299 return 0;299 return nullptr; 300 300 if (nextSibling()) { 301 301 ASSERT(!stayWithin || nextSibling()->isDescendantOf(stayWithin)); … … 309 309 return n->nextSibling(); 310 310 } 311 return 0;311 return nullptr; 312 312 } 313 313 … … 330 330 331 331 if (this == stayWithin) 332 return 0;332 return nullptr; 333 333 334 334 // Now we traverse other nodes if they exist, otherwise … … 341 341 } 342 342 if (!n) 343 return 0;343 return nullptr; 344 344 for (RenderObject* sibling = n->nextSibling(); sibling; sibling = sibling->nextSibling()) { 345 345 overflowType = inclusionFunction(sibling); … … 355 355 currentDepth--; 356 356 } else 357 return 0;358 } 359 return 0;357 return nullptr; 358 } 359 return nullptr; 360 360 } 361 361 … … 370 370 371 371 if (this == stayWithin) 372 return 0;372 return nullptr; 373 373 374 374 for (RenderObject* sibling = nextSibling(); sibling; sibling = sibling->nextSibling()) { … … 393 393 n = n->parent(); 394 394 else 395 return 0;396 } 397 } 398 return 0;395 return nullptr; 396 } 397 } 398 return nullptr; 399 399 } 400 400 … … 524 524 RenderBlock* RenderObject::firstLineBlock() const 525 525 { 526 return 0;526 return nullptr; 527 527 } 528 528 … … 1201 1201 // If we have already found a repaint container then we will repaint into that container only if it is part of the same 1202 1202 // flow thread. Otherwise we will need to catch the repaint call and send it to the flow thread. 1203 RenderFlowThread* repaintContainerFlowThread = repaintContainer ? repaintContainer->flowThreadContainingBlock() : 0;1203 RenderFlowThread* repaintContainerFlowThread = repaintContainer ? repaintContainer->flowThreadContainingBlock() : nullptr; 1204 1204 if (!repaintContainerFlowThread || repaintContainerFlowThread != parentRenderFlowThread) 1205 1205 repaintContainer = parentRenderFlowThread; … … 1549 1549 #pragma clang diagnostic ignored "-Wundefined-bool-conversion" 1550 1550 #endif 1551 // As this function is intended to be used when debugging, the |this| pointer may be 0.1551 // As this function is intended to be used when debugging, the |this| pointer may be nullptr. 1552 1552 if (!this) 1553 1553 return; … … 1583 1583 { 1584 1584 TransformState transformState(TransformState::ApplyTransformDirection, localPoint); 1585 mapLocalToContainer( 0, transformState, mode | ApplyContainerFlip);1585 mapLocalToContainer(nullptr, transformState, mode | ApplyContainerFlip); 1586 1586 transformState.flatten(); 1587 1587 … … 1817 1817 // as we can. If we're in the tree, we'll get the root. If we 1818 1818 // aren't we'll get the root of our little subtree (most likely 1819 // we'll just return 0).1819 // we'll just return nullptr). 1820 1820 // FIXME: The definition of view() has changed to not crawl up the render tree. It might 1821 1821 // be safe now to use it. -
trunk/Source/WebCore/rendering/RenderObject.h
r180273 r180574 497 497 bool isInlineElementContinuation() const { return isElementContinuation() && isInline(); } 498 498 bool isBlockElementContinuation() const { return isElementContinuation() && !isInline(); } 499 virtual RenderBoxModelObject* virtualContinuation() const { return 0; }499 virtual RenderBoxModelObject* virtualContinuation() const { return nullptr; } 500 500 501 501 bool isFloating() const { return m_bitfields.floating(); } … … 565 565 566 566 // Returns true if this renderer is rooted, and optionally returns the hosting view (the root of the hierarchy). 567 bool isRooted(RenderView** = 0) const;568 569 Node* node() const { return isAnonymous() ? 0: &m_node; }570 Node* nonPseudoNode() const { return isPseudoElement() ? 0: node(); }567 bool isRooted(RenderView** = nullptr) const; 568 569 Node* node() const { return isAnonymous() ? nullptr : &m_node; } 570 Node* nonPseudoNode() const { return isPseudoElement() ? nullptr : node(); } 571 571 572 572 // Returns the styled node that caused the generation of this renderer. … … 576 576 577 577 Document& document() const { return m_node.document(); } 578 Frame& frame() const; // Defined in RenderView.h578 Frame& frame() const; 579 579 580 580 bool hasOutlineAnnotation() const; … … 584 584 // If repaintContainer and repaintContainerSkipped are not null, on return *repaintContainerSkipped 585 585 // is true if the renderer returned is an ancestor of repaintContainer. 586 RenderElement* container(const RenderLayerModelObject* repaintContainer = 0, bool* repaintContainerSkipped = 0) const;586 RenderElement* container(const RenderLayerModelObject* repaintContainer = nullptr, bool* repaintContainerSkipped = nullptr) const; 587 587 588 588 RenderBoxModelObject* offsetParent() const; 589 589 590 void markContainingBlocksForLayout(bool scheduleRelayout = true, RenderElement* newRoot = 0);590 void markContainingBlocksForLayout(bool scheduleRelayout = true, RenderElement* newRoot = nullptr); 591 591 void setNeedsLayout(MarkingBehavior = MarkContainingBlockChain); 592 592 void clearNeedsLayout(); … … 657 657 658 658 // Convert a local quad to absolute coordinates, taking transforms into account. 659 FloatQuad localToAbsoluteQuad(const FloatQuad& quad, MapCoordinatesFlags mode = 0, bool* wasFixed = 0) const660 { 661 return localToContainerQuad(quad, 0, mode, wasFixed);659 FloatQuad localToAbsoluteQuad(const FloatQuad& quad, MapCoordinatesFlags mode = 0, bool* wasFixed = nullptr) const 660 { 661 return localToContainerQuad(quad, nullptr, mode, wasFixed); 662 662 } 663 663 // Convert an absolute quad to local coordinates. … … 665 665 666 666 // Convert a local quad into the coordinate system of container, taking transforms into account. 667 WEBCORE_EXPORT FloatQuad localToContainerQuad(const FloatQuad&, const RenderLayerModelObject* repaintContainer, MapCoordinatesFlags = 0, bool* wasFixed = 0) const;668 WEBCORE_EXPORT FloatPoint localToContainerPoint(const FloatPoint&, const RenderLayerModelObject* repaintContainer, MapCoordinatesFlags = 0, bool* wasFixed = 0) const;667 WEBCORE_EXPORT FloatQuad localToContainerQuad(const FloatQuad&, const RenderLayerModelObject* repaintContainer, MapCoordinatesFlags = 0, bool* wasFixed = nullptr) const; 668 WEBCORE_EXPORT FloatPoint localToContainerPoint(const FloatPoint&, const RenderLayerModelObject* repaintContainer, MapCoordinatesFlags = 0, bool* wasFixed = nullptr) const; 669 669 670 670 // Return the offset from the container() renderer (excluding transforms). In multi-column layout, 671 671 // different offsets apply at different points, so return the offset that applies to the given point. 672 virtual LayoutSize offsetFromContainer(RenderElement&, const LayoutPoint&, bool* offsetDependsOnPoint = 0) const;672 virtual LayoutSize offsetFromContainer(RenderElement&, const LayoutPoint&, bool* offsetDependsOnPoint = nullptr) const; 673 673 // Return the offset from an object up the container() chain. Asserts that none of the intermediate objects have transforms. 674 674 LayoutSize offsetFromAncestorContainer(RenderElement&) const; … … 686 686 687 687 // Build an array of quads in absolute coords for line boxes 688 virtual void absoluteQuads(Vector<FloatQuad>&, bool* /*wasFixed*/ = 0) const { }688 virtual void absoluteQuads(Vector<FloatQuad>&, bool* /*wasFixed*/ = nullptr) const { } 689 689 690 690 virtual void absoluteFocusRingQuads(Vector<FloatQuad>&); … … 710 710 TextDecorationStyle& underlineStyle, TextDecorationStyle& overlineStyle, TextDecorationStyle& linethroughStyle, bool firstlineStyle = false); 711 711 712 // Return the RenderLayerModelObject in the container chain which is responsible for painting this object, or 0712 // Return the RenderLayerModelObject in the container chain which is responsible for painting this object, or nullptr 713 713 // if painting is root-relative. This is the container that should be passed to the 'forRepaint' 714 714 // methods. 715 715 RenderLayerModelObject* containerForRepaint() const; 716 716 // Actually do the repaint of rect r for this object which has been computed in the coordinate space 717 // of repaintContainer. If repaintContainer is 0, repaint via the view.717 // of repaintContainer. If repaintContainer is nullptr, repaint via the view. 718 718 void repaintUsingContainer(const RenderLayerModelObject* repaintContainer, const LayoutRect&, bool shouldClipToLayer = true) const; 719 719 … … 734 734 LayoutRect absoluteClippedOverflowRect() const 735 735 { 736 return clippedOverflowRectForRepaint( 0);736 return clippedOverflowRectForRepaint(nullptr); 737 737 } 738 738 WEBCORE_EXPORT IntRect pixelSnappedAbsoluteClippedOverflowRect() const; 739 739 virtual LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObject* repaintContainer) const; 740 740 virtual LayoutRect rectWithOutlineForRepaint(const RenderLayerModelObject* repaintContainer, LayoutUnit outlineWidth) const; 741 virtual LayoutRect outlineBoundsForRepaint(const RenderLayerModelObject* /*repaintContainer*/, const RenderGeometryMap* = 0) const { return LayoutRect(); }741 virtual LayoutRect outlineBoundsForRepaint(const RenderLayerModelObject* /*repaintContainer*/, const RenderGeometryMap* = nullptr) const { return LayoutRect(); } 742 742 743 743 // Given a rect in the object's coordinate space, compute a rect suitable for repainting … … 745 745 void computeAbsoluteRepaintRect(LayoutRect& r, bool fixed = false) const 746 746 { 747 computeRectForRepaint( 0, r, fixed);747 computeRectForRepaint(nullptr, r, fixed); 748 748 } 749 749 // Given a rect in the object's coordinate space, compute a rect suitable for repainting … … 778 778 // A single rectangle that encompasses all of the selected objects within this object. Used to determine the tightest 779 779 // possible bounding box for the selection. 780 LayoutRect selectionRect(bool clipToVisibleContent = true) { return selectionRectForRepaint( 0, clipToVisibleContent); }780 LayoutRect selectionRect(bool clipToVisibleContent = true) { return selectionRectForRepaint(nullptr, clipToVisibleContent); } 781 781 virtual LayoutRect selectionRectForRepaint(const RenderLayerModelObject* /*repaintContainer*/, bool /*clipToVisibleContent*/ = true) { return LayoutRect(); } 782 782 … … 793 793 * useful for character range rect computations 794 794 */ 795 virtual LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* extraWidthToEndOfLine = 0);795 virtual LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* extraWidthToEndOfLine = nullptr); 796 796 797 797 // When performing a global document tear-down, the renderer of the document is cleared. We use this … … 822 822 virtual int nextOffset(int current) const; 823 823 824 virtual void imageChanged(CachedImage*, const IntRect* = 0) override;825 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) { }824 virtual void imageChanged(CachedImage*, const IntRect* = nullptr) override; 825 virtual void imageChanged(WrappedImagePtr, const IntRect* = nullptr) { } 826 826 827 827 SelectionSubtreeRoot& selectionRoot() const; … … 834 834 // Map points and quads through elements, potentially via 3d transforms. You should never need to call these directly; use 835 835 // localToAbsolute/absoluteToLocal methods instead. 836 virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = 0) const;836 virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = nullptr) const; 837 837 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) const; 838 838 … … 844 844 void getTransformFromContainer(const RenderObject* container, const LayoutSize& offsetInContainer, TransformationMatrix&) const; 845 845 846 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint& /* additionalOffset */, const RenderLayerModelObject* /* paintContainer */ = 0) { };846 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint& /* additionalOffset */, const RenderLayerModelObject* /* paintContainer */ = nullptr) { }; 847 847 848 848 LayoutRect absoluteOutlineBounds() const 849 849 { 850 return outlineBoundsForRepaint( 0);850 return outlineBoundsForRepaint(nullptr); 851 851 } 852 852 -
trunk/Source/WebCore/rendering/RenderView.cpp
r179143 r180574 81 81 RenderObject* next() 82 82 { 83 RenderObject* currentSpan = m_spannerStack.isEmpty() ? 0: m_spannerStack.last()->spanner();83 RenderObject* currentSpan = m_spannerStack.isEmpty() ? nullptr : m_spannerStack.last()->spanner(); 84 84 m_current = m_current->nextInPreOrder(currentSpan); 85 85 checkForSpanner(); … … 97 97 : RenderBlockFlow(document, WTF::move(style)) 98 98 , m_frameView(*document.view()) 99 , m_selectionUnsplitStart( 0)100 , m_selectionUnsplitEnd( 0)99 , m_selectionUnsplitStart(nullptr) 100 , m_selectionUnsplitEnd(nullptr) 101 101 , m_selectionUnsplitStartPos(-1) 102 102 , m_selectionUnsplitEndPos(-1) … … 108 108 , m_layoutState(nullptr) 109 109 , m_layoutStateDisableCount(0) 110 , m_renderQuoteHead( 0)110 , m_renderQuoteHead(nullptr) 111 111 , m_renderCounterCount(0) 112 112 , m_selectionWasCaret(false) … … 416 416 void RenderView::mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState& transformState, MapCoordinatesFlags mode, bool* wasFixed) const 417 417 { 418 // If a container was specified, and was not 0or the RenderView,418 // If a container was specified, and was not nullptr or the RenderView, 419 419 // then we should have found it by now. 420 420 ASSERT_ARG(repaintContainer, !repaintContainer || repaintContainer == this); … … 437 437 const RenderObject* RenderView::pushMappingToContainer(const RenderLayerModelObject* ancestorToStopAt, RenderGeometryMap& geometryMap) const 438 438 { 439 // If a container was specified, and was not 0or the RenderView,439 // If a container was specified, and was not nullptr or the RenderView, 440 440 // then we should have found it by now. 441 441 ASSERT_ARG(ancestorToStopAt, !ancestorToStopAt || ancestorToStopAt == this); … … 454 454 geometryMap.pushView(this, scrollOffset); 455 455 456 return 0;456 return nullptr; 457 457 } 458 458 … … 682 682 void RenderView::computeRectForRepaint(const RenderLayerModelObject* repaintContainer, LayoutRect& rect, bool fixed) const 683 683 { 684 // If a container was specified, and was not 0or the RenderView,684 // If a container was specified, and was not nullptr or the RenderView, 685 685 // then we should have found it by now. 686 686 ASSERT_ARG(repaintContainer, !repaintContainer || repaintContainer == this); … … 734 734 { 735 735 if (!object) 736 return 0;736 return nullptr; 737 737 738 738 RenderObject* child = object->childAt(offset); … … 1127 1127 bool RenderView::rootBackgroundIsEntirelyFixed() const 1128 1128 { 1129 RenderElement* rootObject = document().documentElement() ? document().documentElement()->renderer() : 0;1129 RenderElement* rootObject = document().documentElement() ? document().documentElement()->renderer() : nullptr; 1130 1130 if (!rootObject) 1131 1131 return false; -
trunk/Source/WebCore/rendering/RenderView.h
r178689 r180574 244 244 245 245 protected: 246 virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = 0) const override;246 virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = nullptr) const override; 247 247 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObject* ancestorToStopAt, RenderGeometryMap&) const override; 248 248 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) const override;
Note:
See TracChangeset
for help on using the changeset viewer.