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

Side by Side Diff: Source/core/page/PageSerializer.cpp

Issue 899163003: Move rendering/RenderObject to layout/LayoutObject. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/page/PageSerializer.h ('k') | Source/core/page/PrintContext.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 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 if (!data) { 305 if (!data) {
306 WTF_LOG_ERROR("No data for resource %s", url.string().utf8().data()); 306 WTF_LOG_ERROR("No data for resource %s", url.string().utf8().data());
307 return; 307 return;
308 } 308 }
309 309
310 String mimeType = resource->response().mimeType(); 310 String mimeType = resource->response().mimeType();
311 m_resources->append(SerializedResource(url, mimeType, data)); 311 m_resources->append(SerializedResource(url, mimeType, data));
312 m_resourceURLs.add(url); 312 m_resourceURLs.add(url);
313 } 313 }
314 314
315 void PageSerializer::addImageToResources(ImageResource* image, RenderObject* ima geRenderer, const KURL& url) 315 void PageSerializer::addImageToResources(ImageResource* image, LayoutObject* ima geRenderer, const KURL& url)
316 { 316 {
317 if (!shouldAddURL(url)) 317 if (!shouldAddURL(url))
318 return; 318 return;
319 319
320 if (!image || image->image() == Image::nullImage() || image->errorOccurred() ) 320 if (!image || image->image() == Image::nullImage() || image->errorOccurred() )
321 return; 321 return;
322 322
323 RefPtr<SharedBuffer> data = imageRenderer ? image->imageForRenderer(imageRen derer)->data() : nullptr; 323 RefPtr<SharedBuffer> data = imageRenderer ? image->imageForRenderer(imageRen derer)->data() : nullptr;
324 if (!data) 324 if (!data)
325 data = image->image()->data(); 325 data = image->image()->data();
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 if (iter != m_blankFrameURLs.end()) 382 if (iter != m_blankFrameURLs.end())
383 return iter->value; 383 return iter->value;
384 String url = "wyciwyg://frame/" + String::number(m_blankFrameCounter++); 384 String url = "wyciwyg://frame/" + String::number(m_blankFrameCounter++);
385 KURL fakeURL(ParsedURLString, url); 385 KURL fakeURL(ParsedURLString, url);
386 m_blankFrameURLs.add(frame, fakeURL); 386 m_blankFrameURLs.add(frame, fakeURL);
387 387
388 return fakeURL; 388 return fakeURL;
389 } 389 }
390 390
391 } // namespace blink 391 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/page/PageSerializer.h ('k') | Source/core/page/PrintContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698