OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> | 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> |
3 * 1999 Lars Knoll <knoll@kde.org> | 3 * 1999 Lars Knoll <knoll@kde.org> |
4 * 1999 Antti Koivisto <koivisto@kde.org> | 4 * 1999 Antti Koivisto <koivisto@kde.org> |
5 * 2000 Dirk Mueller <mueller@kde.org> | 5 * 2000 Dirk Mueller <mueller@kde.org> |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
9 * Copyright (C) 2009 Google Inc. All rights reserved. | 9 * Copyright (C) 2009 Google Inc. All rights reserved. |
10 * | 10 * |
(...skipping 1433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1444 // and possibly repaint because :target pseudo class may have been | 1444 // and possibly repaint because :target pseudo class may have been |
1445 // set (see bug 11321). | 1445 // set (see bug 11321). |
1446 if (!url.hasFragmentIdentifier() && !m_frame->document()->cssTarget()) | 1446 if (!url.hasFragmentIdentifier() && !m_frame->document()->cssTarget()) |
1447 return false; | 1447 return false; |
1448 | 1448 |
1449 String fragmentIdentifier = url.fragmentIdentifier(); | 1449 String fragmentIdentifier = url.fragmentIdentifier(); |
1450 if (scrollToAnchor(fragmentIdentifier)) | 1450 if (scrollToAnchor(fragmentIdentifier)) |
1451 return true; | 1451 return true; |
1452 | 1452 |
1453 // Try again after decoding the ref, based on the document's encoding. | 1453 // Try again after decoding the ref, based on the document's encoding. |
1454 if (TextResourceDecoder* decoder = m_frame->document()->decoder()) | 1454 if (m_frame->document()->encoding().isValid()) |
1455 return scrollToAnchor(decodeURLEscapeSequences(fragmentIdentifier, decod
er->encoding())); | 1455 return scrollToAnchor(decodeURLEscapeSequences(fragmentIdentifier, m_fra
me->document()->encoding())); |
1456 | 1456 |
1457 return false; | 1457 return false; |
1458 } | 1458 } |
1459 | 1459 |
1460 bool FrameView::scrollToAnchor(const String& name) | 1460 bool FrameView::scrollToAnchor(const String& name) |
1461 { | 1461 { |
1462 ASSERT(m_frame->document()); | 1462 ASSERT(m_frame->document()); |
1463 | 1463 |
1464 if (!m_frame->document()->haveStylesheetsLoaded()) { | 1464 if (!m_frame->document()->haveStylesheetsLoaded()) { |
1465 m_frame->document()->setGotoAnchorNeededAfterStylesheetsLoad(true); | 1465 m_frame->document()->setGotoAnchorNeededAfterStylesheetsLoad(true); |
(...skipping 1894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3360 } | 3360 } |
3361 | 3361 |
3362 AXObjectCache* FrameView::axObjectCache() const | 3362 AXObjectCache* FrameView::axObjectCache() const |
3363 { | 3363 { |
3364 if (frame() && frame()->document()) | 3364 if (frame() && frame()->document()) |
3365 return frame()->document()->existingAXObjectCache(); | 3365 return frame()->document()->existingAXObjectCache(); |
3366 return 0; | 3366 return 0; |
3367 } | 3367 } |
3368 | 3368 |
3369 } // namespace WebCore | 3369 } // namespace WebCore |
OLD | NEW |