Changeset 212272 in webkit
- Timestamp:
- Feb 13, 2017 6:28:55 PM (7 years ago)
- Location:
- trunk/Source
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r212271 r212272 1 2017-02-12 Brian Burg <bburg@apple.com> 2 3 Web Inspector: expose system user interface layout direction through InspectorFrontendHost 4 https://bugs.webkit.org/show_bug.cgi?id=168209 5 <rdar://problem/11573736> 6 7 Reviewed by Joseph Pecoraro. 8 9 Forward the UserInterfaceLayoutDirection of the inspector page. If the WebKit client has 10 properly set the UI directionality from system settings in PageClient, this will get inherited 11 automatically by the Inspector's WebPage instance. 12 13 * inspector/InspectorFrontendClient.h: 14 * inspector/InspectorFrontendClientLocal.cpp: 15 (WebCore::InspectorFrontendClientLocal::userInterfaceLayoutDirection): 16 * inspector/InspectorFrontendClientLocal.h: 17 18 * inspector/InspectorFrontendHost.h: 19 * inspector/InspectorFrontendHost.idl: 20 * inspector/InspectorFrontendHost.cpp: 21 (WebCore::InspectorFrontendHost::userInterfaceLayoutDirection): 22 Expose the directionality to the frontend as "ltr" or "rtl" strings. 23 1 24 2017-02-13 Zalan Bujtas <zalan@apple.com> 2 25 -
trunk/Source/WebCore/inspector/InspectorFrontendClient.h
r205369 r212272 31 31 #pragma once 32 32 33 #include "UserInterfaceLayoutDirection.h" 33 34 #include <wtf/Forward.h> 34 35 #include <wtf/text/WTFString.h> … … 60 61 virtual void closeWindow() = 0; 61 62 63 virtual UserInterfaceLayoutDirection userInterfaceLayoutDirection() const = 0; 64 62 65 WEBCORE_EXPORT virtual void requestSetDockSide(DockSide) = 0; 63 66 WEBCORE_EXPORT virtual void changeAttachedWindowHeight(unsigned) = 0; -
trunk/Source/WebCore/inspector/InspectorFrontendClientLocal.cpp
r208742 r212272 170 170 } 171 171 172 UserInterfaceLayoutDirection InspectorFrontendClientLocal::userInterfaceLayoutDirection() const 173 { 174 return m_frontendPage->userInterfaceLayoutDirection(); 175 } 176 172 177 void InspectorFrontendClientLocal::requestSetDockSide(DockSide dockSide) 173 178 { -
trunk/Source/WebCore/inspector/InspectorFrontendClientLocal.h
r204479 r212272 65 65 WEBCORE_EXPORT void moveWindowBy(float x, float y) final; 66 66 67 WEBCORE_EXPORT UserInterfaceLayoutDirection userInterfaceLayoutDirection() const final; 68 67 69 WEBCORE_EXPORT void requestSetDockSide(DockSide) final; 68 70 WEBCORE_EXPORT void changeAttachedWindowHeight(unsigned) final; -
trunk/Source/WebCore/inspector/InspectorFrontendHost.cpp
r211033 r212272 1 1 /* 2 * Copyright (C) 2007 , 2008Apple Inc. All rights reserved.2 * Copyright (C) 2007-2017 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> 4 4 * … … 197 197 } 198 198 199 String InspectorFrontendHost::userInterfaceLayoutDirection() 200 { 201 if (m_client && m_client->userInterfaceLayoutDirection() == UserInterfaceLayoutDirection::RTL) 202 return ASCIILiteral("rtl"); 203 204 return ASCIILiteral("ltr"); 205 } 206 199 207 void InspectorFrontendHost::setAttachedWindowHeight(unsigned height) 200 208 { -
trunk/Source/WebCore/inspector/InspectorFrontendHost.h
r205369 r212272 1 1 /* 2 * Copyright (C) 2007 Apple Inc. All rights reserved.2 * Copyright (C) 2007-2017 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 62 62 float zoomFactor(); 63 63 64 String userInterfaceLayoutDirection(); 65 64 66 void setAttachedWindowHeight(unsigned); 65 67 void setAttachedWindowWidth(unsigned); -
trunk/Source/WebCore/inspector/InspectorFrontendHost.idl
r205369 r212272 1 1 /* 2 * Copyright (C) 2007 , 2008Apple Inc. All rights reserved.2 * Copyright (C) 2007-2017 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> 4 4 * Copyright (C) 2009 Google Inc. All rights reserved. … … 43 43 float zoomFactor(); 44 44 45 DOMString userInterfaceLayoutDirection(); 46 45 47 void requestSetDockSide(DOMString side); 46 48 -
trunk/Source/WebInspectorUI/UserInterface/Base/InspectorFrontendHostStub.js
r205424 r212272 65 65 }, 66 66 67 userInterfaceLayoutDirection: function() 68 { 69 return "ltr"; 70 }, 71 67 72 requestSetDockSide: function(side) 68 73 { -
trunk/Source/WebKit2/ChangeLog
r212269 r212272 1 2017-02-12 Brian Burg <bburg@apple.com> 2 3 Web Inspector: expose system user interface layout direction through InspectorFrontendHost 4 https://bugs.webkit.org/show_bug.cgi?id=168209 5 <rdar://problem/11573736> 6 7 Reviewed by Joseph Pecoraro. 8 9 Forward the UserInterfaceLayoutDirection of the inspector page. If the WebKit client has 10 properly set the UI directionality from system settings in PageClient, this will get inherited 11 automatically by the Inspector's WebPage instance. 12 13 * WebProcess/WebPage/RemoteWebInspectorUI.cpp: 14 (WebKit::RemoteWebInspectorUI::userInterfaceLayoutDirection): 15 * WebProcess/WebPage/RemoteWebInspectorUI.h: 16 * WebProcess/WebPage/WebInspectorUI.cpp: 17 (WebKit::WebInspectorUI::userInterfaceLayoutDirection): 18 * WebProcess/WebPage/WebInspectorUI.h: 19 1 20 2017-02-13 Youenn Fablet <youennf@gmail.com> 2 21 -
trunk/Source/WebKit2/WebProcess/WebPage/RemoteWebInspectorUI.cpp
r211054 r212272 113 113 } 114 114 115 WebCore::UserInterfaceLayoutDirection RemoteWebInspectorUI::userInterfaceLayoutDirection() const 116 { 117 return m_page.corePage()->userInterfaceLayoutDirection(); 118 } 119 115 120 void RemoteWebInspectorUI::bringToFront() 116 121 { -
trunk/Source/WebKit2/WebProcess/WebPage/RemoteWebInspectorUI.h
r205369 r212272 59 59 String debuggableType() override { return m_debuggableType; } 60 60 61 WebCore::UserInterfaceLayoutDirection userInterfaceLayoutDirection() const override; 62 61 63 void bringToFront() override; 62 64 void closeWindow() override; -
trunk/Source/WebKit2/WebProcess/WebPage/WebInspectorUI.cpp
r201171 r212272 139 139 } 140 140 141 WebCore::UserInterfaceLayoutDirection WebInspectorUI::userInterfaceLayoutDirection() const 142 { 143 return m_page.corePage()->userInterfaceLayoutDirection(); 144 } 145 141 146 void WebInspectorUI::requestSetDockSide(DockSide side) 142 147 { -
trunk/Source/WebKit2/WebProcess/WebPage/WebInspectorUI.h
r205403 r212272 91 91 void closeWindow() override; 92 92 93 WebCore::UserInterfaceLayoutDirection userInterfaceLayoutDirection() const override; 94 93 95 void requestSetDockSide(DockSide) override; 94 96 void changeAttachedWindowHeight(unsigned) override;
Note: See TracChangeset
for help on using the changeset viewer.