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

Side by Side Diff: Source/core/html/HTMLElement.cpp

Issue 33523002: Have Frame::script() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLDocument.cpp ('k') | Source/core/html/HTMLFormElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
5 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 5 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
6 * Copyright (C) 2011 Motorola Mobility. All rights reserved. 6 * Copyright (C) 2011 Motorola Mobility. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 765
766 void HTMLElement::setTranslate(bool enable) 766 void HTMLElement::setTranslate(bool enable)
767 { 767 {
768 setAttribute(translateAttr, enable ? "yes" : "no"); 768 setAttribute(translateAttr, enable ? "yes" : "no");
769 } 769 }
770 770
771 bool HTMLElement::rendererIsNeeded(const RenderStyle& style) 771 bool HTMLElement::rendererIsNeeded(const RenderStyle& style)
772 { 772 {
773 if (hasLocalName(noscriptTag)) { 773 if (hasLocalName(noscriptTag)) {
774 Frame* frame = document().frame(); 774 Frame* frame = document().frame();
775 if (frame && frame->script()->canExecuteScripts(NotAboutToExecuteScript) ) 775 if (frame && frame->script().canExecuteScripts(NotAboutToExecuteScript))
776 return false; 776 return false;
777 } else if (hasLocalName(noembedTag)) { 777 } else if (hasLocalName(noembedTag)) {
778 Frame* frame = document().frame(); 778 Frame* frame = document().frame();
779 if (frame && frame->loader()->allowPlugins(NotAboutToInstantiatePlugin)) 779 if (frame && frame->loader()->allowPlugins(NotAboutToInstantiatePlugin))
780 return false; 780 return false;
781 } 781 }
782 return Element::rendererIsNeeded(style); 782 return Element::rendererIsNeeded(style);
783 } 783 }
784 784
785 RenderObject* HTMLElement::createRenderer(RenderStyle* style) 785 RenderObject* HTMLElement::createRenderer(RenderStyle* style)
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
1122 #ifndef NDEBUG 1122 #ifndef NDEBUG
1123 1123
1124 // For use in the debugger 1124 // For use in the debugger
1125 void dumpInnerHTML(WebCore::HTMLElement*); 1125 void dumpInnerHTML(WebCore::HTMLElement*);
1126 1126
1127 void dumpInnerHTML(WebCore::HTMLElement* element) 1127 void dumpInnerHTML(WebCore::HTMLElement* element)
1128 { 1128 {
1129 printf("%s\n", element->innerHTML().ascii().data()); 1129 printf("%s\n", element->innerHTML().ascii().data());
1130 } 1130 }
1131 #endif 1131 #endif
OLDNEW
« no previous file with comments | « Source/core/html/HTMLDocument.cpp ('k') | Source/core/html/HTMLFormElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698