Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 * (C) 2000 Simon Hausmann (hausmann@kde.org) | 4 * (C) 2000 Simon Hausmann (hausmann@kde.org) |
| 5 * (C) 2001 Dirk Mueller (mueller@kde.org) | 5 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 6 * Copyright (C) 2004, 2006, 2008, 2009 Apple Inc. All rights reserved. | 6 * Copyright (C) 2004, 2006, 2008, 2009 Apple Inc. 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 75 if (!isURLAllowed()) | 75 if (!isURLAllowed()) |
| 76 return; | 76 return; |
| 77 | 77 |
| 78 if (m_URL.isEmpty()) | 78 if (m_URL.isEmpty()) |
| 79 m_URL = blankURL().string(); | 79 m_URL = blankURL().string(); |
| 80 | 80 |
| 81 Frame* parentFrame = document()->frame(); | 81 Frame* parentFrame = document()->frame(); |
| 82 if (!parentFrame) | 82 if (!parentFrame) |
| 83 return; | 83 return; |
| 84 | 84 |
| 85 // Force layout before loading a subframe because the frame may need to know | |
| 86 // its dimensions and we don't want the frame to waste effort laying out | |
| 87 // with incorrect dimensions. | |
| 88 // | |
| 89 // FIXME: This is potentially too much work. We really only need to do | |
| 90 // enough to calculate the width and height of the subframe. | |
| 91 document()->updateLayoutIgnorePendingStylesheets(); | |
|
esprehn
2013/07/16 00:49:41
This isn't the right place to do this, you're goin
| |
| 92 | |
| 85 parentFrame->loader()->subframeLoader()->requestFrame(this, m_URL, m_frameNa me, lockBackForwardList); | 93 parentFrame->loader()->subframeLoader()->requestFrame(this, m_URL, m_frameNa me, lockBackForwardList); |
| 86 } | 94 } |
| 87 | 95 |
| 88 void HTMLFrameElementBase::parseAttribute(const QualifiedName& name, const Atomi cString& value) | 96 void HTMLFrameElementBase::parseAttribute(const QualifiedName& name, const Atomi cString& value) |
| 89 { | 97 { |
| 90 if (name == srcdocAttr) | 98 if (name == srcdocAttr) |
| 91 setLocation("about:srcdoc"); | 99 setLocation("about:srcdoc"); |
| 92 else if (name == srcAttr && !fastHasAttribute(srcdocAttr)) | 100 else if (name == srcAttr && !fastHasAttribute(srcdocAttr)) |
| 93 setLocation(stripLeadingAndTrailingHTMLSpaces(value)); | 101 setLocation(stripLeadingAndTrailingHTMLSpaces(value)); |
| 94 else if (isIdAttributeName(name)) { | 102 else if (isIdAttributeName(name)) { |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 222 | 230 |
| 223 int HTMLFrameElementBase::height() | 231 int HTMLFrameElementBase::height() |
| 224 { | 232 { |
| 225 document()->updateLayoutIgnorePendingStylesheets(); | 233 document()->updateLayoutIgnorePendingStylesheets(); |
| 226 if (!renderBox()) | 234 if (!renderBox()) |
| 227 return 0; | 235 return 0; |
| 228 return renderBox()->height(); | 236 return renderBox()->height(); |
| 229 } | 237 } |
| 230 | 238 |
| 231 } // namespace WebCore | 239 } // namespace WebCore |
| OLD | NEW |