summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandybons@chromium.org <andybons@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-25 17:29:20 +0000
committerandybons@chromium.org <andybons@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-25 17:29:20 +0000
commitb74bf5bc5dccf36272da06d2705b6793a1012063 (patch)
treeeb36ddeac1697098e746229cbeadf2247590c059
parent4944269aefcb70e7c417394033d31fef061657e4 (diff)
downloadchromium_src-b74bf5bc5dccf36272da06d2705b6793a1012063.zip
chromium_src-b74bf5bc5dccf36272da06d2705b6793a1012063.tar.gz
chromium_src-b74bf5bc5dccf36272da06d2705b6793a1012063.tar.bz2
Fixes infinite loop within the JS of the news extension that was causing a never-ending CPU spike upon expanding a story.
BUG=28428 TEST=Install the extension, expand a story, notice lack of CPU spike. Review URL: http://codereview.chromium.org/437060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33077 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/common/extensions/docs/examples/extensions/news/feed.html22
1 files changed, 11 insertions, 11 deletions
diff --git a/chrome/common/extensions/docs/examples/extensions/news/feed.html b/chrome/common/extensions/docs/examples/extensions/news/feed.html
index 0fd455d..6592a87 100644
--- a/chrome/common/extensions/docs/examples/extensions/news/feed.html
+++ b/chrome/common/extensions/docs/examples/extensions/news/feed.html
@@ -1,4 +1,4 @@
-<!doctype html>
+<!DOCTYPE html>
<html>
<head>
<style>
@@ -15,16 +15,16 @@ a {
}
.open_box {
- display:block;
- overflow:hidden;
- margin-right:4px;
- margin-top:2px;
- height:12px;
- width:12px;
+ display: block;
+ overflow: hidden;
+ margin-right: 4px;
+ margin-top: 2px;
+ height: 12px;
+ width: 12px;
float: left;
clear: left;
- background-image:url(sprite_arrows.gif);
- background-position:0px -24px;
+ background-image: url(sprite_arrows.gif);
+ background-position: 0px -24px;
cursor: pointer;
}
@@ -68,7 +68,7 @@ a {
text-align: right;
padding-top: 20px;
padding-right: 10px;
- color: #8888CC;
+ color: #88C;
}
</style>
@@ -86,6 +86,7 @@ function frameLoaded() {
links[i].addEventListener("click", showStory);
}
}
+ window.addEventListener("message", messageHandler);
}
function showStory(event) {
@@ -98,7 +99,6 @@ function messageHandler(event) {
reportHeight();
}
-window.addEventListener("message", messageHandler);
</script>
<script>
// Feed URL.