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

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

Issue 138643003: Simpler return value of HashTable::add/HashMap:add and others (Closed)
Patch Set: Daily master update (now with base url?) Created 6 years, 10 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/core/rendering/RenderObject.cpp ('k') | Source/core/rendering/RenderView.cpp » ('j') | 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 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 { 414 {
415 ASSERT(isValid()); 415 ASSERT(isValid());
416 return m_renderBoxRegionInfo.get(box); 416 return m_renderBoxRegionInfo.get(box);
417 } 417 }
418 418
419 RenderBoxRegionInfo* RenderRegion::setRenderBoxRegionInfo(const RenderBox* box, LayoutUnit logicalLeftInset, LayoutUnit logicalRightInset, 419 RenderBoxRegionInfo* RenderRegion::setRenderBoxRegionInfo(const RenderBox* box, LayoutUnit logicalLeftInset, LayoutUnit logicalRightInset,
420 bool containingBlockChainIsInset) 420 bool containingBlockChainIsInset)
421 { 421 {
422 ASSERT(isValid()); 422 ASSERT(isValid());
423 423
424 OwnPtr<RenderBoxRegionInfo>& boxInfo = m_renderBoxRegionInfo.add(box, nullpt r).iterator->value; 424 OwnPtr<RenderBoxRegionInfo>& boxInfo = m_renderBoxRegionInfo.add(box, nullpt r).storedValue->value;
425 if (boxInfo) 425 if (boxInfo)
426 *boxInfo = RenderBoxRegionInfo(logicalLeftInset, logicalRightInset, cont ainingBlockChainIsInset); 426 *boxInfo = RenderBoxRegionInfo(logicalLeftInset, logicalRightInset, cont ainingBlockChainIsInset);
427 else 427 else
428 boxInfo = adoptPtr(new RenderBoxRegionInfo(logicalLeftInset, logicalRigh tInset, containingBlockChainIsInset)); 428 boxInfo = adoptPtr(new RenderBoxRegionInfo(logicalLeftInset, logicalRigh tInset, containingBlockChainIsInset));
429 429
430 return boxInfo.get(); 430 return boxInfo.get();
431 } 431 }
432 432
433 PassOwnPtr<RenderBoxRegionInfo> RenderRegion::takeRenderBoxRegionInfo(const Rend erBox* box) 433 PassOwnPtr<RenderBoxRegionInfo> RenderRegion::takeRenderBoxRegionInfo(const Rend erBox* box)
434 { 434 {
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 return generatingNode(); 677 return generatingNode();
678 } 678 }
679 679
680 bool RenderRegion::isElementBasedRegion() const 680 bool RenderRegion::isElementBasedRegion() const
681 { 681 {
682 Node* node = nodeForRegion(); 682 Node* node = nodeForRegion();
683 return node && node->isElementNode() && !node->isPseudoElement(); 683 return node && node->isElementNode() && !node->isPseudoElement();
684 } 684 }
685 685
686 } // namespace WebCore 686 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderObject.cpp ('k') | Source/core/rendering/RenderView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698