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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBox.cpp

Issue 2657443005: Migrate WTF::HashSet::add() to ::insert() [part 1 of N] (Closed)
Patch Set: Created 3 years, 11 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) 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) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc.
7 * All rights reserved. 7 * All rights reserved.
8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 5655 matching lines...) Expand 10 before | Expand all | Expand 10 after
5666 5666
5667 void LayoutBox::clearSnapAreas() { 5667 void LayoutBox::clearSnapAreas() {
5668 if (SnapAreaSet* areas = snapAreas()) { 5668 if (SnapAreaSet* areas = snapAreas()) {
5669 for (auto& snapArea : *areas) 5669 for (auto& snapArea : *areas)
5670 snapArea->m_rareData->m_snapContainer = nullptr; 5670 snapArea->m_rareData->m_snapContainer = nullptr;
5671 areas->clear(); 5671 areas->clear();
5672 } 5672 }
5673 } 5673 }
5674 5674
5675 void LayoutBox::addSnapArea(const LayoutBox& snapArea) { 5675 void LayoutBox::addSnapArea(const LayoutBox& snapArea) {
5676 ensureRareData().ensureSnapAreas().add(&snapArea); 5676 ensureRareData().ensureSnapAreas().insert(&snapArea);
5677 } 5677 }
5678 5678
5679 void LayoutBox::removeSnapArea(const LayoutBox& snapArea) { 5679 void LayoutBox::removeSnapArea(const LayoutBox& snapArea) {
5680 if (m_rareData && m_rareData->m_snapAreas) { 5680 if (m_rareData && m_rareData->m_snapAreas) {
5681 m_rareData->m_snapAreas->remove(&snapArea); 5681 m_rareData->m_snapAreas->remove(&snapArea);
5682 } 5682 }
5683 } 5683 }
5684 5684
5685 SnapAreaSet* LayoutBox::snapAreas() const { 5685 SnapAreaSet* LayoutBox::snapAreas() const {
5686 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; 5686 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr;
5687 } 5687 }
5688 5688
5689 LayoutRect LayoutBox::debugRect() const { 5689 LayoutRect LayoutBox::debugRect() const {
5690 LayoutRect rect = frameRect(); 5690 LayoutRect rect = frameRect();
5691 5691
5692 LayoutBlock* block = containingBlock(); 5692 LayoutBlock* block = containingBlock();
5693 if (block) 5693 if (block)
5694 block->adjustChildDebugRect(rect); 5694 block->adjustChildDebugRect(rect);
5695 5695
5696 return rect; 5696 return rect;
5697 } 5697 }
5698 5698
5699 bool LayoutBox::shouldClipOverflow() const { 5699 bool LayoutBox::shouldClipOverflow() const {
5700 return hasOverflowClip() || styleRef().containsPaint() || hasControlClip(); 5700 return hasOverflowClip() || styleRef().containsPaint() || hasControlClip();
5701 } 5701 }
5702 5702
5703 } // namespace blink 5703 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698