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

Side by Side Diff: third_party/WebKit/Source/core/loader/resource/ImageResource.cpp

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 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
OLDNEW
1 /* 1 /*
2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de)
3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org)
4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org)
5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
6 Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. 6 Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. 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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 } 258 }
259 } 259 }
260 260
261 void ImageResource::allClientsAndObserversRemoved() { 261 void ImageResource::allClientsAndObserversRemoved() {
262 CHECK(!getContent()->hasImage() || !errorOccurred()); 262 CHECK(!getContent()->hasImage() || !errorOccurred());
263 // If possible, delay the resetting until back at the event loop. Doing so 263 // If possible, delay the resetting until back at the event loop. Doing so
264 // after a conservative GC prevents resetAnimation() from upsetting ongoing 264 // after a conservative GC prevents resetAnimation() from upsetting ongoing
265 // animation updates (crbug.com/613709) 265 // animation updates (crbug.com/613709)
266 if (!ThreadHeap::willObjectBeLazilySwept(this)) { 266 if (!ThreadHeap::willObjectBeLazilySwept(this)) {
267 Platform::current()->currentThread()->getWebTaskRunner()->postTask( 267 Platform::current()->currentThread()->getWebTaskRunner()->postTask(
268 BLINK_FROM_HERE, WTF::bind(&ImageResourceContent::doResetAnimation, 268 BLINK_FROM_HERE,
269 wrapWeakPersistent(getContent()))); 269 WTF::bind(&ImageResourceContent::doResetAnimation,
270 wrapWeakPersistent(getContent())));
270 } else { 271 } else {
271 getContent()->doResetAnimation(); 272 getContent()->doResetAnimation();
272 } 273 }
273 if (m_multipartParser) 274 if (m_multipartParser)
274 m_multipartParser->cancel(); 275 m_multipartParser->cancel();
275 Resource::allClientsAndObserversRemoved(); 276 Resource::allClientsAndObserversRemoved();
276 } 277 }
277 278
278 PassRefPtr<const SharedBuffer> ImageResource::resourceBuffer() const { 279 PassRefPtr<const SharedBuffer> ImageResource::resourceBuffer() const {
279 if (data()) 280 if (data())
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 518
518 void ImageResource::updateImage( 519 void ImageResource::updateImage(
519 PassRefPtr<SharedBuffer> sharedBuffer, 520 PassRefPtr<SharedBuffer> sharedBuffer,
520 ImageResourceContent::UpdateImageOption updateImageOption, 521 ImageResourceContent::UpdateImageOption updateImageOption,
521 bool allDataReceived) { 522 bool allDataReceived) {
522 getContent()->updateImage(std::move(sharedBuffer), updateImageOption, 523 getContent()->updateImage(std::move(sharedBuffer), updateImageOption,
523 allDataReceived); 524 allDataReceived);
524 } 525 }
525 526
526 } // namespace blink 527 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698