Changes between Version 7 and Version 8 of HackingWebInspector
- Timestamp:
- Feb 10, 2014, 11:27:11 AM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
HackingWebInspector
v7 v8 1 = Web Inspector Developer Survival Guide=1 = Contributing to Web Inspector = 2 2 3 3 [[Image(inspector.png)]] … … 7 7 == Inspect The Inspector == 8 8 9 On Mac, set the following defaults to allow inspecting the inspector, and logging console messages to stdout. (To increase the level of possible inception, add more defaults for higher page group levels.) 10 11 {{{ 12 defaults write com.apple.Safari __WebInspectorPageGroupLevel1__.WebKit2ApplicationChromeModeEnabled -bool YES 13 defaults write com.apple.Safari __WebInspectorPageGroupLevel1__.WebKit2DeveloperExtrasEnabled -bool YES 14 defaults write com.apple.Safari __WebInspectorPageGroupLevel1__.WebKit2LogsPageMessagesToSystemConsoleEnabled -bool YES 15 }}} 16 17 9 18 Run Safari or [http://nightly.webkit.org/ WebKit Nightly build]. Open Web Inspector. 10 19 11 [[Image(inspect.png)]] [[Image(tooltip.png)]] 12 13 We can edit inspectorSyntaxHightlinght.css in our favorite code editor, but we cannot make a patch from it. After next update inspectorSyntaxHighlight.css will be overwritten and our changes disappeared. 20 We can edit `SyntaxHighlightingDefaultTheme.css` in our favorite code editor, but we cannot make a patch from it. After next update `SyntaxHighlightingDefaultTheme.css` will be overwritten and our changes disappeared. 14 21 15 22 == Create / Update a Bug Report == … … 28 35 git clone git://git.webkit.org/WebKit.git 29 36 cd WebKit 30 git branch purple_css_values 31 git checkout purple_css_values 37 git checkout -b purple_css_values 32 38 }}} 33 39 … … 35 41 2. [http://webkit.org/building/build.html Build WebKit] 36 42 {{{ 37 Tools/Scripts/build-webkit -- debug43 Tools/Scripts/build-webkit --release 38 44 }}} 39 [Do we really need --debug flag here?] 40 41 First build takes ≈40 minutes. 45 A clean build takes 20-80 minutes depending on the vintage of your machine. 42 46 43 47 3. [http://webkit.org/building/run.html Run it] 44 48 {{{ 45 Tools/Scripts/run-safari -- debug49 Tools/Scripts/run-safari --release 46 50 }}} 47 51 48 4. Edit ` WebCore/inspector/front-end/inspectorSyntaxHighlight.css` within a git repository.52 4. Edit `Source/WebInspectorUI/UserInterface/SyntaxHighlightingDefaultTheme.css` within a git repository. 49 53 50 5. There are two options: 51 1. Copy files from `WebCore/inspector/front-end/` to the build by running `Tools/Scripts/build-webkit --debug --inspector-frontend`. Do it after every time you modify Inspector's files. 52 2. Make a symlink 53 {{{ 54 rm -rf WebKitBuild/Debug/WebCore.framework/Resources/inspector 55 ln -s WebCore/inspector/front-end/ WebKitBuild/Debug/WebCore.framework/Resources/inspector 56 }}} 54 5. Copy files from `Source/WebInspectorUI/UserInterface` to the build by running `make -C Source/WebInspectorUI release`. Do it after every time you modify Inspector's files. 55 56 A tip: You can reload Web Inspector just like regular web page (Cmd+R on Mac, Ctrl+R on Windows and Linux). 57 57 58 6. Edit inspectorSyntaxHighlight.css. 59 60 A tip: You can reload Web Inspector just like regular web page (Cmd+R on Mac, Ctrl+R on Windows and Linux). [[BR]][[Image(reload.png)]] 61 62 7. Commit 58 7. Look at your changes 63 59 {{{ 64 git status WebCore/inspector/front-end/ 65 git diff WebCore/inspector/front-end/ 66 git commit WebCore/inspector/front-end/ 60 git status 61 git diff Source/WebInspectorUI/ 67 62 }}} 68 63 69 64 8. [http://webkit.org/coding/contributing.html#changelogs ChangeLogs] 70 65 {{{ 71 Tools/Scripts/ prepare-ChangeLog --help72 Tools/Scripts/prepare-ChangeLog --bug xxxxx --git-commit HEAD -o66 Tools/Scripts/check-webkit-style 67 Tools/Scripts/prepare-ChangeLog --bug xxxxx 73 68 # edit WebCore/ChangeLog 74 git commit WebCore/ChangeLog75 69 }}} 76 70 77 71 Instead of xxxxx you should put bug number, like [https://bugs.webkit.org/show_bug.cgi?id=32926 32926]. 78 72 79 9. Make a patch73 9. [http://webkit.org/coding/contributing.html#submit Upload a patch] and wait for a review! 80 74 {{{ 81 git diff master..HEAD > purple_css_values.patch 75 Tools/Scripts/webkit-patch upload xxxxx -m "patch" 82 76 }}} 83 77 84 10. [http://webkit.org/coding/contributing.html#submit Submit a patch] and wait for a review!85 78 86 87 If you have any questions there are always people willing to help. Just jump onto IRC and visit #webkit or #webkit-inspector. 79 If you have any questions there are always people willing to help. Just jump onto [http://freenode.net/irc_servers.shtml Freenode IRC] and visit #webkit or #webkit-inspector. 88 80 89 81 ----