| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2010 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 Location::Location(Frame* frame) | 45 Location::Location(Frame* frame) |
| 46 : m_frame(frame) | 46 : m_frame(frame) |
| 47 { | 47 { |
| 48 } | 48 } |
| 49 | 49 |
| 50 DEFINE_TRACE(Location) | 50 DEFINE_TRACE(Location) |
| 51 { | 51 { |
| 52 visitor->trace(m_frame); | 52 visitor->trace(m_frame); |
| 53 } | 53 } |
| 54 | 54 |
| 55 Frame* Location::frame() const |
| 56 { |
| 57 return m_frame.get(); |
| 58 } |
| 59 |
| 60 void Location::reset() |
| 61 { |
| 62 m_frame = nullptr; |
| 63 } |
| 64 |
| 55 inline const KURL& Location::url() const | 65 inline const KURL& Location::url() const |
| 56 { | 66 { |
| 57 const KURL& url = toLocalFrame(m_frame)->document()->url(); | 67 const KURL& url = toLocalFrame(m_frame)->document()->url(); |
| 58 if (!url.isValid()) | 68 if (!url.isValid()) |
| 59 return blankURL(); // Use "about:blank" while the page is still loading
(before we have a frame). | 69 return blankURL(); // Use "about:blank" while the page is still loading
(before we have a frame). |
| 60 | 70 |
| 61 return url; | 71 return url; |
| 62 } | 72 } |
| 63 | 73 |
| 64 String Location::href() const | 74 String Location::href() const |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 argv.append("LocalDOMWindow"); | 277 argv.append("LocalDOMWindow"); |
| 268 argv.append("url"); | 278 argv.append("url"); |
| 269 argv.append(enteredDocument->url()); | 279 argv.append(enteredDocument->url()); |
| 270 argv.append(completedURL); | 280 argv.append(completedURL); |
| 271 activityLogger->logEvent("blinkSetAttribute", argv.size(), argv.data()); | 281 activityLogger->logEvent("blinkSetAttribute", argv.size(), argv.data()); |
| 272 } | 282 } |
| 273 m_frame->navigate(*callingWindow->document(), completedURL, locationPolicy =
= SetLocation::ReplaceThisFrame, UserGestureStatus::None); | 283 m_frame->navigate(*callingWindow->document(), completedURL, locationPolicy =
= SetLocation::ReplaceThisFrame, UserGestureStatus::None); |
| 274 } | 284 } |
| 275 | 285 |
| 276 } // namespace blink | 286 } // namespace blink |
| OLD | NEW |