Web Inspector: searching for <u> in elements panel finds all tags containing "u"
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-01-31  Dmitry Zvorygin  <zvorygin@chromium.org>
2
3         Web Inspector: searching for <u> in elements panel finds all tags containing "u"
4         https://bugs.webkit.org/show_bug.cgi?id=108176
5
6         Reviewed by Pavel Feldman.
7
8         When searching for tag name check that tag name must either start from
9         search query, or must end with it.
10
11         * inspector/InspectorDOMAgent.cpp:
12         (WebCore::InspectorDOMAgent::performSearch):
13
14 2013-01-30  Mark Lam  <mark.lam@apple.com>
15
16         DatabaseContext needs to outlive the ScriptExecutionContext.
17         https://bugs.webkit.org/show_bug.cgi?id=108355.
18
19         Reviewed by Geoffrey Garen.
20
21         Added a RefPtr<DatabaseContext> in ScriptExecutionContext to keep the
22         DatabaseContext alive until after ScriptExecutionContext destructs.
23
24         No new tests.
25
26         * Modules/webdatabase/DatabaseContext.cpp:
27         (WebCore::DatabaseContext::DatabaseContext):
28         * dom/ScriptExecutionContext.cpp:
29         (WebCore::ScriptExecutionContext::setDatabaseContext):
30         * dom/ScriptExecutionContext.h:
31         (ScriptExecutionContext):
32
33 2013-01-31  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
34
35         On Linux, can't get spelling suggestions without selection when unified text checker is enabled
36         https://bugs.webkit.org/show_bug.cgi?id=107684
37
38         Reviewed by Ryosuke Niwa.
39
40         No new tests, covered by context-menu-suggestions.html.
41
42         * editing/Editor.cpp:
43         (WebCore::Editor::guessesForMisspelledOrUngrammatical):
44         For Linux, extend selection range to the closest word to get
45         the spelling suggestions when unified text checker is enabled.
46
47 2013-01-31  Florin Malita  <fmalita@chromium.org>
48
49         [Skia] Update SkiaImageFilterBuilder's brightness matrix to match Chromium's implementation
50         https://bugs.webkit.org/show_bug.cgi?id=107841
51
52         Reviewed by Stephen White.
53
54         Update Skia's brightness filter to match the spec after http://trac.webkit.org/changeset/139770.
55
56         No new tests: covered by existing tests (currently disabled pending rebaseline).
57
58         * platform/graphics/filters/skia/SkiaImageFilterBuilder.cpp:
59
60 2013-01-31  Andrey Lushnikov  <lushnikov@chromium.org>
61
62         Web Inspector: show cursor location in DTE
63         https://bugs.webkit.org/show_bug.cgi?id=108478
64
65         Reviewed by Pavel Feldman.
66
67         Add a new status bar element to SourceFrame to display current
68         DefaultTextEditor cursor position.
69
70         No new tests.
71
72         * English.lproj/localizedStrings.js:
73         * inspector/front-end/DefaultTextEditor.js:
74         (WebInspector.DefaultTextEditor.prototype.copyRange):
75         * inspector/front-end/SourceFrame.js:
76         (WebInspector.SourceFrame):
77         (WebInspector.SourceFrame.prototype.statusBarItems):
78         (WebInspector.SourceFrame.prototype.selectionChanged):
79         (WebInspector.SourceFrame.prototype._updateSourcePosition):
80         * inspector/front-end/TextEditor.js:
81         (WebInspector.TextEditor.prototype.copyRange):
82         * inspector/front-end/inspector.css:
83         (.source-frame-position):
84
85 2013-01-31  Andrey Lushnikov  <lushnikov@chromium.org>
86
87         Web Inspector: overlay highlight in DTE gets messed up when zoom factor changes.
88         https://bugs.webkit.org/show_bug.cgi?id=108486
89
90         Reviewed by Pavel Feldman.
91
92         Repaint overlay highlight when zoom factor changes.
93
94         No new tests.
95
96         * inspector/front-end/DefaultTextEditor.js:
97         (WebInspector.TextEditorMainPanel.prototype.highlightRegex):
98         (WebInspector.TextEditorMainPanel.prototype.removeHighlight):
99         (WebInspector.TextEditorMainPanel.prototype.highlightRange):
100         (WebInspector.TextEditorMainPanel.prototype._repaintLineRowsAffectedByHighlightDescriptors):
101         (WebInspector.TextEditorMainPanel.prototype.resize):
102
103 2013-01-31  Simon Hausmann  <simon.hausmann@digia.com>
104
105         [Qt] Fix minor memory leak in slot execution
106
107         Reviewed by Allan Sandfeld Jensen.
108
109         Don't leak the "length" string when executing a slot in JavaScript.
110
111         * bridge/qt/qt_runtime.cpp:
112         (JSC::Bindings::QtConnectionObject::execute):
113
114 2013-01-31  Mike West  <mkwst@chromium.org>
115
116         Allow blocking of IndexedDB in third-party contexts
117         https://bugs.webkit.org/show_bug.cgi?id=94171
118
119         Reviewed by Jochen Eisinger.
120
121         This patch ensures that the origin of the top window is passed into
122         SecurityOrigin::canAccessDatabase when working with IndexedDB. Giving
123         SecurityOrigin access to this data means that it can properly check
124         whether the database is being opened in a third-party context, and
125         therefore properly enforce the third-party access checks that were
126         added in http://trac.webkit.org/changeset/125736.
127
128         Third-party checks are added to IDBFactory::open,
129         IDBFactory::deleteDatabase, and IDBFactory::getDatabaseNames; each will
130         now throw a SECURITY_ERR exception when access in a third-party context
131         if third-party access checks are enabled.
132
133         To make this process slightly more clear, and avoid some ugly casting
134         logic, this patch adds a 'topOrigin'  method to ScriptExecutionContext,
135         and implements it on both WorkerContext and Document.
136
137         Tests: http/tests/security/cross-origin-indexeddb-allowed.html
138                http/tests/security/cross-origin-indexeddb.html
139                http/tests/security/cross-origin-worker-indexeddb-allowed.html
140                http/tests/security/cross-origin-worker-indexeddb.html
141
142         * Modules/indexeddb/IDBFactory.cpp:
143         (WebCore::IDBFactory::getDatabaseNames):
144         (WebCore::IDBFactory::openInternal):
145         (WebCore::IDBFactory::deleteDatabase):
146             Grab the SecurityOrigin of the current context's top-level origin,
147             and pass it to SecurityOrigin::canAccessDatabase to ensure that
148             access checks are properly applied to these three methods.
149         * dom/Document.cpp:
150         (WebCore::Document::topOrigin):
151         (WebCore):
152         * dom/Document.h:
153         (Document):
154         * dom/ScriptExecutionContext.h:
155         (ScriptExecutionContext):
156             Add a topOrigin() method to ScriptExecutionContext, and implement it
157             on Document in order to give callers access to the top document's
158             SecurityOrigin without casting ScriptExecutionContext.
159         * workers/WorkerContext.h:
160             Change the existing topOrigin() method to override the new method
161             on ScriptExecutionContext.
162
163 2013-01-31  Eugene Klyuchnikov  <eustas@chromium.org>
164
165         Web Inspector: [Network] Add cookie column to show presence of request/response cookies.
166         https://bugs.webkit.org/show_bug.cgi?id=107441
167
168         Reviewed by Pavel Feldman.
169
170         In some use cases only responses that contain "set-cookie" headers
171         are interesting.
172
173         * English.lproj/localizedStrings.js: Added "Set-Cookies" string.
174         * inspector/front-end/NetworkPanel.js:
175         (WebInspector.NetworkLogView.prototype._createTable): Added columns.
176         (WebInspector.NetworkLogView.prototype._createSortingFunctions): Ditto.
177         (WebInspector.NetworkDataGridNode.prototype.createCells): Ditto.
178         (WebInspector.NetworkDataGridNode.prototype.refreshRequest): Ditto.
179         (WebInspector.NetworkDataGridNode.prototype._refreshCookiesCell): Added.
180         (WebInspector.NetworkDataGridNode.prototype._refreshSetCookiesCell): Added.
181         (WebInspector.NetworkDataGridNode.RequestCookiesCountComparator): Added.
182         (WebInspector.NetworkDataGridNode.ResponseCookiesCountComparator): Added.
183
184 2013-01-31  Andrey Adaikin  <aandrey@chromium.org>
185
186         Web Inspector: Exception in HeapSnapshotView.js
187         https://bugs.webkit.org/show_bug.cgi?id=108456
188
189         Reviewed by Yury Semikhatsky.
190
191         Listen "profile added" events in the HeapSnapshotView targeted only to the Heap Snapshot type.
192
193         * inspector/front-end/HeapSnapshotView.js:
194         (WebInspector.HeapSnapshotView.prototype._onProfileHeaderAdded):
195
196 2013-01-31  Andrey Lushnikov  <lushnikov@chromium.org>
197
198         Web Inspector: do not set any textContent in overlay highlight spans
199         https://bugs.webkit.org/show_bug.cgi?id=108460
200
201         Reviewed by Pavel Feldman.
202
203         Do not set any text content for overlay highlight spans to implicitly
204         set its height. Instead, measure its height in the same manner as its
205         done for "width" and "left" and set it explicitly.
206
207         No new tests: no change in behaviour.
208
209         * inspector/front-end/DefaultTextEditor.js:
210         (WebInspector.TextEditorMainPanel.prototype._appendOverlayHighlight):
211         (WebInspector.TextEditorMainPanel.ElementMetrics):
212         * inspector/front-end/textEditor.css:
213         (.text-editor-token-highlight): Update highlight to correspond to
214         slightly different elements height.
215
216 2013-01-31  Allan Sandfeld Jensen  <allan.jensen@digia.com>
217
218         [Qt] Box shadows on a transparency layer is very slow
219         https://bugs.webkit.org/show_bug.cgi?id=107547
220
221         Reviewed by Noam Rosenthal.
222
223         Include the window boundaries in the clip returned by GraphicsContext,
224         since QPainter may remember clips larger than the destination, but
225         ShadowBlur uses the clipBounds to determine the size of the shadow layer.
226
227         * platform/graphics/qt/GraphicsContextQt.cpp:
228         (WebCore::GraphicsContext::clipBounds):
229
230 2013-01-31  Pavel Feldman  <pfeldman@chromium.org>
231
232         Web Inspector: highlight backend languages as scripts
233         https://bugs.webkit.org/show_bug.cgi?id=108336
234
235         Reviewed by Vsevolod Vlasov.
236
237         Most languages have structure similar to js, so enabling default highlighter for them won't hurt.
238
239         * inspector/front-end/FileSystemWorkspaceProvider.js:
240         (WebInspector.FileSystemWorkspaceProvider.prototype._contentTypeForPath):
241
242 2013-01-31  Andrey Adaikin  <aandrey@chromium.org>
243
244         Web Inspector: [Profiles] show launcher view upon deleting last profile type's header
245         https://bugs.webkit.org/show_bug.cgi?id=108468
246
247         Reviewed by Pavel Feldman.
248
249         We should show launcher view and hide profile type sidebar section upon deleting last profile type's header from the sidebar.
250         Right now we only show launcher view upon deleting the last profile header (of any profile type).
251
252         * inspector/front-end/ProfilesPanel.js:
253         (WebInspector.ProfilesPanel.prototype._removeProfileHeader):
254
255 2013-01-31  Eugene Klyuchnikov  <eustas@chromium.org>
256
257         Web Inspector: [Network] Columns are misaligned as first row goes out of sight.
258         https://bugs.webkit.org/show_bug.cgi?id=107933
259
260         Reviewed by Pavel Feldman.
261
262         For some reason if "td" elements in first table row have "display: none"
263         style, then column width calculation breaks.
264
265         * inspector/front-end/networkLogView.css:
266         (.network-log-grid.data-grid tr.offscreen > td > div):
267         Hide content instead of "td" element itself.
268
269 2013-01-31   Vineet Chaudhary  <rgf748@motorola.com>
270
271         formMethod to have empty string as default value and 'get' as invalid.
272         https://bugs.webkit.org/show_bug.cgi?id=108263
273
274         Reviewed by Kent Tamura.
275
276         The spec says formmethod should only have an invalid value default, not a missing value default.
277         Spec: http://www.whatwg.org/specs/web-apps/current-work/#form-submission-0
278               http://www.w3.org/html/wg/drafts/html/master/forms.html#attr-fs-formmethod
279
280         Test: fast/forms/formmethod-attribute-test.html
281
282         * html/HTMLFormControlElement.cpp: For the missing formMethod attr return empty string.
283         (WebCore::HTMLFormControlElement::formMethod):
284
285 2013-01-20 Kondapally Kalyan <kalyan.kondapally@intel.com>
286
287         [Efl][WebGL] Add better support to track and free XResources.
288         https://bugs.webkit.org/show_bug.cgi?id=107397
289
290         Reviewed by Noam Rosenthal.
291
292         We leak Memory during config selection as we dont free temporary
293         allocated visuals, config etc. This patch ensures that we dont leak any
294         memory.
295
296         Covered by existing WebGL tests.
297
298         * platform/graphics/surfaces/egl/EGLSurface.cpp:
299         (WebCore::EGLWindowTransportSurface::EGLWindowTransportSurface):
300         * platform/graphics/surfaces/glx/GLXConfigSelector.h:
301         (WebCore::GLXConfigSelector::GLXConfigSelector):
302         (WebCore::GLXConfigSelector::visualInfo):
303         (WebCore::GLXConfigSelector::pBufferContextConfig):
304         (WebCore::GLXConfigSelector::surfaceContextConfig):
305         (WebCore::GLXConfigSelector::createSurfaceConfig):
306         (GLXConfigSelector):
307         Removed XVisualInfo as member variable. Fixed memory leaks.
308
309         * platform/graphics/surfaces/glx/GLXSurface.cpp:
310         (WebCore::GLXTransportSurface::GLXTransportSurface):
311         * platform/graphics/surfaces/glx/OwnPtrX11.h: Added.
312         (OwnPtrX11):
313         (WebCore::OwnPtrX11::OwnPtrX11):
314         (WebCore::OwnPtrX11::~OwnPtrX11):
315         (WebCore::OwnPtrX11::operator=):
316         (WebCore::OwnPtrX11::operator T*):
317         (WebCore::OwnPtrX11::operator->):
318         (WebCore::OwnPtrX11::get):
319         Calls XFree on pointer to memory allocated by X when the class goes out of scope.
320         OwnPtr cannot be used here as GLXFBConfig is a pointer to an array of pointers.
321
322         * platform/graphics/surfaces/glx/X11WindowResources.cpp:
323         (WebCore::X11OffScreenWindow::X11OffScreenWindow):
324         (WebCore::X11OffScreenWindow::~X11OffScreenWindow):
325         (WebCore):
326         (WebCore::X11OffScreenWindow::createOffScreenWindow):
327         (WebCore::X11OffScreenWindow::destroyWindow):
328         (WebCore::X11OffScreenWindow::nativeSharedDisplay):
329         * platform/graphics/surfaces/glx/X11WindowResources.h:
330         (X11OffScreenWindow):
331         Removed unused code. Fixed memory leaks.
332
333 2013-01-31  Andrey Adaikin  <aandrey@chromium.org>
334
335         Web Inspector: [Canvas] remove invalid canvas profile trace logs upon frame navigation
336         https://bugs.webkit.org/show_bug.cgi?id=108454
337
338         Reviewed by Pavel Feldman.
339
340         When canvas profile trace logs stored in the backend get destroyed (for example, on frame navigation), send an event to frontend and update the UI.
341         Drive-by: replace String types to corresponding TypeBuilder::Canvas::* typedefs.
342
343         * inspector/InjectedScriptCanvasModule.cpp:
344         (WebCore::InjectedScriptCanvasModule::captureFrame):
345         (WebCore::InjectedScriptCanvasModule::startCapturing):
346         (WebCore::InjectedScriptCanvasModule::callStartCapturingFunction):
347         (WebCore::InjectedScriptCanvasModule::stopCapturing):
348         (WebCore::InjectedScriptCanvasModule::dropTraceLog):
349         (WebCore::InjectedScriptCanvasModule::callVoidFunctionWithTraceLogIdArgument):
350         (WebCore::InjectedScriptCanvasModule::traceLog):
351         (WebCore::InjectedScriptCanvasModule::replayTraceLog):
352         (WebCore::InjectedScriptCanvasModule::resourceInfo):
353         (WebCore::InjectedScriptCanvasModule::resourceState):
354         * inspector/InjectedScriptCanvasModule.h:
355         (InjectedScriptCanvasModule):
356         * inspector/Inspector.json:
357         * inspector/InspectorCanvasAgent.cpp:
358         (WebCore::InspectorCanvasAgent::dropTraceLog):
359         (WebCore::InspectorCanvasAgent::stopCapturing):
360         (WebCore::InspectorCanvasAgent::getTraceLog):
361         (WebCore::InspectorCanvasAgent::replayTraceLog):
362         (WebCore::InspectorCanvasAgent::getResourceInfo):
363         (WebCore::InspectorCanvasAgent::getResourceState):
364         (WebCore::InspectorCanvasAgent::frameNavigated):
365         * inspector/InspectorCanvasAgent.h:
366         (InspectorCanvasAgent):
367         * inspector/InspectorPageAgent.cpp:
368         (WebCore::InspectorPageAgent::hasIdForFrame):
369         (WebCore):
370         * inspector/InspectorPageAgent.h:
371         (InspectorPageAgent):
372         * inspector/front-end/CanvasProfileView.js:
373         (WebInspector.CanvasProfileType.prototype._runSingleFrameCapturing):
374         (WebInspector.CanvasProfileType.prototype._startFrameCapturing):
375         (WebInspector.CanvasProfileType.prototype._didStartCapturingFrame):
376         (WebInspector.CanvasProfileType.prototype._traceLogsRemoved):
377         (WebInspector.CanvasDispatcher.prototype.contextCreated):
378         (WebInspector.CanvasDispatcher.prototype.traceLogsRemoved):
379         (WebInspector.CanvasProfileHeader):
380         (WebInspector.CanvasProfileHeader.prototype.frameId):
381
382 2013-01-31  Andrey Lushnikov  <lushnikov@chromium.org>
383
384         Web Inspector: DTE doesn't highlight words if the selected one is the last in the line
385         https://bugs.webkit.org/show_bug.cgi?id=108344
386
387         Reviewed by Pavel Feldman.
388
389         Fix error in _isWord function which made an erroneous line-end check.
390
391         Improved test: inspector/editor/text-editor-highlight-token.html
392
393         * inspector/front-end/DefaultTextEditor.js:
394         (WebInspector.TextEditorMainPanel.TokenHighlighter.prototype._isWord):
395
396 2013-01-31  Philippe Normand  <pnormand@igalia.com>
397
398         Unreviewed, Qt build fix after r141265.
399
400         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
401         Avoid uninitialized variable error when NATIVE_FULLSCREEN_VIDEO is disabled.
402
403 2013-01-31  Kent Tamura  <tkent@chromium.org>
404
405         Click on a label element won't select input[type=date]
406         https://bugs.webkit.org/show_bug.cgi?id=108428
407
408         Reviewed by Kentaro Hara.
409
410         date/time input types with INPUT_MULTIPLE_FIELDS_UI are not
411         mouse-focusable. <input> as a shadow host never gets focus and
412         sub-fields in its shadow tree are focusable. Howevever, the click
413         handling of <label> checked isMouseFocusable. We introduce new function
414         isFocusableByClickOnLabel to HTMLElement. It's default implementation is
415         same as isMouseFocusable, and we add special handling for
416         BaseMultipleFieldsDateAndTimeInputType::isFocusableByClickOnLabel.
417
418         Also, date/time input types without INPUT_MULTIPLE_FIELDS_UI were not
419         mouse-focusable by a mistake. It should be mouse-focusable.
420
421         Test: fast/forms/date/date-click-on-label.html
422
423         * html/HTMLElement.cpp:
424         (WebCore::HTMLElement::isFocusableByClickOnLabel):
425         Added. Just calls isMouseFocusable.
426         * html/HTMLElement.h:
427         (HTMLElement): Declare isFocusableByClickOnLabel.
428         * html/HTMLLabelElement.cpp:
429         (WebCore::HTMLLabelElement::defaultEventHandler):
430         Calls isFocusableByClickOnLabel instead of isMouseFocusable.
431
432         * html/HTMLInputElement.cpp:
433         (WebCore::HTMLInputElement::isFocusableByClickOnLabel):
434         Delegate to InputType::isFocusableByClickOnLabel.
435         * html/HTMLInputElement.h:
436         (HTMLInputElement): Declare isFocusableByClickOnLabel.
437         * html/InputType.cpp:
438         (WebCore::InputType::isFocusableByClickOnLabel):
439         Added. Calls isMouseFocusable.
440         * html/InputType.h:
441         (InputType): Declare isFocusableByClickOnLabel.
442
443         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
444         (WebCore::BaseMultipleFieldsDateAndTimeInputType::isFocusableByClickOnLabel):
445         Added. Use the same logic with textfields.
446         * html/BaseMultipleFieldsDateAndTimeInputType.h:
447         (BaseMultipleFieldsDateAndTimeInputType): Declare isFocusableByClickOnLabel.
448         * html/BaseChooserOnlyDateAndTimeInputType.cpp:
449         (WebCore::BaseChooserOnlyDateAndTimeInputType::isMouseFocusable):
450         Added. Use the same logic with textfields.
451         * html/BaseChooserOnlyDateAndTimeInputType.h:
452         (BaseChooserOnlyDateAndTimeInputType): Declare isMouseFocusable.
453
454 2013-01-31  Kentaro Hara  <haraken@chromium.org>
455
456         Rename WheelEvent::Granularity to WheelEvent::DeltaMode
457         https://bugs.webkit.org/show_bug.cgi?id=108434
458
459         Reviewed by Ryosuke Niwa.
460
461         Per the spec, WheelEvent::Granularity should be renamed to WheelEvent::DeltaMode.
462
463         Spec: http://www.w3.org/TR/DOM-Level-3-Events/#events-WheelEvent
464         https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm#constructor-wheelevent
465
466         No tests. No change in behavior.
467
468         * dom/WheelEvent.cpp:
469         (WebCore::WheelEvent::WheelEvent):
470         (WebCore::WheelEvent::initWheelEvent):
471         (WebCore::deltaMode):
472         (WebCore::WheelEventDispatchMediator::WheelEventDispatchMediator):
473         * dom/WheelEvent.h:
474         (WebCore::WheelEvent::create):
475         (WebCore::WheelEvent::deltaMode):
476         (WheelEvent):
477         * page/EventHandler.cpp:
478         (WebCore::wheelGranularityToScrollGranularity):
479         (WebCore::EventHandler::defaultWheelEventHandler):
480
481 2013-01-30  Yury Semikhatsky  <yurys@chromium.org>
482
483         Web Inspector: test that nodes from the same detached DOM tree will get into one group in heap snapshot
484         https://bugs.webkit.org/show_bug.cgi?id=108202
485
486         Reviewed by Vsevolod Vlasov.
487
488         Test: inspector-protocol/heap-profiler/heap-snapshot-with-detached-dom-tree.html
489
490         * inspector/front-end/JSHeapSnapshot.js:
491         (WebInspector.JSHeapSnapshotNode.prototype.className): removed unnecessary i18n.
492
493 2013-01-31  Kentaro Hara  <haraken@chromium.org>
494
495         [V8] Trace not only major DOM GCs but also minor DOM GCs
496         https://bugs.webkit.org/show_bug.cgi?id=108436
497
498         Reviewed by Adam Barth.
499
500         Currently only major DOM GCs are traced.
501         We should also trace minor DOM GCs.
502
503         No tests. No change in behavior.
504
505         * bindings/v8/V8GCController.cpp:
506         (WebCore::V8GCController::minorGCPrologue):
507         (WebCore::V8GCController::minorGCEpilogue):
508
509 2013-01-31  Yury Semikhatsky  <yurys@chromium.org>
510
511         Layout Test inspector-protocol/take-heap-snapshot.html crashes in the Debug mode
512         https://bugs.webkit.org/show_bug.cgi?id=104800
513
514         Reviewed by Jochen Eisinger.
515
516         The test crashed because during snapshot generation Profiler.reportHeapSnapshotProgress
517         events were sent to the inspector front-end, then parsed and dispatched there.
518         Since in case of layout tests the front-end resides in the same process
519         as the inspected page parsing the event broke an assumption that there are
520         no JS heap allocations while heap snapshot is being taken.
521
522         I added optional boolean parameter 'reportProgress' to Profiler.takeHeapSnapshot
523         command so that the protocol client can control whether progress events should
524         be sent during snapshot generation. The protocol test is not interested in the
525         progress events and sets reportProgress to false.
526
527         Test: inspector-protocol/heap-profiler/take-heap-snapshot.html
528
529         * inspector/Inspector.json:
530         * inspector/InspectorProfilerAgent.cpp:
531         (WebCore::InspectorProfilerAgent::takeHeapSnapshot):
532         * inspector/InspectorProfilerAgent.h:
533         (InspectorProfilerAgent):
534         * inspector/front-end/ProfilesPanel.js:
535         (WebInspector.ProfilesPanel.prototype.takeHeapSnapshot):
536
537 2013-01-31  Sheriff Bot  <webkit.review.bot@gmail.com>
538
539         Unreviewed, rolling out r141110.
540         http://trac.webkit.org/changeset/141110
541         https://bugs.webkit.org/show_bug.cgi?id=108349
542
543         This patch broke WK2-EFL unit tests (Requested by grzegorz on
544         #webkit).
545
546         * platform/text/TextChecking.h:
547         (WebCore):
548
549 2013-01-31  Kentaro Hara  <haraken@chromium.org>
550
551         [V8] 'new MouseEvent("click", {relatedTarget: window}).window' should return window
552         https://bugs.webkit.org/show_bug.cgi?id=108432
553
554         Reviewed by Adam Barth.
555
556         In V8 'new MouseEvent("click", {relatedTarget: window}).window'
557         returns null. JSC returns window, which is a correct behavior.
558         V8 should also return window.
559
560         The point is that we need to handle a DOMWindow wrapper specially
561         before converting it to an EventTarget object. A wrapper returned by
562         Dictionary::get("relatedTarget") is not an expected DOMWindow wrapper.
563         To get the expected DOMWindow wrapper, we need to look up a prototype
564         chain of the DOMWindow wrapper.
565
566         In JSC, this special handling is done by JSEventTargetCustom::toEventTarget().
567
568         Test: fast/events/constructors/mouse-event-constructor.html
569
570         * bindings/v8/Dictionary.cpp:
571         (WebCore::Dictionary::get):
572
573 2013-01-31  Mark Pilgrim  <pilgrim@chromium.org>
574
575         [Chromium] Move MediaPlayerPrivateChromium to WebCore
576         https://bugs.webkit.org/show_bug.cgi?id=108415
577
578         Reviewed by Adam Barth.
579
580         Part of a larger refactoring series; see tracking bug 106829.
581
582         * WebCore.gypi:
583         * platform/graphics/chromium/MediaPlayerPrivateChromium.cpp: Added.
584         (WebCore):
585         (WebCore::MediaPlayerPrivate::registerMediaEngine): call
586         registerMediaEngine through static function pointer that was set
587         during WebKit initializeWithoutV8
588         (WebCore::MediaPlayerPrivate::setMediaEngineRegisterSelfFunction):
589         new setter function that takes a function pointer that is used by registerMediaEngine
590         * platform/graphics/chromium/MediaPlayerPrivateChromium.h:
591         (WebCore):
592         (MediaPlayerPrivate):
593
594 2013-01-30  Patrick Gansterer  <paroga@webkit.org>
595
596         Port DragImageWin.cpp to WinCE
597         https://bugs.webkit.org/show_bug.cgi?id=108329
598
599         Reviewed by Brent Fulgham.
600
601         Add #if !OS(WINCE) around a few lines of the code, so it can be used by the WinCE port too.
602
603         * PlatformWinCE.cmake:
604         * platform/win/DragImageWin.cpp:
605         (WebCore::dragLabelFont):
606         * platform/wince/DragImageWinCE.cpp: Removed.
607
608 2013-01-30  Hayato Ito  <hayato@chromium.org>
609
610         Split CSSOMWrapper data and functions out from StyleResolver into its own class.
611         https://bugs.webkit.org/show_bug.cgi?id=107779
612
613         Reviewed by Dimitri Glazkov.
614
615         Factored CSSOMWrapper logic and data out from StyleResolver into a
616         InspectorCSSOMWrappers class.  Since InspectorCSSOMWrappers
617         depends on static variables defined in StyleResolver.cpp, this
618         patch does not extract a new class into a new file, which makes a
619         review easier since it produces readable diffs.
620
621         After we factor static variables related to default style sheets
622         in a following patch (bug 107780), I'll move
623         InspectorCSSOMWrappers into a its own file.
624
625         No new tests, refactoring only.
626
627         * css/StyleResolver.cpp:
628         (WebCore):
629         (WebCore::StyleResolver::appendAuthorStyleSheets):
630         (WebCore::InspectorCSSOMWrappers::collectFromStyleSheetIfNeeded):
631         (WebCore::InspectorCSSOMWrappers::collect):
632         (WebCore::InspectorCSSOMWrappers::collectFromStyleSheetContents): Name it explicitly rather than overloading.
633         (WebCore::InspectorCSSOMWrappers::collectFromStyleSheets): Name it explicitly rather than overloading.
634         (WebCore::InspectorCSSOMWrappers::collectFromDocumentStyleSheetCollection): Name it explicitly rather than overloading.
635         (WebCore::InspectorCSSOMWrappers::getWrapperForRuleInSheets): Renamed from ensureFullCSSOMWrapperForInspector().
636         (WebCore::InspectorCSSOMWrappers::reportMemoryUsage):
637         (WebCore::StyleResolver::reportMemoryUsage):
638         * css/StyleResolver.h:
639         (InspectorCSSOMWrappers):
640         (WebCore):
641         (StyleResolver):
642         (WebCore::StyleResolver::inspectorCSSOMWrappers):
643         * inspector/InspectorCSSAgent.cpp:
644         (WebCore::InspectorCSSAgent::willMatchRule):
645         (WebCore::InspectorCSSAgent::willProcessRule):
646         (WebCore::InspectorCSSAgent::buildObjectForRule):
647
648 2013-01-30  Sheriff Bot  <webkit.review.bot@gmail.com>
649
650         Unreviewed, rolling out r141358.
651         http://trac.webkit.org/changeset/141358
652         https://bugs.webkit.org/show_bug.cgi?id=108421
653
654         breaks android builder (Requested by morrita on #webkit).
655
656         * bindings/v8/custom/V8IntentCustom.cpp:
657
658 2013-01-30  Kentaro Hara  <haraken@chromium.org>
659
660         [V8] Use state->isolate() when state is not 0
661         https://bugs.webkit.org/show_bug.cgi?id=107674
662
663         Reviewed by Adam Barth.
664
665         No tests. No change in behavior.
666
667         * bindings/v8/ScriptProfiler.cpp:
668         (WebCore::ScriptProfiler::start):
669         (WebCore::ScriptProfiler::stop):
670
671 2013-01-30  Adam Barth  <abarth@webkit.org>
672
673         The background HTML parser should be able to parse speculatively
674         https://bugs.webkit.org/show_bug.cgi?id=107753
675
676         Reviewed by Eric Seidel.
677
678         This patch adds the ability for the foreground HTML parser to
679         invalidate speculative parsing done by the background HTML parser.
680         Currently, we're a bit overly agressive an invalidate all speculations
681         on document.write. We plan to refine that in the future.
682
683         Test: fast/parser/document-write-partial-script.html
684
685         * WebCore.gypi:
686         * html/parser/BackgroundHTMLInputStream.cpp: Added.
687         (WebCore):
688         (WebCore::BackgroundHTMLInputStream::BackgroundHTMLInputStream):
689         (WebCore::BackgroundHTMLInputStream::append):
690         (WebCore::BackgroundHTMLInputStream::close):
691         (WebCore::BackgroundHTMLInputStream::createCheckpoint):
692         (WebCore::BackgroundHTMLInputStream::rewindTo):
693         * html/parser/BackgroundHTMLInputStream.h: Added.
694         (WebCore):
695         (BackgroundHTMLInputStream):
696         (WebCore::BackgroundHTMLInputStream::current):
697         (WebCore::BackgroundHTMLInputStream::Checkpoint::Checkpoint):
698         (Checkpoint):
699         * html/parser/BackgroundHTMLParser.cpp:
700         (WebCore::BackgroundHTMLParser::append):
701         (WebCore):
702         (WebCore::BackgroundHTMLParser::resumeFrom):
703         (WebCore::BackgroundHTMLParser::markEndOfFile):
704         (WebCore::BackgroundHTMLParser::pumpTokenizer):
705         (WebCore::BackgroundHTMLParser::sendTokensToMainThread):
706         (WebCore::BackgroundHTMLParser::resumeFromPartial):
707         * html/parser/BackgroundHTMLParser.h:
708         (BackgroundHTMLParser):
709         * html/parser/HTMLDocumentParser.cpp:
710         (WebCore::HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser):
711         (WebCore::HTMLDocumentParser::didFailSpeculation):
712         (WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser):
713         (WebCore::HTMLDocumentParser::resumeParsingAfterScriptExecution):
714         * html/parser/HTMLDocumentParser.h:
715         (ParsedChunk):
716         (HTMLDocumentParser):
717
718 2013-01-30  Nils Barth  <nbarth@google.com>
719
720         [V8] Add IDL 'enum' support to CodeGeneratorV8.pm
721         https://bugs.webkit.org/show_bug.cgi?id=106553
722
723         Reviewed by Kentaro Hara.
724
725         Add partial support for Web IDL enumerations in V8 bindings
726
727         Binding generators currently cannot handle IDL enumerations.
728         (An enumeration is an DOMString with a limited set of values, thus
729         treated internally as DOMString, with validation code added in
730         bindings.)
731         This adds support for enumerations in V8, adding validation checking
732         to setters.
733         It does not add validation checking to operations (no test case), and
734         does not add support in JSC.
735
736         Test: bindings/scripts/test/TestObj.idl (run-bindings-test)
737
738         * bindings/scripts/IDLParser.pm:
739          - Parser assumes all IDL definitions are interfaces; add support for
740            other definitions
741          - Parser parses but discards enum definitions; instead, record
742            parsed data
743         (Parse): Sort definitions into interfaces and enums.
744         Remove "@definitions eq (someIdlDocument)" test, as this never
745         happens (fossil code) -- parseDefinitions returns list of definitions,
746         never a one-item list consisting of a document (no nested documents).
747         (unquoteString): new utility function to unquote StringToken (token
748         itself still quoted)
749         (parseEnum):
750         (parseEnumValueList):
751         (parseEnumValues):
752         (parseEnumOld):
753
754         * bindings/scripts/CodeGenerator.pm:
755          - Expose parsed enum data to backends (detect enums, list valid
756            values)
757          - Enums treated as DOMString type in internal function
758         (ProcessDocument):
759         (IsEnumType):
760         (ValidEnumValues):
761         (IsRefPtrType):
762         * bindings/scripts/CodeGeneratorV8.pm:
763          - Enums treated as DOMString type in internal functions
764          - Add validation to setter
765         (GenerateNormalAttrSetter):
766         (GetNativeType):
767         (JSValueToNative):
768         (NativeToJSValue):
769         (ConvertToV8StringResource):
770         * bindings/scripts/test/TestObj.idl:
771          - New enum type and enum variable test for IDL enumeration support
772         * bindings/scripts/test/V8/V8TestObj.cpp:
773          - Generated code, desired behavior
774         (WebCore::TestObjV8Internal::enumAttrAttrGetter):
775         (TestObjV8Internal):
776         (WebCore::TestObjV8Internal::enumAttrAttrSetter):
777         (WebCore):
778         * bindings/scripts/test/JS/JSTestObj.cpp:
779          - Generated code, currently incorrect
780         (WebCore):
781         (WebCore::jsTestObjEnumAttr):
782         (WebCore::setJSTestObjEnumAttr):
783         * bindings/scripts/test/JS/JSTestObj.h:
784          - Generated code, currently incorrect
785         (WebCore):
786
787 2013-01-30  Nico Weber  <thakis@chromium.org>
788
789         [chromium] Build webkit with enable_web_intents set to 0.
790         https://bugs.webkit.org/show_bug.cgi?id=108408
791
792         Reviewed by Kentaro Hara.
793
794         I'll then make chromium build fine with that, then switch
795         enable_web_intents to 0, roll that into webkit, and then
796         actually remove the code hidden behind this flag.
797
798         * bindings/v8/custom/V8IntentCustom.cpp:
799
800 2013-01-30  Joshua Bell  <jsbell@chromium.org>
801
802         IndexedDB: Remove speculative dispatchEvent crash fix now that root cause is addressed
803         https://bugs.webkit.org/show_bug.cgi?id=108131
804
805         Reviewed by Tony Chang.
806
807         A patch was landed in r140027 to prevent a null pointer crash in
808         IDBRequest::dispatchEvent and confirm the source of the crash (which
809         we couldn't repro locally). Following confirmation from user reports,
810         the root cause was tracked down to a race condition in MessageQueue,
811         and was fixed in r140483. This patch is no longer needed, and there's
812         always been an ASSERT in place to catch regressions while debugging.
813
814         No new tests - no behavior change.
815
816         * Modules/indexeddb/IDBRequest.cpp:
817         (WebCore::IDBRequest::dispatchEvent): Remove extraneous test.
818
819 2013-01-30  Joe Mason  <jmason@rim.com>
820
821         [BlackBerry] Store both proxy and host credentials simultaneously for NetworkJob
822         https://bugs.webkit.org/show_bug.cgi?id=108388
823
824         Reviewed by Yong Li.
825
826         The platform NetworkRequest interface has been updated again, to store both a proxy and host
827         credential for each request (to prevent an infinite loop when a request authenticates against a
828         proxy but fails the host authentication, and then the followup contains the host credential but not
829         the proxy credential so it fails proxy authentication, so the next followup contains the proxy
830         credential but not the host credential...)
831
832         Complying with the new interface requires the host and proxy challenge to be stored separately in
833         webkit so they can both be added to the same NetworkRequest.
834
835         Internal PR: 281172
836         Internal Reviewer: Leo Yang
837
838         * platform/network/ResourceHandleInternal.h:
839         (ResourceHandleInternal):
840         * platform/network/blackberry/AuthenticationChallenge.h:
841         (WebCore::AuthenticationChallenge::hasCredentials):
842         (AuthenticationChallenge):
843         * platform/network/blackberry/NetworkJob.cpp:
844         (WebCore::NetworkJob::notifyAuthReceived):
845         (WebCore::NetworkJob::handleRedirect):
846         (WebCore::NetworkJob::sendRequestWithCredentials):
847         (WebCore::NetworkJob::storeCredentials):
848         (WebCore):
849         (WebCore::NetworkJob::purgeCredentials):
850         (WebCore::NetworkJob::notifyChallengeResult):
851         (WebCore::NetworkJob::updateCurrentWebChallenge):
852         * platform/network/blackberry/NetworkJob.h:
853         (NetworkJob):
854         * platform/network/blackberry/NetworkManager.cpp:
855         (WebCore::setAuthCredentials):
856         (WebCore):
857         (WebCore::NetworkManager::startJob):
858
859 2013-01-30  Oliver Hunt  <oliver@apple.com>
860
861         Make JSEventListener more robust in the event of the compiled handler being released.
862         https://bugs.webkit.org/show_bug.cgi?id=108390
863
864         Reviewed by Michael Saboff.
865
866         It shouldn't be possible for a handler to be collected for any object that
867         might still trigger an event.  Nonetheless it does still happen, and the
868         only point of failure that currently exists is compiling the handler.
869
870         This patch is mostly just assertions, but also removes a bunch of field
871         clearing that was previously being performed.  Given we do seem to periodically
872         end up needing to recompile a handler this appears to be necessary.  That
873         said there does not appear to be a memory hit from this as the event handlers
874         that make us use JSLazyEventListener are not frequently compiled, and the bulk
875         of the functions that are compiled end up causing us to keep the strings around
876         anyway.
877
878         * bindings/js/JSLazyEventListener.cpp:
879         (WebCore::JSLazyEventListener::JSLazyEventListener):
880         (WebCore::JSLazyEventListener::initializeJSFunction):
881
882 2013-01-30  Kentaro Hara  <haraken@chromium.org>
883
884         Implement KeyboardEvent constructor
885         https://bugs.webkit.org/show_bug.cgi?id=108320
886
887         Reviewed by Adam Barth.
888
889         This patch implements KeyboardEvent constructor under a DOM4_EVENTS_CONSTRUCTOR flag,
890         which is enabled on Chromium and Safari.
891
892         This significantly simplifies a code to construct a KeyboardEvent.
893
894         Before:
895           e = document.createEvent("KeyboardEvent");
896           e.initKeyboardEvent("keypress", true, true, null, false, false, false, false, 0, 0);
897
898         After:
899           e = new KeyboardEvent("keypress");
900
901         Editor's draft: https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm
902
903         - 'char' and 'code' are not yet supported due to lack of WebCore implementation.
904
905         - 'altGraphKey' is not supported because it's an extended attribute in WebKit
906         and is not speced.
907
908         - Renamed keyboard event constant variables to avoid style errors.
909
910         Test: fast/events/constructors/keyboard-event-constructor.html
911
912         * dom/KeyboardEvent.cpp:
913         (WebCore::keyLocationCode):
914         (WebCore::KeyboardEventInit::KeyboardEventInit):
915         (WebCore):
916         (WebCore::KeyboardEvent::KeyboardEvent):
917         * dom/KeyboardEvent.h:
918         (WebCore):
919         (WebCore::KeypressCommand::KeypressCommand):
920         (KeypressCommand):
921         (KeyboardEventInit):
922         (KeyboardEvent):
923         (WebCore::KeyboardEvent::create):
924         (WebCore::KeyboardEvent::keyIdentifier):
925         (WebCore::KeyboardEvent::keyLocation):
926         (WebCore::KeyboardEvent::altGraphKey):
927         (WebCore::KeyboardEvent::keyEvent):
928         (WebCore::KeyboardEvent::keypressCommands):
929         * dom/KeyboardEvent.idl:
930
931 2013-01-30  Joshua Bell  <jsbell@chromium.org>
932
933         IndexedDB: IDBKeyRange::isOnlyKey() does pointer equality comparison
934         https://bugs.webkit.org/show_bug.cgi?id=107582
935
936         Reviewed by Tony Chang.
937
938         Per the bug title, IDBKeyRange::isOnlyKey() was testing the upper/lower pointers to
939         determine if this was a "trivial" range, which can be used to fast-path lookups. This
940         is insufficient in multi-process ports where range values may be thrown across the wire.
941         This is addressed by using the existing key equality tests.
942
943         In addition, the bounds type check incorrectly checked m_lowerType == LowerBoundOpen, which
944         meant the function could never return true (since upper == lower implies closed bounds).
945         Therefore, the fast-path case wasn't used even in single-process ports (e.g. DRT). The
946         slow-path case contructed a backing store cursor over the range, and exited early if the
947         cursor yielded nothing. The fast-path case doesn't need to create a cursor, so needs to
948         deal with lookup misses. This revealed two similar (but trivial) lurking bugs in the
949         fast-path.
950
951         No new behavior; covered by tests such as: storage/indexeddb/get-keyrange.html
952
953         * Modules/indexeddb/IDBBackingStore.cpp:
954         (WebCore::IDBBackingStore::getRecord): Handle backing store read miss case.
955         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
956         (WebCore::GetOperation::perform): Handle backing store read miss case.
957         * Modules/indexeddb/IDBKeyRange.cpp:
958         (WebCore::IDBKeyRange::isOnlyKey): Compare keys by value, not pointer, correct
959         type checks, add assertions.
960         * Modules/indexeddb/IDBKeyRange.h:
961         (IDBKeyRange): Move implementation to CPP file.
962
963 2013-01-30  Joe Mason  <jmason@rim.com>
964
965         [BlackBerry] Never store empty credentials in NetworkJob::storeCredentials
966         https://bugs.webkit.org/show_bug.cgi?id=108387
967
968         Reviewed by Yong Li.
969
970         There is a code path that can cause NetworkJob::storeCredentials to be called with empty
971         credentials, causing the existing credentials to be overwritten even though authentication
972         succeeded.  PR 287791 has been filed to investigate why this happens; in the meantime, ignore empty
973         credentials.
974
975         Internal PR: 281172
976         Internally Reviewed By: Leo Yang
977
978         * platform/network/blackberry/NetworkJob.cpp:
979         (WebCore::NetworkJob::storeCredentials):
980
981 2013-01-30  Andy Estes  <aestes@apple.com>
982
983         ContentFilter should be a ref-counted class
984         https://bugs.webkit.org/show_bug.cgi?id=108392
985
986         Reviewed by David Kilzer.
987
988         * loader/MainResourceLoader.h:
989         (MainResourceLoader): Store a RefPtr to m_contentFilter.
990         * platform/ContentFilter.h: Inherit from RefCounted<ContentFilter>.
991         * platform/mac/ContentFilterMac.mm:
992         (WebCore::ContentFilter::create): Return a PassRefPtr.
993
994 2013-01-30  Tim Horton  <timothy_horton@apple.com>
995
996         [mac] ImageBuffer should create accelerated buffers for small canvases, but we shouldn't force them to create compositing layers
997         https://bugs.webkit.org/show_bug.cgi?id=107804
998         <rdar://problem/11752381>
999
1000         Reviewed by Simon Fraser.
1001
1002         Make all canvases IOSurface-backed if requested, instead of having a size threshold
1003         under which we won't use accelerated canvas.
1004
1005         Make requiresCompositingForCanvas take the size of the canvas into account, using
1006         the threshold which was previously in ImageBuffer to determine whether or not a
1007         canvas should be forced into a compositing layer.
1008
1009         This improves canvas performance on some benchmarks
1010         (http://www.mikechambers.com/html5/javascript/QuadTree/examples/collision.html, for example)
1011         significantly, in cases where canvases which fall below the size limit
1012         (and thus are unaccelerated) are being drawn rapidly into either accelerated
1013         tiles or another accelerated canvas, by preventing excessive copying to/from the GPU.
1014
1015         * platform/graphics/cg/ImageBufferCG.cpp:
1016         (WebCore):
1017         (WebCore::ImageBuffer::ImageBuffer):
1018         * rendering/RenderLayerCompositor.cpp:
1019         (WebCore::RenderLayerCompositor::requiresCompositingForCanvas):
1020
1021 2013-01-30  Alec Flett  <alecflett@chromium.org>
1022
1023         IndexedDB: clean up scheduleTask return type
1024         https://bugs.webkit.org/show_bug.cgi?id=108361
1025
1026         Reviewed by Tony Chang.
1027
1028         This is just a code simplification now that the
1029         synchronous consumers of scheduleTask are gone.
1030
1031         No new tests: pure refactor.
1032
1033         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
1034         (WebCore::IDBDatabaseBackendImpl::setIndexesReady):
1035         (WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction):
1036         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
1037         (WebCore::IDBTransactionBackendImpl::scheduleTask):
1038         * Modules/indexeddb/IDBTransactionBackendImpl.h:
1039         (WebCore::IDBTransactionBackendImpl::scheduleTask):
1040         (IDBTransactionBackendImpl):
1041
1042 2013-01-30  Simon Fraser  <simon.fraser@apple.com>
1043
1044         Elements that dynamically become fixed sometimes jump to the top left on scrolling
1045         https://bugs.webkit.org/show_bug.cgi?id=108389
1046
1047         Reviewed by Beth Dakin.
1048
1049         When an element became position:fixed and gained a compositing layer
1050         as a result, we would compute its viewport constraints (including the 
1051         last GraphicsLayer position) before we had actually updated the GraphicsLayer
1052         geometry for the first time. This would cause a jump to 0,0 on scrolling.
1053         
1054         Fix by removing the call to updateViewportConstraintStatus() just after
1055         creating the backing. Instead, hook in to registerScrollingLayers(),
1056         which is called on every geometry update, to update the viewport
1057         constraints for this layer.
1058         
1059         Tested via existing tests, which now show correct positions at last
1060         layout.
1061
1062         * rendering/RenderLayerBacking.cpp:
1063         (WebCore::RenderLayerBacking::registerScrollingLayers):
1064         * rendering/RenderLayerCompositor.cpp:
1065         (WebCore::RenderLayerCompositor::updateBacking):
1066
1067 2013-01-30  Adam Barth  <abarth@webkit.org>
1068
1069         HTMLDocumentParser::insert should be aware of threaded parsing
1070         https://bugs.webkit.org/show_bug.cgi?id=107764
1071
1072         Reviewed by Eric Seidel.
1073
1074         This patch is an incremental step towards recovering from
1075         document.write invalidating our speculative parsing buffer. The
1076         approach I've taken is to make it possible to transfer the
1077         HTMLDocumentParser's HTMLTokenizer and HTMLToken to the background
1078         thread. To make that possible, I've taught the HTMLDocumentParser how
1079         to operate without a tokenizer or a token.
1080
1081         Not having a tokenizer or a token while parsing in the background also
1082         helps us avoid accidentially feeding input to the main thread's
1083         tokenizer when we're supposed to feed it to the background thread.
1084
1085         This patch shouldn't have any behavior change (other than possibly
1086         fixing a crash in fast/parser when threading parsing is enabled).
1087
1088         * html/parser/HTMLDocumentParser.cpp:
1089         (WebCore::HTMLDocumentParser::HTMLDocumentParser):
1090         (WebCore::HTMLDocumentParser::didFailSpeculation):
1091         (WebCore):
1092         (WebCore::HTMLDocumentParser::insert):
1093         (WebCore::HTMLDocumentParser::finish):
1094         (WebCore::HTMLDocumentParser::resumeParsingAfterScriptExecution):
1095         * html/parser/HTMLDocumentParser.h:
1096         (HTMLDocumentParser):
1097         * html/parser/HTMLTreeBuilder.cpp:
1098         (WebCore::HTMLTreeBuilder::constructTree):
1099         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
1100         (WebCore::HTMLTreeBuilder::processEndTag):
1101         (WebCore::HTMLTreeBuilder::processGenericRCDATAStartTag):
1102         (WebCore::HTMLTreeBuilder::processGenericRawTextStartTag):
1103         (WebCore::HTMLTreeBuilder::processScriptStartTag):
1104         * html/parser/TextDocumentParser.cpp:
1105         (WebCore::TextDocumentParser::TextDocumentParser):
1106
1107 2013-01-30  Rafael Weinstein  <rafaelw@chromium.org>
1108
1109         [HTMLTemplateElement] prevent the parser from removing nodes from the content when the foster agency is processing formatting elements
1110         https://bugs.webkit.org/show_bug.cgi?id=108377
1111
1112         Reviewed by Adam Barth.
1113
1114         https://dvcs.w3.org/hg/webcomponents/raw-file/50ce1f368c1a/spec/templates/index.html#in-body-addition
1115
1116         callTheAdoptionAgency now appends to the template's content when it previously would have appended to the template element itself.
1117
1118         New test added to html5lib.
1119
1120         * dom/ContainerNode.cpp:
1121         (WebCore::ContainerNode::parserInsertBefore):
1122         (WebCore::ContainerNode::parserAppendChild):
1123         * html/parser/HTMLTreeBuilder.cpp:
1124         (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
1125
1126 2013-01-30  Mark Lam  <mark.lam@apple.com>
1127
1128         DatabaseContext should implement ThreadSafeRefCounted.
1129         https://bugs.webkit.org/show_bug.cgi?id=108285.
1130
1131         Reviewed by Alexey Proskuryakov.
1132
1133         DatabaseManager::interruptAllDatabasesForContext() can ref a
1134         DatabaseContext from another thread. Hence, the DatabaseContext needs
1135         to be a ThreadSafeRefCounted instead of a RefCounted.
1136
1137         No new tests.
1138
1139         * Modules/webdatabase/DatabaseContext.h:
1140
1141 2013-01-30  Kentaro Hara  <haraken@chromium.org>
1142
1143         Implement WheelEvent constructor
1144         https://bugs.webkit.org/show_bug.cgi?id=108303
1145
1146         Reviewed by Adam Barth.
1147
1148         Editor's draft: https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm
1149
1150         This patch implements UIEvent constructor under a DOM4_EVENTS_CONSTRUCTOR flag,
1151         which is enabled on Chromium and Safari.
1152
1153         Test: fast/events/constructors/wheel-event-constructor.html
1154
1155         * dom/WheelEvent.cpp:
1156         (WebCore::WheelEventInit::WheelEventInit):
1157         (WebCore):
1158         (WebCore::WheelEvent::WheelEvent):
1159         (WebCore::WheelEvent::initWheelEvent):
1160         * dom/WheelEvent.h:
1161         (WheelEventInit):
1162         (WebCore):
1163         (WheelEvent):
1164         (WebCore::WheelEvent::create):
1165         (WebCore::WheelEvent::wheelDelta):
1166         (WebCore::WheelEvent::wheelDeltaX):
1167         (WebCore::WheelEvent::wheelDeltaY):
1168         (WebCore::WheelEvent::rawDeltaX):
1169         (WebCore::WheelEvent::rawDeltaY):
1170         (WebCore::WheelEvent::granularity):
1171         (WebCore::WheelEvent::webkitDirectionInvertedFromDevice):
1172         (WebCore::WheelEvent::isHorizontal):
1173         * dom/WheelEvent.idl:
1174
1175 2013-01-30  Julien Chaffraix  <jchaffraix@webkit.org>
1176
1177         [CSS Grid Layout] Support 'auto' sized grid items
1178         https://bugs.webkit.org/show_bug.cgi?id=103332
1179
1180         Reviewed by Tony Chang.
1181
1182         Tests: fast/css-grid-layout/auto-content-resolution-columns.html
1183                fast/css-grid-layout/auto-content-resolution-rows.html
1184
1185         The specification interprets 'auto' as minmax(min-content, max-content).
1186         Because we stored the grid definitions as an 'auto' length, we wouldn't
1187         handle it properly during layout.
1188
1189         This change makes us do the translation when we query the information for
1190         layout.
1191
1192         * rendering/style/GridTrackSize.h:
1193         (WebCore::GridTrackSize::minTrackBreadth):
1194         (WebCore::GridTrackSize::maxTrackBreadth):
1195         Translate 'auto' to minmax(min-content, max-content). This works as getComputedStyle
1196         still sees the GridTrackSize as a single length and thus query length() instead of the
1197         individual component of minmax().
1198
1199 2013-01-30  Alec Flett  <alecflett@chromium.org>
1200
1201         IndexedDB: Avoid crashing when deleting indexes
1202         https://bugs.webkit.org/show_bug.cgi?id=108356
1203
1204         Reviewed by Tony Chang.
1205
1206         It is reasonable that the backend aborts a transaction before
1207         the frontend is aware, depending on the timing of events. This
1208         allows the transactionId to be invalid rather than asserting.
1209
1210         Test: storage/indexeddb/createIndex-after-failure.html
1211
1212         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
1213         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
1214         (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
1215         (WebCore::IDBDatabaseBackendImpl::createIndex):
1216         (WebCore::IDBDatabaseBackendImpl::deleteIndex):
1217         (WebCore::IDBDatabaseBackendImpl::get):
1218         (WebCore::IDBDatabaseBackendImpl::put):
1219         (WebCore::IDBDatabaseBackendImpl::setIndexKeys):
1220         (WebCore::IDBDatabaseBackendImpl::setIndexesReady):
1221         (WebCore::IDBDatabaseBackendImpl::openCursor):
1222         (WebCore::IDBDatabaseBackendImpl::count):
1223         (WebCore::IDBDatabaseBackendImpl::deleteRange):
1224         (WebCore::IDBDatabaseBackendImpl::clear):
1225
1226 2013-01-30  Kentaro Hara  <haraken@chromium.org>
1227
1228         isSameAsCurrentState() should take SerializedScriptValue* instead of PassRefPtr
1229         https://bugs.webkit.org/show_bug.cgi?id=107904
1230
1231         Reviewed by Darin Adler.
1232
1233         Applied Darin's comment: https://bugs.webkit.org/show_bug.cgi?id=107904#c5
1234
1235         No tests. No change in behavior.
1236
1237         * bindings/js/JSPopStateEventCustom.cpp:
1238         (WebCore::JSPopStateEvent::state):
1239         * bindings/v8/custom/V8PopStateEventCustom.cpp:
1240         (WebCore::V8PopStateEvent::stateAccessorGetter):
1241         * page/History.cpp:
1242         (WebCore::History::isSameAsCurrentState):
1243         * page/History.h:
1244         (History):
1245
1246 2013-01-30  Douglas Stockwell  <dstockwell@chromium.org>
1247
1248         Remove unnecessary setAnimating() method
1249         https://bugs.webkit.org/show_bug.cgi?id=107495
1250
1251         Reviewed by Dean Jackson.
1252
1253         The corresponding accessor and uses were removed in r39211.
1254
1255         No new tests: no change in behaviour.
1256
1257         * page/animation/AnimationBase.cpp:
1258         (WebCore::AnimationBase::AnimationBase):
1259         * page/animation/AnimationBase.h:
1260         (AnimationBase):
1261         * page/animation/CompositeAnimation.cpp:
1262         * page/animation/CompositeAnimation.h:
1263         * page/animation/ImplicitAnimation.cpp:
1264         (WebCore::ImplicitAnimation::animate):
1265         * page/animation/KeyframeAnimation.cpp:
1266         (WebCore::KeyframeAnimation::animate):
1267
1268 2013-01-30  Elliott Sprehn  <esprehn@chromium.org>
1269
1270         Clean up interface to ShadowRoot
1271         https://bugs.webkit.org/show_bug.cgi?id=108300
1272
1273         Reviewed by Dimitri Glazkov.
1274
1275         Lots of general clean up to ShadowRoot removing unused headers and forward
1276         declarations, moving short inline methods into the class definition so it's
1277         easier to understand what methods do what, and replacing macros with methods
1278         with inline methods.
1279
1280         No new tests, just refactoring.
1281
1282         * dom/ElementShadow.cpp:
1283         (WebCore::ElementShadow::addShadowRoot):
1284         (WebCore::ElementShadow::removeAllShadowRoots):
1285         * dom/ShadowRoot.cpp:
1286         (WebCore::ShadowRoot::ShadowRoot):
1287         (WebCore::ShadowRoot::setInnerHTML): Use isOrphan instead of macro.
1288         (WebCore::ShadowRoot::setApplyAuthorStyles): Use isOrphan instead of macro.
1289         (WebCore::ShadowRoot::setResetStyleInheritance): Use isOrphan instead of macro.
1290         (WebCore::ShadowRoot::childrenChanged): Use isOrphan instead of macro.
1291         * dom/ShadowRoot.h:
1292         (WebCore::ShadowRoot::setHost): Removed.
1293         (WebCore::ShadowRoot::host):
1294         (WebCore::ShadowRoot::owner):
1295         (ShadowRoot):
1296         (WebCore::ShadowRoot::isOrphan): Replacement of GuardOrphanShadowRoot macro.
1297
1298 2013-01-30  Ryosuke Niwa  <rniwa@webkit.org>
1299
1300         Apple's internal PLT test suite doesn't finish after r141136
1301         https://bugs.webkit.org/show_bug.cgi?id=108380
1302
1303         Reviewed by Alexey Proskuryakov.
1304
1305         Temporarily disable the feature to see if that fixes it.
1306
1307         * loader/cache/CachedResourceLoader.cpp:
1308         (WebCore::CachedResourceLoader::requestResource):
1309
1310 2013-01-30  Florin Malita  <fmalita@chromium.org>
1311
1312         [Chromium] Unreviewed gardening.
1313
1314         Attempted Mac build fix after http://trac.webkit.org/changeset/141291.
1315
1316         * platform/graphics/harfbuzz/HarfBuzzFaceCoreText.cpp:
1317         (WebCore::harfBuzzCoreTextGetFontFuncs):
1318
1319 2013-01-30  Philip Rogers  <pdr@google.com>
1320
1321         Track scale and zoom together when drawing SVG images
1322         https://bugs.webkit.org/show_bug.cgi?id=108108
1323
1324         Reviewed by Tim Horton.
1325
1326         This patch refactors SVGImage::drawSVGToImageBuffer to take a single zoomAndScale parameter
1327         and removes two messy calls to setPageZoomFactor. This patch makes progress towards an
1328         SVG image cache keyed on just container size and scale.
1329
1330         This refactoring is covered by existing tests.
1331
1332         * loader/cache/CachedImage.cpp:
1333         (WebCore::CachedImage::setContainerSizeForRenderer):
1334         (WebCore::CachedImage::imageSizeForRenderer):
1335
1336             This complex logic has been refactored out of CachedImage and into SVGImageCache.
1337             In addition to the code move, we no longer divide by the zoom factor because the
1338             container size is stored without zoom.
1339
1340         * svg/graphics/SVGImage.cpp:
1341         (WebCore::SVGImage::drawSVGToImageBuffer):
1342
1343             This method signature has changed to take a FloatSize for the container size and
1344             a combined zoom and scale parameter (zoomAndScale). A FloatSize is needed for the
1345             container size because we now store the container size unzoomed, and in this process
1346             we do not want to lose precision.
1347
1348             The messy setPageZoomFactor calls have also been removed which cleans this function up.
1349
1350         * svg/graphics/SVGImage.h:
1351         * svg/graphics/SVGImageCache.cpp:
1352         (WebCore::SVGImageCache::setContainerSizeForRenderer):
1353
1354             This function now stores the container size unzoomed. The container size was changed
1355             to a FloatSize so that precision is not lost.
1356
1357         (WebCore::SVGImageCache::imageSizeForRenderer):
1358
1359             Note that the ImageBuffer size will stay the same. We now store the size as:
1360                 containerSize (without zoom) * zoom * scale
1361             Previously this was:
1362                 containerSize (with zoom) * scale
1363
1364         (WebCore::SVGImageCache::redraw):
1365         (WebCore::SVGImageCache::lookupOrCreateBitmapImageForRenderer):
1366         * svg/graphics/SVGImageCache.h:
1367         (WebCore::SVGImageCache::SizeAndScales::SizeAndScales):
1368         (SizeAndScales):
1369         (SVGImageCache):
1370
1371 2013-01-30  Benjamin Poulain  <benjamin@webkit.org>
1372
1373         Do not convert to String->AtomicString for NamedNodeMap
1374         https://bugs.webkit.org/show_bug.cgi?id=108289
1375
1376         Reviewed by Kentaro Hara.
1377
1378         NamedNodeMap's API was taking a WTF::String. Internally, attribute
1379         names are AtomicString.
1380
1381         The conversions String->AtomicString was causing an additional ref-deref
1382         for the JS/V8 bindings. And could cause an additional memory allocation for the Objective-C
1383         bindings.
1384
1385         This patch changes the API to use AtomicString, and update the custom bindings accordingly.
1386
1387         * bindings/js/JSNamedNodeMapCustom.cpp:
1388         (WebCore::JSNamedNodeMap::canGetItemsForName):
1389         (WebCore::JSNamedNodeMap::nameGetter):
1390         * bindings/v8/custom/V8NamedNodeMapCustom.cpp:
1391         (WebCore::V8NamedNodeMap::namedPropertyGetter):
1392         * dom/NamedNodeMap.cpp:
1393         (WebCore::NamedNodeMap::getNamedItem):
1394         (WebCore::NamedNodeMap::getNamedItemNS):
1395         (WebCore::NamedNodeMap::removeNamedItem):
1396         (WebCore::NamedNodeMap::removeNamedItemNS):
1397         * dom/NamedNodeMap.h:
1398         (NamedNodeMap):
1399
1400 2013-01-30  Zan Dobersek  <zdobersek@igalia.com>
1401
1402         [GTK] http/tests/w3c/webperf/submission/Intel/user-timing/test_user_timing_entry_type.html is failing
1403         https://bugs.webkit.org/show_bug.cgi?id=108100
1404
1405         Reviewed by Tony Gentilcore.
1406
1407         Similarly to the changes to V8 bindings in r140882, wrap the PerformanceEntry
1408         as a PerformanceMark or PerformanceMeasure if possible.
1409
1410         No new tests - the relevant test now passes.
1411
1412         * bindings/js/JSPerformanceEntryCustom.cpp:
1413         (WebCore::toJS):
1414
1415 2013-01-30  Adam Klein  <adamk@chromium.org>
1416
1417         [JSC] MutationObservers should not create circular, leaky references
1418         https://bugs.webkit.org/show_bug.cgi?id=93661
1419
1420         Reviewed by Adam Barth.
1421
1422         This patch makes JSMutationCallback an entirely-custom class that
1423         holds a weak reference to the function it wraps. To keep that function
1424         alive, it also adds a PrivateName between the JSMutationObserver
1425         wrapper and the function when the MutationObserver is constructed.
1426
1427         Unlike the generated JSC callbacks, JSMutationCallback doesn't hold a
1428         reference to the JSDOMGlobalObject, instead holding the
1429         DOMWrapperWorld it was created in. As an ActiveDOMCallback, it also
1430         holds a weak pointer to ScriptExecutionContext (via ContextDestructionObserver).
1431
1432         It's not clear to me how to write a test for this. There's an existing
1433         manual test in ManualTests/leak-cycle-observer-wrapper.html which may
1434         be of use but which doesn't seem to currently give meaningful output.
1435
1436         * CMakeLists.txt:
1437         * DerivedSources.cpp:
1438         * DerivedSources.make:
1439         * DerivedSources.pri:
1440         * GNUmakefile.list.am:
1441         * Target.pri:
1442         * UseJSC.cmake:
1443         * WebCore.gypi:
1444         * WebCore.vcproj/WebCore.vcproj:
1445         * WebCore.vcxproj/WebCore.vcxproj:
1446         * WebCore.vcxproj/WebCore.vcxproj.filters:
1447         * WebCore.xcodeproj/project.pbxproj:
1448         * bindings/js/JSBindingsAllInOne.cpp:
1449         * bindings/js/JSMutationCallback.cpp: Added.
1450         (WebCore):
1451         (WebCore::JSMutationCallback::JSMutationCallback):
1452         (WebCore::JSMutationCallback::~JSMutationCallback):
1453         (WebCore::JSMutationCallback::handleEvent):
1454         * bindings/js/JSMutationCallback.h: Added.
1455         (WebCore):
1456         (JSMutationCallback): Instead of a JSCallbackData, hold a weak ref to the callback and a RefPtr to the DOMWrapperWorld.
1457         (WebCore::JSMutationCallback::create):
1458         * bindings/js/JSMutationCallbackCustom.cpp: Removed.
1459         * bindings/js/JSMutationObserverCustom.cpp:
1460         (WebCore::JSMutationObserverConstructor::constructJSMutationObserver):
1461         When constructing the JSMutationObserver, add a reference via PrivateName from the MutationObserver to the callback function.
1462         * dom/MutationCallback.idl: Removed. Neither JSC nor V8 use an IDL file to generate this class any more.
1463
1464 2013-01-30  Elliott Sprehn  <esprehn@chromium.org>
1465
1466         Remove willAddAuthorShadowRoot and replace with alwaysCreateUserAgentShadowRoot
1467         https://bugs.webkit.org/show_bug.cgi?id=108248
1468
1469         Reviewed by Dimitri Glazkov.
1470
1471         The only reason willAddAuthorShadowRoot exists is so that a handful of
1472         other elements can create the user agent shadow root right before the
1473         author shadow root is created. Instead of providing this generic hook
1474         just expose a virtual method on Element that requests this behavior.
1475
1476         No new tests, just refactoring.
1477
1478         * dom/Element.cpp:
1479         (WebCore::Element::createShadowRoot):
1480         * dom/Element.h:
1481         (Element):
1482         (WebCore::Element::alwaysCreateUserAgentShadowRoot): Added.
1483         * dom/ElementShadow.cpp:
1484         (WebCore::ElementShadow::addShadowRoot): Remove willAddAuthorShadowRoot notification.
1485         * html/HTMLButtonElement.cpp:
1486         * html/HTMLButtonElement.h:
1487         * html/HTMLFormControlElement.cpp:
1488         * html/HTMLFormControlElement.h:
1489         * html/HTMLMediaElement.cpp:
1490         * html/HTMLMediaElement.h:
1491
1492 2013-01-30  Dominik Röttsches  <dominik.rottsches@intel.com>
1493
1494         [HarfBuzz] Naming fixes after removing old HarfBuzz code
1495         https://bugs.webkit.org/show_bug.cgi?id=108170
1496
1497         Reviewed by Tony Chang.
1498
1499         Since the old harfbuzz code is gone in r141241, it makes sense to get rid
1500         of the now unnecessray NG suffix in a number of places. While at it,
1501         I am also fixing some naming inconsistencies.
1502
1503         Renamed all occurences of HarfBuzzNG* to HarfBuzz*,
1504         renamed lowercase variants of harfbuzz* in variable and function names to camel-case harfBuzz*,
1505         moved files in platform/graphics/harfbuzz/ng/* one level up and removed ng folder.
1506         Updated corresponding entries in Chromium, GTK and EFL build system files.
1507
1508         No new tests, no change in behavior.
1509
1510         * GNUmakefile.list.am:
1511         * PlatformEfl.cmake:
1512         * WebCore.gyp/WebCore.gyp:
1513         * WebCore.gypi:
1514         * platform/graphics/FontPlatformData.cpp:
1515         * platform/graphics/FontPlatformData.h:
1516         (WebCore):
1517         (FontPlatformData):
1518         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
1519         (WebCore::FontPlatformData::platformDataInit):
1520         (WebCore::FontPlatformData::platformDataAssign):
1521         (WebCore::FontPlatformData::harfBuzzFace):
1522         * platform/graphics/freetype/FontPlatformData.h:
1523         (FontPlatformData):
1524         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
1525         (WebCore::FontPlatformData::operator=):
1526         (WebCore::FontPlatformData::FontPlatformData):
1527         (WebCore::FontPlatformData::harfBuzzFace):
1528         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
1529         (WebCore::FontPlatformData::FontPlatformData):
1530         (WebCore::FontPlatformData::operator=):
1531         (WebCore::FontPlatformData::harfBuzzFace):
1532         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h:
1533         (WebCore):
1534         (FontPlatformData):
1535         * platform/graphics/harfbuzz/HarfBuzzFace.cpp: Renamed from Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzNGFace.cpp.
1536         (WebCore):
1537         (FaceCacheEntry):
1538         (WebCore::FaceCacheEntry::create):
1539         (WebCore::FaceCacheEntry::~FaceCacheEntry):
1540         (WebCore::FaceCacheEntry::face):
1541         (WebCore::FaceCacheEntry::glyphCache):
1542         (WebCore::FaceCacheEntry::FaceCacheEntry):
1543         (WebCore::harfBuzzFaceCache):
1544         (WebCore::HarfBuzzFace::HarfBuzzFace):
1545         (WebCore::HarfBuzzFace::~HarfBuzzFace):
1546         (WebCore::findScriptForVerticalGlyphSubstitution):
1547         (WebCore::HarfBuzzFace::setScriptForVerticalGlyphSubstitution):
1548         * platform/graphics/harfbuzz/HarfBuzzFace.h: Renamed from Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h.
1549         (WebCore):
1550         (HarfBuzzFace):
1551         (WebCore::HarfBuzzFace::create):
1552         * platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp: Renamed from Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzNGFaceCairo.cpp.
1553         (WebCore):
1554         (CairoFtFaceLocker):
1555         (WebCore::CairoFtFaceLocker::CairoFtFaceLocker):
1556         (WebCore::CairoFtFaceLocker::lock):
1557         (WebCore::CairoFtFaceLocker::~CairoFtFaceLocker):
1558         (WebCore::floatToHarfBuzzPosition):
1559         (WebCore::doubleToHarfBuzzPosition):
1560         (WebCore::CairoGetGlyphWidthAndExtents):
1561         (WebCore::harfBuzzGetGlyph):
1562         (WebCore::harfBuzzGetGlyphHorizontalAdvance):
1563         (WebCore::harfBuzzGetGlyphHorizontalOrigin):
1564         (WebCore::harfBuzzGetGlyphExtents):
1565         (WebCore::harfBuzzCairoTextGetFontFuncs):
1566         (WebCore::harfBuzzCairoGetTable):
1567         (WebCore::HarfBuzzFace::createFace):
1568         (WebCore::HarfBuzzFace::createFont):
1569         (WebCore::HarfBuzzShaper::createGlyphBufferAdvance):
1570         * platform/graphics/harfbuzz/HarfBuzzFaceCoreText.cpp: Renamed from Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzNGFaceCoreText.cpp.
1571         (WebCore):
1572         (WebCore::floatToHarfBuzzPosition):
1573         (WebCore::getGlyph):
1574         (WebCore::getGlyphHorizontalAdvance):
1575         (WebCore::getGlyphHorizontalOrigin):
1576         (WebCore::getGlyphExtents):
1577         (WebCore::harfbuzzCoreTextGetFontFuncs):
1578         (WebCore::releaseTableData):
1579         (WebCore::harfBuzzCoreTextGetTable):
1580         (WebCore::HarfBuzzFace::createFace):
1581         (WebCore::HarfBuzzFace::createFont):
1582         (WebCore::HarfBuzzShaper::createGlyphBufferAdvance):
1583         * platform/graphics/harfbuzz/HarfBuzzFaceSkia.cpp: Renamed from Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzNGFaceSkia.cpp.
1584         (WebCore):
1585         (WebCore::HarfBuzzFontData::HarfBuzzFontData):
1586         (HarfBuzzFontData):
1587         (WebCore::SkiaScalarToHarfBuzzPosition):
1588         (WebCore::SkiaGetGlyphWidthAndExtents):
1589         (WebCore::harfBuzzGetGlyph):
1590         (WebCore::harfBuzzGetGlyphHorizontalAdvance):
1591         (WebCore::harfBuzzGetGlyphHorizontalOrigin):
1592         (WebCore::harfBuzzGetGlyphExtents):
1593         (WebCore::harfBuzzSkiaGetFontFuncs):
1594         (WebCore::harfBuzzSkiaGetTable): Also fixed style checker whitespace complaint / indentation.
1595         (WebCore::destroyHarfBuzzFontData):
1596         (WebCore::HarfBuzzFace::createFace):
1597         (WebCore::HarfBuzzFace::createFont):
1598         (WebCore::HarfBuzzShaper::createGlyphBufferAdvance):
1599         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp: Renamed from Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp.
1600         (WebCore):
1601         (HarfBuzzScopedPtr):
1602         (WebCore::HarfBuzzScopedPtr::HarfBuzzScopedPtr):
1603         (WebCore::HarfBuzzScopedPtr::~HarfBuzzScopedPtr):
1604         (WebCore::HarfBuzzScopedPtr::get):
1605         (WebCore::harfBuzzPositionToFloat):
1606         (WebCore::HarfBuzzShaper::HarfBuzzRun::HarfBuzzRun):
1607         (WebCore::HarfBuzzShaper::HarfBuzzRun::applyShapeResult):
1608         (WebCore::HarfBuzzShaper::HarfBuzzRun::setGlyphAndPositions):
1609         (WebCore::HarfBuzzShaper::HarfBuzzRun::characterIndexForXPosition):
1610         (WebCore::HarfBuzzShaper::HarfBuzzRun::xPositionForOffset):
1611         (WebCore::normalizeCharacters):
1612         (WebCore::HarfBuzzShaper::HarfBuzzShaper):
1613         (WebCore::HarfBuzzShaper::~HarfBuzzShaper):
1614         (WebCore::HarfBuzzShaper::setDrawRange):
1615         (WebCore::HarfBuzzShaper::setFontFeatures):
1616         (WebCore::HarfBuzzShaper::shape):
1617         (WebCore::HarfBuzzShaper::adjustStartPoint):
1618         (WebCore::HarfBuzzShaper::collectHarfBuzzRuns):
1619         (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns):
1620         (WebCore::HarfBuzzShaper::setGlyphPositionsForHarfBuzzRun):
1621         (WebCore::HarfBuzzShaper::fillGlyphBufferFromHarfBuzzRun):
1622         (WebCore::HarfBuzzShaper::fillGlyphBuffer):
1623         (WebCore::HarfBuzzShaper::offsetForPosition):
1624         (WebCore::HarfBuzzShaper::selectionRect):
1625         * platform/graphics/harfbuzz/HarfBuzzShaper.h: Renamed from Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzShaper.h.
1626         (WebCore):
1627         (HarfBuzzShaper):
1628         (WebCore::HarfBuzzShaper::totalWidth):
1629         (HarfBuzzRun):
1630         (WebCore::HarfBuzzShaper::HarfBuzzRun::create):
1631         (WebCore::HarfBuzzShaper::HarfBuzzRun::setWidth):
1632         (WebCore::HarfBuzzShaper::HarfBuzzRun::fontData):
1633         (WebCore::HarfBuzzShaper::HarfBuzzRun::startIndex):
1634         (WebCore::HarfBuzzShaper::HarfBuzzRun::numCharacters):
1635         (WebCore::HarfBuzzShaper::HarfBuzzRun::numGlyphs):
1636         (WebCore::HarfBuzzShaper::HarfBuzzRun::glyphs):
1637         (WebCore::HarfBuzzShaper::HarfBuzzRun::advances):
1638         (WebCore::HarfBuzzShaper::HarfBuzzRun::offsets):
1639         (WebCore::HarfBuzzShaper::HarfBuzzRun::glyphToCharacterIndexes):
1640         (WebCore::HarfBuzzShaper::HarfBuzzRun::width):
1641         (WebCore::HarfBuzzShaper::HarfBuzzRun::rtl):
1642         (WebCore::HarfBuzzShaper::HarfBuzzRun::script):
1643
1644 2013-01-30  Tony Chang  <tony@chromium.org>
1645
1646         REGRESSION(r136324): Flexbox should relayout flex children when width changes
1647         https://bugs.webkit.org/show_bug.cgi?id=108231
1648
1649         Reviewed by Ojan Vafai.
1650
1651         If the width of a block changes, we need to set relayoutChildren = true
1652         to relayout the children. This broke when we optimized the layout calls
1653         in layoutAndPlaceChildren.
1654
1655         Test: css3/flexbox/width-change-and-relayout-children.html
1656
1657         * rendering/RenderFlexibleBox.cpp:
1658         (WebCore::RenderFlexibleBox::layoutBlock): Also reorder the code to match RenderBlock.
1659         The bug fix is to use updateLogicalWidthAndColumnWidth() and its return value to set
1660         relayoutChildren = true.
1661
1662 2013-01-30  Tim Horton  <timothy_horton@apple.com>
1663
1664         GraphicsContext3DCG needs to copy image data in paintToCanvas
1665         https://bugs.webkit.org/show_bug.cgi?id=108310
1666
1667         Reviewed by Simon Fraser.
1668
1669         Make the CG implementation of GraphicsContext3D::paintToCanvas copy image data
1670         before drawing if we're drawing into an accelerated context, matching the fix made
1671         in http://trac.webkit.org/changeset/106095 for 2D canvas.
1672
1673         No new tests, depends on acceleration and would be flaky at best.
1674
1675         * platform/graphics/GraphicsContext3D.h:
1676         (GraphicsContext3D): Make CG's paintToCanvas take a GraphicsContext instead of a CGContextRef.
1677         * platform/graphics/cg/GraphicsContext3DCG.cpp:
1678         (WebCore::releaseImageData): Added.
1679         (WebCore::GraphicsContext3D::paintToCanvas): Copy image data if the destination is
1680         an accelerated context. Also, use GraphicsContext API instead of CGContext.
1681         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1682         (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
1683
1684 2013-01-29  Jer Noble  <jer.noble@apple.com>
1685
1686         MediaPlayerPrivateQTKit claims it supports application/x-diskcopy, breaking downloads.
1687         https://bugs.webkit.org/show_bug.cgi?id=108237
1688
1689         Reviewed by Eric Carlson.
1690
1691         Disclaim any non-'video/' or 'audio/' types which QTKit purports to support.
1692
1693         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1694         (WebCore::addFileTypesToCache):
1695
1696 2013-01-30  Florin Malita  <fmalita@chromium.org>
1697
1698         Do not restart the matched properties cache timer if active
1699         https://bugs.webkit.org/show_bug.cgi?id=108345
1700
1701         Reviewed by Andreas Kling.
1702
1703         StyleResolver::addToMatchedPropertiesCache() keeps resetting the timer as more than
1704         matchedDeclarationCacheAdditionsBetweenSweeps entries are added. When armed, we should let
1705         the timer expire at its scheduled time - otherwise it may never get a chance to fire if
1706         entries keep getting added.
1707
1708         No new tests. This is a long lived timer (1min) which makes testing impractical.
1709
1710         * css/StyleResolver.cpp:
1711         (WebCore::StyleResolver::addToMatchedPropertiesCache):
1712
1713 2013-01-30  Simon Fraser  <simon.fraser@apple.com>
1714
1715         Temporarily disable assertions related to clip rect computation in RenderLayer
1716         https://bugs.webkit.org/show_bug.cgi?id=108265
1717
1718         Reviewed by Dean Jackson.
1719
1720         These assertions are killing the test bots, so disable them temporarily
1721         until we figure out the underlying bug (tracked by https://bugs.webkit.org/show_bug.cgi?id=103432).
1722
1723         * rendering/RenderLayer.cpp:
1724         (WebCore::RenderLayer::updateLayerPositionsAfterScroll):
1725
1726 2013-01-30  Elliott Sprehn  <esprehn@chromium.org>
1727
1728         Element::areAuthorShadowsAllowed should be private
1729         https://bugs.webkit.org/show_bug.cgi?id=108298
1730
1731         Reviewed by Darin Adler.
1732
1733         There's no reason for areAuthorShadowsAllowed to be exposed publically
1734         on Element since it just controls the behavior of createShadowRoot. Make
1735         it private and fix all places where it wasn't in subclasses.
1736
1737         No new tests, just refactoring.
1738
1739         * dom/Element.h:
1740         (WebCore::Element::areAuthorShadowsAllowed): Made private.
1741         * html/HTMLFrameElementBase.h:
1742         (HTMLFrameElementBase):
1743         * html/HTMLInputElement.h:
1744         (HTMLInputElement):
1745         * html/HTMLMediaElement.h:
1746         (HTMLMediaElement):
1747         * html/HTMLPlugInElement.h:
1748         (HTMLPlugInElement):
1749         * svg/SVGElement.h:
1750         (SVGElement):
1751
1752 2013-01-30  Eugene Klyuchnikov  <eustas@chromium.org>
1753
1754         Web Inspector: Script Profiler: Make profiler output typed.
1755         https://bugs.webkit.org/show_bug.cgi?id=102792
1756
1757         Reviewed by Yury Semikhatsky.
1758
1759         Currently fields "head" and "bottomUpHead" of Profile object
1760         returned by Profiler.getCPUProfile is untyped (type = object).
1761
1762         That's not good both for client side (protocol users may
1763         only guess on output content) and backend side (field names
1764         are hardcoded in source code).
1765
1766         This patch defines "head" and "bottomUpHead" to be of new
1767         "CPUProfileNode" type and updates serialization code to use
1768         builders to create output.
1769
1770         * bindings/js/ScriptProfile.cpp: Used buiders for serialization.
1771         * bindings/js/ScriptProfile.h: Ditto.
1772         * bindings/v8/ScriptProfile.cpp: Ditto.
1773         * bindings/v8/ScriptProfile.h: Ditto.
1774         * inspector/Inspector.json: Added and used new ProfileNode type.
1775
1776 2013-01-30  Yury Semikhatsky  <yurys@chromium.org>
1777
1778         Web Inspector: remove NativeHeapGraph.js
1779         https://bugs.webkit.org/show_bug.cgi?id=108342
1780
1781         Reviewed by Pavel Feldman.
1782
1783         NativeHeapGraph.js was removed as NativeHeapSnapshot.js provides more
1784         features and shares its implementation with JSHeapSnapshot.
1785
1786         * WebCore.gypi:
1787         * WebCore.vcproj/WebCore.vcproj:
1788         * inspector/compile-front-end.py:
1789         * inspector/front-end/NativeHeapGraph.js: Removed.
1790         * inspector/front-end/NativeMemorySnapshotView.js:
1791         (WebInspector.NativeSnapshotProfileType.prototype.buttonClicked.didReceiveMemorySnapshot):
1792         (WebInspector.NativeSnapshotProfileType.prototype.buttonClicked):
1793         (WebInspector.NativeSnapshotProfileHeader.prototype.startSnapshotTransfer):
1794         * inspector/front-end/ProfilesPanel.js:
1795         * inspector/front-end/WebKit.qrc:
1796
1797 2013-01-30  Vladislav Kaznacheev  <kaznacheev@chromium.org>
1798
1799         Web Inspector: Sidebar splitter is invisible in Elements and Sources panels
1800         https://bugs.webkit.org/show_bug.cgi?id=108331
1801
1802         Reviewed by Pavel Feldman.
1803
1804         This was a regression caused by https://bugs.webkit.org/show_bug.cgi?id=108181.
1805         The splitter element did not get the correct class at the initialization.
1806
1807         * inspector/front-end/SidebarView.js:
1808         (WebInspector.SidebarView):
1809         (WebInspector.SidebarView.prototype._updateSidebarPosition):
1810
1811 2013-01-30  Dmitry Zvorygin  <zvorygin@chromium.org>
1812
1813         Web Inspector: Filters on Console panel
1814         https://bugs.webkit.org/show_bug.cgi?id=107813
1815
1816         The problem is that third-party libraries may spam javascript console with internal
1817         messages. Now there's filter context-menu option, which allows to hide/show messages
1818         sent from specific scripts or urls.
1819
1820         Reviewed by Pavel Feldman.
1821
1822         * English.lproj/localizedStrings.js:
1823         * inspector/front-end/ConsoleMessage.js:
1824         (WebInspector.ConsoleMessageImpl.prototype.appendUndefined):
1825         (WebInspector.ConsoleMessageImpl.prototype._printArray):
1826         (WebInspector.ConsoleMessageImpl.prototype._highlightSearchResultsInElement):
1827         * inspector/front-end/ConsolePanel.js:
1828         (WebInspector.ConsolePanel.prototype.performSearch):
1829         * inspector/front-end/ConsoleView.js:
1830         (WebInspector.ConsoleView.get this):
1831         (WebInspector.ConsoleView.prototype._consoleMessageAdded):
1832         (WebInspector.ConsoleView.prototype._appendConsoleMessage):
1833         (WebInspector.ConsoleView.prototype._consoleCleared):
1834         (WebInspector.ConsoleView.prototype._handleContextMenuEvent.get var):
1835         (WebInspector.ConsoleView.prototype._handleContextMenuEvent.set get contextMenu):
1836         (WebInspector.ConsoleView.prototype._shouldBeVisible):
1837         (WebInspector.ConsoleView.prototype._updateMessageList):
1838         (WebInspector.ConsoleGroup.prototype.addMessage):
1839         * inspector/front-end/ContextMenu.js:
1840         (WebInspector.ContextMenuItem.prototype.isEnabled):
1841         (WebInspector.ContextMenuItem.prototype.setEnabled):
1842         * inspector/front-end/Settings.js:
1843
1844 2013-01-20  Philippe Normand  <pnormand@igalia.com>
1845
1846         [GStreamer] USE(NATIVE_FULLSCREEN_VIDEO) support
1847         https://bugs.webkit.org/show_bug.cgi?id=106760
1848
1849         Reviewed by Gustavo Noronha Silva.
1850
1851         Initial support for NATIVE_FULLSCREEN_VIDEO in the GStreamer media
1852         player. A new FullscreenVideoControllerGStreamer class is
1853         introduced, ports interested to implement native fullscreen video
1854         support should inherit from it (see FullscreenVideoControllerGtk)
1855         and hook it in the MediaPlayerPrivateGStreamer backend.
1856
1857         The GStreamerGWorld port to GStreamer 1.x is partly based on a
1858         patch by Sebastian Dröge <sebastian.droge@collabora.com>.
1859
1860         * GNUmakefile.am: Enable NATIVE_FULLSCREEN_VIDEO support.
1861         * GNUmakefile.list.am: New
1862         FullscreenVideoController{GStreamer,Gtk} modules.
1863         * platform/graphics/gstreamer/FullscreenVideoControllerGStreamer.cpp: Added.
1864         (WebCore):
1865         (WebCore::playerVolumeChangedCallback): Playbin notify::volume
1866         signal callback.
1867         (WebCore::playerMuteChangedCallback): Playbin notify::mute signal callback.
1868         (WebCore::FullscreenVideoControllerGStreamer::FullscreenVideoControllerGStreamer):
1869         (WebCore::FullscreenVideoControllerGStreamer::~FullscreenVideoControllerGStreamer):
1870         (WebCore::FullscreenVideoControllerGStreamer::enterFullscreen):
1871         Switch GStreamerGWorld to full screen, hook in to playbin's
1872         notify::volume and mute signals and initialize the full screen window.
1873         (WebCore::FullscreenVideoControllerGStreamer::exitFullscreen):
1874         Destroy the full screen window, disconnect from playbin signals
1875         and switch GStreamerGWorld out of full screen.
1876         (WebCore::FullscreenVideoControllerGStreamer::exitOnUserRequest):
1877         Trigger exit from full screen mode. This method is meant to be
1878         called when the user explicitely requests to exit from full screen
1879         by pressing a key or something similar.
1880         (WebCore::FullscreenVideoControllerGStreamer::togglePlay): Switch
1881         between play and pause states. Useful for child classes.
1882         (WebCore::FullscreenVideoControllerGStreamer::increaseVolume):
1883         Useful for child classes as well.
1884         (WebCore::FullscreenVideoControllerGStreamer::decreaseVolume): Ditto.
1885         (WebCore::FullscreenVideoControllerGStreamer::setVolume): Ditto.
1886         (WebCore::FullscreenVideoControllerGStreamer::timeToString): Ditto.
1887         * platform/graphics/gstreamer/FullscreenVideoControllerGStreamer.h: Added.
1888         (WebCore):
1889         (FullscreenVideoControllerGStreamer):
1890         (WebCore::FullscreenVideoControllerGStreamer::playStateChanged):
1891         To be implemented by child class to reflect the player's state changed.
1892         (WebCore::FullscreenVideoControllerGStreamer::volumeChanged): To
1893         be implemented by child class as well.
1894         (WebCore::FullscreenVideoControllerGStreamer::muteChanged): Ditto.
1895         (WebCore::FullscreenVideoControllerGStreamer::initializeWindow): Ditto.
1896         (WebCore::FullscreenVideoControllerGStreamer::destroyWindow): Ditto.
1897         * platform/graphics/gstreamer/GStreamerGWorld.cpp:
1898         (WebCore::gstGWorldSyncMessageCallback): Adapt for GStreamer video
1899         overlay API changes.
1900         (WebCore::GStreamerGWorld::GStreamerGWorld):
1901         gst_bus_set_sync_handler takes one more argument in GStreamer 1.x.
1902         (WebCore::GStreamerGWorld::enterFullscreen): ffmpegcolorspace was
1903         renamed to videoconvert in GStreamer 1.x and the tee src pad
1904         template was renamed to src_%u. There is no need to send a new
1905         segment query either.
1906         (WebCore):
1907         (WebCore::gstGWorldPadProbeCallback): Remove the platform video
1908         sink branch once the tee source pad starting it has been blocked.
1909         (WebCore::GStreamerGWorld::exitFullscreen): Refactor to use an
1910         asynchronous pad probe.
1911         (WebCore::GStreamerGWorld::removePlatformVideoSink): Refactored
1912         from exitFullscreen.
1913         (WebCore::GStreamerGWorld::setWindowOverlay): Adapt for GStreamer video
1914         overlay API changes.
1915         * platform/graphics/gstreamer/GStreamerGWorld.h:
1916         (GStreamerGWorld):
1917         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1918         (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
1919         Hook NATIVE_FULLSCREEN_VIDEO support.
1920         (WebCore::MediaPlayerPrivateGStreamer::volume): Playbin volume
1921         query used by the FullscreenVideoController.
1922         (WebCore):
1923         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1924         (WebCore):
1925         (MediaPlayerPrivateGStreamer): volume(), muted() and MediaPlayer
1926         accessor methods added. NATIVE_FULLSCREEN_VIDEO methods added as well.
1927         (WebCore::MediaPlayerPrivateGStreamer::canEnterFullscreen):
1928         (WebCore::MediaPlayerPrivateGStreamer::mediaPlayer):
1929         * platform/graphics/gstreamer/PlatformVideoWindow.h: Re-enable
1930         module if NATIVE_FULLSCREEN_VIDEO is turned on.
1931         * platform/graphics/gstreamer/PlatformVideoWindowGtk.cpp: Ditto.
1932         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp: Re-enable
1933         GStreamerGWorld support.
1934         (_WebKitVideoSinkPrivate):
1935         (webkitVideoSinkRender):
1936         * platform/graphics/gstreamer/VideoSinkGStreamer.h: Ditto.
1937
1938 2013-01-30  Pavel Feldman  <pfeldman@chromium.org>
1939
1940         Web Inspector: beautify file selector dialog to render as two rows
1941         https://bugs.webkit.org/show_bug.cgi?id=108335
1942
1943         Reviewed by Vsevolod Vlasov.
1944
1945         Go-to-file is now rendered in two rows.
1946
1947         * inspector/front-end/FilteredItemSelectionDialog.js:
1948         (WebInspector.FilteredItemSelectionDialog):
1949         (WebInspector.FilteredItemSelectionDialog.prototype.focus):
1950         (WebInspector.FilteredItemSelectionDialog.prototype.renderAsTwoRows):
1951         (WebInspector.FilteredItemSelectionDialog.prototype._createItemElement):
1952         (WebInspector.OpenResourceDialog.show):
1953         * inspector/front-end/ViewportControl.js:
1954         (WebInspector.ViewportControl):
1955         (WebInspector.ViewportControl.prototype.refresh):
1956         * inspector/front-end/filteredItemSelectionDialog.css:
1957         (.filtered-item-list-dialog > input):
1958         (.filtered-item-list-dialog > div.progress):
1959         (.filtered-item-list-dialog > div.container):
1960         (.filtered-item-list-dialog-item):
1961         (.filtered-item-list-dialog-subtitle):
1962         (.filtered-item-list-dialog-item.one-row .filtered-item-list-dialog-subtitle):
1963         (.filtered-item-list-dialog-item.two-rows):
1964         (.filtered-item-list-dialog-item.selected):
1965         (.filtered-item-list-dialog-item span.highlight):
1966
1967 2013-01-30  Pavel Feldman  <pfeldman@chromium.org>
1968
1969         Web Inspector: migrate file selection dialog to the viewport.
1970         https://bugs.webkit.org/show_bug.cgi?id=108313
1971
1972         Reviewed by Vsevolod Vlasov.
1973
1974         Otherwise it takes too long to render.
1975
1976         * WebCore.gypi:
1977         * WebCore.vcproj/WebCore.vcproj:
1978         * inspector/compile-front-end.py:
1979         * inspector/front-end/FilteredItemSelectionDialog.js:
1980         (WebInspector.FilteredItemSelectionDialog):
1981         (WebInspector.FilteredItemSelectionDialog.prototype.focus):
1982         (WebInspector.FilteredItemSelectionDialog.prototype.onEnter):
1983         (WebInspector.FilteredItemSelectionDialog.prototype._itemsLoaded):
1984         (WebInspector.FilteredItemSelectionDialog.prototype._createItemElement):
1985         (WebInspector.FilteredItemSelectionDialog.prototype._filterItems):
1986         (WebInspector.FilteredItemSelectionDialog.prototype._onKeyDown.updateSelection):
1987         (WebInspector.FilteredItemSelectionDialog.prototype._onKeyDown):
1988         (WebInspector.FilteredItemSelectionDialog.prototype._updateSelection):
1989         (WebInspector.FilteredItemSelectionDialog.prototype._onClick):
1990         (WebInspector.FilteredItemSelectionDialog.prototype._onMouseMove):
1991         (WebInspector.FilteredItemSelectionDialog.prototype.itemCount):
1992         (WebInspector.FilteredItemSelectionDialog.prototype.itemElement):
1993         * inspector/front-end/ViewportControl.js: Added.
1994         (WebInspector.ViewportControl):
1995         (WebInspector.ViewportControl.Provider):
1996         (WebInspector.ViewportControl.Provider.prototype.itemCount):
1997         (WebInspector.ViewportControl.Provider.prototype.itemElement):
1998         (WebInspector.ViewportControl.prototype.contentElement):
1999         (WebInspector.ViewportControl.prototype.refresh):
2000         (WebInspector.ViewportControl.prototype._onScroll):
2001         (WebInspector.ViewportControl.prototype.rowsPerViewport):
2002         (WebInspector.ViewportControl.prototype.firstVisibleIndex):
2003         (WebInspector.ViewportControl.prototype.lastVisibleIndex):
2004         (WebInspector.ViewportControl.prototype.renderedElementAt):
2005         (WebInspector.ViewportControl.prototype.scrollItemIntoView):
2006         * inspector/front-end/WebKit.qrc:
2007         * inspector/front-end/filteredItemSelectionDialog.css:
2008         (.js-outline-dialog .container div.item.selected):
2009         (.js-outline-dialog .container div.item span.highlight):
2010         * inspector/front-end/inspector.html:
2011
2012 2013-01-30  Andrey Lushnikov  <lushnikov@chromium.org>
2013
2014         Web Inspector: implement highlight range API
2015         https://bugs.webkit.org/show_bug.cgi?id=108317
2016
2017         Reviewed by Pavel Feldman.
2018
2019         Test: inspector/editor/text-editor-highlight-api.html
2020
2021         Introduce RangeHighlightDescriptor class and implement Highlight Range
2022         api.
2023
2024         * inspector/front-end/DefaultTextEditor.js:
2025         (WebInspector.DefaultTextEditor.prototype.removeHighlight):
2026         (WebInspector.DefaultTextEditor.prototype.highlightRange):
2027         (WebInspector.TextEditorMainPanel.prototype.removeHighlight):
2028         (WebInspector.TextEditorMainPanel.prototype.highlightRange):
2029         (WebInspector.TextEditorMainPanel.RangeHighlightDescriptor):
2030         (WebInspector.TextEditorMainPanel.RangeHighlightDescriptor.prototype.affectsLine):
2031         (WebInspector.TextEditorMainPanel.RangeHighlightDescriptor.prototype.rangesForLine):
2032         (WebInspector.TextEditorMainPanel.RangeHighlightDescriptor.prototype.cssClass):
2033         (WebInspector.TextEditorMainPanel.TokenHighlighter.prototype._removeHighlight):
2034         * inspector/front-end/TextEditor.js:
2035         (WebInspector.TextEditor.prototype.highlightRange):
2036         (WebInspector.TextEditor.prototype.removeHighlight):
2037
2038 2013-01-30  Simon Hausmann  <simon.hausmann@digia.com>
2039
2040         [Qt] Remove QT4_UNICODE related code paths
2041         https://bugs.webkit.org/show_bug.cgi?id=108316
2042
2043         Reviewed by Kenneth Rohde Christiansen.
2044
2045         Get rid of QT4_UNICODE and any related code paths. The Qt port
2046         requires Qt5 and ICU these days. This also allows for the removal
2047         of TextCodecQt.
2048
2049         * Target.pri:
2050         * platform/KURL.cpp:
2051         (WebCore::appendEncodedHostname):
2052         * platform/graphics/SurrogatePairAwareTextIterator.cpp:
2053         (WebCore::SurrogatePairAwareTextIterator::normalizeVoicingMarks):
2054         * platform/text/TextEncoding.cpp:
2055         (WebCore::TextEncoding::encode):
2056         * platform/text/TextEncodingRegistry.cpp:
2057         (WebCore::extendTextCodecMaps):
2058         * platform/text/qt/TextCodecQt.cpp: Removed.
2059         * platform/text/qt/TextCodecQt.h: Removed.
2060
2061 2013-01-30  David Kilzer  <ddkilzer@apple.com>
2062
2063         BUILD FIX: Make WebCorePrefix.h build on iOS
2064         <http://webkit.org/b/108224>
2065
2066         Reviewed by Sam Weinig.
2067
2068         * WebCorePrefix.h:
2069         - Include <wtf/Platform.h>.
2070         - Do not include <CoreServices/CoreServices.h> on iOS.
2071         - Include <Foundation/Foundation.h> instead of <Cocoa/Cocoa.h>
2072           on iOS.
2073
2074 2013-01-30  Patrick Gansterer  <paroga@webkit.org>
2075
2076         Build fix for WinCE after r141156.
2077
2078         * PlatformWinCE.cmake:
2079
2080 2013-01-30  Andrey Adaikin  <aandrey@chromium.org>
2081
2082         Web Inspector: [Canvas] support instrumenting canvases in iframes (frontend side)
2083         https://bugs.webkit.org/show_bug.cgi?id=108319
2084
2085         Reviewed by Pavel Feldman.
2086
2087         Add a frame selector to choose between frames with canvases. Show this selector in the status
2088         bar only if there are 2 or more frames with canvses. Otherwise, assume silently the only
2089         frame with canvases (most common use case).
2090
2091         * English.lproj/localizedStrings.js:
2092         * inspector/front-end/CanvasProfileView.js:
2093         (WebInspector.CanvasProfileType):
2094         (WebInspector.CanvasProfileType.prototype.get statusBarItems):
2095         (WebInspector.CanvasProfileType.prototype._runSingleFrameCapturing):
2096         (WebInspector.CanvasProfileType.prototype._startFrameCapturing):
2097         (WebInspector.CanvasProfileType.prototype._frameAdded):
2098         (WebInspector.CanvasProfileType.prototype._addFrame):
2099         (WebInspector.CanvasProfileType.prototype._frameRemoved):
2100         (WebInspector.CanvasProfileType.prototype._contextCreated):
2101         (WebInspector.CanvasProfileType.prototype._selectedFrameId):
2102         (WebInspector.CanvasProfileType.prototype._dispatchViewUpdatedEvent):
2103         (WebInspector.CanvasDispatcher):
2104         (WebInspector.CanvasDispatcher.prototype.contextCreated):
2105         * inspector/front-end/ProfilesPanel.js:
2106         (WebInspector.ProfileType.prototype.createProfile):
2107         (WebInspector.ProfilesPanel.prototype._onProfileTypeSelected):
2108         (WebInspector.ProfilesPanel.prototype._updateProfileTypeSpecificUI):
2109         (WebInspector.ProfilesPanel.prototype._registerProfileType):
2110         * inspector/front-end/StatusBarButton.js:
2111         (WebInspector.StatusBarComboBox.prototype.size):
2112
2113 2013-01-30  Vladislav Kaznacheev  <kaznacheev@chromium.org>
2114
2115         Web Inspector: Change the Elements panel sidebar layout based on its aspect ratio.
2116         https://bugs.webkit.org/show_bug.cgi?id=108181
2117
2118         Reviewed by Pavel Feldman.
2119
2120         Sidebar aspect ratio proved to be a better trigger for the sidebar layout change that the docking mode.
2121         Moved the sidebar layout handling completely into WebInspector.SidebarView which now only accepts
2122         two positions: Start (corresponding to Left or Top) and End (corresponding to Right or Bottom).
2123
2124         No new tests.
2125
2126         * inspector/front-end/CSSNamedFlowCollectionsView.js:
2127         (WebInspector.CSSNamedFlowCollectionsView):
2128         * inspector/front-end/DockController.js:
2129         (WebInspector.DockController.prototype._updateUI):
2130         (WebInspector.DockController.prototype._toggleDockState):
2131         * inspector/front-end/ElementsPanel.js:
2132         (WebInspector.ElementsPanel.prototype.onResize):
2133         * inspector/front-end/FileSystemView.js:
2134         (WebInspector.FileSystemView):
2135         * inspector/front-end/MemoryStatistics.js:
2136         * inspector/front-end/Panel.js:
2137         (WebInspector.Panel.prototype.createSidebarView):
2138         * inspector/front-end/ScriptsPanel.js:
2139         (WebInspector.ScriptsPanel):
2140         * inspector/front-end/Settings.js:
2141         (WebInspector.ExperimentsSettings):
2142         * inspector/front-end/SidebarView.js:
2143         (WebInspector.SidebarView):
2144         (WebInspector.SidebarView.prototype.setAutoOrientation):
2145         (WebInspector.SidebarView.prototype._updateSidebarPosition):
2146         (WebInspector.SidebarView.prototype.onResize):
2147
2148 2013-01-30  Patrick Gansterer  <paroga@webkit.org>
2149
2150         Port SharedTimerWin.cpp to WinCE
2151         https://bugs.webkit.org/show_bug.cgi?id=103724
2152
2153         Reviewed by Brent Fulgham.
2154
2155         Add #if !OS(WINCE) around some parts of the code, so it can be used by the WinCE port too.
2156
2157         * PlatformWinCE.cmake:
2158         * platform/win/SharedTimerWin.cpp:
2159         (WebCore):
2160         (WebCore::TimerWindowWndProc):
2161         (WebCore::initializeOffScreenTimerWindow):
2162         (WebCore::setSharedTimerFireInterval):
2163         (WebCore::stopSharedTimer):
2164         * platform/wince/SharedTimerWinCE.cpp: Removed.
2165
2166 2013-01-30  Andrey Lushnikov  <lushnikov@chromium.org>
2167
2168         ctrl-arrows, ctrl-shift-arrow, ctrl-backspace
2169
2170         Web Inspector: implmenet Ctrl-Arrow/Ctrl-Backspace in DefaultTextEditor
2171         https://bugs.webkit.org/show_bug.cgi?id=107944
2172
2173         Reviewed by Pavel Feldman.
2174
2175         Add ctrl-arrows/ctrl-shift-arrow/ctrl-backspace shortcuts to jump over
2176         and delete words.
2177
2178         New test: inspector/editor/text-editor-ctrl-movements.html
2179
2180         * inspector/front-end/DefaultTextEditor.js:
2181         (WebInspector.DefaultTextEditor):
2182         (WebInspector.DefaultTextEditor.prototype._registerShortcuts):
2183         (WebInspector.DefaultTextEditor.prototype.selection):
2184         (WebInspector.DefaultTextEditor.WordMovementController): Added.
2185         (WebInspector.DefaultTextEditor.WordMovementController.prototype._registerShortcuts):
2186         (WebInspector.DefaultTextEditor.WordMovementController.prototype.):
2187         (WebInspector.DefaultTextEditor.WordMovementController.prototype._rangeForCtrlArrowMove):
2188         (WebInspector.DefaultTextEditor.WordMovementController.prototype._handleCtrlArrow):
2189         (WebInspector.DefaultTextEditor.WordMovementController.prototype._handleCtrlShiftArrow):
2190         (WebInspector.DefaultTextEditor.WordMovementController.prototype._handleCtrlBackspace):
2191
2192 2013-01-30  Andrey Lushnikov  <lushnikov@chromium.org>
2193
2194         Web Inspector: do not repaint all lines in highlight regex API in DTE
2195         https://bugs.webkit.org/show_bug.cgi?id=108081
2196
2197         Reviewed by Pavel Feldman.
2198
2199         Implement repaintLineRowsAffectedByHighlightDescriptor method that
2200         will go through the visible lineRows and repaint only those of them
2201         which were outdated by highlight change.
2202
2203         Improved test: inspector/editor/text-editor-highlight-regexp.html
2204
2205         * inspector/front-end/DefaultTextEditor.js:
2206         (WebInspector.TextEditorMainPanel.prototype.highlightRegex):
2207         (WebInspector.TextEditorMainPanel.prototype.removeRegexHighlight):
2208         (WebInspector.TextEditorMainPanel.prototype._repaintLineRowsAffectedByHighlightDescriptor):
2209         (WebInspector.TextEditorMainPanel.prototype._paintLines):
2210         (WebInspector.TextEditorMainPanel.prototype._paintLineRows):
2211
2212 2013-01-30  Tien-Ren Chen  <trchen@chromium.org>
2213
2214         REGRESSION (r139282): Caret repainting is broken for text-align: center'd <input>
2215         https://bugs.webkit.org/show_bug.cgi?id=108283
2216
2217         Reviewed by Tim Horton.
2218
2219         Occasionally carets won't be fully erased when blinking.
2220         There used to be 1-pixel padding but removed since r139282.
2221         This patch adds back the same workaround.
2222
2223         Need to rebaseline test expectations.
2224
2225         * editing/FrameSelection.cpp:
2226         (WebCore::repaintCaretForLocalRect):
2227
2228 2013-01-30  Dominik Röttsches  <dominik.rottsches@intel.com>
2229
2230         [HarfBuzz] Remove the HarfBuzz-old code
2231         https://bugs.webkit.org/show_bug.cgi?id=108077
2232
2233         Reviewed by Benjamin Poulain.
2234
2235         Removing unused old variant of the HarfBuzz code.
2236
2237         No new tests, no change in functionality.
2238
2239         * GNUmakefile.am: Rename WTF_USE_HARFBUZZ_NG to WTF_USE_HARFBUZZ
2240         * WebCore.gypi: Removing ComplexTextControllerHarfBuzz* and HarfBuzzSkia* files,
2241         * platform/graphics/SimpleFontData.h:
2242         (SimpleFontData): USE(HARFBUZZ_NG) renamed to USE(HARFBUZZ).
2243         * platform/graphics/freetype/FontPlatformData.h:
2244         (FontPlatformData): Removing USE(HARFBUZZ_NG) ifdefs.
2245         * platform/graphics/freetype/FontPlatformDataFreeType.cpp: Removing USE(HARFBUZZ_NG) ifdefs.
2246         (WebCore::FontPlatformData::operator=):
2247         (WebCore::FontPlatformData::FontPlatformData):
2248         (WebCore::FontPlatformData::harfbuzzFace):
2249         * platform/graphics/freetype/SimpleFontDataFreeType.cpp: USE(HARFBUZZ_NG) renamed to USE(HARFBUZZ).
2250         (WebCore):
2251         * platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp: Removed.
2252         * platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.h: Removed.
2253         * platform/graphics/harfbuzz/FontHarfBuzz.cpp: Removing USE(HARFBUZZ_NG) ifdefs.
2254         (WebCore::Font::drawComplexText):
2255         (WebCore::Font::floatWidthForComplexText):
2256         (WebCore::Font::offsetForPositionForComplexText):
2257         (WebCore::Font::selectionRectForComplexText):
2258         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp: Removing USE(HARFBUZZ_NG) ifdefs.
2259         (WebCore::FontPlatformData::harfbuzzFace):
2260         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h: Removing USE(HARFBUZZ_NG) ifdefs.
2261         (WebCore):
2262         (FontPlatformData):
2263         * platform/graphics/harfbuzz/HarfBuzzSkia.cpp: Removed.
2264         * platform/graphics/harfbuzz/HarfBuzzSkia.h: Removed.
2265         * platform/graphics/skia/SimpleFontDataSkia.cpp: USE(HARFBUZZ_NG) renamed to USE(HARFBUZZ).
2266         (WebCore):
2267
2268 2013-01-30  David Faure  <faure@kde.org>
2269
2270         [Qt] Major performance improvement in Qt's PluginDatabase implementation
2271         https://bugs.webkit.org/show_bug.cgi?id=106140
2272
2273         Reviewed by Simon Hausmann.
2274
2275         No new tests, only a performance improvement.
2276
2277         * plugins/qt/PluginPackageQt.cpp:
2278         (WebCore::PluginPackage::fetchInfo): Don't do a full-fledged load(), load the module directly.
2279         Keep the refcounting as it was before (broken, but otherwise flash crashes).
2280         (WebCore::PluginPackage::load): Use existing module if fetchInfo created it.
2281
2282 2013-01-30  Huang Dongsung  <luxtella@company100.net>
2283
2284         [TexMap] Remove GraphicsLayer in TextureMapperLayer.
2285         https://bugs.webkit.org/show_bug.cgi?id=107073
2286
2287         Reviewed by Noam Rosenthal.
2288
2289         Remove the dependency of TextureMapperLayer on GraphicsLayer. It is needed to
2290         remove GraphicsLayerTextureMapper in LayerTreeRenderer.
2291
2292         This is in preparation for refactoring TextureMapper to work in an actor
2293         model (http://webkit.org/b/103854).
2294
2295         Covered by existing tests.
2296
2297         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2298         (WebCore::toTextureMapperLayer):
2299         (WebCore):
2300         (WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
2301         (WebCore::GraphicsLayerTextureMapper::notifyChange):
2302         (WebCore::GraphicsLayerTextureMapper::setNeedsDisplay):
2303         (WebCore::GraphicsLayerTextureMapper::setContentsNeedsDisplay):
2304             Set BackgroundColorChange to m_changeMask instead of ContentChange.
2305         (WebCore::GraphicsLayerTextureMapper::setNeedsDisplayInRect):
2306         (WebCore::GraphicsLayerTextureMapper::setChildren):
2307         (WebCore::GraphicsLayerTextureMapper::addChild):
2308         (WebCore::GraphicsLayerTextureMapper::addChildAtIndex):
2309         (WebCore::GraphicsLayerTextureMapper::addChildAbove):
2310         (WebCore::GraphicsLayerTextureMapper::addChildBelow):
2311         (WebCore::GraphicsLayerTextureMapper::replaceChild):
2312         (WebCore::GraphicsLayerTextureMapper::setMaskLayer):
2313         (WebCore::GraphicsLayerTextureMapper::setReplicatedByLayer):
2314         (WebCore::GraphicsLayerTextureMapper::setPosition):
2315         (WebCore::GraphicsLayerTextureMapper::setAnchorPoint):
2316         (WebCore::GraphicsLayerTextureMapper::setSize):
2317         (WebCore::GraphicsLayerTextureMapper::setTransform):
2318         (WebCore::GraphicsLayerTextureMapper::setChildrenTransform):
2319         (WebCore::GraphicsLayerTextureMapper::setPreserves3D):
2320         (WebCore::GraphicsLayerTextureMapper::setMasksToBounds):
2321         (WebCore::GraphicsLayerTextureMapper::setDrawsContent):
2322         (WebCore::GraphicsLayerTextureMapper::setContentsVisible):
2323         (WebCore::GraphicsLayerTextureMapper::setContentsOpaque):
2324         (WebCore::GraphicsLayerTextureMapper::setBackfaceVisibility):
2325         (WebCore::GraphicsLayerTextureMapper::setOpacity):
2326         (WebCore::GraphicsLayerTextureMapper::setContentsRect):
2327         (WebCore::GraphicsLayerTextureMapper::setContentsToSolidColor):
2328         (WebCore::GraphicsLayerTextureMapper::setContentsToImage):
2329         (WebCore::GraphicsLayerTextureMapper::setContentsToMedia):
2330         (WebCore::GraphicsLayerTextureMapper::setShowDebugBorder):
2331         (WebCore::GraphicsLayerTextureMapper::setShowRepaintCounter):
2332         (WebCore::GraphicsLayerTextureMapper::flushCompositingStateForThisLayerOnly):
2333         (WebCore::GraphicsLayerTextureMapper::prepareBackingStoreIfNeeded):
2334         (WebCore::GraphicsLayerTextureMapper::updateDebugBorderAndRepaintCount):
2335         (WebCore::GraphicsLayerTextureMapper::setDebugBorder):
2336         (WebCore::toTextureMapperLayerVector):
2337         (WebCore::GraphicsLayerTextureMapper::commitLayerChanges):
2338             Flush pending changes into TextureMapperLayer.
2339         (WebCore::GraphicsLayerTextureMapper::addAnimation):
2340         (WebCore::GraphicsLayerTextureMapper::setAnimations):
2341         (WebCore::GraphicsLayerTextureMapper::setFilters):
2342         (WebCore::GraphicsLayerTextureMapper::setBackingStore):
2343         (WebCore::GraphicsLayerTextureMapper::setFixedToViewport):
2344         (WebCore::GraphicsLayerTextureMapper::setRepaintCount):
2345         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
2346         (GraphicsLayerTextureMapper):
2347         (WebCore):
2348         * platform/graphics/texmap/TextureMapperLayer.cpp:
2349         (WebCore::TextureMapperLayer::setChildren):
2350         (WebCore::TextureMapperLayer::setMaskLayer):
2351         (WebCore):
2352         (WebCore::TextureMapperLayer::setReplicaLayer):
2353         (WebCore::TextureMapperLayer::setPosition):
2354         (WebCore::TextureMapperLayer::setSize):
2355         (WebCore::TextureMapperLayer::setAnchorPoint):
2356         (WebCore::TextureMapperLayer::setPreserves3D):
2357         (WebCore::TextureMapperLayer::setTransform):
2358         (WebCore::TextureMapperLayer::setChildrenTransform):
2359         (WebCore::TextureMapperLayer::setContentsRect):
2360         (WebCore::TextureMapperLayer::setMasksToBounds):
2361         (WebCore::TextureMapperLayer::setDrawsContent):
2362         (WebCore::TextureMapperLayer::setContentsVisible):
2363         (WebCore::TextureMapperLayer::setContentsOpaque):
2364         (WebCore::TextureMapperLayer::setBackfaceVisibility):
2365         (WebCore::TextureMapperLayer::setOpacity):
2366         (WebCore::TextureMapperLayer::setSolidColor):
2367         (WebCore::TextureMapperLayer::setFilters):
2368         (WebCore::TextureMapperLayer::setDebugVisuals):
2369         (WebCore::TextureMapperLayer::setRepaintCount):
2370         (WebCore::TextureMapperLayer::setContentsLayer):
2371         (WebCore::TextureMapperLayer::setAnimations):
2372         (WebCore::TextureMapperLayer::setFixedToViewport):
2373         (WebCore::TextureMapperLayer::setBackingStore):
2374         * platform/graphics/texmap/TextureMapperLayer.h:
2375         (WebCore):
2376         (TextureMapperLayer):
2377         (WebCore::TextureMapperLayer::TextureMapperLayer):
2378
2379 2013-01-30  Elliott Sprehn  <esprehn@chromium.org>
2380
2381         getDecorationRootAndDecoratedRoot should add new user agent shadow roots
2382         https://bugs.webkit.org/show_bug.cgi?id=108301
2383
2384         Reviewed by Hajime Morita.
2385
2386         getDecorationRootAndDecoratedRoot intended to add a second UserAgentShadowRoot
2387         to the input, not just reuse the existing one so it could insert icons into
2388         the inputs. Add back in this behavior for now so we can sort out the right thing
2389         to do.
2390
2391         This behavior is wrong in the current architecture since it means if you had an
2392         input type=submit, add an author shadow root, and then change the type to text
2393         and then the browser decorates it your shadow magically becomes inaccessible since
2394         input.shadowRoot is no longer available. This feature is currently only used for
2395         decorating type=password fields in Chromium with an icon for password generation.
2396
2397         No new tests, there's no way to test this because it's only used in Chromium
2398         by way of the ChromeClient.
2399
2400         * html/shadow/TextFieldDecorationElement.cpp:
2401         (WebCore::getDecorationRootAndDecoratedRoot):
2402
2403 2013-01-30  Huang Dongsung  <luxtella@company100.net>
2404
2405         Coordinated Graphics: Remove m_pendingSyncBackingStores in LayerTreeRenderer.
2406         https://bugs.webkit.org/show_bug.cgi?id=107099
2407
2408         Reviewed by Noam Rosenthal.
2409
2410         Add GraphicsLayerTextureMapper::setBackingStore() so that
2411         LayerTreeRenderer sets a backing store to GraphicsLayerTextureMapper.
2412
2413         Remove three methods of TextureMapperLayer related to a backing store
2414         because they are no longer used.
2415
2416         Covered by existing compositing tests.
2417
2418         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2419         (WebCore::GraphicsLayerTextureMapper::flushCompositingStateForThisLayerOnly):
2420         (WebCore::GraphicsLayerTextureMapper::prepareBackingStoreIfNeeded):
2421         (WebCore):
2422         (WebCore::GraphicsLayerTextureMapper::updateDebugBorderAndRepaintCount):
2423         (WebCore::GraphicsLayerTextureMapper::updateBackingStoreIfNeeded):
2424         (WebCore::GraphicsLayerTextureMapper::setBackingStore):
2425         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
2426         (GraphicsLayerTextureMapper):
2427         * platform/graphics/texmap/TextureMapperLayer.cpp:
2428         (WebCore::TextureMapperLayer::flushCompositingStateForThisLayerOnly):
2429         * platform/graphics/texmap/TextureMapperLayer.h:
2430         (TextureMapperLayer):
2431
2432 2013-01-30  Andrey Lushnikov  <lushnikov@chromium.org>
2433
2434         Web Inspector: DTE adds additional space to the end of line.
2435         https://bugs.webkit.org/show_bug.cgi?id=108192
2436
2437         Reviewed by Pavel Feldman.
2438
2439         Append overlay highlight spans before decorations elements and skip
2440         them in _collectLinesFromDom method.
2441
2442         No new tests.
2443
2444         * inspector/front-end/DefaultTextEditor.js:
2445         (WebInspector.TextEditorMainPanel.prototype._appendOverlayHighlight):
2446         (WebInspector.TextEditorMainPanel.prototype._collectLinesFromDOM):
2447
2448 2013-01-29  Shinya Kawanaka  <shinyak@chromium.org>
2449
2450         Renderer is recreated unexpectedly after detach in HTMLInputElement
2451         https://bugs.webkit.org/show_bug.cgi?id=108150
2452
2453         Reviewed by Kent Tamura.
2454
2455         After r140659, destoryShadowSubtree() may update style in removeChild(). It causes
2456         attaching HTMLInputElement before creating shadowsubtree in HTMLInputElement::updateType().
2457
2458         For safe, destroyShadowSubtree() should be done before detach().
2459
2460         Test: fast/forms/number/number-change-type-on-focus-2.html
2461
2462         * html/HTMLInputElement.cpp:
2463         (WebCore::HTMLInputElement::updateType):
2464
2465 2013-01-29  James Robinson  <jamesr@chromium.org>
2466
2467         Scrollbar and scroll corner composited layers positioned incorrectly
2468         https://bugs.webkit.org/show_bug.cgi?id=108255
2469
2470         Reviewed by Simon Fraser.
2471
2472         ScrollView::updateScrollbars() needs to update the overflow controls composited layers if scrollbars are added
2473         or removed. It was doing this by recording on entry to the function if it had horizontal or vertical scrollbars
2474         and then comparing that to m_horizontal/verticalScrollbar on exit. Unfortunately updateScrollbars is recursive
2475         and exits without running the postamble code when nested on the callstack. As a result, scrollbars may be
2476         added or removed several times during the recursion, possibly leaving the overflow control layers in an
2477         inconsistent state, while ending up with the same set of scrollbars.
2478
2479         This changes the "has anything changed" logic to only compare local state (hasXXXScrollbar vs
2480         newHasXXXScrollbar) so changes in recursive calls are not considered.
2481
2482         * platform/ScrollView.cpp:
2483         (WebCore::ScrollView::updateScrollbars):
2484
2485 2013-01-29  Shinya Kawanaka  <shinyak@chromium.org>
2486
2487         Convert deprecatedShadowAncestorNode() to shadowHost() in Editor.cpp
2488         https://bugs.webkit.org/show_bug.cgi?id=108287
2489
2490         Reviewed by Hajime Morita.
2491
2492         This is the effort to convert deprecatedShadowAncestorNode() to shadowHost().
2493
2494         Since all the caller object of deprecatedShadowAncestorNode() is in a shadow tree, calling deprecatedShadowAncestorNode()
2495         is equiavalent to calling shadowHost(). Also, for all the occurence of deprecatedShadowAncestorNode(), we don't need to
2496         worry about nested ShadowDOM issues. So directly converting deprecatedShadowAncestorNode() to shadowHost() should be safe.
2497
2498         No new tests, simple refactoring.
2499
2500         * editing/Editor.cpp:
2501         (WebCore::Editor::rangeOfString):
2502         (WebCore::Editor::countMatchesForText):
2503
2504 2013-01-29  Simon Fraser  <simon.fraser@apple.com>
2505
2506         Rubberband scrolling on news.google.com causes text to blink repeatedly
2507         https://bugs.webkit.org/show_bug.cgi?id=107326
2508
2509         Reviewed by Beth Dakin.
2510
2511         When in the middle of layout, RenderBlock::updateScrollInfoAfterLayout()
2512         could cause us to re-evaluate reasons for compositing, via the call
2513         to updateLayerCompositingState() in RenderLayer::updateScrollInfoAfterLayout().
2514         
2515         At this time, when layout is still happening, it's bad to look at render
2516         geometry to decide when to do compositing (e.g. for fixed position); we might
2517         incorrectly conclude that the layer is outside the viewport.
2518         
2519         Fix by having RenderLayerCompositing store in a member whether it's safe
2520         to look at layout information. requiresCompositingForPosition() then consults
2521         this bit, and, if it needs to make decisions based on layout but layout is not
2522         complete, it doesn't change the compositing state of the layer.
2523         
2524         Not testable, since dumping the layer tree will update layout and mask the bug.
2525
2526         * rendering/RenderLayerCompositor.cpp:
2527         (WebCore::RenderLayerCompositor::RenderLayerCompositor):
2528         (WebCore::RenderLayerCompositor::updateCompositingLayers):
2529         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
2530         * rendering/RenderLayerCompositor.h:
2531         (RenderLayerCompositor):
2532
2533 2013-01-29  Mark Lam  <mark.lam@apple.com>
2534
2535         Introducing WTF::TypeSafeEnum and DatabaseError.
2536         https://bugs.webkit.org/show_bug.cgi?id=108279.
2537
2538         Reviewed by Geoffrey Garen.
2539
2540         DatabaseError will be used later in the webdatabase refactoring effort.
2541         It is currently unused.
2542
2543         No new tests.
2544
2545         * GNUmakefile.list.am:
2546         * Modules/webdatabase/DatabaseError.h: Added.
2547         (WebCore):
2548         * Target.pri:
2549         * WebCore.vcproj/WebCore.vcproj:
2550         * WebCore.vcxproj/WebCore.vcxproj:
2551         * WebCore.vcxproj/WebCore.vcxproj.filters:
2552         * WebCore.xcodeproj/project.pbxproj:
2553
2554 2013-01-29  Elliott Sprehn  <esprehn@chromium.org>
2555
2556         Move ShadowRoot creation into ElementShadow
2557         https://bugs.webkit.org/show_bug.cgi?id=108267
2558
2559         Reviewed by Hajime Morita.
2560
2561         Instead of the ShadowRoot::create method doing crazy factory things and
2562         then needing to assert about the state of the ShadowRoot in addShadowRoot,
2563         just create ShadowRoots from inside ElementShadow.
2564
2565         No new tests, just refactoring.
2566
2567         * dom/Element.cpp:
2568         (WebCore::Element::createShadowRoot): Use addShadowRoot().
2569         (WebCore::Element::ensureUserAgentShadowRoot): Use addShadowRoot().
2570         * dom/ElementShadow.cpp:
2571         (WebCore::ElementShadow::addShadowRoot): Now returns the new ShadowRoot.
2572         * dom/ElementShadow.h:
2573         (ElementShadow):
2574         * dom/ShadowRoot.cpp:
2575         * dom/ShadowRoot.h:
2576         (WebCore::ShadowRoot::create): No longer does the association.
2577         (WebCore::ShadowRoot::setHost): Sets parent tree scope automatically.
2578
2579 2013-01-29  Mark Lam  <mark.lam@apple.com>
2580
2581         Rename DBBackend::Server to DatabaseServer.
2582         https://bugs.webkit.org/show_bug.cgi?id=108278.
2583
2584         Rubber stamped by Geoffrey Garen.
2585
2586         This is only a renaming operation as part of the webdatabase refactoring
2587         effort. There is no semantic change.
2588
2589         No new tests.
2590
2591         * CMakeLists.txt:
2592         * GNUmakefile.list.am:
2593         * Modules/webdatabase/DBBackendServer.cpp: Removed.
2594         * Modules/webdatabase/DBBackendServer.h: Removed.
2595         * Modules/webdatabase/DatabaseManager.cpp:
2596         (WebCore::DatabaseManager::DatabaseManager):
2597         * Modules/webdatabase/DatabaseServer.cpp: Copied from Source/WebCore/Modules/webdatabase/DBBackendServer.cpp.
2598         (WebCore::DatabaseServer::initialize):
2599         (WebCore::DatabaseServer::setClient):
2600         (WebCore::DatabaseServer::databaseDirectoryPath):
2601         (WebCore::DatabaseServer::setDatabaseDirectoryPath):
2602         (WebCore::DatabaseServer::fullPathForDatabase):
2603         (WebCore::DatabaseServer::hasEntryForOrigin):
2604         (WebCore::DatabaseServer::origins):
2605         (WebCore::DatabaseServer::databaseNamesForOrigin):
2606         (WebCore::DatabaseServer::detailsForNameAndOrigin):
2607         (WebCore::DatabaseServer::usageForOrigin):
2608         (WebCore::DatabaseServer::quotaForOrigin):
2609         (WebCore::DatabaseServer::setQuota):
2610         (WebCore::DatabaseServer::deleteAllDatabases):
2611         (WebCore::DatabaseServer::deleteOrigin):
2612         (WebCore::DatabaseServer::deleteDatabase):
2613         (WebCore::DatabaseServer::scheduleNotifyDatabaseChanged):
2614         (WebCore::DatabaseServer::databaseChanged):
2615         (WebCore::DatabaseServer::closeDatabasesImmediately):
2616         (WebCore::DatabaseServer::interruptAllDatabasesForContext):
2617         (WebCore::DatabaseServer::canEstablishDatabase):
2618         (WebCore::DatabaseServer::addOpenDatabase):
2619         (WebCore::DatabaseServer::removeOpenDatabase):
2620         (WebCore::DatabaseServer::setDatabaseDetails):
2621         (WebCore::DatabaseServer::getMaxSizeForDatabase):
2622         (WebCore):
2623         * Modules/webdatabase/DatabaseServer.h: Copied from Source/WebCore/Modules/webdatabase/DBBackendServer.h.
2624         * Target.pri:
2625         * WebCore.gypi:
2626         * WebCore.order:
2627         * WebCore.vcproj/WebCore.vcproj:
2628         * WebCore.vcxproj/WebCore.vcxproj:
2629         * WebCore.vcxproj/WebCore.vcxproj.filters:
2630         * WebCore.xcodeproj/project.pbxproj:
2631         * platform/DatabaseStrategy.cpp:
2632         (WebCore::DatabaseStrategy::getDatabaseServer):
2633
2634 2013-01-29  Chris Fleizach  <cfleizach@apple.com>
2635
2636         AX: VoiceOver not reading bullets correctly in the text of notes
2637         https://bugs.webkit.org/show_bug.cgi?id=107980
2638
2639         Reviewed by Ryosuke Niwa.
2640
2641         Accessibility code should not assume that all list markers end with the same "." suffix.
2642         We need to use the actual suffix.
2643
2644         Test: platform/mac/accessibility/listmarker-suffix.html
2645
2646         * accessibility/AccessibilityObject.cpp:
2647         (WebCore::AccessibilityObject::listMarkerTextForNodeAndPosition):
2648
2649 2013-01-29  Mark Lam  <mark.lam@apple.com>
2650
2651         Rename AbstractDatabase to DatabaseBackend.
2652         https://bugs.webkit.org/show_bug.cgi?id=108275.
2653
2654         Reviewed by Sam Weinig.
2655
2656         This is a pure rename operation as part of the webdatabase refactoring
2657         effort. There is no semantic change in this patch.
2658
2659         No new tests.
2660
2661         * CMakeLists.txt:
2662         * GNUmakefile.list.am:
2663         * Modules/webdatabase/AbstractDatabase.cpp: Removed.
2664         * Modules/webdatabase/AbstractDatabase.h: Removed.
2665         * Modules/webdatabase/AbstractDatabaseServer.h:
2666         (WebCore):
2667         (AbstractDatabaseServer):
2668         * Modules/webdatabase/DBBackendServer.cpp:
2669         (WebCore::DBBackend::Server::databaseChanged):
2670         (WebCore::DBBackend::Server::addOpenDatabase):
2671         (WebCore::DBBackend::Server::removeOpenDatabase):
2672         (WebCore::DBBackend::Server::getMaxSizeForDatabase):
2673         * Modules/webdatabase/DBBackendServer.h:
2674         * Modules/webdatabase/Database.cpp:
2675         (WebCore::Database::Database):
2676         (WebCore::Database::version):
2677         (WebCore::Database::performOpenAndVerify):
2678         * Modules/webdatabase/Database.h:
2679         * Modules/webdatabase/DatabaseBackend.cpp: Copied from Source/WebCore/Modules/webdatabase/AbstractDatabase.cpp.
2680         (WebCore):
2681         (WebCore::DatabaseBackend::databaseInfoTableName):
2682         (WebCore::DatabaseBackend::DatabaseBackend):
2683         (WebCore::DatabaseBackend::~DatabaseBackend):
2684         (WebCore::DatabaseBackend::closeDatabase):
2685         (WebCore::DatabaseBackend::version):
2686         (WebCore::DatabaseBackend::performOpenAndVerify):
2687         (WebCore::DatabaseBackend::scriptExecutionContext):
2688         (WebCore::DatabaseBackend::securityOrigin):
2689         (WebCore::DatabaseBackend::stringIdentifier):
2690         (WebCore::DatabaseBackend::displayName):
2691         (WebCore::DatabaseBackend::estimatedSize):
2692         (WebCore::DatabaseBackend::fileName):
2693         (WebCore::DatabaseBackend::details):
2694         (WebCore::DatabaseBackend::getVersionFromDatabase):
2695         (WebCore::DatabaseBackend::setVersionInDatabase):
2696         (WebCore::DatabaseBackend::setExpectedVersion):
2697         (WebCore::DatabaseBackend::getCachedVersion):
2698         (WebCore::DatabaseBackend::setCachedVersion):
2699         (WebCore::DatabaseBackend::getActualVersionForTransaction):
2700         (WebCore::DatabaseBackend::disableAuthorizer):
2701         (WebCore::DatabaseBackend::enableAuthorizer):
2702         (WebCore::DatabaseBackend::setAuthorizerReadOnly):
2703         (WebCore::DatabaseBackend::setAuthorizerPermissions):
2704         (WebCore::DatabaseBackend::lastActionChangedDatabase):
2705         (WebCore::DatabaseBackend::lastActionWasInsert):
2706         (WebCore::DatabaseBackend::resetDeletes):
2707         (WebCore::DatabaseBackend::hadDeletes):
2708         (WebCore::DatabaseBackend::resetAuthorizer):
2709         (WebCore::DatabaseBackend::maximumSize):
2710         (WebCore::DatabaseBackend::incrementalVacuumIfNeeded):
2711         (WebCore::DatabaseBackend::interrupt):
2712         (WebCore::DatabaseBackend::isInterrupted):
2713         (WebCore::DatabaseBackend::logErrorMessage):
2714         (WebCore::DatabaseBackend::reportOpenDatabaseResult):
2715         (WebCore::DatabaseBackend::reportChangeVersionResult):
2716         (WebCore::DatabaseBackend::reportStartTransactionResult):
2717         (WebCore::DatabaseBackend::reportCommitTransactionResult):
2718         (WebCore::DatabaseBackend::reportExecuteStatementResult):
2719         (WebCore::DatabaseBackend::reportVacuumDatabaseResult):
2720         * Modules/webdatabase/DatabaseBackend.h: Copied from Source/WebCore/Modules/webdatabase/AbstractDatabase.h.
2721         (DatabaseBackend):
2722         * Modules/webdatabase/DatabaseManager.cpp:
2723         (WebCore::DatabaseManager::databaseChanged):
2724         (WebCore::DatabaseManager::addOpenDatabase):
2725         (WebCore::DatabaseManager::removeOpenDatabase):
2726         (WebCore::DatabaseManager::getMaxSizeForDatabase):
2727         * Modules/webdatabase/DatabaseManager.h:
2728         (DatabaseManager):
2729         * Modules/webdatabase/DatabaseSync.cpp:
2730         (WebCore::DatabaseSync::DatabaseSync):
2731         * Modules/webdatabase/DatabaseSync.h:
2732         * Modules/webdatabase/DatabaseTracker.cpp:
2733         (WebCore::DatabaseTracker::getMaxSizeForDatabase):
2734         (WebCore::DatabaseTracker::databaseChanged):
2735         (WebCore::DatabaseTracker::interruptAllDatabasesForContext):
2736         (WebCore::DatabaseTracker::addOpenDatabase):
2737         (WebCore::DatabaseTracker::removeOpenDatabase):
2738         (WebCore::DatabaseTracker::getOpenDatabases):
2739         (WebCore::DatabaseTracker::deleteDatabaseFile):
2740         * Modules/webdatabase/DatabaseTracker.h:
2741         (WebCore):
2742         (DatabaseTracker):
2743         * Modules/webdatabase/OriginQuotaManager.cpp:
2744         (WebCore::OriginQuotaManager::markDatabase):
2745         * Modules/webdatabase/OriginQuotaManager.h:
2746         (WebCore):
2747         (OriginQuotaManager):
2748         * Modules/webdatabase/SQLTransactionClient.cpp:
2749         (WebCore::SQLTransactionClient::didCommitWriteTransaction):
2750         (WebCore::SQLTransactionClient::didExecuteStatement):
2751         (WebCore::SQLTransactionClient::didExceedQuota):
2752         * Modules/webdatabase/SQLTransactionClient.h:
2753         (WebCore):
2754         (SQLTransactionClient):
2755         * Modules/webdatabase/chromium/DatabaseObserver.h:
2756         (WebCore):
2757         (DatabaseObserver):
2758         * Modules/webdatabase/chromium/DatabaseTrackerChromium.cpp:
2759         (WebCore::DatabaseTracker::addOpenDatabase):
2760         (WebCore::NotifyDatabaseObserverOnCloseTask::create):
2761         (WebCore::NotifyDatabaseObserverOnCloseTask::NotifyDatabaseObserverOnCloseTask):
2762         (NotifyDatabaseObserverOnCloseTask):
2763         (WebCore::DatabaseTracker::removeOpenDatabase):
2764         (WebCore::DatabaseTracker::getMaxSizeForDatabase):
2765         (WebCore::DatabaseTracker::CloseOneDatabaseImmediatelyTask::create):
2766         (WebCore::DatabaseTracker::CloseOneDatabaseImmediatelyTask::CloseOneDatabaseImmediatelyTask):
2767         (DatabaseTracker::CloseOneDatabaseImmediatelyTask):
2768         (WebCore::DatabaseTracker::closeOneDatabaseImmediately):
2769         * Modules/webdatabase/chromium/SQLTransactionClientChromium.cpp:
2770         (WebCore::NotifyDatabaseChangedTask::create):
2771         (WebCore::NotifyDatabaseChangedTask::NotifyDatabaseChangedTask):
2772         (NotifyDatabaseChangedTask):
2773         (WebCore::SQLTransactionClient::didCommitWriteTransaction):
2774         (WebCore::SQLTransactionClient::didExecuteStatement):
2775         (WebCore::SQLTransactionClient::didExceedQuota):
2776         * Target.pri:
2777         * WebCore.gypi:
2778         * WebCore.order:
2779         * WebCore.vcproj/WebCore.vcproj:
2780         * WebCore.vcxproj/WebCore.vcxproj:
2781         * WebCore.vcxproj/WebCore.vcxproj.filters:
2782         * WebCore.xcodeproj/project.pbxproj:
2783
2784 2013-01-29  Sheriff Bot  <webkit.review.bot@gmail.com>
2785
2786         Unreviewed, rolling out r140983.
2787         http://trac.webkit.org/changeset/140983
2788         https://bugs.webkit.org/show_bug.cgi?id=108277
2789
2790         Unfortunately, this API has one last client (Requested by
2791         abarth on #webkit).
2792
2793         * Configurations/FeatureDefines.xcconfig:
2794         * Modules/notifications/Notification.cpp:
2795         (WebCore::Notification::Notification):
2796         (WebCore):
2797         (WebCore::Notification::create):
2798         * Modules/notifications/Notification.h:
2799         (Notification):
2800         (WebCore::Notification::isHTML):
2801         (WebCore::Notification::setHTML):
2802         (WebCore::Notification::url):
2803         (WebCore::Notification::setURL):
2804         * Modules/notifications/NotificationCenter.h:
2805         (WebCore::NotificationCenter::createHTMLNotification):
2806         (NotificationCenter):
2807         * Modules/notifications/NotificationCenter.idl:
2808         * page/FeatureObserver.h:
2809
2810 2013-01-29  Rafael Weinstein  <rafaelw@chromium.org>
2811
2812         parserAppendChild and parserInsertBefore should ensure that child nodes are in the same document
2813         https://bugs.webkit.org/show_bug.cgi?id=108260
2814
2815         Reviewed by Eric Seidel.
2816
2817         Test: fast/parser/xml-error-adopted.xml
2818
2819         The check and adoption if the documents don't match is now moved into ContainerNode::parser* from HTMLConstructionSite.
2820
2821         * dom/ContainerNode.cpp:
2822         (WebCore::ContainerNode::parserInsertBefore):
2823         (WebCore::ContainerNode::parserAppendChild):
2824         * html/parser/HTMLConstructionSite.cpp:
2825         (WebCore::HTMLConstructionSite::insertTextNode):
2826         (WebCore::HTMLConstructionSite::findFosterSite):
2827         (WebCore::HTMLConstructionSite::fosterParent):
2828
2829 2013-01-29  Shinya Kawanaka  <shinyak@chromium.org>
2830
2831         [Chromium] Cannot copy text when selecting readonly (or disabled) input elements
2832         https://bugs.webkit.org/show_bug.cgi?id=106287
2833
2834         Reviewed by Hajime Morita.
2835
2836         When an input element is disabled or readonly, its inner element is not editable. So its rootEditableElement
2837         does not exist. In WebViewImpl::caretOrSelectionRange, if rootEditableElement does not exist, it uses
2838         a document element. However, the inner element and document element have a different tree scope, the selection range
2839         cannot be gotten correctly.
2840
2841         We should use ShadowRoot instead of document so that we can stay in the same tree scope.
2842
2843         * WebCore.exp.in:
2844         * editing/FrameSelection.cpp:
2845         (WebCore::FrameSelection::rootEditableElementOrTreeScopeRootNode): Added. Returns ShadowRoot so that we can
2846         stay in the same tree scope.
2847         (WebCore):
2848         * editing/FrameSelection.h:
2849         (FrameSelection):
2850         * editing/TextIterator.cpp:
2851         (WebCore::TextIterator::getLocationAndLengthFromRange):
2852         * editing/TextIterator.h:
2853         (TextIterator):
2854
2855 2013-01-29  Kent Tamura  <tkent@chromium.org>
2856
2857         INPUT_MULTIPLE_FIELDS_UI: The content should not overflow the <input> boundary
2858         https://bugs.webkit.org/show_bug.cgi?id=108069
2859
2860         Reviewed by Hajime Morita.
2861
2862         To avoid the overflow, we do:
2863         A) Specify overflow:hidden to <input>.
2864
2865         However, we need to make sub-fields and buttons workable even if the
2866         width is smaller than the intrinsic size. So, we do:
2867         B) Make DateTimeEditElement shrinkable, and
2868         C) Make the sub-fields scrollable horizontally like input[type=text].
2869
2870         To achieve B, we need to remove -webkit-date-and-time-container (D)
2871         because width property for <input> can shrink only the direct child
2872         elements.
2873
2874         Tests: fast/forms/time-multiple-fields/time-multiple-fields-narrow-width-scroll.html
2875         and new test cases in fast/forms/date/date-appearance-basic.html.
2876
2877         * css/html.css:
2878         (input[type="date"]):
2879         Change -webkit-align-items value. (D)
2880         Specify overflow:hidden. (A)
2881         (input[type="datetime"]): Ditto.
2882         (input[type="datetime-local"]): Ditto.
2883         (input[type="month"]): Ditto.
2884         (input[type="time"]): Ditto.
2885         (input[type="week"]): Ditto.
2886         (input::-webkit-datetime-edit):
2887         Add min-width:0 (B), and overflow:hidden. (C)
2888         Remove unnecessary white-space:pre because of white-space:nowrap below.
2889         (input::-webkit-datetime-edit-fields-wrapper):
2890         Added. This is the child of -webkit-datetime-edit, and contains
2891         sub-fields. (C)
2892         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
2893         (WebCore::BaseMultipleFieldsDateAndTimeInputType::createShadowSubtree):
2894         Remove -webkit-date-and-time-container, and append DateTimeEditElement,
2895         spin button, and picker indicator element to the ShadowRoot. (D)
2896         (WebCore::BaseMultipleFieldsDateAndTimeInputType::shouldApplyLocaleDirection):
2897         <input> for multiple fields UI should have the direction of the browser
2898         locale. This is a replacement of the code for dir attribute in
2899         updateInnerTextValue below. (D)
2900         (WebCore::BaseMultipleFieldsDateAndTimeInputType::updateInnerTextValue):
2901         Remove the code to set dir= to -webkit-date-and-time-container.
2902         * html/BaseMultipleFieldsDateAndTimeInputType.h:
2903         (BaseMultipleFieldsDateAndTimeInputType):
2904         Declare shouldApplyLocaleDirection. (D)
2905         * html/HTMLInputElement.cpp:
2906         (WebCore::HTMLInputElement::HTMLInputElement):
2907         Calls setHasCustomCallbacks for customStyleForRenderer. (D)
2908         (WebCore::HTMLInputElement::customStyleForRenderer):
2909         Set direction to RenderStyle if shouldApplyLocaleDirection is true. This
2910         is a replacement of the dir setting code in
2911         BaseMultipleFieldsDateAndTimeInputType::updateInnerTextValue. (D)
2912         * html/HTMLInputElement.h:
2913         (HTMLInputElement): Declare customStyleForRenderer. (D)
2914         * html/InputType.cpp:
2915         (WebCore::InputType::shouldApplyLocaleDirection):
2916         Add default implmentation of shouldApplyLocaleDirection. (D)
2917         * html/InputType.h:
2918         (InputType): Declare shouldApplyLocaleDirection. (D)
2919
2920         * html/shadow/DateTimeEditElement.cpp:
2921         (WebCore::DateTimeEditBuilder::visitLiteral):
2922         Add elements to -webkit-datetime-edit-fields-wrapper element. (C)
2923         (WebCore::DateTimeEditElement::fieldsWrapperElement):
2924         A helper to get -webkit-datetime-edit-fields-wrapper element. (C)
2925         (WebCore::DateTimeEditElement::addField):
2926         Add elements to -webkit-datetime-edit-fields-wrapper element. (C)
2927         (WebCore::DateTimeEditElement::customStyleForRenderer):
2928         - Iterate over children of -webkit-datetime-edit-fields-wrapper element. (C)
2929         - Set width property instead of min-width. (B)
2930         (WebCore::DateTimeEditElement::layout):
2931         - Prepare -webkit-datetime-edit-fields-wrapper element. (C)
2932         - Handle children of -webkit-datetime-edit-fields-wrapper element. (C)
2933         - Need to do style recalc because child structure is changed. (C)
2934         * html/shadow/DateTimeEditElement.h:
2935         (DateTimeEditElement): Declare fieldsWrapperElement. (C)
2936
2937 2013-01-29  Tom Sepez  <tsepez@chromium.org>
2938
2939         [v8] Enable binding integrity on linux
2940         https://bugs.webkit.org/show_bug.cgi?id=108242
2941
2942         Reviewed by Adam Barth.
2943
2944         Patch is correct if existing tests pass.
2945
2946         * html/TextMetrics.idl:
2947         Suppress check to allow link on linux.
2948
2949 2013-01-29  Tim Horton  <timothy_horton@apple.com>
2950
2951         Don't updateTileCoverageMap() from setScrollingModeIndication if we don't need to.
2952
2953         Reviewed by Simon Fraser.
2954
2955         Only do the work if the tiled scrolling indicator/map is enabled.
2956
2957         * platform/graphics/ca/mac/TileCache.mm:
2958         (WebCore::TileCache::setScrollingModeIndication):
2959
2960 2013-01-29  Chris Fleizach  <cfleizach@apple.com>
2961
2962         AX: Add support for aria-autocomplete="list" on ARIA combobox
2963         https://bugs.webkit.org/show_bug.cgi?id=108228
2964
2965         Reviewed by Ryosuke Niwa.
2966
2967         Comboboxes behave much like textfields, and so they need
2968         to respond like text controls.
2969
2970         Test: platform/mac/accessibility/combox-box-value.html
2971
2972         * accessibility/AccessibilityObject.cpp:
2973         (WebCore::AccessibilityObject::isTextControl):
2974         (WebCore):
2975         * accessibility/AccessibilityObject.h:
2976         (AccessibilityObject):
2977
2978 2013-01-29  Nico Weber  <thakis@chromium.org>
2979
2980         [chromium] Do not mark translation-unit-local functions as extern "C"
2981         https://bugs.webkit.org/show_bug.cgi?id=108218
2982
2983         Reviewed by Adam Barth.
2984
2985         Requested by darin in https://bugs.webkit.org/show_bug.cgi?id=107845
2986         This also allows enabling -Wreturn-type-c-linkage again, but I'd like to
2987         wait for the next clang roll (which tweaks this warning) before undoing
2988         r140800 (which removed that warning).
2989
2990         No behavior change.
2991
2992         * bindings/v8/npruntime.cpp:
2993
2994 2013-01-29  Geoffrey Garen  <ggaren@apple.com>
2995
2996         Removed GGC because it has been disabled for a long time
2997         https://bugs.webkit.org/show_bug.cgi?id=108245
2998
2999         Reviewed by Filip Pizlo.
3000
3001         * ForwardingHeaders/heap/CardSet.h: Removed.
3002         * WebCore.vcxproj/WebCore.vcxproj:
3003         * WebCore.vcxproj/WebCore.vcxproj.filters:
3004
3005 2013-01-29  Elliott Sprehn  <esprehn@chromium.org>
3006         Refactor ShadowRoot exception handling
3007         https://bugs.webkit.org/show_bug.cgi?id=108209
3008
3009         Reviewed by Dimitri Glazkov.
3010
3011         Many of the exception cases for ShadowRoot are actually impossible and
3012         should be asserts instead. We can also move the one case of exception logic,
3013         for elements that don't allow author shadows into Element::createShadowRoot
3014         instead of having it all over the ShadowRoot and ElementShadow classes. This
3015         is the first step in centralizing all ShadowRoot creation inside ElementShadow.
3016
3017         No new tests, covered by existing tests.
3018
3019         * WebCore.exp.in:
3020         * dom/Element.cpp:
3021         (WebCore::Element::createShadowRoot): Be explicit about what kind of ShadowRoot you're creating.
3022         (WebCore::Element::ensureUserAgentShadowRoot): No more exceptions.
3023         * dom/ElementShadow.cpp:
3024         (WebCore::ElementShadow::addShadowRoot): This never actually throws exceptions, remove ExceptionCode.
3025         * dom/ElementShadow.h:
3026         (ElementShadow):
3027         * dom/ShadowRoot.cpp:
3028         (WebCore::determineUsageType): Merge with Element::createShadowRoot.
3029         (WebCore):
3030         (WebCore::ShadowRoot::ShadowRoot): Moved Histogram logic here since it's actually about the constructor anyway.
3031         (WebCore::ShadowRoot::create): Removed overload that made the code less obvious.
3032         * dom/ShadowRoot.h:
3033         (ShadowRoot):
3034         * html/HTMLKeygenElement.cpp:
3035         (WebCore::HTMLKeygenElement::HTMLKeygenElement):
3036         * html/shadow/TextFieldDecorationElement.cpp:
3037         (WebCore::getDecorationRootAndDecoratedRoot):
3038         * testing/Internals.cpp:
3039         (WebCore::Internals::ensureShadowRoot):
3040         (WebCore::Internals::createShadowRoot):
3041
3042 2013-01-29  Mark Lam  <mark.lam@apple.com>
3043
3044         Change DatabaseContext lookup to be thread-safe.
3045         https://bugs.webkit.org/show_bug.cgi?id=107784.
3046
3047         Reviewed by Geoffrey Garen.
3048
3049         DatabaseContext will no longer be a Supplement of ScriptExecutionContext.
3050         Instead we will maintain a mutex guarded contextMap in the DatabaseManager
3051         which maps ScriptExecutionContexts to DatabaseContexts.
3052
3053         Also cleaned up the shutdown mechanism of the DatabaseContext,
3054         DatabaseThread, and Databases when their owner ScriptExecutionContext
3055         destructs.
3056
3057         No new tests.
3058
3059         * Modules/webdatabase/AbstractDatabase.cpp:
3060         (WebCore::AbstractDatabase::AbstractDatabase):
3061         * Modules/webdatabase/AbstractDatabase.h:
3062         (WebCore::AbstractDatabase::databaseContext):
3063         (AbstractDatabase):
3064         * Modules/webdatabase/Database.cpp:
3065         (WebCore::Database::Database):
3066         * Modules/webdatabase/Database.h:
3067         (WebCore):
3068         (Database):
3069         * Modules/webdatabase/DatabaseContext.cpp:
3070         (WebCore):
3071         (WebCore::DatabaseContext::DatabaseContext):
3072         (WebCore::DatabaseContext::~DatabaseContext):
3073         (WebCore::DatabaseContext::contextDestroyed):
3074         (WebCore::DatabaseContext::stop):
3075         (WebCore::DatabaseContext::databaseThread):
3076         (WebCore::DatabaseContext::stopDatabases):
3077         * Modules/webdatabase/DatabaseContext.h:
3078         (DatabaseContext):
3079         (WebCore::DatabaseContext::scriptExecutionContext):
3080         (WebCore::DatabaseContext::hasOpenDatabases):
3081         (WebCore::DatabaseContext::stopDatabases):
3082         * Modules/webdatabase/DatabaseManager.cpp:
3083         (WebCore::DatabaseManager::manager):
3084         (WebCore::DatabaseManager::DatabaseManager):
3085         (WebCore::DatabaseManager::getExistingDatabaseContext):
3086         (WebCore):
3087         (WebCore::DatabaseManager::getDatabaseContext):
3088         (WebCore::DatabaseManager::registerDatabaseContext):
3089         (WebCore::DatabaseManager::unregisterDatabaseContext):
3090         (WebCore::DatabaseManager::notifyDatabaseContextConstructed):
3091         (WebCore::DatabaseManager::notifyDatabaseContextDestructed):
3092         (WebCore::DatabaseManager::openDatabase):
3093         (WebCore::DatabaseManager::openDatabaseSync):
3094         (WebCore::DatabaseManager::hasOpenDatabases):
3095         (WebCore::DatabaseManager::stopDatabases):
3096         (WebCore::DatabaseManager::interruptAllDatabasesForContext):
3097         * Modules/webdatabase/DatabaseManager.h:
3098         (WebCore):
3099         (DatabaseManager):
3100         (WebCore::DatabaseManager::notifyDatabaseContextConstructed):
3101         (WebCore::DatabaseManager::notifyDatabaseContextDestructed):
3102         * Modules/webdatabase/DatabaseSync.cpp:
3103         (WebCore::DatabaseSync::DatabaseSync):
3104         * Modules/webdatabase/DatabaseSync.h:
3105         (WebCore):
3106         (DatabaseSync):
3107         * Modules/webdatabase/DatabaseThread.cpp:
3108         (WebCore::DatabaseThread::~DatabaseThread):
3109         (WebCore::DatabaseThread::requestTermination):
3110         * Modules/webdatabase/DatabaseTracker.cpp:
3111         (WebCore::DatabaseTracker::canEstablishDatabase):
3112         * dom/ActiveDOMObject.cpp:
3113         (WebCore::ActiveDOMObject::~ActiveDOMObject):
3114
3115 2013-01-29  Julien Chaffraix  <jchaffraix@webkit.org>
3116
3117         [CSS Grid Layout] Make resolveContentBasedTrackSizingFunctionsForItems reuse distributeSpaceToTracks
3118         https://bugs.webkit.org/show_bug.cgi?id=108110
3119
3120         Reviewed by Tony Chang.
3121
3122         This change makes us match more closely the specification by reusing distributeSpaceToTracks inside
3123         resolveContentBasedTrackSizingFunctionsForItems. This also removes some existing code duplication.
3124
3125         Refactoring covered by existing tests.
3126
3127         * rendering/RenderGrid.cpp:
3128         (WebCore::RenderGrid::computedUsedBreadthOfGridTracks):
3129         Updated after distributeSpaceToTracks new arguments. Copying the tracks to a Vector<GridTrack*> is
3130         now done here.
3131
3132         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
3133         Removed code duplication and switched to using distributeSpaceToTracks.
3134
3135         (WebCore::RenderGrid::distributeSpaceToTracks):
3136         Refactored distributeSpaceToTracks to implement the distribution of any extra space above max breadth
3137         as it was required to pass the tests (required to properly handling min-content > max). Also changed
3138         the arguments of the function to better match the intent of the function.
3139
3140         * rendering/RenderGrid.h: Updated distributeSpaceToTracks's arguments.
3141
3142 2013-01-29  Elliott Sprehn  <esprehn@chromium.org>
3143
3144         Remove all ShadowRoots during ElementShadow destruction
3145         https://bugs.webkit.org/show_bug.cgi?id=108207
3146
3147         Reviewed by Dimitri Glazkov.
3148
3149         There's no reason to expose removeAllShadowRoots since the only legitimate
3150         place to call it is right as we're destroying the ElementShadow.
3151
3152         No new tests, just refactoring.
3153
3154         * dom/Element.cpp:
3155         (WebCore::Element::~Element): Remove call to removeAllShadowRoots()
3156         * dom/ElementShadow.h:
3157         (WebCore::ElementShadow::~ElementShadow): Call removeAllShadowRoots().
3158         (ElementShadow): Make removeAllShadowRoots() private.
3159
3160 2013-01-29  Justin Novosad  <junov@google.com>
3161
3162         REGRESSION (r135628-135632): Double box shadow failure to render
3163         https://bugs.webkit.org/show_bug.cgi?id=107833
3164
3165         Reviewed by Simon Fraser.
3166
3167         Regression caused by http://trac.webkit.org/changeset/135629
3168         The regression was due to faulty occlusion logic that was assuming
3169         that drawing the background color of a render box background layer
3170         could be skipped when the same layer also has an opaque image attached.
3171         In the case where the background color is drawn for the purpose of
3172         rendering a box shadow, the shadow is typically not
3173         completely occluded by the background image because of the shadow
3174         blur and/or offset.  This patch fixes the problem by not culling a
3175         background draw if it is used to draw a box shadow.
3176
3177         Test: fast/backgrounds/gradient-background-shadow.html
3178
3179         * rendering/RenderBoxModelObject.cpp:
3180         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
3181         Changing occlusion culling test to never cull background color
3182         draw if it is used to draw a box shadow. This is because box shadows
3183         can draw outside the border fill region.
3184
3185 2013-01-29  Ian Vollick  <vollick@chromium.org>
3186
3187         Add RenderLayer::enclosingStackingContainer
3188         https://bugs.webkit.org/show_bug.cgi?id=108211
3189
3190         Reviewed by Simon Fraser.
3191
3192         No new tests, no change in functionality.
3193
3194         * rendering/RenderLayer.h:
3195         (WebCore::RenderLayer::enclosingStackingContainer):
3196           This function is similar to RenderLayer::stackingContainer, but may return the
3197           layer itself if it's a stacking container.
3198
3199 2013-01-29  Patrick Gansterer  <paroga@webkit.org>
3200
3201         Rename TextBreakIteratorWinCE to TextBreakIteratorWchar
3202         https://bugs.webkit.org/show_bug.cgi?id=108094
3203
3204         Reviewed by Ryosuke Niwa.
3205
3206         TextBreakIteratorWinCE does not contain any Windows CE specific code.
3207         Rename it to TextBreakIteratorWchar to match the name in wtf/unicode.
3208
3209         * platform/text/wchar/TextBreakIteratorWchar.cpp: Renamed from Source/WebCore/platform/text/wince/TextBreakIteratorWinCE.cpp.
3210
3211 2013-01-29  Tommy Widenflycht  <tommyw@google.com>
3212
3213         MediaStream API: A MediaStreamComponent should be able to return the MediaStreamDescriptor it belongs to
3214         https://bugs.webkit.org/show_bug.cgi?id=108173
3215
3216         Reviewed by Adam Barth.
3217
3218         To be able to return the MediaStreamDescriptor a MediaStreamComponent belongs to the "ownership"
3219         of the MediaStreamDescriptor needed to move from a MediaStreamTrack to the MediaStreamComponent.
3220         This is also better from an architectonic view as well.
3221
3222         Patch covered by existing tests.
3223
3224         * Modules/mediastream/MediaStream.cpp:
3225         (WebCore::MediaStream::MediaStream):
3226         (WebCore::MediaStream::addTrack):
3227         (WebCore::MediaStream::addRemoteTrack):
3228         * Modules/mediastream/MediaStreamTrack.cpp:
3229         (WebCore::MediaStreamTrack::create):
3230         (WebCore::MediaStreamTrack::MediaStreamTrack):
3231         (WebCore::MediaStreamTrack::setEnabled):
3232         * Modules/mediastream/MediaStreamTrack.h:
3233         (MediaStreamTrack):
3234         * Modules/mediastream/RTCStatsRequestImpl.cpp:
3235         (WebCore::RTCStatsRequestImpl::RTCStatsRequestImpl):
3236         * platform/chromium/support/WebMediaStreamComponent.cpp:
3237         (WebKit::WebMediaStreamComponent::stream):
3238         (WebKit):
3239         * platform/mediastream/MediaStreamComponent.h:
3240         (WebCore):
3241         (WebCore::MediaStreamComponent::create):
3242         (MediaStreamComponent):
3243         (WebCore::MediaStreamComponent::stream):
3244         (WebCore::MediaStreamComponent::setStream):
3245         (WebCore::MediaStreamComponent::MediaStreamComponent):
3246         * platform/mediastream/MediaStreamDescriptor.h:
3247         (WebCore::MediaStreamDescriptor::MediaStreamDescriptor):
3248
3249 2013-01-29  Alec Flett  <alecflett@chromium.org>
3250
3251         IndexedDB: Pass metadata in to IDBOpenDBRequest.onUpgradeNeeded/onSuccess
3252         https://bugs.webkit.org/show_bug.cgi?id=103920
3253
3254         Reviewed by Dimitri Glazkov.
3255
3256         Update IDBCallbacks::onSuccess and IDBCallbacks::onUpgradeNeeded to
3257         pass through a metadata parameter. While there, remove the unused
3258         IDBTransactionBackendInterface parameter to onUpgradeNeeded.
3259
3260         As this is another step in the IDB refactor, I've simplified future cleanup
3261         work by making the WebKit API code still use the old API. This
3262         will make it possible to outright remove code on the chromium side rather
3263         than another three-step checkin.
3264
3265         No new tests, as this is more refactoring.
3266
3267         * Modules/indexeddb/IDBCallbacks.h:
3268         (WebCore::IDBCallbacks::onUpgradeNeeded): new method signature.
3269         (WebCore::IDBCallbacks::onSuccess): new method signature.
3270         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
3271         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform):
3272         (WebCore::IDBDatabaseBackendImpl::processPendingCalls):
3273         (WebCore::IDBDatabaseBackendImpl::openConnection):
3274         * Modules/indexeddb/IDBOpenDBRequest.cpp:
3275         (WebCore::IDBOpenDBRequest::onUpgradeNeeded): use passed-in metadata.
3276         (WebCore::IDBOpenDBRequest::onSuccess): use passed-in metadata.
3277         * Modules/indexeddb/IDBOpenDBRequest.h:
3278         (IDBOpenDBRequest):
3279
3280 2013-01-29  Dirk Schulze  <dschulze@adobe.com>
3281
3282         Canvas support for isPointInStroke
3283         https://bugs.webkit.org/show_bug.cgi?id=108185
3284
3285         Reviewed by Dean Jackson.
3286
3287         isPointInStroke(x,y) returns true if a point hits the stroke
3288         with applied stroke styles like dashArray, lineCap, lineJoin, lineWidth.
3289         The syntax is similar to isPointInPath, which returns true if a point hits
3290         the fill area of a path.
3291         Firefox implemented isPointInStroke originally and unprefixed it recently:
3292
3293         https://bugzilla.mozilla.org/show_bug.cgi?id=803124
3294
3295         Test: fast/canvas/canvas-isPointInStroke.html
3296
3297         * html/canvas/CanvasRenderingContext2D.cpp:
3298         (WebCore::CanvasStrokeStyleApplier::strokeStyle): Take dashArray and lineDashOffset into account.
3299         (WebCore):
3300         (WebCore::CanvasRenderingContext2D::isPointInStroke): The implementation of the function.
3301         * html/canvas/CanvasRenderingContext2D.h:
3302         (CanvasRenderingContext2D):
3303         * html/canvas/CanvasRenderingContext2D.idl: Added operation to interface.
3304
3305 2013-01-29  Nate Chapin  <japhet@chromium.org>
3306
3307         Enable reuse of cached main resources
3308         https://bugs.webkit.org/show_bug.cgi?id=105667
3309
3310         Reviewed by Adam Barth.
3311
3312         Test: http/tests/cache/cached-main-resource.html
3313
3314         * WebCore.exp.in:
3315         * dom/Document.cpp:
3316         (WebCore::Document::hasManifest): Returns true if the <html> element has a non-empty manifest attribute.
3317         (WebCore):
3318         * dom/Document.h:
3319         (Document):
3320         * loader/FrameLoader.cpp:
3321         (WebCore::FrameLoader::loadedResourceFromMemoryCache): Don't send delegate callbacks for cache hit here, since
3322             MainResourceLoader will take care of it.
3323         * loader/MainResourceLoader.cpp:
3324         (WebCore::MainResourceLoader::MainResourceLoader):
3325         (WebCore::MainResourceLoader::receivedError):
3326         (WebCore::MainResourceLoader::willSendRequest):
3327         (WebCore::MainResourceLoader::responseReceived): Don't try to cache loads from the application cache.
3328         (WebCore::MainResourceLoader::didFinishLoading): Don't try to cache loads from the application cache.
3329         (WebCore::MainResourceLoader::load): Ensure we create a resource load identifier for cache hits. Also,
3330             ensure we correctly popualate fragment identifiers in the ResourceRequest reported to DocumentLoader.
3331         (WebCore::MainResourceLoader::identifier):
3332         * loader/MainResourceLoader.h: Rename m_substituteDataLoadIdentifier to m_identifierForLoadWithoutResourceLoader
3333             to better describe when it is used.
3334         * loader/cache/CachedRawResource.cpp:
3335         (WebCore::CachedRawResource::didAddClient): Synthesize redirect notifications for cache hits if necessary.
3336         (WebCore::CachedRawResource::willSendRequest): Note the redirects we received.
3337         (WebCore::CachedRawResource::canReuse): Don't reuse a resource if the redirect chain included a "Cache-control: no-store".
3338         * loader/cache/CachedRawResource.h:
3339         (CachedRawResource):
3340         (RedirectPair):
3341         (WebCore::CachedRawResource::RedirectPair::RedirectPair):
3342         * loader/cache/CachedResource.cpp:
3343         (WebCore::CachedResource::addClientToSet): Don't return cached data for a main resource synchronously
3344         * loader/cache/CachedResource.h:
3345         (WebCore::CachedResource::canReuse):
3346         (CachedResource):
3347         * loader/cache/CachedResourceLoader.cpp:
3348         (WebCore::CachedResourceLoader::requestResource): Leave cahce reuse of main resources off for chromium for now.
3349         (WebCore::CachedResourceLoader::determineRevalidationPolicy): Permit cache reuse for main resources.
3350         * testing/Internals.cpp:
3351         (WebCore::Internals::isPreloaded):
3352         (WebCore):
3353         (WebCore::Internals::isLoadingFromMemoryCache):
3354         * testing/Internals.h:
3355         (Internals):
3356         * testing/Internals.idl:
3357
3358 2013-01-29  Min Qin  <qinmin@chromium.org>
3359
3360         Fix a problem that deferred image decoding is enabled for multiframe images
3361         https://bugs.webkit.org/show_bug.cgi?id=108152
3362
3363         Reviewed by Stephen White.
3364
3365         Deferred image decoding should only work for single frame images now.
3366         However, using ImageDecoder::repetitionCount() does not capture all the cases.
3367         Enforce the rule using ImageDecoder::frameCount()==1.
3368         Fixing a failing layout test: platform/chromium/virtual/deferred/fast/images/icon-0colors.html
3369
3370         * platform/graphics/chromium/DeferredImageDecoder.cpp:
3371         (WebCore::DeferredImageDecoder::frameBufferAtIndex):
3372
3373 2013-01-29  Elliott Sprehn  <esprehn@chromium.org>
3374
3375         Move ElementShadow creation to ElementRareData
3376         https://bugs.webkit.org/show_bug.cgi?id=108195
3377
3378         Reviewed by Dimitri Glazkov.
3379
3380         Move the creation of ElementShadow to ElementRareData
3381         for better encapsulation, and get rid of ElementRareData::setShadow.
3382
3383         No new tests, just refactoring.
3384
3385         * dom/Element.cpp:
3386         (WebCore::Element::~Element): Use clearShadow() instead of setShadow which is removed.
3387         (WebCore::Element::shadow):
3388         (WebCore::Element::ensureShadow): Use ElementRareData::ensureShadow().
3389         * dom/ElementRareData.h:
3390         (WebCore::ElementRareData::clearShadow): Added.
3391         (WebCore::ElementRareData::ensureShadow): Added.
3392
3393 2013-01-29  Alpha Lam  <hclam@chromium.org>
3394
3395         [chromium] Unreviewed build fix.
3396
3397         Revert my revert at 141033 which can cause deadlock.
3398
3399         * platform/graphics/chromium/DiscardablePixelRef.cpp:
3400         (WebCore::DiscardablePixelRefAllocator::allocPixelRef):
3401         (WebCore::DiscardablePixelRef::DiscardablePixelRef):
3402         * platform/graphics/chromium/DiscardablePixelRef.h:
3403         (DiscardablePixelRef):
3404
3405 2013-01-29  Joshua Bell  <jsbell@chromium.org>
3406
3407         [Chromium] IndexedDB: Let callers specify reason (error) for aborting transaction
3408         https://bugs.webkit.org/show_bug.cgi?id=107851
3409
3410         Reviewed by Tony Chang.
3411
3412         Internal to the back-end, callers are able to abort transactions and specify a reason
3413         as an IDBDatabaseError, e.g. ConstraintError. Expose this to the WebKit/chromium/public
3414         API so that intermediate layers can specify reasons as well, e.g. QuotaExceededError.
3415
3416         Test will land in Chromium as fix for crbug.com/113118
3417
3418         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
3419         (WebCore::IDBDatabaseBackendImpl::abort): Added overload that takes error.
3420         * Modules/indexeddb/IDBDatabaseBackendImpl.h: Ditto.
3421         * Modules/indexeddb/IDBDatabaseBackendInterface.h: Ditto.
3422
3423 2013-01-29  Victor Carbune  <vcarbune@chromium.org>
3424
3425         Heap-use-after-free in WebCore::RenderTextTrackCue::layout
3426         https://bugs.webkit.org/show_bug.cgi?id=108197
3427
3428         Reviewed by Eric Carlson.
3429
3430         Test: media/track/track-cue-rendering-tree-is-removed-properly.html
3431
3432         * html/HTMLMediaElement.cpp:
3433         (WebCore::HTMLMediaElement::textTrackRemoveCue): Ensure the display tree
3434         is removed when the cue is removed from the list of cues.
3435         * html/track/TextTrackCue.cpp:
3436         (WebCore::TextTrackCue::~TextTrackCue): Enfore display tree removal.
3437
3438 2013-01-29  Eli Fidler  <efidler@rim.com>
3439
3440         On HarfbuzzNG ports, Arabic TATWEEL is not joined.
3441         https://bugs.webkit.org/show_bug.cgi?id=108037
3442
3443         Reviewed by Tony Chang.
3444
3445         The tatweel (U+0640) is being split into a separate run, because its script is USCRIPT_COMMON.
3446         It has script extensions for USCRIPT_ARABIC, so I think it shouldn't trigger a new run.
3447
3448         Test: fast/text/international/arabic-tatweel-join.html
3449
3450         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp:
3451         (WebCore::HarfBuzzShaper::collectHarfBuzzRuns):
3452
3453 2013-01-29  Martin Robinson  <mrobinson@igalia.com>
3454