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