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

Unified Diff: Source/core/rendering/style/StyleNavigationData.cpp

Issue 17450016: Implementation of CSS3 nav-up/down/left/right properties from CSS3 UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased once again to master, fixed layout test. Created 6 years, 8 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
Index: Source/core/rendering/style/StyleNavigationData.cpp
diff --git a/Source/core/rendering/style/StyleNavigationData.cpp b/Source/core/rendering/style/StyleNavigationData.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..554d996122df5104d87af86d206c13225dd78950
--- /dev/null
+++ b/Source/core/rendering/style/StyleNavigationData.cpp
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2013 Opera Software ASA. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "config.h"
+
+#include "core/rendering/style/StyleNavigationData.h"
+
+#include "wtf/Assertions.h"
+
+namespace WebCore {
+
+void StyleNavigationData::SetProperty(StyleNavigationData::NavigationDirection direction, const StyleNavigationValue& value)
+{
+ switch (direction) {
+ case NavigationDown:
+ setDown(value);
+ return;
+ case NavigationLeft:
+ setLeft(value);
+ return;
+ case NavigationRight:
+ setRight(value);
+ return;
+ case NavigationUp:
+ setUp(value);
+ return;
+ default:
+ ASSERT_NOT_REACHED();
+ }
+}
+
+} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698