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

Side by Side Diff: Source/web/WebPageSerializerImpl.cpp

Issue 20300002: Fix trailing whitespace in .cpp, .h, and .idl files (ex. Source/core) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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/web/WebPageSerializer.cpp ('k') | Source/web/WebScopedMicrotaskSuppression.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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 // Check whether we need to replace some resource links 320 // Check whether we need to replace some resource links
321 // with local resource paths. 321 // with local resource paths.
322 const QualifiedName& attrName = attribute->name(); 322 const QualifiedName& attrName = attribute->name();
323 if (elementHasLegalLinkAttribute(element, attrName)) { 323 if (elementHasLegalLinkAttribute(element, attrName)) {
324 // For links start with "javascript:", we do not change it. 324 // For links start with "javascript:", we do not change it.
325 if (attrValue.startsWith("javascript:", false)) 325 if (attrValue.startsWith("javascript:", false))
326 result.append(attrValue); 326 result.append(attrValue);
327 else { 327 else {
328 // Get the absolute link 328 // Get the absolute link
329 WebFrameImpl* subFrame = WebFrameImpl::fromFrameOwnerEle ment(element); 329 WebFrameImpl* subFrame = WebFrameImpl::fromFrameOwnerEle ment(element);
330 String completeURL = subFrame ? subFrame->frame()->docum ent()->url() : 330 String completeURL = subFrame ? subFrame->frame()->docum ent()->url() :
331 param->document->complet eURL(attrValue); 331 param->document->complet eURL(attrValue);
332 // Check whether we have local files for those link. 332 // Check whether we have local files for those link.
333 if (m_localLinks.contains(completeURL)) { 333 if (m_localLinks.contains(completeURL)) {
334 if (!param->directoryName.isEmpty()) { 334 if (!param->directoryName.isEmpty()) {
335 result.appendLiteral("./"); 335 result.appendLiteral("./");
336 result.append(param->directoryName); 336 result.append(param->directoryName);
337 result.append('/'); 337 result.append('/');
338 } 338 }
339 result.append(m_localLinks.get(completeURL)); 339 result.append(m_localLinks.get(completeURL));
340 } else 340 } else
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 521
522 encodeAndFlushBuffer(WebPageSerializerClient::CurrentFrameIsFinished, &p aram, ForceFlush); 522 encodeAndFlushBuffer(WebPageSerializerClient::CurrentFrameIsFinished, &p aram, ForceFlush);
523 } 523 }
524 524
525 ASSERT(m_dataBuffer.isEmpty()); 525 ASSERT(m_dataBuffer.isEmpty());
526 m_client->didSerializeDataForFrame(KURL(), WebCString("", 0), WebPageSeriali zerClient::AllFramesAreFinished); 526 m_client->didSerializeDataForFrame(KURL(), WebCString("", 0), WebPageSeriali zerClient::AllFramesAreFinished);
527 return didSerialization; 527 return didSerialization;
528 } 528 }
529 529
530 } // namespace WebKit 530 } // namespace WebKit
OLDNEW
« no previous file with comments | « Source/web/WebPageSerializer.cpp ('k') | Source/web/WebScopedMicrotaskSuppression.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698