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

Side by Side Diff: Source/WebCore/rendering/RenderRegion.cpp

Issue 10914111: Merge 125737 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1229/
Patch Set: Created 8 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
« no previous file with comments | « Source/WebCore/rendering/RenderRegion.h ('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) 2011 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above 8 * 1. Redistributions of source code must retain the above
9 * copyright notice, this list of conditions and the following 9 * copyright notice, this list of conditions and the following
10 * disclaimer. 10 * disclaimer.
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 ObjectRegionStyleInfo styleInfo; 339 ObjectRegionStyleInfo styleInfo;
340 styleInfo.style = objectRegionStyle; 340 styleInfo.style = objectRegionStyle;
341 styleInfo.cached = true; 341 styleInfo.cached = true;
342 temp.set(object, styleInfo); 342 temp.set(object, styleInfo);
343 } 343 }
344 } 344 }
345 345
346 m_renderObjectRegionStyle.swap(temp); 346 m_renderObjectRegionStyle.swap(temp);
347 } 347 }
348 348
349 void RenderRegion::insertedIntoTree()
350 {
351 RenderReplaced::insertedIntoTree();
352
353 attachRegion();
354 }
355
349 PassRefPtr<RenderStyle> RenderRegion::computeStyleInRegion(const RenderObject* o bject) 356 PassRefPtr<RenderStyle> RenderRegion::computeStyleInRegion(const RenderObject* o bject)
350 { 357 {
351 ASSERT(object); 358 ASSERT(object);
352 ASSERT(object->view()); 359 ASSERT(object->view());
353 ASSERT(object->view()->document()); 360 ASSERT(object->view()->document());
354 ASSERT(!object->isAnonymous()); 361 ASSERT(!object->isAnonymous());
355 ASSERT(object->node() && object->node()->isElementNode()); 362 ASSERT(object->node() && object->node()->isElementNode());
356 363
357 Element* element = toElement(object->node()); 364 Element* element = toElement(object->node());
358 RefPtr<RenderStyle> renderObjectRegionStyle = object->view()->document()->st yleResolver()->styleForElement(element, 0, DisallowStyleSharing, MatchAllRules, this); 365 RefPtr<RenderStyle> renderObjectRegionStyle = object->view()->document()->st yleResolver()->styleForElement(element, 0, DisallowStyleSharing, MatchAllRules, this);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 { 417 {
411 ASSERT(object); 418 ASSERT(object);
412 m_renderObjectRegionStyle.remove(object); 419 m_renderObjectRegionStyle.remove(object);
413 420
414 // Clear the style for the children of this object. 421 // Clear the style for the children of this object.
415 for (RenderObject* child = object->firstChild(); child; child = child->nextS ibling()) 422 for (RenderObject* child = object->firstChild(); child; child = child->nextS ibling())
416 clearObjectStyleInRegion(child); 423 clearObjectStyleInRegion(child);
417 } 424 }
418 425
419 } // namespace WebCore 426 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/RenderRegion.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698