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

Unified Diff: sky/engine/core/dom/Element.cpp

Issue 1001913003: Remove <canvas> (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/core/dom/Document.idl ('k') | sky/engine/core/editing/Editor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/dom/Element.cpp
diff --git a/sky/engine/core/dom/Element.cpp b/sky/engine/core/dom/Element.cpp
index 20666a14ae90a52322bf29b283cc87931fe3bdca..558182c17df21b3bc7b0346c54ec3cfd05b1fd85 100644
--- a/sky/engine/core/dom/Element.cpp
+++ b/sky/engine/core/dom/Element.cpp
@@ -68,7 +68,6 @@
#include "sky/engine/core/frame/FrameView.h"
#include "sky/engine/core/frame/LocalFrame.h"
#include "sky/engine/core/frame/Settings.h"
-#include "sky/engine/core/html/HTMLCanvasElement.h"
#include "sky/engine/core/html/HTMLElement.h"
#include "sky/engine/core/html/HTMLTemplateElement.h"
#include "sky/engine/core/html/parser/HTMLDocumentParser.h"
@@ -140,10 +139,6 @@ bool Element::rendererIsFocusable() const
// callsites like Document::setFocusedElement that would currently fail on
// them. See crbug.com/251163
if (!renderer()) {
- // Elements in canvas fallback content are not rendered, but they are allowed to be
- // focusable as long as their canvas is displayed and visible.
- if (const HTMLCanvasElement* canvas = Traversal<HTMLCanvasElement>::firstAncestorOrSelf(*this))
- return canvas->renderer();
// We can't just use needsStyleRecalc() because if the node is in a
// display:none tree it might say it needs style recalc but the whole
// document is actually up to date.
@@ -1527,11 +1522,6 @@ bool Element::supportsStyleSharing() const
return false;
if (hasActiveAnimations())
return false;
- // Turn off style sharing for elements that can gain layers for reasons outside of the style system.
- // See comments in RenderObject::setStyle().
- // FIXME: Why does gaining a layer from outside the style system require disabling sharing?
- if (isHTMLCanvasElement(*this))
- return false;
return true;
}
« no previous file with comments | « sky/engine/core/dom/Document.idl ('k') | sky/engine/core/editing/Editor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698