| 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 | |
| 65 inline const KURL& Location::url() const | 55 inline const KURL& Location::url() const |
| 66 { | 56 { |
| 67 const KURL& url = toLocalFrame(m_frame)->document()->url(); | 57 const KURL& url = toLocalFrame(m_frame)->document()->url(); |
| 68 if (!url.isValid()) | 58 if (!url.isValid()) |
| 69 return blankURL(); // Use "about:blank" while the page is still loading
(before we have a frame). | 59 return blankURL(); // Use "about:blank" while the page is still loading
(before we have a frame). |
| 70 | 60 |
| 71 return url; | 61 return url; |
| 72 } | 62 } |
| 73 | 63 |
| 74 String Location::href() const | 64 String Location::href() const |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 argv.append("LocalDOMWindow"); | 267 argv.append("LocalDOMWindow"); |
| 278 argv.append("url"); | 268 argv.append("url"); |
| 279 argv.append(enteredDocument->url()); | 269 argv.append(enteredDocument->url()); |
| 280 argv.append(completedURL); | 270 argv.append(completedURL); |
| 281 activityLogger->logEvent("blinkSetAttribute", argv.size(), argv.data()); | 271 activityLogger->logEvent("blinkSetAttribute", argv.size(), argv.data()); |
| 282 } | 272 } |
| 283 m_frame->navigate(*callingWindow->document(), completedURL, locationPolicy =
= SetLocation::ReplaceThisFrame, UserGestureStatus::None); | 273 m_frame->navigate(*callingWindow->document(), completedURL, locationPolicy =
= SetLocation::ReplaceThisFrame, UserGestureStatus::None); |
| 284 } | 274 } |
| 285 | 275 |
| 286 } // namespace blink | 276 } // namespace blink |
| OLD | NEW |