| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All R
ights Reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All R
ights Reserved. |
| 3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 | 398 |
| 399 m_didLoadUserStyleSheet = false; | 399 m_didLoadUserStyleSheet = false; |
| 400 m_userStyleSheet = String(); | 400 m_userStyleSheet = String(); |
| 401 | 401 |
| 402 // Data URLs with base64-encoded UTF-8 style sheets are common. We can proce
ss them | 402 // Data URLs with base64-encoded UTF-8 style sheets are common. We can proce
ss them |
| 403 // synchronously and avoid using a loader. | 403 // synchronously and avoid using a loader. |
| 404 if (url.protocolIsData() && url.string().startsWith("data:text/css;charset=u
tf-8;base64,")) { | 404 if (url.protocolIsData() && url.string().startsWith("data:text/css;charset=u
tf-8;base64,")) { |
| 405 m_didLoadUserStyleSheet = true; | 405 m_didLoadUserStyleSheet = true; |
| 406 | 406 |
| 407 Vector<char> styleSheetAsUTF8; | 407 Vector<char> styleSheetAsUTF8; |
| 408 if (base64Decode(decodeURLEscapeSequences(url.string().substring(35)), s
tyleSheetAsUTF8, Base64IgnoreWhitespace)) | 408 if (base64Decode(decodeURLEscapeSequences(url.string().substring(35)), s
tyleSheetAsUTF8, isSpaceOrNewline)) |
| 409 m_userStyleSheet = String::fromUTF8(styleSheetAsUTF8.data(), styleSh
eetAsUTF8.size()); | 409 m_userStyleSheet = String::fromUTF8(styleSheetAsUTF8.data(), styleSh
eetAsUTF8.size()); |
| 410 } | 410 } |
| 411 | 411 |
| 412 for (Frame* frame = mainFrame(); frame; frame = frame->tree().traverseNext()
) { | 412 for (Frame* frame = mainFrame(); frame; frame = frame->tree().traverseNext()
) { |
| 413 if (frame->document()) | 413 if (frame->document()) |
| 414 frame->document()->styleEngine()->updatePageUserSheet(); | 414 frame->document()->styleEngine()->updatePageUserSheet(); |
| 415 } | 415 } |
| 416 } | 416 } |
| 417 | 417 |
| 418 const String& Page::userStyleSheet() const | 418 const String& Page::userStyleSheet() const |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 , inspectorClient(0) | 560 , inspectorClient(0) |
| 561 , backForwardClient(0) | 561 , backForwardClient(0) |
| 562 { | 562 { |
| 563 } | 563 } |
| 564 | 564 |
| 565 Page::PageClients::~PageClients() | 565 Page::PageClients::~PageClients() |
| 566 { | 566 { |
| 567 } | 567 } |
| 568 | 568 |
| 569 } // namespace WebCore | 569 } // namespace WebCore |
| OLD | NEW |