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

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

Issue 2518253002: Move Partition Allocator into Chromium base. (Closed)
Patch Set: Move OOM_CRASH into its own, more specific header. Fixes Windows build. Created 4 years 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) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc.
7 * All rights reserved. 7 * All rights reserved.
8 * Copyright (C) 2009 Google Inc. All rights reserved. 8 * Copyright (C) 2009 Google Inc. All rights reserved.
9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved.
10 * (http://www.torchmobile.com/) 10 * (http://www.torchmobile.com/)
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 bool LayoutObject::s_affectsParentBlock = false; 137 bool LayoutObject::s_affectsParentBlock = false;
138 138
139 void* LayoutObject::operator new(size_t sz) { 139 void* LayoutObject::operator new(size_t sz) {
140 ASSERT(isMainThread()); 140 ASSERT(isMainThread());
141 return partitionAlloc(WTF::Partitions::layoutPartition(), sz, 141 return partitionAlloc(WTF::Partitions::layoutPartition(), sz,
142 WTF_HEAP_PROFILER_TYPE_NAME(LayoutObject)); 142 WTF_HEAP_PROFILER_TYPE_NAME(LayoutObject));
143 } 143 }
144 144
145 void LayoutObject::operator delete(void* ptr) { 145 void LayoutObject::operator delete(void* ptr) {
146 ASSERT(isMainThread()); 146 ASSERT(isMainThread());
147 partitionFree(ptr); 147 WTF::partitionFree(ptr);
148 } 148 }
149 149
150 LayoutObject* LayoutObject::createObject(Element* element, 150 LayoutObject* LayoutObject::createObject(Element* element,
151 const ComputedStyle& style) { 151 const ComputedStyle& style) {
152 ASSERT(isAllowedToModifyLayoutTreeStructure(element->document())); 152 ASSERT(isAllowedToModifyLayoutTreeStructure(element->document()));
153 153
154 // Minimal support for content properties replacing an entire element. 154 // Minimal support for content properties replacing an entire element.
155 // Works only if we have exactly one piece of content and it's a URL. 155 // Works only if we have exactly one piece of content and it's a URL.
156 // Otherwise acts as if we didn't support this feature. 156 // Otherwise acts as if we didn't support this feature.
157 const ContentData* contentData = style.contentData(); 157 const ContentData* contentData = style.contentData();
(...skipping 3350 matching lines...) Expand 10 before | Expand all | Expand 10 after
3508 const blink::LayoutObject* root = object1; 3508 const blink::LayoutObject* root = object1;
3509 while (root->parent()) 3509 while (root->parent())
3510 root = root->parent(); 3510 root = root->parent();
3511 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3511 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3512 } else { 3512 } else {
3513 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); 3513 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)");
3514 } 3514 }
3515 } 3515 }
3516 3516
3517 #endif 3517 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698