| OLD | NEW |
| 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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 const QualifiedName& attrName = it.name(); | 317 const QualifiedName& attrName = it.name(); |
| 318 String attrValue = it.value(); | 318 String attrValue = it.value(); |
| 319 | 319 |
| 320 // Skip srcdoc attribute if we will emit src attribute (for frames). | 320 // Skip srcdoc attribute if we will emit src attribute (for frames). |
| 321 if (shouldRewriteFrameSrc && attrName == HTMLNames::srcdocAttr) | 321 if (shouldRewriteFrameSrc && attrName == HTMLNames::srcdocAttr) |
| 322 continue; | 322 continue; |
| 323 | 323 |
| 324 // Rewrite the attribute value if requested. | 324 // Rewrite the attribute value if requested. |
| 325 if (element->hasLegalLinkAttribute(attrName)) { | 325 if (element->hasLegalLinkAttribute(attrName)) { |
| 326 // For links start with "javascript:", we do not change it. | 326 // For links start with "javascript:", we do not change it. |
| 327 if (!attrValue.startsWith("javascript:", TextCaseInsensitive)) { | 327 if (!attrValue.startsWith("javascript:", TextCaseASCIIInsensitive)) { |
| 328 // Get the absolute link. | 328 // Get the absolute link. |
| 329 KURL completeURL = param->document->completeURL(attrValue); | 329 KURL completeURL = param->document->completeURL(attrValue); |
| 330 | 330 |
| 331 // Check whether we have a local file to link to. | 331 // Check whether we have a local file to link to. |
| 332 WebString rewrittenURL; | 332 WebString rewrittenURL; |
| 333 if (shouldRewriteFrameSrc) { | 333 if (shouldRewriteFrameSrc) { |
| 334 attrValue = rewrittenFrameLink; | 334 attrValue = rewrittenFrameLink; |
| 335 didRewriteFrameSrc = true; | 335 didRewriteFrameSrc = true; |
| 336 } else if (m_delegate->rewriteLink(completeURL, &rewrittenURL)) { | 336 } else if (m_delegate->rewriteLink(completeURL, &rewrittenURL)) { |
| 337 attrValue = rewrittenURL; | 337 attrValue = rewrittenURL; |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |