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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLElement.cpp

Issue 2700663002: Adds keyboard functionality for videos. (Closed)
Patch Set: Add spatial nav check. Created 3 years, 7 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 unified diff | Download patch
OLDNEW
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 * Copyright (C) 2004-2008, 2013, 2014 Apple Inc. All rights reserved. 4 * Copyright (C) 2004-2008, 2013, 2014 Apple Inc. All rights reserved.
5 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. 5 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved.
6 * (http://www.torchmobile.com/) 6 * (http://www.torchmobile.com/)
7 * Copyright (C) 2011 Motorola Mobility. All rights reserved. 7 * Copyright (C) 2011 Motorola Mobility. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 if (RuntimeEnabledFeatures::hideNonceContentAttributeEnabled() && 922 if (RuntimeEnabledFeatures::hideNonceContentAttributeEnabled() &&
923 InActiveDocument() && 923 InActiveDocument() &&
924 GetDocument().GetContentSecurityPolicy()->HasHeaderDeliveredPolicy()) { 924 GetDocument().GetContentSecurityPolicy()->HasHeaderDeliveredPolicy()) {
925 setAttribute(nonceAttr, g_empty_atom); 925 setAttribute(nonceAttr, g_empty_atom);
926 } 926 }
927 } 927 }
928 928
929 return kInsertionDone; 929 return kInsertionDone;
930 } 930 }
931 931
932 bool HTMLElement::IsSpatialNavigationActive() {
933 return IsSpatialNavigationEnabled(GetDocument().GetFrame());
mlamouri (slow - plz ping) 2017/05/24 08:49:15 Maybe just make this call in MediaControlsImpl ins
lethalantidote 2017/05/24 18:46:08 Tried doing that. It's not directly accessible due
mlamouri (slow - plz ping) 2017/05/30 10:22:41 I think you would simply need to add CORE_EXPORT t
lethalantidote 2017/05/30 19:48:12 Done. The example was very helpful to me.
934 }
935
932 void HTMLElement::AddHTMLLengthToStyle(MutableStylePropertySet* style, 936 void HTMLElement::AddHTMLLengthToStyle(MutableStylePropertySet* style,
933 CSSPropertyID property_id, 937 CSSPropertyID property_id,
934 const String& value, 938 const String& value,
935 AllowPercentage allow_percentage) { 939 AllowPercentage allow_percentage) {
936 HTMLDimension dimension; 940 HTMLDimension dimension;
937 if (!ParseDimensionValue(value, dimension)) 941 if (!ParseDimensionValue(value, dimension))
938 return; 942 return;
939 if (property_id == CSSPropertyWidth && 943 if (property_id == CSSPropertyWidth &&
940 (dimension.IsPercentage() || dimension.IsRelative())) { 944 (dimension.IsPercentage() || dimension.IsRelative())) {
941 UseCounter::Count(GetDocument(), UseCounter::kHTMLElementDeprecatedWidth); 945 UseCounter::Count(GetDocument(), UseCounter::kHTMLElementDeprecatedWidth);
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
1220 1224
1221 #ifndef NDEBUG 1225 #ifndef NDEBUG
1222 1226
1223 // For use in the debugger 1227 // For use in the debugger
1224 void dumpInnerHTML(blink::HTMLElement*); 1228 void dumpInnerHTML(blink::HTMLElement*);
1225 1229
1226 void dumpInnerHTML(blink::HTMLElement* element) { 1230 void dumpInnerHTML(blink::HTMLElement* element) {
1227 printf("%s\n", element->innerHTML().Ascii().data()); 1231 printf("%s\n", element->innerHTML().Ascii().data());
1228 } 1232 }
1229 #endif 1233 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698