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

Side by Side Diff: third_party/WebKit/Source/web/WebFrameSerializerImpl.cpp

Issue 2707973002: Remove blacklist on .innerHTML and .outerHTML (Closed)
Patch Set: Typo fix 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
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLElement.cpp ('k') | no next file » | 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 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 if (element->hasChildren() || param->haveAddedContentsBeforeEnd) { 378 if (element->hasChildren() || param->haveAddedContentsBeforeEnd) {
379 result.append("</"); 379 result.append("</");
380 result.append(element->nodeName().lower()); 380 result.append(element->nodeName().lower());
381 result.append('>'); 381 result.append('>');
382 } else { 382 } else {
383 // Check whether we have to write end tag for empty element. 383 // Check whether we have to write end tag for empty element.
384 if (param->isHTMLDocument) { 384 if (param->isHTMLDocument) {
385 result.append('>'); 385 result.append('>');
386 // FIXME: This code is horribly wrong. WebFrameSerializerImpl must die. 386 // FIXME: This code is horribly wrong. WebFrameSerializerImpl must die.
387 if (!element->isHTMLElement() || 387 if (!element->isHTMLElement() ||
388 !toHTMLElement(element)->ieForbidsInsertHTML()) { 388 toHTMLElement(element)->shouldSerializeEndTag()) {
389 // We need to write end tag when it is required. 389 // We need to write end tag when it is required.
390 result.append("</"); 390 result.append("</");
391 result.append(element->nodeName().lower()); 391 result.append(element->nodeName().lower());
392 result.append('>'); 392 result.append('>');
393 } 393 }
394 } else { 394 } else {
395 // For xml base document. 395 // For xml base document.
396 result.append(" />"); 396 result.append(" />");
397 } 397 }
398 } 398 }
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 // Report empty contents for invalid URLs. 480 // Report empty contents for invalid URLs.
481 m_client->didSerializeDataForFrame( 481 m_client->didSerializeDataForFrame(
482 WebCString(), WebFrameSerializerClient::CurrentFrameIsFinished); 482 WebCString(), WebFrameSerializerClient::CurrentFrameIsFinished);
483 } 483 }
484 484
485 DCHECK(m_dataBuffer.isEmpty()); 485 DCHECK(m_dataBuffer.isEmpty());
486 return didSerialization; 486 return didSerialization;
487 } 487 }
488 488
489 } // namespace blink 489 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698