Not for landing, bot test only
Created attachment 192393 [details] Patch
Comment on attachment 192393 [details] Patch Attachment 192393 [details] did not pass mac-ews (mac): Output: http://webkit-commit-queue.appspot.com/results/17131121 New failing tests: inspector/extensions/extensions-resources.html inspector/styles/get-set-stylesheet-text.html
Comment on attachment 192393 [details] Patch Attachment 192393 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-commit-queue.appspot.com/results/17161216 New failing tests: inspector/extensions/extensions-resources.html
Created attachment 193680 [details] Patch
Created attachment 193710 [details] Patch
Comment on attachment 193710 [details] Patch Attachment 193710 [details] did not pass mac-ews (mac): Output: http://webkit-commit-queue.appspot.com/results/17213547 New failing tests: inspector/styles/get-set-stylesheet-text.html
Created attachment 193771 [details] Patch
Comment on attachment 193771 [details] Patch Attachment 193771 [details] did not pass mac-ews (mac): Output: http://webkit-commit-queue.appspot.com/results/17222558 New failing tests: inspector/extensions/extensions-resources.html
Created attachment 193962 [details] Patch
Comment on attachment 193962 [details] Patch Attachment 193962 [details] did not pass qt-ews (qt): Output: http://webkit-commit-queue.appspot.com/results/17215719
Comment on attachment 193962 [details] Patch Attachment 193962 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-commit-queue.appspot.com/results/17215717
Comment on attachment 193962 [details] Patch Attachment 193962 [details] did not pass efl-ews (efl): Output: http://webkit-commit-queue.appspot.com/results/17129699
Comment on attachment 193962 [details] Patch Attachment 193962 [details] did not pass qt-wk2-ews (qt): Output: http://webkit-commit-queue.appspot.com/results/17129700
Comment on attachment 193962 [details] Patch Attachment 193962 [details] did not pass win-ews (win): Output: http://webkit-commit-queue.appspot.com/results/17125683
Created attachment 193984 [details] Patch
Created attachment 194196 [details] Patch
Comment on attachment 194196 [details] Patch Attachment 194196 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-commit-queue.appspot.com/results/17226354
Comment on attachment 194196 [details] Patch Attachment 194196 [details] did not pass mac-ews (mac): Output: http://webkit-commit-queue.appspot.com/results/17193533
Created attachment 194378 [details] Patch
Comment on attachment 194378 [details] Patch Attachment 194378 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-commit-queue.appspot.com/results/17213809 New failing tests: inspector/extensions/extensions-resources.html inspector/styles/get-set-stylesheet-text.html
Created attachment 194398 [details] Archive of layout-test-results from webkit-ews-16 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: webkit-ews-16 Port: <class 'webkitpy.common.config.ports.MacWK2Port'> Platform: Mac OS X 10.8.2
Created attachment 194402 [details] Patch
Comment on attachment 194402 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=194402&action=review > Source/WebCore/page/FeatureObserver.cpp:50 > + map.add(CSSPropertyColor, 2); tbh, I was expecting this to be a large switch statement, eg enum HistogramId { HistogramIdColor = 2, HistogramIdDirection = 3, HistogramIdDisplay = 4, .... HistogramIdMaximum // add new values above the maximum }; static int getHistogramId(CSSPropertyId id) { switch(id) { case CSSPropertyIdColor: return HistogramIdColor; case CSSPropertyIdDirection: return HistogramIdDirection; .... default: ASSERT_NOT_REACHED(); } return -1; } Extraordinarily boring like I said. How come you went with the HashMap?
I ran profiling for both methods (count is the number of properties at that histogram flush): Elapsed Time MAP: 0.000120 count: 105 Elapsed Time SWITCH: 0.000080 count: 105 Elapsed Time MAP: 0.000001 count: 0 Elapsed Time SWITCH: 0.000000 count: 0 Elapsed Time MAP: 0.000039 count: 103 Elapsed Time SWITCH: 0.000031 count: 103 Elapsed Time MAP: 0.000035 count: 95 Elapsed Time SWITCH: 0.000029 count: 95 Elapsed Time MAP: 0.000035 count: 95 Elapsed Time SWITCH: 0.000031 count: 95 Elapsed Time MAP: 0.000035 count: 94 Elapsed Time SWITCH: 0.000028 count: 94 I had gone with the map because I thought it would be faster, and it seemed like good practice. However, it looks like the switch is consistently marginally faster. I'm uploading the switch implementation for bot testing now. (The previous implementation was passing on the local mac machines, so I expect this to have no trouble). This switch implementation assigns the constants directly, without use of the enumeration. I did this for 2 reasons. 1. The code reads clearly without use of the enum 2. It makes updating/adding in new properties easier with fewer steps.
Created attachment 194440 [details] Switch implementation
Comment on attachment 194440 [details] Switch implementation Attachment 194440 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-commit-queue.appspot.com/results/17191727 New failing tests: inspector/extensions/extensions-resources.html inspector/styles/get-set-stylesheet-text.html
Created attachment 194445 [details] Archive of layout-test-results from webkit-ews-14 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: webkit-ews-14 Port: <class 'webkitpy.common.config.ports.MacWK2Port'> Platform: Mac OS X 10.8.2
Created attachment 194512 [details] Patch
Created attachment 194525 [details] Patch
Patch now passing mac-wk2 bot! This patch is to see if we still pass when test expectations is not set to slow.
Comment on attachment 194525 [details] Patch Attachment 194525 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-commit-queue.appspot.com/results/17120730 New failing tests: inspector/extensions/extensions-resources.html
Created attachment 194549 [details] Archive of layout-test-results from webkit-ews-12 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: webkit-ews-12 Port: <class 'webkitpy.common.config.ports.MacWK2Port'> Platform: Mac OS X 10.8.2
Created attachment 194670 [details] Patch
Attachment 194670 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/platform/mac-wk2/TestExpectations', u'Source/WebCore/ChangeLog', u'Source/WebCore/css/CSSParser.cpp', u'Source/WebCore/css/CSSParserMode.h', u'Source/WebCore/page/FeatureObserver.cpp', u'Source/WebCore/page/FeatureObserver.h']" exit_code: 1 LayoutTests/platform/mac-wk2/TestExpectations:332: expecting "[", "#", or end of line instead of "{" [test/expectations] [5] LayoutTests/platform/mac-wk2/TestExpectations:332: Path does not exist. [test/expectations] [5] Total errors found: 2 in 6 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 194674 [details] Patch
Comment on attachment 194674 [details] Patch Attachment 194674 [details] did not pass chromium-ews (chromium-xvfb): Output: http://webkit-commit-queue.appspot.com/results/17232486 New failing tests: fast/css/font-family-pictograph.html
Created attachment 194686 [details] Archive of layout-test-results from gce-cr-linux-08 for chromium-linux-x86_64 The attached test failures were seen while running run-webkit-tests on the chromium-ews. Bot: gce-cr-linux-08 Port: chromium-linux-x86_64 Platform: Linux-3.3.8-gcg-201212281604-x86_64-with-GCEL-10.04-gcel_10.04
Comment on attachment 194674 [details] Patch Attachment 194674 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-commit-queue.appspot.com/results/17240373 New failing tests: inspector/extensions/extensions-resources.html inspector/styles/get-set-stylesheet-text.html
Created attachment 194696 [details] Archive of layout-test-results from webkit-ews-16 for mac-mountainlion-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: webkit-ews-16 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.2
Created attachment 194774 [details] Document as RefPtr
This bug doesn't have to be open.