f437580d6e712daea7af9df705d9d1ec34fa1257
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-02-12  Jessie Berlin  <jberlin@apple.com>
2
3         Rollout r142618, it broke all the Mac builds.
4
5         * inspector/HeapGraphSerializer.cpp:
6         (WebCore::HeapGraphSerializer::HeapGraphSerializer):
7         (WebCore::HeapGraphSerializer::pushUpdate):
8         (WebCore::HeapGraphSerializer::reportNode):
9         (WebCore::HeapGraphSerializer::toNodeId):
10         (WebCore::HeapGraphSerializer::addRootNode):
11         * inspector/HeapGraphSerializer.h:
12         (WebCore):
13         (HeapGraphSerializer):
14         * inspector/InspectorMemoryAgent.cpp:
15         (WebCore::InspectorMemoryAgent::getProcessMemoryDistributionImpl):
16
17 2013-02-12  Rafael Weinstein  <rafaelw@chromium.org>
18
19         [HTMLTemplateElement] <template> inside of <head> may not create <body> if EOF is hit
20         https://bugs.webkit.org/show_bug.cgi?id=109338
21
22         Reviewed by Adam Barth.
23
24         This patch adds the logic to clear the stack of open elements back to the first <template> when EOF
25         is hit. This allows a <body> to be generated if the initial <template> was opened inside of <head>.
26
27         Tests added to html5lib.
28
29         * html/parser/HTMLTreeBuilder.cpp:
30         (WebCore):
31         (WebCore::HTMLTreeBuilder::popAllTemplates):
32         (WebCore::HTMLTreeBuilder::processEndTag):
33         (WebCore::HTMLTreeBuilder::processEndOfFile):
34         * html/parser/HTMLTreeBuilder.h:
35         (HTMLTreeBuilder):
36
37 2013-02-12  Dominic Mazzoni  <dmazzoni@google.com>
38
39         ASSERTION FAILED: i < size(), UNKNOWN in WebCore::AccessibilityMenuListPopup::didUpdateActiveOption
40         https://bugs.webkit.org/show_bug.cgi?id=109452
41
42         Reviewed by Chris Fleizach.
43
44         Send the accessibility childrenChanged notification in
45         HTMLSelectElement::setRecalcListItems instead of in childrenChanged
46         so that all possible codepaths are caught.
47
48         Test: accessibility/insert-selected-option-into-select-causes-crash.html
49
50         * html/HTMLSelectElement.cpp:
51         (WebCore::HTMLSelectElement::childrenChanged):
52         (WebCore::HTMLSelectElement::setRecalcListItems):
53
54 2013-02-12  Peter Rybin  <prybin@chromium.org>
55
56         Web Inspector: for event listener provide handler function value in protocol and in UI
57         https://bugs.webkit.org/show_bug.cgi?id=109284
58
59         Reviewed by Yury Semikhatsky.
60
61         The feature implies that we include a real handler function value into event listener description.
62         Protocol description, inspector DOM agent (with V8 and JSC backends) and front-end is patched accordingly.
63
64         * bindings/js/ScriptEventListener.cpp:
65         (WebCore::eventListenerHandler):
66         (WebCore):
67         (WebCore::eventListenerHandlerScriptState):
68         * bindings/js/ScriptEventListener.h:
69         (WebCore):
70         * bindings/v8/ScriptEventListener.cpp:
71         (WebCore::eventListenerHandler):
72         (WebCore):
73         (WebCore::eventListenerHandlerScriptState):
74         * bindings/v8/ScriptEventListener.h:
75         (WebCore):
76         * inspector/Inspector.json:
77         * inspector/InspectorDOMAgent.cpp:
78         (WebCore::InspectorDOMAgent::getEventListenersForNode):
79         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
80         * inspector/InspectorDOMAgent.h:
81         (InspectorDOMAgent):
82         * inspector/front-end/DOMAgent.js:
83         (WebInspector.DOMNode.prototype.eventListeners):
84         * inspector/front-end/EventListenersSidebarPane.js:
85         (WebInspector.EventListenersSidebarPane.prototype.update):
86         (.):
87
88 2013-02-12  Yury Semikhatsky  <yurys@chromium.org>
89
90         Web Inspector: add initial implementation of native memory graph to Timeline
91         https://bugs.webkit.org/show_bug.cgi?id=109578
92
93         Reviewed by Alexander Pavlov.
94
95         This change adds inital implementation of native memory graph UI. The graph
96         will be shown in the same place as DOM counters graph on the Timeline panel.
97
98         Added NativeMemoryGraph.js that reuses parts of DOM counters graph
99         implementation. MemoryStatistics.js was refactor to allow sharing
100         more code between DOM counters and native memory graph.
101
102         * WebCore.gypi:
103         * WebCore.vcproj/WebCore.vcproj:
104         * inspector/compile-front-end.py:
105         * inspector/front-end/MemoryStatistics.js:
106         (WebInspector.MemoryStatistics):
107         (WebInspector.MemoryStatistics.prototype._createCurrentValuesBar):
108         (WebInspector.MemoryStatistics.prototype._createCounterUIList):
109         (WebInspector.MemoryStatistics.prototype._createCounterUIList.getNodeCount):
110         (WebInspector.MemoryStatistics.prototype._createCounterUIList.getListenerCount):
111         (WebInspector.MemoryStatistics.prototype._canvasHeight):
112         (WebInspector.MemoryStatistics.prototype._updateSize):
113         (WebInspector.MemoryStatistics.prototype._highlightCurrentPositionOnGraphs):
114         (WebInspector.MemoryStatistics.prototype._drawMarker):
115         * inspector/front-end/NativeMemoryGraph.js: Added.
116         (WebInspector.NativeMemoryGraph):
117         (WebInspector.NativeMemoryCounterUI):
118         (WebInspector.NativeMemoryCounterUI.prototype._hslToString):
119         (WebInspector.NativeMemoryCounterUI.prototype.updateCurrentValue):
120         (WebInspector.NativeMemoryCounterUI.prototype.clearCurrentValueAndMarker):
121         (WebInspector.NativeMemoryGraph.prototype._createCurrentValuesBar):
122         (WebInspector.NativeMemoryGraph.prototype._createCounterUIList.getCounterValue):
123         (WebInspector.NativeMemoryGraph.prototype._createCounterUIList):
124         (WebInspector.NativeMemoryGraph.prototype._canvasHeight):
125         (WebInspector.NativeMemoryGraph.prototype._onRecordAdded.addStatistics):
126         (WebInspector.NativeMemoryGraph.prototype._onRecordAdded):
127         (WebInspector.NativeMemoryGraph.prototype._draw):
128         (WebInspector.NativeMemoryGraph.prototype._clearCurrentValueAndMarker):
129         (WebInspector.NativeMemoryGraph.prototype._updateCurrentValue):
130         (WebInspector.NativeMemoryGraph.prototype._restoreImageUnderMarker):
131         (WebInspector.NativeMemoryGraph.prototype._saveImageUnderMarker):
132         (WebInspector.NativeMemoryGraph.prototype._drawMarker):
133         (WebInspector.NativeMemoryGraph.prototype._maxCounterValue):
134         (WebInspector.NativeMemoryGraph.prototype._resetTotalValues):
135         (WebInspector.NativeMemoryGraph.prototype.valueGetter):
136         (WebInspector.NativeMemoryGraph.prototype._drawGraph):
137         (WebInspector.NativeMemoryGraph.prototype._discardImageUnderMarker):
138         * inspector/front-end/TimelinePanel.js:
139         * inspector/front-end/WebKit.qrc:
140         * inspector/front-end/timelinePanel.css:
141         (#memory-graphs-canvas-container.dom-counters .resources-dividers):
142         (.memory-category-value):
143
144 2013-02-12  Andrey Lushnikov  <lushnikov@chromium.org>
145
146         Web Inspector: refactor some reusable functionality from BraceHighlighter
147         https://bugs.webkit.org/show_bug.cgi?id=109574
148
149         Reviewed by Pavel Feldman.
150
151         New test: inspector/editor/text-editor-brace-highlighter.html
152
153         Extract functionality which, for given line and cursor position, will
154         return position for a brace that should be highlighted. Add a layout
155         test to verify brace highlighter funcionality.
156
157         * inspector/front-end/DefaultTextEditor.js:
158         (WebInspector.TextEditorMainPanel.BraceHighlightController.prototype.activeBraceColumnForCursorPosition):
159         (WebInspector.TextEditorMainPanel.BraceHighlightController.prototype.handleSelectionChange):
160         * inspector/front-end/TextUtils.js:
161         (WebInspector.TextUtils.isOpeningBraceChar):
162         (WebInspector.TextUtils.isClosingBraceChar):
163         (WebInspector.TextUtils.isBraceChar):
164
165 2013-02-12  Ilya Tikhonovsky  <loislo@chromium.org>
166
167         Web Inspector: Native Memory Instrumentation: reportLeaf method doesn't report the leaf node properly.
168         https://bugs.webkit.org/show_bug.cgi?id=109554
169
170         In some cases leaves have no pointer so with the old schema we can't generate nodeId for them because we
171         can't insert 0 into hashmap. It happens when we call addPrivateBuffer method.
172
173         Drive by fix: I introduced a client interface for the HeapGraphSerializer.
174         It helps me to do the tests for the serializer.
175
176         Reviewed by Yury Semikhatsky.
177
178         It is covered by newly added tests in TestWebKitAPI.
179
180         * inspector/HeapGraphSerializer.cpp:
181         (WebCore::HeapGraphSerializer::HeapGraphSerializer):
182         (WebCore::HeapGraphSerializer::pushUpdate):
183         (WebCore::HeapGraphSerializer::reportNode):
184         (WebCore::HeapGraphSerializer::toNodeId):
185         (WebCore::HeapGraphSerializer::addRootNode):
186         * inspector/HeapGraphSerializer.h:
187         (HeapGraphSerializerClient):
188         (WebCore::HeapGraphSerializerClient::~HeapGraphSerializerClient):
189         (HeapGraphSerializer):
190         * inspector/InspectorMemoryAgent.cpp:
191         (WebCore::InspectorMemoryAgent::getProcessMemoryDistributionImpl):
192
193 2013-02-12  Vsevolod Vlasov  <vsevik@chromium.org>
194
195         Web Inspector: Introduce version controller to migrate settings versions.
196         https://bugs.webkit.org/show_bug.cgi?id=109553
197
198         Reviewed by Yury Semikhatsky.
199
200         This patch introduces version controller that could be used to migrate inspector settings.
201
202         Test: inspector/version-controller.html
203
204         * inspector/front-end/Settings.js:
205         (WebInspector.Settings):
206         (WebInspector.VersionController):
207         (WebInspector.VersionController.prototype.set _methodsToRunToUpdateVersion):
208         (WebInspector.VersionController.prototype._updateVersionFrom0To1):
209         * inspector/front-end/inspector.js:
210
211 2013-02-12  Vsevolod Vlasov  <vsevik@chromium.org>
212
213         Web Inspector: File system should produce more verbose error messages and recover from errors
214         https://bugs.webkit.org/show_bug.cgi?id=109571
215
216         Reviewed by Alexander Pavlov.
217
218         Error handler prints original file system call params now.
219         Added callbacks to error handler to recover from errors.
220
221         * inspector/front-end/FileSystemProjectDelegate.js:
222         (WebInspector.FileSystemProjectDelegate.prototype.contentCallback):
223         (WebInspector.FileSystemProjectDelegate.prototype.searchInFileContent):
224         (WebInspector.FileSystemUtils.errorMessage):
225         (.fileSystemLoaded):
226         (.fileEntryLoaded):
227         (.errorHandler):
228         (WebInspector.FileSystemUtils.requestFileContent):
229         (WebInspector.FileSystemUtils.setFileContent):
230         (WebInspector.FileSystemUtils._readDirectory):
231         (.innerCallback):
232         (WebInspector.FileSystemUtils._requestEntries):
233
234 2013-02-12  Vsevolod Vlasov  <vsevik@chromium.org>
235
236         Web Inspector: Get rid of unnecessary complexity in FileSystemUtil: remove _getDirectory() method.
237         https://bugs.webkit.org/show_bug.cgi?id=109567
238
239         Reviewed by Alexander Pavlov.
240
241         The code in this method was redundant as the same result could be achieved by using File System API directly.
242
243         * inspector/front-end/FileSystemProjectDelegate.js:
244
245 2013-02-12  Alexander Pavlov  <apavlov@chromium.org>
246
247         Web Inspector: [SuggestBox] SuggestBox not hidden when prefix is empty and there is preceding input
248         https://bugs.webkit.org/show_bug.cgi?id=109568
249
250         Reviewed by Vsevolod Vlasov.
251
252         The suggestbox would get hidden in the case of empty input, yet it should get hidden
253         in the case of empty user-entered prefix (which is a wider notion.)
254
255         * inspector/front-end/TextPrompt.js:
256         (WebInspector.TextPrompt.prototype.complete):
257
258 2013-02-12  Andrey Lushnikov  <lushnikov@chromium.org>
259
260         Web Inspector: separate SuggestBox from TextPrompt
261         https://bugs.webkit.org/show_bug.cgi?id=109430
262
263         Reviewed by Alexander Pavlov.
264
265         Create WebInspector.SuggestBoxDelegate interface and
266         refactor TextPrompt to use this interface. Separate SuggestBox into
267         WebInspector.SuggestBox namespace and put it into its own file.
268
269         No new tests: no change in behaviour.
270
271         * WebCore.gypi:
272         * WebCore.vcproj/WebCore.vcproj:
273         * inspector/compile-front-end.py:
274         * inspector/front-end/SuggestBox.js: Added.
275         (WebInspector.SuggestBoxDelegate):
276         (WebInspector.SuggestBoxDelegate.prototype.applySuggestion):
277         (WebInspector.SuggestBoxDelegate.prototype.acceptSuggestion):
278         (WebInspector.SuggestBoxDelegate.prototype.userEnteredText):
279         (WebInspector.SuggestBox):
280         (WebInspector.SuggestBox.prototype.get visible):
281         (WebInspector.SuggestBox.prototype.get hasSelection):
282         (WebInspector.SuggestBox.prototype._onscrollresize):
283         (WebInspector.SuggestBox.prototype._updateBoxPositionWithExistingAnchor):
284         (WebInspector.SuggestBox.prototype._updateBoxPosition):
285         (WebInspector.SuggestBox.prototype._onboxmousedown):
286         (WebInspector.SuggestBox.prototype.hide):
287         (WebInspector.SuggestBox.prototype.removeFromElement):
288         (WebInspector.SuggestBox.prototype._applySuggestion):
289         (WebInspector.SuggestBox.prototype.acceptSuggestion):
290         (WebInspector.SuggestBox.prototype._selectClosest):
291         (WebInspector.SuggestBox.prototype.updateSuggestions):
292         (WebInspector.SuggestBox.prototype._onItemMouseDown):
293         (WebInspector.SuggestBox.prototype._createItemElement):
294         (WebInspector.SuggestBox.prototype._updateItems):
295         (WebInspector.SuggestBox.prototype._selectItem):
296         (WebInspector.SuggestBox.prototype._canShowBox):
297         (WebInspector.SuggestBox.prototype._rememberRowCountPerViewport):
298         (WebInspector.SuggestBox.prototype._completionsReady):
299         (WebInspector.SuggestBox.prototype.upKeyPressed):
300         (WebInspector.SuggestBox.prototype.downKeyPressed):
301         (WebInspector.SuggestBox.prototype.pageUpKeyPressed):
302         (WebInspector.SuggestBox.prototype.pageDownKeyPressed):
303         (WebInspector.SuggestBox.prototype.enterKeyPressed):
304         (WebInspector.SuggestBox.prototype.tabKeyPressed):
305         * inspector/front-end/TextPrompt.js:
306         (WebInspector.TextPrompt.prototype.userEnteredText):
307         (WebInspector.TextPrompt.prototype._attachInternal):
308         (WebInspector.TextPrompt.prototype._completionsReady):
309         (WebInspector.TextPrompt.prototype.applySuggestion):
310         (WebInspector.TextPrompt.prototype._applySuggestion):
311         (WebInspector.TextPrompt.prototype.enterKeyPressed):
312         (WebInspector.TextPrompt.prototype.upKeyPressed):
313         (WebInspector.TextPrompt.prototype.downKeyPressed):
314         (WebInspector.TextPrompt.prototype.pageUpKeyPressed):
315         (WebInspector.TextPrompt.prototype.pageDownKeyPressed):
316         * inspector/front-end/WebKit.qrc:
317         * inspector/front-end/inspector.html:
318
319 2013-02-12  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
320
321         [TexMap] Apply frames-per-second debug counter to WK1.
322         https://bugs.webkit.org/show_bug.cgi?id=109540
323
324         Reviewed by Noam Rosenthal.
325
326         Adds basysKom copyright info to TextureMapperFPSCounter header.
327
328         * platform/graphics/texmap/TextureMapperFPSCounter.cpp:
329         * platform/graphics/texmap/TextureMapperFPSCounter.h:
330
331 2013-02-12  Sheriff Bot  <webkit.review.bot@gmail.com>
332
333         Unreviewed, rolling out r142531.
334         http://trac.webkit.org/changeset/142531
335         https://bugs.webkit.org/show_bug.cgi?id=109569
336
337         Causes html5lib/run-template layout test to crash. (Requested
338         by atwilson_ on #webkit).
339
340         * html/parser/HTMLTreeBuilder.cpp:
341         (WebCore::HTMLTreeBuilder::processTemplateEndTag):
342         (WebCore::HTMLTreeBuilder::processColgroupEndTagForInColumnGroup):
343         (WebCore::HTMLTreeBuilder::processEndOfFile):
344         * html/parser/HTMLTreeBuilder.h:
345         (HTMLTreeBuilder):
346
347 2013-02-12  Zan Dobersek  <zdobersek@igalia.com>
348
349         [GTK] Enable CSS image-set support in development builds
350         https://bugs.webkit.org/show_bug.cgi?id=109475
351
352         Reviewed by Martin Robinson.
353
354         No new tests - majority of the related tests now passes.
355
356         * GNUmakefile.features.am.in: Add the feature define for the CSS image-set feature
357         with the define value defaulting to 0. The value gets overridden with 1 in development
358         builds, meaning the feature is enabled under that configuration.
359
360 2013-02-12  Zan Dobersek  <zdobersek@igalia.com>
361
362         [GTK] Enable DOM4 events constructors in development builds
363         https://bugs.webkit.org/show_bug.cgi?id=109471
364
365         Reviewed by Martin Robinson.
366
367         No new tests - the related tests now pass.
368
369         * GNUmakefile.features.am.in: Add the feature define for the DOM4 events
370         constructors feature, its value defaulting to 0. This value is overridden
371         with 1 in development builds, effectively enabling the feature.
372
373 2013-02-12  Zan Dobersek  <zdobersek@igalia.com>
374
375         Unreviewed build fix for the GTK port after r142595.
376         Adding the TextureMapperFPSCounter files to the list of build targets
377         in case of using the OpenGL texture mapper.
378
379         * GNUmakefile.list.am:
380
381 2013-02-12  Andrey Kosyakov  <caseq@chromium.org>
382
383         Web Inspector: fix closure compiler warnings in extension server and API
384         https://bugs.webkit.org/show_bug.cgi?id=109563
385
386         Reviewed by Vsevolod Vlasov.
387
388         * inspector/front-end/ExtensionAPI.js: drive-by: make sure we fail if extensionServer is not defined in outer scope.
389         * inspector/front-end/ExtensionServer.js:
390         (WebInspector.ExtensionServer.prototype.):
391         (WebInspector.ExtensionServer.prototype._onEvaluateOnInspectedPage):
392         * inspector/front-end/externs.js: add extensionServer
393
394 2013-02-12  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
395
396         Unreviewed. Fix !ENABLE(INSPECTOR) builds after r142575
397
398         * inspector/InspectorInstrumentation.h:
399         (WebCore::InspectorInstrumentation::willDispatchEvent):
400
401 2013-02-12  Andrey Lushnikov  <lushnikov@chromium.org>
402
403         Web Inspector: move showWhitespace option into experiments
404         https://bugs.webkit.org/show_bug.cgi?id=109552
405
406         Reviewed by Vsevolod Vlasov.
407
408         Remove "show whitespace" setting and add it to experiments.
409
410         No new tests: fixed an existing test to verify changes.
411
412         * English.lproj/localizedStrings.js:
413         * inspector/front-end/DefaultTextEditor.js:
414         (WebInspector.TextEditorMainPanel):
415         (WebInspector.TextEditorMainPanel.prototype.wasShown):
416         (WebInspector.TextEditorMainPanel.prototype.willHide):
417         * inspector/front-end/Settings.js:
418         (WebInspector.ExperimentsSettings):
419         * inspector/front-end/SettingsScreen.js:
420         (WebInspector.GenericSettingsTab):
421
422 2013-02-12  Tamas Czene  <tczene@inf.u-szeged.hu>
423
424         Add error checking into OpenCL version of SVG filters.
425         https://bugs.webkit.org/show_bug.cgi?id=107444
426
427         Reviewed by Zoltan Herczeg.
428
429         In case of an error the program runs through all the remaining filters by doing nothing. 
430         After that deletes the results of every filter and starts software rendering.
431
432         * platform/graphics/filters/FilterEffect.cpp:
433         (WebCore):
434         (WebCore::FilterEffect::applyAll): At software rendering this is a simple inline methode, but at OpenCL rendering it releases OpenCL things. If we have an error remove filter's results and start software rendering.
435         (WebCore::FilterEffect::clearResultsRecursive):
436         (WebCore::FilterEffect::openCLImageToImageBuffer):
437         (WebCore::FilterEffect::createOpenCLImageResult):
438         (WebCore::FilterEffect::transformResultColorSpace):
439         * platform/graphics/filters/FilterEffect.h:
440         (FilterEffect):
441         (WebCore::FilterEffect::applyAll):
442         * platform/graphics/gpu/opencl/FilterContextOpenCL.cpp:
443         (WebCore::FilterContextOpenCL::isFailed):
444         (WebCore):
445         (WebCore::FilterContextOpenCL::freeResources):
446         (WebCore::FilterContextOpenCL::destroyContext):
447         (WebCore::FilterContextOpenCL::compileTransformColorSpaceProgram):
448         (WebCore::FilterContextOpenCL::openCLTransformColorSpace):
449         (WebCore::FilterContextOpenCL::compileProgram):
450         (WebCore::FilterContextOpenCL::freeResource):
451         * platform/graphics/gpu/opencl/FilterContextOpenCL.h:
452         (WebCore::FilterContextOpenCL::FilterContextOpenCL):
453         (WebCore::FilterContextOpenCL::setInError):
454         (WebCore::FilterContextOpenCL::inError):
455         (FilterContextOpenCL):
456         (WebCore::FilterContextOpenCL::RunKernel::RunKernel):
457         (WebCore::FilterContextOpenCL::RunKernel::addArgument):
458         (WebCore::FilterContextOpenCL::RunKernel::run):
459         (RunKernel):
460         * platform/graphics/gpu/opencl/OpenCLFEColorMatrix.cpp:
461         (WebCore::FilterContextOpenCL::compileFEColorMatrix):
462         (WebCore::FEColorMatrix::platformApplyOpenCL):
463         * platform/graphics/gpu/opencl/OpenCLFETurbulence.cpp:
464         (WebCore::FilterContextOpenCL::compileFETurbulence):
465         (WebCore::FETurbulence::platformApplyOpenCL):
466         * rendering/svg/RenderSVGResourceFilter.cpp:
467         (WebCore::RenderSVGResourceFilter::postApplyResource):
468
469 2013-02-12  Huang Dongsung  <luxtella@company100.net>
470
471         [TexMap] Apply frames-per-second debug counter to WK1.
472         https://bugs.webkit.org/show_bug.cgi?id=109540
473
474         Reviewed by Noam Rosenthal.
475
476         r142524 implemented frames-per-second debug counter on WK2. This patch
477         applies frames-per-second debug counter to WK1 also.
478
479         Visual debugging feature, no need for new tests.
480
481         * CMakeLists.txt:
482         * GNUmakefile.list.am:
483         * Target.pri:
484         * platform/graphics/texmap/TextureMapper.h:
485         * platform/graphics/texmap/TextureMapperFPSCounter.cpp: Added.
486         (WebCore):
487         (WebCore::TextureMapperFPSCounter::TextureMapperFPSCounter):
488         (WebCore::TextureMapperFPSCounter::updateFPSAndDisplay):
489         * platform/graphics/texmap/TextureMapperFPSCounter.h: Added.
490         (WebCore):
491         (TextureMapperFPSCounter):
492         * platform/graphics/texmap/TextureMapperGL.cpp:
493         (WebCore):
494         (WebCore::TextureMapperGL::drawNumber):
495           Rename from drawRepaintCounter to drawNumber.
496         * platform/graphics/texmap/TextureMapperGL.h:
497         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
498         (WebCore::TextureMapperImageBuffer::drawNumber):
499         * platform/graphics/texmap/TextureMapperImageBuffer.h:
500         (TextureMapperImageBuffer):
501         * platform/graphics/texmap/TextureMapperTiledBackingStore.cpp:
502         (WebCore::TextureMapperTiledBackingStore::drawRepaintCounter):
503         * platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp:
504         (WebCore::CoordinatedBackingStore::drawRepaintCounter):
505         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
506           Move frames-per-second debug counter code to TextureMapperFPSCounter.
507         (WebCore::CoordinatedGraphicsScene::CoordinatedGraphicsScene):
508         (WebCore::CoordinatedGraphicsScene::paintToCurrentGLContext):
509         (WebCore::CoordinatedGraphicsScene::paintToGraphicsContext):
510         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
511
512 2013-02-11  Yury Semikhatsky  <yurys@chromium.org>
513
514         Web Inspector: stack trace is cut at native bind if inspector is closed
515         https://bugs.webkit.org/show_bug.cgi?id=109427
516
517         Reviewed by Pavel Feldman.
518
519         Only top frame is collected instead of full stack trace when inspector
520         front-end is closed to avoid expensive operations when exceptions are
521         thrown.
522
523         Test: http/tests/inspector-enabled/console-exception-while-no-inspector.html
524
525         * inspector/InspectorConsoleAgent.cpp:
526         (WebCore::InspectorConsoleAgent::addMessageToConsole):
527
528 2013-02-12  Kent Tamura  <tkent@chromium.org>
529
530         INPUT_MULTIPLE_FIELDS_UI: Mouse click not on sub-fields in multiple fields input  should not move focus
531         https://bugs.webkit.org/show_bug.cgi?id=109544
532
533         Reviewed by Kentaro Hara.
534
535         This is similar to Bug 108914, "Should not move focus if the element
536         already has focus." We fixed a focus() case in Bug 108914. However we
537         still have the problem in a case of focusing by mouse click.
538
539         The fix for Bug 108914 intercepted focus() function to change the
540         behavior. However focus-by-click doesn't call focus(), but calls
541         FocusController::setFocusedNode. To fix this problem, we introduce
542         oldFocusedNode argument to handleFocusEvent, and
543         BaseMultipleFieldsDateAndTimeInputType::handleFocusEvent restores the
544         focus to oldFocusedNode if oldFocusedNode is one of sub-fields.
545         handleFocusEvent is called whenever the focused node is changed.
546
547         We don't need InputType::willCancelFocus any more because the new code
548         in handleFocusEvent covers it.
549
550         Tests: Update fast/forms/time-multiple-fields/time-multiple-fields-focus.html.
551
552         * html/HTMLTextFormControlElement.h:
553         (WebCore::HTMLTextFormControlElement::handleFocusEvent):
554         Add oldFocusedNode argument.
555         * html/HTMLTextFormControlElement.cpp:
556         (WebCore::HTMLTextFormControlElement::dispatchFocusEvent):
557         Pass oldFocusedNode to handleFocusEvent.
558
559         * html/HTMLInputElement.h:
560         (HTMLInputElement):
561          - Add oldFocusedNode argument to handleFocusEvent.
562          - Remove focus() override.
563         * html/HTMLInputElement.cpp: Remove focus() override.
564         (WebCore::HTMLInputElement::handleFocusEvent):
565         Pass oldFocusedNode to InputType::handleFocusEvent.
566         * html/InputType.cpp: Remove willCancelFocus.
567         (WebCore::InputType::handleFocusEvent):
568         Add oldFocusedNode argument.
569         * html/InputType.h:
570         (InputType): Ditto.
571         * html/PasswordInputType.cpp:
572         (WebCore::PasswordInputType::handleFocusEvent): Ditto.
573         * html/PasswordInputType.h:
574         (PasswordInputType): Ditto.
575
576         * html/BaseMultipleFieldsDateAndTimeInputType.h:
577         (BaseMultipleFieldsDateAndTimeInputType):
578         Remove willCancelFocus, and add oldFocusedNode argument to handleFocusEvent.
579         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
580         (WebCore::BaseMultipleFieldsDateAndTimeInputType::handleFocusEvent):
581         Pass oldFocusedNode to DateTimeEditElement::focusByOwner if the
582         direction is FocusDirectionNone.
583
584         * html/shadow/DateTimeEditElement.h:
585         (DateTimeEditElement): Add oldFocusedNode argument to focusByOwner.
586         * html/shadow/DateTimeEditElement.cpp:
587         (WebCore::DateTimeEditElement::focusByOwner):
588         If oldFocusedNode is one of sub-fields, focus on it again.
589
590 2013-02-12  Takashi Sakamoto  <tasak@google.com>
591
592         [Refactoring] Make m_selectorChecker in StyleResolver an on-stack object.
593         https://bugs.webkit.org/show_bug.cgi?id=108595
594
595         Reviewed by Eric Seidel.
596
597         StyleResolver uses SelectorChecker's mode to change its resolving mode.
598         However it is a state of StyleResolver. StyleResolver should have the
599         mode and make SelectorChecker instance on a stack while required.
600
601         No new tests, just refactoring.
602
603         * css/SelectorChecker.cpp:
604         (WebCore::SelectorChecker::fastCheckRightmostSelector):
605         (WebCore::SelectorChecker::fastCheck):
606         (WebCore::SelectorChecker::commonPseudoClassSelectorMatches):
607         (WebCore::SelectorChecker::matchesFocusPseudoClass):
608         Changed to static class function, because these methods never use
609         "this".
610         (WebCore):
611         * css/SelectorChecker.h:
612         (SelectorChecker):
613         * css/StyleResolver.cpp:
614         (WebCore::StyleResolver::StyleResolver):
615         (WebCore::StyleResolver::collectMatchingRules):
616         Now, matchesFocusPseudoClass is not a static method of
617         SelectorChecker, so replaced "m_selectorChecker." with
618         "SelectorChecker::".
619         (WebCore::StyleResolver::sortAndTransferMatchedRules):
620         (WebCore::StyleResolver::collectMatchingRulesForList):
621         (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
622         (WebCore::StyleResolver::matchUARules):
623         (WebCore::StyleResolver::adjustRenderStyle):
624         (WebCore::StyleResolver::pseudoStyleRulesForElement):
625         Use m_mode instead of m_selectorChecker.mode().
626         Also use document()->inQuirksMode() instead of
627         m_selectoChecker.strictParsing().
628         (WebCore::StyleResolver::ruleMatches):
629         (WebCore::StyleResolver::checkRegionSelector):
630         Created an on-stack SelectorChecker object and used it to check
631         selectors.
632         * css/StyleResolver.h:
633         (WebCore::StyleResolver::State::State):
634         Added m_mode, this keeps m_selectorChecker's mode.
635         (State):
636         (StyleResolver):
637         Removed m_selectorChecker.
638
639 2013-02-11  Viatcheslav Ostapenko  <sl.ostapenko@samsung.com>
640
641         [Qt][EFL][WebGL] Minor refactoring of GraphicsSurface/GraphicsSurfaceGLX
642         https://bugs.webkit.org/show_bug.cgi?id=108686
643
644         Reviewed by Noam Rosenthal.
645
646         Remove unused platformSurface()/m_platformSurface from GraphicsSurface.
647         Move m_texture from GraphicsSurface to GLX GraphicsSurfacePrivate to match
648         Win and Mac implementations.
649
650         No new tests, refactoring only.
651
652         * platform/graphics/surfaces/GraphicsSurface.cpp:
653         (WebCore::GraphicsSurface::GraphicsSurface):
654         * platform/graphics/surfaces/GraphicsSurface.h:
655         (GraphicsSurface):
656         * platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp:
657         (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
658         (WebCore::GraphicsSurfacePrivate::swapBuffers):
659         (WebCore::GraphicsSurfacePrivate::surface):
660         (GraphicsSurfacePrivate):
661         (WebCore::GraphicsSurfacePrivate::textureID):
662         (WebCore::GraphicsSurfacePrivate::clear):
663         (WebCore::GraphicsSurface::platformExport):
664         (WebCore::GraphicsSurface::platformGetTextureID):
665         (WebCore::GraphicsSurface::platformSwapBuffers):
666         (WebCore::GraphicsSurface::platformCreate):
667         (WebCore::GraphicsSurface::platformImport):
668         (WebCore::GraphicsSurface::platformDestroy):
669
670 2013-02-11  Viatcheslav Ostapenko  <sl.ostapenko@samsung.com>
671
672         [EFL][WebGL] WebGL content is not painted after resizing the viewport.
673         https://bugs.webkit.org/show_bug.cgi?id=106358
674
675         Reviewed by Noam Rosenthal.
676
677         When page size changes and layer parameters get updated LayerTreeRenderer::setLayerState
678         clears the layer backing store and detaches the canvas surface from the layer. If the layer
679         size is not changed then the canvas is not recreated. This leaves the canvas detached from
680         the layer, but still referenced from m_surfaceBackingStores.
681         Don't assign layer backing store to layer in assignImageBackingToLayer if there is a canvas
682         surface already attached to the layer.
683
684         Test: fast/canvas/webgl/webgl-layer-update.html
685
686         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
687         (WebCore::CoordinatedGraphicsScene::setLayerState):
688         (WebCore::CoordinatedGraphicsScene::assignImageBackingToLayer):
689         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
690
691 2013-02-11  Eric Carlson  <eric.carlson@apple.com>
692
693         [Mac] Track language selection should be sticky
694         https://bugs.webkit.org/show_bug.cgi?id=109466
695
696         Reviewed by Dean Jackson.
697
698         Choosing a text track from the caption menu should make that track's language the
699         preferred caption language. Turning captions off from the menu should disable captions
700         in videos loaded subsequently.
701
702         OS X has system support for these settings, so changes made by DRT should not change the
703         settings on the user's system. Add support for all other ports in DRT only.
704
705         Test: media/track/track-user-preferences.html
706
707         * WebCore.exp.in: Export PageGroup::captionPreferences().
708
709         * html/HTMLMediaElement.cpp:
710         (WebCore::HTMLMediaElement::HTMLMediaElement): Use page()->group().captionPreferences().
711         (WebCore::HTMLMediaElement::attach): Ditto.
712         (WebCore::HTMLMediaElement::detach): Ditto.
713         (WebCore::HTMLMediaElement::userPrefersCaptions): Ditto.
714         (WebCore::HTMLMediaElement::configureTextTrackGroup): Ditto. Update for 
715             preferredLanguageFromList change.
716         (WebCore::HTMLMediaElement::toggleTrackAtIndex): Set user prefs for captions visible and
717             caption language as appropriate.
718
719         * html/shadow/MediaControlElements.cpp:
720         (WebCore::MediaControlClosedCaptionsTrackListElement::defaultEventHandler): Remove unneeded comment.
721         (WebCore::MediaControlTextTrackContainerElement::updateSizes):  Use page()->group().captionPreferences().
722
723         * html/shadow/MediaControlsApple.cpp:
724         (WebCore::MediaControlsApple::closedCaptionTracksChanged): Update caption menu button visibility.
725
726         * page/CaptionUserPreferences.h:
727         (WebCore::CaptionUserPreferences::userPrefersCaptions): Support "testing" mode.
728         (WebCore::CaptionUserPreferences::setUserPrefersCaptions): Ditto.
729         (WebCore::CaptionUserPreferences::registerForPreferencesChangedCallbacks): Ditto.
730         (WebCore::CaptionUserPreferences::unregisterForPreferencesChangedCallbacks): Ditto.
731         (WebCore::CaptionUserPreferences::setPreferredLanguage): Ditto.
732         (WebCore::CaptionUserPreferences::preferredLanguages): Ditto.
733         (WebCore::CaptionUserPreferences::testingMode): Ditto.
734         (WebCore::CaptionUserPreferences::setTestingMode): Ditto.
735         (WebCore::CaptionUserPreferences::CaptionUserPreferences): Ditto.
736
737         * page/CaptionUserPreferencesMac.h:
738         * page/CaptionUserPreferencesMac.mm:
739         (WebCore::CaptionUserPreferencesMac::userPrefersCaptions): Support "testing" mode.
740         (WebCore::CaptionUserPreferencesMac::setUserPrefersCaptions): Ditto.
741         (WebCore::CaptionUserPreferencesMac::userHasCaptionPreferences): Ditto.
742         (WebCore::CaptionUserPreferencesMac::registerForPreferencesChangedCallbacks): Change name from
743             registerForCaptionPreferencesChangedCallbacks. Support "testing" mode.
744         (WebCore::CaptionUserPreferencesMac::unregisterForPreferencesChangedCallbacks):  Change name from
745             unregisterForCaptionPreferencesChangedCallbacks. Support "testing" mode.
746         (WebCore::CaptionUserPreferencesMac::captionsStyleSheetOverride): Support "testing" mode.
747         (WebCore::CaptionUserPreferencesMac::captionFontSizeScale): Ditto.
748         (WebCore::CaptionUserPreferencesMac::setPreferredLanguage): Ditto.
749         (WebCore::CaptionUserPreferencesMac::preferredLanguages): Ditto. Return the platform override when set.
750
751         * page/PageGroup.cpp:
752         (WebCore::PageGroup::registerForCaptionPreferencesChangedCallbacks): Remove because it is already
753             available from the caption preference object.
754         (WebCore::PageGroup::unregisterForCaptionPreferencesChangedCallbacks): Ditto.
755         (WebCore::PageGroup::userPrefersCaptions): Ditto.
756         (WebCore::PageGroup::userHasCaptionPreferences): Ditto.
757         (WebCore::PageGroup::captionFontSizeScale): Ditto.
758         * page/PageGroup.h:
759
760         * platform/Language.cpp:
761         (WebCore::preferredLanguageFromList): Take the list of preferred languages instead of assuming
762             the system list.
763         * platform/Language.h:
764
765         * testing/Internals.cpp:
766         (WebCore::Internals::resetToConsistentState): Disable caption testing mode.
767         (WebCore::Internals::Internals): Enable caption testing mode so the user's system
768             preferences are not modified.
769
770 2013-02-11  Huang Dongsung  <luxtella@company100.net>
771
772         Coordinated Graphics: Make CoordinatedGraphicsScene not know contents size.
773         https://bugs.webkit.org/show_bug.cgi?id=108922
774
775         Reviewed by Noam Rosenthal.
776
777         Currently, CoordinatedGraphicsScene has two methods to know contents
778         size: setContentsSize() and setVisibleContentsRect(). Contents size is
779         used when adjusting a scroll position, but adjustment is not needed
780         because EFL and Qt platform code (currently PageViewportController)
781         already adjusts a scroll position, and it is natural for each platform
782         to be in charge of adjusting. So this patch makes CoordinatedGraphicsScene
783         not know contents size.
784
785         In addition, now DrawingAreaProxy::coordinatedLayerTreeHostProxy() is only used
786         to get CoordinatedGraphicsScene.
787
788         This patch can only be tested manually since there is no automated
789         testing facilities for in-motion touch.
790         Test: ManualTests/fixed-position.html
791               ManualTests/nested-fixed-position.html
792
793         * platform/graphics/texmap/TextureMapperLayer.cpp:
794         (WebCore::TextureMapperLayer::setScrollPositionDeltaIfNeeded):
795         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
796         (WebCore::CoordinatedGraphicsScene::setScrollPosition):
797         (WebCore::CoordinatedGraphicsScene::adjustPositionForFixedLayers):
798         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
799         (CoordinatedGraphicsScene):
800
801 2013-02-11  Huang Dongsung  <luxtella@company100.net>
802
803         Coordinated Graphics: remove the DidChangeScrollPosition message.
804         https://bugs.webkit.org/show_bug.cgi?id=108051
805
806         Reviewed by Noam Rosenthal.
807         Signed off for WebKit2 by Benjamin Poulain.
808
809         Currently, we use the DidChangeScrollPosition message to send the scroll
810         position that WebCore used in this frame to UI Process. We had to have
811         some member variables for the DidChangeScrollPosition message.
812         However, we can send a scroll position via the DidRenderFrame message,
813         because CoordinatedGraphicsScene::m_renderedContentsScrollPosition is
814         updated at the moment of flushing. So we can remove the
815         DidChangeScrollPosition message and some redundant member variables.
816
817         No tests. No change in behavior.
818
819         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
820         (WebCore::CoordinatedGraphicsScene::flushLayerChanges):
821         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
822         (CoordinatedGraphicsScene):
823
824 2013-02-11  Ryosuke Niwa  <rniwa@webkit.org>
825
826         Disable delete button controller on non-Mac ports and delete EditorClient::shouldShowDeleteInterface
827         https://bugs.webkit.org/show_bug.cgi?id=109534
828
829         Reviewed by Anders Carlsson.
830
831         * editing/DeleteButtonController.cpp:
832         (WebCore::DeleteButtonController::show):
833         * editing/Editor.cpp:
834         (WebCore):
835         * editing/Editor.h:
836         (Editor):
837         * loader/EmptyClients.h:
838         (WebCore::EmptyEditorClient::shouldDeleteRange):
839         (EmptyEditorClient):
840         (WebCore::EmptyEditorClient::shouldShowDeleteInterface):
841         * page/EditorClient.h:
842         (EditorClient):
843
844 2013-02-11  Hayato Ito  <hayato@chromium.org>
845
846         Factor EventContext and introduces MouseOrFocusEventContext.
847         https://bugs.webkit.org/show_bug.cgi?id=109278
848
849         Reviewed by Dimitri Glazkov.
850
851         To supoort Touch event retargeting (bug 107800), we have to factor
852         event retargeting code so that it can support not only MouseEvent or FocusEvent,
853         but also other events.
854
855         This is the first attempt to refactor event retargeting code, a
856         separated patch from bug 109156.  EventContext is now factored and
857         MouseOrFocusEventContext was introduced to support MouseEvent or
858         FocusEvent separately.
859
860         In following patches, I'll introduce TouchEventContext and
861         TouchEventDispatchMediator to support Touch event retargeting.
862
863         No new tests. No change in functionality.
864
865         * dom/EventContext.cpp:
866         (WebCore::EventContext::EventContext): Factor relatedTarget out from EventContext into MouseOrFocusEventContext.
867         (WebCore::EventContext::~EventContext):
868         (WebCore):
869         (WebCore::EventContext::handleLocalEvents):
870         (WebCore::EventContext::isMouseOrFocusEventContext):
871         (WebCore::MouseOrFocusEventContext::MouseOrFocusEventContext):  New. Handles MouseEvent's (or FocusEvent's) relatedTarget retargeting.
872         (WebCore::MouseOrFocusEventContext::~MouseOrFocusEventContext):
873         (WebCore::MouseOrFocusEventContext::handleLocalEvents):
874         (WebCore::MouseOrFocusEventContext::isMouseOrFocusEventContext):
875         * dom/EventContext.h:
876         (EventContext):
877         (WebCore::EventContext::node):
878         (WebCore::EventContext::target):
879         (WebCore::EventContext::currentTargetSameAsTarget):
880         (WebCore):
881         (MouseOrFocusEventContext):
882         (WebCore::MouseOrFocusEventContext::relatedTarget):
883         (WebCore::MouseOrFocusEventContext::setRelatedTarget):
884         * dom/EventDispatcher.cpp:
885         (WebCore::EventRelatedTargetAdjuster::adjust):
886         (WebCore::EventDispatcher::adjustRelatedTarget):
887         (WebCore::EventDispatcher::ensureEventPath):  Renamad from ensureEventAncestors. Use the DOM Core terminology.
888         (WebCore::EventDispatcher::dispatchEvent):
889         (WebCore::EventDispatcher::dispatchEventAtCapturing):
890         (WebCore::EventDispatcher::dispatchEventAtTarget):
891         (WebCore::EventDispatcher::dispatchEventAtBubbling):
892         (WebCore::EventDispatcher::dispatchEventPostProcess):
893         (WebCore::EventDispatcher::topEventContext):
894         * dom/EventDispatcher.h:
895         (EventRelatedTargetAdjuster):
896         (EventDispatcher):
897         * inspector/InspectorInstrumentation.cpp:
898         (WebCore):
899         (WebCore::eventHasListeners):
900         (WebCore::InspectorInstrumentation::willDispatchEventImpl):
901         * inspector/InspectorInstrumentation.h:
902         (InspectorInstrumentation):
903         (WebCore::InspectorInstrumentation::willDispatchEvent):
904
905 2013-02-11  peavo@outlook.com  <peavo@outlook.com>
906
907         [Curl] setCookiesFromDOM function does not save cookies to disk.
908         https://bugs.webkit.org/show_bug.cgi?id=109285
909
910         Reviewed by Brent Fulgham.
911
912         Write cookies to disk by using the Curl easy api.
913
914         * platform/network/curl/CookieJarCurl.cpp:
915         (WebCore::setCookiesFromDOM):Write cookie to disk.
916         * platform/network/curl/ResourceHandleManager.cpp:
917         (WebCore::ResourceHandleManager::getCurlShareHandle): Added method to get Curl share handle.
918         (WebCore::ResourceHandleManager::getCookieJarFileName): Added method to get cookie file name.
919         * platform/network/curl/ResourceHandleManager.h: Added methods to get cookie file name, and Curl share handle.
920
921 2013-02-11  Hayato Ito  <hayato@chromium.org>
922
923         Split each RuleSet and feature out from StyleResolver into its own class.
924         https://bugs.webkit.org/show_bug.cgi?id=107777
925
926         Reviewed by Dimitri Glazkov.
927
928         Re-landing r141964, which was reverted in r141973, since r141964 seem to be innocent.
929
930         No tests. No change in behavior.
931
932         * CMakeLists.txt:
933         * GNUmakefile.list.am:
934         * Target.pri:
935         * WebCore.gypi:
936         * WebCore.xcodeproj/project.pbxproj:
937         * css/CSSAllInOne.cpp:
938         * css/DocumentRuleSets.cpp: Added.
939         (WebCore):
940         (WebCore::DocumentRuleSets::DocumentRuleSets):
941         (WebCore::DocumentRuleSets::~DocumentRuleSets):
942         (WebCore::DocumentRuleSets::initUserStyle): New helper to initialize each RuleSets.
943         (WebCore::DocumentRuleSets::collectRulesFromUserStyleSheets): Factored out from StyleResolver.
944         (WebCore::makeRuleSet): Ditto.
945         (WebCore::DocumentRuleSets::resetAuthorStyle): Ditto.
946         (WebCore::DocumentRuleSets::appendAuthorStyleSheets): Ditto.
947         (WebCore::DocumentRuleSets::collectFeatures): Ditto.
948         (WebCore::DocumentRuleSets::reportMemoryUsage): New methods to report memory usage. Factored out from StyleResolver.
949         * css/DocumentRuleSets.h: Added.
950         (WebCore):
951         (DocumentRuleSets):
952         (WebCore::DocumentRuleSets::authorStyle): Moved from StyleResolver.
953         (WebCore::DocumentRuleSets::userStyle): Ditto.
954         (WebCore::DocumentRuleSets::features): Ditto.
955         (WebCore::DocumentRuleSets::sibling): Ditto.
956         (WebCore::DocumentRuleSets::uncommonAttribute): Ditto.
957         * css/StyleResolver.cpp:
958         (WebCore::StyleResolver::StyleResolver):
959         (WebCore::StyleResolver::appendAuthorStyleSheets): Now calls DocumentRuleSets::appendAuthorStyleSheets.
960         (WebCore::StyleResolver::matchAuthorRules): Use m_ruleSets.
961         (WebCore::StyleResolver::matchUserRules): Ditto.
962         (WebCore::StyleResolver::classNamesAffectedByRules): Ditto.
963         (WebCore::StyleResolver::locateCousinList): Ditto.
964         (WebCore::StyleResolver::canShareStyleWithElement): Ditto.
965         (WebCore::StyleResolver::locateSharedStyle): Ditto.
966         (WebCore::StyleResolver::styleForPage): Ditto.
967         (WebCore::StyleResolver::checkRegionStyle): Ditto.
968         (WebCore::StyleResolver::applyProperty): Ditto.
969         (WebCore::StyleResolver::reportMemoryUsage): Now calls DocumentRuleSets::reportMemoryUsage.
970         * css/StyleResolver.h:
971         (WebCore::StyleResolver::scopeResolver):
972         (StyleResolver):
973         (WebCore::StyleResolver::ruleSets): accessor r to DocumentRuleSets.
974         (WebCore::StyleResolver::usesSiblingRules): Use m_ruleSets.
975         (WebCore::StyleResolver::usesFirstLineRules): Ditto.
976         (WebCore::StyleResolver::usesBeforeAfterRules): Ditto.
977         (WebCore::StyleResolver::hasSelectorForAttribute): Ditto.
978         (WebCore::StyleResolver::hasSelectorForClass): Ditto.
979         (WebCore::StyleResolver::hasSelectorForId): Ditto.
980         * dom/DocumentStyleSheetCollection.cpp:
981         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
982
983 2013-02-11  Keishi Hattori  <keishi@webkit.org>
984
985         REGRESSION (r140778):Calendar Picker buttons are wrong when rtl
986         https://bugs.webkit.org/show_bug.cgi?id=109158
987
988         Reviewed by Kent Tamura.
989
990         The calendar picker button's icon and position where wrong when rtl.
991
992
993         Test: platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-ar.html
994
995         * Resources/pagepopups/calendarPicker.css:
996         (.year-month-button-left .year-month-button): Use -webkit-margin-end so the margin is applide to the right side.
997         (.year-month-button-right .year-month-button): Use -webkit-margin-start so the margin is applide to the right side.
998         (.today-clear-area .today-button): Use -webkit-margin-end so the margin is applide to the right side.
999         * Resources/pagepopups/calendarPicker.js:
1000         (YearMonthController.prototype._attachLeftButtonsTo): Flip icon image when rtl.
1001         (YearMonthController.prototype._attachRightButtonsTo): Ditto.
1002
1003 2013-02-11  KwangYong Choi  <ky0.choi@samsung.com>
1004
1005         REGRESSION (r142549): Remove web intents code
1006         https://bugs.webkit.org/show_bug.cgi?id=109532
1007
1008         Reviewed by Nico Weber.
1009
1010         Remove remaning code related to web intents.
1011
1012         No new tests, no change on behavior.
1013
1014         * UseJSC.cmake:
1015         * bindings/js/JSIntentConstructor.cpp: Removed.
1016
1017 2013-02-11  Kenneth Russell  <kbr@google.com>
1018
1019         Add temporary typedef to ANGLEWebKitBridge to support incompatible API upgrade
1020         https://bugs.webkit.org/show_bug.cgi?id=109127
1021
1022         Reviewed by Dean Jackson.
1023
1024         No new tests. Built and tested WebKit and Chromium with this change.
1025
1026         * platform/graphics/ANGLEWebKitBridge.cpp:
1027         (WebCore):
1028             Define temporary typedef spanning int -> size_t change.
1029         (WebCore::getValidationResultValue):
1030         (WebCore::getSymbolInfo):
1031             Use temporary typedef.
1032
1033 2013-02-11  Kentaro Hara  <haraken@chromium.org>
1034
1035         [V8] ScheduledAction::m_context can be empty, so we shouldn't
1036         retrieve an Isolate by using m_context->GetIsolate()
1037         https://bugs.webkit.org/show_bug.cgi?id=109523
1038
1039         Reviewed by Adam Barth.
1040
1041         Chromium bug: https://code.google.com/p/chromium/issues/detail?id=175307#makechanges
1042
1043         Currently ScheduledAction is retrieving an Isolate by using m_context->GetIsolate().
1044         This can crash because ScheduledAction::m_context can be empty. Specifically,
1045         ScheduledAction::m_context is set to ScriptController::currentWorldContext(),
1046         which can return an empty handle when a frame does not exist. In addition,
1047         'if(context.IsEmpty())' in ScheduledAction.cpp implies that it can be empty.
1048
1049         Alternately, we should pass an Isolate explicitly when a ScheduledAction is instantiated.
1050
1051         No tests. The Chromium crash report doesn't provide enough information
1052         to reproduce the bug.
1053
1054         * bindings/v8/ScheduledAction.cpp:
1055         (WebCore::ScheduledAction::ScheduledAction):
1056         (WebCore):
1057         (WebCore::ScheduledAction::~ScheduledAction):
1058         * bindings/v8/ScheduledAction.h:
1059         (ScheduledAction):
1060         * bindings/v8/custom/V8DOMWindowCustom.cpp:
1061         (WebCore::WindowSetTimeoutImpl):
1062         * bindings/v8/custom/V8WorkerContextCustom.cpp:
1063         (WebCore::SetTimeoutOrInterval):
1064
1065 2013-02-11  Adenilson Cavalcanti  <cavalcantii@gmail.com>
1066
1067         Build fix: r142549 broke EFL build
1068         https://bugs.webkit.org/show_bug.cgi?id=109527
1069
1070         Reviewed by Kentaro Hara.
1071
1072         No new tests, no change on behavior.
1073
1074         * CMakeLists.txt:
1075
1076 2013-02-11  Simon Fraser  <simon.fraser@apple.com>
1077
1078         REGRESSION (r142520?): Space no longer scrolls the page
1079         https://bugs.webkit.org/show_bug.cgi?id=109526
1080
1081         Reviewed by Tim Horton.
1082
1083         ScrollingTree::updateTreeFromStateNode() used to bail early when it had
1084         no children (no fixed or sticky elements), but that left updateAfterChildren()
1085         uncalled. Fix by always calling updateAfterChildren(), which updates the scroll
1086         position.
1087
1088         * page/scrolling/ScrollingTree.cpp:
1089         (WebCore::ScrollingTree::updateTreeFromStateNode):
1090
1091 2013-02-11  Tim Horton  <timothy_horton@apple.com>
1092
1093         Remove extra early-return in FrameView::setScrollPosition
1094
1095         Rubber-stamped by Simon Fraser.
1096
1097         * page/FrameView.cpp:
1098         (WebCore::FrameView::setScrollPosition):
1099
1100 2013-02-11  Arko Saha  <arko@motorola.com>
1101
1102         [Microdata] Fix crash after r141034 in chromuim port
1103         https://bugs.webkit.org/show_bug.cgi?id=109514
1104
1105         Reviewed by Ryosuke Niwa.
1106
1107         Added V8SkipVTableValidation extended attribute to skip
1108         VTable validation check for DOMSettableTokenList interface.
1109
1110         This patch fixes below test failures:
1111         Tests: fast/dom/MicroData/domsettabletokenlist-attributes-add-token.html
1112                fast/dom/MicroData/domsettabletokenlist-attributes-out-of-range-index.html
1113                fast/dom/MicroData/element-with-empty-itemprop.html
1114                fast/dom/MicroData/itemprop-add-remove-tokens.html
1115                fast/dom/MicroData/itemprop-for-an-element-must-be-correct.html
1116                fast/dom/MicroData/itemprop-must-be-read-only.html
1117                fast/dom/MicroData/itemprop-reflected-by-itemProp-property.html
1118                fast/dom/MicroData/itemref-add-remove-tokens.html
1119                fast/dom/MicroData/itemref-attribute-reflected-by-itemRef-property.html
1120                fast/dom/MicroData/itemref-for-an-element-must-be-correct.html
1121                fast/dom/MicroData/itemref-must-be-read-only.html
1122                fast/dom/MicroData/itemtype-add-remove-tokens.html
1123                fast/dom/MicroData/itemtype-attribute-test.html
1124                fast/dom/MicroData/microdata-domtokenlist-attribute-add-remove-tokens.html
1125                fast/dom/MicroData/properties-collection-namedgetter-with-invalid-name.html
1126                fast/dom/MicroData/propertynodelist-add-remove-itemprop-tokens.html
1127                fast/dom/MicroData/propertynodelist-add-remove-itemref-tokens.html
1128
1129         * html/DOMSettableTokenList.idl:
1130
1131 2013-02-11  Adam Barth  <abarth@webkit.org>
1132
1133         Load event fires too early with threaded HTML parser (take 2)
1134         https://bugs.webkit.org/show_bug.cgi?id=109485
1135
1136         Reviewed by Eric Seidel.
1137
1138         This patch restores the code that was removed in
1139         http://trac.webkit.org/changeset/142492 and adds code to
1140         DocumentLoader.cpp to avoid the regression.
1141
1142         * dom/Document.cpp:
1143         (WebCore::Document::hasActiveParser):
1144         (WebCore::Document::decrementActiveParserCount):
1145         * loader/DocumentLoader.cpp:
1146         (WebCore::DocumentLoader::isLoadingInAPISense):
1147
1148 2013-02-11  Eric Seidel  <eric@webkit.org>
1149
1150         Fold HTMLTokenizerState back into HTMLTokenizer now that MarkupTokenizerBase is RFG
1151         https://bugs.webkit.org/show_bug.cgi?id=109502
1152
1153         Reviewed by Tony Gentilcore.
1154
1155         Just a search replace of HTMLTokenizerState with HTMLTokenizer and moving the enum.
1156         This restores us to the peacefull world pre-NEW_XML.
1157
1158         * html/parser/BackgroundHTMLParser.cpp:
1159         (WebCore::BackgroundHTMLParser::forcePlaintextForTextDocument):
1160         (WebCore::BackgroundHTMLParser::simulateTreeBuilder):
1161         * html/parser/HTMLDocumentParser.cpp:
1162         (WebCore::tokenizerStateForContextElement):
1163         (WebCore::HTMLDocumentParser::forcePlaintextForTextDocument):
1164         (WebCore::HTMLDocumentParser::pumpTokenizer):
1165         * html/parser/HTMLTokenizer.cpp:
1166         (WebCore::isEndTagBufferingState):
1167         (WebCore):
1168         (WebCore::HTMLTokenizer::reset):
1169         (WebCore::HTMLTokenizer::flushEmitAndResumeIn):
1170         (WebCore::HTMLTokenizer::nextToken):
1171         (WebCore::HTMLTokenizer::updateStateFor):
1172         * html/parser/HTMLTokenizer.h:
1173         (HTMLTokenizer):
1174         (WebCore::HTMLTokenizer::create):
1175         (WebCore::HTMLTokenizer::shouldSkipNullCharacters):
1176         (WebCore::HTMLTokenizer::emitEndOfFile):
1177         * html/parser/HTMLTreeBuilder.cpp:
1178         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
1179         (WebCore::HTMLTreeBuilder::processEndTag):
1180         (WebCore::HTMLTreeBuilder::processGenericRCDATAStartTag):
1181         (WebCore::HTMLTreeBuilder::processGenericRawTextStartTag):
1182         (WebCore::HTMLTreeBuilder::processScriptStartTag):
1183         * html/parser/TextViewSourceParser.cpp:
1184         (WebCore::TextViewSourceParser::TextViewSourceParser):
1185
1186 2013-02-11  Kentaro Hara  <haraken@chromium.org>
1187
1188         Build fix after r142528
1189         https://bugs.webkit.org/show_bug.cgi?id=109520
1190
1191         Reviewed by Eric Seidel.
1192
1193         r142528 changed GIFImageReader from a struct to a class.
1194         We also need to fix a forward declaration.
1195
1196         No tests.
1197
1198         * platform/image-decoders/gif/GIFImageDecoder.h:
1199
1200 2013-02-11  Nico Weber  <thakis@chromium.org>
1201
1202         Remove web intents code
1203         https://bugs.webkit.org/show_bug.cgi?id=109501
1204
1205         Reviewed by Eric Seidel.
1206
1207         See thread "Removing ENABLE(WEB_INTENTS) code" on webkit-dev.
1208
1209         * DerivedSources.make:
1210         * Modules/intents/DOMWindowIntents.cpp: Removed.
1211         * Modules/intents/DOMWindowIntents.h: Removed.
1212         * Modules/intents/DOMWindowIntents.idl: Removed.
1213         * Modules/intents/DeliveredIntent.cpp: Removed.
1214         * Modules/intents/DeliveredIntent.h: Removed.
1215         * Modules/intents/DeliveredIntent.idl: Removed.
1216         * Modules/intents/Intent.cpp: Removed.
1217         * Modules/intents/Intent.h: Removed.
1218         * Modules/intents/Intent.idl: Removed.
1219         * Modules/intents/IntentRequest.cpp: Removed.
1220         * Modules/intents/IntentRequest.h: Removed.
1221         * Modules/intents/IntentResultCallback.h: Removed.
1222         * Modules/intents/IntentResultCallback.idl: Removed.
1223         * Modules/intents/NavigatorIntents.cpp: Removed.
1224         * Modules/intents/NavigatorIntents.h: Removed.
1225         * Modules/intents/NavigatorIntents.idl: Removed.
1226         * WebCore.gyp/WebCore.gyp:
1227         * WebCore.gypi:
1228         * bindings/generic/RuntimeEnabledFeatures.cpp:
1229         (WebCore):
1230         * bindings/generic/RuntimeEnabledFeatures.h:
1231         (RuntimeEnabledFeatures):
1232         * bindings/v8/custom/V8IntentCustom.cpp: Removed.
1233         * html/HTMLElementsAllInOne.cpp:
1234         * html/HTMLIntentElement.cpp: Removed.
1235         * html/HTMLIntentElement.h: Removed.
1236         * html/HTMLIntentElement.idl: Removed.
1237         * loader/EmptyClients.cpp:
1238         * loader/EmptyClients.h:
1239         (EmptyFrameLoaderClient):
1240         * loader/FrameLoaderClient.h:
1241         (WebCore):
1242         * page/DOMWindow.idl:
1243
1244 2013-02-11  Eric Seidel  <eric@webkit.org>
1245
1246         Fix Mac build after http://trac.webkit.org/changeset/142535.
1247
1248         Unreviewed build fix.
1249
1250         * html/parser/HTMLTokenizer.h:
1251         (WebCore::HTMLTokenizer::emitAndReconsumeIn):
1252
1253 2013-02-11  David Farler  <dfarler@apple.com>
1254
1255         Make WebCore Derived Sources work with SDK identifiers too
1256         https://bugs.webkit.org/show_bug.cgi?id=109324
1257
1258         Reviewed by Sam Weinig.
1259
1260         * WebCore.xcodeproj/project.pbxproj: Pass SDKROOT to make for DerivedSources.make
1261
1262 2013-02-11  Zhenyao Mo  <zmo@google.com>
1263
1264         WEBGL_compressed_texture_s3tc extension can be enabled even when not supported
1265         https://bugs.webkit.org/show_bug.cgi?id=109508
1266
1267         Reviewed by Kenneth Russell.
1268
1269         * html/canvas/WebGLRenderingContext.cpp:
1270         (WebCore):
1271         (WebCore::WebGLRenderingContext::getExtension): Check whether the extension support is there before returning the extension pointer.
1272
1273 2013-02-11  Emil A Eklund  <eae@chromium.org>
1274
1275         Change RenderFrameSet::paint to use m-rows/m_cols directly.
1276         https://bugs.webkit.org/show_bug.cgi?id=108503
1277
1278         Reviewed by Eric Seidel.
1279
1280         Test: fast/frames/invalid-frameset.html
1281
1282         * rendering/RenderFrameSet.cpp:
1283         (WebCore::RenderFrameSet::paint):
1284
1285 2013-02-11  Yong Li  <yoli@rim.com>
1286
1287         XMLHttpRequestProgressEventThrottle::resume() always schedules timer even when unnecessary
1288         https://bugs.webkit.org/show_bug.cgi?id=105348
1289
1290         Reviewed by Alexey Proskuryakov.
1291
1292         Let resume() clear the defer flag and return if there is deferred events to dispatch.
1293
1294         No new tests as this should not affect existing cross-platform behavior. It should be
1295         OK as long as it doesn't break anything.
1296
1297         * xml/XMLHttpRequestProgressEventThrottle.cpp:
1298         (WebCore::XMLHttpRequestProgressEventThrottle::resume):
1299
1300 2013-02-11  Eric Seidel  <eric@webkit.org>
1301
1302         Fold MarkupTokenizerBase into HTMLTokenizer now that it is the only subclass
1303         https://bugs.webkit.org/show_bug.cgi?id=109499
1304
1305         Reviewed by Adam Barth.
1306
1307         For great justice.  And sanity.
1308         Epic amount of template code deleted.
1309
1310         * GNUmakefile.list.am:
1311         * Target.pri:
1312         * WebCore.gypi:
1313         * WebCore.vcproj/WebCore.vcproj:
1314         * WebCore.vcxproj/WebCore.vcxproj:
1315         * WebCore.vcxproj/WebCore.vcxproj.filters:
1316         * WebCore.xcodeproj/project.pbxproj:
1317         * html/parser/HTMLTokenizer.cpp:
1318         (WebCore::HTMLTokenizer::HTMLTokenizer):
1319         * html/parser/HTMLTokenizer.h:
1320         (HTMLTokenizer):
1321         (Checkpoint):
1322         (WebCore::HTMLTokenizer::state):
1323         (WebCore::HTMLTokenizer::setState):
1324         (WebCore::HTMLTokenizer::shouldSkipNullCharacters):
1325         (WebCore::HTMLTokenizer::bufferCharacter):
1326         (WebCore::HTMLTokenizer::emitAndResumeIn):
1327         (WebCore::HTMLTokenizer::emitAndReconsumeIn):
1328         (WebCore::HTMLTokenizer::emitEndOfFile):
1329         (WebCore::HTMLTokenizer::haveBufferedCharacterToken):
1330         * xml/parser/MarkupTokenizerBase.h: Removed.
1331
1332 2013-02-11  Anton Vayvod  <avayvod@chromium.org>
1333
1334         [Text Autosizing] Collect narrow descendants and process them separately. Refactoring for
1335         a change to follow.
1336         https://bugs.webkit.org/show_bug.cgi?id=109054
1337
1338         Preparational change to combine narrow descendants of the same autosizing cluster into
1339         groups by the width difference between the descendant and the block containing all text of
1340         the parent autosizing cluster. The groups will be autosized with the same multiplier.
1341
1342         For example, on sites with a sidebar, sometimes the paragraphs next to the sidebar will have
1343         a large margin individually applied (via a CSS selector), causing them all to individually
1344         appear narrower than their enclosing blockContainingAllText. Rather than making each of
1345         these paragraphs into a separate cluster, we eventually want to be able to merge them back
1346         together into one (or a few) descendant clusters.
1347
1348         Reviewed by Julien Chaffraix.
1349
1350         No behavioral changes thus no new tests or test changes.
1351
1352         * rendering/TextAutosizer.cpp:
1353         (TextAutosizingClusterInfo): Vector of narrow descendants.
1354         (WebCore::TextAutosizer::processCluster): Process narrow descendants separately.
1355         (WebCore::TextAutosizer::processContainer):
1356
1357             Remember narrow descendants of the parent cluster for later processing.
1358
1359 2013-02-11  Enrica Casucci  <enrica@apple.com>
1360
1361         Add ENABLE_DELETION_UI to control the use of the deletion UI.
1362         https://bugs.webkit.org/show_bug.cgi?id=109463.
1363
1364         Reviewed by Ryosuke Niwa.
1365         
1366         This patch adds #if ENABLE(DELETION_UI) in every spot where
1367         DeleteButtonController is used. This class is now only instantiated
1368         if the feature is enabled. I've also done some cleanup in the
1369         DeleteButtonController class, removing unused methods and making
1370         private some methods only used internally to the class.
1371         Both DeleteButtonController and DeleteButton classes are now excluded
1372         from the compilation if the feature is not enabled.
1373
1374         No new tests, no change of functionality.
1375
1376         * dom/ContainerNode.cpp:
1377         (WebCore::ContainerNode::cloneChildNodes):
1378         * editing/CompositeEditCommand.cpp:
1379         (WebCore::EditCommandComposition::unapply):
1380         (WebCore::EditCommandComposition::reapply):
1381         (WebCore::CompositeEditCommand::apply):
1382         * editing/DeleteButton.cpp:
1383         * editing/DeleteButtonController.cpp:
1384         * editing/DeleteButtonController.h: Some cleanup.
1385         (WebCore::DeleteButtonController::enabled): Made private.
1386         * editing/EditCommand.cpp:
1387         (WebCore::EditCommand::EditCommand):
1388         * editing/Editor.cpp:
1389         (WebCore::Editor::notifyComponentsOnChangedSelection):
1390         (WebCore::Editor::Editor):
1391         (WebCore::Editor::rangeForPoint):
1392         (WebCore::Editor::deviceScaleFactorChanged):
1393         * editing/Editor.h:
1394         * editing/htmlediting.cpp: avoidIntersectionWithNode is
1395         used only if the feature is enabled.
1396         * editing/htmlediting.h:
1397         * editing/markup.cpp:
1398         (WebCore::createMarkup):
1399         (WebCore::createFragmentFromNodes):
1400         * rendering/RenderTable.cpp: Removed unnecessary include
1401         fo DeleteButtonController.h
1402
1403 2013-02-11  Rafael Weinstein  <rafaelw@chromium.org>
1404
1405         [HTMLTemplateElement] <template> inside of <head> may not create <body> if EOF is hit
1406         https://bugs.webkit.org/show_bug.cgi?id=109338
1407
1408         Reviewed by Adam Barth.
1409
1410         This patch adds the logic to clear the stack of open elements back to the first <template> when EOF
1411         is hit. This allows a <body> to be generated if the initial <template> was opened inside of <head>.
1412
1413         Tests added to html5lib.
1414
1415         * html/parser/HTMLTreeBuilder.cpp:
1416         (WebCore):
1417         (WebCore::HTMLTreeBuilder::popAllTemplates):
1418         (WebCore::HTMLTreeBuilder::processEndTag):
1419         (WebCore::HTMLTreeBuilder::processEndOfFile):
1420         * html/parser/HTMLTreeBuilder.h:
1421         (HTMLTreeBuilder):
1422
1423 2013-02-11  Andreas Kling  <akling@apple.com>
1424
1425         RenderText::isAllCollapsibleWhitespace() shouldn't upconvert string to 16-bit.
1426         <http://webkit.org/b/109354>
1427
1428         Reviewed by Eric Seidel.
1429
1430         254 KB progression on Membuster3.
1431
1432         * rendering/RenderText.cpp:
1433         (WebCore::RenderText::isAllCollapsibleWhitespace):
1434
1435 2013-02-11  Alpha Lam  <hclam@chromium.org>
1436
1437         Fix code style violations in GIFImageReader.{cc|h}
1438         https://bugs.webkit.org/show_bug.cgi?id=109007
1439
1440         Reviewed by Stephen White.
1441
1442         This is just a style clean up for GIFImageReader.{cc|h}.
1443
1444         There's going to be a lot changes in these two files and style check
1445         will add a lot of noise in later reviews. Fix style problems first.
1446
1447         There is no change in logic at all. Just style fixes.
1448
1449         No new tests.
1450
1451         * platform/image-decoders/gif/GIFImageDecoder.cpp:
1452         (WebCore::GIFImageDecoder::frameCount):
1453         (WebCore::GIFImageDecoder::repetitionCount):
1454         (WebCore::GIFImageDecoder::haveDecodedRow):
1455         (WebCore::GIFImageDecoder::initFrameBuffer):
1456         * platform/image-decoders/gif/GIFImageReader.cpp:
1457         (GIFImageReader::outputRow):
1458         (GIFImageReader::doLZW):
1459         (GIFImageReader::read):
1460         * platform/image-decoders/gif/GIFImageReader.h:
1461         (GIFFrameContext):
1462         (GIFFrameContext::GIFFrameContext):
1463         (GIFFrameContext::~GIFFrameContext):
1464         (GIFImageReader::GIFImageReader):
1465         (GIFImageReader::~GIFImageReader):
1466         (GIFImageReader):
1467         (GIFImageReader::imagesCount):
1468         (GIFImageReader::loopCount):
1469         (GIFImageReader::globalColormap):
1470         (GIFImageReader::globalColormapSize):
1471         (GIFImageReader::frameContext):
1472
1473 2013-02-11  Bem Jones-Bey  <bjonesbe@adobe.com>
1474
1475         [CSS Exclusions] Handle shape-outside changing a float's overhang behavior
1476         https://bugs.webkit.org/show_bug.cgi?id=106927
1477
1478         Reviewed by Julien Chaffraix.
1479
1480         When the position on a shape outside causes a float to spill out into
1481         another block than it's container, it was not being drawn correctly. It
1482         became apparent that in order to fix this properly, the approach to
1483         positioning shape outsides and floats needed to be changed. The new
1484         approach also fixes some other outstanding issues, like hit detection.
1485
1486         When a float has a shape outside, inline and float layout happens
1487         using the exclusion shape bounds instead of the float's box.  The
1488         effect of this is that the float itself no longer has any effect on
1489         layout, both with respect to positioning of the float's siblings as
1490         well as positioning the float's box. This means that when the float is
1491         positioned, it is the shape's box that must obey the positioning rules
1492         for floats. When the shape is given a position relative to the float's
1493         box, the rules for float positioning determine where the shape sits
1494         in the parent, causing the float's box to be offset by the position of
1495         the shape. Since the float's box does not affect layout (due to the
1496         shape), this is similar to relative positioning in that the offset is
1497         a paint time occurrence.
1498
1499         So the new approach is to implement positioning of shape outside on
1500         floats similar to how relative positioning is implemented, using a
1501         RenderLayer.
1502
1503         This is also tested by the existing tests for shape outside on floats positioning.
1504
1505         Test: fast/exclusions/shape-outside-floats/shape-outside-floats-overhang.html
1506
1507         * rendering/ExclusionShapeOutsideInfo.h:
1508         (WebCore::ExclusionShapeOutsideInfo::shapeLogicalOffset): Utility method to create a LayoutSize for computing the layer offset.
1509         (ExclusionShapeOutsideInfo):
1510         * rendering/LayoutState.cpp:
1511         (WebCore::LayoutState::LayoutState): Check for floats with shape outside as well as in flow positioning.
1512         * rendering/RenderBlock.cpp:
1513         (WebCore::RenderBlock::flipFloatForWritingModeForChild): Remove old positioning implementation.
1514         (WebCore::RenderBlock::paintFloats): Remove old positioning implementation.
1515         (WebCore::RenderBlock::blockSelectionGaps): Check for floats with shape outside as well as in flow positioning.
1516         (WebCore::RenderBlock::positionNewFloats): Remove old positioning implementation.
1517         (WebCore::RenderBlock::addOverhangingFloats): Remove FIXME.
1518         (WebCore::positionForPointRespectingEditingBoundaries): Check for floats with shape outside as well as in flow positioning.
1519         * rendering/RenderBlock.h:
1520         (RenderBlock): Remove old positioning implementation.
1521         (WebCore::RenderBlock::xPositionForFloatIncludingMargin): Remove old positioning implementation.
1522         (WebCore::RenderBlock::yPositionForFloatIncludingMargin): Remove old positioning implementation.
1523         * rendering/RenderBox.cpp:
1524         (WebCore::RenderBox::mapLocalToContainer): Check for floats with shape outside as well as in flow positioning.
1525         (WebCore::RenderBox::offsetFromContainer): Check for floats with shape outside as well as in flow positioning.
1526         (WebCore::RenderBox::computeRectForRepaint): Check for floats with shape outside as well as in flow positioning.
1527         (WebCore::RenderBox::layoutOverflowRectForPropagation): Check for floats with shape outside as well as in flow positioning.
1528         * rendering/RenderBox.h: Make floats with shape outside get a layer.
1529         * rendering/RenderBoxModelObject.cpp:
1530         (WebCore::RenderBoxModelObject::paintOffset): Method to return in flow
1531             positioning offset + offset from shape outside on floats.
1532         * rendering/RenderBoxModelObject.h:
1533         (RenderBoxModelObject): Add paintOffset method.
1534         * rendering/RenderInline.cpp:
1535         (WebCore::RenderInline::clippedOverflowRectForRepaint): Check for floats with shape outside as well as in flow positioning.
1536         (WebCore::RenderInline::computeRectForRepaint): Check for floats with shape outside as well as in flow positioning.
1537         (WebCore::RenderInline::mapLocalToContainer): Check for floats with shape outside as well as in flow positioning.
1538         * rendering/RenderLayer.cpp:
1539         (WebCore::RenderLayer::updateLayerPosition): Check for floats with shape outside as well as in flow positioning.
1540         (WebCore::RenderLayer::calculateClipRects): Check for floats with shape outside as well as in flow positioning.
1541         * rendering/RenderLayer.h:
1542         (WebCore::RenderLayer::paintOffset): Rename offsetForInFlowPosition to reflect that it's not just for
1543             in flow positioning, it also reflects shape outside position on floats.
1544         (RenderLayer):
1545         * rendering/RenderObject.h:
1546         (WebCore::RenderObject::hasPaintOffset): Determines if this object is in flow positioined or is a float with shape outside.
1547         * rendering/style/RenderStyle.h: Add hasPaintOffset method, analagous to method with same name on RenderObject.
1548
1549 2013-02-11  Tim Horton  <timothy_horton@apple.com>
1550
1551         FrameView::setScrollPosition should clamp scroll position before handing it to
1552         ScrollingCoordinator instead of depending on ScrollView to do this
1553         https://bugs.webkit.org/show_bug.cgi?id=109497
1554         <rdar://problem/12631789>
1555
1556         Reviewed by Simon Fraser.
1557
1558         Clamp scroll position before handing it to ScrollingCoordinator. Also, like ScrollView does,
1559         bail out if we've already scrolled to the clamped scroll position.
1560
1561         Test: platform/mac-wk2/tiled-drawing/clamp-out-of-bounds-scrolls.html
1562
1563         * page/FrameView.cpp:
1564         (WebCore::FrameView::setScrollPosition):
1565
1566 2013-02-11  Adam Barth  <abarth@webkit.org>
1567
1568         The threaded HTML parser should pass all the fast/parser tests
1569         https://bugs.webkit.org/show_bug.cgi?id=109486
1570
1571         Reviewed by Tony Gentilcore.
1572
1573         This patch fixes the last two test failures in fast/parser, which were
1574         crashes caused by not having a tokenizer when document.close() was
1575         called. (The tokenizer is created lazily by calls to document.write,
1576         which might not happen before document.close).
1577
1578         fast/parser/document-close-iframe-load.html
1579         fast/parser/document-close-nested-iframe-load.html
1580
1581         In addition, I've added a new test to make sure we flush the tokenizer
1582         properly in these cases.
1583
1584         Test: fast/parser/document-close-iframe-load-partial-entity.html
1585
1586         * html/parser/HTMLDocumentParser.cpp:
1587         (WebCore::HTMLDocumentParser::prepareToStopParsing):
1588         (WebCore::HTMLDocumentParser::pumpTokenizer):
1589
1590 2013-02-11  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
1591
1592         [texmap] Implement frames-per-second debug counter
1593         https://bugs.webkit.org/show_bug.cgi?id=107942
1594
1595         Reviewed by Noam Rosenthal.
1596
1597         Adds FPS counter via WEBKIT_SHOW_FPS=<interval> environment variable,
1598         where <interval> is the period in seconds (i.e. =1.5) between FPS
1599         updates on screen. It is measured by counting
1600         CoordinatedGraphicsScene::paintTo* calls and is painted using
1601         drawRepaintCounter() after TextureMapperLayer has finished painting its
1602         contents.
1603
1604         Visual debugging feature, no need for new tests.
1605
1606         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
1607         (WebCore::CoordinatedGraphicsScene::CoordinatedGraphicsScene):
1608         (WebCore::CoordinatedGraphicsScene::paintToCurrentGLContext):
1609         (WebCore::CoordinatedGraphicsScene::paintToGraphicsContext):
1610         (WebCore::CoordinatedGraphicsScene::updateFPS):
1611         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
1612
1613 2013-02-11  Eric Seidel  <eric@webkit.org>
1614
1615         Fold MarkupTokenBase into HTMLToken now that it has no other subclasses
1616         https://bugs.webkit.org/show_bug.cgi?id=109483
1617
1618         Reviewed by Adam Barth.
1619
1620         This deletes an epic amount of template yuck, as well as removes
1621         a vtable !?! from HTMLToken.
1622
1623         This paves the way for further cleanup of HTMLToken now that we
1624         can see the whole object at once.
1625         We'll also probably re-create an HTMLToken.cpp again, now that we're
1626         free from the chains of template nonsense.
1627
1628         * GNUmakefile.list.am:
1629         * Target.pri:
1630         * WebCore.gypi:
1631         * WebCore.vcproj/WebCore.vcproj:
1632         * WebCore.vcxproj/WebCore.vcxproj:
1633         * WebCore.vcxproj/WebCore.vcxproj.filters:
1634         * WebCore.xcodeproj/project.pbxproj:
1635         * html/parser/HTMLToken.h:
1636         (WebCore::findAttributeInVector):
1637         (WebCore):
1638         (HTMLToken):
1639         (Attribute):
1640         (Range):
1641         (WebCore::HTMLToken::HTMLToken):
1642         (WebCore::HTMLToken::clear):
1643         (WebCore::HTMLToken::isUninitialized):
1644         (WebCore::HTMLToken::type):
1645         (WebCore::HTMLToken::makeEndOfFile):
1646         (WebCore::HTMLToken::startIndex):
1647         (WebCore::HTMLToken::endIndex):
1648         (WebCore::HTMLToken::setBaseOffset):
1649         (WebCore::HTMLToken::end):
1650         (WebCore::HTMLToken::data):
1651         (WebCore::HTMLToken::isAll8BitData):
1652         (WebCore::HTMLToken::name):
1653         (WebCore::HTMLToken::appendToName):
1654         (WebCore::HTMLToken::nameString):
1655         (WebCore::HTMLToken::selfClosing):
1656         (WebCore::HTMLToken::setSelfClosing):
1657         (WebCore::HTMLToken::beginStartTag):
1658         (WebCore::HTMLToken::beginEndTag):
1659         (WebCore::HTMLToken::addNewAttribute):
1660         (WebCore::HTMLToken::beginAttributeName):
1661         (WebCore::HTMLToken::endAttributeName):
1662         (WebCore::HTMLToken::beginAttributeValue):
1663         (WebCore::HTMLToken::endAttributeValue):
1664         (WebCore::HTMLToken::appendToAttributeName):
1665         (WebCore::HTMLToken::appendToAttributeValue):
1666         (WebCore::HTMLToken::attributes):
1667         (WebCore::HTMLToken::eraseValueOfAttribute):
1668         (WebCore::HTMLToken::ensureIsCharacterToken):
1669         (WebCore::HTMLToken::characters):
1670         (WebCore::HTMLToken::appendToCharacter):
1671         (WebCore::HTMLToken::comment):
1672         (WebCore::HTMLToken::beginComment):
1673         (WebCore::HTMLToken::appendToComment):
1674         (WebCore::HTMLToken::eraseCharacters):
1675         * html/parser/HTMLTokenTypes.h:
1676         * html/parser/XSSAuditor.h:
1677         * xml/parser/MarkupTokenBase.h: Removed.
1678
1679 2013-02-11  Gavin Barraclough  <barraclough@apple.com>
1680
1681         PluginProcess should quit immediately if idle in response to low-memory notifications
1682         https://bugs.webkit.org/show_bug.cgi?id=109103
1683         <rdar://problem/12679827>
1684
1685         Reviewed by Brady Eidson.
1686
1687         This patch allows a process to set a custom callback for low memory warnings
1688         (defaulting to the current behaviour, as implemented in releaseMemory).
1689
1690         * platform/MemoryPressureHandler.cpp:
1691         (WebCore::MemoryPressureHandler::MemoryPressureHandler):
1692             - Initialize m_lowMemoryHandler to releaseMemory.
1693         (WebCore::MemoryPressureHandler::install):
1694         (WebCore::MemoryPressureHandler::uninstall):
1695         (WebCore::MemoryPressureHandler::holdOff):
1696             - Cleaned up spacing.
1697         (WebCore::MemoryPressureHandler::releaseMemory):
1698             - Added null implementation for non-Mac builds.
1699         * platform/MemoryPressureHandler.h:
1700         (WebCore::MemoryPressureHandler::setLowMemoryHandler):
1701             - Added method to set m_lowMemoryHandler.
1702         * platform/mac/MemoryPressureHandlerMac.mm:
1703         (WebCore::MemoryPressureHandler::respondToMemoryPressure):
1704             - Changed to call releaseMemory via m_lowMemoryHandler.
1705
1706 2013-02-11  Simon Fraser  <simon.fraser@apple.com>
1707
1708         REGRESSION (r133807): Sticky-position review bar on bugzilla review page is jumpy
1709         https://bugs.webkit.org/show_bug.cgi?id=104276
1710         <rdar://problem/12827187>
1711
1712         Reviewed by Tim Horton.
1713
1714         When committing new scrolling tree state, if the root node has a scroll
1715         position update, we would handle that before updating the state of child
1716         nodes (with possibly new viewport constraints). That would cause incorrect
1717         child layer updates.
1718         
1719         Fix by adding a second 'update' phase that happens after child nodes,
1720         and moving the scroll position update into that.
1721
1722         Scrolling tests only dump the state tree, so cannot test the bug.
1723
1724         * page/FrameView.cpp:
1725         (WebCore::FrameView::setScrollPosition): If the scroll position didn't
1726         actually change, don't request a scroll position update from the ScrollingCoordinator.
1727         * page/scrolling/ScrollingTree.cpp:
1728         (WebCore::ScrollingTree::updateTreeFromStateNode): Keep track of the scrolling node so
1729         that we can call updateAfterChildren() on it.
1730         * page/scrolling/ScrollingTreeNode.h:
1731         (ScrollingTreeNode):
1732         (WebCore::ScrollingTreeNode::updateAfterChildren):
1733         * page/scrolling/ScrollingTreeScrollingNode.cpp:
1734         (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
1735         * page/scrolling/ScrollingTreeScrollingNode.h:
1736         (ScrollingTreeScrollingNode):
1737         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
1738         (WebCore::ScrollingCoordinatorMac::updateViewportConstrainedNode):
1739         In the current bug the scrolling tree was scheduled for commit because of a
1740         scroll position request, but if only the viewport constraints change, we also need
1741         to commit the tree.
1742         * page/scrolling/mac/ScrollingTreeFixedNode.h:
1743         (ScrollingTreeFixedNode):
1744         * page/scrolling/mac/ScrollingTreeFixedNode.mm:
1745         (WebCore::ScrollingTreeFixedNode::updateBeforeChildren):
1746         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
1747         (ScrollingTreeScrollingNodeMac):
1748         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
1749         (WebCore::ScrollingTreeScrollingNodeMac::updateBeforeChildren):
1750         (WebCore::ScrollingTreeScrollingNodeMac::updateAfterChildren): Move code here
1751         that updates things that have to happen after children.
1752         * page/scrolling/mac/ScrollingTreeStickyNode.h:
1753         (ScrollingTreeStickyNode):
1754         * page/scrolling/mac/ScrollingTreeStickyNode.mm:
1755         (WebCore::ScrollingTreeStickyNode::updateBeforeChildren):
1756
1757 2013-02-11  Roger Fong  <roger_fong@apple.com>
1758
1759         Unreviewed. Build fix for Win7 Release.
1760         Because of InspectorAllInOne.cpp static globals must be named differently in files included by InspectorAllInOne.
1761         This was the case for UserInitiatedProfileName. Also removed the repeated HeapProfileType definition in
1762         InspectorHeapProfilerAgent.cpp since it wasn't being used anyways.
1763
1764         * inspector/InspectorHeapProfilerAgent.cpp:
1765         (WebCore):
1766         (WebCore::InspectorHeapProfilerAgent::takeHeapSnapshot):
1767
1768 2013-02-11  Tony Gentilcore  <tonyg@chromium.org>
1769
1770         SegmentedString's copy ctor should copy all fields
1771         https://bugs.webkit.org/show_bug.cgi?id=109477
1772
1773         Reviewed by Adam Barth.
1774
1775         This fixes http/tests/inspector-enabled/document-write.html (and likely others) for the threaded HTML parser.
1776
1777         No new tests because covered by existing tests.
1778
1779         * platform/text/SegmentedString.cpp:
1780         (WebCore::SegmentedString::SegmentedString):
1781
1782 2013-02-11  Joshua Bell  <jsbell@chromium.org>
1783
1784         IndexedDB: database connections don't close after versionchange transaction aborts
1785         https://bugs.webkit.org/show_bug.cgi?id=102298
1786
1787         Reviewed by Tony Chang.
1788
1789         Per spec, close the database if the "versionchange" transaction aborts.
1790
1791         Tests: storage/indexeddb/aborted-versionchange-closes.html
1792                storage/indexeddb/lazy-index-population.html
1793                storage/objectstore-basics.html
1794
1795         * Modules/indexeddb/IDBTransaction.cpp:
1796         (WebCore::IDBTransaction::onAbort): Tell the IDBDatabase (connection) to close if
1797         this was a "versionchange" transaction.
1798
1799 2013-02-11  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1800
1801         [EFL] fast/forms/number/number-l10n-input.html is failing
1802         https://bugs.webkit.org/show_bug.cgi?id=109440
1803
1804         Reviewed by Laszlo Gombos.
1805
1806         Use LocaleICU instead of LocaleNone on EFL port. The EFL
1807         port already depends on ICU library and we get additional
1808         functionality this way.
1809
1810         No new tests, already covered by existing tests.
1811
1812         * CMakeLists.txt:
1813         * PlatformBlackBerry.cmake:
1814         * PlatformEfl.cmake:
1815         * PlatformWinCE.cmake:
1816
1817 2013-02-11  Benjamin Poulain  <benjamin@webkit.org>
1818
1819         Kill TestRunner::setMinimumTimerInterval; implement the feature with InternalSettings
1820         https://bugs.webkit.org/show_bug.cgi?id=109349
1821
1822         Reviewed by Sam Weinig.
1823
1824         Expose setMinimumTimerInterval() and implement the backup/restore to keep
1825         a consistent state between tests.
1826
1827         * testing/InternalSettings.cpp:
1828         (WebCore::InternalSettings::Backup::Backup):
1829         (WebCore::InternalSettings::Backup::restoreTo):
1830         (WebCore::InternalSettings::setMinimumTimerInterval):
1831         (WebCore):
1832         * testing/InternalSettings.h:
1833         (Backup):
1834         (InternalSettings):
1835         * testing/InternalSettings.idl:
1836
1837 2013-02-11  Dean Jackson  <dino@apple.com>
1838
1839         Source/WebCore: Snapshotted plug-in should use shadow root
1840         https://bugs.webkit.org/show_bug.cgi?id=108284
1841
1842         Reviewed by Simon Fraser.
1843
1844         Take three - relanding after rollout in r142400 that was caused by a global
1845         selector interfering with CSS Instrumentation in the Inspector.
1846
1847         A snapshotted plugin needs to indicate to the user that it can be clicked
1848         to be restarted. Previously this was done with an image that had embedded
1849         text. Instead, we now use an internal shadow root to embed some markup that
1850         will display instructions that can be localised.
1851
1852         The UA stylesheet for plug-ins provides a default styling for the label, which
1853         can be overridden by ports.
1854
1855         In the process, RenderSnapshottedPlugIn no longer inherits from RenderEmbeddedObject,
1856         since it is only responsible for drawing a paused plug-in. The snapshot creation
1857         can work with the default renderer, but a shadow root requires something like
1858         RenderBlock in order to draw its children. We swap from one renderer to another when
1859         necessary either by creating the shadow root or by explicitly detaching and attaching
1860         the plugin element.
1861
1862         Unfortunately this is difficult to test, because the snapshotting requires
1863         time to execute, and also a PluginView to be instantiated.
1864
1865         * css/plugIns.css:
1866         (object::-webkit-snapshotted-plugin-content): New rules for a default label style.
1867
1868         * platform/LocalizedStrings.cpp: Make sure all ports have plugin strings, now it is called.
1869         * platform/LocalizedStrings.h:
1870         * platform/blackberry/LocalizedStringsBlackBerry.cpp:
1871         * platform/chromium/LocalizedStringsChromium.cpp:
1872         * platform/efl/LocalizedStringsEfl.cpp:
1873         * platform/gtk/LocalizedStringsGtk.cpp:
1874         * platform/qt/LocalizedStringsQt.cpp:
1875
1876         * html/HTMLPlugInElement.cpp:
1877         (WebCore::HTMLPlugInElement::defaultEventHandler): Take into account the fact
1878         that RenderSnapshottedPlugIn no longer is an embedded object.
1879
1880         * html/HTMLPlugInImageElement.cpp:
1881         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): New default values in constructor.
1882         (WebCore::HTMLPlugInElement::defaultEventHandler): Make sure to call base class.
1883         (WebCore::HTMLPlugInElement::willRecalcStyle): No need to reattach if we're a snapshot.
1884         (WebCore::HTMLPlugInImageElement::createRenderer): If we're showing a snapshot, create such
1885             a renderer, otherwise use the typical plug-in path.
1886         (WebCore::HTMLPlugInImageElement::updateSnapshot): Keep a record of the snapshot, since we'll
1887             need to give it to the renderer.
1888         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): Build a subtree that will display a label.
1889         * html/HTMLPlugInImageElement.h:
1890         (HTMLPlugInImageElement): New member variable to record the snapshot image and whether the label
1891             should show immediately.
1892         (WebCore::HTMLPlugInImageElement::swapRendererTimerFired): The callback function triggered when we need
1893             to swap to the Shadow Root.
1894         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): The user has tapped on the snapshot so the plugin
1895             in being recreated. Make sure we reattach so that a plugin renderer will be created.
1896         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Make sure we set the right
1897             displayState for snapshots.
1898         * html/HTMLPlugInImageElement.h:
1899         (HTMLPlugInImageElement): The new methods listed above.
1900         (WebCore::HTMLPlugInImageElement::setShouldShowSnapshotLabelAutomatically): Indicates whether or not
1901             a snapshot should be immediately labeled.
1902
1903         * page/ChromeClient.h: No need for plugInStartLabelImage any more.
1904
1905         * rendering/RenderSnapshottedPlugIn.cpp:
1906         (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn): New inheritance.
1907         (WebCore::RenderSnapshottedPlugIn::paint): If we're in the background paint phase, render the snapshot image.
1908         (WebCore::RenderSnapshottedPlugIn::paintSnapshotImage): Rename.
1909         (WebCore::RenderSnapshottedPlugIn::paintSnapshot): Rename.
1910         (WebCore::RenderSnapshottedPlugIn::paintSnapshotWithLabel): Rename. No need for label sizes.
1911         (WebCore::RenderSnapshottedPlugIn::getCursor):
1912         (WebCore::RenderSnapshottedPlugIn::handleEvent): The renderer doesn't restart the plug-in any more. Tell the element and it will do it.
1913         * rendering/RenderSnapshottedPlugIn.h:
1914         (RenderSnapshottedPlugIn): New inheritance. Some method renaming.
1915
1916 2013-02-11  Mike West  <mkwst@chromium.org>
1917
1918         CSP reports for blocked 'data:' URLs should report the scheme only.
1919         https://bugs.webkit.org/show_bug.cgi?id=109429
1920
1921         Reviewed by Adam Barth.
1922
1923         https://dvcs.w3.org/hg/content-security-policy/rev/001dc8e8bcc3 changed
1924         the CSP 1.1 spec to require that blocked URLs that don't refer to
1925         generally resolvable schemes (e.g. 'data:', 'javascript:', etc.) be
1926         stripped down to their scheme in violation reports.
1927
1928         Test: http/tests/security/contentSecurityPolicy/report-blocked-data-uri.html
1929
1930         * page/ContentSecurityPolicy.cpp:
1931         (WebCore::ContentSecurityPolicy::reportViolation):
1932             If the blocked URL is a web-resolvable scheme, apply the current
1933             stripping logic to it, otherwise, strip it to the scheme only.
1934         * platform/KURL.h:
1935         (KURL):
1936             Move KURL::isHierarchical() out into KURL's public API.
1937
1938 2013-02-11  Simon Fraser  <simon.fraser@apple.com>
1939
1940         ScrollingTree node maps keep getting larger
1941         https://bugs.webkit.org/show_bug.cgi?id=109348
1942
1943         Reviewed by Sam Weinig.
1944
1945         When navigating between pages, nodes would get left in the ScrollingTree's
1946         node map, and the ScrollingStateTree's node map, so these would get larger
1947         and larger as you browse.
1948         
1949         Simplify map maintenance by clearing the map when setting a new root node
1950         (which happens on the first commit of a new page). Also, don't keep root nodes
1951         around, but create them afresh for each page, which simplifies their ID
1952         management.
1953         
1954         This is closer to the original behavior; keeping the root nodes around was
1955         a fix for bug 99668, but we avoid regressing that fix by bailing early
1956         from frameViewLayoutUpdated() if there is no root state node (we'll get
1957         called again anyway).
1958         
1959         This now allows state nodeIDs to be purely read-only.
1960
1961         * page/scrolling/ScrollingStateNode.h:
1962         * page/scrolling/ScrollingStateTree.cpp:
1963         (WebCore::ScrollingStateTree::ScrollingStateTree):
1964         (WebCore::ScrollingStateTree::attachNode):
1965         (WebCore::ScrollingStateTree::clear):
1966         (WebCore::ScrollingStateTree::removeNode):
1967         * page/scrolling/ScrollingTree.cpp:
1968         (WebCore::ScrollingTree::updateTreeFromStateNode):
1969         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
1970         (WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated):
1971
1972 2013-02-11  Simon Fraser  <simon.fraser@apple.com>
1973
1974         Move m_stateNodeMap from ScrollingCoordinatorMac to ScrollingStateTree
1975         https://bugs.webkit.org/show_bug.cgi?id=109361
1976
1977         Reviewed by Sam Weinig.
1978         
1979         The map of scrolling node IDs to ScollingStateNodes was maintained by
1980         ScrollingCoordinatorMac, rather than ScrollingStateTree. This is different
1981         from the ScrollingTree (which owns its node map), and added some amount
1982         of to-and-fro between ScrollingStateTree and ScrollingCoordinatorMac.
1983         
1984         Having ScrollingCoordinatorMac maintain the map of IDs to state nodes
1985         simplifies things.
1986
1987         No behavior change.
1988
1989         * page/scrolling/ScrollingStateTree.cpp:
1990         (WebCore::ScrollingStateTree::attachNode):
1991         (WebCore::ScrollingStateTree::detachNode):
1992         (WebCore::ScrollingStateTree::clear):
1993         (WebCore::ScrollingStateTree::removeNode):
1994         (WebCore::ScrollingStateTree::stateNodeForID):
1995         * page/scrolling/ScrollingStateTree.h:
1996         (ScrollingStateTree): Remove some stale comments.
1997         (WebCore::ScrollingStateTree::removedNodes):
1998         * page/scrolling/mac/ScrollingCoordinatorMac.h:
1999         (ScrollingCoordinatorMac):
2000         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
2001         (WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated):
2002         (WebCore::ScrollingCoordinatorMac::recomputeWheelEventHandlerCountForFrameView):
2003         (WebCore::ScrollingCoordinatorMac::frameViewRootLayerDidChange):
2004         (WebCore::ScrollingCoordinatorMac::requestScrollPositionUpdate):
2005         (WebCore::ScrollingCoordinatorMac::attachToStateTree):
2006         (WebCore::ScrollingCoordinatorMac::detachFromStateTree):
2007         (WebCore::ScrollingCoordinatorMac::clearStateTree):
2008         (WebCore::ScrollingCoordinatorMac::updateScrollingNode):
2009         (WebCore::ScrollingCoordinatorMac::updateViewportConstrainedNode):
2010
2011 2013-02-11  Mark Rowe  <mrowe@apple.com>
2012
2013         Build fix.
2014
2015         * platform/mac/PlatformSpeechSynthesizerMac.mm: Fix the case in the include.
2016
2017 2013-02-11  Julien Chaffraix  <jchaffraix@webkit.org>
2018
2019         Regression(r131539): Heap-use-after-free in WebCore::RenderBlock::willBeDestroyed
2020         https://bugs.webkit.org/show_bug.cgi?id=107189
2021
2022         Reviewed by Abhishek Arya.
2023
2024         Test: fast/dynamic/continuation-detach-crash.html
2025
2026         This patch reverts r131539 and the following changes (r132591 and r139664).
2027         This means we redo detaching from the bottom-up which solves the regression.
2028         It fixes the attached test case as we re-attach child nodes before detaching
2029         the parent. It seems wrong to do but this avoid a stale continuation.
2030
2031         * dom/ContainerNode.cpp:
2032         (WebCore::ContainerNode::detach): Detach the children first, then ourself.
2033         * dom/Node.cpp:
2034         (WebCore::Node::detach): Clear the renderer instead of ASSERT'ing.
2035         * rendering/RenderObject.cpp:
2036         (WebCore::RenderObject::willBeDestroyed): Removed the code to clear the associated node's renderer.
2037         (WebCore::RenderObject::destroyAndCleanupAnonymousWrappers):
2038         * rendering/RenderObjectChildList.cpp:
2039         (WebCore::RenderObjectChildList::removeChildNode):
2040         Moved the repainting logic back into removeChildNode from destroyAndCleanupAnonymousWrappers.
2041         (WebCore::RenderObjectChildList::destroyLeftoverChildren): Re-added the code to clear the associated node's
2042         renderer.
2043         * rendering/RenderTextFragment.cpp:
2044         (WebCore::RenderTextFragment::setText): Re-added the code to set the associated node's renderer.
2045
2046         * dom/ContainerNode.cpp:
2047         (WebCore::ContainerNode::detach):
2048         * dom/Node.cpp:
2049         (WebCore::Node::detach):
2050         * rendering/RenderObject.cpp:
2051         (WebCore::RenderObject::willBeDestroyed):
2052         (WebCore::RenderObject::destroyAndCleanupAnonymousWrappers):
2053         * rendering/RenderObjectChildList.cpp:
2054         (WebCore::RenderObjectChildList::destroyLeftoverChildren):
2055         (WebCore::RenderObjectChildList::removeChildNode):
2056         * rendering/RenderTextFragment.cpp:
2057         (WebCore::RenderTextFragment::setText):
2058
2059 2013-02-11  Eric Seidel  <eric@webkit.org>
2060
2061         Make WebVTTTokenizer stop inheriting from MarkupTokenizerBase
2062         https://bugs.webkit.org/show_bug.cgi?id=109411
2063
2064         Reviewed by Adam Barth.
2065
2066         Moved InputStreamPreprocessor into its own header file so it can be
2067         used by both WebVTTTokenizer and HTMLTokenizer.
2068
2069         Also split out kEndOfFileMarker from InputStreamPreprocessor<T> so that
2070         it can be used w/o a specific instantiation of the template class.
2071         This also made it possible to fix three old fixmes about wanting to share
2072         that constant.
2073
2074         Again, separating WebVTT code from Markup* base classes made it simpler
2075         at the cost of a little copy/paste code.  WebVTT tokenization is remarkably
2076         simple compared to HTML.
2077
2078         This will make it immediately possible to pull MarkupTokenizerBase up into
2079         HTMLTokenizer and further simplify the code.
2080
2081         * GNUmakefile.list.am:
2082         * Target.pri:
2083         * WebCore.gypi:
2084         * WebCore.vcproj/WebCore.vcproj:
2085         * WebCore.vcxproj/WebCore.vcxproj:
2086         * WebCore.vcxproj/WebCore.vcxproj.filters:
2087         * WebCore.xcodeproj/project.pbxproj:
2088         * html/parser/BackgroundHTMLParser.cpp:
2089         (WebCore::BackgroundHTMLParser::markEndOfFile):
2090         * html/parser/HTMLInputStream.h:
2091         (WebCore::HTMLInputStream::markEndOfFile):
2092         * html/parser/HTMLTokenizer.cpp:
2093         (WebCore::HTMLTokenizer::nextToken):
2094         * html/parser/InputStreamPreprocessor.h: Added.
2095         (WebCore):
2096         (InputStreamPreprocessor):
2097         (WebCore::InputStreamPreprocessor::InputStreamPreprocessor):
2098         (WebCore::InputStreamPreprocessor::nextInputCharacter):
2099         (WebCore::InputStreamPreprocessor::peek):
2100         (WebCore::InputStreamPreprocessor::advance):
2101         (WebCore::InputStreamPreprocessor::skipNextNewLine):
2102         (WebCore::InputStreamPreprocessor::reset):
2103         (WebCore::InputStreamPreprocessor::shouldTreatNullAsEndOfFileMarker):
2104         * html/track/WebVTTTokenizer.cpp:
2105         (WebCore::WebVTTTokenizer::WebVTTTokenizer):
2106         (WebCore::WebVTTTokenizer::nextToken):
2107         * html/track/WebVTTTokenizer.h:
2108         (WebVTTTokenizer):
2109         (WebCore::WebVTTTokenizer::haveBufferedCharacterToken):
2110         (WebCore::WebVTTTokenizer::bufferCharacter):
2111         (WebCore::WebVTTTokenizer::emitAndResumeIn):
2112         (WebCore::WebVTTTokenizer::emitEndOfFile):
2113         (WebCore::WebVTTTokenizer::shouldSkipNullCharacters):
2114         * xml/parser/MarkupTokenizerBase.h:
2115         (MarkupTokenizerBase):
2116         (WebCore::MarkupTokenizerBase::bufferCharacter):
2117
2118 2013-02-11  Adam Barth  <abarth@webkit.org>
2119
2120         document.write during window.onload can trigger DumpRenderTree to dump the render tree
2121         https://bugs.webkit.org/show_bug.cgi?id=109465
2122
2123         Reviewed by Eric Seidel.
2124
2125         This patch is a partial revert of
2126         http://trac.webkit.org/changeset/142378. It's not safe to call
2127         checkComplete during the load event. We'll need to find another way of
2128         calling checkComplete at the right time.
2129
2130         Test: fast/parser/document-write-during-load.html
2131
2132         * dom/Document.cpp:
2133         (WebCore::Document::decrementActiveParserCount):
2134
2135 2013-02-11  Andrey Kosyakov  <caseq@chromium.org>
2136
2137         Web Inspector: Timeline: invalidate and force locations are same for Layout records caused by style recalculaiton
2138         https://bugs.webkit.org/show_bug.cgi?id=109294
2139
2140         Reviewed by Pavel Feldman.
2141
2142         Use the stack that caused style recalculation as a cause for relayout performed due to
2143         layout invalidation caused by style recalculation.
2144
2145         * inspector/front-end/TimelinePresentationModel.js:
2146         (WebInspector.TimelinePresentationModel.prototype.reset):
2147         (WebInspector.TimelinePresentationModel.Record):
2148
2149 2013-02-01  Andrey Kosyakov  <caseq@chromium.org>
2150
2151         Web Inspector: [Extension API] adjust inspectedWindow.eval() callback parameters to expose non-exceptional error
2152         https://bugs.webkit.org/show_bug.cgi?id=108640
2153
2154         Reviewed by Vsevolod Vlasov.
2155
2156         - only set first parameter to eval() callback iff expression successfully evaluates;
2157         - use object, not bool as second parameter;
2158         - pass exceptions and extension errors as second parameter if evaluate failed;
2159         - minor drive-by changes in ExtensionAPI utilities.
2160
2161         * inspector/front-end/ExtensionAPI.js:
2162         (injectedExtensionAPI.ExtensionSidebarPaneImpl.prototype.setExpression):
2163         (injectedExtensionAPI.InspectedWindow.prototype.):
2164         (injectedExtensionAPI.InspectedWindow.prototype.eval):
2165         (injectedExtensionAPI.extractCallbackArgument):
2166         * inspector/front-end/ExtensionServer.js:
2167         (WebInspector.ExtensionServer.prototype.):
2168         (WebInspector.ExtensionServer.prototype._onEvaluateOnInspectedPage):
2169         (WebInspector.ExtensionStatus):
2170
2171 2013-02-11  Andrey Kosyakov  <caseq@chromium.org>
2172
2173         Web Inspector: [Extensions API] expose ExtensionServerClient to tests so tests use same port as extensions API
2174         https://bugs.webkit.org/show_bug.cgi?id=109443
2175
2176         Reviewed by Vsevolod Vlasov.
2177
2178         Promote extensionServer var to the outer closure, so it may be accessed by platform-specific (or test) code.
2179
2180         * inspector/front-end/ExtensionAPI.js:
2181         (buildExtensionAPIInjectedScript):
2182
2183 2013-02-11  Eric Seidel  <eric@webkit.org>
2184
2185         Move WebVTTToken off of MarkupTokenBase
2186         https://bugs.webkit.org/show_bug.cgi?id=109410
2187
2188         Reviewed by Tony Gentilcore.
2189
2190         This introduces a small amount of "copy/paste" code
2191         but actually makes WebVTTToken much smaller and simpler!
2192         This also frees the HTMLParser to have its Token class
2193         back to itself so we can tune it to make HTML faster.
2194
2195         * html/track/WebVTTToken.h:
2196         (WebVTTToken):
2197         (WebCore::WebVTTToken::WebVTTToken):
2198         (WebCore::WebVTTToken::appendToName):
2199         (WebCore::WebVTTToken::type):
2200         (WebCore::WebVTTToken::name):
2201         (WebCore::WebVTTToken::ensureIsCharacterToken):
2202         (WebCore::WebVTTToken::appendToCharacter):
2203         (WebCore::WebVTTToken::beginEmptyStartTag):
2204         (WebCore::WebVTTToken::beginStartTag):
2205         (WebCore::WebVTTToken::beginEndTag):
2206         (WebCore::WebVTTToken::beginTimestampTag):
2207         (WebCore::WebVTTToken::makeEndOfFile):
2208         (WebCore::WebVTTToken::clear):
2209
2210 2013-02-11  Joshua Bell  <jsbell@chromium.org>
2211
2212         [V8] IndexedDB: Minor GC can collect IDBDatabase wrapper with versionchange handler
2213         https://bugs.webkit.org/show_bug.cgi?id=108670
2214
2215         Reviewed by Kentaro Hara.
2216
2217         Prevent IDBDatabase's wrapper from being GC'd while the database is open if it has
2218         listeners, as those listeners may close the database in response to events.
2219
2220         Also, removed extraneous super-calls from hasPendingActivity() overrides.
2221
2222         Test: storage/indexeddb/database-wrapper.html
2223
2224         * Modules/indexeddb/IDBDatabase.cpp:
2225         (WebCore::IDBDatabase::hasPendingActivity): Implemented.
2226         * Modules/indexeddb/IDBDatabase.h: Declared.
2227         * Modules/indexeddb/IDBRequest.cpp:
2228         (WebCore::IDBRequest::hasPendingActivity): Simplified.
2229         * Modules/indexeddb/IDBTransaction.cpp:
2230         (WebCore::IDBTransaction::hasPendingActivity): Simplified.
2231
2232 2013-02-11  Eric Seidel  <eric@webkit.org>
2233
2234         Remove AttributeBase now that NEW_XML is gone
2235         https://bugs.webkit.org/show_bug.cgi?id=109408
2236
2237         Reviewed by Adam Barth.
2238
2239         Just deleting code.  HTMLToken::Attribute is now just
2240         the real class and not a typedef.
2241
2242         * html/parser/CompactHTMLToken.cpp:
2243         (WebCore::CompactHTMLToken::CompactHTMLToken):
2244         * html/parser/HTMLTokenizer.cpp:
2245         (WebCore::AtomicHTMLToken::nameForAttribute):
2246         * xml/parser/MarkupTokenBase.h:
2247         (WebCore):
2248         (MarkupTokenBase):
2249         (Attribute):
2250         (Range):
2251
2252 2013-02-11  Eric Seidel  <eric@webkit.org>
2253
2254         Rename PreloadTask to StartTagScanner to match its purpose
2255         https://bugs.webkit.org/show_bug.cgi?id=109406
2256
2257         Reviewed by Sam Weinig.
2258
2259         As discussed in bug 107807.
2260
2261         * html/parser/HTMLPreloadScanner.cpp:
2262         (WebCore::StartTagScanner::StartTagScanner):
2263         (WebCore::StartTagScanner::processAttributes):
2264         (WebCore::HTMLPreloadScanner::processToken):
2265
2266 2013-02-11  Vsevolod Vlasov  <vsevik@chromium.org>
2267
2268         Web Inspector: WebInspector.Project refactorings.
2269         https://bugs.webkit.org/show_bug.cgi?id=109433
2270
2271         Reviewed by Alexander Pavlov.
2272
2273         This change prepares Workspace and Project to migration to project-per-domain mode for network based projects.
2274         Renamed WebInspector.WorkspaceProvider to WebInspector.ProjectDelegate.
2275         Renamed Project.name() to Project.id() and delegated it to project delegate.
2276         Added Project.displayName() method that is delegated to project delegate.
2277         SimpleWorkspaceProvider is now responsible for creation of SimpleWorkspaceDelegates and
2278         isolates various mappings from Project/ProjectDelegate concept.
2279         UISourceCode is now created based on path in the project.
2280         UISourceCode uri is now calculated based on project and path (right now uri is equal to path).
2281
2282         * WebCore.gypi:
2283         * WebCore.vcproj/WebCore.vcproj:
2284         * inspector/compile-front-end.py:
2285         * inspector/front-end/FileSystemProjectDelegate.js: Renamed from Source/WebCore/inspector/front-end/FileSystemWorkspaceProvider.js.
2286         (WebInspector.FileSystemProjectDelegate):
2287         (WebInspector.FileSystemProjectDelegate.prototype.id):
2288         (WebInspector.FileSystemProjectDelegate.prototype.type):
2289         (WebInspector.FileSystemProjectDelegate.prototype.displayName):
2290         (WebInspector.FileSystemProjectDelegate.prototype.innerCallback):
2291         (WebInspector.FileSystemProjectDelegate.prototype.requestFileContent):
2292         (WebInspector.FileSystemProjectDelegate.prototype.setFileContent):
2293         (WebInspector.FileSystemProjectDelegate.prototype.contentCallback):
2294         (WebInspector.FileSystemProjectDelegate.prototype.searchInFileContent):
2295         (WebInspector.FileSystemProjectDelegate.prototype._contentTypeForPath):
2296         (WebInspector.FileSystemProjectDelegate.prototype._populate.filesLoaded):
2297         (WebInspector.FileSystemProjectDelegate.prototype._populate):
2298         (WebInspector.FileSystemProjectDelegate.prototype._addFile):
2299         (WebInspector.FileSystemProjectDelegate.prototype._removeFile):
2300         (WebInspector.FileSystemProjectDelegate.prototype.reset):
2301         (WebInspector.FileSystemUtils):
2302         (WebInspector.FileSystemUtils.errorHandler):
2303         (WebInspector.FileSystemUtils.requestFileSystem):
2304         (.fileSystemLoaded):
2305         (.innerCallback):
2306         (WebInspector.FileSystemUtils.requestFilesRecursive):
2307         (.fileEntryLoaded):
2308         (.fileLoaded):
2309         (.readerLoadEnd):
2310         (WebInspector.FileSystemUtils.requestFileContent):
2311         (.fileWriterCreated.fileTruncated):
2312         (.fileWriterCreated):
2313         (.writerEnd):
2314         (WebInspector.FileSystemUtils.setFileContent):
2315         (WebInspector.FileSystemUtils._getDirectory):
2316         (.toArray):
2317         (WebInspector.FileSystemUtils._readDirectory):
2318         (WebInspector.FileSystemUtils._requestEntries):
2319         * inspector/front-end/IsolatedFileSystemModel.js:
2320         (WebInspector.IsolatedFileSystemModel.prototype._innerAddFileSystem):
2321         * inspector/front-end/SimpleWorkspaceProvider.js:
2322         (WebInspector.SimpleProjectDelegate):
2323         (WebInspector.SimpleProjectDelegate.prototype.id):
2324         (WebInspector.SimpleProjectDelegate.prototype.displayName):
2325         (WebInspector.SimpleProjectDelegate.prototype.requestFileContent):
2326         (WebInspector.SimpleProjectDelegate.prototype.setFileContent):
2327         (WebInspector.SimpleProjectDelegate.prototype.searchInFileContent):
2328         (WebInspector.SimpleProjectDelegate.prototype.addFile):
2329         (WebInspector.SimpleProjectDelegate.prototype._uniquePath):
2330         (WebInspector.SimpleProjectDelegate.prototype.removeFile):
2331         (WebInspector.SimpleProjectDelegate.prototype.reset):
2332         (WebInspector.SimpleWorkspaceProvider):
2333         (WebInspector.SimpleWorkspaceProvider.uriForURL):
2334         (WebInspector.SimpleWorkspaceProvider.prototype.addFileForURL):
2335         (WebInspector.SimpleWorkspaceProvider.prototype.addUniqueFileForURL):
2336         (WebInspector.SimpleWorkspaceProvider.prototype._innerAddFileForURL):
2337         (WebInspector.SimpleWorkspaceProvider.prototype.removeFile):
2338         (WebInspector.SimpleWorkspaceProvider.prototype.reset):
2339         * inspector/front-end/UISourceCode.js:
2340         (WebInspector.UISourceCode):
2341         (WebInspector.UISourceCode.prototype.path):
2342         (WebInspector.UISourceCode.prototype.uri):
2343         * inspector/front-end/WebKit.qrc:
2344         * inspector/front-end/Workspace.js:
2345         (WebInspector.FileDescriptor):
2346         (WebInspector.ProjectDelegate):
2347         (WebInspector.ProjectDelegate.prototype.id):
2348         (WebInspector.ProjectDelegate.prototype.displayName):
2349         (WebInspector.ProjectDelegate.prototype.requestFileContent):
2350         (WebInspector.ProjectDelegate.prototype.setFileContent):
2351         (WebInspector.ProjectDelegate.prototype.searchInFileContent):
2352         (WebInspector.Project):
2353         (WebInspector.Project.prototype.id):
2354         (WebInspector.Project.prototype.type):
2355         (WebInspector.Project.prototype.displayName):
2356         (WebInspector.Project.prototype.isServiceProject):
2357         (WebInspector.Project.prototype._fileAdded):
2358         (WebInspector.Project.prototype._fileRemoved):
2359         (WebInspector.Project.prototype._reset):
2360         (WebInspector.Project.prototype.uiSourceCode):
2361         (WebInspector.Project.prototype.uiSourceCodeForOriginURL):
2362         (WebInspector.Project.prototype.uiSourceCodeForURI):
2363         (WebInspector.Project.prototype.uiSourceCodes):
2364         (WebInspector.Project.prototype.requestFileContent):
2365         (WebInspector.Project.prototype.setFileContent):
2366         (WebInspector.Project.prototype.searchInFileContent):
2367         (WebInspector.Project.prototype.dispose):
2368         (WebInspector.Workspace.prototype.uiSourceCode):
2369         (WebInspector.Workspace.prototype.uiSourceCodeForURI):
2370         (WebInspector.Workspace.prototype.addProject):
2371         (WebInspector.Workspace.prototype.removeProject):
2372         (WebInspector.Workspace.prototype.project):
2373         (WebInspector.Workspace.prototype.uiSourceCodes):
2374         (WebInspector.Workspace.prototype.projectForUISourceCode):
2375         * inspector/front-end/inspector.html:
2376
2377 2013-02-11  Yury Semikhatsky  <yurys@chromium.org>
2378
2379         Web Inspector: fix closure compiler warnings in the profiler code
2380         https://bugs.webkit.org/show_bug.cgi?id=109432
2381
2382         Reviewed by Pavel Feldman.
2383
2384         Updated type annotations to match the code.
2385
2386         * inspector/front-end/NativeMemorySnapshotView.js:
2387         * inspector/front-end/ProfilesPanel.js:
2388
2389 2013-02-11  Alexander Shalamov  <alexander.shalamov@intel.com>
2390
2391         [QT] Regression (r142444): Broke qt linux minimal build
2392         https://bugs.webkit.org/show_bug.cgi?id=109423
2393
2394         Reviewed by Kenneth Rohde Christiansen.
2395
2396         Test: cssom/cssvalue-comparison.html
2397
2398         * css/CSSValue.cpp:
2399         (WebCore::CSSValue::equals):
2400
2401 2013-02-11  Andrey Lushnikov  <lushnikov@chromium.org>
2402
2403         Web Inspector: introduce WebInspector.TextUtils
2404         https://bugs.webkit.org/show_bug.cgi?id=109289
2405
2406         Reviewed by Pavel Feldman.
2407
2408         Add new WebInspector.TextUtils file and extract commonly used
2409         text-operation subroutines from DefaultTextEditor into it.
2410
2411         No new tests: no change in behaviour.
2412
2413         * WebCore.gypi:
2414         * WebCore.vcproj/WebCore.vcproj:
2415         * inspector/compile-front-end.py:
2416         * inspector/front-end/DefaultTextEditor.js:
2417         (WebInspector.TextEditorMainPanel.TokenHighlighter.prototype._isWord):
2418         (WebInspector.DefaultTextEditor.WordMovementController.prototype._rangeForCtrlArrowMove):
2419         (WebInspector.TextEditorMainPanel.BraceHighlightController.prototype.handleSelectionChange):
2420         * inspector/front-end/TextUtils.js: Added.
2421         (WebInspector.TextUtils.isStopChar):
2422         (WebInspector.TextUtils.isWordChar):
2423         (WebInspector.TextUtils.isSpaceChar):
2424         (WebInspector.TextUtils.isWord):
2425         (WebInspector.TextUtils.isBraceChar):
2426         * inspector/front-end/WebKit.qrc:
2427         * inspector/front-end/inspector.html:
2428
2429 2013-02-11  Zan Dobersek  <zdobersek@igalia.com>
2430
2431         [GTK][Clang] Build errors in LocalizedStringsGtk.cpp
2432         https://bugs.webkit.org/show_bug.cgi?id=109418
2433
2434         Reviewed by Philippe Normand.
2435
2436         Use the C++ isfinite(float) and abs(float) (instead of fabsf(float))
2437         methods by including the WTF MathExtras.h header. Use a static cast to
2438         an integer type on the float return value of the abs(float) method call
2439         instead of the C-style cast.
2440
2441         No new tests - no new functiolnality.
2442
2443         * platform/gtk/LocalizedStringsGtk.cpp:
2444         (WebCore::localizedMediaTimeDescription):
2445
2446 2013-02-11  Zan Dobersek  <zdobersek@igalia.com>
2447
2448         Unreviewed build fix for the WTFURL backend of KURL.
2449
2450         * platform/KURL.cpp:
2451         (WebCore::KURL::isSafeToSendToAnotherThread): m_urlImpl is of RefPtr type so use
2452         the appropriate operator on it when calling the isSafeToSendToAnotherThread method.
2453
2454 2013-02-11  Mike West  <mkwst@chromium.org>
2455
2456         Range::collapsed callers should explicitly ASSERT_NO_EXCEPTION.
2457         https://bugs.webkit.org/show_bug.cgi?id=108921
2458
2459         Reviewed by Jochen Eisinger.
2460
2461         For clarity and consistency, this patch adjusts Range::collapsed() to
2462         drop the default value of the ExceptionCode parameter it accepts. The
2463         three call sites that called the method with no arguments (all part of
2464         Editor::rangeOfString) will now explicitly ASSERT_NO_EXCEPTION.
2465
2466         * dom/Range.h:
2467         (Range):
2468         * editing/Editor.cpp:
2469         (WebCore::Editor::rangeOfString):
2470
2471 2013-02-11  Alexei Filippov  <alph@chromium.org>
2472
2473         Web Inspector: Split Profiler domain in protocol into Profiler and HeapProfiler
2474         https://bugs.webkit.org/show_bug.cgi?id=108653
2475
2476         Reviewed by Yury Semikhatsky.
2477
2478         Currently CPU and heap profilers share the same domain 'Profiler' in the protocol.
2479         In fact these two profile types have not too much in common. So put each into its own domain.
2480         It should also help when Profiles panel gets split into several tools.
2481         This is the phase 1 which adds InspectorHeapProfilerAgent but doesn't
2482         change the original InspectorProfilerAgent.
2483
2484         * CMakeLists.txt:
2485         * GNUmakefile.list.am:
2486         * Target.pri:
2487         * WebCore.gypi:
2488         * WebCore.vcproj/WebCore.vcproj:
2489         * WebCore.vcxproj/WebCore.vcxproj:
2490         * WebCore.vcxproj/WebCore.vcxproj.filters:
2491         * WebCore.xcodeproj/project.pbxproj:
2492         * inspector/Inspector.json:
2493         * inspector/InspectorAllInOne.cpp:
2494         * inspector/InspectorController.cpp:
2495         (WebCore::InspectorController::InspectorController):
2496         * inspector/InspectorHeapProfilerAgent.cpp: Added.
2497         (WebCore):
2498         (WebCore::InspectorHeapProfilerAgent::create):
2499         (WebCore::InspectorHeapProfilerAgent::InspectorHeapProfilerAgent):
2500         (WebCore::InspectorHeapProfilerAgent::~InspectorHeapProfilerAgent):
2501         (WebCore::InspectorHeapProfilerAgent::resetState):
2502         (WebCore::InspectorHeapProfilerAgent::resetFrontendProfiles):
2503         (WebCore::InspectorHeapProfilerAgent::setFrontend):
2504         (WebCore::InspectorHeapProfilerAgent::clearFrontend):
2505         (WebCore::InspectorHeapProfilerAgent::restore):
2506         (WebCore::InspectorHeapProfilerAgent::collectGarbage):
2507         (WebCore::InspectorHeapProfilerAgent::createSnapshotHeader):
2508         (WebCore::InspectorHeapProfilerAgent::hasHeapProfiler):
2509         (WebCore::InspectorHeapProfilerAgent::getProfileHeaders):
2510         (WebCore::InspectorHeapProfilerAgent::getHeapSnapshot):
2511         (WebCore::InspectorHeapProfilerAgent::removeProfile):
2512         (WebCore::InspectorHeapProfilerAgent::takeHeapSnapshot):
2513         (WebCore::InspectorHeapProfilerAgent::getObjectByHeapObjectId):
2514         (WebCore::InspectorHeapProfilerAgent::getHeapObjectId):
2515         (WebCore::InspectorHeapProfilerAgent::reportMemoryUsage):
2516         * inspector/InspectorHeapProfilerAgent.h: Added.
2517         (WebCore):
2518         (InspectorHeapProfilerAgent):
2519         (WebCore::InspectorHeapProfilerAgent::clearProfiles):
2520         * inspector/InspectorInstrumentation.cpp:
2521         (WebCore):
2522         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
2523         * inspector/InstrumentingAgents.h:
2524         (WebCore):
2525         (InstrumentingAgents):
2526         (WebCore::InstrumentingAgents::inspectorHeapProfilerAgent):
2527         (WebCore::InstrumentingAgents::setInspectorHeapProfilerAgent):
2528         * inspector/WorkerInspectorController.cpp:
2529         (WebCore::WorkerInspectorController::WorkerInspectorController):
2530         * inspector/front-end/HeapSnapshotDataGrids.js:
2531         * inspector/front-end/HeapSnapshotGridNodes.js:
2532         (WebInspector.HeapSnapshotGenericObjectNode.prototype.queryObjectContent):
2533         * inspector/front-end/HeapSnapshotView.js:
2534         (WebInspector.HeapProfileHeader.prototype.startSnapshotTransfer):
2535         (WebInspector.HeapProfileHeader.prototype.saveToFile.onOpen):
2536         (WebInspector.HeapProfileHeader.prototype.saveToFile):
2537         * inspector/front-end/ProfilesPanel.js:
2538         (WebInspector.ProfilesPanel):
2539         (WebInspector.ProfilesPanel.prototype._clearProfiles):
2540         (WebInspector.ProfilesPanel.prototype._garbageCollectButtonClicked):
2541         (WebInspector.ProfilesPanel.prototype._removeProfileHeader):
2542         (WebInspector.ProfilesPanel.prototype._populateProfiles.var):
2543         (WebInspector.ProfilesPanel.prototype._populateProfiles.populateCallback):
2544         (WebInspector.ProfilesPanel.prototype._populateProfiles):
2545         (WebInspector.ProfilesPanel.prototype.takeHeapSnapshot):
2546         (WebInspector.ProfilesPanel.prototype.revealInView):
2547         (WebInspector.HeapProfilerDispatcher):
2548         (WebInspector.HeapProfilerDispatcher.prototype.addProfileHeader):
2549         (WebInspector.HeapProfilerDispatcher.prototype.addHeapSnapshotChunk):
2550         (WebInspector.HeapProfilerDispatcher.prototype.finishHeapSnapshot):
2551         (WebInspector.HeapProfilerDispatcher.prototype.resetProfiles):
2552         (WebInspector.HeapProfilerDispatcher.prototype.reportHeapSnapshotProgress):
2553         * inspector/front-end/TimelinePanel.js:
2554         (WebInspector.TimelinePanel.prototype._garbageCollectButtonClicked):
2555         * inspector/front-end/inspector.js:
2556         (WebInspector.doLoadedDone):
2557
2558 2013-02-11  Mike West  <mkwst@chromium.org>
2559
2560         Use IGNORE_EXCEPTION for Editor::countMatchesForText's ignored exceptions.
2561         https://bugs.webkit.org/show_bug.cgi?id=109372
2562
2563         Reviewed by Jochen Eisinger.
2564
2565         Rather than implicitly ignoring exceptions, we should use the
2566         IGNORE_EXCEPTION macro for clarity.
2567
2568         * editing/Editor.cpp:
2569         (WebCore::Editor::countMatchesForText):
2570
2571 2013-02-11  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
2572
2573         [Qt] Unreviewed. Fix minimal build after r142444.
2574
2575         * css/CSSValue.cpp:
2576         (WebCore::CSSValue::equals):
2577
2578 2013-02-11  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2579
2580         [EFL] Stop using smart pointers for Ecore_Timer
2581         https://bugs.webkit.org/show_bug.cgi?id=109409
2582
2583         Reviewed by Kenneth Rohde Christiansen.
2584
2585         Stop using a smart pointer for Ecore_Timer in RunLoop::TimerBase. This
2586         is a bad idea because the timer handle becomes invalid as soon as the
2587         timer callback returns ECORE_CALLBACK_CANCEL. This may lead to crashes
2588         on destruction because OwnPtr calls ecore_timer_del() on an invalid
2589         handle.
2590
2591         No new tests, already covered by exiting tests.
2592
2593         * platform/RunLoop.h:
2594         (TimerBase):
2595         * platform/efl/RunLoopEfl.cpp:
2596         (WebCore::RunLoop::TimerBase::timerFired):
2597         (WebCore::RunLoop::TimerBase::start):
2598         (WebCore::RunLoop::TimerBase::stop):
2599
2600 2013-02-11  Vladislav Kaznacheev  <kaznacheev@chromium.org>
2601
2602         Web Inspector: Allow SplitView to keep the sidebar size as a fraction of the container size
2603         https://bugs.webkit.org/show_bug.cgi?id=109414
2604
2605         Reviewed by Vsevolod Vlasov.
2606
2607         SplitView now interprets defaultSidebarWidth and defaultSidebarHeight values between 0 and 1 as
2608         fractions of the total container size. The sidebar then will grow or shrink along with the container.
2609         When the sidebar is resized manually the updated ratio is stored in the settings.
2610
2611         * inspector/front-end/SplitView.js:
2612         (WebInspector.SplitView):
2613         (WebInspector.SplitView.prototype._removeAllLayoutProperties):
2614         (WebInspector.SplitView.prototype._updateTotalSize):
2615         (WebInspector.SplitView.prototype._innerSetSidebarSize):
2616         (WebInspector.SplitView.prototype._saveSidebarSize):
2617
2618 2013-02-11  Pavel Feldman  <pfeldman@chromium.org>
2619
2620         Web Inspector: highlight DOM nodes on hover while debugging
2621         https://bugs.webkit.org/show_bug.cgi?id=109355
2622
2623         Reviewed by Vsevolod Vlasov.
2624
2625         Along with showing the popover, highlight the remote object as node.
2626
2627         * inspector/front-end/ObjectPopoverHelper.js:
2628         (WebInspector.ObjectPopoverHelper.prototype.):
2629         (WebInspector.ObjectPopoverHelper.prototype._showObjectPopover):
2630         (WebInspector.ObjectPopoverHelper.prototype._onHideObjectPopover):
2631
2632 2013-02-11  Andrey Lushnikov  <lushnikov@chromium.org>
2633
2634         Web Inspector: displaying whitespace characters is broken
2635         https://bugs.webkit.org/show_bug.cgi?id=109412
2636
2637         Reviewed by Vsevolod Vlasov.
2638
2639         Add "pointer-events: none" rule for pseudo-class "before", which
2640         maintains rendering of whitespace characters.
2641
2642         No new tests.
2643
2644         * inspector/front-end/inspectorSyntaxHighlight.css:
2645         (.webkit-whitespace::before):
2646
2647 2013-02-11  Alexander Pavlov  <apavlov@chromium.org>
2648
2649         Web Inspector: Implement position-based sourcemapping for stylesheets
2650         https://bugs.webkit.org/show_bug.cgi?id=109168
2651
2652         Reviewed by Vsevolod Vlasov.
2653
2654         This change introduces support for position-based source maps for CSS stylesheets.
2655         Sourcemaps and originating resources (sass, scss, etc.) are loaded synchronously
2656         upon the CSS UISourceCode addition. RangeBasedSourceMap is removed as it is not used.
2657
2658         Test: http/tests/inspector/stylesheet-source-mapping.html
2659
2660         * inspector/front-end/CSSStyleModel.js:
2661         (WebInspector.CSSStyleModel):
2662         (WebInspector.CSSStyleModel.prototype.setSourceMapping):
2663         (WebInspector.CSSStyleModel.prototype.rawLocationToUILocation):
2664         (WebInspector.CSSStyleModel.LiveLocation.prototype.uiLocation):
2665         (WebInspector.CSSLocation):
2666         (WebInspector.CSSProperty):
2667         (WebInspector.CSSProperty.parsePayload):
2668         * inspector/front-end/CompilerScriptMapping.js:
2669         (WebInspector.CompilerScriptMapping):
2670         (WebInspector.CompilerScriptMapping.prototype.rawLocationToUILocation):
2671         (WebInspector.CompilerScriptMapping.prototype.loadSourceMapForScript):
2672         * inspector/front-end/SASSSourceMapping.js:
2673         (WebInspector.SASSSourceMapping):
2674         (WebInspector.SASSSourceMapping.prototype._styleSheetChanged.callback):
2675         (WebInspector.SASSSourceMapping.prototype._styleSheetChanged):
2676         (WebInspector.SASSSourceMapping.prototype._reloadCSS):
2677         (WebInspector.SASSSourceMapping.prototype._resourceAdded.didRequestContent):
2678         (WebInspector.SASSSourceMapping.prototype._resourceAdded):
2679         (WebInspector.SASSSourceMapping.prototype._loadAndProcessSourceMap):
2680         (WebInspector.SASSSourceMapping.prototype.loadSourceMapForStyleSheet):
2681         (WebInspector.SASSSourceMapping.prototype._bindUISourceCode):
2682         (WebInspector.SASSSourceMapping.prototype.rawLocationToUILocation):
2683         (WebInspector.SASSSourceMapping.prototype.uiLocationToRawLocation):
2684         (WebInspector.SASSSourceMapping.prototype._reset):
2685         * inspector/front-end/SourceMap.js:
2686         (WebInspector.SourceMap):
2687         (WebInspector.SourceMap.load):
2688         (WebInspector.SourceMap.prototype.findEntry):
2689         (WebInspector.SourceMap.prototype.findEntryReversed):
2690         (WebInspector.SourceMap.prototype._parseMap):
2691         * inspector/front-end/StylesSourceMapping.js:
2692         (WebInspector.StylesSourceMapping):
2693         (WebInspector.StylesSourceMapping.prototype._bindUISourceCode):
2694         * inspector/front-end/inspector.js:
2695
2696 2013-02-11  Alexander Shalamov  <alexander.shalamov@intel.com>
2697
2698         Implement CSSValue::equals(const CSSValue&) to optimise CSSValue comparison
2699         https://bugs.webkit.org/show_bug.cgi?id=102901
2700
2701         Reviewed by Antti Koivisto.
2702
2703         Added comparison method to CSSValue and its children, so that the
2704         css values could be compared efficiently. Before this patch, CSSValue
2705         objects were compared using strings that were generated by the cssText() method.
2706
2707         Test: cssom/cssvalue-comparison.html
2708
2709         * css/CSSAspectRatioValue.cpp:
2710         (WebCore::CSSAspectRatioValue::equals):
2711         (WebCore):
2712         * css/CSSAspectRatioValue.h:
2713         (CSSAspectRatioValue):
2714         * css/CSSBasicShapes.cpp:
2715         (WebCore::CSSBasicShapeRectangle::equals):
2716         (WebCore):
2717         (WebCore::CSSBasicShapeCircle::equals):
2718         (WebCore::CSSBasicShapeEllipse::equals):
2719         (WebCore::CSSBasicShapePolygon::equals):
2720         * css/CSSBasicShapes.h:
2721         (CSSBasicShapeRectangle):
2722         (CSSBasicShapeCircle):
2723         (CSSBasicShapeEllipse):
2724         (CSSBasicShapePolygon):
2725         * css/CSSBorderImageSliceValue.cpp:
2726         (WebCore::CSSBorderImageSliceValue::equals):
2727         (WebCore):
2728         * css/CSSBorderImageSliceValue.h:
2729         (CSSBorderImageSliceValue):
2730         * css/CSSCalculationValue.cpp:
2731         (WebCore::CSSCalcValue::equals):
2732         (WebCore):
2733         (WebCore::CSSCalcPrimitiveValue::equals):
2734         (CSSCalcPrimitiveValue):
2735         (WebCore::CSSCalcPrimitiveValue::type):
2736         (WebCore::CSSCalcBinaryOperation::equals):
2737         (CSSCalcBinaryOperation):
2738         (WebCore::CSSCalcBinaryOperation::type):
2739         * css/CSSCalculationValue.h:
2740         (WebCore::CSSCalcExpressionNode::equals):
2741         (CSSCalcExpressionNode):
2742         (CSSCalcValue):
2743         * css/CSSCanvasValue.cpp:
2744         (WebCore::CSSCanvasValue::equals):
2745         (WebCore):
2746         * css/CSSCanvasValue.h:
2747         (CSSCanvasValue):
2748         * css/CSSComputedStyleDeclaration.cpp:
2749         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2750         (WebCore::CSSComputedStyleDeclaration::cssPropertyMatches):
2751         (WebCore::CSSComputedStyleDeclaration::getCSSPropertyValuesForSidesShorthand):
2752         * css/CSSCrossfadeValue.cpp:
2753         (WebCore::CSSCrossfadeValue::equals):
2754         (WebCore):
2755         * css/CSSCrossfadeValue.h:
2756         (CSSCrossfadeValue):
2757         * css/CSSCursorImageValue.cpp:
2758         (WebCore::CSSCursorImageValue::equals):
2759         (WebCore):
2760         * css/CSSCursorImageValue.h:
2761         (CSSCursorImageValue):
2762         * css/CSSFontFaceSrcValue.cpp:
2763         (WebCore::CSSFontFaceSrcValue::equals):
2764         (WebCore):
2765         * css/CSSFontFaceSrcValue.h:
2766         (CSSFontFaceSrcValue):
2767         * css/CSSFunctionValue.cpp:
2768         (WebCore::CSSFunctionValue::equals):
2769         (WebCore):
2770         * css/CSSFunctionValue.h:
2771         (CSSFunctionValue):
2772         * css/CSSGradientValue.cpp:
2773         (WebCore::CSSLinearGradientValue::equals):
2774         (WebCore):
2775         (WebCore::CSSRadialGradientValue::equals):
2776         * css/CSSGradientValue.h:
2777         (WebCore::CSSGradientColorStop::operator==):
2778         (CSSLinearGradientValue):
2779         (CSSRadialGradientValue):
2780         * css/CSSImageValue.cpp:
2781         (WebCore::CSSImageValue::equals):
2782         (WebCore):
2783         * css/CSSImageValue.h:
2784         (CSSImageValue):
2785         * css/CSSInheritedValue.h:
2786         (WebCore::CSSInheritedValue::equals):
2787         (CSSInheritedValue):
2788         * css/CSSInitialValue.h:
2789         (WebCore::CSSInitialValue::equals):
2790         (CSSInitialValue):
2791         * css/CSSLineBoxContainValue.h:
2792         (WebCore::CSSLineBoxContainValue::equals):
2793         * css/CSSPrimitiveValue.cpp:
2794         (WebCore::CSSPrimitiveValue::equals):
2795         (WebCore):
2796         * css/CSSPrimitiveValue.h:
2797         (CSSPrimitiveValue):
2798         * css/CSSReflectValue.cpp:
2799         (WebCore::CSSReflectValue::equals):
2800         (WebCore):
2801         * css/CSSReflectValue.h:
2802         (CSSReflectValue):
2803         * css/CSSTimingFunctionValue.cpp:
2804         (WebCore::CSSCubicBezierTimingFunctionValue::equals):
2805         (WebCore):
2806         (WebCore::CSSStepsTimingFunctionValue::equals):
2807         * css/CSSTimingFunctionValue.h:
2808         (WebCore::CSSLinearTimingFunctionValue::equals):
2809         (CSSLinearTimingFunctionValue):
2810         (CSSCubicBezierTimingFunctionValue):
2811         (CSSStepsTimingFunctionValue):
2812         * css/CSSUnicodeRangeValue.cpp:
2813         (WebCore::CSSUnicodeRangeValue::equals):
2814         (WebCore):
2815         * css/CSSUnicodeRangeValue.h:
2816         (CSSUnicodeRangeValue):
2817         * css/CSSValue.cpp:
2818         (WebCore):
2819         (WebCore::compareCSSValues):
2820         (WebCore::CSSValue::equals):
2821         * css/CSSValue.h:
2822         (CSSValue):
2823         (WebCore):
2824         (WebCore::compareCSSValueVector):
2825         (WebCore::compareCSSValuePtr):
2826         * css/CSSValueList.cpp:
2827         (WebCore::CSSValueList::removeAll):
2828         (WebCore::CSSValueList::hasValue):
2829         (WebCore::CSSValueList::equals):
2830         (WebCore):
2831         * css/CSSValueList.h:
2832         (CSSValueList):
2833         * css/CSSVariableValue.h:
2834         (WebCore::CSSVariableValue::equals):
2835         (CSSVariableValue):
2836         * css/Counter.h:
2837         (Counter):
2838         (WebCore::Counter::equals):
2839         * css/DashboardRegion.h:
2840         (WebCore::DashboardRegion::equals):
2841         * css/FontFeatureValue.cpp:
2842         (WebCore::FontFeatureValue::equals):
2843         (WebCore):
2844         * css/FontFeatureValue.h:
2845         (FontFeatureValue):
2846         * css/FontValue.cpp:
2847         (WebCore::FontValue::equals):
2848         (WebCore):
2849         * css/FontValue.h:
2850         (FontValue):
2851         * css/MediaQueryExp.h:
2852         (WebCore::MediaQueryExp::operator==):
2853         * css/Pair.h:
2854         (WebCore::Pair::equals):
2855         (Pair):
2856         * css/Rect.h:
2857         (WebCore::RectBase::equals):
2858         (RectBase):
2859         * css/ShadowValue.cpp:
2860         (WebCore::ShadowValue::equals):
2861         (WebCore):
2862         * css/ShadowValue.h:
2863         (ShadowValue):
2864         * css/StylePropertySet.cpp:
2865         (WebCore::StylePropertySet::get4Values):
2866         (WebCore::StylePropertySet::propertyMatches):
2867         * css/WebKitCSSArrayFunctionValue.cpp:
2868         (WebCore::WebKitCSSArrayFunctionValue::equals):
2869         (WebCore):
2870         * css/WebKitCSSArrayFunctionValue.h:
2871         (WebKitCSSArrayFunctionValue):
2872         * css/WebKitCSSFilterValue.cpp:
2873         (WebCore::WebKitCSSFilterValue::equals):
2874         (WebCore):
2875         * css/WebKitCSSFilterValue.h:
2876         (WebKitCSSFilterValue):
2877         * css/WebKitCSSMixFunctionValue.cpp:
2878         (WebCore::WebKitCSSMixFunctionValue::equals):
2879         (WebCore):
2880         * css/WebKitCSSMixFunctionValue.h:
2881         (WebKitCSSMixFunctionValue):
2882         * css/WebKitCSSSVGDocumentValue.cpp:
2883         (WebCore::WebKitCSSSVGDocumentValue::equals):
2884         (WebCore):
2885         * css/WebKitCSSSVGDocumentValue.h:
2886         (WebKitCSSSVGDocumentValue):
2887         * css/WebKitCSSShaderValue.cpp:
2888         (WebCore::WebKitCSSShaderValue::equals):
2889         (WebCore):
2890         * css/WebKitCSSShaderValue.h:
2891         (WebKitCSSShaderValue):
2892         * css/WebKitCSSTransformValue.h:
2893         (WebCore::WebKitCSSTransformValue::equals):
2894         * editing/EditingStyle.cpp:
2895         (WebCore::HTMLAttributeEquivalent::valueIsPresentInStyle):
2896         * svg/SVGColor.cpp:
2897         (WebCore::SVGColor::equals):
2898         (WebCore):
2899         * svg/SVGColor.h:
2900         (SVGColor):
2901         * svg/SVGPaint.cpp:
2902         (WebCore::SVGPaint::equals):
2903         (WebCore):
2904         * svg/SVGPaint.h:
2905         (SVGPaint):
2906
2907 2013-02-11  Pan Deng  <pan.deng@intel.com>
2908
2909         [Web Inspector] Network panel, sort by "transferSize" instead of "resourceSize".
2910         https://bugs.webkit.org/show_bug.cgi?id=109142.
2911
2912         Reviewed by Vsevolod Vlasov.
2913
2914         Sort by "transferSize" as it is the primary rather than "resoureSize".
2915
2916         No new tests.
2917
2918         * inspector/front-end/NetworkPanel.js:
2919         (WebInspector.NetworkDataGridNode.SizeComparator):
2920
2921 2013-02-11  Eugene Klyuchnikov  <eustas@chromium.org>
2922
2923         Web Inspector: [Resources] Prefactorings in DataGrid and CookieTable
2924         https://bugs.webkit.org/show_bug.cgi?id=109141
2925
2926         Reviewed by Vsevolod Vlasov.
2927
2928         1) Make deleteCookie method static and move to WebInspector.Cookie
2929         2) Replace resfreshCallback getter/setter in DataGrid with
2930         constructor parameter
2931
2932         * inspector/front-end/CookieItemsView.js: Adopt changes.
2933         * inspector/front-end/CookieParser.js:
2934         (WebInspector.Cookie.prototype.remove): Moved from CookiesTable.
2935         * inspector/front-end/CookiesTable.js: Adopt changes.
2936         * inspector/front-end/DataGrid.js:
2937         Replace setter with constructor parameter.
2938
2939 2013-02-11  John J. Barton  <johnjbarton@chromium.org>
2940
2941         Web Inspector: Don't throw exceptions in WebInspector.Color
2942         https://bugs.webkit.org/show_bug.cgi?id=104835
2943
2944         Reviewed by Vsevolod Vlasov.
2945
2946         WebInspector.Color.parse() returns a Color from a string, or null;
2947         Ctor calls now call parse();
2948         In the StylesSideBarPane, test null rather than catch(e).
2949
2950         Added case to inspector/styles/styles-invalid-color-values.html
2951
2952         * inspector/front-end/Color.js:
2953         (WebInspector.Color):
2954         (WebInspector.Color.parse):
2955         (WebInspector.Color.fromRGBA):
2956         (WebInspector.Color.fromRGB):
2957         (WebInspector.Color.prototype.toString):
2958         (WebInspector.Color.prototype._parse.this.alpha.set 0):
2959         (WebInspector.Color.prototype._parse.this.nickname.set 2):
2960         (WebInspector.Color.prototype._parse.this.hsla.set 1):
2961         (WebInspector.Color.prototype._parse.this.rgba.set 0):
2962         (WebInspector.Color.prototype._parse.set WebInspector):
2963         (WebInspector.Color.prototype._parse):
2964         * inspector/front-end/Spectrum.js:
2965         (WebInspector.Spectrum.prototype.get color):
2966         * inspector/front-end/StylesSidebarPane.js:
2967
2968 2013-02-11  Andrey Lushnikov  <lushnikov@chromium.org>
2969
2970         Web Inspector: home button behaviour is wrong in DTE
2971         https://bugs.webkit.org/show_bug.cgi?id=109154
2972
2973         Reviewed by Vsevolod Vlasov.
2974
2975         Handle home key shortcut explicitly in TextEditorMainPanel.
2976
2977         New test: inspector/editor/text-editor-home-button.html
2978
2979         * inspector/front-end/DefaultTextEditor.js:
2980         (WebInspector.TextEditorMainPanel.prototype._registerShortcuts):
2981         (WebInspector.TextEditorMainPanel.prototype._handleHomeKey):
2982
2983 2013-02-11  Abhishek Arya  <inferno@chromium.org>
2984
2985         Add ASSERT_WITH_SECURITY_IMPLICATION to detect out of bounds access
2986         https://bugs.webkit.org/show_bug.cgi?id=108981
2987
2988         Reviewed by Eric Seidel.
2989
2990         * Modules/mediastream/RTCStatsResponse.cpp:
2991         (WebCore::RTCStatsResponse::addElement):
2992         (WebCore::RTCStatsResponse::addStatistic):
2993         * Modules/websockets/WebSocketChannel.cpp:
2994         (WebCore::WebSocketChannel::skipBuffer):
2995         * css/CSSCalculationValue.cpp:
2996         (WebCore::CSSCalcExpressionNodeParser::parseValueMultiplicativeExpression):
2997         (WebCore::CSSCalcExpressionNodeParser::parseAdditiveValueExpression):
2998         * css/WebKitCSSTransformValue.cpp:
2999         (WebCore::transformValueToCssString):
3000         * editing/TextIterator.cpp:
3001         (WebCore::SearchBuffer::search):
3002         * html/HTMLElement.cpp:
3003         (WebCore::parseColorStringWithCrazyLegacyRules):
3004         * html/ImageData.cpp:
3005         (WebCore::ImageData::ImageData):
3006         * html/shadow/DateTimeSymbolicFieldElement.cpp:
3007         (WebCore::DateTimeSymbolicFieldElement::DateTimeSymbolicFieldElement):
3008         * html/track/TextTrackCueList.cpp:
3009         (WebCore::TextTrackCueList::add):
3010         * platform/SharedBuffer.cpp:
3011         (WebCore::SharedBuffer::getSomeData):
3012         * platform/SharedBufferChunkReader.cpp:
3013         (WebCore::SharedBufferChunkReader::nextChunk):
3014         * platform/audio/HRTFDatabase.cpp:
3015         (WebCore::HRTFDatabase::getKernelsFromAzimuthElevation):
3016         * platform/graphics/GlyphPageTreeNode.cpp:
3017         (WebCore::GlyphPageTreeNode::initializePage):
3018         * platform/graphics/Region.cpp:
3019         (WebCore::Region::Shape::segments_end):
3020         * platform/graphics/filters/FEComponentTransfer.cpp:
3021         (WebCore::FEComponentTransfer::getValues):
3022         * platform/graphics/filters/FilterEffect.cpp:
3023         (WebCore::FilterEffect::inputEffect):
3024         * platform/text/TextCodecUTF8.cpp:
3025         (WebCore::TextCodecUTF8::decode):
3026         * platform/text/mac/TextCodecMac.cpp:
3027         (WebCore::TextCodecMac::decode):
3028         * rendering/RenderBlockLineLayout.cpp:
3029         (WebCore::RenderBlock::checkFloatsInCleanLine):
3030         * svg/SVGAnimatedTypeAnimator.h:
3031         (WebCore::SVGAnimatedTypeAnimator::executeAction):
3032         * svg/SVGAnimationElement.cpp:
3033         (WebCore::SVGAnimationElement::calculatePercentForSpline):
3034         * svg/animation/SVGSMILElement.cpp:
3035         (WebCore::SVGSMILElement::findInstanceTime):
3036
3037 2013-02-10  Chris Fleizach  <cfleizach@apple.com>
3038
3039         WebSpeech: Implement basic speaking/finished speaking behavior
3040         https://bugs.webkit.org/show_bug.cgi?id=107135
3041
3042         Reviewed by Sam Weinig.
3043
3044         Implements the basic functionality of speaking utterances.
3045
3046         In the WebCore side, it manages the speech queue the way the spec defines
3047         (that is, new jobs are appended to a queue and wait for other jobs to finish).
3048
3049         On the Mac side, it instantiates a synthesizer and handles the callbacks for when
3050         jobs are finished. It sends those jobs back to WebCore to dispatch the right events.
3051
3052         Test: platform/mac/fast/speechsynthesis/speech-synthesis-speak.html
3053
3054         * Modules/speech/SpeechSynthesis.cpp:
3055         (WebCore::SpeechSynthesis::SpeechSynthesis):
3056         (WebCore::SpeechSynthesis::paused):
3057         (WebCore::SpeechSynthesis::startSpeakingImmediately):
3058         (WebCore::SpeechSynthesis::speak):
3059         (WebCore):
3060         (WebCore::SpeechSynthesis::fireEvent):
3061         (WebCore::SpeechSynthesis::handleSpeakingCompleted):
3062         (WebCore::SpeechSynthesis::didStartSpeaking):
3063         (WebCore::SpeechSynthesis::didFinishSpeaking):
3064         (WebCore::SpeechSynthesis::speakingErrorOccurred):
3065         * Modules/speech/SpeechSynthesis.h:
3066         (WebCore):
3067         (WebCore::SpeechSynthesis::speaking):
3068         (SpeechSynthesis):
3069         * Modules/speech/SpeechSynthesisEvent.cpp:
3070         (WebCore::SpeechSynthesisEvent::create):
3071         (WebCore):
3072         (WebCore::SpeechSynthesisEvent::SpeechSynthesisEvent):
3073         * Modules/speech/SpeechSynthesisEvent.h:
3074         (SpeechSynthesisEvent):
3075         (WebCore::SpeechSynthesisEvent::interfaceName):
3076         * Modules/speech/SpeechSynthesisUtterance.h:
3077         (WebCore::SpeechSynthesisUtterance::startTime):
3078         (WebCore::SpeechSynthesisUtterance::setStartTime):
3079         (SpeechSynthesisUtterance):
3080         * platform/PlatformSpeechSynthesisUtterance.cpp:
3081         (WebCore::PlatformSpeechSynthesisUtterance::PlatformSpeechSynthesisUtterance):
3082         * platform/PlatformSpeechSynthesisUtterance.h:
3083         (PlatformSpeechSynthesisUtterance):
3084         (WebCore::PlatformSpeechSynthesisUtterance::setVolume):
3085         (WebCore::PlatformSpeechSynthesisUtterance::setRate):
3086         (WebCore::PlatformSpeechSynthesisUtterance::setPitch):
3087         (WebCore::PlatformSpeechSynthesisUtterance::startTime):
3088         (WebCore::PlatformSpeechSynthesisUtterance::setStartTime):
3089         (WebCore::PlatformSpeechSynthesisUtterance::client):
3090         * platform/PlatformSpeechSynthesizer.cpp:
3091         (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
3092         * platform/PlatformSpeechSynthesizer.h:
3093         (PlatformSpeechSynthesizerClient):
3094         (WebCore::PlatformSpeechSynthesizer::client):
3095         (PlatformSpeechSynthesizer):
3096         * platform/mac/PlatformSpeechSynthesizerMac.mm:
3097         (-[WebSpeechSynthesisWrapper initWithSpeechSynthesizer:WebCore::]):
3098         (-[WebSpeechSynthesisWrapper dealloc]):
3099         (-[WebSpeechSynthesisWrapper convertRateToWPM:]):
3100         (-[WebSpeechSynthesisWrapper speakUtterance:WebCore::]):
3101         (-[WebSpeechSynthesisWrapper speechSynthesizer:didFinishSpeaking:]):
3102         (WebCore::PlatformSpeechSynthesizer::speak):
3103
3104 2013-02-10  Eric Seidel  <eric@webkit.org>
3105
3106         Make the existing HTMLPreloadScanner threading-aware
3107         https://bugs.webkit.org/show_bug.cgi?id=107807
3108
3109         Reviewed by Adam Barth.
3110
3111         The HTMLPreloadScanner and CSSPreloadScanner do a number of things.
3112         CSSPreloadScanner is mostly just a helper class for HTMLPreloadScanner.
3113         HTMLPreloadScanner runs its own copy of the HTMLTokenizer and uses
3114         HTMLTokenizer::updateStateFor to emulate enough of the TreeBuilder
3115         to get a realistic stream of tokens.  It does some additional TreeBuilder
3116         emulation, including tracking template tags and base tags, but mostly
3117         just scans the token stream for start-tags and looks for URLs in them.
3118         It tracks when it has seen a <style> tag and starts sending all character tokens
3119         to the CSSPreloadScanner until a </style> tag is seen.
3120         It also (unfortunately) knows some about the loader guts and how to construct
3121         a proper CachedResourcRequest and issue a preload.
3122
3123         This patch changes the model so that the preload scanners only know how to produce
3124         PreloadRequest objects and append them to a passed-in vector.
3125
3126         This changes the preload-scanner behavior so that preloads are now all issued in one large
3127         batch at the end of scanning, instead of as we hit each resource.  It's possible that
3128         we'll wait to instead check for preload requests more often, at a possible tradeoff
3129         to tokenizing speed.
3130
3131         An alternate approach might be to pass in a preload-delegate of sorts which knew how
3132         to either build a vector, or send requests immediately.  For now the build-a-vector-always
3133         approach seems clean, and does not seem to slow down our PerformanceTest microbenchmarks at least.
3134
3135         This patch has 2 main pieces:
3136         - Remove Document and (and loader) dependencies from HTMLPreloadScanner/CSSPreloadScanner
3137           This is done through introduction of a new HTMLResourcePreloader class which holds
3138           a Document* and knows how to talk to the CachedResourceLoader.
3139         - Clean-up HTMLPreloadScanners token-loop to not be tied to having a Tokenizer.
3140           (On a background thead, the HTMLPreloadScanner won't own the tokenizer, it will just
3141            be passed in tokens and expected to issue loads if necessary.)
3142
3143         This passes all of the LayoutTests using the main thread parser.
3144
3145         This patch does not make the HTMLPreloadScanner 100% ready for threading
3146         (it still uses AtomicString which is currently not-OK on the parser thread)
3147         but it's very close.  Two further (already written) patches will complete this.
3148
3149         * CMakeLists.txt:
3150         * GNUmakefile.list.am:
3151         * Target.pri:
3152         * WebCore.gypi:
3153         * WebCore.vcproj/WebCore.vcproj:
3154         * WebCore.vcxproj/WebCore.vcxproj:
3155         * WebCore.xcodeproj/project.pbxproj:
3156         * html/parser/CSSPreloadScanner.cpp:
3157         (WebCore::CSSPreloadScanner::CSSPreloadScanner):
3158         (WebCore::CSSPreloadScanner::scan):
3159         (WebCore::CSSPreloadScanner::emitRule):
3160         * html/parser/CSSPreloadScanner.h:
3161         (CSSPreloadScanner):
3162         * html/parser/HTMLDocumentParser.cpp:
3163         (WebCore::HTMLDocumentParser::HTMLDocumentParser):
3164         (WebCore::HTMLDocumentParser::pumpTokenizer):
3165         (WebCore::HTMLDocumentParser::insert):
3166         (WebCore::HTMLDocumentParser::append):
3167         (WebCore::HTMLDocumentParser::appendCurrentInputStreamToPreloadScannerAndScan):
3168         * html/parser/HTMLDocumentParser.h:
3169         (HTMLDocumentParser):
3170         * html/parser/HTMLPreloadScanner.cpp:
3171         (WebCore::isStartTag):
3172         (WebCore):
3173         (WebCore::isStartOrEndTag):
3174         (WebCore::PreloadTask::processAttributes):
3175         (WebCore::PreloadTask::charset):
3176         (PreloadTask):
3177         (WebCore::PreloadTask::resourceType):
3178         (WebCore::PreloadTask::shouldPreload):
3179         (WebCore::PreloadTask::createPreloadRequest):
3180         (WebCore::HTMLPreloadScanner::HTMLPreloadScanner):
3181         (WebCore::HTMLPreloadScanner::scan):
3182         (WebCore::HTMLPreloadScanner::processPossibleTemplateTag):
3183         (WebCore::HTMLPreloadScanner::processPossibleStyleTag):
3184         (WebCore::HTMLPreloadScanner::processPossibleBaseTag):
3185         (WebCore::HTMLPreloadScanner::processToken):
3186         * html/parser/HTMLPreloadScanner.h:
3187         (HTMLPreloadScanner):
3188         * html/parser/HTMLResourcePreloader.cpp: Added.
3189         (WebCore):
3190         (WebCore::isStringSafeToSendToAnotherThread):
3191         (WebCore::PreloadRequest::isSafeToSendToAnotherThread):
3192         (WebCore::PreloadRequest::completeURL):
3193         (WebCore::PreloadRequest::resourceRequest):
3194         (WebCore::HTMLResourcePreloader::preload):
3195         * html/parser/HTMLResourcePreloader.h: Added.
3196         (WebCore):
3197         (PreloadRequest):
3198         (WebCore::PreloadRequest::create):
3199         (WebCore::PreloadRequest::PreloadRequest):
3200         (HTMLResourcePreloader):
3201         (WebCore::HTMLResourcePreloader::HTMLResourcePreloader):
3202         (WebCore::HTMLResourcePreloader::createWeakPtr):
3203         * loader/cache/CachedResourceRequest.h:
3204
3205 2013-02-06  Kentaro Hara  <haraken@chromium.org>
3206
3207         [V8] Rename isolated() to getWorld(), rename worldForEnteredContextIfIsolated() to worldForEnteredContext()
3208         https://bugs.webkit.org/show_bug.cgi?id=109039
3209
3210         Reviewed by Adam Barth.
3211
3212         This is a follow-up patch for r141983.
3213         Rename methods for consistency.
3214
3215         No tests. No change in behavior.
3216
3217         * bindings/v8/DOMDataStore.cpp:
3218         (WebCore::DOMDataStore::current):
3219         * bindings/v8/DOMWrapperWorld.h:
3220         (WebCore::DOMWrapperWorld::getWorld):
3221         * bindings/v8/ScriptController.cpp:
3222         (WebCore::ScriptController::shouldBypassMainWorldContentSecurityPolicy):
3223         (WebCore::ScriptController::currentWorldContext):
3224         * bindings/v8/V8Binding.h:
3225         (WebCore::worldForEnteredContext):
3226         * bindings/v8/WorldContextHandle.cpp:
3227         (WebCore::WorldContextHandle::WorldContextHandle):
3228         * bindings/v8/custom/V8DocumentCustom.cpp:
3229         (WebCore::wrap):
3230         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
3231         (WebCore::wrap):
3232         * bindings/v8/custom/V8SVGDocumentCustom.cpp:
3233         (WebCore::wrap):
3234         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
3235         (WebCore::V8XMLHttpRequest::constructorCallbackCustom):
3236
3237 2013-02-10  Alexandre Elias  <aelias@chromium.org>
3238
3239         [chromium] Fix Android scrollbar size
3240         https://bugs.webkit.org/show_bug.cgi?id=109374
3241
3242         Reviewed by James Robinson.
3243
3244         This shrinks scrollbars to 3 device-independent pixels (usually 6
3245         physical pixels) and deletes the edge fade. Although the Android
3246         system theme does have an edge fade, it's a much sharper cliff
3247         than we had (against black, the colors go 64 -> 64 -> 52 -> 21 -> 0)
3248         and I can't perceive any difference compared with no fade at all.
3249
3250         No new tests (due for rewrite in a week anyway).
3251
3252         * platform/chromium/ScrollbarThemeChromiumAndroid.cpp:
3253         (WebCore):
3254         (WebCore::ScrollbarThemeChromiumAndroid::paintThumb):
3255
3256 2013-02-04  Kentaro Hara  <haraken@chromium.org>
3257
3258         [V8] Remove V8GCController::m_edenNodes and make minor DOM GC more precise
3259         https://bugs.webkit.org/show_bug.cgi?id=108579
3260
3261         Reviewed by Adam Barth.
3262
3263         Currently V8GCController::m_edenNodes stores a list of nodes whose
3264         wrappers have been created since the latest GC. The reason why we
3265         needed m_edenNodes is that there was no way to know a list of wrappers
3266         in the new space of V8. By using m_edenNodes, we had been approximating
3267         'wrappers in the new space' by 'wrappers that have been created since
3268         the latest GC'.
3269
3270         Now V8 provides VisitHandlesForPartialDependence(), with which WebKit
3271         can know a list of wrappers in the new space. By using the API, we can
3272         remove V8GCController::m_edenNodes. The benefit is that (1) we no longer
3273         need to keep m_edenNodes and that (2) it enables more precise minor
3274         DOM GC (Remember that m_edenNodes was just an approximation).
3275
3276         Performance benchmark: https://bugs.webkit.org/attachment.cgi?id=185940
3277         The benchmark runs 300 iterations, each of which creates 100000 elements.
3278         The benchmark measures average, min, median, max and stdev of execution times
3279         of the 300 iterations. This will tell us the worst-case overhead of this change.
3280
3281         Before:
3282           mean=59.91ms, min=39ms, median=42ms, max=258ms, stdev=47.48ms
3283
3284         After:
3285           mean=58.75ms, min=35ms, median=41ms, max=250ms, stdev=47.32ms
3286
3287         As shown above, I couldn't observe any performance regression.
3288
3289         No tests. No change in behavior.
3290
3291         * bindings/v8/DOMDataStore.h:
3292         (WebCore::DOMDataStore::setWrapperInObject):
3293         * bindings/v8/DOMWrapperWorld.h:
3294         (DOMWrapperWorld):
3295         (WebCore::DOMWrapperWorld::getWorldWithoutContextCheck):
3296         * bindings/v8/V8Binding.h:
3297         (WebCore):
3298         (WebCore::worldForEnteredContextIfIsolated):
3299         (WebCore::worldForEnteredContextWithoutContextCheck):
3300         * bindings/v8/V8DOMWindowShell.cpp:
3301         (WebCore::V8DOMWindowShell::initializeIfNeeded):
3302         * bindings/v8/V8GCController.cpp:
3303         (WebCore::gcTree):
3304         (WebCore):
3305         (MinorGCWrapperVisitor):
3306         (WebCore::MinorGCWrapperVisitor::MinorGCWrapperVisitor):
3307         (WebCore::MinorGCWrapperVisitor::notifyFinished):
3308         (WebCore::MajorGCWrapperVisitor::MajorGCWrapperVisitor):
3309         (WebCore::V8GCController::gcPrologue):
3310         (WebCore::V8GCController::minorGCPrologue):
3311         (WebCore::V8GCController::majorGCPrologue):
3312         * bindings/v8/V8GCController.h:
3313         (V8GCController):
3314
3315 2013-02-10  Tim Horton  <timothy_horton@apple.com>
3316
3317         REGRESSION (r132422): Page content and scrollbars are incorrectly offset after restoring a page from the page cache
3318         https://bugs.webkit.org/show_bug.cgi?id=109317
3319         <rdar://problem/12649131>
3320
3321         Reviewed by Simon Fraser.
3322
3323         Mark all scrolling that occurs beneath FrameView::layout as programmatic.
3324
3325         Test: platform/mac-wk2/tiled-drawing/tiled-drawing-scroll-position-page-cache-restoration.html
3326
3327         * page/FrameView.cpp:
3328         (WebCore::FrameView::layout):
3329
3330 2013-02-10  Kent Tamura  <tkent@chromium.org>
3331
3332         [Mac] Fix release build failure by recent reverts
3333
3334         * WebCore.exp.in:
3335
3336 2013-02-10  Philippe Normand  <pnormand@igalia.com>
3337
3338         [GStreamer] media/video-controls-fullscreen-volume.html crashes
3339         https://bugs.webkit.org/show_bug.cgi?id=108682
3340
3341         Reviewed by Martin Robinson.
3342
3343         Clean up various signal handlers and avoid bad interaction between
3344         the FullscreenVideoControllerGStreamer and its subclasses,
3345         especially when the platform video window is created.
3346
3347         * platform/graphics/gstreamer/FullscreenVideoControllerGStreamer.cpp:
3348         (WebCore::FullscreenVideoControllerGStreamer::enterFullscreen):
3349         Initialize the window before connecting to the volume/mute
3350         signals. This ensures that the signals won't ever interfere with
3351         an inexisting window.
3352         * platform/graphics/gstreamer/GStreamerGWorld.cpp:
3353         (WebCore::GStreamerGWorld::~GStreamerGWorld): Remove GstBus
3354         synchronous handler function.
3355         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3356         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3357         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
3358         Disconnect from volume/mute signals.
3359         (WebCore::MediaPlayerPrivateGStreamerBase::setStreamVolumeElement):
3360         Keep a trace of volume/mute signal handlers.
3361         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
3362         Various forward type declarations to avoid un-necessary header includes.
3363         (MediaPlayerPrivateGStreamerBase):
3364         * platform/graphics/gtk/FullscreenVideoControllerGtk.cpp:
3365         (WebCore::FullscreenVideoControllerGtk::FullscreenVideoControllerGtk):
3366         (WebCore::FullscreenVideoControllerGtk::volumeChanged): Bail out
3367         if volume button hasn't been created yet.
3368         (WebCore::FullscreenVideoControllerGtk::muteChanged): Ditto.
3369
3370 2013-02-10  Andreas Kling  <akling@apple.com>
3371
3372         RenderStyle should use copy-on-write inheritance for NinePieceImage.
3373         <http://webkit.org/b/109366>
3374
3375         Reviewed by Antti Koivisto.
3376
3377         Refactor NinePieceImage to hold a copy-on-write DataRef like other RenderStyle substructures.
3378         This allows us to avoids copying the NinePieceImageData when one RenderStyle inherits from another
3379         but modifies something in the substructure holding the NinePieceImage (typically StyleSurroundData.)
3380
3381         Also made RenderStyle not copy-on-write its StyleSurroundData prematurely when doing a no-op write
3382         to a border-image related value.
3383
3384         1.23 MB progression on Membuster3.
3385
3386         * rendering/style/NinePieceImage.cpp:
3387         (WebCore::defaultData):
3388         (WebCore::NinePieceImage::NinePieceImage):
3389         (WebCore::NinePieceImageData::NinePieceImageData):
3390         (WebCore::NinePieceImageData::operator==):
3391         * rendering/style/NinePieceImage.h:
3392         (WebCore::NinePieceImageData::create):
3393         (WebCore::NinePieceImageData::copy):
3394         (NinePieceImageData):
3395         (NinePieceImage):
3396         (WebCore::NinePieceImage::operator==):
3397         (WebCore::NinePieceImage::operator!=):
3398         (WebCore::NinePieceImage::hasImage):
3399         (WebCore::NinePieceImage::image):
3400         (WebCore::NinePieceImage::setImage):
3401         (WebCore::NinePieceImage::imageSlices):
3402         (WebCore::NinePieceImage::setImageSlices):
3403         (WebCore::NinePieceImage::fill):
3404         (WebCore::NinePieceImage::setFill):
3405         (WebCore::NinePieceImage::borderSlices):
3406         (WebCore::NinePieceImage::setBorderSlices):
3407         (WebCore::NinePieceImage::outset):
3408         (WebCore::NinePieceImage::setOutset):
3409         (WebCore::NinePieceImage::horizontalRule):
3410         (WebCore::NinePieceImage::setHorizontalRule):
3411         (WebCore::NinePieceImage::verticalRule):
3412         (WebCore::NinePieceImage::setVerticalRule):
3413         (WebCore::NinePieceImage::copyImageSlicesFrom):
3414         (WebCore::NinePieceImage::copyBorderSlicesFrom):
3415         (WebCore::NinePieceImage::copyOutsetFrom):
3416         (WebCore::NinePieceImage::copyRepeatFrom):
3417         (WebCore::NinePieceImage::setMaskDefaults):
3418         (WebCore::NinePieceImage::computeOutset):
3419         * rendering/style/RenderStyle.cpp:
3420         (WebCore::RenderStyle::setBorderImageSource):
3421         (WebCore::RenderStyle::setBorderImageSlices):
3422         (WebCore::RenderStyle::setBorderImageWidth):
3423         (WebCore::RenderStyle::setBorderImageOutset):
3424         * rendering/style/RenderStyle.h:
3425
3426 2013-02-10  Kent Tamura  <tkent@chromium.org>
3427
3428         Unreviewed, rolling out r142343.
3429         http://trac.webkit.org/changeset/142343
3430         https://bugs.webkit.org/show_bug.cgi?id=108284
3431
3432         It might make inspector/profiler/selector-profiler-url.html
3433         crashy.
3434
3435         * WebCore.exp.in:
3436         * css/plugIns.css:
3437         (p):
3438         * html/HTMLPlugInElement.cpp:
3439         (WebCore::HTMLPlugInElement::defaultEventHandler):
3440         * html/HTMLPlugInImageElement.cpp:
3441         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
3442         (WebCore::HTMLPlugInImageElement::createRenderer):
3443         (WebCore::HTMLPlugInImageElement::willRecalcStyle):
3444         (WebCore::HTMLPlugInImageElement::updateSnapshot):
3445         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot):
3446         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn):
3447         * html/HTMLPlugInImageElement.h:
3448         (WebCore):
3449         (HTMLPlugInImageElement):
3450         * page/ChromeClient.h:
3451         (WebCore::ChromeClient::plugInStartLabelImage):
3452         * platform/LocalizedStrings.cpp:
3453         * platform/LocalizedStrings.h:
3454         * platform/blackberry/LocalizedStringsBlackBerry.cpp:
3455         * platform/chromium/LocalizedStringsChromium.cpp:
3456         * platform/efl/LocalizedStringsEfl.cpp:
3457         (WebCore):
3458         * platform/gtk/LocalizedStringsGtk.cpp:
3459         (WebCore):
3460         * platform/qt/LocalizedStringsQt.cpp:
3461         * rendering/RenderSnapshottedPlugIn.cpp:
3462         (WebCore):
3463         (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn):
3464         (WebCore::RenderSnapshottedPlugIn::paint):
3465         (WebCore::RenderSnapshottedPlugIn::paintReplaced):
3466         (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
3467         (WebCore::RenderSnapshottedPlugIn::paintReplacedSnapshot):
3468         (WebCore::RenderSnapshottedPlugIn::startLabelImage):
3469         (WebCore::RenderSnapshottedPlugIn::paintReplacedSnapshotWithLabel):
3470         (WebCore::RenderSnapshottedPlugIn::getCursor):
3471         (WebCore::RenderSnapshottedPlugIn::handleEvent):
3472         (WebCore::RenderSnapshottedPlugIn::tryToFitStartLabel):
3473         * rendering/RenderSnapshottedPlugIn.h:
3474
3475 2013-02-10  Andreas Kling  <akling@apple.com>
3476
3477         RenderText: Access characters through m_text instead of caching data pointers separately.
3478         <http://webkit.org/b/109357>
3479
3480         Reviewed by Antti Koivisto.
3481
3482         Go through RenderText::m_text.impl() instead of caching the character data pointer.
3483         RenderText should never have a null String in m_text so it's safe to access impl() directly.
3484         We have assertions for this since before.
3485
3486         Removing this pointer shrinks RenderText by 8 bytes, allowing it to fit into a snugger size class.
3487         749 KB progression on Membuster3.
3488
3489         * rendering/RenderText.cpp:
3490         (SameSizeAsRenderText):
3491         (WebCore::RenderText::RenderText):
3492         (WebCore::RenderText::setTextInternal):
3493         * rendering/RenderText.h:
3494         (WebCore::RenderText::is8Bit):
3495         (WebCore::RenderText::characters8):
3496         (WebCore::RenderText::characters16):
3497         (WebCore::RenderText::characterAt):
3498         (WebCore::RenderText::operator[]):
3499         (RenderText):
3500
3501 2013-02-10  Jae Hyun Park  <jae.park08@gmail.com>
3502
3503         Rename ENABLE(GLIB_SUPPORT) to USE(GLIB)
3504         https://bugs.webkit.org/show_bug.cgi?id=104266
3505
3506         Reviewed by Philippe Normand.
3507
3508         Using USE(GLIB) instead of ENABLE(GLIB_SUPPORT) is more consistent with
3509         the existing macro naming conventions.
3510
3511         From Platform.h
3512         USE() - use a particular third-party library or optional OS service
3513         ENABLE() - turn on a specific feature of WebKit
3514
3515         No new tests, no new functionality.
3516
3517         * WebCore.pri:
3518
3519 2013-02-10  Zan Dobersek  <zdobersek@igalia.com>
3520
3521         [GTK] Build errors in TextureMapperShaderProgram.cpp when compiling with Clang
3522         https://bugs.webkit.org/show_bug.cgi?id=109321
3523
3524         Reviewed by Noam Rosenthal.
3525
3526         Clang is reporting errors due to non-constant expressions that cannot be narrowed
3527         from double to float type in initializer list when constructing a matrix of GC3Dfloat
3528         numbers. To avoid this every parameter is passed through an explicit GC3Dfloat constructor.
3529
3530         No new tests - no new functionality.
3531
3532         * platform/graphics/texmap/TextureMapperShaderProgram.cpp:
3533         (WebCore::TextureMapperShaderProgram::setMatrix):
3534
3535 2013-02-10  Philippe Normand  <pnormand@igalia.com>
3536
3537         [GStreamer] audio is muted when playback rate is between 0.8 and 2.0
3538         https://bugs.webkit.org/show_bug.cgi?id=109362
3539
3540         Reviewed by Martin Robinson.
3541
3542         Don't mute sound if the audio pitch is preserved. If this is not
3543         the case mute it if it's too extreme, as the HTML5 spec recommends.
3544
3545         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3546         (WebCore::MediaPlayerPrivateGStreamer::setRate):
3547
3548 2013-02-09  Dominic Mazzoni  <dmazzoni@google.com>
3549
3550         fast/encoding/parser-tests-*.html tests sometimes crash
3551         https://bugs.webkit.org/show_bug.cgi?id=108058
3552
3553         Reviewed by Chris Fleizach.
3554
3555         To avoid calling accessibilityIsIgnored while the render
3556         tree is unstable, call accessibilityIsIgnored in the
3557         notification timer handler, only for childrenChanged
3558         notifications.
3559
3560         This exposed a problem where notifications queued on
3561         objects can fire after the object has been deleted; fix that
3562         by checking the object's id, which is always set to 0 when
3563         removed from the tree.
3564
3565         Covered by existing tests.
3566
3567         * accessibility/AXObjectCache.cpp:
3568         (WebCore::AXObjectCache::childrenChanged):
3569         (WebCore::AXObjectCache::notificationPostTimerFired):
3570
3571 2013-02-09  Eric Carlson  <eric.carlson@apple.com>
3572
3573         [Mac] Do not assume MediaAccessibility framework is installed
3574         https://bugs.webkit.org/show_bug.cgi?id=109365
3575
3576         Reviewed by Sam Weinig.
3577
3578         * page/CaptionUserPreferencesMac.h:
3579         * page/CaptionUserPreferencesMac.mm:
3580         (WebCore::CaptionUserPreferencesMac::userPrefersCaptions): Call the base class if the framework
3581             is not available.
3582         (WebCore::CaptionUserPreferencesMac::setUserPrefersCaptions): Ditto.
3583         (WebCore::CaptionUserPreferencesMac::userHasCaptionPreferences): Ditto.
3584         (WebCore::CaptionUserPreferencesMac::registerForCaptionPreferencesChangedCallbacks): Ditto.
3585         (WebCore::CaptionUserPreferencesMac::unregisterForCaptionPreferencesChangedCallbacks): Ditto.
3586         (WebCore::CaptionUserPreferencesMac::captionsStyleSheetOverride): Ditto.
3587         (WebCore::CaptionUserPreferencesMac::captionFontSizeScale): Ditto.
3588         (WebCore::CaptionUserPreferencesMac::setPreferredLanguage): Ditto.
3589         (WebCore::CaptionUserPreferencesMac::preferredLanguages): Ditto.
3590
3591 2013-02-09  Dominic Mazzoni  <dmazzoni@google.com>
3592
3593         AX: move isIgnored caching to AXObject
3594         https://bugs.webkit.org/show_bug.cgi?id=109322
3595
3596         Reviewed by Chris Fleizach.
3597
3598         There's some benefit to caching accessibilityIsIgnored
3599         (using AXComputedObjectAttributeCache) for more than just
3600         AXRenderObject, so move the caching code to AXObject.
3601
3602         AXObject now has a protected virtual method
3603         computeAccessibilityIsIgnored, and all subclasses
3604         override that instead.
3605
3606         No new tests.
3607
3608         * accessibility/AccessibilityImageMapLink.h:
3609         (AccessibilityImageMapLink):
3610         (WebCore::AccessibilityImageMapLink::computeAccessibilityIsIgnored):
3611         * accessibility/AccessibilityList.cpp:
3612         (WebCore::AccessibilityList::computeAccessibilityIsIgnored):
3613         * accessibility/AccessibilityList.h:
3614         (AccessibilityList):
3615         * accessibility/AccessibilityListBox.cpp:
3616         (WebCore::AccessibilityListBox::computeAccessibilityIsIgnored):
3617         * accessibility/AccessibilityListBox.h:
3618         (AccessibilityListBox):
3619         * accessibility/AccessibilityListBoxOption.cpp:
3620         (WebCore::AccessibilityListBoxOption::computeAccessibilityIsIgnored):
3621         * accessibility/AccessibilityListBoxOption.h:
3622         (AccessibilityListBoxOption):
3623         * accessibility/AccessibilityMediaControls.cpp:
3624         (WebCore::AccessibilityMediaControl::computeAccessibilityIsIgnored):
3625         (WebCore::AccessibilityMediaTimeDisplay::computeAccessibilityIsIgnored):
3626         * accessibility/AccessibilityMediaControls.h:
3627         (AccessibilityMediaControl):
3628         (WebCore::AccessibilityMediaControlsContainer::computeAccessibilityIsIgnored):
3629         (AccessibilityMediaTimeDisplay):
3630         * accessibility/AccessibilityMenuList.h:
3631         (WebCore::AccessibilityMenuList::computeAccessibilityIsIgnored):
3632         * accessibility/AccessibilityMenuListOption.cpp:
3633         (WebCore::AccessibilityMenuListOption::computeAccessibilityIsIgnored):
3634         * accessibility/AccessibilityMenuListOption.h:
3635         (AccessibilityMenuListOption):
3636         * accessibility/AccessibilityMenuListPopup.cpp:
3637         (WebCore::AccessibilityMenuListPopup::computeAccessibilityIsIgnored):
3638         * accessibility/AccessibilityMenuListPopup.h:
3639         (AccessibilityMenuListPopup):
3640         * accessibility/AccessibilityNodeObject.cpp:
3641         (WebCore::AccessibilityNodeObject::computeAccessibilityIsIgnored):
3642         * accessibility/AccessibilityNodeObject.h:
3643         (AccessibilityNodeObject):
3644         * accessibility/AccessibilityObject.cpp:
3645         (WebCore::AccessibilityObject::accessibilityIsIgnored):
3646         (WebCore):
3647         * accessibility/AccessibilityObject.h:
3648         (AccessibilityObject):
3649         (WebCore::AccessibilityObject::computeAccessibilityIsIgnored):
3650         * accessibility/AccessibilityProgressIndicator.cpp:
3651         (WebCore::AccessibilityProgressIndicator::computeAccessibilityIsIgnored):
3652         * accessibility/AccessibilityProgressIndicator.h:
3653         (AccessibilityProgressIndicator):
3654         * accessibility/AccessibilityRenderObject.cpp:
3655         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
3656         * accessibility/AccessibilityRenderObject.h:
3657         (AccessibilityRenderObject):
3658         * accessibility/AccessibilityScrollView.cpp:
3659         (WebCore::AccessibilityScrollView::computeAccessibilityIsIgnored):
3660         * accessibility/AccessibilityScrollView.h:
3661         (AccessibilityScrollView):
3662         * accessibility/AccessibilityScrollbar.h:
3663         (WebCore::AccessibilityScrollbar::computeAccessibilityIsIgnored):
3664         * accessibility/AccessibilitySlider.cpp:
3665         (WebCore::AccessibilitySlider::computeAccessibilityIsIgnored):
3666         (WebCore::AccessibilitySliderThumb::computeAccessibilityIsIgnored):
3667         * accessibility/AccessibilitySlider.h:
3668         (AccessibilitySlider):
3669         (AccessibilitySliderThumb):
3670         * accessibility/AccessibilitySpinButton.h:
3671         (WebCore::AccessibilitySpinButton::computeAccessibilityIsIgnored):
3672         (WebCore::AccessibilitySpinButtonPart::computeAccessibilityIsIgnored):
3673         * accessibility/AccessibilityTable.cpp:
3674         (WebCore::AccessibilityTable::computeAccessibilityIsIgnored):
3675         * accessibility/AccessibilityTable.h:
3676         (AccessibilityTable):
3677         * accessibility/AccessibilityTableCell.cpp:
3678         (WebCore::AccessibilityTableCell::computeAccessibilityIsIgnored):
3679         * accessibility/AccessibilityTableCell.h:
3680         (AccessibilityTableCell):
3681         * accessibility/AccessibilityTableColumn.cpp:
3682         (WebCore::AccessibilityTableColumn::computeAccessibilityIsIgnored):
3683         * accessibility/AccessibilityTableColumn.h:
3684         (AccessibilityTableColumn):
3685         * accessibility/AccessibilityTableHeaderContainer.cpp:
3686         (WebCore::AccessibilityTableHeaderContainer::computeAccessibilityIsIgnored):
3687         * accessibility/AccessibilityTableHeaderContainer.h:
3688         (AccessibilityTableHeaderContainer):
3689         * accessibility/AccessibilityTableRow.cpp:
3690         (WebCore::AccessibilityTableRow::computeAccessibilityIsIgnored):
3691         * accessibility/AccessibilityTableRow.h:
3692         (AccessibilityTableRow):
3693
3694 2013-02-09  David Farler  <dfarler@apple.com>
3695
3696         Make TestWebKitAPI work for iOS
3697         https://bugs.webkit.org/show_bug.cgi?id=108978
3698
3699         Reviewed by David Kilzer.
3700
3701         Tests already exist - refactor only.
3702
3703         * WebCore.exp.in: Lumped __ZNK7WebCore4KURL7hasPathEv with related methods.
3704         * platform/KURL.cpp: Inlined hasPath() into the header
3705         * platform/KURL.h: Inlined hasPath() into the header
3706
3707 2013-02-09  Adam Barth  <abarth@webkit.org>
3708
3709         Load event fires too early with threaded HTML parser
3710         https://bugs.webkit.org/show_bug.cgi?id=108984
3711
3712         Reviewed by Eric Seidel.
3713
3714         Previously, the DocumentLoader would always be on the stack when the
3715         HTMLDocumentParser was processing data from the network.  The
3716         DocumentLoader would then tell isLoadingInAPISense not to fire the load
3717         event.  Now that we process data asynchronously with the threaded
3718         parser, the DocumentLoader is not always on the stack, which means we
3719         need to delay the load event using the clause that asks the parser
3720         whether it is processing data.
3721
3722         Unfortunately, that clause is fragile because we can check for load
3723         completion while we're switching parsers between the network-created
3724         parser and a script-created parser. To avoid accidentially triggerin
3725         the load event during these "gaps," this patch introduces a counter on
3726         document to record how many parsers are active on the stack.  While
3727         that numer is non-zero, we'll delay the load event. When that number
3728         reaches zero, we'll check for load complete.
3729
3730         That last step is required because the DocumentLoader::finishLoading
3731         method is no longer guarunteed to check for load complete after calling
3732         finish on the parser because the finish operation might complete
3733         asynchronously.
3734
3735         After this patch, the threaded parser passes all but four fast/parser
3736         tests.
3737
3738         * dom/Document.cpp:
3739         (WebCore::Document::Document):
3740         (WebCore::Document::hasActiveParser):
3741         (WebCore):
3742         (WebCore::Document::decrementActiveParserCount):
3743         * dom/Document.h:
3744         (Document):
3745         (WebCore::Document::incrementActiveParserCount):
3746         * html/parser/HTMLDocumentParser.cpp:
3747         (WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser):
3748         (WebCore::HTMLDocumentParser::pumpTokenizer):
3749         * html/parser/HTMLParserScheduler.cpp:
3750         (WebCore::ActiveParserSession::ActiveParserSession):
3751         (WebCore):
3752         (WebCore::ActiveParserSession::~ActiveParserSession):
3753         (WebCore::PumpSession::PumpSession):
3754         (WebCore::PumpSession::~PumpSession):
3755         * html/parser/HTMLParserScheduler.h:
3756         (WebCore):
3757         (ActiveParserSession):
3758         (PumpSession):
3759         * loader/DocumentLoader.cpp:
3760         (WebCore::DocumentLoader::isLoadingInAPISense):
3761
3762 2013-02-09  Mike West  <mkwst@chromium.org>
3763
3764         Use IGNORE_EXCEPTION for initialized, but unused, ExceptionCodes.
3765         https://bugs.webkit.org/show_bug.cgi?id=109295
3766
3767         Reviewed by Darin Adler.
3768
3769         The monster patch in http://wkbug.com/108771 missed an entire class of
3770         ignored exceptions. It only dealt with call sites that never initialized
3771         the ExceptionCode variable, on the assumption that only such call sites
3772         would ignore the variable's value.
3773
3774         That was a flawed assumption: a large number of sites that initialize the
3775         ExceptionCode to 0 ignore it regardless. This patch deals with the
3776         almost-as-large set of callsites that initialize the variable, pass it to
3777         a function, and then never touch it again.
3778
3779         * Modules/indexeddb/IDBDatabase.cpp:
3780         (WebCore::IDBDatabase::forceClose):
3781         * accessibility/AccessibilityRenderObject.cpp:
3782         (WebCore::AccessibilityRenderObject::ariaSelectedTextRange):
3783         (WebCore::AccessibilityRenderObject::visiblePositionForIndex):
3784         (WebCore::AccessibilityRenderObject::indexForVisiblePosition):
3785         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
3786         (getSelectionOffsetsForObject):
3787         * accessibility/atk/WebKitAccessibleUtil.cpp:
3788         (selectionBelongsToObject):
3789         * dom/Node.cpp:
3790         (WebCore::Node::textRects):
3791         * editing/DeleteButtonController.cpp:
3792         (WebCore::DeleteButtonController::hide):
3793         * editing/EditingStyle.cpp:
3794         (WebCore::EditingStyle::styleAtSelectionStart):
3795         * editing/Editor.cpp:
3796         (WebCore::Editor::canDeleteRange):
3797         (WebCore::Editor::pasteAsPlainText):
3798         (WebCore::Editor::pasteAsFragment):
3799         (WebCore::Editor::shouldDeleteRange):
3800         (WebCore::Editor::dispatchCPPEvent):
3801         (WebCore::Editor::setComposition):
3802         (WebCore::Editor::advanceToNextMisspelling):
3803         (WebCore::isFrameInRange):
3804         * editing/EditorCommand.cpp:
3805         (WebCore::expandSelectionToGranularity):
3806         * editing/MergeIdenticalElementsCommand.cpp:
3807         (WebCore::MergeIdenticalElementsCommand::doApply):
3808         * editing/SplitElementCommand.cpp:
3809         (WebCore::SplitElementCommand::doUnapply):
3810         * editing/SplitTextNodeCommand.cpp:
3811         (WebCore::SplitTextNodeCommand::doApply):
3812         * editing/TextCheckingHelper.cpp:
3813         (WebCore::expandToParagraphBoundary):
3814         (WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar):
3815         (WebCore::TextCheckingHelper::isUngrammatical):
3816         (WebCore::TextCheckingHelper::guessesForMisspelledOrUngrammaticalRange):
3817         * editing/TextInsertionBaseCommand.cpp:
3818         (WebCore::dispatchBeforeTextInsertedEvent):
3819         (WebCore::canAppendNewLineFeedToSelection):
3820         * editing/TextIterator.cpp:
3821         (WebCore::findPlainText):
3822         * editing/htmlediting.cpp:
3823         (WebCore::extendRangeToWrappingNodes):
3824         (WebCore::isNodeVisiblyContainedWithin):
3825         * editing/visible_units.cpp:
3826         (WebCore::nextBoundary):
3827         * html/FileInputType.cpp:
3828         (WebCore::FileInputType::createShadowSubtree):
3829         * html/HTMLKeygenElement.cpp:
3830         (WebCore::HTMLKeygenElement::HTMLKeygenElement):
3831         * html/HTMLScriptElement.cpp:
3832         (WebCore::HTMLScriptElement::setText):
3833         * html/HTMLTitleElement.cpp:
3834         (WebCore::HTMLTitleElement::setText):
3835         * html/HTMLTrackElement.cpp:
3836         (WebCore::HTMLTrackElement::didCompleteLoad):
3837         * html/RangeInputType.cpp:
3838         (WebCore::RangeInputType::createShadowSubtree):
3839         * html/SearchInputType.cpp:
3840         (WebCore::SearchInputType::createShadowSubtree):
3841         * html/TextFieldInputType.cpp:
3842         (WebCore::TextFieldInputType::createShadowSubtree):
3843         * html/track/TextTrackList.cpp:
3844         (TextTrackList::asyncEventTimerFired):
3845         * inspector/DOMPatchSupport.cpp:
3846         (WebCore::DOMPatchSupport::patchDocument):
3847         * inspector/InspectorDatabaseAgent.cpp:
3848         (WebCore):
3849         * inspector/InspectorFileSystemAgent.cpp:
3850         (WebCore):
3851         * page/DOMSelection.cpp:
3852         (WebCore::DOMSelection::addRange):
3853         * page/DragController.cpp:
3854         (WebCore::DragController::dispatchTextInputEventFor):
3855         * page/EventHandler.cpp:
3856         (WebCore::EventHandler::dispatchMouseEvent):
3857         (WebCore::EventHandler::handleTouchEvent):
3858         * page/FrameActionScheduler.cpp:
3859         (WebCore::EventFrameAction::fire):
3860         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3861         (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
3862         * svg/SVGDocument.cpp:
3863         (WebCore::SVGDocument::dispatchZoomEvent):
3864         (WebCore::SVGDocument::dispatchScrollEvent):
3865         * svg/SVGLength.cpp:
3866         (WebCore::SVGLength::SVGLength):
3867         (WebCore::SVGLength::value):
3868         * xml/parser/XMLDocumentParser.cpp:
3869         (WebCore::XMLDocumentParser::exitText):
3870         * xml/parser/XMLDocumentParserQt.cpp:
3871         (WebCore::XMLDocumentParser::parse):
3872         (WebCore::XMLDocumentParser::startDocument):
3873         (WebCore::XMLDocumentParser::parseCharacters):
3874
3875 2013-02-09  Stephen White  <senorblanco@chromium.org>
3876
3877         [skia] Fix memory management in SkiaImageFilterBuilder and friends.
3878         https://bugs.webkit.org/show_bug.cgi?id=109326
3879
3880         Sadly, skia has no official ref-counted pointers, so we must make do
3881         with SkAutoTUnref.
3882
3883         Reviewed by James Robinson.
3884
3885         Correctness covered by existing tests in css3/filters.
3886
3887         * platform/graphics/filters/skia/FEBlendSkia.cpp:
3888         (WebCore::FEBlend::createImageFilter):
3889         * platform/graphics/filters/skia/FEComponentTransferSkia.cpp:
3890         (WebCore::FEComponentTransfer::createImageFilter):
3891         * platform/graphics/filters/skia/FELightingSkia.cpp:
3892         (WebCore::FELighting::createImageFilter):
3893         Adopt refs produced by the build() pass with SkAutoTUnref.
3894         * platform/graphics/filters/skia/SkiaImageFilterBuilder.cpp:
3895         (WebCore::SkiaImageFilterBuilder::~SkiaImageFilterBuilder):
3896         Unref the builder's hashmap effect pointers.
3897         (WebCore::SkiaImageFilterBuilder::build):
3898         Ref the pointer returned to the caller, and use SkAutoTUnref
3899         internally while building the tree.
3900         * platform/graphics/filters/skia/SkiaImageFilterBuilder.h:
3901         (SkiaImageFilterBuilder):
3902         Add a destructor to SkiaImageFilterBuilder.
3903
3904
3905 2013-02-09  Dominic Mazzoni  <dmazzoni@google.com>
3906
3907         AX: Rename AXObject::cachedIsIgnoredValue to lastKnownIsIgnoredValue
3908         https://bugs.webkit.org/show_bug.cgi?id=108238
3909
3910         Reviewed by Chris Fleizach.
3911
3912         Simple refactoring, no new tests.
3913
3914         * accessibility/AXObjectCache.cpp:
3915         (WebCore::AXObjectCache::getOrCreate):
3916         (WebCore::AXObjectCache::childrenChanged):
3917         * accessibility/AccessibilityObject.cpp:
3918         (WebCore::AccessibilityObject::AccessibilityObject):
3919         (WebCore::AccessibilityObject::lastKnownIsIgnoredValue):
3920         (WebCore::AccessibilityObject::setLastKnownIsIgnoredValue):
3921         (WebCore::AccessibilityObject::notifyIfIgnoredValueChanged):
3922         * accessibility/AccessibilityObject.h:
3923         (AccessibilityObject):
3924
3925 2013-02-09  Anton Vayvod  <avayvod@chromium.org>
3926  
3927         [Text Autosizing] Cleanup change: converter the pointer argument to be a reference since
3928         non-null pointer is always expected.
3929         https://bugs.webkit.org/show_bug.cgi?id=109079
3930  
3931         Reviewed by Kenneth Rohde Christiansen.
3932  
3933         Cleanup change, no need to add new tests or modify the existing ones.
3934  
3935         * rendering/TextAutosizer.cpp:
3936  
3937         Changed parameter from a pointer to a reference in the methods below.
3938  
3939         (WebCore::TextAutosizer::processSubtree):
3940         (WebCore::TextAutosizer::processCluster):
3941         (WebCore::TextAutosizer::processContainer):
3942         (WebCore::TextAutosizer::isNarrowDescendant):
3943         (WebCore::TextAutosizer::isWiderDescendant):
3944         (WebCore::TextAutosizer::isAutosizingCluster):
3945         (WebCore::TextAutosizer::clusterShouldBeAutosized):
3946         (WebCore::TextAutosizer::measureDescendantTextWidth):
3947  
3948         * rendering/TextAutosizer.h: updated method prototypes.
3949
3950 2013-02-09  Rafael Brandao  <rafael.lobo@openbossa.org>
3951
3952         [TexMap] Separate classes per file in TextureMapperBackingStore.h
3953         https://bugs.webkit.org/show_bug.cgi?id=109333
3954
3955         Reviewed by Noam Rosenthal.
3956
3957         TextureMapperBackingStore.h had the classes TextureMapperBackingStore,
3958         TextureMapperTiledBackingStore, TextureMapperSurfaceBackingStore and
3959         TextureMapperTile which was quite confusing. Now each one has its
3960         own header and its own source file.
3961
3962         No new tests needed, refactoring only.
3963
3964         * CMakeLists.txt:
3965         * GNUmakefile.list.am:
3966         * Target.pri:
3967         * WebCore.gypi:
3968         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
3969         * platform/graphics/texmap/TextureMapperBackingStore.cpp:
3970         * platform/graphics/texmap/TextureMapperBackingStore.h:
3971         * platform/graphics/texmap/TextureMapperSurfaceBackingStore.cpp: Added.
3972         (WebCore):
3973         (WebCore::TextureMapperSurfaceBackingStore::setGraphicsSurface):
3974         (WebCore::TextureMapperSurfaceBackingStore::swapBuffersIfNeeded):
3975         (WebCore::TextureMapperSurfaceBackingStore::texture):
3976         (WebCore::TextureMapperSurfaceBackingStore::paintToTextureMapper):
3977         * platform/graphics/texmap/TextureMapperSurfaceBackingStore.h: Added.
3978         (WebCore):
3979         (TextureMapperSurfaceBackingStore):
3980         (WebCore::TextureMapperSurfaceBackingStore::create):
3981         (WebCore::TextureMapperSurfaceBackingStore::~TextureMapperSurfaceBackingStore):
3982         (WebCore::TextureMapperSurfaceBackingStore::TextureMapperSurfaceBackingStore):
3983         * platform/graphics/texmap/TextureMapperTile.cpp: Added.
3984         (WebCore):
3985         (WebCore::TextureMapperTile::updateContents):
3986         (WebCore::TextureMapperTile::paint):
3987         * platform/graphics/texmap/TextureMapperTile.h: Added.
3988         (WebCore):
3989         (TextureMapperTile):
3990         (WebCore::TextureMapperTile::texture):
3991         (WebCore::TextureMapperTile::rect):
3992         (WebCore::TextureMapperTile::setTexture):
3993         (WebCore::TextureMapperTile::setRect):
3994         (WebCore::TextureMapperTile::~TextureMapperTile):
3995         (WebCore::TextureMapperTile::TextureMapperTile):
3996         * platform/graphics/texmap/TextureMapperTiledBackingStore.cpp: Copied from Source/WebCore/platform/graphics/texmap/TextureMapperBackingStore.cpp.
3997         (WebCore):
3998         (WebCore::TextureMapperTiledBackingStore::TextureMapperTiledBackingStore):
3999         (WebCore::TextureMapperTiledBackingStore::updateContentsFromImageIfNeeded):
4000         (WebCore::TextureMapperTiledBackingStore::adjustedTransformForRect):
4001         (WebCore::TextureMapperTiledBackingStore::paintToTextureMapper):
4002         (WebCore::TextureMapperTiledBackingStore::drawBorder):
4003         (WebCore::TextureMapperTiledBackingStore::drawRepaintCounter):
4004         (WebCore::TextureMapperTiledBackingStore::createOrDestroyTilesIfNeeded):
4005         (WebCore::TextureMapperTiledBackingStore::updateContents):
4006         (WebCore::TextureMapperTiledBackingStore::texture):
4007         * platform/graphics/texmap/TextureMapperTiledBackingStore.h: Added.
4008         (WebCore):
4009         (TextureMapperTiledBackingStore):
4010         (WebCore::TextureMapperTiledBackingStore::create):
4011         (WebCore::TextureMapperTiledBackingStore::~TextureMapperTiledBackingStore):
4012         (WebCore::TextureMapperTiledBackingStore::setContentsToImage):
4013         (WebCore::TextureMapperTiledBackingStore::rect):
4014         * platform/graphics/texmap/coordinated/CoordinatedBackingStore.h:
4015         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
4016
4017 2013-02-09  Philip Rogers  <pdr@google.com>
4018
4019         Sanitize m_keyTimes for paced value animations
4020         https://bugs.webkit.org/show_bug.cgi?id=108828
4021
4022         Reviewed by Dirk Schulze.
4023
4024         SVG animations with calcMode=paced calculate new m_keyTimes in
4025         SVGAnimationElement::calculateKeyTimesForCalcModePaced() because paced animations do not
4026         specify keyTimes. If an error occurs while calculating m_keyTimes, and there exists
4027         user-specified values, a crash could occur because the user-specified values were not
4028         sanitized.
4029
4030         This change clears user-specified keyTimes before calculating new ones.
4031
4032         Test: svg/animations/animate-keytimes-crash.html
4033
4034         * svg/SVGAnimationElement.cpp:
4035  &nbs