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

Side by Side Diff: Source/core/rendering/RenderBlock.cpp

Issue 23549008: Have Node::diff() take a Document reference in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/Node.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2007 David Smith (catfish.man@gmail.com) 4 * (C) 2007 David Smith (catfish.man@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. 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 6564 matching lines...) Expand 10 before | Expand all | Expand 10 after
6575 return 0; 6575 return 0;
6576 } 6576 }
6577 6577
6578 void RenderBlock::updateFirstLetterStyle(RenderObject* firstLetterBlock, RenderO bject* currentChild) 6578 void RenderBlock::updateFirstLetterStyle(RenderObject* firstLetterBlock, RenderO bject* currentChild)
6579 { 6579 {
6580 RenderObject* firstLetter = currentChild->parent(); 6580 RenderObject* firstLetter = currentChild->parent();
6581 RenderObject* firstLetterContainer = firstLetter->parent(); 6581 RenderObject* firstLetterContainer = firstLetter->parent();
6582 RenderStyle* pseudoStyle = styleForFirstLetter(firstLetterBlock, firstLetter Container); 6582 RenderStyle* pseudoStyle = styleForFirstLetter(firstLetterBlock, firstLetter Container);
6583 ASSERT(firstLetter->isFloating() || firstLetter->isInline()); 6583 ASSERT(firstLetter->isFloating() || firstLetter->isInline());
6584 6584
6585 if (Node::diff(firstLetter->style(), pseudoStyle, &document()) == Node::Reat tach) { 6585 if (Node::diff(firstLetter->style(), pseudoStyle, document()) == Node::Reatt ach) {
6586 // The first-letter renderer needs to be replaced. Create a new renderer of the right type. 6586 // The first-letter renderer needs to be replaced. Create a new renderer of the right type.
6587 RenderObject* newFirstLetter; 6587 RenderObject* newFirstLetter;
6588 if (pseudoStyle->display() == INLINE) 6588 if (pseudoStyle->display() == INLINE)
6589 newFirstLetter = RenderInline::createAnonymous(&document()); 6589 newFirstLetter = RenderInline::createAnonymous(&document());
6590 else 6590 else
6591 newFirstLetter = RenderBlock::createAnonymous(&document()); 6591 newFirstLetter = RenderBlock::createAnonymous(&document());
6592 newFirstLetter->setStyle(pseudoStyle); 6592 newFirstLetter->setStyle(pseudoStyle);
6593 6593
6594 // Move the first letter into the new renderer. 6594 // Move the first letter into the new renderer.
6595 LayoutStateDisabler layoutStateDisabler(view()); 6595 LayoutStateDisabler layoutStateDisabler(view());
(...skipping 1442 matching lines...) Expand 10 before | Expand all | Expand 10 after
8038 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const 8038 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const
8039 { 8039 {
8040 showRenderObject(); 8040 showRenderObject();
8041 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) 8041 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box())
8042 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); 8042 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1);
8043 } 8043 }
8044 8044
8045 #endif 8045 #endif
8046 8046
8047 } // namespace WebCore 8047 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/Node.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698