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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
158 #include "core/html/HTMLCollection.h" | 158 #include "core/html/HTMLCollection.h" |
159 #include "core/html/HTMLDialogElement.h" | 159 #include "core/html/HTMLDialogElement.h" |
160 #include "core/html/HTMLDocument.h" | 160 #include "core/html/HTMLDocument.h" |
161 #include "core/html/HTMLFrameOwnerElement.h" | 161 #include "core/html/HTMLFrameOwnerElement.h" |
162 #include "core/html/HTMLHeadElement.h" | 162 #include "core/html/HTMLHeadElement.h" |
163 #include "core/html/HTMLHtmlElement.h" | 163 #include "core/html/HTMLHtmlElement.h" |
164 #include "core/html/HTMLIFrameElement.h" | 164 #include "core/html/HTMLIFrameElement.h" |
165 #include "core/html/HTMLInputElement.h" | 165 #include "core/html/HTMLInputElement.h" |
166 #include "core/html/HTMLLinkElement.h" | 166 #include "core/html/HTMLLinkElement.h" |
167 #include "core/html/HTMLMetaElement.h" | 167 #include "core/html/HTMLMetaElement.h" |
168 #include "core/html/HTMLPlugInElement.h" | |
168 #include "core/html/HTMLScriptElement.h" | 169 #include "core/html/HTMLScriptElement.h" |
169 #include "core/html/HTMLTemplateElement.h" | 170 #include "core/html/HTMLTemplateElement.h" |
170 #include "core/html/HTMLTitleElement.h" | 171 #include "core/html/HTMLTitleElement.h" |
171 #include "core/html/PluginDocument.h" | 172 #include "core/html/PluginDocument.h" |
172 #include "core/html/WindowNameCollection.h" | 173 #include "core/html/WindowNameCollection.h" |
173 #include "core/html/canvas/CanvasContextCreationAttributes.h" | 174 #include "core/html/canvas/CanvasContextCreationAttributes.h" |
174 #include "core/html/canvas/CanvasFontCache.h" | 175 #include "core/html/canvas/CanvasFontCache.h" |
175 #include "core/html/canvas/CanvasRenderingContext.h" | 176 #include "core/html/canvas/CanvasRenderingContext.h" |
176 #include "core/html/forms/FormController.h" | 177 #include "core/html/forms/FormController.h" |
177 #include "core/html/imports/HTMLImportLoader.h" | 178 #include "core/html/imports/HTMLImportLoader.h" |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
362 | 363 |
363 // rule (d) above | 364 // rule (d) above |
364 CharDecompositionType decompType = decompositionType(c); | 365 CharDecompositionType decompType = decompositionType(c); |
365 if (decompType == DecompositionFont || decompType == DecompositionCompat) | 366 if (decompType == DecompositionFont || decompType == DecompositionCompat) |
366 return false; | 367 return false; |
367 | 368 |
368 return true; | 369 return true; |
369 } | 370 } |
370 | 371 |
371 static FrameViewBase* frameViewBaseForElement(const Element& focusedElement) { | 372 static FrameViewBase* frameViewBaseForElement(const Element& focusedElement) { |
373 // Check if we have a plugin. | |
dcheng
2017/03/27 22:30:42
Nit: I think this comment could be reworded to be
joelhockey
2017/03/28 22:56:23
Slightly changed wording. I didn't want this CL t
| |
374 // TODO(joelhockey): FrameViewBase class will soon be removed. It will be | |
375 // replaced with Focusable ABC that FrameView and PluginView will implement. | |
376 if (focusedElement.isHTMLElement() && | |
377 toHTMLElement(focusedElement).isPluginElement()) | |
378 return toHTMLPlugInElement(focusedElement).plugin(); | |
379 | |
372 LayoutObject* layoutObject = focusedElement.layoutObject(); | 380 LayoutObject* layoutObject = focusedElement.layoutObject(); |
373 if (!layoutObject || !layoutObject->isLayoutPart()) | 381 if (!layoutObject || !layoutObject->isLayoutPart()) |
374 return 0; | 382 return 0; |
383 | |
375 return toLayoutPart(layoutObject)->frameViewBase(); | 384 return toLayoutPart(layoutObject)->frameViewBase(); |
376 } | 385 } |
377 | 386 |
378 static bool acceptsEditingFocus(const Element& element) { | 387 static bool acceptsEditingFocus(const Element& element) { |
379 DCHECK(hasEditableStyle(element)); | 388 DCHECK(hasEditableStyle(element)); |
380 | 389 |
381 return element.document().frame() && rootEditableElement(element); | 390 return element.document().frame() && rootEditableElement(element); |
382 } | 391 } |
383 | 392 |
384 uint64_t Document::s_globalTreeVersion = 0; | 393 uint64_t Document::s_globalTreeVersion = 0; |
(...skipping 6269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6654 } | 6663 } |
6655 | 6664 |
6656 void showLiveDocumentInstances() { | 6665 void showLiveDocumentInstances() { |
6657 WeakDocumentSet& set = liveDocumentSet(); | 6666 WeakDocumentSet& set = liveDocumentSet(); |
6658 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6667 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
6659 for (blink::Document* document : set) | 6668 for (blink::Document* document : set) |
6660 fprintf(stderr, "- Document %p URL: %s\n", document, | 6669 fprintf(stderr, "- Document %p URL: %s\n", document, |
6661 document->url().getString().utf8().data()); | 6670 document->url().getString().utf8().data()); |
6662 } | 6671 } |
6663 #endif | 6672 #endif |
OLD | NEW |