| 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 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All |
| 7 * rights reserved. | 7 * rights reserved. |
| 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| 9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
| 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 #include "core/html/HTMLCollection.h" | 157 #include "core/html/HTMLCollection.h" |
| 158 #include "core/html/HTMLDialogElement.h" | 158 #include "core/html/HTMLDialogElement.h" |
| 159 #include "core/html/HTMLDocument.h" | 159 #include "core/html/HTMLDocument.h" |
| 160 #include "core/html/HTMLFrameOwnerElement.h" | 160 #include "core/html/HTMLFrameOwnerElement.h" |
| 161 #include "core/html/HTMLHeadElement.h" | 161 #include "core/html/HTMLHeadElement.h" |
| 162 #include "core/html/HTMLHtmlElement.h" | 162 #include "core/html/HTMLHtmlElement.h" |
| 163 #include "core/html/HTMLIFrameElement.h" | 163 #include "core/html/HTMLIFrameElement.h" |
| 164 #include "core/html/HTMLInputElement.h" | 164 #include "core/html/HTMLInputElement.h" |
| 165 #include "core/html/HTMLLinkElement.h" | 165 #include "core/html/HTMLLinkElement.h" |
| 166 #include "core/html/HTMLMetaElement.h" | 166 #include "core/html/HTMLMetaElement.h" |
| 167 #include "core/html/HTMLPlugInElement.h" |
| 167 #include "core/html/HTMLScriptElement.h" | 168 #include "core/html/HTMLScriptElement.h" |
| 168 #include "core/html/HTMLTemplateElement.h" | 169 #include "core/html/HTMLTemplateElement.h" |
| 169 #include "core/html/HTMLTitleElement.h" | 170 #include "core/html/HTMLTitleElement.h" |
| 170 #include "core/html/PluginDocument.h" | 171 #include "core/html/PluginDocument.h" |
| 171 #include "core/html/WindowNameCollection.h" | 172 #include "core/html/WindowNameCollection.h" |
| 172 #include "core/html/canvas/CanvasContextCreationAttributes.h" | 173 #include "core/html/canvas/CanvasContextCreationAttributes.h" |
| 173 #include "core/html/canvas/CanvasFontCache.h" | 174 #include "core/html/canvas/CanvasFontCache.h" |
| 174 #include "core/html/canvas/CanvasRenderingContext.h" | 175 #include "core/html/canvas/CanvasRenderingContext.h" |
| 175 #include "core/html/forms/FormController.h" | 176 #include "core/html/forms/FormController.h" |
| 176 #include "core/html/imports/HTMLImportLoader.h" | 177 #include "core/html/imports/HTMLImportLoader.h" |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 | 362 |
| 362 // rule (d) above | 363 // rule (d) above |
| 363 CharDecompositionType decompType = decompositionType(c); | 364 CharDecompositionType decompType = decompositionType(c); |
| 364 if (decompType == DecompositionFont || decompType == DecompositionCompat) | 365 if (decompType == DecompositionFont || decompType == DecompositionCompat) |
| 365 return false; | 366 return false; |
| 366 | 367 |
| 367 return true; | 368 return true; |
| 368 } | 369 } |
| 369 | 370 |
| 370 static FrameViewBase* frameViewBaseForElement(const Element& focusedElement) { | 371 static FrameViewBase* frameViewBaseForElement(const Element& focusedElement) { |
| 372 // Return either plugin or frame. |
| 373 // TODO(joelhockey): FrameViewBase class will soon be removed. It will be |
| 374 // replaced with Focusable ABC that FrameView and PluginView will implement |
| 375 // and this method will return Focusable. |
| 376 if (isHTMLPlugInElement(focusedElement)) |
| 377 return toHTMLPlugInElement(focusedElement).plugin(); |
| 378 |
| 371 LayoutObject* layoutObject = focusedElement.layoutObject(); | 379 LayoutObject* layoutObject = focusedElement.layoutObject(); |
| 372 if (!layoutObject || !layoutObject->isLayoutPart()) | 380 if (!layoutObject || !layoutObject->isLayoutPart()) |
| 373 return 0; | 381 return 0; |
| 374 return toLayoutPart(layoutObject)->frameViewBase(); | 382 return toLayoutPart(layoutObject)->frameViewBase(); |
| 375 } | 383 } |
| 376 | 384 |
| 377 static bool acceptsEditingFocus(const Element& element) { | 385 static bool acceptsEditingFocus(const Element& element) { |
| 378 DCHECK(hasEditableStyle(element)); | 386 DCHECK(hasEditableStyle(element)); |
| 379 | 387 |
| 380 return element.document().frame() && rootEditableElement(element); | 388 return element.document().frame() && rootEditableElement(element); |
| (...skipping 6293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6674 } | 6682 } |
| 6675 | 6683 |
| 6676 void showLiveDocumentInstances() { | 6684 void showLiveDocumentInstances() { |
| 6677 WeakDocumentSet& set = liveDocumentSet(); | 6685 WeakDocumentSet& set = liveDocumentSet(); |
| 6678 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6686 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 6679 for (blink::Document* document : set) | 6687 for (blink::Document* document : set) |
| 6680 fprintf(stderr, "- Document %p URL: %s\n", document, | 6688 fprintf(stderr, "- Document %p URL: %s\n", document, |
| 6681 document->url().getString().utf8().data()); | 6689 document->url().getString().utf8().data()); |
| 6682 } | 6690 } |
| 6683 #endif | 6691 #endif |
| OLD | NEW |