| 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) 2001 Peter Kelly (pmk@post.com) | 4 * (C) 2001 Peter Kelly (pmk@post.com) |
| 5 * (C) 2001 Dirk Mueller (mueller@kde.org) | 5 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 6 * (C) 2007 David Smith (catfish.man@gmail.com) | 6 * (C) 2007 David Smith (catfish.man@gmail.com) |
| 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. | 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. |
| 8 * (C) 2007 Eric Seidel (eric@webkit.org) | 8 * (C) 2007 Eric Seidel (eric@webkit.org) |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 1290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1301 | 1301 |
| 1302 // If the stylesheets have already been loaded we can reliably check isFocus
able. | 1302 // If the stylesheets have already been loaded we can reliably check isFocus
able. |
| 1303 // If not, we continue and set the focused node on the focus controller belo
w so | 1303 // If not, we continue and set the focused node on the focus controller belo
w so |
| 1304 // that it can be updated soon after attach. | 1304 // that it can be updated soon after attach. |
| 1305 if (doc->haveStylesheetsLoaded()) { | 1305 if (doc->haveStylesheetsLoaded()) { |
| 1306 doc->updateLayoutIgnorePendingStylesheets(); | 1306 doc->updateLayoutIgnorePendingStylesheets(); |
| 1307 if (!isFocusable()) | 1307 if (!isFocusable()) |
| 1308 return; | 1308 return; |
| 1309 } | 1309 } |
| 1310 | 1310 |
| 1311 if (Page* page = doc->page()) | 1311 RefPtr<Node> protect; |
| 1312 if (Page* page = doc->page()) { |
| 1313 // Focus and change event handlers can cause us to lose our last ref. |
| 1314 protect = this; |
| 1312 page->focusController()->setFocusedNode(this, doc->frame()); | 1315 page->focusController()->setFocusedNode(this, doc->frame()); |
| 1316 } |
| 1313 | 1317 |
| 1314 // Setting the focused node above might have invalidated the layout due to s
cripts. | 1318 // Setting the focused node above might have invalidated the layout due to s
cripts. |
| 1315 doc->updateLayoutIgnorePendingStylesheets(); | 1319 doc->updateLayoutIgnorePendingStylesheets(); |
| 1316 | 1320 |
| 1317 if (!isFocusable()) { | 1321 if (!isFocusable()) { |
| 1318 ensureRareData()->setNeedsFocusAppearanceUpdateSoonAfterAttach(true); | 1322 ensureRareData()->setNeedsFocusAppearanceUpdateSoonAfterAttach(true); |
| 1319 return; | 1323 return; |
| 1320 } | 1324 } |
| 1321 | 1325 |
| 1322 cancelFocusAppearanceUpdate(); | 1326 cancelFocusAppearanceUpdate(); |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1532 { | 1536 { |
| 1533 // Only create renderers for SVG elements whose parents are SVG elements, or
for proper <svg xmlns="svgNS"> subdocuments. | 1537 // Only create renderers for SVG elements whose parents are SVG elements, or
for proper <svg xmlns="svgNS"> subdocuments. |
| 1534 if (child->isSVGElement()) | 1538 if (child->isSVGElement()) |
| 1535 return child->hasTagName(SVGNames::svgTag) || isSVGElement(); | 1539 return child->hasTagName(SVGNames::svgTag) || isSVGElement(); |
| 1536 | 1540 |
| 1537 return Node::childShouldCreateRenderer(child); | 1541 return Node::childShouldCreateRenderer(child); |
| 1538 } | 1542 } |
| 1539 #endif | 1543 #endif |
| 1540 | 1544 |
| 1541 } // namespace WebCore | 1545 } // namespace WebCore |
| OLD | NEW |