Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: third_party/WebKit/Source/core/frame/Location.cpp

Issue 2393313002: reflow comments in core/frame (Closed)
Patch Set: tweak Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 namespace blink { 42 namespace blink {
43 43
44 Location::Location(Frame* frame) : m_frame(frame) {} 44 Location::Location(Frame* frame) : m_frame(frame) {}
45 45
46 DEFINE_TRACE(Location) { 46 DEFINE_TRACE(Location) {
47 visitor->trace(m_frame); 47 visitor->trace(m_frame);
48 } 48 }
49 49
50 inline const KURL& Location::url() const { 50 inline const KURL& Location::url() const {
51 const KURL& url = toLocalFrame(m_frame)->document()->url(); 51 const KURL& url = toLocalFrame(m_frame)->document()->url();
52 if (!url.isValid()) 52 if (!url.isValid()) {
53 return blankURL(); // Use "about:blank" while the page is still loading (be fore we have a frame). 53 // Use "about:blank" while the page is still loading (before we have a
54 // frame).
55 return blankURL();
56 }
54 57
55 return url; 58 return url;
56 } 59 }
57 60
58 String Location::href() const { 61 String Location::href() const {
59 if (!m_frame) 62 if (!m_frame)
60 return String(); 63 return String();
61 64
62 return url().strippedForUseAsHref(); 65 return url().strippedForUseAsHref();
63 } 66 }
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 argv.append(enteredDocument->url()); 297 argv.append(enteredDocument->url());
295 argv.append(completedURL); 298 argv.append(completedURL);
296 activityLogger->logEvent("blinkSetAttribute", argv.size(), argv.data()); 299 activityLogger->logEvent("blinkSetAttribute", argv.size(), argv.data());
297 } 300 }
298 m_frame->navigate(*currentWindow->document(), completedURL, 301 m_frame->navigate(*currentWindow->document(), completedURL,
299 locationPolicy == SetLocation::ReplaceThisFrame, 302 locationPolicy == SetLocation::ReplaceThisFrame,
300 UserGestureStatus::None); 303 UserGestureStatus::None);
301 } 304 }
302 305
303 } // namespace blink 306 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/Location.h ('k') | third_party/WebKit/Source/core/frame/Navigator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698