49a943e947bacb6415d647388ca93d8a2886934a
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-09-24  Bo Liu  <boliu@chromium.org>
2
3         Reland "Add in-place reload behavior to ImagesEnabled setting" with optimizations
4         https://bugs.webkit.org/show_bug.cgi?id=97055
5
6         Reviewed by Adam Barth.
7
8         Relanding 128780, 128676, 128645. Was reverted in 128914 due to
9         performance regression in Chromium.
10
11         New changes in addition to previously reverted patches:
12
13         Refactored CachedResource::requestResource, loadResource, and
14         revalidateResource. Moved CachedResource::load method to end of
15         requestResource so there is one place where load is called for all
16         resources.
17
18         Added a enum parameter for requestResource and
19         determineRevalidationPolicy so that FrameLoaderClient::allowImage call
20         do not need to be called multiple times.
21
22         Removed CachedImage::load call in requestImage so it is not called
23         twice.
24
25         Removed unnecessary Frame.h includes in CachedResource and
26         CachedImage.
27
28         Removed dead load() method declaration in CachedImage.
29
30         Updated text expectation for two image-permissions tests to reflect
31         the removed calls to allowImage.
32
33         Tests: fast/loader/display-image-unset-allows-cached-image-load.html
34                fast/loader/display-image-unset-can-block-image-and-can-reload-in-place.html
35                fast/loader/images-enabled-unset-can-block-image-and-can-reload-in-place.html
36
37         * WebCore.exp.in:
38         * loader/FrameLoader.cpp:
39         (WebCore::FrameLoader::didBeginDocument):
40         * loader/SubresourceLoader.cpp:
41         (WebCore::SubresourceLoader::willSendRequest):
42         * loader/cache/CachedImage.cpp:
43         * loader/cache/CachedImage.h:
44         * loader/cache/CachedResource.cpp:
45         (WebCore::CachedResource::didAddClient):
46         * loader/cache/CachedResource.h:
47         (WebCore):
48         (WebCore::CachedResource::stillNeedsLoad):
49         * loader/cache/CachedResourceLoader.cpp:
50         (WebCore::CachedResourceLoader::CachedResourceLoader):
51         (WebCore::CachedResourceLoader::requestImage):
52         (WebCore::CachedResourceLoader::canRequest):
53         (WebCore::CachedResourceLoader::requestResource):
54         (WebCore::CachedResourceLoader::revalidateResource):
55         (WebCore::CachedResourceLoader::loadResource):
56         (WebCore::CachedResourceLoader::determineRevalidationPolicy):
57         (WebCore::CachedResourceLoader::setAutoLoadImages):
58         (WebCore):
59         (WebCore::CachedResourceLoader::setImagesEnabled):
60         (WebCore::CachedResourceLoader::clientDefersImage):
61         (WebCore::CachedResourceLoader::shouldDeferImageLoad):
62         (WebCore::CachedResourceLoader::reloadImagesIfNotDeferred):
63         * loader/cache/CachedResourceLoader.h:
64         (CachedResourceLoader):
65         * page/Settings.cpp:
66         (WebCore::setImageLoadingSettings):
67         (WebCore::Settings::Settings):
68         (WebCore::Settings::setLoadsImagesAutomatically):
69         (WebCore::Settings::imageLoadingSettingsTimerFired):
70         (WebCore::Settings::setImagesEnabled):
71         * page/Settings.h:
72         (Settings):
73         * testing/InternalSettings.cpp:
74         (WebCore::InternalSettings::Backup::Backup):
75         (WebCore::InternalSettings::Backup::restoreTo):
76         (WebCore::InternalSettings::setImagesEnabled):
77         (WebCore):
78         * testing/InternalSettings.h:
79         (Backup):
80         (InternalSettings):
81         * testing/InternalSettings.idl:
82
83 2012-09-24  Joone Hur  <joone.hur@intel.com>, Gustavo Noronha Silva  <gustavo.noronha@collabora.com>
84
85         [GTK] Implement GraphicsLayer using Clutter
86         https://bugs.webkit.org/show_bug.cgi?id=73767
87
88         Reviewed by Martin Robinson.
89         
90         This patch is needed for enabling Accelerated Compositing(Clutter backend) 
91         with the patches submitted in bug 92045 and 91940.
92         
93         No new tests. This will be covered by pixel tests for Qt/GTK+ accelerated
94         compositing and 3D transforms.
95
96         * GNUmakefile.list.am:
97         * platform/clutter/GRefPtrClutter.cpp: Removed.
98         * platform/clutter/GRefPtrClutter.h: Removed.
99         * platform/graphics/clutter/PlatformClutterLayerClient.h: Added.
100         (WebCore):
101         (PlatformClutterLayerClient):
102         (WebCore::PlatformClutterLayerClient::~PlatformClutterLayerClient):
103         * platform/graphics/clutter/TransformationMatrixClutter.cpp: Added to convert CoglMatrix to 
104         TransformationMatrix.
105         (WebCore):
106         (WebCore::TransformationMatrix::operator CoglMatrix):
107         * platform/graphics/transforms/TransformationMatrix.h:
108         (TransformationMatrix):
109
110 2012-09-24  David Grogan  <dgrogan@chromium.org>
111
112         Unprefix IndexedDB
113         https://bugs.webkit.org/show_bug.cgi?id=96548
114
115         Reviewed by Adam Barth.
116
117         We are largely compatible with the FF implementation and the w3c test
118         suite submitted by MS. The w3c test suite doesn't yet check
119         for lack of prefix; this is mostly to signal to devs that we think our
120         implementation is stable.
121
122         This patch uses the new FeatureObserver to get data about prefixed
123         vs unprefixed usage.
124
125         Tests: storage/indexeddb/unprefix-workers.html
126                storage/indexeddb/unprefix.html
127
128         * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
129         (WebCore::DOMWindowIndexedDatabase::indexedDB):
130         * Modules/indexeddb/DOMWindowIndexedDatabase.h:
131         (DOMWindowIndexedDatabase):
132         * Modules/indexeddb/DOMWindowIndexedDatabase.idl:
133         * Modules/indexeddb/WorkerContextIndexedDatabase.cpp:
134         (WebCore::WorkerContextIndexedDatabase::indexedDB):
135         * Modules/indexeddb/WorkerContextIndexedDatabase.h:
136         (WorkerContextIndexedDatabase):
137         * Modules/indexeddb/WorkerContextIndexedDatabase.idl:
138         * bindings/generic/RuntimeEnabledFeatures.h:
139         Making the auxiliary objects RuntimeEnabled didn't make much sense as
140         they are useless without the factory, so always enable them.
141
142         (WebCore::RuntimeEnabledFeatures::indexedDBEnabled):
143         * bindings/scripts/CodeGeneratorGObject.pm:
144         (SkipAttribute):
145         * page/FeatureObserver.h:
146
147 2012-09-24  Andrey Adaikin  <aandrey@chromium.org>
148
149         Web Inspector: [WebGL] First step towards 2D canvas instrumentation in injected script
150         https://bugs.webkit.org/show_bug.cgi?id=96746
151
152         Reviewed by Pavel Feldman.
153
154         First step towards the 2D canvas instrumentation from the WebGL injected script module side.
155         We trace and save all calls that affect the 2D canvas context state and it's resources (Gradient and Pattern)
156         so that we could replay the context and resources states later.
157         The 2D canvas context state consists of:
158         - current transformation matrix
159         - current default path
160         - current clipping region (affected by the "clip" command)
161         - current values of the context attributes (like strokeStyle, fillStyle, etc.)
162         - a stack of saved drawing states (affected by the "save" and "restore" commands)
163
164         * inspector/InjectedScriptCanvasModuleSource.js:
165         (.):
166
167 2012-09-24  Andrey Adaikin  <aandrey@chromium.org>
168
169         Web Inspector: [TextEditor] conditional breakpoint popup not showing up the first time
170         https://bugs.webkit.org/show_bug.cgi?id=97442
171
172         Reviewed by Pavel Feldman.
173
174         1) The conditional breakpoint popup may not show up the first time we click on the gutter.
175         This was the case because the popup decoration element would be deleted from the line while
176         it was being highlighted and appended afterwards. Now we do not remove decorations from the
177         DOM while highlighting.
178
179         2) Also the popup will close itself on any mouse click event, even if it's targeted to the
180         input box itself. This was due to pointer-events: none; CSS style for the parent element.
181         Now we just override this style for the input box.
182
183         * inspector/front-end/DefaultTextEditor.js:
184         (WebInspector.TextEditorMainPanel.prototype._paintLine):
185         (WebInspector.TextEditorMainPanel.prototype._insertSpanBefore):
186         (WebInspector.TextEditorMainPanel.prototype._insertTextNodeBefore):
187         * inspector/front-end/inspector.css:
188         (.source-frame-breakpoint-condition):
189
190 2012-09-24  Andrey Adaikin  <aandrey@chromium.org>
191
192         Web Inspector: [Canvas] set CanvasAgent in InstrumentingAgents upon calling enable command
193         https://bugs.webkit.org/show_bug.cgi?id=97331
194
195         Reviewed by Yury Semikhatsky.
196
197         We should set CanvasAgent in InstrumentingAgents from enable() command and remove from disable(), instead of doing this in constructor and destructor.
198
199         * inspector/InspectorCanvasAgent.cpp:
200         (WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
201         (WebCore::InspectorCanvasAgent::~InspectorCanvasAgent):
202         (WebCore::InspectorCanvasAgent::restore):
203         (WebCore::InspectorCanvasAgent::enable):
204         (WebCore::InspectorCanvasAgent::disable):
205         * inspector/InspectorCanvasAgent.h:
206         (InspectorCanvasAgent):
207         * inspector/InspectorCanvasInstrumentation.h:
208         (WebCore::InspectorInstrumentation::wrapCanvas2DRenderingContextForInstrumentation):
209         (WebCore::InspectorInstrumentation::wrapWebGLRenderingContextForInstrumentation):
210
211 2012-09-24  Patrick Gansterer  <paroga@webkit.org>
212
213         Remove remaining WTF_DEPRECATED_STRING_OPERATORS from cpp files
214         https://bugs.webkit.org/show_bug.cgi?id=97412
215
216         Reviewed by Adam Barth.
217
218         * css/StylePropertySet.cpp: Removed useless define.
219
220 2012-09-20  Emil A Eklund  <eae@chromium.org>
221
222         snapToSize rounds the incorrectly for negative locations
223         https://bugs.webkit.org/show_bug.cgi?id=97265
224
225         Reviewed by Eric Seidel.
226
227         Change snapSizeToPixel to preserve sign for location which
228         affects rounding.
229
230         Test: fast/sub-pixel/snap-negative-location.html
231
232         * platform/FractionalLayoutUnit.h:
233         (WebCore::snapSizeToPixel):
234
235 2012-09-24  Jonathan Liu  <net147@gmail.com>
236
237         Use unsigned char for bitfield instead of unsigned.
238         https://bugs.webkit.org/show_bug.cgi?id=97447
239
240         Reviewed by Andreas Kling.
241
242         Not all compilers will pad an unsigned bitfield to the smallest size.
243         Use unsigned char instead of unsigned to reduce padding for compilers
244         that pad to the underlying type.
245
246         No new tests. There is already a compile-time assertion.
247
248         * css/CSSRule.cpp:
249         (SameSizeAsCSSRule):
250         * css/CSSRule.h:
251         (CSSRule):
252
253 2012-09-24  Peter Rybin  <peter.rybin@gmail.com>
254
255         Web Inspector: don't allow exception in front-end when expanding function scope
256         https://bugs.webkit.org/show_bug.cgi?id=97346
257
258         Reviewed by Yury Semikhatsky.
259
260         A missing guard condition is added.
261
262         * inspector/front-end/ObjectPropertiesSection.js:
263         (WebInspector.FunctionScopeMainTreeElement.prototype.onpopulate.didGetDetails):
264         (WebInspector.FunctionScopeMainTreeElement.prototype.onpopulate):
265
266 2012-09-24  Arvid Nilsson  <anilsson@rim.com>
267
268         [BlackBerry] Add cookie database API
269         https://bugs.webkit.org/show_bug.cgi?id=97102
270
271         Reviewed by Antonio Gomes.
272
273         Add a CookieManager method that takes a list of strings to parse
274         instead of just one string. Expose CookieParser::parseOneCookie.
275
276         Reviewed internally by Otto D. Cheung.
277
278         No change in behavior, no new tests.
279
280         * platform/blackberry/CookieManager.cpp:
281         (WebCore::CookieManager::setCookies):
282         (WebCore):
283         * platform/blackberry/CookieManager.h:
284         * platform/blackberry/CookieParser.cpp:
285         (WebCore::CookieParser::parseOneCookie):
286         (WebCore):
287         * platform/blackberry/CookieParser.h:
288         (CookieParser):
289
290 2012-09-24  Vsevolod Vlasov  <vsevik@chromium.org>
291
292         Web Inspector: Open resource dialog has too many false positive matches.
293         https://bugs.webkit.org/show_bug.cgi?id=97332
294
295         Reviewed by Alexander Pavlov.
296
297         Improved open resource dialog filtering to make the amount of false
298         positive search results less.
299
300         * inspector/front-end/FilteredItemSelectionDialog.js:
301         (WebInspector.FilteredItemSelectionDialog.prototype._innerCreateSearchRegExp):
302         (WebInspector.FilteredItemSelectionDialog.prototype._highlightItem.get var):
303         (WebInspector.FilteredItemSelectionDialog.prototype._highlightItem):
304
305 2012-09-24  Andrey Adaikin  <aandrey@chromium.org>
306
307         Web Inspector: [Canvas] support 2D canvas instrumentation from the inspector C++ code
308         https://bugs.webkit.org/show_bug.cgi?id=97203
309
310         Reviewed by Yury Semikhatsky.
311
312         Implements wrapping a 2D canvas context through the injected canvas module script facility.
313
314         * bindings/js/JSHTMLCanvasElementCustom.cpp:
315         (WebCore::JSHTMLCanvasElement::getContext):
316         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
317         (WebCore::V8HTMLCanvasElement::getContextCallback):
318         * inspector/InjectedScriptCanvasModule.cpp:
319         (WebCore::InjectedScriptCanvasModule::wrapCanvas2DContext):
320         (WebCore):
321         (WebCore::InjectedScriptCanvasModule::wrapWebGLContext):
322         (WebCore::InjectedScriptCanvasModule::callWrapContextFunction):
323         * inspector/InjectedScriptCanvasModule.h:
324         (InjectedScriptCanvasModule):
325         * inspector/InspectorCanvasAgent.cpp:
326         (WebCore::InspectorCanvasAgent::wrapCanvas2DRenderingContextForInstrumentation):
327         (WebCore):
328         * inspector/InspectorCanvasAgent.h:
329         (InspectorCanvasAgent):
330         * inspector/InspectorCanvasInstrumentation.h:
331         (WebCore::InspectorInstrumentation::wrapCanvas2DRenderingContextForInstrumentation):
332         (WebCore):
333         * inspector/InspectorInstrumentation.h:
334         (InspectorInstrumentation):
335
336 2012-09-24  Pavel Feldman  <pfeldman@chromium.org>
337
338         Web Inspector:EXC_BAD_ACCESS upon closing page with node highlighted
339         https://bugs.webkit.org/show_bug.cgi?id=97446
340
341         Reviewed by Alexander Pavlov.
342
343         Added 0 check on frame view.
344
345         * inspector/InspectorOverlay.cpp:
346         (WebCore::InspectorOverlay::update):
347
348 2012-09-21  Alexander Pavlov  <apavlov@chromium.org>
349
350         Web Inspector: [REGRESSION] Cmd-Shift-C doesn't enable element inspection mode when inspector hidden
351         https://bugs.webkit.org/show_bug.cgi?id=97249
352
353         Reviewed by Yury Semikhatsky.
354
355         Fix regression from r125871.
356
357         * inspector/front-end/InspectorFrontendAPI.js:
358         (InspectorFrontendAPI.enterInspectElementMode):
359         * inspector/front-end/inspector.js:
360         (WebInspector._createGlobalStatusBarItems):
361         (WebInspector.documentKeyDown):
362
363 2012-09-24  Alexander Pavlov  <apavlov@chromium.org>
364
365         Web Inspector: Disable persistence of master switches in the "Overrides" settings tab
366         https://bugs.webkit.org/show_bug.cgi?id=97440
367
368         Reviewed by Yury Semikhatsky.
369
370         Disables enforcement of device metrics, geolocation, and device orientation overrides on Web Inspector start.
371
372         * inspector/InspectorPageAgent.cpp:
373         (WebCore::InspectorPageAgent::restore):
374         * inspector/front-end/SettingsScreen.js:
375         (WebInspector.UserAgentSettingsTab.prototype._onMetricsCheckboxClicked):
376         (WebInspector.UserAgentSettingsTab.prototype._onGeolocationOverrideCheckboxClicked):
377         (WebInspector.UserAgentSettingsTab.prototype._onDeviceOrientationOverrideCheckboxClicked):
378         * inspector/front-end/UserAgentSupport.js:
379         (WebInspector.UserAgentSupport):
380         (WebInspector.UserAgentSupport.prototype.toggleDeviceMetricsOverride):
381         (WebInspector.UserAgentSupport.prototype.toggleGeolocationPositionOverride):
382         (WebInspector.UserAgentSupport.prototype.toggleDeviceOrientationOverride):
383         * inspector/front-end/externs.js:
384
385 2012-09-24  Vivek Galatage  <vivekgalatage@gmail.com>
386
387         Web Inspector: implement testing harness for pure protocol tests.
388         https://bugs.webkit.org/show_bug.cgi?id=90675
389
390         Reviewed by Yury Semikhatsky.
391
392         Implementing the testing harness as the APIs of Internals object not
393         only reduced platform specific patching of DRTs but also minimized the
394         the effort required to open up the new dummy inspector Frontend. 
395         
396         The openDummyInspectorFrontend method will return the handle to newly 
397         created DOMWindow. This DOMWindow object can be utilized inside the test 
398         case to communicate using postMessage WebAPI.
399         
400         The newly created DOMWindow will host the protocol-test.html which
401         will seed the necessary JS libraries to communicate with the
402         InspectorBackend.
403
404         Test: inspector-protocol/css-getSupportedCSSProperties.html
405
406         * WebCore.exp.in:
407         * WebCore.gypi:
408         * inspector/InspectorClient.h:
409         (InspectorClient):
410         * testing/Internals.cpp:
411         (InspectorFrontendClientDummy):
412         (WebCore::InspectorFrontendClientDummy::~InspectorFrontendClientDummy):
413         (WebCore):
414         (WebCore::InspectorFrontendClientDummy::InspectorFrontendClientDummy):
415         (InspectorFrontendChannelDummy):
416         (WebCore::InspectorFrontendChannelDummy::~InspectorFrontendChannelDummy):
417         (WebCore::InspectorFrontendChannelDummy::InspectorFrontendChannelDummy):
418         (WebCore::InspectorFrontendChannelDummy::sendMessageToFrontend):
419         (WebCore::Internals::consoleMessageArgumentCounts):
420         (WebCore::Internals::openDummyInspectorFrontend):
421         (WebCore::Internals::closeDummyInspectorFrontend):
422         * testing/Internals.h:
423         (WebCore):
424         (Internals):
425         * testing/Internals.idl:
426
427 2012-09-24  Keishi Hattori  <keishi@webkit.org>
428
429         REGRESSION(r127727): Calendar picker focus doesn't loop in calendar-picker.html
430         https://bugs.webkit.org/show_bug.cgi?id=97183
431
432         Reviewed by Kent Tamura.
433
434         Fixing bug calendar-picker.html. The page popup behaves fine because
435         this code is only necessary in calendar-picker.html where the focus can
436         move outside of the picker because we are just using an iframe.
437
438         No new tests. Added tests to calendar-picker-key-operations.html.
439
440         * Resources/pagepopups/calendarPicker.js:
441         (YearMonthController.prototype.attachTo):
442         (CalendarPicker.prototype._handleBodyKeyDown):
443
444 2012-09-24  Andrey Kosyakov  <caseq@chromium.org>
445
446         Unreviewed follow-up to r129336 -- fixed closure compiler warnings.
447
448         * inspector/front-end/HAREntry.js:
449         * inspector/front-end/TimelineModel.js:
450
451 2012-09-24  Andrey Adaikin  <aandrey@chromium.org>
452
453         Web Inspector: [TextEditor] Line numbers out of sync after closing breakpoint condition editor
454         https://bugs.webkit.org/show_bug.cgi?id=96510
455
456         Reviewed by Vsevolod Vlasov.
457
458         Sync line heights on adding/removing decorations.
459
460         * inspector/front-end/DefaultTextEditor.js:
461         (WebInspector.TextEditorGutterChunk):
462         (WebInspector.TextEditorGutterChunk.prototype.addDecoration):
463         (WebInspector.TextEditorGutterChunk.prototype.removeDecoration):
464         (WebInspector.TextEditorGutterChunk.prototype.set expanded):
465         (WebInspector.TextEditorGutterChunk.prototype.get height):
466         (WebInspector.TextEditorGutterChunk.prototype._createRow):
467         (WebInspector.TextEditorMainChunk.prototype.addDecoration):
468         (WebInspector.TextEditorMainChunk.prototype.removeDecoration):
469         (WebInspector.TextEditorMainChunk.prototype.removeAllDecorations):
470
471 2012-09-21  Andrey Kosyakov  <caseq@chromium.org>
472
473         Web Inspector: support saving HAR with resources content
474         https://bugs.webkit.org/show_bug.cgi?id=97341
475
476         Reviewed by Vsevolod Vlasov.
477
478         - add WebInspector.HARWriter that writes HAR with content to a stream;
479         - replace Save all as HAR with Save all with Content as HAR in network's panel context menu;
480         - remove entries for copying/saving of individual request items to reduce clutter in context menu;
481         - a drive-by fix of an exception when invoking context menu not on a network item;
482
483         Test: http/tests/inspector/network/har-content.html
484
485         * English.lproj/localizedStrings.js:
486         * inspector/front-end/FileUtils.js:
487         * inspector/front-end/HAREntry.js:
488         (WebInspector.HAREntry.prototype._buildPostData):
489         (WebInspector.HARLog.prototype.build):
490         (WebInspector.HARLog.prototype._creator):
491         (WebInspector.HARWriter):
492         (WebInspector.HARWriter.prototype.write):
493         (WebInspector.HARWriter.prototype._onContentAvailable):
494         (WebInspector.HARWriter.prototype._beginWrite):
495         (WebInspector.HARWriter.prototype._writeNextChunk):
496         * inspector/front-end/NetworkPanel.js:
497         (WebInspector.NetworkLogView.prototype.get statusBarItems):
498         (WebInspector.NetworkLogView.prototype._createStatusBarItems):
499         (WebInspector.NetworkLogView.prototype._contextMenu):
500         (WebInspector.NetworkLogView.prototype._exportAll.openCallback):
501         (WebInspector.NetworkLogView.prototype._exportAll):
502
503 2012-09-24  Nico Weber  <thakis@chromium.org>
504
505         [chromium] Remove BitLockerSkia. It's apparently not used.
506         https://bugs.webkit.org/show_bug.cgi?id=97434
507
508         Reviewed by Kent Tamura.
509
510         * platform/graphics/skia/BitLockerSkia.cpp: Removed.
511         * platform/graphics/skia/BitLockerSkia.h: Removed.
512
513 2012-09-24  Matt Falkenhagen  <falken@chromium.org>
514
515         Skeleton implementation of dialog.showModal()
516         https://bugs.webkit.org/show_bug.cgi?id=97425
517
518         Reviewed by Kent Tamura.
519
520         This adds a basic implementation of showModal(), so it later can be
521         used to test the top layer, once it is implemented. The main features
522         of showModal(), modality and the top layer, are not yet implemented.
523
524         Test: fast/dom/HTMLDialogElement/dialog-show-modal.html
525
526         * html/HTMLDialogElement.cpp:
527         (WebCore::HTMLDialogElement::showModal): The same as show(), but throws an error in the cases specified in the spec.
528         (WebCore):
529         * html/HTMLDialogElement.h:
530         (HTMLDialogElement):
531         * html/HTMLDialogElement.idl:
532
533 2012-09-24  Ryuan Choi  <ryuan.choi@samsung.com>
534
535         [EFL] Regression after r129328
536         https://bugs.webkit.org/show_bug.cgi?id=97429
537
538         Unreviewed, rolling out r129328.
539
540         * platform/efl/RenderThemeEfl.cpp:
541         (WebCore::RenderTheme::themeForPage):
542
543 2012-09-23  Ryuan Choi  <ryuan.choi@samsung.com>
544
545         [EFL] Duplicated RenderThemeEfl creation for same page
546         https://bugs.webkit.org/show_bug.cgi?id=88391
547
548         Reviewed by Gyuyoung Kim.
549
550         Other ports return one or two RenderTheme regardless of page.
551         But, WebKit/Efl can create different theme for each page and
552         themeForPage creates new RenderTheme whenever it is called with page.
553         So more than one RenderTheme can be created for a page.
554
555         This patches checks whether page already has RenderTheme not to create new
556         RenderTheme for same page.
557
558         * platform/efl/RenderThemeEfl.cpp:
559         (WebCore::RenderTheme::themeForPage):
560
561 2012-09-23  Keishi Hattori  <keishi@webkit.org>
562
563         Add suggestionPicker to CalendarPicker
564         https://bugs.webkit.org/show_bug.cgi?id=97201
565
566         Reviewed by Kent Tamura.
567
568         This adds the suggestionPicker to CalendarPicker. It is not available yet as a datalist UI but it can be used inside ManualTests/forms/calendar-picker.html.
569
570         No new tests. Suggestion Picker can be tested in ManualTests/forms/calendar-picker.html.
571
572         * Resources/pagepopups/calendarPicker.js:
573         (initialize):
574         (openSuggestionPicker):
575         * Resources/pagepopups/pickerCommon.js:
576         (enclosingNodeOrSelfWithClass):
577         * Resources/pagepopups/suggestionPicker.css: Added.
578         (.suggestion-list):
579         (.suggestion-list-entry):
580         (.suggestion-list-entry:focus):
581         (.suggestion-list-entry:focus .label):
582         (.suggestion-list-entry .content):
583         (.suggestion-list-entry .title):
584         (.suggestion-list-entry .label):
585         (.measuring-width .suggestion-list-entry .label):
586         (.suggestion-list .separator):
587         * Resources/pagepopups/suggestionPicker.js: Added.
588         (SuggestionPicker):
589         (SuggestionPicker.validateConfig):
590         (SuggestionPicker.prototype.cleanup):
591         (SuggestionPicker.prototype._setColors): Creates css rules that sets highlight colors.
592         (SuggestionPicker.prototype._createSuggestionEntryElement): Creates an entry that when selected submits the value.
593         (SuggestionPicker.prototype._createActionEntryElement): Creates an entry that causes an action. (e.x. "Other...")
594         (SuggestionPicker.prototype._measureMaxContentWidth): Temporarily left align everything to measure the width.
595         (SuggestionPicker.prototype._fixWindowSize):
596         (SuggestionPicker.prototype._layout):
597         (SuggestionPicker.prototype.selectEntry):
598         (SuggestionPicker.prototype._handleEntryClick):
599         (SuggestionPicker.prototype._findFirstVisibleEntry):
600         (SuggestionPicker.prototype._findLastVisibleEntry):
601         (SuggestionPicker.prototype._handleBodyKeyDown):
602         (SuggestionPicker.prototype._handleEntryMouseOver):
603         (SuggestionPicker.prototype._handleMouseOut):
604         * WebCore.gyp/WebCore.gyp:
605
606 2012-09-23  Andreas Kling  <kling@webkit.org>
607
608         REGRESSION(r128239): Mutable ElementAttributeData leak their Attribute vectors.
609         <http://webkit.org/b/97423>
610
611         Reviewed by Anders Carlsson.
612
613         r128239 added a WTF::deleteOwnedPtr() override for ElementAttributeData*, but ElementAttributeData is
614         a ref-counted object. Fixed this by overriding deref() instead to call the appropriate subclass destructor.
615
616         * dom/ElementAttributeData.h:
617         (WebCore::ElementAttributeData::deref):
618
619 2012-09-23  Byungwoo Lee  <bw80.lee@gmail.com>
620
621         Fix build warnings : -Wunused-parameter, -Wparentheses, -Wuninitialized.
622         https://bugs.webkit.org/show_bug.cgi?id=97306
623
624         Reviewed by Benjamin Poulain.
625
626         Fix build warning about -Wunused-parameter on ImageBufferCairo.cpp,
627         ImageDecoder.h by using ASSERT_UNUSED() macro.
628
629         * platform/graphics/cairo/ImageBufferCairo.cpp:
630         (WebCore::encodeImage):
631         * platform/image-decoders/ImageDecoder.h:
632         (WebCore::ImageDecoder::rgbColorProfile):
633         (WebCore::ImageDecoder::inputDeviceColorProfile):
634
635 2012-09-23  Andreas Kling  <kling@webkit.org>
636
637         Enable ElementAttributeData sharing for non-HTML elements.
638         <http://webkit.org/b/97413>
639
640         Reviewed by Anders Carlsson.
641
642         Use the whole qualified tag name when creating the ElementAttributeData cache key
643         instead of just the localName(). This allows sharing and caching of attribute data
644         for non-HTML elements and makes the code a little cleaner.
645
646         * dom/Element.cpp:
647         (WebCore::Element::parserSetAttributes):
648
649             Enable the ElementAttributeData sharing path for non-HTML elements.
650
651         * dom/ElementAttributeData.h:
652
653             Make immutableAttributeArray() public so Document can call it instead of getting
654             the raw data address from a const_cast'ed attributeItem(0).
655
656         * dom/Document.cpp:
657         (WebCore::ImmutableAttributeDataCacheKey::ImmutableAttributeDataCacheKey):
658         (WebCore::ImmutableAttributeDataCacheKey::operator!=):
659         (WebCore::ImmutableAttributeDataCacheKey::hash):
660         (ImmutableAttributeDataCacheKey):
661         (WebCore::ImmutableAttributeDataCacheEntry::ImmutableAttributeDataCacheEntry):
662         (ImmutableAttributeDataCacheEntry):
663         (WebCore::Document::cachedImmutableAttributeData):
664
665             Let the immutable attribute data cache use a QualifiedName/attributes key
666             instead of the AtomicString/attributes we were using before. We still grab the
667             existingHash() from the QualifiedName::localName() and use that for the actual
668             HashMap key.
669
670 2012-09-23  Mike West  <mkwst@chromium.org>
671
672         Measure the usage of the "X-WebKit-CSP" header in the hopes of dropping the prefix completely.
673         https://bugs.webkit.org/show_bug.cgi?id=97408
674
675         Reviewed by Adam Barth.
676
677         We plan on landing the unprefixed header in webkit.org/b/96765 once the
678         spec moves to CR. Though we plan to use it for experimentation in the
679         near future, we'll want to drop the prefixed header completely at some
680         point in the future. Starting to measure its usage now will give us a
681         good baseline when we start contemplating that decision.
682
683         No new functionality, so no new tests.
684
685         * page/ContentSecurityPolicy.cpp:
686         (WebCore::ContentSecurityPolicy::didReceiveHeader):
687         * page/FeatureObserver.h:
688
689 2012-09-22  Dominic Mazzoni  <dmazzoni@google.com>
690
691         AX: Layout tests would be easier to write if AccessibilityController could find an element by id
692         https://bugs.webkit.org/show_bug.cgi?id=97301
693
694         Reviewed by Chris Fleizach.
695
696         Add a method to get the DOM "id" attribute from an accessible object, only for layout tests.
697
698         Makes existing test more cross-platform:
699         Tests: accessibility/aria-hidden-with-elements.html
700
701         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
702         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
703
704 2012-09-22  Thierry Reding  <thierry.reding@avionic-design.de>
705
706         [GTK] Build is broken with GLib Unicode backend
707         https://bugs.webkit.org/show_bug.cgi?id=97308.
708
709         Reviewed by Carlos Garcia Campos.
710
711         The TextBreakIteratorGtk implementation uses ubrk_close() to delete
712         the iterator. However that function is ICU specific and not declared
713         when using the GLib backend. Instead the iterator can simply be freed
714         using the delete operator.
715
716         This commit is based on work by Martin Schlemmer who posted a fix for
717         this here:
718
719             http://permalink.gmane.org/gmane.os.opendarwin.webkit.gtk/1210
720
721         No new tests.
722
723         * platform/text/gtk/TextBreakIteratorGtk.cpp:
724         (WebCore::NonSharedCharacterBreakIterator::~NonSharedCharacterBreakIterator):
725         Free iterator using delete instead of ubrk_close().
726
727 2012-09-21  Ami Fischman  <fischman@chromium.org>
728
729         HTMLMediaElement isn't garbage collected between document reloads
730         https://bugs.webkit.org/show_bug.cgi?id=97020
731
732         Reviewed by Eric Carlson.
733
734         JS-created (as opposed to DOM-created) Audio nodes never got collected, because they
735         appear to always hasPendingActivity(), because m_playing is never set to false.
736
737         Manual test added: ManualTests/audio-freed-during-reload.html
738
739         * html/HTMLMediaElement.cpp:
740         (WebCore::HTMLMediaElement::stop): set m_playing = false; explicitly.
741
742 2012-09-21  Simon Fraser  <simon.fraser@apple.com>
743
744         RenderMarquee causes ASSERTION FAILED: enclosingIntRect(rendererMappedResult) == enclosingIntRect(FloatQuad(result).boundingBox()) : WebCore::FloatRect WebCore::RenderGeometryMap::absoluteRect(const WebCore::FloatRect &) const
745         https://bugs.webkit.org/show_bug.cgi?id=92464
746
747         Reviewed by Sam Weinig.
748
749         Marquees could cause an updateCompositingLayersAfterScroll() to be called when
750         we're in the middle of updating layer positions. updateCompositingLayersAfterScroll()
751         does a full RenderLayer tree walk, but its use of RenderGeomeryMap reveals that
752         it's using layers whose positions haven't been updated yet.
753         
754         Fix by avoiding the updateCompositingLayersAfterScroll() if we're in the process
755         of updating a marquee when updating layer positions. We'll do a compositing update
756         soon anyway.
757
758         Tested by fast/events/tabindex-focus-blur-all.html
759
760         * rendering/RenderLayer.cpp:
761         (WebCore::RenderLayer::RenderLayer):
762         (WebCore::RenderLayer::updateLayerPositions):
763         (WebCore::RenderLayer::updateLayerPositionsAfterScroll):
764         (WebCore::RenderLayer::scrollTo):
765         * rendering/RenderLayer.h:
766         (RenderLayer):
767
768 2012-09-21  Adam Klein  <adamk@chromium.org>
769
770         Remove bogus assertions from ChildListMutationScope
771         https://bugs.webkit.org/show_bug.cgi?id=97372
772
773         Reviewed by Ryosuke Niwa.
774
775         Some asserts (and their accompanying comment) were trying to enforce
776         proper usage of ChildListMutationScope from WebCore, but in the
777         presence of MutationEvents they could fail due to arbitrary script
778         execution.
779
780         This change gets rid of those asserts and adds tests exercising
781         the (pre-existing) codepaths for handling these out-of-order cases.
782         Without this patch, these tests ASSERT in debug builds.
783
784         Tests: fast/mutation/added-out-of-order.html
785                fast/mutation/removed-out-of-order.html
786
787         * dom/ChildListMutationScope.cpp:
788         (WebCore::ChildListMutationAccumulator::childAdded):
789         (WebCore::ChildListMutationAccumulator::willRemoveChild):
790         * dom/ChildListMutationScope.h:
791         (WebCore):
792
793 2012-09-21  Dan Bernstein  <mitz@apple.com>
794
795         REGRESSION (r129176): Incorrect line breaking when kerning occurs between a space and the following character
796         https://bugs.webkit.org/show_bug.cgi?id=97377
797
798         Reviewed by Enrica Casucci.
799
800         Test: fast/text/kerning-with-TextLayout.html
801
802         When kerning is enabled, the last character in a word may have its advance shortened because
803         of its trailing space. To account for that, words are measured along with the trailing space,
804         then the width of a space is subtracted from the result. This doesn’t work when the trailing
805         space itself has its advance shortened due to the character following it, which can happen
806         when using the TextLayout optimization. However, when the optimization is used, the advance
807         of the last character of the word is already adjusted for the trailing space, so there is no
808         need to measure with that space and subtract its advance.
809
810         * rendering/RenderBlockLineLayout.cpp:
811         (WebCore::RenderBlock::LineBreaker::nextLineBreak): Changed to not use the trailingSpaceWidth
812         mechanism when TextLayout is being used.
813
814 2012-09-21  Adam Klein  <adamk@chromium.org>
815
816         Simplify and optimize ChildListMutationScope
817         https://bugs.webkit.org/show_bug.cgi?id=97352
818
819         Reviewed by Ryosuke Niwa.
820
821         ChildListMutationScope is one of the most complicated bits of
822         MutationObserver implementation. This patch aims to simplify it for
823         clarity and improve its performance (mostly by just doing less).
824
825         The big change is to remove the MutationAccumulatorRouter class,
826         replacing it with lifetime-management logic in ChildListMutationAccumulator
827         ChildListMutationScope is expected to call getOrCreate() in
828         its constructor, and each scope holds a RefPtr to the accumulator.
829         When the last scope holding such a RefPtr is destroyed,
830         ChildListMutationAccumulator's destructor enqueues the accumulated record.
831
832         This greatly reduces the number of lines of code, and condenses
833         two HashMaps into one. It also reduces hash lookups, which now
834         occur only on scope creation and when the refcount for a given
835         accumulator reaches 0 (previously, each childAdded and willRemoveChild
836         call could result in two hash lookups each).
837
838         There are some minor changes as well: the ChildListMutationAccumulator::clear()
839         method is gone, as it was doing more work than necessary;
840         DEFINE_STATIC_LOCAL is now used instead of hand-rolled static-management
841         code; ChildListMutationAccumulator::m_lastAdded is no longer a RefPtr, since it
842         always points at a Node that's already being ref'd by the accumulator.
843         Also various minor syntactic cleanups.
844
845         No new tests, no change in behavior.
846
847         * dom/ChildListMutationScope.cpp:
848         (WebCore::accumulatorMap): Reduced two maps to one, and manage its lifetime with DEFINE_STATIC_LOCAL.
849         (WebCore::ChildListMutationAccumulator::ChildListMutationAccumulator): Remove unnecessary call to clear() (which itself has been removed).
850         (WebCore::ChildListMutationAccumulator::~ChildListMutationAccumulator): Enqueue record if not empty at destruction, and have the accumulator
851         remove itself from the map.
852         (WebCore::ChildListMutationAccumulator::getOrCreate): Replaces half of MutationAccumulatorRouter's job.
853         (WebCore::ChildListMutationAccumulator::childAdded): Minor RefPtr usage improvements.
854         (WebCore::ChildListMutationAccumulator::isRemovedNodeInOrder): Simplify RefPtr syntax.
855         (WebCore::ChildListMutationAccumulator::willRemoveChild): Minor RefPtr usage improvements.
856         (WebCore::ChildListMutationAccumulator::enqueueMutationRecord): Replace call to clear() with clearing m_lastAdded,
857         since it's the only bit not cleared by the MutationRecord creation call. Also remove
858         isEmpty check and replace with asserts now that it's a private method.
859         (WebCore::ChildListMutationAccumulator::isEmpty): Added more assertions about emptiness.
860         * dom/ChildListMutationScope.h:
861         (WebCore):
862         (ChildListMutationAccumulator): Extract the inner class to make everything easier to read.
863         (WebCore::ChildListMutationScope::ChildListMutationScope): Store m_accumulator rather than m_target.
864         (WebCore::ChildListMutationScope::~ChildListMutationScope): ditto
865         (WebCore::ChildListMutationScope::childAdded): ditto
866         (WebCore::ChildListMutationScope::willRemoveChild): ditto
867         (ChildListMutationScope):
868         * html/HTMLElement.cpp: Remove unused ChildListMutationScope.h #include.
869
870 2012-09-21  Chris Rogers  <crogers@google.com>
871
872         BiquadFilterNode must take audio-rate parameter changes into account
873         https://bugs.webkit.org/show_bug.cgi?id=97369
874
875         Reviewed by Kenneth Russell.
876
877         BiquadFilterNode is currently ignoring any timeline or audio-rate changes to its parameters.
878         We now check if any of its parameters have timeline or audio-rate changes and, if so, take
879         them into account.  Otherwise, we use ordinary parameter smoothing/de-zippering which is
880         the case when the parameters are adjusted, for example, from a knob or slider in the UI.
881
882         * Modules/webaudio/BiquadDSPKernel.cpp:
883         (WebCore::BiquadDSPKernel::updateCoefficientsIfNecessary):
884         * Modules/webaudio/BiquadProcessor.cpp:
885         (WebCore::BiquadProcessor::checkForDirtyCoefficients):
886         * Modules/webaudio/BiquadProcessor.h:
887         (WebCore::BiquadProcessor::hasSampleAccurateValues):
888         (BiquadProcessor):
889
890 2012-09-21  Brandon Jones  <bajones@google.com>
891
892         Add support for OES_vertex_array_object in chromium
893         https://bugs.webkit.org/show_bug.cgi?id=96578
894
895         Reviewed by Kenneth Russell.
896
897         Adding basic reference counting to WebGLBuffer objects to satisfy spec requirements
898         for the OES_vertex_array_object extension. Added code to allow calls to the
899         OES_vertex_array_object extension to interface properly with the chromium WebGL
900         implementation.
901
902         Test: fast/canvas/webgl/oes-vertex-array-object.html
903
904         * html/canvas/WebGLRenderingContext.cpp:
905         (WebCore):
906         (WebCore::WebGLRenderingContext::deleteBuffer):
907         (WebCore::WebGLRenderingContext::vertexAttribPointer):
908         * html/canvas/WebGLVertexArrayObjectOES.cpp:
909         (WebCore::WebGLVertexArrayObjectOES::setElementArrayBuffer):
910         (WebCore):
911         * html/canvas/WebGLVertexArrayObjectOES.h:
912         (WebGLVertexArrayObjectOES):
913         (WebCore::WebGLVertexArrayObjectOES::getVertexAttribStateSize):
914         * platform/chromium/support/Extensions3DChromium.cpp:
915         (WebCore::Extensions3DChromium::createVertexArrayOES):
916         (WebCore::Extensions3DChromium::deleteVertexArrayOES):
917         (WebCore::Extensions3DChromium::isVertexArrayOES):
918         (WebCore::Extensions3DChromium::bindVertexArrayOES):
919
920 2012-09-21  Kenichi Ishibashi  <bashi@chromium.org>
921
922         [Chromium] Use OpenTypeVerticalData on Linux
923         https://bugs.webkit.org/show_bug.cgi?id=97277
924
925         Reviewed by Tony Chang.
926
927         Remove HarfBuzz dependency from GlyphPageTreeNodeSkia. Use OpenTypeVerticalData instead.
928
929         No new tests. Rebaselined existing tests.
930
931         * WebCore.gyp/WebCore.gyp: Added OpenTypeTypes.h and OpenTypeVerticalData.(cpp|h) for linux and android.
932         * platform/graphics/FontCache.cpp:
933         Inserted a space between > and > in typedef of FontVerticalDataCache so that making some compilers happy.
934         (WebCore):
935         * platform/graphics/SimpleFontData.h:
936         (SimpleFontData): Moved declaration of m_verticalData to avoid compile warnings.
937         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
938         (WebCore):
939         (WebCore::FontPlatformData::verticalData): Added.
940         (WebCore::FontPlatformData::openTypeTable): Added.
941         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h:
942         (WebCore):
943         (FontPlatformData):
944         * platform/graphics/skia/GlyphPageTreeNodeSkia.cpp: Removed substituteWithVerticalGlyphs().
945         (WebCore::GlyphPage::fill):
946
947 2012-09-21  Jeremy Apthorp  <jeremya@chromium.org>
948
949         Crash in WebCore::Document::fullScreenChangeDelayTimerFired
950         https://bugs.webkit.org/show_bug.cgi?id=97367
951
952         Reviewed by Abhishek Arya.
953
954         The document could be destroyed during the processing of the
955         fullscreenchange event, if the document was destroyed as a result of
956         one of the dispatchEvent calls.
957
958         This bug isn't reliably reproducible, so no new tests.
959
960         * dom/Document.cpp:
961         (WebCore::Document::fullScreenChangeDelayTimerFired):
962
963 2012-09-21  Pratik Solanki  <psolanki@apple.com>
964
965         No need to pass order file for WebCoreTestSupport build
966         https://bugs.webkit.org/show_bug.cgi?id=97363
967
968         Reviewed by David Kilzer.
969
970         No new tests because no functional change.
971
972         * Configurations/WebCoreTestSupport.xcconfig:
973
974 2012-09-21  Chris Rogers  <crogers@google.com>
975
976         Add Web Audio support for deprecated/legacy APIs
977         https://bugs.webkit.org/show_bug.cgi?id=97050
978
979         Reviewed by Eric Carlson.
980
981         The Web Audio API specification has undergone much review and some small API changes
982         have been made (mostly naming-related changes).  This patch adds an ENABLE_LEGACY_WEB_AUDIO
983         build option to allow ports to support the old names.
984
985         Tests changed:
986         audiobuffersource-playbackrate.html
987         audiobuffersource.html
988         note-grain-on-testing.js
989         oscillator-testing.js
990
991         * Configurations/FeatureDefines.xcconfig:
992         * GNUmakefile.features.am:
993         * Modules/webaudio/AudioBufferSourceNode.cpp:
994         (WebCore::AudioBufferSourceNode::startGrain):
995         (WebCore):
996         (WebCore::AudioBufferSourceNode::noteGrainOn):
997         * Modules/webaudio/AudioBufferSourceNode.h:
998         (AudioBufferSourceNode):
999         * Modules/webaudio/AudioBufferSourceNode.idl:
1000         * Modules/webaudio/AudioScheduledSourceNode.cpp:
1001         (WebCore::AudioScheduledSourceNode::start):
1002         (WebCore::AudioScheduledSourceNode::stop):
1003         (WebCore):
1004         (WebCore::AudioScheduledSourceNode::noteOn):
1005         (WebCore::AudioScheduledSourceNode::noteOff):
1006         * Modules/webaudio/AudioScheduledSourceNode.h:
1007         * Modules/webaudio/Oscillator.idl:
1008         * page/FeatureObserver.h:
1009
1010 2012-09-21  Mark Pilgrim  <pilgrim@chromium.org>
1011
1012         [Chromium] remove getFontFamilyForCharacters from PlatformSupport
1013         https://bugs.webkit.org/show_bug.cgi?id=96282
1014
1015         Reviewed by Tony Chang.
1016
1017         Migrating away from PlatformSupport. getFontFamilyForCharacters is
1018         moved to FontCache.h and overridden by the two platforms that
1019         need it (Chromium Linux and Blackberry). New files for the overrides.
1020         Part of a larger refactoring series. See tracking bug 82948.
1021
1022         * PlatformBlackBerry.cmake:
1023         * WebCore.gypi:
1024         * platform/chromium/PlatformSupport.h:
1025         (PlatformSupport):
1026         * platform/graphics/FontCache.h:
1027         (SimpleFontFamily):
1028         (FontCache):
1029         * platform/graphics/blackberry/FontCacheBlackberry.cpp: Added.
1030         (WebCore):
1031         (WebCore::FontCache::getFontFamilyForCharacters):
1032         * platform/graphics/blackberry/skia/PlatformSupport.cpp:
1033         (WebCore):
1034         * platform/graphics/blackberry/skia/PlatformSupport.h:
1035         (PlatformSupport):
1036         * platform/graphics/chromium/FontCacheAndroid.cpp:
1037         (WebCore::FontCache::getFontDataForCharacters):
1038         * platform/graphics/chromium/FontCacheChromiumLinux.cpp: Added.
1039         (WebCore):
1040         (WebCore::FontCache::getFontFamilyForCharacters):
1041         * platform/graphics/skia/FontCacheSkia.cpp:
1042         (WebCore::FontCache::getFontDataForCharacters):
1043
1044 2012-09-21  Chris Fleizach  <cfleizach@apple.com>
1045
1046         AX: WebKit exposes incorrect bounds for embedded SVG in HTML
1047         https://bugs.webkit.org/show_bug.cgi?id=96168
1048
1049         Reviewed by Eric Seidel.
1050
1051         Override absoluteFocusRingQuads() for SVG objects because the default
1052         implementation relies on addFocusRingRects(). In addFocusRingRects(), SVG 
1053         objects adds local positions for its rects instead of absolute positions.
1054
1055         Test: accessibility/svg-bounds.html
1056
1057         * rendering/RenderObject.h:
1058         (RenderObject):
1059         * rendering/svg/RenderSVGModelObject.cpp:
1060         (WebCore):
1061         (WebCore::RenderSVGModelObject::absoluteFocusRingQuads):
1062         * rendering/svg/RenderSVGModelObject.h:
1063         (RenderSVGModelObject):
1064
1065 2012-09-21  Lianghui Chen  <liachen@rim.com>
1066
1067         [BlackBerry] Really fix bug 95488 that user can get the authentication challenge dialog while the other tab has focus.
1068         https://bugs.webkit.org/show_bug.cgi?id=97348
1069         Internal PR: 186597.
1070
1071         Internally reviewed by Yong Li, Joe Mason.
1072         Reviewed by Yong Li.
1073
1074         Add a singleton AuthenticationChallengeManager to manage authentication
1075         challenge dialog. It does following things:
1076         Record page creation/deletion, so it knows what page is present or not.
1077         Record page visibility change so it knows when to display a dialog or not.
1078         Accept authentication challenge, and decide whether to postpone the
1079             challenge dialog based on whether there is active authentication challenge
1080             dialog already and whether its page is visible or not.
1081         When a challenge result comes back, notify the result to all clients
1082             authenticating for the same protection space, and then start the next
1083             authentication challenge from the same page, if there is one.
1084         When a page becomes visible, start the first authentication challenge
1085             dialog that has been blocked before.
1086
1087         And to support this new AuthenticationChallengeManager, and making the
1088             challenge really asynchronous, NetworkJob has been updated to support
1089             the concept of "freeze", which means buffering all network loading status
1090             change but don't send them to NetworkJob clients.
1091         This is necessary when authentication challenge is asynchronous, as the
1092             previous network loading status will likely come before user make any
1093             decision.
1094
1095         No new tests for platform specific internal change.
1096
1097         * PlatformBlackBerry.cmake:
1098         * platform/blackberry/AuthenticationChallengeManager.cpp: Added.
1099         (WebCore):
1100         (ChallengeInfo):
1101         (WebCore::ChallengeInfo::ChallengeInfo):
1102         (AuthenticationChallengeManagerPrivate):
1103         (WebCore::AuthenticationChallengeManagerPrivate::AuthenticationChallengeManagerPrivate):
1104         (WebCore::AuthenticationChallengeManagerPrivate::resumeAuthenticationChallenge):
1105         (WebCore::AuthenticationChallengeManagerPrivate::startAuthenticationChallenge):
1106         (WebCore::AuthenticationChallengeManagerPrivate::pageExists):
1107         (WebCore::AuthenticationChallengeManager::AuthenticationChallengeManager):
1108         (WebCore::AuthenticationChallengeManager::pageCreated):
1109         (WebCore::AuthenticationChallengeManager::pageDeleted):
1110         (WebCore::AuthenticationChallengeManager::pageVisibilityChanged):
1111         (WebCore::AuthenticationChallengeManager::authenticationChallenge):
1112         (WebCore::AuthenticationChallengeManager::cancelAuthenticationChallenge):
1113         (WebCore::AuthenticationChallengeManager::notifyChallengeResult):
1114         (WebCore::AuthenticationChallengeManager::instance):
1115         (WebCore::AuthenticationChallengeManager::init):
1116         * platform/blackberry/AuthenticationChallengeManager.h:
1117         (WebCore):
1118         (AuthenticationChallengeManager):
1119         * platform/blackberry/PageClientBlackBerry.h:
1120         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
1121         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
1122         (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
1123         (WebCore::MediaPlayerPrivate::onAuthenticationNeeded):
1124         (WebCore::MediaPlayerPrivate::notifyChallengeResult):
1125         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
1126         (MediaPlayerPrivate):
1127         * platform/network/blackberry/NetworkJob.cpp:
1128         (WebCore::NetworkJob::NetworkJob):
1129         (WebCore::NetworkJob::~NetworkJob):
1130         (WebCore):
1131         (WebCore::NetworkJob::handleNotifyStatusReceived):
1132         (WebCore::NetworkJob::handleNotifyClose):
1133         (WebCore::NetworkJob::sendRequestWithCredentials):
1134         (WebCore::NetworkJob::notifyChallengeResult):
1135         * platform/network/blackberry/NetworkJob.h:
1136         (NetworkJob):
1137
1138 2012-09-21  Simon Hausmann  <simon.hausmann@digia.com>
1139
1140         Unreviewed, rolling out r129248.
1141         http://trac.webkit.org/changeset/129248
1142         https://bugs.webkit.org/show_bug.cgi?id=96000
1143
1144         Broke win build
1145
1146         * Target.pri:
1147         * WebCore.vcproj/WebCore.vcproj:
1148         * rendering/RenderingAllInOne.cpp:
1149
1150 2012-09-21  Simon Hausmann  <simon.hausmann@nokia.com>
1151
1152         Make RenderingAllInOne.cpp usable for ports other than Apple/Win
1153         https://bugs.webkit.org/show_bug.cgi?id=96000
1154
1155         Reviewed by Ryosuke Niwa.
1156
1157         RenderingAllInOne.cpp unconditionally includes RenderThemeWin. This patch separates
1158         it out from the file.
1159
1160         * Target.pri: Add RenderingAllInOne.cpp to the list of supported all-in-one files.
1161         * WebCore.vcproj/WebCore.vcproj: Compile RenderThemeWin.cpp separately.
1162         * rendering/RenderingAllInOne.cpp: Don't include RenderThemeWin.cpp here.
1163
1164 2012-09-21  Joanmarie Diggs  <jdiggs@igalia.com>
1165
1166         REGRESSION (r127882): accessibility/spinbutton-value.html failing on GTK
1167         https://bugs.webkit.org/show_bug.cgi?id=96196
1168
1169         Reviewed by Martin Robinson.
1170
1171         The "regression" is that a new test was added but the support was missing
1172         in the Gtk port for spin buttons.
1173
1174         No new tests. Instead the new test which had been skipped was unskipped
1175         as part of this fix.
1176
1177         * accessibility/gtk/WebKitAccessibleWrapperAtk.cpp:
1178         (atkRole): Map SpinButtonRole to ATK_ROLE_SPIN_BUTTON
1179         (getInterfaceMaskFromObject): Add SpinButtonRole to the roles implementing
1180         the AtkValue interface.
1181
1182 2012-09-21  Joanmarie Diggs  <jdiggs@igalia.com>
1183
1184         [GTK] [Stable] Infinite recursion in WebCore::AXObjectCache::getOrCreate
1185         https://bugs.webkit.org/show_bug.cgi?id=96932
1186
1187         Reviewed by Martin Robinson.
1188
1189         Make the decision based on RenderObjects rather than AccessibilityObjects
1190         to avoid the infinite recursion which occurs when remapAriaRoleDueToParent
1191         gets called.
1192
1193         Test: platform/gtk/accessibility/remapped-aria-crash.html
1194
1195         * accessibility/gtk/AccessibilityObjectAtk.cpp:
1196         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
1197
1198 2012-09-21  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
1199
1200         [BlackBerry] HTML5 media does not handle SSL certificate failures
1201         https://bugs.webkit.org/show_bug.cgi?id=93324
1202
1203         Reviewed by Eric Carlson.
1204
1205         RIM PR: 116205
1206         Passed FrameLoaderClientBlackBerry's playerId to MMRPlayer::load()
1207         because MMRPlayer::load() added playerId as a new parameter, which
1208         is required to initiate a MediaSSLHandlerStream to deal with
1209         certificate failure when loading a "https" media url.
1210
1211         Internally reviewed by Joe Mason <jmason@rim.com>.
1212
1213         No new tests since there's no functional change.
1214
1215         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
1216         (WebCore::MediaPlayerPrivate::load):
1217
1218 2012-09-21  Evan Wallace  <evan.exe@gmail.com>
1219
1220         [WebSocket] Receiving a large message is really slow
1221         https://bugs.webkit.org/show_bug.cgi?id=97237
1222
1223         Reviewed by Alexey Proskuryakov.
1224
1225         WebSocketChannel always reallocates its internal buffer when it receives
1226         and appends new data which causes dramatic slowdowns for messages over
1227         2 MB in size. This patch changes the internal buffer of WebSocketChannel
1228         from a raw char array to a Vector<char> and uses its amortized append()
1229         method. This brings the time to receive a 5 MB message from 5.2 seconds
1230         to 0.25 seconds.
1231
1232         This patch is only for optimization. No new tests are needed.
1233
1234         * Modules/websockets/WebSocketChannel.cpp:
1235         (WebCore::WebSocketChannel::WebSocketChannel):
1236         (WebCore::WebSocketChannel::~WebSocketChannel):
1237         (WebCore::WebSocketChannel::fail):
1238         (WebCore::WebSocketChannel::resume):
1239         (WebCore::WebSocketChannel::didReceiveSocketStreamData):
1240         (WebCore::WebSocketChannel::appendToBuffer):
1241         (WebCore::WebSocketChannel::skipBuffer):
1242         (WebCore::WebSocketChannel::processBuffer):
1243         (WebCore::WebSocketChannel::resumeTimerFired):
1244         (WebCore::WebSocketChannel::processFrame):
1245         * Modules/websockets/WebSocketChannel.h:
1246
1247 2012-09-21  Andrey Adaikin  <aandrey@chromium.org>
1248
1249         Fix build with ENABLE_WEBGL=false
1250         https://bugs.webkit.org/show_bug.cgi?id=97309
1251
1252         Reviewed by Eric Seidel.
1253
1254         WebKit no longer builds when WEBGL is not enabled.
1255
1256         * rendering/FilterEffectRenderer.h:
1257         (FilterEffectRenderer):
1258
1259 2012-09-21  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
1260
1261         [BlackBerry] Media player won't resize for the following source when first source fail to load
1262         https://bugs.webkit.org/show_bug.cgi?id=97342
1263
1264         Reviewed by Yong Li.
1265
1266         As platformPlayer will notify MediaPlayerPrivate for size change
1267         when loading metadata failed (in this case hasVideo() is false),
1268         we should prevent MediaPlayerPrivate to set width and height
1269         attribute of media element, otherwise we won't get the correct
1270         dimension for the following media sources.
1271
1272         Internally reviewed by Max Feil.
1273
1274         Test case: media/video-size.html
1275
1276         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
1277         (WebCore::MediaPlayerPrivate::resizeSourceDimensions):
1278
1279 2012-09-21  Dan Bernstein  <mitz@apple.com>
1280
1281         REGRESSION (r126763): Incorrect line breaking when both kerning and word spacing are enabled
1282         https://bugs.webkit.org/show_bug.cgi?id=97280
1283
1284         Reviewed by Adele Peterson.
1285
1286         Font::width() never applies word spacing to the first character in the TextRun. The
1287         TextLayout optimization tried to achieve this behavior by not applying word spacing to
1288         any character, which led to this bug.
1289
1290         Test: fast/text/word-space-with-kerning-2.html
1291
1292         * platform/graphics/mac/ComplexTextController.cpp:
1293         (WebCore::TextLayout::TextLayout): Changed to use the given font rather than a version
1294         without word spacing.
1295         (WebCore::TextLayout::width): Added a check if the run starts with a space at a non-zero
1296         offset. If that is the case, then the ComplexTextController has added word spacing to that
1297         space, so subtract it here in order to maintain the behavior described above.
1298
1299 2012-09-21  Sheriff Bot  <webkit.review.bot@gmail.com>
1300
1301         Unreviewed, rolling out r129219.
1302         http://trac.webkit.org/changeset/129219
1303         https://bugs.webkit.org/show_bug.cgi?id=97338
1304
1305         Presumably broke Apple Mac compilation (Requested by yurys_ on
1306         #webkit).
1307
1308         * bindings/js/JSHTMLCanvasElementCustom.cpp:
1309         (WebCore::JSHTMLCanvasElement::getContext):
1310         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
1311         (WebCore::V8HTMLCanvasElement::getContextCallback):
1312         * inspector/InjectedScriptCanvasModule.cpp:
1313         (WebCore::InjectedScriptCanvasModule::wrapWebGLContext):
1314         (WebCore):
1315         * inspector/InjectedScriptCanvasModule.h:
1316         (InjectedScriptCanvasModule):
1317         * inspector/InspectorCanvasAgent.cpp:
1318         * inspector/InspectorCanvasAgent.h:
1319         * inspector/InspectorCanvasInstrumentation.h:
1320         * inspector/InspectorInstrumentation.h:
1321         (InspectorInstrumentation):
1322
1323 2012-09-21  Andrey Adaikin  <aandrey@chromium.org>
1324
1325         Web Inspector: [Canvas] support 2D canvas instrumentation from the inspector C++ code
1326         https://bugs.webkit.org/show_bug.cgi?id=97203
1327
1328         Reviewed by Yury Semikhatsky.
1329
1330         Implements wrapping a 2D canvas context through the injected canvas module script facility.
1331
1332         * bindings/js/JSHTMLCanvasElementCustom.cpp:
1333         (WebCore::JSHTMLCanvasElement::getContext):
1334         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
1335         (WebCore::V8HTMLCanvasElement::getContextCallback):
1336         * inspector/InjectedScriptCanvasModule.cpp:
1337         (WebCore::InjectedScriptCanvasModule::wrapCanvas2DContext):
1338         (WebCore):
1339         (WebCore::InjectedScriptCanvasModule::wrapWebGLContext):
1340         (WebCore::InjectedScriptCanvasModule::callWrapContextFunction):
1341         * inspector/InjectedScriptCanvasModule.h:
1342         (InjectedScriptCanvasModule):
1343         * inspector/InspectorCanvasAgent.cpp:
1344         (WebCore::InspectorCanvasAgent::wrapCanvas2DRenderingContextForInstrumentation):
1345         (WebCore):
1346         * inspector/InspectorCanvasAgent.h:
1347         (InspectorCanvasAgent):
1348         * inspector/InspectorCanvasInstrumentation.h:
1349         (WebCore::InspectorInstrumentation::wrapCanvas2DRenderingContextForInstrumentation):
1350         (WebCore):
1351         * inspector/InspectorInstrumentation.h:
1352         (InspectorInstrumentation):
1353
1354 2012-09-20  Andrey Kosyakov  <caseq@chromium.org>
1355
1356         Web Inspector: [refactoring] simplify interface to FileOutputStream
1357         https://bugs.webkit.org/show_bug.cgi?id=97226
1358
1359         Reviewed by Yury Semikhatsky.
1360
1361         - change OutputStream interface to match that of stream;
1362         - fix OutputStream implementations (FileOutputStream and those in heap profiler);
1363         - fix usages in Timeline and HeapProfiler.
1364
1365         * inspector/front-end/FileUtils.js:
1366         (WebInspector.OutputStream.prototype.write):
1367         (WebInspector.OutputStream.prototype.close):
1368         (WebInspector.ChunkedFileReader.prototype.start):
1369         (WebInspector.ChunkedFileReader.prototype._onChunkLoaded):
1370         (WebInspector.ChunkedXHRReader.prototype.start):
1371         (WebInspector.ChunkedXHRReader.prototype._onProgress):
1372         (WebInspector.ChunkedXHRReader.prototype._onLoad):
1373         (WebInspector.FileOutputStream):
1374         (WebInspector.FileOutputStream.prototype.open.callbackWrapper):
1375         (WebInspector.FileOutputStream.prototype.open):
1376         (WebInspector.FileOutputStream.prototype.write):
1377         (WebInspector.FileOutputStream.prototype.close):
1378         (WebInspector.FileOutputStream.prototype._onAppendDone):
1379         * inspector/front-end/HeapSnapshotLoader.js:
1380         (WebInspector.HeapSnapshotLoader.prototype.close):
1381         (WebInspector.HeapSnapshotLoader.prototype.write):
1382         * inspector/front-end/HeapSnapshotProxy.js:
1383         (WebInspector.HeapSnapshotLoaderProxy.prototype.startTransfer):
1384         (WebInspector.HeapSnapshotLoaderProxy.prototype.write):
1385         (WebInspector.HeapSnapshotLoaderProxy.prototype.close):
1386         * inspector/front-end/HeapSnapshotView.js:
1387         (WebInspector.HeapProfileHeader):
1388         (WebInspector.HeapProfileHeader.prototype.load):
1389         (WebInspector.HeapProfileHeader.prototype._setupWorker):
1390         (WebInspector.HeapProfileHeader.prototype.dispose):
1391         (WebInspector.HeapProfileHeader.prototype.transferChunk.callback):
1392         (WebInspector.HeapProfileHeader.prototype.transferChunk):
1393         (WebInspector.HeapProfileHeader.prototype.finishHeapSnapshot):
1394         (WebInspector.HeapProfileHeader.prototype.saveToFile.onOpen):
1395         (WebInspector.HeapProfileHeader.prototype.saveToFile):
1396         * inspector/front-end/TimelineModel.js:
1397         (WebInspector.TimelineModel.prototype._createFileWriter):
1398         (WebInspector.TimelineModel.prototype.saveToFile.callback):
1399         (WebInspector.TimelineModel.prototype.saveToFile):
1400         (WebInspector.TimelineModelLoader):
1401         (WebInspector.TimelineModelLoader.prototype.write):
1402         (WebInspector.TimelineModelLoader.prototype.close):
1403         (WebInspector.TimelineSaver):
1404         (WebInspector.TimelineSaver.prototype.save):
1405         (WebInspector.TimelineSaver.prototype._writeNextChunk):
1406
1407 2012-09-21  Alexandru Chiculita  <achicu@adobe.com>
1408
1409         -webkit-clip-path is applied on elements that are not descendant of the container
1410         https://bugs.webkit.org/show_bug.cgi?id=97217
1411
1412         Reviewed by Dirk Schulze.
1413
1414         The clip-path was set on the GraphicsContext, but was never restored, thus making all the layers
1415         rendered in the same "group" of save/restore state use the same clip-path.
1416
1417         Test: css3/masking/clip-path-restore.html
1418
1419         * css/StyleResolver.cpp:
1420         (WebCore::StyleResolver::collectMatchingRulesForList):
1421         clip-path property should create a stacking-context, otherwise the RenderLayers will not be nested,
1422         meaning that the clip-path of the parent is not going to apply correctly.
1423
1424         * rendering/RenderLayer.cpp:
1425         (WebCore::RenderLayer::paintLayerContents):
1426
1427 2012-09-21  Kent Tamura  <tkent@chromium.org>
1428
1429         Remove unused functions of LocalizedDate.h
1430         https://bugs.webkit.org/show_bug.cgi?id=97311
1431
1432         Reviewed by Kentaro Hara.
1433
1434         WebCore::localizedTimeFormatText, WebCore::localizedShortTimeFormatText,
1435         and WebCore::timeAMPMLabels are not used any more because we switched to
1436         the corresponding functions of Localizer.
1437
1438         No new tests because of no behavior changes.
1439
1440         * platform/text/Localizer.h:
1441         (Localizer): Moved comments from LocalizedDate.h.
1442         * platform/text/LocalizedDate.h:
1443         (WebCore): Removed localizedTimeFormatText,
1444         localizedShortTimeFormatText, and timeAMPMLabels.
1445         * platform/text/LocalizedDateICU.cpp:
1446         (WebCore): ditto.
1447         * platform/text/LocalizedDateWin.cpp:
1448         (WebCore): ditto.
1449         * platform/text/mac/LocalizedDateMac.cpp:
1450         (WebCore): ditto.
1451
1452 2012-09-21  Keishi Hattori  <keishi@webkit.org>
1453
1454         Add datalist suggestions into DateTimeChooserParameters
1455         https://bugs.webkit.org/show_bug.cgi?id=97292
1456
1457         Reviewed by Kent Tamura.
1458
1459         We read datalist suggestions, add them to DateTimeChooserParameters,
1460         and pass them to the page popup.
1461
1462         No new tests. No behavior change yet.
1463
1464         * html/shadow/CalendarPickerElement.cpp:
1465         (WebCore::CalendarPickerElement::openPopup): Read datalist suggestions and add them to DateTimeChooserParameters
1466         * platform/DateTimeChooser.h:
1467         (DateTimeChooserParameters): Added localizedSuggestionValues so we can show localized values inside the page popup.
1468
1469 2012-09-21  Yoshifumi Inoue  <yosin@chromium.org>
1470
1471         [Forms] DateTimeEditElement::layout() should take date time format as a parameter
1472         https://bugs.webkit.org/show_bug.cgi?id=97300
1473
1474         Reviewed by Kent Tamura.
1475
1476         This patch introduces DateTimeEditElement::LayoutParameters struct for
1477         passing four parameters to DateTimeEditElement::layout() for passing
1478         date time format from client of DateTimeEditElement instead of
1479         DateTimeEditElement::layout() takes time or short time format.
1480
1481         This patch is a part of preparation of introducing multiple fields
1482         date/datetime/month/week input UI.
1483
1484         This patch affects ports which enable both ENABLE_INPUT_TYPE_TIME and
1485         ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS.
1486
1487         No new tests. This patch doesn't change behavior.
1488
1489         * html/TimeInputType.cpp:
1490         (WebCore::TimeInputType::updateInnerTextValue): Changed to use LayoutParmeters.
1491         * html/shadow/DateTimeEditElement.cpp:  Removed unused include files, LocalizedDate.h and LocalizedNumber.h.
1492         (DateTimeEditBuilder):
1493         (WebCore::DateTimeEditBuilder::DateTimeEditBuilder): Changed parameters to LayoutParmeters.
1494         (WebCore::DateTimeEditElement::LayoutParameters::shouldHaveSecondField): Moved from DateTimeEditBuilder::needSecondField().
1495         (WebCore::DateTimeEditElement::layout): Changed to take LayoutParameters.
1496         (WebCore::DateTimeEditElement::setValueAsDate): ditto
1497         (WebCore::DateTimeEditElement::setEmptyValue): ditto
1498         * html/shadow/DateTimeEditElement.h: Removed unused classe declarations DateComponents and DateTimeEditLayouter.
1499         (LayoutParameters):  Added to bundle parameters for layout().
1500         (WebCore::DateTimeEditElement::LayoutParameters::LayoutParameters): Added.
1501
1502 2012-09-20  Pavel Feldman  <pfeldman@chromium.org>
1503
1504         Web Inspector: render grid scale to the right / at bottom in case box is close to 0 on that axis.
1505         https://bugs.webkit.org/show_bug.cgi?id=97219
1506
1507         Reviewed by Vsevolod Vlasov.
1508
1509         Otherwise, it is hard to inspect objects close to (0, 0)
1510
1511         * inspector/InspectorOverlayPage.html:
1512
1513 2012-09-21  Sheriff Bot  <webkit.review.bot@gmail.com>
1514
1515         Unreviewed, rolling out r129086.
1516         http://trac.webkit.org/changeset/129086
1517         https://bugs.webkit.org/show_bug.cgi?id=97312
1518
1519         Broke input rendering (Requested by shinyak on #webkit).
1520
1521         * html/BaseButtonInputType.cpp:
1522         (WebCore):
1523         * html/BaseButtonInputType.h:
1524         (WebCore::BaseButtonInputType::BaseButtonInputType):
1525         (BaseButtonInputType):
1526         * html/FileInputType.cpp:
1527         (WebCore::UploadButtonElement::create):
1528         (WebCore::UploadButtonElement::createForMultiple):
1529         * html/HTMLInputElement.cpp:
1530         (WebCore::HTMLInputElement::parseAttribute):
1531         * html/InputType.cpp:
1532         * html/InputType.h:
1533         (InputType):
1534         * rendering/RenderButton.cpp:
1535         (WebCore::RenderButton::RenderButton):
1536         (WebCore::RenderButton::styleDidChange):
1537         (WebCore::RenderButton::updateFromElement):
1538         (WebCore):
1539         (WebCore::RenderButton::setText):
1540         (WebCore::RenderButton::text):
1541         * rendering/RenderButton.h:
1542         (RenderButton):
1543
1544 2012-09-21  Kihong Kwon  <kihong.kwon@samsung.com>
1545
1546         Remove useless class prototypes from Vibration.h
1547         https://bugs.webkit.org/show_bug.cgi?id=97304
1548
1549         Reviewed by Kentaro Hara.
1550
1551         Remove two useless class prototype statements in the Vibration.h
1552
1553         * Modules/vibration/Vibration.h:
1554
1555 2012-09-21  Keishi Hattori  <keishi@webkit.org>
1556
1557         Prepare CalendarPicker so we can add another picker, SuggetionPicker
1558         https://bugs.webkit.org/show_bug.cgi?id=97193
1559
1560         Reviewed by Kent Tamura.
1561
1562         Preparation so we can add another picker to CalendarPicker and switch
1563         between them.
1564
1565         No new tests. No behavior change.
1566
1567         * Resources/pagepopups/calendarPicker.css:
1568         (.calendar-picker): Added so we can apply these styles just to calendar picker.
1569         * Resources/pagepopups/calendarPicker.js:
1570         (CalendarPicker.validateConfig): Renamed so each picker can validate the config object.
1571         (initialize):
1572         (closePicker): Call Picker.cleanup().
1573         (openCalendarPicker):
1574         (CalendarPicker):
1575         (CalendarPicker.prototype.cleanup): Cleanup event listener on document.body.
1576         * Resources/pagepopups/pickerCommon.js:
1577         (Picker.prototype.cleanup):
1578
1579 2012-09-20  John Mellor  <johnme@chromium.org>
1580
1581         Text Autosizing: Cluster text at flow roots, for consistency and to avoid autosizing headers/footers.
1582         https://bugs.webkit.org/show_bug.cgi?id=97025
1583
1584         Reviewed by Julien Chaffraix.
1585
1586         This patch has 3 main changes:
1587
1588         1. All text within a "cluster" (roughly equivalent to a CSS flow root /
1589            block formatting context) must have a uniform textAutosizingMultiplier,
1590            except for subtrees which are themselves clusters. This improves the
1591            consistency of the final output, since sibling blocks are now more
1592            likely to have the same multiplier (hence grow in proportion).
1593
1594         2. Clusters must contain a minimum amount of text in order to be
1595            autosized (4 lines of text, assuming each char is 1em wide, so about
1596            2 lines of text in practice). This is to reduce the likelihood of
1597            autosizing things like headers and footers, which can be quite
1598            visually distracting. The rationale is that if a cluster contains
1599            very few lines of text then it's ok to have to zoom in and pan from
1600            side to side to read each line, since if there are very few lines of
1601            text you'll only need to pan across once or twice.
1602
1603         3. To avoid adding a 3rd tree traversal, processSubtree/processBox were
1604            refactored such that all of Text Autosizing now happens as a single
1605            tree traversal (hence halving the number of tree traversals done).
1606
1607         Tests: fast/text-autosizing/cluster-narrow-in-wide.html
1608                fast/text-autosizing/cluster-wide-in-narrow.html
1609                fast/text-autosizing/clusters-insufficient-text.html
1610                fast/text-autosizing/clusters-insufficient-width.html
1611                fast/text-autosizing/clusters-sufficient-text-except-in-root.html
1612                fast/text-autosizing/clusters-sufficient-width.html
1613
1614         * rendering/TextAutosizer.cpp:
1615         (TextAutosizingWindowInfo):
1616
1617             Added this struct to bundle together the various sizes that
1618             processSubtree needs to pass to every recursive call to
1619             processCluster and processContainer.
1620
1621         (WebCore::TextAutosizer::processSubtree):
1622
1623             - Bundle windowSize and minLayoutSize together as a single struct,
1624               TextAutosizingWindowInfo, rather than passing them separately.
1625             - Walk up the tree to find the current cluster and container, rather
1626               than (incorrectly) assuming that the layoutRoot is always a
1627               container.
1628             - Call processCluster instead of traversing the tree.
1629
1630         (WebCore::TextAutosizer::processCluster):
1631
1632             Calculates the multiplier based on the width of the cluster (moved
1633             the calculation here from processBox, since now the multiplier is
1634             fixed per cluster), and delegates to processContainer for the actual
1635             tree traversal (since clusters are also containers).
1636
1637         (WebCore::contentHeightIsConstrained):
1638
1639             Changed parameter to RenderBlock.
1640
1641         (WebCore::TextAutosizer::processContainer):
1642
1643             This now takes care of the whole tree traversal, recursively calling
1644             processCluster/processContainer when it encounters such an object,
1645             and setMultiplier on RenderText objects (as processBox used to).
1646             Also added a check that the RenderText's multiplier is not already
1647             equal to the target multiplier (to save needlessly setting it).
1648
1649         (WebCore::TextAutosizer::isContainer):
1650
1651             - Changed to be a positive (is) instead of negative (isNot) check.
1652             - Require objects to be RenderBlocks so it's easier to find them
1653               using containingBlock, and there don't seem to be many interesting
1654               RenderBoxes that aren't RenderBlocks.
1655
1656         (WebCore::TextAutosizer::isAutosizingCluster):
1657
1658             A container that is also a flow root / block formatting context
1659             (approximately), hence demarcates an independent region of the page,
1660             within which we want consistent autosizing.
1661
1662         (WebCore::TextAutosizer::clusterShouldBeAutosized):
1663
1664             Uses measureDescendantTextWidth and to check whether the cluster
1665             contains enough text to be worth autosizing.
1666
1667         (WebCore::TextAutosizer::measureDescendantTextWidth):
1668
1669             Recursively traverse the cluster, skipping constrained height
1670             containers as processContainer does, to measure how much autosizable
1671             text it contains. Early out as soon as the minimum text width is
1672             reached.
1673
1674         (WebCore::TextAutosizer::nextInPreOrderSkippingDescendantsOfContainers):
1675
1676             Replaces nextInPreOrderMatchingFilter. The filter is now fixed to
1677             isContainer (we no longer need an isAutosizingCluster filter, since
1678             I consolidated the tree traversal), and filtered objects are
1679             actually returned (so they can in turn be recursively traversed),
1680             it's just their descendants that get skipped.
1681
1682         * rendering/TextAutosizer.h:
1683         (TextAutosizer):
1684
1685             - Deleted RenderObjectFilterFunctor, since the filter of
1686               nextInPreOrderSkippingDescendantsOfContainers is now fixed.
1687
1688 2012-09-20  Yoshifumi Inoue  <yosin@chromium.org>
1689
1690         [Platform] There are memory leak in LocaleICU
1691         https://bugs.webkit.org/show_bug.cgi?id=97289
1692
1693         Reviewed by Kent Tamura.
1694
1695         This patch adds udt_close() calls for medium time format and short
1696         time format data used in LocaleICU class to avoid memory leak.
1697
1698         This memory leak is found by external tool Valgrind and reported in
1699         Chromium bug repositry(http://crbug.com/151006) with stack trace of
1700         call path of leaked memory.
1701
1702         This patch affects ports which enable both ENABLE_INPUT_TYPE_TIME and
1703         ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS.
1704
1705         No new tests. External tool such as Valgrind will check this memory leak.
1706
1707         * platform/text/LocaleICU.cpp:
1708         (WebCore::LocaleICU::~LocaleICU): Added to call udt_close() for m_mediumTimeFormat
1709         and m_shortTimeFormat which have UDateFormat objects.
1710
1711 2012-09-20  Kenichi Ishibashi  <bashi@chromium.org>
1712
1713         Chromium mac cannot display AppleColorEmoji
1714         https://bugs.webkit.org/show_bug.cgi?id=97286
1715
1716         Reviewed by Kent Tamura.
1717
1718         Disable AppleColorEmoji for now. We will re-enable it after Skia supports CTFontDrawGlyphs().
1719
1720         No new tests. Fallback fonts should be used for emoji codepoints.
1721
1722         * platform/graphics/mac/FontCacheMac.mm:
1723         (WebCore::FontCache::getFontDataForCharacters):
1724
1725 2012-09-20  Luke Macpherson   <macpherson@chromium.org>
1726
1727         Fix use-after free when using a variable to specify a -webkit-filter.
1728         https://bugs.webkit.org/show_bug.cgi?id=97153
1729
1730         Reviewed by Abhishek Arya.
1731
1732         Make StyleResolver's m_pendingSVGDocuments a hashmap of RefPtr instead of raw pointers such that the document values cannot be freed prematurely.
1733         Present assumption is that storing raw pointers is ok because CSSValues will live as long as the StyleResolver instance, however that it no longer
1734         true when variables are used, so we must ensure we increment the reference counter to ensure the CSSValues are not freed prematurely.
1735
1736         Test: fast/css/variables/var-filter.html
1737
1738         * css/StyleResolver.cpp:
1739         (WebCore::StyleResolver::collectMatchingRulesForList):
1740         * css/StyleResolver.h:
1741         (StyleResolver):
1742
1743 2012-09-20  Levi Weintraub  <leviw@chromium.org>
1744
1745         Prevent reading stale data from InlineTextBoxes
1746         https://bugs.webkit.org/show_bug.cgi?id=94750
1747
1748         Reviewed by Abhishek Arya.
1749
1750         Text from dirty InlineTextBoxes should never be read or used. This change
1751         enforces this design goal by forcefully zero-ing out the start and length
1752         of InlineTextBoxes when they're being marked dirty. Ideally, we'd also
1753         add asserts to the accessors for this data, but there are still several
1754         places in editing that cause this. https://bugs.webkit.org/show_bug.cgi?id=97264
1755         tracks these cases.
1756
1757         This change involves making markDirty virtual. Running the line-layout
1758         performance test as well as profiling resizing the html5 spec showed
1759         negligable impact with this change.
1760
1761         No new tests as this doesn't change any proper behavior.
1762
1763         * dom/Position.cpp:
1764         (WebCore::Position::downstream): Adding a FIXME.
1765         * rendering/InlineBox.h:
1766         (WebCore::InlineBox::markDirty): Marking virtual to allow InlineTextBox to
1767         overload and zero out its start and length.
1768         * rendering/InlineTextBox.cpp:
1769         (WebCore::InlineTextBox::markDirty): Zeroing out the start and length when
1770         we mark the box dirty.
1771         * rendering/InlineTextBox.h:
1772         * rendering/RenderText.cpp:
1773         (WebCore::RenderText::setTextWithOffset): Adding a FIXME.
1774
1775 2012-09-20  Adam Barth  <abarth@webkit.org>
1776
1777         Measure how often web pages use Worker and SharedWorker
1778         https://bugs.webkit.org/show_bug.cgi?id=97273
1779
1780         Reviewed by Ojan Vafai.
1781
1782         We're not considering removing these features, but it will give us a
1783         baseline idea of how often they're used.
1784
1785         * page/FeatureObserver.h:
1786         * workers/SharedWorker.cpp:
1787         (WebCore::SharedWorker::create):
1788         * workers/Worker.cpp:
1789         (WebCore::Worker::create):
1790
1791 2012-09-20  Tony Chang  <tony@chromium.org>
1792
1793         [chromium] Enable more clang warnings
1794         https://bugs.webkit.org/show_bug.cgi?id=97257
1795
1796         Reviewed by James Robinson.
1797
1798         Add -Wunused-parameter to WebCore targets. Apple's Mac compile already
1799         warns on this and it's a common source of error for Chromium patches.
1800
1801         No new tests, should compile cleanly.
1802
1803         * WebCore.gyp/WebCore.gyp:
1804
1805 2012-09-20  Dan Bernstein  <mitz@apple.com>
1806
1807         Kerning never occurs between a space and the following glyph
1808         https://bugs.webkit.org/show_bug.cgi?id=97269
1809
1810         Reviewed by Tim Horton.
1811
1812         Covered by several existing tests.
1813
1814         * platform/graphics/mac/ComplexTextController.cpp:
1815         (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Changed to not reset the advance
1816         of a space, and added a comment about how this also needs to be fixed for other characters
1817         that are treated as spaces.
1818
1819 2012-09-20  Kenichi Ishibashi  <bashi@chromium.org>
1820
1821         [Chromium] Improve glyph selection of HarfBuzzShaper
1822         https://bugs.webkit.org/show_bug.cgi?id=97164
1823
1824         Reviewed by Tony Chang.
1825
1826         Take into account clusters for selection.
1827
1828         Test: fast/text/international/hebrew-selection.html
1829
1830         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp:
1831         (WebCore::HarfBuzzShaper::HarfBuzzRun::applyShapeResult): Removed m_logClusters.
1832         m_logCluster is no longer used.
1833         (WebCore::HarfBuzzShaper::HarfBuzzRun::characterIndexForXPosition):
1834         - If targetX is in the left side of the first cluster, return the leftmost character index.
1835         - If targetX is in the right side of the last cluster, return the rightmost character index.
1836         - If targetX is between the right side of the cluster N and the left side of the cluster N+1, then:
1837           - return N+1 for LTR.
1838           - return N for RTL.
1839         (WebCore::HarfBuzzShaper::HarfBuzzRun::xPositionForOffset):
1840         Find the cluster of index in question, then:
1841         - return the left side boundary of the cluster for LTR.
1842         - return the right side boundary of the cluster for RTL.
1843         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.h:
1844         (HarfBuzzRun):
1845
1846 2012-09-20  Tony Chang  <tony@chromium.org>
1847
1848         Replace RenderListBox::updateLogicalHeight with RenderListBox::computeLogicalHeight
1849         https://bugs.webkit.org/show_bug.cgi?id=97263
1850
1851         Reviewed by Ojan Vafai.
1852
1853         This is part of making computeLogicalHeight virtual so with any RenderBox pointer, one
1854         can compute the logical height without mutating the RenderBox.
1855
1856         No new tests, this is a refactor and existing list box tests should pass.
1857
1858         * rendering/RenderBox.h:
1859         (RenderBox):
1860         * rendering/RenderListBox.cpp:
1861         (WebCore::RenderListBox::layout): Move layout related logic here.
1862         (WebCore::RenderListBox::computeLogicalHeight): Use const version and remove layout related code.
1863         * rendering/RenderListBox.h:
1864         (RenderListBox): Override computeLogicalHeight.
1865
1866 2012-09-20  Mike West  <mkwst@chromium.org>
1867
1868         CSP reports should send an empty "blocked-uri" rather than nothing.
1869         https://bugs.webkit.org/show_bug.cgi?id=97256
1870
1871         Reviewed by Adam Barth.
1872
1873         In cases where a Content Security Policy violation report is generated
1874         without blocking a resource at a particular URI (inline scripts, for
1875         example), we currently leave the "blocked-uri" attribute out of the
1876         report entirely. For the same reason that we included the "referrer"
1877         attribute in webkit.org/b/97233, we should include an explicitly empty
1878         "blocked-uri" in these cases.
1879
1880         This new behavior is covered by updates to existing test expectations
1881         around the reporting functionality.
1882
1883         * page/ContentSecurityPolicy.cpp:
1884         (WebCore::ContentSecurityPolicy::reportViolation):
1885             If the 'blocked-uri' is invalid, add a "blocked-uri" attribute that
1886             is explicitly empty.
1887
1888 2012-09-20  Patrick Gansterer  <paroga@webkit.org>
1889
1890         Add String::numberToFixedPrecisionString()
1891         https://bugs.webkit.org/show_bug.cgi?id=96330
1892
1893         Reviewed by Benjamin Poulain.
1894
1895         * platform/text/TextStream.cpp:
1896         (WebCore::TextStream::operator<<): Use the new function instead of String::number() with flags.
1897
1898 2012-09-20  Adam Klein  <adamk@chromium.org>
1899
1900         Rename ContainerNode::parserAddChild "parserAppendChild" for consistency
1901         https://bugs.webkit.org/show_bug.cgi?id=97254
1902
1903         Reviewed by Adam Barth.
1904
1905         No functional change, all the below changes are simple renames.
1906
1907         * dom/ContainerNode.cpp:
1908         (WebCore::ContainerNode::takeAllChildrenFrom):
1909         (WebCore::ContainerNode::parserAppendChild):
1910         * dom/ContainerNode.h:
1911         (ContainerNode):
1912         * dom/DOMImplementation.cpp:
1913         (WebCore::DOMImplementation::createDocument):
1914         * editing/markup.cpp:
1915         (WebCore::createFragmentForTransformToFragment):
1916         * html/HTMLViewSourceDocument.cpp:
1917         (WebCore::HTMLViewSourceDocument::createContainingTable):
1918         (WebCore::HTMLViewSourceDocument::addSpanWithClassName):
1919         (WebCore::HTMLViewSourceDocument::addLine):
1920         (WebCore::HTMLViewSourceDocument::finishLine):
1921         (WebCore::HTMLViewSourceDocument::addText):
1922         (WebCore::HTMLViewSourceDocument::addBase):
1923         (WebCore::HTMLViewSourceDocument::addLink):
1924         * html/parser/HTMLConstructionSite.cpp:
1925         (WebCore::executeTask):
1926         * html/parser/HTMLTreeBuilder.cpp:
1927         (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
1928         * html/track/WebVTTParser.cpp:
1929         (WebCore::WebVTTParser::constructTreeFromToken):
1930         * xml/XMLErrors.cpp:
1931         (WebCore::createXHTMLParserErrorHeader):
1932         (WebCore::XMLErrors::insertErrorMessageBlock):
1933         * xml/parser/XMLDocumentParser.cpp:
1934         (WebCore::XMLDocumentParser::enterText):
1935         (WebCore::XMLDocumentParser::parseDocumentFragment):
1936         * xml/parser/XMLDocumentParserLibxml2.cpp:
1937         (WebCore::XMLDocumentParser::startElementNs):
1938         (WebCore::XMLDocumentParser::processingInstruction):
1939         (WebCore::XMLDocumentParser::cdataBlock):
1940         (WebCore::XMLDocumentParser::comment):
1941         (WebCore::XMLDocumentParser::internalSubset):
1942         * xml/parser/XMLDocumentParserQt.cpp:
1943         (WebCore::XMLDocumentParser::parseStartElement):
1944         (WebCore::XMLDocumentParser::parseProcessingInstruction):
1945         (WebCore::XMLDocumentParser::parseCdata):
1946         (WebCore::XMLDocumentParser::parseComment):
1947         (WebCore::XMLDocumentParser::parseDtd):
1948         * xml/parser/XMLTreeBuilder.cpp:
1949         (WebCore::XMLTreeBuilder::processDOCTYPE):
1950         (WebCore::XMLTreeBuilder::processStartTag):
1951         (WebCore::XMLTreeBuilder::add):
1952
1953 2012-09-20  James Robinson  <jamesr@chromium.org>
1954
1955         [chromium] Remove unused copy of chromium compositor implementation files
1956         https://bugs.webkit.org/show_bug.cgi?id=97255
1957
1958         Reviewed by Adam Barth.
1959
1960         Now that use_libcc_for_compositor is set to 1 these files aren't used anywhere.
1961
1962         * WebCore.gyp/WebCore.gyp:
1963         * WebCore.gypi:
1964         * platform/chromium/support/CCThreadImpl.cpp: Removed.
1965         * platform/chromium/support/CCThreadImpl.h: Removed.
1966         * platform/chromium/support/WebCompositorImpl.cpp: Removed.
1967         * platform/chromium/support/WebCompositorImpl.h: Removed.
1968         * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp: Removed.
1969         * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h: Removed.
1970         * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp: Removed.
1971         * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h: Removed.
1972         * platform/graphics/chromium/Canvas2DLayerBridge.cpp:
1973         (WebCore::Canvas2DLayerBridge::Canvas2DLayerBridge):
1974         (WebCore::Canvas2DLayerBridge::~Canvas2DLayerBridge):
1975         * platform/graphics/chromium/CanvasLayerTextureUpdater.cpp: Removed.
1976         * platform/graphics/chromium/CanvasLayerTextureUpdater.h: Removed.
1977         * platform/graphics/chromium/ContentLayerChromium.cpp: Removed.
1978         * platform/graphics/chromium/ContentLayerChromium.h: Removed.
1979         * platform/graphics/chromium/ContentLayerChromiumClient.h: Removed.
1980         * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp: Removed.
1981         * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.h: Removed.
1982         * platform/graphics/chromium/GeometryBinding.cpp: Removed.
1983         * platform/graphics/chromium/GeometryBinding.h: Removed.
1984         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
1985         * platform/graphics/chromium/HeadsUpDisplayLayerChromium.cpp: Removed.
1986         * platform/graphics/chromium/HeadsUpDisplayLayerChromium.h: Removed.
1987         * platform/graphics/chromium/IOSurfaceLayerChromium.cpp: Removed.
1988         * platform/graphics/chromium/IOSurfaceLayerChromium.h: Removed.
1989         * platform/graphics/chromium/ImageLayerChromium.cpp: Removed.
1990         * platform/graphics/chromium/ImageLayerChromium.h: Removed.
1991         * platform/graphics/chromium/LayerChromium.cpp: Removed.
1992         * platform/graphics/chromium/LayerChromium.h: Removed.
1993         * platform/graphics/chromium/LayerTextureSubImage.cpp: Removed.
1994         * platform/graphics/chromium/LayerTextureSubImage.h: Removed.
1995         * platform/graphics/chromium/LayerTextureUpdater.h: Removed.
1996         * platform/graphics/chromium/PlatformColor.h: Removed.
1997         * platform/graphics/chromium/ProgramBinding.cpp: Removed.
1998         * platform/graphics/chromium/ProgramBinding.h: Removed.
1999         * platform/graphics/chromium/RateLimiter.cpp: Removed.
2000         * platform/graphics/chromium/RateLimiter.h: Removed.
2001         * platform/graphics/chromium/RenderSurfaceChromium.cpp: Removed.
2002         * platform/graphics/chromium/RenderSurfaceChromium.h: Removed.
2003         * platform/graphics/chromium/ScrollbarLayerChromium.cpp: Removed.
2004         * platform/graphics/chromium/ScrollbarLayerChromium.h: Removed.
2005         * platform/graphics/chromium/ShaderChromium.cpp: Removed.
2006         * platform/graphics/chromium/ShaderChromium.h: Removed.
2007         * platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.cpp: Removed.
2008         * platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.h: Removed.
2009         * platform/graphics/chromium/SolidColorLayerChromium.cpp: Removed.
2010         * platform/graphics/chromium/SolidColorLayerChromium.h: Removed.
2011         * platform/graphics/chromium/TextureCopier.cpp: Removed.
2012         * platform/graphics/chromium/TextureCopier.h: Removed.
2013         * platform/graphics/chromium/TextureLayerChromium.cpp: Removed.
2014         * platform/graphics/chromium/TextureLayerChromium.h: Removed.
2015         * platform/graphics/chromium/TextureLayerChromiumClient.h: Removed.
2016         * platform/graphics/chromium/ThrottledTextureUploader.cpp: Removed.
2017         * platform/graphics/chromium/ThrottledTextureUploader.h: Removed.
2018         * platform/graphics/chromium/TiledLayerChromium.cpp: Removed.
2019         * platform/graphics/chromium/TiledLayerChromium.h: Removed.
2020         * platform/graphics/chromium/TreeSynchronizer.cpp: Removed.
2021         * platform/graphics/chromium/TreeSynchronizer.h: Removed.
2022         * platform/graphics/chromium/UnthrottledTextureUploader.h: Removed.
2023         * platform/graphics/chromium/VideoLayerChromium.cpp: Removed.
2024         * platform/graphics/chromium/VideoLayerChromium.h: Removed.
2025         * platform/graphics/chromium/cc/CCActiveAnimation.cpp: Removed.
2026         * platform/graphics/chromium/cc/CCActiveAnimation.h: Removed.
2027         * platform/graphics/chromium/cc/CCAnimationCurve.cpp: Removed.
2028         * platform/graphics/chromium/cc/CCAnimationCurve.h: Removed.
2029         * platform/graphics/chromium/cc/CCAnimationEvents.h: Removed.
2030         * platform/graphics/chromium/cc/CCAppendQuadsData.h: Removed.
2031         * platform/graphics/chromium/cc/CCCheckerboardDrawQuad.cpp: Removed.
2032         * platform/graphics/chromium/cc/CCCheckerboardDrawQuad.h: Removed.
2033         * platform/graphics/chromium/cc/CCCompletionEvent.h: Removed.
2034         * platform/graphics/chromium/cc/CCDamageTracker.cpp: Removed.
2035         * platform/graphics/chromium/cc/CCDamageTracker.h: Removed.
2036         * platform/graphics/chromium/cc/CCDebugBorderDrawQuad.cpp: Removed.
2037         * platform/graphics/chromium/cc/CCDebugBorderDrawQuad.h: Removed.
2038         * platform/graphics/chromium/cc/CCDebugRectHistory.cpp: Removed.
2039         * platform/graphics/chromium/cc/CCDebugRectHistory.h: Removed.
2040         * platform/graphics/chromium/cc/CCDelayBasedTimeSource.cpp: Removed.
2041         * platform/graphics/chromium/cc/CCDelayBasedTimeSource.h: Removed.
2042         * platform/graphics/chromium/cc/CCDirectRenderer.cpp: Removed.
2043         * platform/graphics/chromium/cc/CCDirectRenderer.h: Removed.
2044         * platform/graphics/chromium/cc/CCDrawQuad.cpp: Removed.
2045         * platform/graphics/chromium/cc/CCDrawQuad.h: Removed.
2046         * platform/graphics/chromium/cc/CCFontAtlas.cpp: Removed.
2047         * platform/graphics/chromium/cc/CCFontAtlas.h: Removed.
2048         * platform/graphics/chromium/cc/CCFrameRateController.cpp: Removed.
2049         * platform/graphics/chromium/cc/CCFrameRateController.h: Removed.
2050         * platform/graphics/chromium/cc/CCFrameRateCounter.cpp: Removed.
2051         * platform/graphics/chromium/cc/CCFrameRateCounter.h: Removed.
2052         * platform/graphics/chromium/cc/CCGraphicsContext.h: Removed.
2053         * platform/graphics/chromium/cc/CCHeadsUpDisplayLayerImpl.cpp: Removed.
2054         * platform/graphics/chromium/cc/CCHeadsUpDisplayLayerImpl.h: Removed.
2055         * platform/graphics/chromium/cc/CCIOSurfaceDrawQuad.cpp: Removed.
2056         * platform/graphics/chromium/cc/CCIOSurfaceDrawQuad.h: Removed.
2057         * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp: Removed.
2058         * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.h: Removed.
2059         * platform/graphics/chromium/cc/CCInputHandler.h: Removed.
2060         * platform/graphics/chromium/cc/CCKeyframedAnimationCurve.cpp: Removed.
2061         * platform/graphics/chromium/cc/CCKeyframedAnimationCurve.h: Removed.
2062         * platform/graphics/chromium/cc/CCLayerAnimationController.cpp: Removed.
2063         * platform/graphics/chromium/cc/CCLayerAnimationController.h: Removed.
2064         * platform/graphics/chromium/cc/CCLayerImpl.cpp: Removed.
2065         * platform/graphics/chromium/cc/CCLayerImpl.h: Removed.
2066         * platform/graphics/chromium/cc/CCLayerIterator.cpp: Removed.
2067         * platform/graphics/chromium/cc/CCLayerIterator.h: Removed.
2068         * platform/graphics/chromium/cc/CCLayerQuad.cpp: Removed.
2069         * platform/graphics/chromium/cc/CCLayerQuad.h: Removed.
2070         * platform/graphics/chromium/cc/CCLayerSorter.cpp: Removed.
2071         * platform/graphics/chromium/cc/CCLayerSorter.h: Removed.
2072         * platform/graphics/chromium/cc/CCLayerTilingData.cpp: Removed.
2073         * platform/graphics/chromium/cc/CCLayerTilingData.h: Removed.
2074         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: Removed.
2075         * platform/graphics/chromium/cc/CCLayerTreeHost.h: Removed.
2076         * platform/graphics/chromium/cc/CCLayerTreeHostClient.h: Removed.
2077         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: Removed.
2078         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.h: Removed.
2079         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: Removed.
2080         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: Removed.
2081         * platform/graphics/chromium/cc/CCMathUtil.cpp: Removed.
2082         * platform/graphics/chromium/cc/CCMathUtil.h: Removed.
2083         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: Removed.
2084         * platform/graphics/chromium/cc/CCOcclusionTracker.h: Removed.
2085         * platform/graphics/chromium/cc/CCOverdrawMetrics.cpp: Removed.
2086         * platform/graphics/chromium/cc/CCOverdrawMetrics.h: Removed.
2087         * platform/graphics/chromium/cc/CCPageScaleAnimation.cpp: Removed.
2088         * platform/graphics/chromium/cc/CCPageScaleAnimation.h: Removed.
2089         * platform/graphics/chromium/cc/CCPrioritizedTexture.cpp: Removed.
2090         * platform/graphics/chromium/cc/CCPrioritizedTexture.h: Removed.
2091         * platform/graphics/chromium/cc/CCPrioritizedTextureManager.cpp: Removed.
2092         * platform/graphics/chromium/cc/CCPrioritizedTextureManager.h: Removed.
2093         * platform/graphics/chromium/cc/CCPriorityCalculator.cpp: Removed.
2094         * platform/graphics/chromium/cc/CCPriorityCalculator.h: Removed.
2095         * platform/graphics/chromium/cc/CCProxy.cpp: Removed.
2096         * platform/graphics/chromium/cc/CCProxy.h: Removed.
2097         * platform/graphics/chromium/cc/CCQuadCuller.cpp: Removed.
2098         * platform/graphics/chromium/cc/CCQuadCuller.h: Removed.
2099         * platform/graphics/chromium/cc/CCQuadSink.h: Removed.
2100         * platform/graphics/chromium/cc/CCRenderPass.cpp: Removed.
2101         * platform/graphics/chromium/cc/CCRenderPass.h: Removed.
2102         * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp: Removed.
2103         * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h: Removed.
2104         * platform/graphics/chromium/cc/CCRenderPassSink.h: Removed.
2105         * platform/graphics/chromium/cc/CCRenderSurface.cpp: Removed.
2106         * platform/graphics/chromium/cc/CCRenderSurface.h: Removed.
2107         * platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp: Removed.
2108         * platform/graphics/chromium/cc/CCRenderSurfaceFilters.h: Removed.
2109         * platform/graphics/chromium/cc/CCRenderer.h: Removed.
2110         * platform/graphics/chromium/cc/CCRendererGL.cpp: Removed.
2111         * platform/graphics/chromium/cc/CCRendererGL.h: Removed.
2112         * platform/graphics/chromium/cc/CCRenderingStats.h: Removed.
2113         * platform/graphics/chromium/cc/CCResourceProvider.cpp: Removed.
2114         * platform/graphics/chromium/cc/CCResourceProvider.h: Removed.
2115         * platform/graphics/chromium/cc/CCScheduler.cpp: Removed.
2116         * platform/graphics/chromium/cc/CCScheduler.h: Removed.
2117         * platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp: Removed.
2118         * platform/graphics/chromium/cc/CCSchedulerStateMachine.h: Removed.
2119         * platform/graphics/chromium/cc/CCScopedTexture.cpp: Removed.
2120         * platform/graphics/chromium/cc/CCScopedTexture.h: Removed.
2121         * platform/graphics/chromium/cc/CCScopedThreadProxy.h: Removed.
2122         * platform/graphics/chromium/cc/CCScrollbarAnimationController.cpp: Removed.
2123         * platform/graphics/chromium/cc/CCScrollbarAnimationController.h: Removed.
2124         * platform/graphics/chromium/cc/CCScrollbarAnimationControllerLinearFade.cpp: Removed.
2125         * platform/graphics/chromium/cc/CCScrollbarAnimationControllerLinearFade.h: Removed.
2126         * platform/graphics/chromium/cc/CCScrollbarGeometryFixedThumb.cpp: Removed.
2127         * platform/graphics/chromium/cc/CCScrollbarGeometryFixedThumb.h: Removed.
2128         * platform/graphics/chromium/cc/CCScrollbarGeometryStub.cpp: Removed.
2129         * platform/graphics/chromium/cc/CCScrollbarGeometryStub.h: Removed.
2130         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp: Removed.
2131         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h: Removed.
2132         * platform/graphics/chromium/cc/CCSettings.cpp: Removed.
2133         * platform/graphics/chromium/cc/CCSettings.h: Removed.
2134         * platform/graphics/chromium/cc/CCSharedQuadState.cpp: Removed.
2135         * platform/graphics/chromium/cc/CCSharedQuadState.h: Removed.
2136         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: Removed.
2137         * platform/graphics/chromium/cc/CCSingleThreadProxy.h: Removed.
2138         * platform/graphics/chromium/cc/CCSolidColorDrawQuad.cpp: Removed.
2139         * platform/graphics/chromium/cc/CCSolidColorDrawQuad.h: Removed.
2140         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp: Removed.
2141         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.h: Removed.
2142         * platform/graphics/chromium/cc/CCStreamVideoDrawQuad.cpp: Removed.
2143         * platform/graphics/chromium/cc/CCStreamVideoDrawQuad.h: Removed.
2144         * platform/graphics/chromium/cc/CCTexture.cpp: Removed.
2145         * platform/graphics/chromium/cc/CCTexture.h: Removed.
2146         * platform/graphics/chromium/cc/CCTextureDrawQuad.cpp: Removed.
2147         * platform/graphics/chromium/cc/CCTextureDrawQuad.h: Removed.
2148         * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp: Removed.
2149         * platform/graphics/chromium/cc/CCTextureLayerImpl.h: Removed.
2150         * platform/graphics/chromium/cc/CCTextureUpdateController.cpp: Removed.
2151         * platform/graphics/chromium/cc/CCTextureUpdateController.h: Removed.
2152         * platform/graphics/chromium/cc/CCTextureUpdateQueue.cpp: Removed.
2153         * platform/graphics/chromium/cc/CCTextureUpdateQueue.h: Removed.
2154         * platform/graphics/chromium/cc/CCThread.h: Removed.
2155         * platform/graphics/chromium/cc/CCThreadProxy.cpp: Removed.
2156         * platform/graphics/chromium/cc/CCThreadProxy.h: Removed.
2157         * platform/graphics/chromium/cc/CCThreadTask.h: Removed.
2158         * platform/graphics/chromium/cc/CCTileDrawQuad.cpp: Removed.
2159         * platform/graphics/chromium/cc/CCTileDrawQuad.h: Removed.
2160         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: Removed.
2161         * platform/graphics/chromium/cc/CCTiledLayerImpl.h: Removed.
2162         * platform/graphics/chromium/cc/CCTimeSource.h: Removed.
2163         * platform/graphics/chromium/cc/CCTimer.cpp: Removed.
2164         * platform/graphics/chromium/cc/CCTimer.h: Removed.
2165         * platform/graphics/chromium/cc/CCTimingFunction.cpp: Removed.
2166         * platform/graphics/chromium/cc/CCTimingFunction.h: Removed.
2167         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: Removed.
2168         * platform/graphics/chromium/cc/CCVideoLayerImpl.h: Removed.
2169         * platform/graphics/chromium/cc/CCYUVVideoDrawQuad.cpp: Removed.
2170         * platform/graphics/chromium/cc/CCYUVVideoDrawQuad.h: Removed.
2171
2172 2012-09-20  Tony Chang  <tony@chromium.org>
2173
2174         Implement absolutely positioned flex items
2175         https://bugs.webkit.org/show_bug.cgi?id=93798
2176
2177         Reviewed by Ojan Vafai.
2178
2179         Previously, we treated absolutely positioned flex items as a 0x0 placeholder element.
2180         Now we position the 0x0 placeholder where the next item would go. This causes the
2181         following changes:
2182         - justify-content: space-{around,between} no longer change due to the existence of absolutely positioned flex items.
2183         - alignment doesn't change the placement of absolutely positioned flex items.
2184         - auto margins in the alignment direction don't do anything on absolutely positioned flex items.
2185
2186         Test: css3/flexbox/position-absolute-children.html
2187
2188         * rendering/RenderFlexibleBox.cpp:
2189         (WebCore::RenderFlexibleBox::availableAlignmentSpaceForChild): Absolutely positioned flex items should not use this.
2190         (WebCore::RenderFlexibleBox::updateAutoMarginsInCrossAxis): Absolutely positioned flex items should not use this.
2191         (WebCore::initialJustifyContentOffset): If there are no flex items, space-around should center an absolutely positioned flex item.
2192         (WebCore::RenderFlexibleBox::numberOfInFlowPositionedChildren): Helper method for helping to compute space-between and space-around.
2193         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Fix spacing when space-between or space-around.
2194         (WebCore::RenderFlexibleBox::layoutColumnReverse): Fix spacing when space-between or space-around.
2195         (WebCore::RenderFlexibleBox::alignChildren): Treat absolutely positioned children like flex-start.
2196         * rendering/RenderFlexibleBox.h: numberOfInFlowPositionedChildren method.
2197
2198 2012-09-20  Sheriff Bot  <webkit.review.bot@gmail.com>
2199
2200         Unreviewed, rolling out r129144.
2201         http://trac.webkit.org/changeset/129144
2202         https://bugs.webkit.org/show_bug.cgi?id=97244
2203
2204         causing lots of assertions in tests (Requested by smfr on
2205         #webkit).
2206
2207         * rendering/InlineBox.h:
2208         (WebCore::InlineBox::markDirty):
2209         * rendering/InlineTextBox.cpp:
2210         * rendering/InlineTextBox.h:
2211         (WebCore::InlineTextBox::start):
2212         (WebCore::InlineTextBox::end):
2213         (WebCore::InlineTextBox::len):
2214         (WebCore::InlineTextBox::offsetRun):
2215
2216 2012-09-20  Mike West  <mkwst@chromium.org>
2217
2218         CSP reports should send an empty 'referrer' rather than nothing.
2219         https://bugs.webkit.org/show_bug.cgi?id=97233
2220
2221         Reviewed by Adam Barth.
2222
2223         Currently, if a protected resource doesn't have a referrer, then any
2224         Content Security Policy violations send a report that doesn't contain
2225         a referrer attribute. It's arguably friendlier to developers to include
2226         an explicitly empty attribute.
2227
2228         This new behavior is covered by updates to existing test expectations
2229         around the reporting functionality.
2230
2231         * page/ContentSecurityPolicy.cpp:
2232         (WebCore::ContentSecurityPolicy::reportViolation):
2233             Drop the 'if', and always write out a referrer.
2234
2235 2012-09-20  David Barton  <dbarton@mathscribe.com>
2236
2237         [MathML] Increase visual space around fraction parts, italic variables, and operators
2238         https://bugs.webkit.org/show_bug.cgi?id=97228
2239
2240         Reviewed by Eric Seidel.
2241
2242         This makes MathML more readable, and more in agreement with Firefox and TeX.
2243
2244         Tested by existing tests.
2245
2246         * css/mathml.css:
2247         (mfrac > :first-child):
2248         (mfrac > :last-child):
2249         (mfrac):
2250         (mi):
2251         (msub > mi:first-child, msubsup > mi:first-child):
2252             - Subscripts don't need to move right after an italic <mi>.
2253         (msubsup > mi:first-child + * + *):
2254             - Superscripts do need to move right after an italic <mi>.
2255         (math > mo, mrow > mo, msqrt > mo, mtd > mo):
2256             - These are ok values for now. It will be better to use different values for different operators, as the FIXME says.
2257         (math > mo:last-child, mrow > mo:last-child, msqrt > mo:last-child, mtd > mo:last-child):
2258             - Prefix and postfix operators, including fences, generally get less spacing than infix operators.
2259         
2260         * rendering/mathml/RenderMathMLFenced.cpp:
2261         (WebCore::RenderMathMLFenced::createMathMLOperator):
2262             - Usually the separator is a comma or semicolon, so we only put space after it for now.
2263         (WebCore::RenderMathMLFenced::makeFences):
2264         (WebCore::RenderMathMLFenced::addChild):
2265         (WebCore::RenderMathMLFenced::styleDidChange):
2266         * rendering/mathml/RenderMathMLFenced.h:
2267         (RenderMathMLFenced):
2268         
2269         * rendering/mathml/RenderMathMLFraction.cpp:
2270         (WebCore):
2271         (WebCore::RenderMathMLFraction::updateFromElement):
2272             - gDenominatorPad is now handled by mathml.css.
2273         
2274         * rendering/mathml/RenderMathMLSubSup.cpp:
2275         (WebCore):
2276         (WebCore::RenderMathMLSubSup::fixScriptsStyle):
2277             - gSubsupScriptMargin is now handled by mathml.css.
2278
2279 2012-09-20  Tommy Widenflycht  <tommyw@google.com>
2280
2281         MediaStream API: Extend UserMediaRequest with a ownerDocument method
2282         https://bugs.webkit.org/show_bug.cgi?id=97095
2283
2284         Reviewed by Adam Barth.
2285
2286         Chromium need to know exactly which frame called getUserMedia so that it can
2287         clean away the stream when the frame goes away.
2288         Since that information is available in webkit add an accessor method.
2289
2290         Chromium mock class extended to test the added method.
2291
2292         * Modules/mediastream/UserMediaRequest.cpp:
2293         (WebCore::UserMediaRequest::ownerDocument):
2294         (WebCore):
2295         * Modules/mediastream/UserMediaRequest.h:
2296         (WebCore):
2297         (UserMediaRequest):
2298
2299 2012-09-20  Levi Weintraub  <leviw@chromium.org>
2300
2301         Prevent reading stale data from InlineTextBoxes
2302         https://bugs.webkit.org/show_bug.cgi?id=94750
2303
2304         Reviewed by Eric Seidel.
2305
2306         Text from dirty InlineTextBoxes should never be read or used. This change enforces this
2307         design goal by forcefully zero-ing out the start and length of InlineTextBoxes when 
2308         they're being marked dirty. It also adds asserts to accessors for those members.
2309
2310         This change involves making markDirty virtual. Running the line-layout performance test
2311         as well as profiling resizing the html5 spec showed negligable impact with this change.
2312
2313         No new tests as this doesn't change any proper behavior.
2314
2315         * rendering/InlineBox.h:
2316         (WebCore::InlineBox::markDirty): Making virtual to allow InlineTextBox to overload and
2317         zero out its start and length.
2318         * rendering/InlineTextBox.cpp:
2319         (WebCore::InlineTextBox::markDirty): Zeroing out start and length when we mark the box dirty.
2320         * rendering/InlineTextBox.h:
2321         (WebCore::InlineTextBox::start): Adding an assert when we hit this case.
2322         (WebCore::InlineTextBox::end): Ditto.
2323         (WebCore::InlineTextBox::len): Ditto.
2324         (WebCore::InlineTextBox::offsetRun): Ditto.
2325
2326 2012-09-20  Mike West  <mkwst@chromium.org>
2327
2328         Support paths in Content Security Policy directives.
2329         https://bugs.webkit.org/show_bug.cgi?id=89750
2330
2331         Reviewed by Adam Barth.
2332
2333         In CSP 1.0, paths are simply ignored: 'script-src
2334         http://example.com/path/to/a/file' would allow script to be loaded from
2335         http://example.com/path/to/a/file/javascript.js, but also from
2336         http://example.com/javascript.js.
2337
2338         This patch is an experimental implementation of more granular path
2339         support in CSP source lists as proposed in the current editor's draft of
2340         CSP 1.1. Paths are treated as specifying directories in which resources
2341         can be found, and are implicitly terminated with a '/': in other words,
2342         'script-src http://a.com/path' is the same as
2343         'script-src http://a.com/path/'. Moreover, paths cannot contain either
2344         '?' or '#' characters.
2345
2346         This is implemented outside the CSP_NEXT flag. All ports will be
2347         effected.
2348
2349         Spec: https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html#matching
2350
2351         Tests: http/tests/security/contentSecurityPolicy/source-list-parsing-paths-01.html
2352                http/tests/security/contentSecurityPolicy/source-list-parsing-paths-02.html
2353
2354         * page/ContentSecurityPolicy.cpp:
2355         (WebCore::CSPSource::CSPSource):
2356             Store a path along with each CSP source.
2357         (WebCore::CSPSource::matches):
2358             Check the path when comparing a URL to the source.
2359         (WebCore::CSPSource::pathMatches):
2360             Compare the URL-decoded version of the resource to validate against
2361             the source's stored path. If the resource's path begins with the
2362             stored path, then it matches! If not, it doesn't.
2363         (CSPSource):
2364             Store a path along with each CSP source.
2365         (WebCore::CSPSourceList::parse):
2366             Pass a 'path' in when creating CSPSource objects.
2367         (WebCore::CSPSourceList::parsePath):
2368             Actually parse the path, flagging errors if '?' or '#' are present,
2369             URL-decoding the result, and ensuring that a terminal '/' is
2370             added if necessary.
2371         (WebCore::CSPSourceList::addSourceSelf):
2372             Ensure that 'self' sources have an empty path.
2373         * page/ContentSecurityPolicy.h:
2374             Dropping the "ignored path component" console warning.
2375
2376 2012-09-20  Joanmarie Diggs  <jdiggs@igalia.com>
2377
2378         [GTK] ControlsPanel string is not localized in LocalizedStringsGtk
2379         https://bugs.webkit.org/show_bug.cgi?id=96502
2380
2381         Reviewed by Chris Fleizach.
2382
2383         Adds the ControlsPanel string to the strings localized in LocalizedStringsGtk.
2384
2385         Test: platform/gtk/accessibility/media-controls-panel-title.html
2386
2387         * platform/gtk/LocalizedStringsGtk.cpp:
2388         (WebCore::localizedMediaControlElementString):
2389
2390 2012-09-20  Julien Chaffraix  <jchaffraix@webkit.org>
2391
2392         Remove isStartColumn in the border collapsing code
2393         https://bugs.webkit.org/show_bug.cgi?id=97024
2394
2395         Reviewed by Abhishek Arya.
2396
2397         isStartColumn is embedding the same information as prevCell. As we need to compute it
2398         in most of the cases, we may as well just reuse them.
2399
2400         While touching this code, I cleaned up the code by removing some unneeded checks and renaming
2401         some variables in preparation for bug 79272.
2402
2403         Refactoring covered by existing collapsing borders tests.
2404
2405         * rendering/RenderTableCell.cpp:
2406         (WebCore::RenderTableCell::computeCollapsedStartBorder):
2407         Removed |isStartColumn|.
2408
2409         (WebCore::RenderTableCell::computeCollapsedEndBorder):
2410         Added a comment about why |isEndColumn| is needed. Also cleaned up this code to be
2411         consistent with computeCollapsedStartBorder.
2412
2413 2012-09-20  Andrey Adaikin  <aandrey@chromium.org>
2414
2415         Web Inspector: setPropertyValue does not work for non-finite numbers
2416         https://bugs.webkit.org/show_bug.cgi?id=97016
2417
2418         Reviewed by Vsevolod Vlasov.
2419
2420         Fix: setting a property to NaN, Infinity or -Infinity numbers did not work.
2421
2422         * inspector/front-end/RemoteObject.js:
2423         (WebInspector.RemoteObject.prototype.setPropertyValue):
2424
2425 2012-09-20  Otto Derek Cheung  <otcheung@rim.com>
2426
2427         Web Inspector: Cookie info in Network Resources Cookies tab are incorrect
2428         https://bugs.webkit.org/show_bug.cgi?id=95491
2429
2430         Reviewed by Vsevolod Vlasov.
2431
2432         Web Inspector: Cookie info in Network Resources Cookies tab are incorrect
2433         https://bugs.webkit.org/show_bug.cgi?id=95491
2434
2435         Fixing a typo that causes cookies to appear as a "Session"
2436         cookie in the Networking panel because it can never find a properly named
2437         "expired" header.
2438
2439         This bug exposes another bug where the cookie GMT strings are inproperly
2440         parsed, causing an "invalid date" error to show up in the cookies tab in 
2441         the Networking panel.
2442
2443         Also changed test expectations in LayoutTests/inspector/cookie-parser-expected.txt
2444
2445         * inspector/front-end/CookieParser.js:
2446         (WebInspector.Cookie.prototype.get session):
2447
2448 2012-09-20  Alexander Pavlov  <apavlov@chromium.org>
2449
2450         Web Inspector: [Elements] Word wrap disablement in the DOM tree broken
2451         https://bugs.webkit.org/show_bug.cgi?id=97185
2452
2453         Reviewed by Pavel Feldman.
2454
2455         Restored the effective "white-space: nowrap" for the tree elements.
2456
2457         * inspector/front-end/inspector.css:
2458         (.nowrap):
2459
2460 2012-09-20  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
2461
2462         [TouchAdjustment] Simplify and improve hybrid distance function.
2463         https://bugs.webkit.org/show_bug.cgi?id=96519
2464
2465         Reviewed by Antonio Gomes.
2466
2467         The current distance function is a combination of two functions. One measuring the distance from
2468         the hot-spot in the touch-area to the centerline of the target, and one measuring how much of the
2469         target is covered.
2470
2471         The distance to the center-line was used instead of just the distance to the target, to make it
2472         easier to hit small targets near big targets. The very same feature is however also the reason
2473         measuring how much the target is covered is added. Using the distance to center-line is therefore
2474         redundant now, and can be replaced with the simpler 'distance the hot-spot needs to be adjusted'.
2475
2476         Tested by existing touchadjustment tests.
2477
2478         * page/TouchAdjustment.cpp:
2479         (TouchAdjustment):
2480         (WebCore::TouchAdjustment::hybridDistanceFunction):
2481         * platform/graphics/IntRect.cpp:
2482         * platform/graphics/IntRect.h:
2483         (IntRect):
2484
2485 2012-09-20  Yoshifumi Inoue  <yosin@chromium.org>
2486
2487         [Forms] HTMLSelectElement should call formStateDidChange on both menulist and lisbox mode
2488         https://bugs.webkit.org/show_bug.cgi?id=97177
2489
2490         Reviewed by Kent Tamura.
2491
2492         This patch makes listbox mode select element to call formStateDidChange()
2493         when selected options are changed.
2494
2495         For this change, this patch moves notifyFormStateChanged() to
2496         HTMLFormControlElementWithState class from HTMLTextFormControlElement
2497         for sharing code HTMLSelectElement class and HTMLInputElement/HTMLTextAreaElement
2498         derived from HTMLTextFormControlElement.
2499
2500         No new tests. We can't test this change in WebKit test tools. Test script
2501         will be implemented in Chromium side.
2502
2503         * html/HTMLFormControlElementWithState.cpp:
2504         (WebCore::HTMLFormControlElementWithState::notifyFormStateChanged):
2505         (WebCore):
2506         * html/HTMLFormControlElementWithState.h: Moved a declaration of notifyFormStateChanged() from HTMLTextFormControlElement.
2507         (HTMLFormControlElementWithState): Moved an implemented of notifyFormStateChanged() from HTMLTextFormControlElement.
2508         * html/HTMLSelectElement.cpp:
2509         (WebCore::HTMLSelectElement::selectOption): Changed to call notifyFormStateChanged() instead of formStateDidChange().
2510         (WebCore::HTMLSelectElement::updateListBoxSelection): Changed to call notifyFormStateChanged().
2511         * html/HTMLTextFormControlElement.cpp: Moved an implemented of notifyFormStateChanged() to HTMLFormControlElementWithState class.
2512         * html/HTMLTextFormControlElement.h: Moved a declaration of notifyFormStateChanged() to HTMLFormControlElementWithState class.
2513
2514 2012-09-20  Keishi Hattori  <keishi@webkit.org>
2515
2516         REGRESSION(r127727): Can't navigate between months with arrow keys in calendar picker
2517         https://bugs.webkit.org/show_bug.cgi?id=97166
2518
2519         Reviewed by Kent Tamura.
2520
2521         Fixing bug in r127727 so arrow keys work properly.
2522
2523         Test: fast/forms/date/calendar-picker-key-operations.html
2524
2525         * Resources/pagepopups/calendarPicker.js:
2526         (DaysTable.prototype._maybeSetPreviousMonth):
2527         (DaysTable.prototype._maybeSetNextMonth):
2528
2529 2012-09-18  Alexander Pavlov  <apavlov@chromium.org>
2530
2531         Web Inspector: Use and process the actual ScriptId in the protocol EventListener object
2532         https://bugs.webkit.org/show_bug.cgi?id=93271
2533
2534         Reviewed by Yury Semikhatsky.
2535
2536         - Use the actual script identifier in the "location" object's "scriptId" field
2537           for the DOM.EventListener protocol type, but send the script URL in the new "sourceName" field.
2538         - Use 0-based lines in the "location" object's "lineNumber" field for linkifyRawLocation() to work correctly.
2539         - Fixed formatting of links to listener locations to contain "(program)" rather than empty string.
2540
2541         * bindings/js/ScriptEventListener.cpp:
2542         (WebCore::eventListenerHandlerLocation):
2543         * bindings/js/ScriptEventListener.h:
2544         (WebCore):
2545         * bindings/v8/ScriptEventListener.cpp:
2546         (WebCore::eventListenerHandlerLocation):
2547         * bindings/v8/ScriptEventListener.h:
2548         (WebCore):
2549         * inspector/Inspector.json:
2550         * inspector/InspectorDOMAgent.cpp:
2551         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
2552         * inspector/front-end/BreakpointsSidebarPane.js:
2553         * inspector/front-end/EventListenersSidebarPane.js:
2554         * inspector/front-end/Linkifier.js:
2555         (WebInspector.Linkifier.DefaultFormatter.prototype.formatLiveAnchor):
2556         * inspector/front-end/ResourceUtils.js:
2557         (WebInspector.formatLinkText): Use "(program)" if URL is empty.
2558
2559 2012-09-19  Dan Bernstein  <mitz@apple.com>
2560
2561         WebCore part of adding a setting and API for disabling screen font substitution
2562         https://bugs.webkit.org/show_bug.cgi?id=97168
2563
2564         Reviewed by Tim Horton.
2565
2566         * WebCore.exp.in: Added an entry for Settings::setScreenFontSubstitutionEnabled.
2567         * css/StyleResolver.cpp:
2568         (WebCore::StyleResolver::collectMatchingRulesForList): Changed to use printer fonts if
2569         screen font substitution is not enabled.
2570         * page/Settings.cpp:
2571         (WebCore::Settings::Settings): Added initializer for new m_screenFontSubstitutionEnabled
2572         member variable. The initial value is true, matching existing behavior.
2573         (WebCore::Settings::setScreenFontSubstitutionEnabled): Added this setter, which updated the
2574         member variable and forces a style recalc in all pages using this Settings.
2575         * page/Settings.h:
2576         (Settings): Added m_screenFontSubstitutionEnabled boolean member variable.
2577         (WebCore::Settings::screenFontSubstitutionEnabled): Added this getter.
2578
2579 2012-09-19  Yoshifumi Inoue  <yosin@chromium.org>
2580
2581         [Forms] multiple fields time input UI should call notifyFormStateChanged() when value of field is changed
2582         https://bugs.webkit.org/show_bug.cgi?id=97169
2583
2584         Reviewed by Kent Tamura.
2585
2586         This patch makes multiple fields time input UI calls notifyFormStateChanged()
2587         when field value is changed as other input types do.
2588
2589         This patch affects ports which enable both ENABLE_INPUT_TYPE_TIME and
2590         ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS.
2591
2592         No new tests. We can't test this change in WebKit test tools. Test script
2593         will be implemented in Chromium side.
2594
2595         * html/TimeInputType.cpp:
2596         (WebCore::TimeInputType::DateTimeEditControlOwnerImpl::editControlValueChanged):
2597
2598 2012-09-19  Keishi Hattori  <keishi@webkit.org>
2599
2600         REGRESSION(r127727): Calendar picker focus ring should be hidden until key event
2601         https://bugs.webkit.org/show_bug.cgi?id=97165
2602
2603         Reviewed by Kent Tamura.
2604
2605         The regression was caused because NoFocusRing class was being removed
2606         from then main element inside resetMain().
2607
2608         No new tests. Covered by calendar-picker-appearance.html.
2609
2610         * Resources/pagepopups/calendarPicker.js:
2611         (initialize):
2612         (CalendarPicker):
2613         (CalendarPicker.prototype._layout):
2614         (DaysTable.prototype._handleKey):
2615         (CalendarPicker.prototype._handleBodyKeyDown):
2616         (CalendarPicker.prototype.maybeUpdateFocusStyle): Make this a method of CalendarPicker because we don't use it for other pickers.
2617
2618 2012-09-19  David Grogan  <dgrogan@chromium.org>
2619
2620         IndexedDB: Print console warning about setVersion
2621         https://bugs.webkit.org/show_bug.cgi?id=96575
2622
2623         Reviewed by Tony Chang.
2624
2625         setVersion has been out of the spec for almost a year but there are
2626         still a lot of users.
2627
2628         We show the warning once per database object as an approximation for
2629         once per page.
2630
2631         No new tests, but 150-something rebaselines.
2632
2633         * Modules/indexeddb/IDBDatabase.cpp:
2634         (WebCore::IDBDatabase::IDBDatabase):
2635         (WebCore::IDBDatabase::setVersion):
2636         * Modules/indexeddb/IDBDatabase.h:
2637         (IDBDatabase):
2638
2639 2012-09-19  Sean Wang  <Xuewen.Wang@torchmobile.com.cn>
2640
2641         [BlackBerry] Basic authentication challenge credentials for stored credentials again after restarting browser
2642         https://bugs.webkit.org/show_bug.cgi?id=96362
2643
2644         Reviewed by Rob Buis.
2645
2646         This patch enable reading credentials from the persistent credential storage
2647         when it is not private browsing mode and there is not a credential in the RAM
2648         for the requested resource.
2649
2650         Since we don't load persistent stored credentials into RAM at the starting time,
2651         even we have saved the credentials at the last browsing, after restarting the browser,
2652         it will still challenge for credentials for the requesting resources.
2653
2654         No new tests, it uses the original authentication tests. There is no way to
2655         clear all credentials or restarting browsers to test this feature.
2656
2657         * platform/network/blackberry/CredentialBackingStore.cpp:
2658         (WebCore::CredentialBackingStore::getProtectionSpace):
2659         (WebCore):
2660         * platform/network/blackberry/CredentialBackingStore.h:
2661         (CredentialBackingStore):
2662         * platform/network/blackberry/NetworkManager.cpp:
2663         (WebCore::NetworkManager::startJob):
2664
2665 2012-09-19  Shinya Kawanaka  <shinyak@chromium.org>
2666
2667         [Refactoring] ButtonInputType of <input> element should have innerElement to make <input> AuthorShadowDOM-ready
2668         https://bugs.webkit.org/show_bug.cgi?id=95939
2669
2670         Reviewed by Dimitri Glazkov.
2671
2672         We had 2 ways to show text in RenderButton. One is to use RenderButton::setText() and the other is to add renderer
2673         as a child of RenderButton. <input type="button"> used the former one, and <button> used the latter one.
2674         The former makes RenderButton a bit messy, and also prevents from making <input> AuthorShadowDOM ready.
2675
2676         So we remove RenderButton::setText() and refactor <input type="button"> to use a Shadow DOM to show text.
2677
2678         Since the text in <input type="button"> should create RenderTextFragment, we introduce TextForButtonInputType
2679         class. RenderText will allow us to select the inner text of <input>, but it should not.
2680
2681         No new tests, existing tests should cover the change.
2682
2683         * html/BaseButtonInputType.cpp:
2684         (TextForButtonInputType): Special Text node which creates RenderTextFragment.
2685         (WebCore):
2686         (WebCore::TextForButtonInputType::create):
2687         (WebCore::TextForButtonInputType::TextForButtonInputType):
2688         (WebCore::TextForButtonInputType::createRenderer):
2689         (WebCore::BaseButtonInputType::BaseButtonInputType):
2690         (WebCore::BaseButtonInputType::createShadowSubtree):
2691         (WebCore::BaseButtonInputType::destroyShadowSubtree):
2692         (WebCore::BaseButtonInputType::valueAttributeChanged): When a button value is changed, we reflect the value to
2693         the text node in ShadowDOM.
2694         * html/BaseButtonInputType.h:
2695         (BaseButtonInputType):
2696         * html/FileInputType.cpp:
2697         (WebCore::UploadButtonElement::create): Creates Shadow DOM subtree.
2698         (WebCore::UploadButtonElement::createForMultiple): Creates Shadow DOM subtree.
2699         * html/HTMLInputElement.cpp:
2700         (WebCore::HTMLInputElement::parseAttribute):
2701         * html/InputType.cpp:
2702         (WebCore::InputType::valueAttributeChanged):
2703         (WebCore):
2704         * html/InputType.h:
2705         (InputType):
2706         * rendering/RenderButton.cpp:
2707         (WebCore::RenderButton::RenderButton):
2708         (WebCore::RenderButton::styleDidChange): Removed unnecessary text related code.
2709         * rendering/RenderButton.h:
2710         (RenderButton):
2711
2712 2012-09-19  Jason Liu  <jason.liu@torchmobile.com.cn>
2713
2714         [BlackBerry] Get infinite amount of requests after attempting re-authentication basic.
2715         https://bugs.webkit.org/show_bug.cgi?id=96994
2716
2717         Reviewed by Rob Buis.
2718
2719         We should remove the wrong credentials before calling sendRequestWithCredentials again.
2720         #PR 200226
2721         Reviewed internally by Jonathan Dong.
2722
2723         No new tests. It is covered by ManualTests/blackberry/http-auth-challenge.html.
2724
2725
2726         * platform/network/blackberry/NetworkJob.cpp:
2727         (WebCore::NetworkJob::notifyAuthReceived):
2728
2729 2012-09-19  Adam Barth  <abarth@webkit.org>
2730
2731         Remove Blob.webkitSlice
2732         https://bugs.webkit.org/show_bug.cgi?id=96715
2733
2734         Reviewed by Darin Fisher.
2735
2736         Based on these usage metrics, it appears that it is safe to remove
2737         Blob.webkitSlice. Folks that were previously calling webkitSlice should
2738         just call slice instead. They do the same thing.
2739
2740         Ratio of Blob.webkitSlice calls to Blob.slice: 14.87%
2741         Ratio of Blob.webkitSlice calls to Document creation: 0.0053%
2742
2743         * fileapi/Blob.cpp:
2744         (WebCore::Blob::slice):
2745         * fileapi/Blob.h:
2746         (Blob):
2747         * fileapi/Blob.idl:
2748         * fileapi/File.h:
2749         (File):
2750         * inspector/front-end/FileUtils.js:
2751         (WebInspector.ChunkedFileReader.prototype._loadChunk):
2752
2753 2012-09-19  Julien Chaffraix  <jchaffraix@webkit.org>
2754
2755         The collapsing border code needs direction-aware border getters
2756         https://bugs.webkit.org/show_bug.cgi?id=96710
2757
2758         Reviewed by Ojan Vafai.
2759
2760         This refactoring is needed to extend our collapsing border support for mixed directionality
2761         at the table cell level (we currently wrongly ignore any direction below the row-group). For
2762         now, the new helpers are dumb and return exactly the old result but they will be made
2763         direction-aware in a follow-up change.
2764
2765         Refactoring covered by existing tests.
2766
2767         * rendering/RenderBox.h:
2768         (WebCore::RenderBox::hasSameDirectionAs):
2769         Added this helper function. For now, it's only used to compare against
2770         the table direction but we will reuse it to compare the current cell
2771         direction against the other table parts.
2772
2773         * rendering/RenderTableCell.h:
2774         (WebCore::RenderTableCell::computeCollapsedStartBorder):
2775         (WebCore::RenderTableCell::computeCollapsedEndBorder):
2776         Transitioned those 2 functions to using the new direction-aware functions.
2777
2778         * rendering/RenderTable.cpp:
2779         (WebCore::RenderTable::tableStartBorderAdjoiningCell):
2780         (WebCore::RenderTable::tableEndBorderAdjoiningCell):
2781         * rendering/RenderTableSection.cpp:
2782         (WebCore::RenderTableSection::firstRowCellAdjoiningTableStart):
2783         (WebCore::RenderTableSection::firstRowCellAdjoiningTableEnd):
2784         * rendering/RenderTableCell.h:
2785         (WebCore::RenderTableCell::borderAdjoiningTableStart):
2786         (WebCore::RenderTableCell::borderAdjoiningTableEnd):
2787         * rendering/RenderTableSection.h:
2788         (WebCore::RenderTableSection::borderAdjoiningTableStart):
2789         (WebCore::RenderTableSection::borderAdjoiningTableEnd):
2790         Updated those call sites to use RenderBox::hasSameDirectionAs.
2791
2792         * rendering/RenderTableCell.h:
2793         (WebCore::RenderTableCell::borderAdjoiningNextCell):
2794         (WebCore::RenderTableCell::borderAdjoiningPreviousCell):
2795         * rendering/RenderTableCol.cpp:
2796         (WebCore::RenderTableCol::borderAdjoiningCellStartBorder):
2797         (WebCore::RenderTableCol::borderAdjoiningCellEndBorder):
2798         (WebCore::RenderTableCol::borderAdjoiningCellBefore):
2799         (WebCore::RenderTableCol::borderAdjoiningCellAfter):
2800         * rendering/RenderTableCol.h:
2801         * rendering/RenderTableRow.cpp:
2802         (WebCore::RenderTableRow::borderAdjoiningStartCell):
2803         (WebCore::RenderTableRow::borderAdjoiningEndCell):
2804         * rendering/RenderTableRow.h:
2805         (WebCore::RenderTableRow::borderAdjoiningTableStart):
2806         (WebCore::RenderTableRow::borderAdjoiningTableEnd):
2807         * rendering/RenderTableSection.cpp:
2808         (WebCore::RenderTableSection::borderAdjoiningStartCell):
2809         (WebCore::RenderTableSection::borderAdjoiningEndCell):
2810         New direction-aware functions. Added some ASSERT to ensure
2811         we don't call them with the wrong parameters.
2812
2813 2012-09-19  Kentaro Hara  <haraken@chromium.org>
2814
2815         [V8] ScriptController::compileAndRunScript() can crash
2816         https://bugs.webkit.org/show_bug.cgi?id=96567
2817
2818         Reviewed by Adam Barth.
2819
2820         See chromium bug: http://code.google.com/p/chromium/issues/detail?id=146776
2821
2822         The root cause is that v8::PreCompile() can return 0 when the stack of
2823         V8's parser overflows (c.f. http://code.google.com/codesearch#OAMlx_jo-ck/src/v8/src/parser.cc&exact_package=chromium&q=kPreParseStackOverflow&type=cs&l=6021).
2824
2825         This patch adds the 0 check to the caller side. Given that precompileScript()
2826         is just trying to speculatively precompile a script, it's OK to give up
2827         precompiling for such edge cases.
2828
2829         Manually tested with the html generated by the following shell script:
2830
2831           echo '<script language="JavaScript" type="text/javascript" src="asan-crash.js"></script>' > asan-crash.html
2832           echo 'if(wURLF.search("")>=0) {}' > asan-crash.js
2833           for i in `seq 14830`
2834           do
2835             echo 'else if(wURLF.search("")>=0) {}' >> asan-crash.js
2836           done
2837
2838         I didn't add the test because '14380' depends on an environment
2839         and because we don't want to add a huge html test.
2840
2841         * bindings/v8/ScriptSourceCode.cpp:
2842         (WebCore::ScriptSourceCode::precompileScript):
2843
2844 2012-09-19  Joshua Bell  <jsbell@chromium.org>
2845
2846         IndexedDB: Pending call cleanup
2847         https://bugs.webkit.org/show_bug.cgi?id=96952
2848
2849         Reviewed by Tony Chang.
2850
2851         Replace RefPtr usage with OwnPtr for PendingXXXCalls (since they're never referenced twice)
2852         and replace queue of "second half open" calls with a single item.
2853
2854         No new tests - no functional changes.
2855
2856         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
2857         (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::create):
2858         (WebCore::IDBDatabaseBackendImpl::PendingOpenWithVersionCall::create):
2859         (WebCore::IDBDatabaseBackendImpl::PendingDeleteCall::create):
2860         (WebCore::IDBDatabaseBackendImpl::PendingSetVersionCall::create):
2861         (WebCore::IDBDatabaseBackendImpl::setVersion):
2862         (WebCore::IDBDatabaseBackendImpl::transactionFinishedAndAbortFired):
2863         (WebCore::IDBDatabaseBackendImpl::processPendingCalls):
2864         (WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction):
2865         (WebCore::IDBDatabaseBackendImpl::close):
2866         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
2867         (IDBDatabaseBackendImpl):
2868
2869 2012-09-19  Kenichi Ishibashi  <bashi@chromium.org>
2870
2871         [Chromium] Improve glyph positioning of HarfBuzzShaper
2872         https://bugs.webkit.org/show_bug.cgi?id=97093
2873
2874         Reviewed by Tony Chang.
2875
2876         For proper positioning, HarfBuzzShaper requires the positions(offsets and advance)
2877         of the previous glyph. This mean we need to shape all HarfBuzzRuns before glyph positioning.
2878         Collect and shape HarfBuzzRuns, then set positions of glyphs.
2879
2880         No new tests. Tests that uses spacing for complex text (e.g. fast/text/atsui-negative-spacing-features.html)
2881         should close in the expectations. (not the identical, maybe there are subtle differences between
2882         harfbuzz old and harfbuzz ng)
2883
2884         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp:
2885         (WebCore::HarfBuzzShaper::HarfBuzzRun::applyShapeResult): Allocate m_offsets.
2886         (WebCore::HarfBuzzShaper::HarfBuzzRun::setGlyphAndPositions): Renamed and set offset too.
2887         (WebCore::HarfBuzzShaper::HarfBuzzRun::characterIndexForXPosition):
2888         (WebCore::HarfBuzzShaper::shape): Call fillGlyphBuffer() if we need to fill glyphBuffer.
2889         (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): Removed glyph positioning code.
2890         (WebCore::HarfBuzzShaper::setGlyphPositionsForHarfBuzzRun): Ditto.
2891         (WebCore::HarfBuzzShaper::fillGlyphBufferFromHarfBuzzRun): Added.
2892         (WebCore):
2893         (WebCore::HarfBuzzShaper::fillGlyphBuffer): Added.
2894         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.h:
2895         (HarfBuzzRun):
2896         (WebCore::HarfBuzzShaper::HarfBuzzRun::offsets): Added.
2897         (WebCore::HarfBuzzShaper::HarfBuzzRun::glyphToCharacterIndexes): Added.
2898         (HarfBuzzShaper):
2899
2900 2012-09-19  James Simonsen  <simonjam@chromium.org>
2901
2902         [Chromium] Disable resource load scheduling
2903         https://bugs.webkit.org/show_bug.cgi?id=97131
2904
2905         Reviewed by Nate Chapin.
2906
2907         We'll use Chrome's network stack for scheduling instead.
2908
2909         No new tests.
2910
2911         * loader/ResourceLoadScheduler.cpp:
2912         * loader/cache/CachedResourceLoader.cpp:
2913         (WebCore::CachedResourceLoader::preload):
2914
2915 2012-09-19  Dan Bernstein  <mitz@apple.com>
2916
2917         When kerning is enabled, word spacing is doubly accounted for in RenderText::computePreferredLogicalWidths
2918         https://bugs.webkit.org/show_bug.cgi?id=97146
2919
2920         Reviewed by Anders Carlsson.
2921
2922         Test: fast/text/word-space-with-kerning.html
2923
2924         * rendering/RenderText.cpp:
2925         (WebCore::RenderText::computePreferredLogicalWidths): When kerning is enabled, words are
2926         measured with their trailing space, if there is one, then the width of a space is subtracted.
2927         Changed that width, stored in the local variable wordTrailingSpaceWidth, to include the
2928         word spacing, since it is included in the result of widthFromCache().
2929
2930 2012-09-19  Joshua Bell  <jsbell@chromium.org>
2931
2932         IndexedDB: Remove "current transaction" concept from backing store
2933         https://bugs.webkit.org/show_bug.cgi?id=96663
2934
2935         Reviewed by Tony Chang.
2936
2937         IndexedDB should allow multiple transactions to run in parallel within and
2938         across databases within an origin. As an initial step to enabling this, the
2939         backing store should not hold a "current transaction" - instead, operations
2940         should be done relative to a transaction managed by the database.
2941
2942         No new tests - no functional changes.
2943
2944         * Modules/indexeddb/IDBBackingStore.h:
2945         (IDBBackingStore):
2946         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
2947         (WebCore::IDBDatabaseBackendImpl::createObjectStoreInternal):
2948         (WebCore::IDBDatabaseBackendImpl::deleteObjectStoreInternal):
2949         (WebCore::IDBDatabaseBackendImpl::setVersionInternal):
2950         (WebCore::IDBDatabaseBackendImpl::setIntVersionInternal):
2951         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
2952         (IDBDatabaseBackendImpl):
2953         * Modules/indexeddb/IDBIndexBackendImpl.cpp:
2954         (WebCore::IDBIndexBackendImpl::openCursorInternal):
2955         (WebCore::IDBIndexBackendImpl::countInternal):
2956         (WebCore::IDBIndexBackendImpl::count):
2957         (WebCore::IDBIndexBackendImpl::getInternal):
2958         (WebCore::IDBIndexBackendImpl::getKeyInternal):
2959         (WebCore::IDBIndexBackendImpl::get):
2960         (WebCore::IDBIndexBackendImpl::getKey):
2961         * Modules/indexeddb/IDBIndexBackendImpl.h:
2962         (IDBIndexBackendImpl):
2963         * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
2964         (WebCore::IDBLevelDBBackingStore::updateIDBDatabaseIntVersion):
2965         (WebCore::IDBLevelDBBackingStore::updateIDBDatabaseMetaData):
2966         (WebCore::IDBLevelDBBackingStore::createObjectStore):
2967         (WebCore::IDBLevelDBBackingStore::deleteObjectStore):
2968         (WebCore::IDBLevelDBBackingStore::getObjectStoreRecord):
2969         (WebCore):
2970         (WebCore::IDBLevelDBBackingStore::putObjectStoreRecord):
2971         (WebCore::IDBLevelDBBackingStore::clearObjectStore):
2972         (WebCore::IDBLevelDBBackingStore::deleteObjectStoreRecord):
2973         (WebCore::IDBLevelDBBackingStore::getKeyGeneratorCurrentNumber):
2974         (WebCore::IDBLevelDBBackingStore::maybeUpdateKeyGeneratorCurrentNumber):
2975         (WebCore::IDBLevelDBBackingStore::keyExistsInObjectStore):
2976         (WebCore::IDBLevelDBBackingStore::forEachObjectStoreRecord):
2977         (WebCore::IDBLevelDBBackingStore::createIndex):
2978         (WebCore::IDBLevelDBBackingStore::deleteIndex):
2979         (WebCore::IDBLevelDBBackingStore::putIndexDataForRecord):
2980         (WebCore::IDBLevelDBBackingStore::deleteIndexDataForRecord):
2981         (WebCore::IDBLevelDBBackingStore::findKeyInIndex):
2982         (WebCore::IDBLevelDBBackingStore::getPrimaryKeyViaIndex):
2983         (WebCore::IDBLevelDBBackingStore::keyExistsInIndex):
2984         (WebCore::IDBLevelDBBackingStore::openObjectStoreCursor):
2985         (WebCore::IDBLevelDBBackingStore::openObjectStoreKeyCursor):
2986         (WebCore::IDBLevelDBBackingStore::openIndexKeyCursor):
2987         (WebCore::IDBLevelDBBackingStore::openIndexCursor):
2988         (WebCore::IDBLevelDBBackingStore::Transaction::Transaction):
2989         (WebCore::IDBLevelDBBackingStore::Transaction::begin):
2990         (WebCore::IDBLevelDBBackingStore::Transaction::commit):
2991         (WebCore::IDBLevelDBBackingStore::Transaction::rollback):
2992         * Modules/indexeddb/IDBLevelDBBackingStore.h:
2993         (IDBLevelDBBackingStore):
2994         (WebCore::IDBLevelDBBackingStore::Transaction::levelDBTransaction):
2995         (Transaction):
2996         (WebCore::IDBLevelDBBackingStore::Transaction::levelDBTransactionFrom):
2997         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
2998         (WebCore::IDBObjectStoreBackendImpl::get):
2999         (WebCore::IDBObjectStoreBackendImpl::getInternal):
3000         (WebCore):
3001         (WebCore::makeIndexWriters):
3002         (WebCore::IDBObjectStoreBackendImpl::setIndexKeys):
3003         (WebCore::IDBObjectStoreBackendImpl::putInternal):
3004         (WebCore::IDBObjectStoreBackendImpl::deleteFunction):
3005         (WebCore::IDBObjectStoreBackendImpl::deleteInternal):
3006         (WebCore::IDBObjectStoreBackendImpl::clear):
3007         (WebCore::IDBObjectStoreBackendImpl::clearInternal):
3008         (WebCore::IDBObjectStoreBackendImpl::createIndexInternal):
3009         (WebCore::IDBObjectStoreBackendImpl::deleteIndexInternal):
3010         (WebCore::IDBObjectStoreBackendImpl::openCursorInternal):
3011         (WebCore::IDBObjectStoreBackendImpl::count):
3012         (WebCore::IDBObjectStoreBackendImpl::countInternal):
3013         (WebCore::IDBObjectStoreBackendImpl::generateKey):
3014         (WebCore::IDBObjectStoreBackendImpl::updateKeyGenerator):
3015         * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
3016         (IDBObjectStoreBackendImpl):
3017
3018 2012-09-19  Terry Anderson  <tdanderson@chromium.org>
3019
3020         [chromium] Store the contents scale factor in PlatformContextSkia on initialization
3021         https://bugs.webkit.org/show_bug.cgi?id=96137
3022
3023         Reviewed by Stephen White.
3024
3025         When the compositor creates a PlatformContextSkia, the scale on |canvas| will 
3026         be equal to the content scale factor (which, without pinch-to-zoom, will be
3027         the same as the device scale factor). Set this value as a member on PlatformContextSkia, 
3028         which will be used to correctly render glyphs when hinting is used and the device
3029         scale factor is not 1.
3030
3031         Tests: added two new unit tests.
3032
3033         * platform/graphics/chromium/OpaqueRectTrackingContentLayerDelegate.cpp:
3034         (WebCore::OpaqueRectTrackingContentLayerDelegate::paintContents):
3035         * platform/graphics/skia/PlatformContextSkia.cpp:
3036         (WebCore::PlatformContextSkia::PlatformContextSkia):
3037         (WebCore::PlatformContextSkia::setupPaintCommon):
3038         * platform/graphics/skia/PlatformContextSkia.h:
3039         (PlatformContextSkia):
3040         (WebCore::PlatformContextSkia::setHintingScaleFactor):
3041         (WebCore::PlatformContextSkia::hintingScaleFactor):
3042
3043 2012-09-19  Kenichi Ishibashi  <bashi@chromium.org>
3044
3045         [Chromium] HarfBuzzShaper should take into account combining characters
3046         https://bugs.webkit.org/show_bug.cgi?id=97069
3047
3048         Reviewed by Tony Chang.
3049
3050         When dividing a text run into HarfBuzzRuns, try to find suitable SimpleFontData for
3051         combining character sequence if there are one or more mark characters are followed.
3052         If there is no combined glyphs in the font, use fallback font for mark characters.
3053
3054         No new tests.
3055         In platform/chromium-linux/fast/text/international/complex-joining-using-gpos.html,
3056         U+0947 (devanagari vowel sign e) should be displayed.
3057         In fast/text/wide-zero-width-space.html, &eacute; and e&#0301; should look identical.
3058
3059         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp:
3060         (WebCore):
3061         (WebCore::fontDataForCombiningCharacterSequence): Added.
3062         (WebCore::HarfBuzzShaper::collectHarfBuzzRuns): See above description.
3063
3064 2012-09-19  Tony Chang  <tony@chromium.org>
3065
3066         Remove RenderIFrame::updateLogicalHeight and RenderIFrame::updateLogicalWidth
3067         https://bugs.webkit.org/show_bug.cgi?id=97049
3068
3069         Reviewed by Ojan Vafai.
3070
3071         This is an incremental step in making updateLogicalHeight non-virtual so it's
3072         possible to call computeLogicalHeight on any RenderBox and get the right
3073         version of the function.
3074
3075         The code in RenderIFrame::layout was calling flattenFrame(), which would
3076         query it's bounding box size.  Since we hadn't done a layout yet, the size
3077         is unknown.  The fix is to only call flattenFrame() after calling
3078         updateLogicalWidth and updateLogicalHeight. We can then fixup the size of
3079         the iframe.
3080
3081         No new tests, existing tests in fast/frames/flattening should continue to pass.
3082
3083         * rendering/RenderIFrame.cpp:
3084         (WebCore::RenderIFrame::layout):
3085         * rendering/RenderIFrame.h:
3086         (RenderIFrame):
3087
3088 2012-09-19  Joshua Bell  <jsbell@chromium.org>
3089
3090         IndexedDB: Free up resources used by completed cursors earlier
3091         https://bugs.webkit.org/show_bug.cgi?id=97023
3092
3093         Reviewed by Tony Chang.
3094
3095         Prior to this patch, IDBCursor objects are kept around by their parent
3096         IDBTransaction until the transaction finishes. It's possible to release
3097         references to them earlier, when the cursor has been "run to the end",
3098         as no further events will fire and all calls to continue() etc should fail.
3099
3100         This change tells the cursor it's done when "null" finally comes through in
3101         the IDBRequest, and the cursor then lets transaction know it can be
3102         forgotten.
3103
3104         The added test doesn't distinguish the new behavior, but does exercise
3105         "finished" cursors and apparently we didn't have tests for these before.
3106
3107         Test: storage/indexeddb/cursor-finished.html
3108
3109         * Modules/indexeddb/IDBCursor.cpp:
3110         (WebCore::IDBCursor::close): Make idempotent; notify transaction.
3111         * Modules/indexeddb/IDBRequest.cpp:
3112         (WebCore::IDBRequest::onSuccess): Tell cursor it's finished before releasing.
3113         * Modules/indexeddb/IDBTransaction.cpp:
3114         (WebCore::IDBTransaction::OpenCursorNotifier::~OpenCursorNotifier):
3115         (WebCore):
3116         (WebCore::IDBTransaction::OpenCursorNotifier::cursorFinished): New method for explicit notification.
3117         * Modules/indexeddb/IDBTransaction.h:
3118         (OpenCursorNotifier):
3119
3120 2012-09-19  David Grogan  <dgrogan@chromium.org>
3121
3122         IndexedDB: fire upgradeneeded even without an explicit integer version
3123         https://bugs.webkit.org/show_bug.cgi?id=96444
3124
3125         Reviewed by Tony Chang.
3126
3127         Also of note:
3128         - New databases now get a default version of 1 instead of
3129         the empty string when they are opened.
3130         - We now allow databases with an integer version to revert to a string
3131         version by calling setVersion.
3132
3133         Implementation detail: we store both an integer version and string
3134         version for a particular database. If both are set we give preference
3135         to the integer version and assume the db is on the integer track.
3136
3137         Test: storage/indexeddb/intversion-two-opens-no-versions.html
3138
3139         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
3140         (WebCore):
3141         (WebCore::IDBDatabaseBackendImpl::IDBDatabaseBackendImpl):
3142         (WebCore::IDBDatabaseBackendImpl::setVersion):
3143         (WebCore::IDBDatabaseBackendImpl::setVersionInternal):
3144         Now that this can be called even after an int version is set we have
3145         to make it revoke the int version.
3146
3147         (WebCore::IDBDatabaseBackendImpl::openConnection):
3148         Nested ifs were getting deep, so refactor to return early instead.
3149
3150         (WebCore::IDBDatabaseBackendImpl::deleteDatabase):
3151         (WebCore::IDBDatabaseBackendImpl::resetVersion):
3152         Now that an int version could have been set before setVersion was
3153         called we have to reset the int version on abort.
3154
3155         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
3156         (IDBDatabaseBackendImpl):
3157         * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
3158         (WebCore::IDBLevelDBBackingStore::updateIDBDatabaseIntVersion):
3159         * Modules/indexeddb/IDBOpenDBRequest.cpp:
3160         0 is now a valid integer version to store to leveldb if an idb
3161         database is reverting to a string version.
3162
3163         (WebCore::IDBOpenDBRequest::onUpgradeNeeded):
3164         If the open request did not specify an integer version but
3165         upgradeneeded is called, it means the database was given the default
3166         version of 1.
3167
3168 2012-09-19  Dominic Mazzoni  <dmazzoni@google.com>
3169
3170         AX: A few control types are returning the wrong answer for isReadOnly
3171         https://bugs.webkit.org/show_bug.cgi?id=96735
3172
3173         Reviewed by Chris Fleizach.
3174
3175         All input types should be read-only except ones that
3176         are text fields. The previous logic was marking things like
3177         checkboxes as not read-only.
3178
3179         Tests: platform/chromium/accessibility/readonly.html
3180                platform/mac/accessibility/form-control-value-settable.html
3181
3182         * accessibility/AccessibilityNodeObject.cpp:
3183         (WebCore::AccessibilityNodeObject::isReadOnly):
3184
3185 2012-09-19  Mark Pilgrim  <pilgrim@chromium.org>
3186
3187         [Chromium] Remove unused PlatformSupport reference in V8GCController
3188         https://bugs.webkit.org/show_bug.cgi?id=97118
3189
3190         Reviewed by Ryosuke Niwa.
3191
3192         Part of a refactoring series. See tracking bug 82948.
3193         
3194         * bindings/v8/V8GCController.cpp:
3195
3196 2012-09-19  Mark Pilgrim  <pilgrim@chromium.org>
3197
3198         [Chromium] Remove unused PlatformSupport reference in V8DOMWindowShell
3199         https://bugs.webkit.org/show_bug.cgi?id=97117
3200
3201         Reviewed by Ryosuke Niwa.
3202
3203         Part of a refactoring series. See tracking bug 82948.
3204
3205         * bindings/v8/V8DOMWindowShell.cpp:
3206
3207 2012-09-19  Kentaro Hara  <haraken@chromium.org>
3208
3209         [V8] Remove WorkerContextExecutionProxy::runScript()
3210         https://bugs.webkit.org/show_bug.cgi?id=97060
3211
3212         Reviewed by Adam Barth.
3213
3214         To kill WorkerContextExecutionProxy, this patch removes
3215         WorkerContextExecutionProxy::runScript() by replacing it
3216         with ScriptRunner::runCompiledScript().
3217
3218         For the replacement, this patch moves TryCatch logic in
3219         runCompiledScript() to the caller side. The reason why
3220         we have to avoid nesting TryCatches is a V8 bug:
3221         http://code.google.com/p/v8/issues/detail?id=2166
3222
3223         No tests. No change in behavior.
3224
3225         * bindings/v8/ScriptController.cpp:
3226         (WebCore::ScriptController::compileAndRunScript):
3227         * bindings/v8/ScriptRunner.cpp:
3228         (WebCore::ScriptRunner::runCompiledScript):
3229         * bindings/v8/WorkerContextExecutionProxy.cpp:
3230         (WebCore::WorkerContextExecutionProxy::evaluate):
3231         * bindings/v8/WorkerContextExecutionProxy.h:
3232         (WorkerContextExecutionProxy):
3233
3234 2012-09-19  Rob Buis  <rbuis@rim.com>
3235
3236         [BlackBerry] Fix vertical positioning problem for 'X' in search field
3237         https://bugs.webkit.org/show_bug.cgi?id=97126
3238
3239         Reviewed by Antonio Gomes.
3240
3241         We have the same problem as described in bug 30245, so integrate that code.
3242
3243         * platform/blackberry/RenderThemeBlackBerry.cpp:
3244         (WebCore::RenderThemeBlackBerry::convertToPaintingRect):
3245         (WebCore):
3246         (WebCore::RenderThemeBlackBerry::paintSearchFieldCancelButton):
3247
3248 2012-09-19  Rob Buis  <rbuis@rim.com>
3249
3250         [BlackBerry] Remove custom painting code for searchCancel
3251         https://bugs.webkit.org/show_bug.cgi?id=97119
3252
3253         Reviewed by Antonio Gomes.
3254
3255         Remove the dynamic painting code for searchCancel, we use a png file now.
3256
3257         * platform/graphics/blackberry/ImageBlackBerry.cpp:
3258         (WebCore::Image::loadPlatformResource):
3259
3260 2012-09-19  Mark Pilgrim  <pilgrim@chromium.org>
3261
3262         [Chromium] Move notifyJSOutOfMemory out of PlatformSupport
3263         https://bugs.webkit.org/show_bug.cgi?id=97116
3264
3265         Reviewed by Adam Barth.
3266
3267         Part of a refactoring series. See tracking bug 82948.
3268
3269         * bindings/v8/V8Binding.cpp:
3270         (WebCore::handleOutOfMemory):
3271         * loader/FrameLoaderClient.h:
3272         (WebCore::FrameLoaderClient::didExhaustMemoryAvailableForScript):
3273         (FrameLoaderClient):
3274         * platform/chromium/PlatformSupport.h:
3275         (PlatformSupport):
3276
3277 2012-09-18  Dirk Schulze  <krit@webkit.org>
3278
3279         Implement 'mask-type' for <mask>
3280         https://bugs.webkit.org/show_bug.cgi?id=97011
3281
3282         Reviewed by Andreas Kling.
3283
3284         The CSS Masking specification defines the presentation attribute 'mask-type' to
3285         switch between luminance and alpha masking. 'mask-type' just affects the SVG
3286         mask element. The luminance masking is the current behavior of of SVG masking.
3287         Alpha masking is simular to '-webkit-mask-image'.
3288
3289         This patch implements this property and make it possible to switch between both
3290         masking modes. Since the default value is 'luminance', this does not break
3291         exisiting content which is tested with exisiting tests.
3292
3293         http://dvcs.w3.org/hg/FXTF/raw-file/tip/masking/index.html#the-mask-type
3294
3295         Tests: svg/css/mask-type.html
3296                svg/masking/mask-type-alpha-expected.svg
3297                svg/masking/mask-type-alpha.svg
3298                svg/masking/mask-type-luminance-expected.svg
3299                svg/masking/mask-type-luminance.svg
3300                svg/masking/mask-type-not-set-expected.svg
3301                svg/masking/mask-type-not-set.svg
3302
3303         * css/CSSComputedStyleDeclaration.cpp: Add mask-type property.
3304         (WebCore):
3305         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3306         * css/CSSPrimitiveValueMappings.h:
3307         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3308         (WebCore):
3309         (WebCore::CSSPrimitiveValue::operator EMaskType):
3310         * css/CSSProperty.cpp:
3311         (WebCore::CSSProperty::isInheritedProperty):
3312         * css/SVGCSSComputedStyleDeclaration.cpp:
3313         (WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue):
3314         * css/SVGCSSParser.cpp:
3315         (WebCore::CSSParser::parseSVGValue):
3316         * css/SVGCSSPropertyNames.in: Add mask-type.
3317         * css/SVGCSSStyleSelector.cpp:
3318         (WebCore::StyleResolver::applySVGProperty):
3319         * css/SVGCSSValueKeywords.in:
3320         * rendering/style/SVGRenderStyle.cpp:
3321         (WebCore::SVGRenderStyle::diff):
3322         * rendering/style/SVGRenderStyle.h:
3323         (WebCore::SVGRenderStyle::initialMaskType):
3324         (WebCore::SVGRenderStyle::setMaskType):
3325         (SVGRenderStyle):
3326         (WebCore::SVGRenderStyle::maskType):
3327         (WebCore::SVGRenderStyle::setBitDefaults):
3328         * rendering/style/SVGRenderStyleDefs.h:
3329         * rendering/svg/RenderSVGResourceMasker.cpp:
3330
3331             Switch between the two masking modes according to the
3332             computed value of mask-type.
3333
3334         (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
3335         * svg/SVGStyledElement.cpp:
3336         (WebCore::SVGStyledElement::cssPropertyIdForSVGAttributeName):
3337         (WebCore::cssPropertyToTypeMap):
3338         * svg/svgattrs.in: Add the new attribute to the attribute list.
3339
3340 2012-09-19  Mark Pilgrim  <pilgrim@chromium.org>
3341
3342         [Chromium] Remove unused popupsAllowed function from PlatformSupport
3343         https://bugs.webkit.org/show_bug.cgi?id=96521
3344
3345         Reviewed by Eric Seidel.
3346
3347         Part of a refactoring series. See tracking bug 82948.
3348
3349         * bindings/v8/NPV8Object.cpp:
3350         (WebCore::v8ObjectToNPObject):
3351         (_NPN_Evaluate):
3352         (_NPN_GetProperty):
3353         * platform/chromium/PlatformSupport.h:
3354         (PlatformSupport):
3355
3356 2012-09-19  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
3357
3358         [BlackBerry] Add function playerId() in class PageClientBlackBerry
3359         https://bugs.webkit.org/show_bug.cgi?id=97099
3360
3361         Reviewed by Yong Li.
3362
3363         Added function playerID() in class PageClientBlackBerry.
3364
3365         Internally reviewed by Charles Wei.
3366
3367         No new tests since there's no functional change.
3368
3369         * platform/blackberry/PageClientBlackBerry.h:
3370
3371 2012-09-19  Raul Hudea  <rhudea@adobe.com>
3372
3373         [CSSRegions][CSSOM] Make sure all Regions APIs are not visible if CSS_REGIONS is not defined
3374         https://bugs.webkit.org/show_bug.cgi?id=96300
3375
3376         Reviewed by Yury Semikhatsky.
3377
3378         All CSS Regions APIs should be exposed only if CSS_REGIONS is enabled
3379
3380         No new tests because of no behavior changes.
3381
3382         * css/StyleRule.cpp:
3383         (WebCore::StyleRuleBase::reportMemoryUsage): Fix compile without CSS_REGIONS enabled and added an ASSERT_NOT_REACHED as in other functions
3384         * dom/Element.cpp: Compile webkitRegionOverset only if CSS_REGIONS is enabled
3385         (WebCore):
3386         * dom/Element.h:
3387         * dom/Element.idl: Expose webkitRegionOverset only if CSS_REGIONS is enabled
3388
3389 2012-09-19  Patrick Gansterer  <paroga@webkit.org>
3390
3391         Remove all usages of M_PI from WebCore
3392         https://bugs.webkit.org/show_bug.cgi?id=93109
3393
3394         Reviewed by Dirk Schulze.
3395
3396         <wtf/MathExtras.h> implements many functions dealing with M_PI.
3397         Use them in WebCore instead of duplicating the functionality.
3398
3399         * platform/blackberry/PlatformTouchEventBlackBerry.cpp:
3400         (WebCore::PlatformTouchEvent::PlatformTouchEvent):
3401         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
3402         (PlatformCALayer::setFilters):
3403         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3404         (WebCore::GraphicsContext::drawEllipse):
3405         (WebCore::GraphicsContext::strokeArc):
3406         * platform/graphics/wx/FontPlatformDataWxMac.mm:
3407         * platform/mac/WebWindowAnimation.mm:
3408         (-[WebWindowScaleAnimation currentValue]):
3409         * platform/wx/wxcode/gdiplus/non-kerned-drawing.cpp:
3410         (DegToRad):
3411         (RadToDeg):
3412
3413 2012-09-10  Vsevolod Vlasov  <vsevik@chromium.org>
3414
3415         Web Inspector: Network request headers text fallback has typo.
3416         https://bugs.webkit.org/show_bug.cgi?id=96280
3417
3418         Reviewed by Pavel Feldman.
3419
3420         * inspector/front-end/NetworkRequest.js:
3421         (WebInspector.NetworkRequest.prototype.get requestHeadersText):
3422         (WebInspector.NetworkRequest.prototype.get responseHeadersText):
3423
3424 2012-09-19  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
3425
3426         [BlackBerry] remove static_cast which will cause video crash
3427         https://bugs.webkit.org/show_bug.cgi?id=97070
3428
3429         Reviewed by Antonio Gomes.
3430
3431         Removed the static_cast to avoid layering violation which
3432         will cause a runtime crash.
3433         We won't create a real MediaPlayerPrivate object before we call
3434         MediaPlayer::load(), so if we use player()->implementation()
3435         before calling load() in some cases, it points to a
3436         NullMediaPlayerPrivate object. Here we should not use static_cast,
3437         instead we should use HTMLMediaElement::percentLoaded() to
3438         avoid layering violation as we don't have the buffering bug which
3439         the deleted comment refers to.
3440
3441         Internally reviewed by Max Feil.
3442
3443         Test case: media/video-size.html
3444
3445         * platform/blackberry/RenderThemeBlackBerry.cpp:
3446         (WebCore::RenderThemeBlackBerry::paintMediaSliderTrack):
3447
3448 2012-09-19  Rick Byers  <rbyers@chromium.org>
3449
3450         Do touch adjustment on GestureTapDown
3451         https://bugs.webkit.org/show_bug.cgi?id=96677
3452
3453         Reviewed by Antonio Gomes.
3454
3455         Do touch adjustment on GestureTapDown exactly as for GestureTap today.
3456
3457         Test: touchadjustment/touch-links-active.html
3458
3459         * page/EventHandler.cpp:
3460         (WebCore::EventHandler::handleGestureEvent):
3461         (WebCore::EventHandler::adjustGesturePosition):
3462
3463 2012-09-19  Vsevolod Vlasov  <vsevik@chromium.org>
3464
3465         Unreviewed another follow up Apple Win build fix for r128992.
3466
3467         * inspector/InspectorAllInOne.cpp:
3468
3469 2012-09-19  Carlos Garcia Campos  <cgarcia@igalia.com>
3470
3471         [GTK] REGRESSION(r128907): it broke several WebKit2 API tests
3472         https://bugs.webkit.org/show_bug.cgi?id=97092
3473
3474         Reviewed by Martin Robinson.
3475
3476         Calling resizeLater() from the constructor of
3477         RedirectedXCompositeWindow can cause the callback to be called
3478         later by the main loop after the RedirectedXCompositeWindow object
3479         has been destroyed. Instead of calling resizeLater(), initialize
3480         the usable size to the given initial size.
3481
3482         * platform/gtk/RedirectedXCompositeWindow.cpp:
3483         (WebCore::RedirectedXCompositeWindow::RedirectedXCompositeWindow):
3484
3485 2012-09-19  Vsevolod Vlasov  <vsevik@chromium.org>
3486
3487         Unreviewed follow up Apple Win build fix for r128992.
3488
3489         * inspector/InspectorAllInOne.cpp:
3490
3491 2012-09-19  Andrey Adaikin  <aandrey@chromium.org>
3492
3493         Web Inspector: [WebGL] -> [Canvas] Rename WebGLAgent to CanvasAgent
3494         https://bugs.webkit.org/show_bug.cgi?id=96917
3495
3496         Reviewed by Vsevolod Vlasov.
3497
3498         Rename WebGLAgent* and WebGLInstrumentation* files to Canvas* as we will support both 2D and 3D/WebGL canvas instrumentation.
3499
3500         * CMakeLists.txt:
3501         * DerivedSources.make:
3502         * DerivedSources.pri:
3503         * GNUmakefile.am:
3504         * GNUmakefile.list.am:
3505         * Target.pri:
3506         * WebCore.gyp/WebCore.gyp:
3507         * WebCore.gypi:
3508         * WebCore.vcproj/WebCore.vcproj:
3509         * WebCore.xcodeproj/project.pbxproj:
3510         * bindings/js/JSHTMLCanvasElementCustom.cpp:
3511         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
3512         * inspector/CodeGeneratorInspector.py:
3513         * inspector/InjectedScriptCanvasModule.cpp: Renamed from Source/WebCore/inspector/InjectedScriptWebGLModule.cpp.
3514         (WebCore):
3515         (WebCore::InjectedScriptCanvasModule::InjectedScriptCanvasModule):
3516         (WebCore::InjectedScriptCanvasModule::moduleForState):
3517         (WebCore::InjectedScriptCanvasModule::source):
3518         (WebCore::InjectedScriptCanvasModule::wrapWebGLContext):
3519         (WebCore::InjectedScriptCanvasModule::captureFrame):
3520         (WebCore::InjectedScriptCanvasModule::dropTraceLog):
3521         (WebCore::InjectedScriptCanvasModule::traceLog):
3522         (WebCore::InjectedScriptCanvasModule::replayTraceLog):
3523         * inspector/InjectedScriptCanvasModule.h: Renamed from Source/WebCore/inspector/InjectedScriptWebGLModule.h.
3524         (WebCore):
3525         (InjectedScriptCanvasModule):
3526         * inspector/InjectedScriptCanvasModuleSource.js: Renamed from Source/WebCore/inspector/InjectedScriptWebGLModuleSource.js.
3527         (.):
3528         * inspector/Inspector.json:
3529         * inspector/InspectorAllInOne.cpp:
3530         * inspector/InspectorCanvasAgent.cpp: Renamed from Source/WebCore/inspector/InspectorWebGLAgent.cpp.
3531         (WebCore):
3532         (CanvasAgentState):
3533         (WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
3534         (WebCore::InspectorCanvasAgent::~InspectorCanvasAgent):
3535         (WebCore::InspectorCanvasAgent::setFrontend):
3536         (WebCore::InspectorCanvasAgent::clearFrontend):
3537         (WebCore::InspectorCanvasAgent::restore):
3538         (WebCore::InspectorCanvasAgent::enable):
3539         (WebCore::InspectorCanvasAgent::disable):
3540         (WebCore::InspectorCanvasAgent::dropTraceLog):
3541         (WebCore::InspectorCanvasAgent::captureFrame):
3542         (WebCore::InspectorCanvasAgent::getTraceLog):
3543         (WebCore::InspectorCanvasAgent::replayTraceLog):
3544         (WebCore::InspectorCanvasAgent::wrapWebGLRenderingContextForInstrumentation):
3545         (WebCore::InspectorCanvasAgent::injectedScriptCanvasModuleForTraceLogId):
3546         * inspector/InspectorCanvasAgent.h: Renamed from Source/WebCore/inspector/InspectorWebGLAgent.h.
3547         (WebCore):
3548         (InspectorCanvasAgent):
3549         (WebCore::InspectorCanvasAgent::create):
3550         (WebCore::InspectorCanvasAgent::enabled):
3551         * inspector/InspectorCanvasInstrumentation.h: Renamed from Source/WebCore/inspector/InspectorWebGLInstrumentation.h.
3552         (WebCore):
3553         (WebCore::InspectorInstrumentation::wrapWebGLRenderingContextForInstrumentation):
3554         * inspector/InspectorController.cpp:
3555         (WebCore::InspectorController::InspectorController):
3556         * inspector/InstrumentingAgents.h:
3557         (WebCore):
3558         (WebCore::InstrumentingAgents::InstrumentingAgents):
3559         (WebCore::InstrumentingAgents::inspectorCanvasAgent):
3560         (WebCore::InstrumentingAgents::setInspectorCanvasAgent):
3561         (InstrumentingAgents):
3562         * inspector/compile-front-end.py:
3563         * inspector/front-end/CanvasProfileView.js: Renamed from Source/WebCore/inspector/front-end/WebGLProfileView.js.
3564         (WebInspector.CanvasProfileView):
3565         (WebInspector.CanvasProfileView.prototype.dispose):
3566         (WebInspector.CanvasProfileView.prototype.get statusBarItems):
3567         (WebInspector.CanvasProfileView.prototype.get profile):
3568         (WebInspector.CanvasProfileView.prototype.wasShown):
3569         (WebInspector.CanvasProfileView.prototype.willHide):
3570         (WebInspector.CanvasProfileView.prototype._showTraceLog):
3571         (WebInspector.CanvasProfileView.prototype._onTraceLogItemClick.didReplayTraceLog):
3572         (WebInspector.CanvasProfileView.prototype._onTraceLogItemClick):
3573         (WebInspector.CanvasProfileType):
3574         (WebInspector.CanvasProfileType.prototype.get buttonTooltip):
3575         (WebInspector.CanvasProfileType.prototype.buttonClicked.didStartCapturingFrame):
3576         (WebInspector.CanvasProfileType.prototype.buttonClicked):
3577         (WebInspector.CanvasProfileType.prototype.get treeItemTitle):
3578         (WebInspector.CanvasProfileType.prototype.get description):
3579         (WebInspector.CanvasProfileType.prototype.reset):
3580         (WebInspector.CanvasProfileType.prototype.createTemporaryProfile):
3581         (WebInspector.CanvasProfileType.prototype.createProfile):
3582         (WebInspector.CanvasProfileHeader):
3583         (WebInspector.CanvasProfileHeader.prototype.traceLogId):
3584         (WebInspector.CanvasProfileHeader.prototype.createSidebarTreeElement):
3585         (WebInspector.CanvasProfileHeader.prototype.createView):
3586         * inspector/front-end/ProfilesPanel.js:
3587         (WebInspector.ProfilesPanel):
3588         * inspector/front-end/Settings.js:
3589         (WebInspector.ExperimentsSettings):
3590         * inspector/front-end/WebKit.qrc:
3591         * inspector/front-end/canvasProfiler.css: Renamed from Source/WebCore/inspector/front-end/webGLProfiler.css.
3592         (.canvas-profile-view):
3593         (.canvas-trace-log):
3594         (.canvas-trace-log div):
3595         (#canvas-replay-image-container):
3596         (#canvas-replay-image):
3597
3598 2012-09-19  Carlos Garcia Campos  <cgarcia@igalia.com>
3599
3600         [GTK] Add API to get/set the security policy of a given URI scheme to WebKit2 GTK+
3601         https://bugs.webkit.org/show_bug.cgi?id=96497
3602
3603         Reviewed by Martin Robinson.
3604
3605         * WebCore.exp.in: Add new exported symbols.
3606
3607 2012-09-19  Patrick Gansterer  <paroga@webkit.org>
3608
3609         [WIN] Use BString in favour of BSTR to improve memory management
3610         https://bugs.webkit.org/show_bug.cgi?id=93128
3611
3612         Reviewed by Anders Carlsson.
3613
3614         BString automatically calls SysFreeString() in its destructor which helps
3615         avoiding memory leaks. So it should be used instead of BSTR directly.
3616         Add operator& to BString to allow its usage for out parameters too (like COMPtr).
3617         This fixes already a few memory leaks in the existing code.
3618
3619         * platform/win/BString.cpp:
3620         (WebCore::BString::~BString):
3621         (WebCore::BString::adoptBSTR):
3622         (WebCore::BString::clear):
3623         (WebCore):
3624         * platform/win/BString.h:
3625         (BString):
3626         (WebCore::BString::operator&):
3627
3628 2012-09-19  Simon Hausmann  <simon.hausmann@digia.com>
3629
3630         [Qt] Link failure with bfd linker on --minimal build
3631         https://bugs.webkit.org/show_bug.cgi?id=97075
3632
3633         Reviewed by Tor Arne Vestbø.
3634
3635         Fix two dependency errors triggered by --minimal:
3636
3637         - GStreamerVersioning.cpp uses functions from libgstvideo (gst_video_format_parse_caps), so we need to pull
3638         that module not only when video is enabled by generally when using gstreamer.
3639         - GraphicsSurfaceGLX depends on Xlib (XOpenDisplay, etc.), so we need to do CONFIG += x11 to get that and not
3640         implicitly rely on x11 netscape plugins being enabled.
3641
3642         * WebCore.pri:
3643
3644 2012-09-19  Tommy Widenflycht  <tommyw@google.com>
3645
3646         MediaStream API: Rename the RTCIceServer uri parameter to url.
3647         https://bugs.webkit.org/show_bug.cgi?id=97086
3648
3649         Reviewed by Hajime Morita.
3650
3651         Either the standard has changed or I can't read.
3652         http://dev.w3.org/2011/webrtc/editor/webrtc.html#dictionary-rtciceserver-members
3653
3654         Existing tests changed to cover this patch.
3655
3656         * Modules/mediastream/RTCPeerConnection.cpp:
3657         (WebCore::RTCPeerConnection::parseConfiguration):
3658
3659 2012-09-19  Sheriff Bot  <webkit.review.bot@gmail.com>
3660
3661         Unreviewed, rolling out r128976.
3662         http://trac.webkit.org/changeset/128976
3663         https://bugs.webkit.org/show_bug.cgi?id=97083
3664
3665         Breaks compilation on QT, Apple WIn (Requested by vsevik on
3666         #webkit).
3667
3668         * CMakeLists.txt:
3669         * DerivedSources.make:
3670         * DerivedSources.pri:
3671         * GNUmakefile.am:
3672         * GNUmakefile.list.am:
3673         * Target.pri:
3674         * WebCore.gyp/WebCore.gyp:
3675         * WebCore.gypi:
3676         * WebCore.vcproj/WebCore.vcproj:
3677         * WebCore.xcodeproj/project.pbxproj:
3678         * bindings/js/JSHTMLCanvasElementCustom.cpp:
3679         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
3680         * inspector/CodeGeneratorInspector.py:
3681         * inspector/InjectedScriptWebGLModule.cpp: Renamed from Source/WebCore/inspector/InjectedScriptCanvasModule.cpp.
3682         (WebCore):
3683         (WebCore::InjectedScriptWebGLModule::InjectedScriptWebGLModule):
3684         (WebCore::InjectedScriptWebGLModule::moduleForState):
3685         (WebCore::InjectedScriptWebGLModule::source):
3686         (WebCore::InjectedScriptWebGLModule::wrapWebGLContext):
3687         (WebCore::InjectedScriptWebGLModule::captureFrame):
3688         (WebCore::InjectedScriptWebGLModule::dropTraceLog):
3689         (WebCore::InjectedScriptWebGLModule::traceLog):
3690         (WebCore::InjectedScriptWebGLModule::replayTraceLog):
3691         * inspector/InjectedScriptWebGLModule.h: Renamed from Source/WebCore/inspector/InjectedScriptCanvasModule.h.
3692         (WebCore):
3693         (InjectedScriptWebGLModule):
3694         * inspector/InjectedScriptWebGLModuleSource.js: Renamed from Source/WebCore/inspector/InjectedScriptCanvasModuleSource.js.
3695         (.):
3696         * inspector/Inspector.json:
3697         * inspector/InspectorAllInOne.cpp:
3698         * inspector/InspectorController.cpp:
3699         (WebCore::InspectorController::InspectorController):
3700         * inspector/InspectorWebGLAgent.cpp: Renamed from Source/WebCore/inspector/InspectorCanvasAgent.cpp.
3701         (WebCore):
3702         (WebGLAgentState):
3703         (WebCore::InspectorWebGLAgent::InspectorWebGLAgent):
3704         (WebCore::InspectorWebGLAgent::~InspectorWebGLAgent):
3705         (WebCore::InspectorWebGLAgent::setFrontend):
3706         (WebCore::InspectorWebGLAgent::clearFrontend):
3707         (WebCore::InspectorWebGLAgent::restore):
3708         (WebCore::InspectorWebGLAgent::enable):
3709         (WebCore::InspectorWebGLAgent::disable):
3710         (WebCore::InspectorWebGLAgent::dropTraceLog):
3711         (WebCore::InspectorWebGLAgent::captureFrame):
3712         (WebCore::InspectorWebGLAgent::getTraceLog):
3713         (WebCore::InspectorWebGLAgent::replayTraceLog):
3714         (WebCore::InspectorWebGLAgent::wrapWebGLRenderingContextForInstrumentation):
3715         (WebCore::InspectorWebGLAgent::injectedScriptWebGLModuleForTraceLogId):
3716         * inspector/InspectorWebGLAgent.h: Renamed from Source/WebCore/inspector/InspectorCanvasAgent.h.
3717         (WebCore):
3718         (InspectorWebGLAgent):
3719         (WebCore::InspectorWebGLAgent::create):
3720         (WebCore::InspectorWebGLAgent::enabled):
3721         * inspector/InspectorWebGLInstrumentation.h: Renamed from Source/WebCore/inspector/InspectorCanvasInstrumentation.h.
3722         (WebCore):
3723         (WebCore::InspectorInstrumentation::wrapWebGLRenderingContextForInstrumentation):
3724         * inspector/InstrumentingAgents.h:
3725         (WebCore):
3726         (WebCore::InstrumentingAgents::InstrumentingAgents):
3727         (InstrumentingAgents):
3728         (WebCore::InstrumentingAgents::inspectorWebGLAgent):
3729         (WebCore::InstrumentingAgents::setInspectorWebGLAgent):
3730         * inspector/compile-front-end.py:
3731         * inspector/front-end/ProfilesPanel.js:
3732         (WebInspector.ProfilesPanel):
3733         * inspector/front-end/Settings.js:
3734         (WebInspector.ExperimentsSettings):
3735         * inspector/front-end/WebGLProfileView.js: Renamed from Source/WebCore/inspector/front-end/CanvasProfileView.js.
3736         (WebInspector.WebGLProfileView):
3737         (WebInspector.WebGLProfileView.prototype.dispose):
3738         (WebInspector.WebGLProfileView.prototype.get statusBarItems):
3739         (WebInspector.WebGLProfileView.prototype.get profile):
3740         (WebInspector.WebGLProfileView.prototype.wasShown):
3741         (WebInspector.WebGLProfileView.prototype.willHide):
3742         (WebInspector.WebGLProfileView.prototype._showTraceLog):
3743         (WebInspector.WebGLProfileView.prototype._onTraceLogItemClick.didReplayTraceLog):
3744         (WebInspector.WebGLProfileView.prototype._onTraceLogItemClick):
3745         (WebInspector.WebGLProfileType):
3746         (WebInspector.WebGLProfileType.prototype.get buttonTooltip):
3747         (WebInspector.WebGLProfileType.prototype.buttonClicked.didStartCapturingFrame):
3748         (WebInspector.WebGLProfileType.prototype.buttonClicked):
3749         (WebInspector.WebGLProfileType.prototype.get treeItemTitle):
3750         (WebInspector.WebGLProfileType.prototype.get description):
3751         (WebInspector.WebGLProfileType.prototype.reset):
3752         (WebInspector.WebGLProfileType.prototype.createTemporaryProfile):
3753         (WebInspector.WebGLProfileType.prototype.createProfile):
3754         (WebInspector.WebGLProfileHeader):
3755         (WebInspector.WebGLProfileHeader.prototype.traceLogId):
3756         (WebInspector.WebGLProfileHeader.prototype.createSidebarTreeElement):
3757         (WebInspector.WebGLProfileHeader.prototype.createView):
3758         * inspector/front-end/WebKit.qrc:
3759         * inspector/front-end/webGLProfiler.css: Renamed from Source/WebCore/inspector/front-end/canvasProfiler.css.
3760         (.webgl-profile-view):
3761         (.webgl-trace-log):
3762         (.webgl-trace-log div):
3763         (#webgl-replay-image-container):
3764         (#webgl-replay-image):
3765
3766 2012-09-19  Simon Hausmann  <simon.hausmann@digia.com>
3767
3768         [Qt][Win] Fix rendering of flash content when scrolling
3769         https://bugs.webkit.org/show_bug.cgi?id=92905
3770
3771         Reviewed by Jocelyn Turcotte.
3772
3773         Fix rendering offset similar to r121441.
3774
3775         * plugins/win/PluginViewWin.cpp:
3776         (WebCore::PluginView::paint):
3777         (WebCore::PluginView::setNPWindowRect):
3778
3779 2012-09-19  Andrey Adaikin  <aandrey@chromium.org>
3780
3781         Web Inspector: [WebGL] -> [Canvas] Rename WebGLAgent to CanvasAgent
3782         https://bugs.webkit.org/show_bug.cgi?id=96917
3783
3784         Reviewed by Vsevolod Vlasov.
3785
3786         Rename WebGLAgent* and WebGLInstrumentation* files to Canvas* as we will support both 2D and 3D/WebGL canvas instrumentation.
3787
3788         * CMakeLists.txt:
3789         * DerivedSources.make:
3790         * DerivedSources.pri:
3791         * GNUmakefile.am:
3792         * GNUmakefile.list.am:
3793         * Target.pri:
3794         * WebCore.gyp/WebCore.gyp:
3795         * WebCore.gypi:
3796         * WebCore.vcproj/WebCore.vcproj:
3797         * WebCore.xcodeproj/project.pbxproj:
3798         * bindings/js/JSHTMLCanvasElementCustom.cpp:
3799         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
3800         * inspector/CodeGeneratorInspector.py:
3801         * inspector/InjectedScriptCanvasModule.cpp: Renamed from Source/WebCore/inspector/InjectedScriptWebGLModule.cpp.
3802         (WebCore):
3803         (WebCore::InjectedScriptCanvasModule::InjectedScriptCanvasModule):
3804         (WebCore::InjectedScriptCanvasModule::moduleForState):
3805         (WebCore::InjectedScriptCanvasModule::source):
3806         (WebCore::InjectedScriptCanvasModule::wrapWebGLContext):
3807         (WebCore::InjectedScriptCanvasModule::captureFrame):
3808         (WebCore::InjectedScriptCanvasModule::dropTraceLog):
3809         (WebCore::InjectedScriptCanvasModule::traceLog):
3810         (WebCore::InjectedScriptCanvasModule::replayTraceLog):
3811         * inspector/InjectedScriptCanvasModule.h: Renamed from Source/WebCore/inspector/InjectedScriptWebGLModule.h.
3812         (WebCore):
3813         (InjectedScriptCanvasModule):
3814         * inspector/InjectedScriptCanvasModuleSource.js: Renamed from Source/WebCore/inspector/InjectedScriptWebGLModuleSource.js.
3815         (.):
3816         * inspector/Inspector.json:
3817         * inspector/InspectorAllInOne.cpp:
3818         * inspector/InspectorCanvasAgent.cpp: Renamed from Source/WebCore/inspector/InspectorWebGLAgent.cpp.
3819         (WebCore):
3820         (CanvasAgentState):
3821         (WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
3822         (WebCore::InspectorCanvasAgent::~InspectorCanvasAgent):
3823         (WebCore::InspectorCanvasAgent::setFrontend):
3824         (WebCore::InspectorCanvasAgent::clearFrontend):
3825         (WebCore::InspectorCanvasAgent::restore):
3826         (WebCore::InspectorCanvasAgent::enable):
3827         (WebCore::InspectorCanvasAgent::disable):
3828         (WebCore::InspectorCanvasAgent::dropTraceLog):
3829         (WebCore::InspectorCanvasAgent::captureFrame):
3830         (WebCore::InspectorCanvasAgent::getTraceLog):
3831         (WebCore::InspectorCanvasAgent::replayTraceLog):
3832         (WebCore::InspectorCanvasAgent::wrapWebGLRenderingContextForInstrumentation):
3833         (WebCore::InspectorCanvasAgent::injectedScriptCanvasModuleForTraceLogId):
3834         * inspector/InspectorCanvasAgent.h: Renamed from Source/WebCore/inspector/InspectorWebGLAgent.h.
3835         (WebCore):
3836         (InspectorCanvasAgent):
3837         (WebCore::InspectorCanvasAgent::create):
3838         (WebCore::InspectorCanvasAgent::enabled):
3839         * inspector/InspectorCanvasInstrumentation.h: Renamed from Source/WebCore/inspector/InspectorWebGLInstrumentation.h.
3840         (WebCore):
3841         (WebCore::InspectorInstrumentation::wrapWebGLRenderingContextForInstrumentation):
3842         * inspector/InspectorController.cpp:
3843         (WebCore::InspectorController::InspectorController):
3844         * inspector/InstrumentingAgents.h:
3845         (WebCore):
3846         (WebCore::InstrumentingAgents::InstrumentingAgents):
3847         (WebCore::InstrumentingAgents::inspectorCanvasAgent):
3848         (WebCore::InstrumentingAgents::setInspectorCanvasAgent):
3849         (InstrumentingAgents):
3850         * inspector/compile-front-end.py:
3851         * inspector/front-end/CanvasProfileView.js: Renamed from Source/WebCore/inspector/front-end/WebGLProfileView.js.
3852         (WebInspector.CanvasProfileView):
3853         (WebInspector.CanvasProfileView.prototype.dispose):
3854         (WebInspector.CanvasProfileView.prototype.get statusBarItems):
3855         (WebInspector.CanvasProfileView.prototype.get profile):
3856         (WebInspector.CanvasProfileView.prototype.wasShown):
3857         (WebInspector.CanvasProfileView.prototype.willHide):
3858         (WebInspector.CanvasProfileView.prototype._showTraceLog):
3859         (WebInspector.CanvasProfileView.prototype._onTraceLogItemClick.didReplayTraceLog):
3860         (WebInspector.CanvasProfileView.prototype._onTraceLogItemClick):
3861         (WebInspector.CanvasProfileType):
3862         (WebInspector.CanvasProfileType.prototype.get buttonTooltip):
3863         (WebInspector.CanvasProfileType.prototype.buttonClicked.didStartCapturingFrame):
3864         (WebInspector.CanvasProfileType.prototype.buttonClicked):
3865         (WebInspector.CanvasProfileType.prototype.get treeItemTitle):
3866         (WebInspector.CanvasProfileType.prototype.get description):
3867         (WebInspector.CanvasProfileType.prototype.reset):
3868         (WebInspector.CanvasProfileType.prototype.createTemporaryProfile):
3869         (WebInspector.CanvasProfileType.prototype.createProfile):
3870         (WebInspector.CanvasProfileHeader):
3871         (WebInspector.CanvasProfileHeader.prototype.traceLogId):
3872         (WebInspector.CanvasProfileHeader.prototype.createSidebarTreeElement):
3873         (WebInspector.CanvasProfileHeader.prototype.createView):
3874         * inspector/front-end/ProfilesPanel.js:
3875         (WebInspector.ProfilesPanel):
3876         * inspector/front-end/Settings.js:
3877         (WebInspector.ExperimentsSettings):
3878         * inspector/front-end/WebKit.qrc:
3879         * inspector/front-end/canvasProfiler.css: Renamed from Source/WebCore/inspector/front-end/webGLProfiler.css.
3880         (.canvas-profile-view):
3881         (.canvas-trace-log):
3882         (.canvas-trace-log div):
3883         (#canvas-replay-image-container):
3884         (#canvas-replay-image):
3885
3886 2012-09-18  Kenichi Ishibashi  <bashi@chromium.org>
3887
3888         [Chromium] SkiaGetGlyphWidthAndExtents() should invert y-axis
3889         https://bugs.webkit.org/show_bug.cgi?id=97067
3890
3891         Reviewed by Yuta Kitamura.
3892
3893         Invert skBounds.fTop and skBounds.height(). Don't call hb_font_set_ppem().
3894
3895         No new tests. Arabic shadda (U+0651) should be placed more higher when Arabic lam (U+0644) follows it.
3896         Tests under svg/W3C-I18N contain such sequences so these tests cover this change.
3897
3898         * platform/graphics/harfbuzz/ng/HarfBuzzNGFaceSkia.cpp:
3899         (WebCore::SkiaGetGlyphWidthAndExtents):
3900         (WebCore::HarfBuzzNGFace::createFont):
3901
3902 2012-09-18  Kenichi Ishibashi  <bashi@chromium.org>
3903
3904         [Chromium] Don't treat tab as spaces for word-end in HarfBuzzShaper
3905         https://bugs.webkit.org/show_bug.cgi?id=97068
3906
3907         Reviewed by Yuta Kitamura.
3908
3909         No new tests. fast/text/wide-zero-width-space.html should cover this change.
3910
3911         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp:
3912         (WebCore::normalizeCharacters): Don't treat tab as space.
3913
3914 2012-09-18  Eric Carlson  <eric.carlson@apple.com>
3915
3916         Check settings before registering AVFoundation media engine.
3917         https://bugs.webkit.org/show_bug.cgi?id=97048
3918         <rdar://problem/12313594>
3919
3920         Reviewed by Dan Bernstein.
3921
3922         Fix the bug introduced in r122676.
3923
3924         * platform/graphics/MediaPlayer.cpp:
3925         (WebCore::installedMediaEngines): Uncomment the call to check AVFoundation settings.
3926
3927 2012-09-18  Sailesh Agrawal  <sail@chromium.org>
3928
3929         Chromium: Scrollbar with tickmarks doesn't respond to clicks
3930         https://bugs.webkit.org/show_bug.cgi?id=96049
3931
3932         Reviewed by Beth Dakin.
3933
3934         Currently when a scrollbar has tickmarks its forced to be visible by setting its alpha to 1.0. The alpha value is reset to its old value at the end of the drawing routine. This approach doesn't work with the hit testing code which relies on the scrollbar's alpha value
3935
3936         Unfortunately there doesn't seem to be anyway to force a scrollbar to be visible. The closest API is -[NSScrollerImpPair lockOverlayScrollerState:]. Unfortunately this locks both the horizontal and vertical scrollbar. It also doesn't expand the knob width.
3937
3938         My fix simply adds a new alphaLocked attribute to the scrollbar. If this attribute is set to true then hit testing will return true.
3939
3940         Test: fast/scrolling/scrollbar-tickmarks-hittest.html
3941
3942         * WebCore.exp.in:
3943         * WebCore.order:
3944         * page/Settings.cpp:
3945         (WebCore):
3946         (WebCore::Settings::setUsesOverlayScrollbars): Sets the usesOverlayScrollbars flag.
3947         (WebCore::Settings::usesOverlayScrollbars): Gets the usesOverlayScrollbars flag.
3948         * page/Settings.h:
3949         (Settings):
3950         * platform/Scrollbar.cpp:
3951         (WebCore::Scrollbar::Scrollbar):
3952         * platform/Scrollbar.h:
3953         (WebCore::Scrollbar::isAlphaLocked):
3954         (WebCore::Scrollbar::setIsAlphaLocked):
3955         (Scrollbar):
3956         * platform/ScrollbarThemeClient.h:
3957         (ScrollbarThemeClient):
3958         * platform/chromium/ScrollbarThemeChromiumMac.mm:
3959         (WebCore::ScrollbarThemeChromiumMac::paint): Updated to set and unset the alphaLocked attribute.
3960         * platform/chromium/support/WebScrollbarImpl.cpp:
3961         (WebKit::WebScrollbarImpl::isAlphaLocked):
3962         (WebKit):
3963         (WebKit::WebScrollbarImpl::setIsAlphaLocked):
3964         * platform/chromium/support/WebScrollbarImpl.h:
3965         (WebScrollbarImpl):
3966         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
3967         (WebCore::CCScrollbarLayerImpl::CCScrollbarLayerImpl):
3968         (WebCore::CCScrollbarLayerImpl::CCScrollbar::isAlphaLocked):
3969         (WebCore):
3970         (WebCore::CCScrollbarLayerImpl::CCScrollbar::setIsAlphaLocked):
3971         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
3972         (CCScrollbar):
3973         (CCScrollbarLayerImpl):
3974         * platform/mac/NSScrollerImpDetails.mm:
3975         (WebCore::recommendedScrollerStyle): Check the usesOverlayScrollbars setting to see if overlay scrollbars should be forced on.
3976         * platform/mac/ScrollAnimatorMac.mm:
3977         (WebCore::ScrollAnimatorMac::shouldScrollbarParticipateInHitTesting): Updated to check the alphaLocked attribute.
3978         * testing/InternalSettings.cpp:
3979         (WebCore::InternalSettings::reset): Resets the usesOverlayScrollbars setting.
3980         (WebCore::InternalSettings::setUsesOverlayScrollbars): Sets the usesOverlayScrollbars setting.
3981         (WebCore):
3982         * testing/InternalSettings.h:
3983         (InternalSettings):
3984         * testing/InternalSettings.idl: Add a new setUsesOverlayScrollbars function.
3985
3986 2012-09-18  Kentaro Hara  <haraken@chromium.org>
3987
3988         [V8] Notification.requestPermission(function() {alert();}) crashes
3989         https://bugs.webkit.org/show_bug.cgi?id=94462
3990
3991         Reviewed by Adam Barth.
3992
3993         Since Notification.requestPermission() is a static method,
3994         we need to use getExecutionContext() instead of retrieving a context
3995         from a DOM object.
3996
3997         Test: http/tests/notifications/notification-request-permission.html
3998
3999         * bindings/v8/custom/V8NotificationCustom.cpp:
4000         (WebCore::V8Notification::requestPermissionCallback):
4001
4002 2012-09-18  Shinya Kawanaka  <shinyak@chromium.org>
4003
4004         [Refactoring] ContentDistributor::distributeSelectionsTo should not change ContentDistribution pool.
4005         https://bugs.webkit.org/show_bug.cgi?id=96993
4006
4007         Reviewed by Dimitri Glazkov.
4008
4009         Since we would like to reuse ContentDistribution pool, it should not be update