Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Side by Side Diff: Source/core/rendering/svg/SVGRootInlineBox.cpp

Issue 21430003: Implement interfaces in PaintInfo and make it a class. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@getterPaintInfo01
Patch Set: Fixed Linux compilation (hopefuly Windows too), addressing some reviewer's suggestions. Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> 2 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz>
3 * Copyright (C) 2006 Apple Computer Inc. 3 * Copyright (C) 2006 Apple Computer Inc.
4 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> 4 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
5 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 5 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
6 * Copyright (C) 2011 Torch Mobile (Beijing) CO. Ltd. All rights reserved. 6 * Copyright (C) 2011 Torch Mobile (Beijing) CO. Ltd. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 17 matching lines...) Expand all
28 #include "core/rendering/svg/RenderSVGInlineText.h" 28 #include "core/rendering/svg/RenderSVGInlineText.h"
29 #include "core/rendering/svg/RenderSVGText.h" 29 #include "core/rendering/svg/RenderSVGText.h"
30 #include "core/rendering/svg/SVGInlineFlowBox.h" 30 #include "core/rendering/svg/SVGInlineFlowBox.h"
31 #include "core/rendering/svg/SVGInlineTextBox.h" 31 #include "core/rendering/svg/SVGInlineTextBox.h"
32 #include "core/rendering/svg/SVGRenderingContext.h" 32 #include "core/rendering/svg/SVGRenderingContext.h"
33 33
34 namespace WebCore { 34 namespace WebCore {
35 35
36 void SVGRootInlineBox::paint(PaintInfo& paintInfo, const LayoutPoint&, LayoutUni t, LayoutUnit) 36 void SVGRootInlineBox::paint(PaintInfo& paintInfo, const LayoutPoint&, LayoutUni t, LayoutUnit)
37 { 37 {
38 ASSERT(paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPh aseSelection); 38 ASSERT(paintInfo.getPhase() == PaintPhaseForeground || paintInfo.getPhase() == PaintPhaseSelection);
39 ASSERT(!paintInfo.context->paintingDisabled()); 39 ASSERT(!paintInfo.getContext()->paintingDisabled());
40 40
41 RenderObject* boxRenderer = renderer(); 41 RenderObject* boxRenderer = renderer();
42 ASSERT(boxRenderer); 42 ASSERT(boxRenderer);
43 43
44 bool isPrinting = renderer()->document()->printing(); 44 bool isPrinting = renderer()->document()->printing();
45 bool hasSelection = !isPrinting && selectionState() != RenderObject::Selecti onNone; 45 bool hasSelection = !isPrinting && selectionState() != RenderObject::Selecti onNone;
46 46
47 PaintInfo childPaintInfo(paintInfo); 47 PaintInfo childPaintInfo(paintInfo);
48 if (hasSelection) { 48 if (hasSelection) {
49 for (InlineBox* child = firstChild(); child; child = child->nextOnLine() ) { 49 for (InlineBox* child = firstChild(); child; child = child->nextOnLine() ) {
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 } 299 }
300 } 300 }
301 301
302 void SVGRootInlineBox::reorderValueLists(Vector<SVGTextLayoutAttributes*>& attri butes) 302 void SVGRootInlineBox::reorderValueLists(Vector<SVGTextLayoutAttributes*>& attri butes)
303 { 303 {
304 Vector<InlineBox*> leafBoxesInLogicalOrder; 304 Vector<InlineBox*> leafBoxesInLogicalOrder;
305 collectLeafBoxesInLogicalOrder(leafBoxesInLogicalOrder, reverseInlineBoxRang eAndValueListsIfNeeded, &attributes); 305 collectLeafBoxesInLogicalOrder(leafBoxesInLogicalOrder, reverseInlineBoxRang eAndValueListsIfNeeded, &attributes);
306 } 306 }
307 307
308 } // namespace WebCore 308 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698