Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
WebCore:
Reviewed by Sam. - fix http://bugs.webkit.org/show_bug.cgi?id=16770 Acid3 expects :visited styled links to restyle on iframe load Disentangle global history updating from the back/forward history. There are many cases where we don't want to create a new back/forward item, but we do still want to add to the global history (used for visited link coloring) in those cases. Test: fast/history/subframe-is-visited.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::updateGlobalHistory): Renamed from addHistoryForCurrentLocation and removed the back/forward handling. (WebCore::FrameLoader::updateHistoryForStandardLoad): Streamlined logic a bit. Replaced call to addHistoryForCurrentLocation with a call to addBackForwardItemClippedAtTarget. Added an unconditional call to updateGlobalHistory. (WebCore::FrameLoader::updateHistoryForClientRedirect): Added a FIXME; why doesn't this function update global history? (WebCore::FrameLoader::updateHistoryForBackForwardNavigation): Ditto. (WebCore::FrameLoader::updateHistoryForReload): Replaced the direct call the client with a call to the new updateGlobalHistory function. (WebCore::FrameLoader::updateHistoryForRedirectWithLockedHistory): Did the same changes as for updateHistoryForStandardLoad. * loader/FrameLoader.h: More of the same. * loader/FrameLoaderClient.h: Removed updateGlobalHistoryForReload and renamed updateGlobalHistoryForStandardLoad to updateGlobalHistory. * svg/graphics/SVGImageEmptyClients.h: (WebCore::SVGEmptyFrameLoaderClient::updateGlobalHistory): Updated to match the above. WebKit/gtk: Reviewed by Sam. - remove separate client calls for "standard" and "reload' history * WebCoreSupport/FrameLoaderClientGtk.cpp: (WebKit::FrameLoaderClient::updateGlobalHistory): * WebCoreSupport/FrameLoaderClientGtk.h: WebKit/mac: Reviewed by Sam. - remove separate client calls for "standard" and "reload' history * WebCoreSupport/WebFrameLoaderClient.h: * WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::updateGlobalHistory): WebKit/qt: Reviewed by Sam. - remove separate client calls for "standard" and "reload' history * WebCoreSupport/FrameLoaderClientQt.cpp: (WebCore::FrameLoaderClientQt::updateGlobalHistory): * WebCoreSupport/FrameLoaderClientQt.h: WebKit/win: Reviewed by Sam. - remove separate client calls for "standard" and "reload' history * WebFrame.cpp: (WebFrame::updateGlobalHistory): * WebFrame.h: WebKit/wx: Reviewed by Sam. - remove separate client calls for "standard" and "reload' history * WebKitSupport/FrameLoaderClientWx.cpp: (WebCore::FrameLoaderClientWx::updateGlobalHistory): * WebKitSupport/FrameLoaderClientWx.h: LayoutTests: Reviewed by Sam. - test for http://bugs.webkit.org/show_bug.cgi?id=16770 Acid3 expects :visited styled links to restyle on iframe load * fast/history/resources/subframe.html: Added. * fast/history/subframe-is-visited-expected.txt: Added. * fast/history/subframe-is-visited.html: Added. Canonical link: https://commits.webkit.org/24260@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@30549 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
24 changed files
with
210 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,7 @@ | ||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | ||
<html> | ||
<head> | ||
</head> | ||
<body> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,5 @@ | ||
There should be no red link displayed below. | ||
|
||
Subframe loaded; test was able to run. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,54 @@ | ||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | ||
<html> | ||
<head> | ||
|
||
<style type="text/css"> | ||
a { background-color: red; } | ||
.pending { display: none; } | ||
#link:visited { display: none; } | ||
iframe { visibility: hidden; } | ||
</style> | ||
|
||
<script type="text/javascript"> | ||
|
||
function test() | ||
{ | ||
if (window.layoutTestController) { | ||
layoutTestController.dumpAsText(); | ||
layoutTestController.waitUntilDone(); | ||
layoutTestController.keepWebHistory(); | ||
} | ||
|
||
var subframeLocation = "resources/subframe.html?" + (new Date()).valueOf(); | ||
|
||
document.getElementById('link').setAttribute("href", subframeLocation); | ||
|
||
var frame = document.createElement("iframe"); | ||
frame.setAttribute("name", subframeLocation); | ||
frame.setAttribute("src", subframeLocation); | ||
frame.setAttribute("onload", "frameLoaded()"); | ||
document.getElementById("frameHolder").appendChild(frame); | ||
} | ||
|
||
function frameLoaded() | ||
{ | ||
document.getElementById('link').removeAttribute('class'); | ||
|
||
getComputedStyle(document.getElementById('link')); | ||
|
||
document.getElementById('loadedMessage').appendChild(document.createTextNode("Subframe loaded; test was able to run.")); | ||
|
||
if (window.layoutTestController) | ||
layoutTestController.notifyDone(); | ||
} | ||
|
||
</script> | ||
|
||
</head> | ||
<body onload="test()"> | ||
<p>There should be no red link displayed below.</p> | ||
<p id="loadedMessage"></p> | ||
<p><a id="link" class="pending">If you can see this link, the test failed.</a></p> | ||
<p id="frameHolder"></p> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.