OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. |
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
(...skipping 4200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4211 && !ElementTraversal::firstWithin(*m_titleElement) | 4211 && !ElementTraversal::firstWithin(*m_titleElement) |
4212 && encoding() == Latin1Encoding() | 4212 && encoding() == Latin1Encoding() |
4213 && m_titleElement->textContent().containsOnlyLatin1()) { | 4213 && m_titleElement->textContent().containsOnlyLatin1()) { |
4214 | 4214 |
4215 CString originalBytes = m_titleElement->textContent().latin1(); | 4215 CString originalBytes = m_titleElement->textContent().latin1(); |
4216 OwnPtr<TextCodec> codec = newTextCodec(newData.encoding()); | 4216 OwnPtr<TextCodec> codec = newTextCodec(newData.encoding()); |
4217 String correctlyDecodedTitle = codec->decode(originalBytes.data(), origi
nalBytes.length(), DataEOF); | 4217 String correctlyDecodedTitle = codec->decode(originalBytes.data(), origi
nalBytes.length(), DataEOF); |
4218 m_titleElement->setTextContent(correctlyDecodedTitle); | 4218 m_titleElement->setTextContent(correctlyDecodedTitle); |
4219 } | 4219 } |
4220 | 4220 |
| 4221 ASSERT(newData.encoding().isValid()); |
4221 m_encodingData = newData; | 4222 m_encodingData = newData; |
4222 | 4223 |
4223 // FIXME: Should be removed as part of https://code.google.com/p/chromium/is
sues/detail?id=319643 | 4224 // FIXME: Should be removed as part of https://code.google.com/p/chromium/is
sues/detail?id=319643 |
4224 bool shouldUseVisualOrdering = m_encodingData.encoding().usesVisualOrdering(
); | 4225 bool shouldUseVisualOrdering = m_encodingData.encoding().usesVisualOrdering(
); |
4225 if (shouldUseVisualOrdering != m_visuallyOrdered) { | 4226 if (shouldUseVisualOrdering != m_visuallyOrdered) { |
4226 m_visuallyOrdered = shouldUseVisualOrdering; | 4227 m_visuallyOrdered = shouldUseVisualOrdering; |
4227 // FIXME: How is possible to not have a layoutObject here? | 4228 // FIXME: How is possible to not have a layoutObject here? |
4228 if (layoutView()) | 4229 if (layoutView()) |
4229 layoutView()->mutableStyleRef().setRTLOrdering(m_visuallyOrdered ? V
isualOrder : LogicalOrder); | 4230 layoutView()->mutableStyleRef().setRTLOrdering(m_visuallyOrdered ? V
isualOrder : LogicalOrder); |
4230 setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::cre
ate(StyleChangeReason::VisuallyOrdered)); | 4231 setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::cre
ate(StyleChangeReason::VisuallyOrdered)); |
(...skipping 1508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5739 #ifndef NDEBUG | 5740 #ifndef NDEBUG |
5740 using namespace blink; | 5741 using namespace blink; |
5741 void showLiveDocumentInstances() | 5742 void showLiveDocumentInstances() |
5742 { | 5743 { |
5743 WeakDocumentSet& set = liveDocumentSet(); | 5744 WeakDocumentSet& set = liveDocumentSet(); |
5744 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5745 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
5745 for (Document* document : set) | 5746 for (Document* document : set) |
5746 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); | 5747 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); |
5747 } | 5748 } |
5748 #endif | 5749 #endif |
OLD | NEW |