Remove unnecessary (and problematic) copy-constructor from LayoutUnit
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-02-19  Morten Stenshorne  <mstensho@opera.com>
2
3         Remove unnecessary (and problematic) copy-constructor from LayoutUnit
4         https://bugs.webkit.org/show_bug.cgi?id=110121
5
6         This copy constructor does what a default copy constructor would do, so
7         it's not necessary. Furthermore, this copy constructor is the only
8         reason why LayoutUnit becomes non-POD, and that triggers a gdb bug,
9         making it impossible to do things like "print location()" when inside
10         some RenderBlock, for instance.
11
12         Gdb bug http://sourceware.org/bugzilla/show_bug.cgi?id=15154 reported.
13
14         Reviewed by Benjamin Poulain.
15
16         No tests. Apart from dealing with buggy debuggers, this is just code cleanup.
17
18         * platform/LayoutUnit.h:
19
20 2013-02-19  Emil A Eklund  <eae@chromium.org>
21
22         LayoutUnit::epsilon shouldn't be necessary to place floats
23         https://bugs.webkit.org/show_bug.cgi?id=94000
24
25         Reviewed by Levi Weintraub.
26         
27         Currently, to get float placement correct, we need to have an
28         epsilon tolerance in RenderBlock::computeLogicalLocationForFloat
29         for the width of the line to fit them on. This really shouldn't
30         be necessary, and probably indicates we're losing precision
31         elsewhere.
32         
33         Remove epsilon as it no longer appears to be needed. All layout
34         tests pass without it.
35
36         No new tests, covered by existing tests.
37
38         * rendering/RenderBlock.cpp:
39         (WebCore::RenderBlock::computeLogicalLocationForFloat):
40
41 2013-02-19  Tim Volodine  <timvolodine@chromium.org>
42
43         Text Autosizing: prevent oscillation of font sizes during autosizing
44         https://bugs.webkit.org/show_bug.cgi?id=108205
45
46         Reviewed by Kenneth Rohde Christiansen.
47
48         On some websites autosized font-sizes oscillate due to layouts caused by
49         hovering or incremental page loading (and on other sites font sizes do
50         eventually stabilize, but it takes many layouts before they reach a steady
51         size). To prevent all these cases, we no longer allow the autosizing
52         multiplier to change after it has been set (to a value other than 1).
53
54         This won't always give exactly the same results, but testing on 2000 top
55         sites shows that this makes little difference in practice, and it prevents
56         these very jarring cases. As a happy side-effect, this speeds up layouts
57         as font sizes change less.
58
59         Test: fast/text-autosizing/oscillation-javascript-fontsize-change.html
60
61         * page/FrameView.cpp:
62         (WebCore::FrameView::setFrameRect):
63         * page/Settings.cpp:
64         (WebCore::Settings::setTextAutosizingFontScaleFactor):
65         * rendering/TextAutosizer.cpp:
66         (WebCore::TextAutosizer::recalculateMultipliers):
67         (WebCore):
68         (WebCore::TextAutosizer::processContainer):
69         * rendering/TextAutosizer.h:
70         (TextAutosizer):
71
72 2013-02-19  Youenn Fablet  <youennf@gmail.com>
73
74         [EFL][DRT] http/tests/loading/307-after-303-after-post.html times out
75         https://bugs.webkit.org/show_bug.cgi?id=93214
76
77         Ensured that GET verb is consistently used for any request
78         coming after a redirection that triggers switching to GET.
79
80         Reviewed by Martin Robinson.
81
82         * platform/network/soup/ResourceHandleSoup.cpp:
83         (WebCore::doRedirect):
84
85 2013-02-19  Andras Becsi  <andras.becsi@digia.com>
86
87         [Qt] Fix compilation if Qt was configured with -no-rtti
88         https://bugs.webkit.org/show_bug.cgi?id=110234
89
90         Reviewed by Noam Rosenthal.
91
92         Availability of dynamic_cast should be checked.
93
94         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
95         (WebCore::GraphicsLayerTextureMapper::updateBackingStoreIfNeeded):
96
97 2013-02-18  Alexey Proskuryakov  <ap@apple.com>
98
99         Unregistered blob URLs have incorrect MIME type
100         https://bugs.webkit.org/show_bug.cgi?id=110166
101
102         Reviewed by Sam Weinig.
103
104         * page/SecurityOrigin.cpp: (WebCore::SecurityOrigin::shouldUseInnerURL): Added a FIXME.
105
106         * platform/network/BlobResourceHandle.cpp: (WebCore::BlobResourceHandle::notifyResponseOnError):
107         Pass an accurate MIME type (for a delegate to see).
108
109 2013-02-19  Joshua Bell  <jsbell@chromium.org>
110
111         IndexedDB: additional checks on LevelDB decoding
112         https://bugs.webkit.org/show_bug.cgi?id=109711
113
114         Reviewed by Tony Chang.
115
116         Watch out for decoding errors caused by corrupted data, and exit various
117         decode/compare operations earlier.
118
119         Covered by existing LayoutTests and Chromium's webkit_unit_tests
120
121         * Modules/indexeddb/IDBLevelDBCoding.cpp:
122         (WebCore::IDBLevelDBCoding::decodeStringWithLength): Bail if length is negative.
123         (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): Distinguish error case.
124         (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): Bail if length is negative.
125         (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): Distinguish error case.
126         (WebCore::IDBLevelDBCoding::compare): Plumb through "ok".
127         (WebCore::IDBLevelDBCoding::ObjectStoreDataKey::compare): Ditto.
128         (WebCore::IDBLevelDBCoding::ExistsEntryKey::compare): Ditto.
129         (WebCore::IDBLevelDBCoding::IndexDataKey::compare): Ditto.
130         * Modules/indexeddb/IDBLevelDBCoding.h: Updated method signatures.
131
132 2013-02-19  ChangSeok Oh  <changseok.oh@collabora.com>
133
134         [GTK][AC] Implement keyframe animations with clutter ac backend
135         https://bugs.webkit.org/show_bug.cgi?id=110057
136
137         Reviewed by Gustavo Noronha Silva.
138
139         This patch brings accelerated keyframe animation with clutter to WebKitGtk+.
140         Changes of GraphicsLayerClutter are based on GraphicsLayerCA. But major changes
141         of PlatformClutterAnimation are implemented with clutter keyframe transition apis.
142         See http://developer.gnome.org/clutter/stable/ClutterKeyframeTransition.html
143
144         Covered by existing animation tests.
145
146         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
147         (WebCore::GraphicsLayerClutter::createKeyframeAnimation):
148         (WebCore::GraphicsLayerClutter::setTransformAnimationKeyframes):
149         (WebCore::GraphicsLayerClutter::setAnimationKeyframes):
150         * platform/graphics/clutter/PlatformClutterAnimation.cpp:
151         (WebCore::toClutterActorPropertyString):
152         (WebCore::PlatformClutterAnimation::PlatformClutterAnimation):
153         (WebCore::PlatformClutterAnimation::setTimingFunction):
154         (WebCore::PlatformClutterAnimation::setValues):
155         (WebCore::PlatformClutterAnimation::setKeyTimes):
156         (WebCore::PlatformClutterAnimation::setTimingFunctions):
157         (WebCore::PlatformClutterAnimation::addClutterTransitionForProperty):
158         (WebCore):
159         (WebCore::PlatformClutterAnimation::addClutterKeyframeTransitionForProperty):
160         (WebCore::PlatformClutterAnimation::addOpacityTransition):
161         (WebCore::PlatformClutterAnimation::addTransformTransition):
162         (WebCore::PlatformClutterAnimation::addAnimationForKey):
163         (WebCore::PlatformClutterAnimation::removeAnimationForKey):
164         * platform/graphics/clutter/PlatformClutterAnimation.h:
165         (PlatformClutterAnimation):
166
167 2013-02-19  Claudio Saavedra  <csaavedra@igalia.com>
168
169         [harfbuzz] Crash in harfbuzz related code
170         https://bugs.webkit.org/show_bug.cgi?id=110145
171
172         Reviewed by Martin Robinson.
173
174         Patch by Behdad Esfahbod <behdad@google.com>
175
176         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
177         (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): Ask harfbuzz
178         to guess the segment properties.
179
180 2013-02-19  Pavel Podivilov  <podivilov@chromium.org>
181
182         Web Inspector: release backtrace object group on each step.
183         https://bugs.webkit.org/show_bug.cgi?id=110223
184
185         Reviewed by Pavel Feldman.
186
187         * inspector/InspectorDebuggerAgent.cpp:
188         (WebCore):
189         (WebCore::InspectorDebuggerAgent::stepOver):
190         (WebCore::InspectorDebuggerAgent::stepInto):
191         (WebCore::InspectorDebuggerAgent::stepOut):
192
193 2013-02-19  Sheriff Bot  <webkit.review.bot@gmail.com>
194
195         Unreviewed, rolling out r142975.
196         http://trac.webkit.org/changeset/142975
197         https://bugs.webkit.org/show_bug.cgi?id=110225
198
199         Introduces hard-to-reproduce crashes upon inspected page
200         navigation on Mac (Requested by apavlov on #webkit).
201
202         * dom/DocumentStyleSheetCollection.cpp:
203         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
204         * inspector/Inspector.json:
205         * inspector/InspectorCSSAgent.cpp:
206         (WebCore::InspectorCSSAgent::InspectorCSSAgent):
207         (WebCore::InspectorCSSAgent::clearFrontend):
208         (WebCore::InspectorCSSAgent::enable):
209         (WebCore::InspectorCSSAgent::getAllStyleSheets):
210         (WebCore::InspectorCSSAgent::collectStyleSheets):
211         (WebCore::InspectorCSSAgent::bindStyleSheet):
212         (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
213         (WebCore::InspectorCSSAgent::detectOrigin):
214         (WebCore::InspectorCSSAgent::buildObjectForRule):
215         * inspector/InspectorCSSAgent.h:
216         (InspectorCSSAgent):
217         * inspector/InspectorInstrumentation.cpp:
218         (WebCore):
219         * inspector/InspectorInstrumentation.h:
220         (WebCore):
221         (InspectorInstrumentation):
222         * inspector/front-end/CSSStyleModel.js:
223         (WebInspector.CSSStyleModel.prototype.getViaInspectorResourceForRule):
224         (WebInspector.CSSStyleModelResourceBinding.prototype.):
225         (WebInspector.CSSStyleModelResourceBinding.prototype.requestStyleSheetIdForResource):
226         (WebInspector.CSSStyleModelResourceBinding.prototype.requestResourceURLForStyleSheetId):
227         (WebInspector.CSSStyleModelResourceBinding.prototype._styleSheetIdForResource):
228         (WebInspector.CSSStyleModelResourceBinding.prototype._loadStyleSheetHeaders):
229         (WebInspector.CSSStyleModelResourceBinding.prototype.headersLoaded):
230         (WebInspector.CSSStyleModelResourceBinding.prototype._requestViaInspectorResource):
231         (WebInspector.CSSStyleModelResourceBinding.prototype._getOrCreateInspectorResource):
232         (WebInspector.CSSStyleModelResourceBinding.prototype._reset):
233         * inspector/front-end/SASSSourceMapping.js:
234         (WebInspector.SASSSourceMapping.prototype._styleSheetChanged.callback):
235         (WebInspector.SASSSourceMapping.prototype._styleSheetChanged):
236         * inspector/front-end/StylesSidebarPane.js:
237         (WebInspector.StylePropertiesSection.prototype._createRuleOriginNode.callback):
238         (WebInspector.StylePropertiesSection.prototype._createRuleOriginNode):
239         * inspector/front-end/StylesSourceMapping.js:
240         (WebInspector.StyleContentBinding.prototype.callback):
241         (WebInspector.StyleContentBinding.prototype.setStyleContent):
242         (WebInspector.StyleContentBinding.prototype.):
243         (WebInspector.StyleContentBinding.prototype._innerStyleSheetChanged):
244
245 2013-02-19  Julien Chaffraix  <jchaffraix@webkit.org>
246
247         RenderGrid::computedUsedBreadthOfGridTracks can read past m_grid's size
248         https://bugs.webkit.org/show_bug.cgi?id=110126
249
250         Reviewed by Ojan Vafai.
251
252         The issue comes from how we store the column information inside m_grid.
253         Because m_grid is a Vector of rows, we could lose the column information
254         if we had no row, no grid item but some columns defined in CSS. As the
255         logic would assume that our row / column size would be greater than what
256         the style defines explicitely, we would access past our Vector's boundary.
257
258         The fix is to ensure that we have at least a row so that we can store the
259         column information in every case. This fix is overly broad as it also forces
260         the grid to have one column, which shouldn't be an issue.
261
262         Test: fast/css-grid-layout/grid-element-empty-row-column.html
263
264         * rendering/RenderGrid.cpp:
265         (WebCore::RenderGrid::maximumIndexInDirection):
266         Forced this function to return at least one as the maximum index so that
267         m_grid has at least one row / column.
268
269         (WebCore::RenderGrid::placeItemsOnGrid):
270         Added a ASSERT that m_grid is bigger than the explicit grid-rows / grid-columns.
271         Also changed an existing ASSERT to use gridWasPopulated for consistency and changed
272         the code not to call gridRowCount as it would ASSERT (we are in the middle of populating
273         the grid).
274
275         * rendering/RenderGrid.h:
276         (WebCore::RenderGrid::gridWasPopulated):
277         Added this helper function.
278
279         (WebCore::RenderGrid::gridColumnCount):
280         Replaced a now unneeded branch with an ASSERT. As placeItemsOnGrid should be called
281         prior to read m_grid, this change should be fine.
282
283         (WebCore::RenderGrid::gridRowCount):
284         Added an ASSERT.
285
286 2013-02-19  Sergio Villar Senin  <svillar@igalia.com>
287
288         [Soup] Use synchronous calls to close completely processed streams
289         https://bugs.webkit.org/show_bug.cgi?id=107432
290
291         Reviewed by Martin Robinson.
292
293         There is no need to close already processed streams in asynchronous
294         calls since they won't block. Using the synchronous call will save
295         us some code and unnecessary asynchronous burden. This is kind of
296         a code refactor so no new tests needed.
297
298         * platform/network/soup/ResourceHandleSoup.cpp:
299         (WebCore):
300         (WebCore::redirectSkipCallback):
301         (WebCore::readCallback):
302
303 2013-02-19  Andrey Adaikin  <aandrey@chromium.org>
304
305         Web Inspector: [Canvas] use timeline's didBeginFrame for marking frame end calls
306         https://bugs.webkit.org/show_bug.cgi?id=110130
307
308         Reviewed by Pavel Feldman.
309
310         In Web Inspector canvas profiler use timeline's didBeginFrame for marking frame end calls instead of an ad-hoc timeout-based solution.
311
312         * inspector/InjectedScriptCanvasModule.cpp:
313         (WebCore::InjectedScriptCanvasModule::markFrameEnd):
314         (WebCore):
315         * inspector/InjectedScriptCanvasModule.h:
316         (InjectedScriptCanvasModule):
317         * inspector/InjectedScriptCanvasModuleSource.js:
318         (.):
319         * inspector/InspectorCanvasAgent.cpp:
320         (WebCore::InspectorCanvasAgent::hasUninstrumentedCanvases):
321         (WebCore::InspectorCanvasAgent::notifyRenderingContextWasWrapped):
322         (WebCore::InspectorCanvasAgent::findFramesWithUninstrumentedCanvases):
323         (WebCore::InspectorCanvasAgent::frameNavigated):
324         (WebCore::InspectorCanvasAgent::didBeginFrame):
325         (WebCore):
326         * inspector/InspectorCanvasAgent.h:
327         (InspectorCanvasAgent):
328         * inspector/InspectorController.cpp:
329         (WebCore::InspectorController::didBeginFrame):
330
331 2013-02-19  Vsevolod Vlasov  <vsevik@chromium.org>
332
333         Web Inspector: Decouple various file system project implementation parts for better testability and cover with tests.
334         https://bugs.webkit.org/show_bug.cgi?id=110204
335
336         Reviewed by Pavel Feldman.
337
338         Extracted FileSystemWorkspaceProvider from IsolatedFileSystemManager to take care of managing workspace projects and projectDelegates.
339         Replaced FileMapping.urlForURI with urlForPath method that does not need any information about workspace structure anymore.
340
341         Test: inspector/file-system-project.html
342
343         * inspector/front-end/FileMapping.js:
344         (WebInspector.FileMapping.prototype.urlForPath):
345         * inspector/front-end/FileSystemProjectDelegate.js:
346         (WebInspector.FileSystemProjectDelegate):
347         (WebInspector.FileSystemProjectDelegate.prototype.populate.filesLoaded):
348         (WebInspector.FileSystemProjectDelegate.prototype.populate):
349         (WebInspector.FileSystemWorkspaceProvider):
350         (WebInspector.FileSystemWorkspaceProvider.prototype._fileSystemAdded):
351         (WebInspector.FileSystemWorkspaceProvider.prototype._fileSystemRemoved):
352         * inspector/front-end/IsolatedFileSystem.js:
353         (WebInspector.IsolatedFileSystem):
354         (WebInspector.IsolatedFileSystem.prototype.name):
355         (WebInspector.IsolatedFileSystem.prototype.rootURL):
356         * inspector/front-end/IsolatedFileSystemManager.js:
357         (WebInspector.IsolatedFileSystemManager):
358         (WebInspector.IsolatedFileSystemManager.prototype._innerAddFileSystem):
359         (WebInspector.IsolatedFileSystemManager.prototype._fileSystemRemoved):
360         (WebInspector.IsolatedFileSystemManager.prototype._isolatedFileSystem):
361         (WebInspector.IsolatedFileSystemManager.prototype.requestDOMFileSystem):
362         * inspector/front-end/inspector.js:
363
364 2013-02-19  Andrey Adaikin  <aandrey@chromium.org>
365
366         Web Inspector: [Canvas] do not replace replay image with spinner icon
367         https://bugs.webkit.org/show_bug.cgi?id=110213
368
369         Reviewed by Pavel Feldman.
370
371         Otherwise it's visually hard to see changes in the replay image. Instead show a small spinner icon in the bottom right corner.
372
373         * inspector/front-end/CanvasProfileView.js:
374         (WebInspector.CanvasProfileView):
375         (WebInspector.CanvasProfileView.prototype._enableWaitIcon):
376         * inspector/front-end/canvasProfiler.css:
377         (#canvas-replay-image-container):
378         (.canvas-debug-info):
379         (.canvas-spinner-icon):
380
381 2013-02-19  Andrey Adaikin  <aandrey@chromium.org>
382
383         Web Inspector: [Canvas] UI: tweak replay control buttons behavior
384         https://bugs.webkit.org/show_bug.cgi?id=110207
385
386         Reviewed by Pavel Feldman.
387
388         New behavior for control buttons in the Canvas profiler.
389         - The NextCall button (~StepInto) on a node group should expand it and move into its first child (instead of expanding and moving into the next node group)
390         - The NextDrawCall button (~StepOver) should move to a next node that has children (instead of just iterating call group nodes, ignoring frame nodes).
391         - The ReplayLast button should select the last expanded node (instead of always selecting last frame group node).
392
393         * inspector/front-end/CanvasProfileView.js:
394         (WebInspector.CanvasProfileView.prototype._onReplayStepClick):
395         (WebInspector.CanvasProfileView.prototype._onReplayDrawingCallClick):
396         (WebInspector.CanvasProfileView.prototype._onReplayLastStepClick):
397
398 2013-02-19  Andrei Bucur  <abucur@adobe.com>
399
400         [CSS Regions] Assertion in RenderFlowThread::removeRenderBoxRegionInfo
401         https://bugs.webkit.org/show_bug.cgi?id=109914
402
403         Reviewed by David Hyatt.
404
405         This patch moves a part of the invalidation operations inside the RenderFlowThread::invalidateRegions call. The maps
406         are cleared anyway at layout time but doing this earlier makes sure the flow thread is in a more consistent state
407         (the RenderFlowThread object has both the region chain invalidated and the regions information cleared).
408
409         RenderFlowThread::removeRenderBoxRegionInfo will check if the region chain is invalidated. If true, it means the
410         flow thread has a layout scheduled and the regions information is not yet reliable. In this case we just return from the
411         function and wait for the layout to cleanup the box information.
412
413         Test: fast/regions/remove-box-info-assert.html
414
415         * rendering/RenderFlowThread.cpp:
416         (WebCore::RenderFlowThread::removeRegionFromThread):
417         (WebCore::RenderFlowThread::invalidateRegions):
418         (WebCore):
419         (WebCore::RenderFlowThread::layout):
420         (WebCore::RenderFlowThread::removeRenderBoxRegionInfo):
421         * rendering/RenderFlowThread.h:
422         * rendering/RenderNamedFlowThread.cpp:
423         (WebCore::RenderNamedFlowThread::removeRegionFromThread):
424
425 2013-02-19  Alberto Garcia  <agarcia@igalia.com>
426
427         Fix build broekn by r142988.
428         https://bugs.webkit.org/show_bug.cgi?id=109530
429
430         Unreviewed. Build fix.
431
432         Properly add shortMonthFormat() to the LocaleNone class.
433
434         * platform/text/LocaleNone.cpp:
435         (LocaleNone):
436         (WebCore::LocaleNone::shortMonthFormat):
437
438 2013-02-19  Anton Vayvod  <avayvod@chromium.org>
439
440         [Text Autosizing] Combine narrow descendants of a cluster into groups that should be autosized with the same multiplier.
441         https://bugs.webkit.org/show_bug.cgi?id=109825
442
443         Enhancement of the approach introduced in https://bugs.webkit.org/show_bug.cgi?id=109573.
444         Instead of using the same text size multiplier for all narrow descendants of any autosizing
445         cluster, group the descendants by how much narrower they are than the cluster's
446         |blockContainingAllText| and process each group separately with a different multiplier for
447         each one.
448         For example, we want nested comments on the page to be autosized as a group but separately
449         from a sidebar on the same page.
450
451         Reviewed by Kenneth Rohde Christiansen.
452
453         Updated the existing test to verify the patch.
454
455         * rendering/TextAutosizer.cpp:
456         (WebCore::TextAutosizer::processClusterInternal):
457
458             Splits the narrow descendants of the autosizing cluster into groups before processing
459             each group individually.
460
461         (WebCore::TextAutosizer::getNarrowDescendantsGroupedByWidth):
462
463             Sorts the narrow descendants of the given cluster into groups, combining them by the
464             difference between their content widths. If sorted by width, two consecutive nodes
465             belong to the same group if their width difference is no greater than 100 CSS units.
466
467         * rendering/TextAutosizer.h:
468
469             New method definitions.
470
471 2013-02-18  Ilya Tikhonovsky  <loislo@chromium.org>
472
473         Web Inspector: Native Memory Instrumentation: show user provided name property of the heap snapshot node.
474         https://bugs.webkit.org/show_bug.cgi?id=110124
475
476         Reviewed by Yury Semikhatsky.
477
478         Publish userProvidedName into grid node.
479
480         * inspector/front-end/HeapSnapshotGridNodes.js:
481         (WebInspector.HeapSnapshotGenericObjectNode):
482         (WebInspector.HeapSnapshotGenericObjectNode.prototype._createObjectCell):
483         (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data):
484         * inspector/front-end/HeapSnapshotProxy.js:
485         (WebInspector.HeapSnapshotWorker):
486         * inspector/front-end/NativeHeapSnapshot.js:
487         (WebInspector.NativeHeapSnapshotNode.prototype.serialize):
488
489 2013-02-19  Arpita Bahuguna  <a.bah@samsung.com>
490
491         Caret is not displayed when trying to focus inside a contenteditable element containing an empty block.
492         https://bugs.webkit.org/show_bug.cgi?id=108053
493
494         Reviewed by Ryosuke Niwa.
495
496         Test: editing/selection/caret-in-div-containing-empty-block.html
497
498         * rendering/RenderBox.cpp:
499         (WebCore::RenderBox::localCaretRect):
500         When trying to compute the caret rect for the contenteditable div, the
501         border and the padding were not considered. Because of this, for the
502         given test case, which had a border defined on the containing div, the
503         caret was being painted just atop the border, thereby masking it.
504
505         Have modified the code to ensure that the computed caret rect takes
506         into account the border and padding (if any) specified on the box, but only
507         if the node doesn't have content that shall be skipped for editing.
508
509         We do not add border and padding while computing the caret rect for any
510         element that either has no content or has content that shall be skipped
511         for editing purposes. This holds true for table elements as well.
512
513         This helps avoid the caret displacement previsouly observed before/after
514         any controls placed within the contenteditable box, when considering
515         border and padding in computation of the caret rect.
516
517 2013-02-19  Mihnea Ovidenie  <mihnea@adobe.com>
518
519         CSSRegions: crash positioned object with inline containing block in flow thread
520         https://bugs.webkit.org/show_bug.cgi?id=108307
521
522         Reviewed by David Hyatt.
523
524         The fix for https://bugs.webkit.org/show_bug.cgi?id=69896 allowed positioned blocks work
525         with variable width regions. However, the information needed for that is available only
526         when the container used for positioning is a block.
527
528         This patch ensures we are using this solution only when the container used for positioning
529         is a block. This needs to be revisited when we will extend support for other types of boxes
530         as mentioned in RenderBox::renderBoxRegionInfo.
531
532         Test: fast/regions/positioned-object-inline-cb-crash.html
533
534         * rendering/RenderBox.cpp:
535         (WebCore::RenderBox::renderBoxRegionInfo):
536         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
537         (WebCore::RenderBox::computePositionedLogicalWidth): Make sure we are using containerBlocks
538         that are blocks. Add an assert that the type of containerBlock we are using can have
539         computed RenderBoxRegionInfo.
540         (WebCore::RenderBox::computePositionedLogicalHeight):
541         * rendering/RenderBoxModelObject.h:
542         (WebCore::RenderBoxModelObject::canHaveBoxInfoInRegion): This helper method
543         will return the boxes that may have computed RenderBoxRegionInfo. Currently,
544         returns true for blocks only.
545
546 2013-02-19  Ryosuke Niwa  <rniwa@webkit.org>
547
548         Yet anther JSC build fix after r143304.
549
550         * bindings/js/JSDOMBinding.h:
551         (WebCore::argumentOrNull):
552
553 2013-02-19  Kentaro Hara  <haraken@chromium.org>
554
555         Unreviewed build fix. Fixed warning caused by r143305.
556
557         * bindings/scripts/CodeGeneratorJS.pm:
558         (GenerateParametersCheck):
559         * bindings/scripts/CodeGeneratorV8.pm:
560         (GenerateParametersCheck):
561
562 2013-02-19  Kentaro Hara  <haraken@chromium.org>
563
564         Unreviewed build fix after r143304.
565
566         * bindings/js/JSDOMBinding.h:
567         (WebCore::argumentOrNull):
568
569 2013-02-19  Kentaro Hara  <haraken@chromium.org>
570
571         [V8] Remove redundant usage of MAYBE_MISSING_PARAMETER() macro
572         https://bugs.webkit.org/show_bug.cgi?id=109899
573
574         Reviewed by Adam Barth.
575
576         Currently:
577
578         - MAYBE_MISSING_PARAMETER(args, index, DefaultIsUndefined) returns args[index].
579         - MAYBE_MISSING_PARAMETER(args, index, DefaultIsNullString) returns Local<Value>()
580         if args[index] is missing (i.e. the length of |args| is less than |index|).
581         It returns args[index] otherwise.
582
583         No one other than CodeGeneratorV8.pm uses
584         MAYBE_MISSING_PARAMETER(args, index, DefaultIsUndefined). Instead, we simply use
585         args[index]. We should remove the redundant usage from CodeGeneratorV8.pm too.
586         The long-name macro has been making generated code less readable.
587
588         In addition, we can rename MAYBE_MISSING_PARAMETER() to argumentOrNull().
589
590         No tests. No change in behavior.
591
592         * bindings/scripts/CodeGeneratorV8.pm:
593         (GenerateParametersCheck):
594         * bindings/scripts/test/V8/V8Float64Array.cpp:
595         (WebCore::Float64ArrayV8Internal::fooCallback):
596         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
597         (WebCore::TestActiveDOMObjectV8Internal::excitingFunctionCallback):
598         (WebCore::TestActiveDOMObjectV8Internal::postMessageCallback):
599         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
600         (WebCore::TestCustomNamedGetterV8Internal::anotherFunctionCallback):
601         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
602         (WebCore::TestEventTargetV8Internal::itemCallback):
603         (WebCore::TestEventTargetV8Internal::dispatchEventCallback):
604         * bindings/scripts/test/V8/V8TestInterface.cpp:
605         (WebCore::TestInterfaceV8Internal::supplementalMethod2Callback):
606         (WebCore::V8TestInterface::constructorCallback):
607         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
608         (WebCore::TestMediaQueryListListenerV8Internal::methodCallback):
609         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
610         (WebCore::V8TestNamedConstructorConstructorCallback):
611         * bindings/scripts/test/V8/V8TestObj.cpp:
612         (WebCore::TestObjV8Internal::voidMethodWithArgsCallback):
613         (WebCore::TestObjV8Internal::longMethodWithArgsCallback):
614         (WebCore::TestObjV8Internal::objMethodWithArgsCallback):
615         (WebCore::TestObjV8Internal::methodWithSequenceArgCallback):
616         (WebCore::TestObjV8Internal::methodReturningSequenceCallback):
617         (WebCore::TestObjV8Internal::methodThatRequiresAllArgsAndThrowsCallback):
618         (WebCore::TestObjV8Internal::optionsObjectCallback):
619         (WebCore::TestObjV8Internal::methodWithOptionalArgCallback):
620         (WebCore::TestObjV8Internal::methodWithNonOptionalArgAndOptionalArgCallback):
621         (WebCore::TestObjV8Internal::methodWithNonOptionalArgAndTwoOptionalArgsCallback):
622         (WebCore::TestObjV8Internal::methodWithOptionalStringCallback):
623         (WebCore::TestObjV8Internal::methodWithOptionalStringIsUndefinedCallback):
624         (WebCore::TestObjV8Internal::methodWithOptionalStringIsNullStringCallback):
625         (WebCore::TestObjV8Internal::methodWithNonCallbackArgAndCallbackArgCallback):
626         (WebCore::TestObjV8Internal::overloadedMethod1Callback):
627         (WebCore::TestObjV8Internal::overloadedMethod2Callback):
628         (WebCore::TestObjV8Internal::overloadedMethod3Callback):
629         (WebCore::TestObjV8Internal::overloadedMethod4Callback):
630         (WebCore::TestObjV8Internal::overloadedMethod6Callback):
631         (WebCore::TestObjV8Internal::overloadedMethod7Callback):
632         (WebCore::TestObjV8Internal::overloadedMethod8Callback):
633         (WebCore::TestObjV8Internal::overloadedMethod9Callback):
634         (WebCore::TestObjV8Internal::overloadedMethod10Callback):
635         (WebCore::TestObjV8Internal::overloadedMethod11Callback):
636         (WebCore::TestObjV8Internal::classMethodWithOptionalCallback):
637         (WebCore::TestObjV8Internal::overloadedMethod12Callback):
638         (WebCore::TestObjV8Internal::enabledAtRuntimeMethod1Callback):
639         (WebCore::TestObjV8Internal::enabledAtRuntimeMethod2Callback):
640         (WebCore::TestObjV8Internal::enabledPerContextMethod1Callback):
641         (WebCore::TestObjV8Internal::enabledPerContextMethod2Callback):
642         (WebCore::TestObjV8Internal::stringArrayFunctionCallback):
643         (WebCore::TestObjV8Internal::domStringListFunctionCallback):
644         (WebCore::TestObjV8Internal::convert1Callback):
645         (WebCore::TestObjV8Internal::convert2Callback):
646         (WebCore::TestObjV8Internal::convert4Callback):
647         (WebCore::TestObjV8Internal::convert5Callback):
648         (WebCore::TestObjV8Internal::strictFunctionCallback):
649         (WebCore::TestObjV8Internal::variadicStringMethodCallback):
650         (WebCore::TestObjV8Internal::variadicDoubleMethodCallback):
651         (WebCore::TestObjV8Internal::variadicNodeMethodCallback):
652         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
653         (WebCore::V8TestOverloadedConstructors::constructor1Callback):
654         (WebCore::V8TestOverloadedConstructors::constructor2Callback):
655         (WebCore::V8TestOverloadedConstructors::constructor3Callback):
656         (WebCore::V8TestOverloadedConstructors::constructor4Callback):
657         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
658         (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
659         * bindings/scripts/test/V8/V8TestTypedefs.cpp:
660         (WebCore::TestTypedefsV8Internal::funcCallback):
661         (WebCore::TestTypedefsV8Internal::setShadowCallback):
662         (WebCore::TestTypedefsV8Internal::methodWithSequenceArgCallback):
663         (WebCore::TestTypedefsV8Internal::nullableArrayArgCallback):
664         (WebCore::TestTypedefsV8Internal::stringArrayFunctionCallback):
665         (WebCore::TestTypedefsV8Internal::stringArrayFunction2Callback):
666         (WebCore::V8TestTypedefs::constructorCallback):
667         * bindings/v8/V8BindingMacros.h:
668         (WebCore):
669         * bindings/v8/custom/V8HistoryCustom.cpp:
670         (WebCore::V8History::pushStateCallbackCustom):
671         (WebCore::V8History::replaceStateCallbackCustom):
672
673 2013-02-19  Kentaro Hara  <haraken@chromium.org>
674
675         [JSC] MAYBE_MISSING_PARAMETER(..., DefaultIsNullString) macro is redundant
676         https://bugs.webkit.org/show_bug.cgi?id=109902
677
678         Reviewed by Adam Barth.
679
680         Currently:
681
682         - MAYBE_MISSING_PARAMETER(exec, index, DefaultIsUndefined)
683           returns exec->argument(index).
684         - MAYBE_MISSING_PARAMETER(exec, index, DefaultIsNullString)
685           returns JSValue() if exec->argument(index) is missing
686           (i.e. the length of the argument is less than index).
687           It returns exec->argument(index) otherwise.
688
689         No one other than CodeGeneratorJS.pm uses
690         MAYBE_MISSING_PARAMETER(exec, index, DefaultIsUndefined).
691         Instead, we simply use exec->argument(index). We should remove
692         the redundant usage in CodeGeneratorJS.pm too. The long-name macro
693         has been making generated code less readable.
694
695         In addition, we can rename MAYBE_MISSING_PARAMETER() to argumentOrNull().
696
697         c.f. corresponding V8 bug: https://bugs.webkit.org/show_bug.cgi?id=109899
698
699         No tests. No change in behavior.
700
701         * bindings/js/JSDOMBinding.h:
702         (WebCore):
703         * bindings/scripts/CodeGeneratorJS.pm:
704         (GenerateParametersCheck):
705         * bindings/scripts/test/JS/JSFloat64Array.cpp:
706         (WebCore::jsFloat64ArrayPrototypeFunctionFoo):
707         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
708         (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
709         (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage):
710         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
711         (WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction):
712         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
713         (WebCore::jsTestEventTargetPrototypeFunctionItem):
714         (WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent):
715         * bindings/scripts/test/JS/JSTestInterface.cpp:
716         (WebCore::JSTestInterfaceConstructor::constructJSTestInterface):
717         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
718         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
719         (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
720         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
721         (WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor):
722         * bindings/scripts/test/JS/JSTestObj.cpp:
723         (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
724         (WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
725         (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
726         (WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
727         (WebCore::jsTestObjPrototypeFunctionMethodReturningSequence):
728         (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
729         (WebCore::jsTestObjPrototypeFunctionSerializedValue):
730         (WebCore::jsTestObjPrototypeFunctionOptionsObject):
731         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg):
732         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
733         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
734         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalString):
735         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined):
736         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullString):
737         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
738         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
739         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
740         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
741         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
742         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6):
743         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7):
744         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod8):
745         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod9):
746         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10):
747         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod11):
748         (WebCore::jsTestObjConstructorFunctionClassMethodWithOptional):
749         (WebCore::jsTestObjConstructorFunctionOverloadedMethod11):
750         (WebCore::jsTestObjConstructorFunctionOverloadedMethod12):
751         (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence):
752         (WebCore::jsTestObjPrototypeFunctionStringArrayFunction):
753         (WebCore::jsTestObjPrototypeFunctionDomStringListFunction):
754         (WebCore::jsTestObjPrototypeFunctionConvert1):
755         (WebCore::jsTestObjPrototypeFunctionConvert2):
756         (WebCore::jsTestObjPrototypeFunctionConvert4):
757         (WebCore::jsTestObjPrototypeFunctionConvert5):
758         (WebCore::jsTestObjPrototypeFunctionStrictFunction):
759         (WebCore::jsTestObjPrototypeFunctionVariadicStringMethod):
760         (WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethod):
761         (WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod):
762         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
763         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors1):
764         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors2):
765         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors3):
766         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors4):
767         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
768         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface):
769         (WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionAcceptTransferList):
770         (WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionMultiTransferList):
771         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
772         (WebCore::JSTestTypedefsConstructor::constructJSTestTypedefs):
773         (WebCore::jsTestTypedefsPrototypeFunctionFunc):
774         (WebCore::jsTestTypedefsPrototypeFunctionMultiTransferList):
775         (WebCore::jsTestTypedefsPrototypeFunctionSetShadow):
776         (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
777         (WebCore::jsTestTypedefsPrototypeFunctionNullableArrayArg):
778         (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction):
779         (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction2):
780
781 2013-02-18  Hayato Ito  <hayato@chromium.org>
782
783         Make EventDispatcher take an Event object in its constructor.
784         https://bugs.webkit.org/show_bug.cgi?id=109898
785
786         Reviewed by Dimitri Glazkov.
787
788         Re-landing r143145, which caused a crash when deltaX and deltaY of a PlatformWheelEvent are both zero.
789
790         Fixed a crash by early exiting in EventDispatcher::dispatchEvent(Node*, PassRefPtr<EventDispatcher*>)
791         if mediator's event() returns null.
792
793         Also Added a layout test to catch this kind of crash in the future.
794
795         Test: fast/events/platform-wheelevent-with-delta-zero-crash.html
796
797         * dom/EventDispatchMediator.cpp:
798         (WebCore::EventDispatchMediator::dispatchEvent):
799         * dom/EventDispatcher.cpp:
800         (WebCore::EventDispatcher::dispatchEvent):
801         (WebCore::EventDispatcher::EventDispatcher):
802         (WebCore::EventDispatcher::ensureEventPath):
803         (WebCore::EventDispatcher::dispatchSimulatedClick):
804         (WebCore::EventDispatcher::dispatch):
805         (WebCore::EventDispatcher::dispatchEventPreProcess):
806         (WebCore::EventDispatcher::dispatchEventAtCapturing):
807         (WebCore::EventDispatcher::dispatchEventAtTarget):
808         (WebCore::EventDispatcher::dispatchEventAtBubbling):
809         (WebCore::EventDispatcher::dispatchEventPostProcess):
810         * dom/EventDispatcher.h:
811         (EventDispatcher):
812         (WebCore::EventDispatcher::node):
813         (WebCore::EventDispatcher::event):
814         * dom/FocusEvent.cpp:
815         (WebCore::FocusEventDispatchMediator::dispatchEvent):
816         (WebCore::BlurEventDispatchMediator::dispatchEvent):
817         (WebCore::FocusInEventDispatchMediator::dispatchEvent):
818         (WebCore::FocusOutEventDispatchMediator::dispatchEvent):
819         * dom/GestureEvent.cpp:
820         (WebCore::GestureEventDispatchMediator::dispatchEvent):
821         * dom/MouseEvent.cpp:
822         (WebCore::MouseEventDispatchMediator::dispatchEvent):
823         * dom/WheelEvent.cpp:
824         (WebCore::WheelEventDispatchMediator::dispatchEvent):
825         Assert event() rather than an early exit since this code path should be hit only when event() is non-null.
826
827 2013-02-18  Takashi Sakamoto  <tasak@google.com>
828
829         :before/:after pseudo elements do not always apply to the proper element
830         https://bugs.webkit.org/show_bug.cgi?id=93925
831
832         Reviewed by Dimitri Glazkov.
833
834         Disable sharing a style with siblings if :after or :before pseudo style
835         is unique.
836
837         Test: fast/css/before-after-pseudo-class.html
838
839         * css/StyleResolver.cpp:
840         (WebCore::StyleResolver::canShareStyleWithElement):
841         Added a new condition, hasUniquePseudoStyle.
842         * rendering/style/RenderStyle.cpp:
843         (WebCore::RenderStyle::hasUniquePseudoStyle):
844         Added to check whether any pseudo style has unique bit or not.
845         (WebCore):
846         * rendering/style/RenderStyle.h:
847
848 2013-02-18  Andy Estes  <aestes@apple.com>
849
850         Focusing a new frame (via window.focus()) should blur the active element in the current frame
851         https://bugs.webkit.org/show_bug.cgi?id=110172
852
853         Reviewed by Ryosuke Niwa.
854
855         When a change in the focused node crosses a frame boundary, WebKit
856         doesn't always succeed in blurring the old focused node before focusing
857         the new one.
858
859         Each document remembers its focused node, and a Page-scoped
860         FocusController remembers the focused frame. If a new focused node is
861         in a different frame than the focused frame, FocusController tells the
862         old frame's document to clear its focused node before focusing the new
863         one (and remembering the new frame).
864
865         Unfortunately, web content can confuse FocusController by calling
866         window.focus() at the wrong time. Since window.focus() changes
867         FocusController's focused frame without focusing a new node,
868         FocusController won't think that a frame boundary is being crossed if a
869         node in this frame is later focused. Therefore it won't clear the old
870         frame's focused node (it won't even know which frame contained the old
871         focused node), causing at least two bugs:
872
873         1) The node in the old frame will not receive a blur event.
874         2) Calling document.activeElement on the main frame will return the
875            previously focused node, but the HTML5 spec says it should return
876            the frame owner element if a subframe has focus.
877
878         Fix both of these bugs by explicitly clearing the current frame's
879         focused node if window.focus() changes the focused frame. This fix
880         carries some compatibility risk by changing a long-standing behavior
881         of the engine (we've had this bug since the beginning of the project,
882         AFAICT). On the upside, it matches the behavior of both Firefox and IE,
883         matches what HTML5 says about subframe focus, and fixes at least one
884         well-known enterprise web app.
885
886         Tests: fast/dom/HTMLDocument/active-element-frames.html
887                fast/frames/frame-focus-blurs-active-element.html
888
889         * page/DOMWindow.cpp:
890         (WebCore::DOMWindow::focus): If the frame being focused is not the same
891         as the currently focused frame, clear the currently focused frame's
892         focused node.
893
894 2013-02-18  Simon Fraser  <simon.fraser@apple.com>
895
896         Clean up the boolean argument to visibleContentRect
897         https://bugs.webkit.org/show_bug.cgi?id=110167
898
899         Reviewed by Simon Fraser.
900
901         Replace the boolean argument to visibleContentRect() with
902         an enum.
903
904         No behavior change.
905
906         * WebCore.exp.in:
907         * dom/Document.cpp:
908         (WebCore::Document::viewportSize):
909         * inspector/InspectorOverlay.cpp:
910         (WebCore::InspectorOverlay::update):
911         * page/DOMWindow.cpp:
912         (WebCore::DOMWindow::innerHeight):
913         (WebCore::DOMWindow::innerWidth):
914         * page/FrameView.cpp:
915         (WebCore::FrameView::calculateScrollbarModesForLayout):
916         (WebCore::FrameView::layout):
917         (WebCore::FrameView::performPostLayoutTasks):
918         (WebCore::FrameView::windowClipRect):
919         * page/SpatialNavigation.cpp:
920         (WebCore::canScrollInDirection):
921         * platform/ScrollView.cpp:
922         (WebCore::ScrollView::unscaledVisibleContentSize):
923         (WebCore::ScrollView::visibleContentRect):
924         (WebCore::ScrollView::layoutSize):
925         (WebCore::ScrollView::updateScrollbars):
926         (WebCore::ScrollView::paint):
927         * platform/ScrollView.h:
928         * platform/ScrollableArea.cpp:
929         (WebCore::ScrollableArea::visibleContentRect):
930         * platform/ScrollableArea.h:
931         * rendering/RenderDialog.cpp:
932         (WebCore::RenderDialog::layout):
933         * rendering/RenderLayer.cpp:
934         (WebCore::RenderLayer::maximumScrollPosition):
935         (WebCore::RenderLayer::visibleContentRect):
936         * rendering/RenderLayer.h:
937         * rendering/RenderLayerCompositor.cpp:
938         (WebCore::RenderLayerCompositor::frameViewDidChangeSize):
939         (WebCore::RenderLayerCompositor::updateRootLayerPosition):
940
941 2013-02-18  Ryosuke Niwa  <rniwa@webkit.org>
942
943         That didn't work either. Just make it public. This is why I hate nested classes. They just don't work.
944
945         * rendering/RenderBlock.h:
946         (RenderBlock):
947
948 2013-02-18  Ryosuke Niwa  <rniwa@webkit.org>
949
950         Windows build fix. Apparently Visual Studio still has a lot of bugs with respect to nested classes.
951         Work around it by directly instantiating the class inside createFloatingObjects.
952
953         * rendering/RenderBlock.cpp:
954         (WebCore::RenderBlock::createFloatingObjects): Directly instantiate FloatingObjects.
955         * rendering/RenderBlock.h:
956         (RenderBlock): Moved the declaration of createFloatingObjects up.
957         (FloatingObjects::FloatingObjects):
958
959 2013-02-18  Ryosuke Niwa  <rniwa@webkit.org>
960
961         Merge handleSpecialChild into layoutBlockChildren
962         https://bugs.webkit.org/show_bug.cgi?id=110165
963
964         Reviewed by Darin Adler.
965
966         Merge handleSpecialChild, handlePositionedChild, and handleFloatingChild into layoutBlockChildren
967         to make the semantics of the code clear and to get rid of the outdated comment about how there are
968         four types of four types of special children.
969
970         * rendering/RenderBlock.cpp:
971         (WebCore::RenderBlock::layoutBlockChildren):
972         * rendering/RenderBlock.h:
973         (RenderBlock):
974
975 2013-02-18  Ryosuke Niwa  <rniwa@webkit.org>
976
977         Encapsulate FloatingObject's constructor inside create
978         https://bugs.webkit.org/show_bug.cgi?id=110169
979
980         Reviewed by Darin Adler.
981
982         Added FloatingObject::create and made FloatingObject's constructor private.
983         Also added RenderBlock::ensureFloatingObjects to help lazily creating FloatingObjects.
984
985         * rendering/RenderBlock.cpp:
986         (WebCore::RenderBlock::insertFloatingObject):
987         (WebCore::RenderBlock::addOverhangingFloats):
988         (WebCore::RenderBlock::addIntrudingFloats):
989         (WebCore::RenderBlock::ensureFloatingObjects):
990         (WebCore::RenderBlock::FloatingObjects::create):
991         (WebCore::RenderBlock::FloatingObjects::FloatingObjects):
992         * rendering/RenderBlock.h:
993         (FloatingObjects):
994         (RenderBlock):
995
996 2013-02-18  Anders Carlsson  <andersca@apple.com>
997
998         Add a DefaultHash for RefPtr<SecurityOrigin>
999         https://bugs.webkit.org/show_bug.cgi?id=110170
1000
1001         Reviewed by Andreas Kling.
1002
1003         Remove all explicit uses of SecurityOriginHash.
1004
1005         * Modules/webdatabase/DatabaseTracker.h:
1006         * Modules/webdatabase/OriginQuotaManager.h:
1007         * loader/appcache/ApplicationCacheStorage.cpp:
1008         (WebCore::ApplicationCacheStorage::getOriginsWithCache):
1009         * loader/cache/MemoryCache.h:
1010         * page/SecurityOriginHash.h:
1011         * storage/StorageNamespaceImpl.h:
1012         (StorageNamespaceImpl):
1013
1014 2013-02-18  David Hyatt  <hyatt@apple.com>
1015
1016         Padding and border changes don't trigger the relayout of children in some cases.
1017         https://bugs.webkit.org/show_bug.cgi?id=109639.
1018
1019         Reviewed by Ryosuke Niwa.
1020
1021         The fix for this bug was way too general and involved putting code into RenderBox. Since
1022         RenderBox makes no assumptions about what kind of layout system might derive from it, it
1023         was incorrect to just mark all children as needing layout whenever borders and padding
1024         changed widths.
1025         
1026         This patch takes the two cases handled by the original code and makes them more
1027         specialized down in subclasses, i.e., RenderBlock and RenderTableRow. RenderBlock has
1028         been refined to only check if children aren't inline and to also not invalidate
1029         floats or irrelevant positioned objects that might not even have this block as their
1030         containing block.
1031         
1032         The RenderTableRow code is specialized to only care about collapsing borders and
1033         to only check borders rather than padding. It also requires that a child be a cell
1034         in order to do the invalidation.
1035
1036         Covered by existing tests, since this is just specializing the code to more precisely
1037         cover the test cases that have already been written.
1038
1039         Longer term, it should be layout code that figures this stuff out rather than style
1040         change code, but that involves more dramatic changes that can wait.
1041
1042         Test: fast/block/positioning/border-change-relayout-test.html
1043
1044         * rendering/RenderBlock.cpp:
1045         (WebCore::borderOrPaddingLogicalWidthChanged):
1046         (WebCore):
1047         (WebCore::RenderBlock::styleDidChange):
1048         * rendering/RenderBox.cpp:
1049         (WebCore):
1050         (WebCore::RenderBox::styleDidChange):
1051         * rendering/RenderTableRow.cpp:
1052         (WebCore::borderLogicalWidthChanged):
1053         (WebCore):
1054         (WebCore::RenderTableRow::styleDidChange):
1055
1056 2013-02-18  Mark Lam  <mark.lam@apple.com>
1057
1058         Small follow up to r143271: Fix SQLTransaction leak.
1059         https://bugs.webkit.org/show_bug.cgi?id=110052.
1060
1061         Reviewed by Geoffrey Garen.
1062
1063         Applied Geoff's suggestion nullify m_frontend sooner for greater
1064         code clarity. Also added some comments about m_frontend.
1065
1066         No new tests.
1067
1068         * Modules/webdatabase/SQLTransactionBackend.cpp:
1069         (WebCore::SQLTransactionBackend::doCleanup):
1070         * Modules/webdatabase/SQLTransactionBackend.h:
1071         (SQLTransactionBackend):
1072
1073 2013-02-18  Geoffrey Garen  <ggaren@apple.com>
1074
1075         Shrank the SourceProvider cache
1076         https://bugs.webkit.org/show_bug.cgi?id=110158
1077
1078         Reviewed by Oliver Hunt.
1079
1080         Test: fast/js/regress/nested-function-parsing.html
1081
1082         No need to keep statistics on cache size, since we're going to throw it
1083         away no matter what.
1084
1085         * WebCore.order:
1086         * bindings/js/CachedScriptSourceProvider.h:
1087         (CachedScriptSourceProvider):
1088         (WebCore::CachedScriptSourceProvider::CachedScriptSourceProvider):
1089         * loader/cache/CachedScript.cpp:
1090         (WebCore::CachedScript::destroyDecodedData):
1091         (WebCore):
1092         (WebCore::CachedScript::reportMemoryUsage):
1093         * loader/cache/CachedScript.h:
1094         (CachedScript):
1095
1096 2013-02-18  peavo@outlook.com  <peavo@outlook.com>
1097
1098         [Curl] The function cookiesForDOM() does not behave correctly.
1099         https://bugs.webkit.org/show_bug.cgi?id=109923
1100
1101         Reviewed by Brent Fulgham.
1102
1103         The cookiesForDOM() function should return a list of matching cookies, both persistent and session cookies.
1104
1105         * platform/network/curl/CookieJarCurl.cpp:
1106         (WebCore::readCurlCookieToken): Added function to read next token from Curl cookie string.
1107         (WebCore::addMatchingCurlCookie): Added function to add matching cookies to cookie list.
1108         (WebCore::setCookiesFromDOM): Add domain and path from url to cookie if not already set.
1109         (WebCore::cookiesForDOM): Return a list of matching cookies, both session and persistent cookies.
1110
1111 2013-02-17  Mark Lam  <mark.lam@apple.com>
1112
1113         Fix SQLTransaction leak.
1114         https://bugs.webkit.org/show_bug.cgi?id=110052.
1115
1116         Reviewed by Geoffrey Garen.
1117
1118         With https://bugs.webkit.org/show_bug.cgi?id=104750, there is now a circular
1119         reference between SQLTransaction and its backend. The clean up process needs
1120         to be fixed to explicitly break this reference cycle.
1121
1122         The 5 phases of the SQLTransaction (and backend) phases and their clean up
1123         actions are:
1124
1125         Phase 1. After Birth, before scheduling
1126         - During shutdown, DatabaseThread::databaseThread() calls
1127           DatabaseBackendAsync::close(). DatabaseBackendAsync::close() iterates
1128           DatabaseBackendAsync::m_transactionQueue and calls
1129           SQLtransactionBackend::notifyDatabaseThreadIsShuttingDown() on each
1130           transaction there.
1131
1132         Phase 2. After scheduling, before state AcquireLock
1133         - ~DatabaseTask() calls SQLtransactionBackend's
1134           notifyDatabaseThreadIsShuttingDown().
1135
1136         Phase 3. After state AcquireLock, before "lockAcquired"
1137         - During shutdown, DatabaseThread::databaseThread() calls
1138           SQLTransactionCoordinator::shutdown(), which calls
1139           SQLTransactionBackend::notifyDatabaseThreadIsShuttingDown().
1140
1141         Phase 4: After "lockAcquired", before state CleanupAndTerminate
1142         - Same as Phase 3.
1143
1144         Phase 5: After state CleanupAndTerminate
1145         - state CleanupAndTerminate calls SQLTransactionBackend::doCleanup().
1146
1147         See comment at the top of SQLTransactionBackend.cpp for more details.
1148
1149         Other supporting changes:
1150         - Moved Database::close() to the DatabaseBackendAsync.
1151         - Moved the "if already cleaned up" check from SQLTransactionBackend's
1152           notifyDatabaseThreadIsShuttingDown() to doCleanup().
1153         - Added a check to prevent SQLTransactionCoordinator's releaseLock()
1154           from running when it's shutting down.
1155
1156         No new tests.
1157
1158         * Modules/webdatabase/Database.cpp:
1159         * Modules/webdatabase/Database.h:
1160         * Modules/webdatabase/DatabaseBackendAsync.cpp:
1161         (WebCore::DatabaseBackendAsync::close): Move from Database.cpp.
1162         * Modules/webdatabase/DatabaseBackendAsync.h:
1163         * Modules/webdatabase/DatabaseTask.cpp:
1164         (WebCore::DatabaseBackendAsync::DatabaseTransactionTask::DatabaseTransactionTask):
1165         (WebCore::DatabaseBackendAsync::DatabaseTransactionTask::~DatabaseTransactionTask):
1166         (WebCore::DatabaseBackendAsync::DatabaseTransactionTask::doPerformTask):
1167         * Modules/webdatabase/DatabaseTask.h:
1168         (DatabaseBackendAsync::DatabaseTransactionTask):
1169         * Modules/webdatabase/DatabaseThread.cpp:
1170         (WebCore::DatabaseThread::databaseThread):
1171         * Modules/webdatabase/SQLTransactionBackend.cpp:
1172         (WebCore::SQLTransactionBackend::doCleanup):
1173         (WebCore::SQLTransactionBackend::notifyDatabaseThreadIsShuttingDown):
1174         (WebCore::SQLTransactionBackend::cleanupAndTerminate):
1175         * Modules/webdatabase/SQLTransactionCoordinator.cpp:
1176         (WebCore::SQLTransactionCoordinator::SQLTransactionCoordinator):
1177         (WebCore::SQLTransactionCoordinator::acquireLock):
1178         (WebCore::SQLTransactionCoordinator::releaseLock):
1179         (WebCore::SQLTransactionCoordinator::shutdown):
1180         * Modules/webdatabase/SQLTransactionCoordinator.h:
1181         (SQLTransactionCoordinator):
1182
1183 2013-02-18  David Kilzer  <ddkilzer@apple.com>
1184
1185         Fix WebCore Xcode project
1186
1187         * WebCore.xcodeproj/project.pbxproj: Fix path for CDMPrivate.h.
1188
1189 2013-02-18  Julien Chaffraix  <jchaffraix@webkit.org>
1190
1191         [CSS Grid Layout] Refactor grid position resolution code to support an internal grid representation
1192         https://bugs.webkit.org/show_bug.cgi?id=109718
1193
1194         Reviewed by Ojan Vafai.
1195
1196         In order to support auto placement (where we can't infer a grid item's position from its style),
1197         we need to have 2 code paths:
1198         - One that places the elements on the grid representation.
1199         - One that reuse the grid representation to return the position.
1200
1201         This code path implements this split so that we can add auto placement in a follow-up patch(es).
1202         Also in order to avoid a O(n^2) behavior [walking over our grid to find a grid item's position],
1203         the cached position code path needed an efficient way to find the grid items -> position mapping.
1204
1205         Refactoring, covered by existing tests.
1206
1207         * rendering/RenderGrid.cpp:
1208         (WebCore::RenderGrid::cachedGridCoordinate):
1209         (WebCore::RenderGrid::resolveGridPositionFromStyle):
1210         These methods implements the above split. The first one
1211         reuses our cached information whereas the other one is
1212         used to build the cache.
1213
1214         (WebCore::RenderGrid::computeIntrinsicLogicalWidths):
1215         (WebCore::RenderGrid::layoutGridItems):
1216         Added some code to clear the grid items' position.
1217
1218         (WebCore::RenderGrid::findChildLogicalPosition):
1219         (WebCore::RenderGrid::logicalContentHeightForChild):
1220         Updated these functions to use cachedGridPosition.
1221
1222         (WebCore::RenderGrid::maximumIndexInDirection):
1223         Added a comment about why we don't use cachedGridPosition.
1224
1225         (WebCore::RenderGrid::insertItemIntoGrid):
1226         Added this helper function to insert into the grid and
1227         cache the position in the reverse lookup map.
1228
1229         (WebCore::RenderGrid::placeItemsOnGrid):
1230         Updated to call insertItemIntoGrid. Also added an ASSERT
1231         similar to m_grid.
1232
1233         (WebCore::RenderGrid::clearGrid):
1234         Added this helper function to clear our grid structure.
1235
1236         * rendering/RenderGrid.h:
1237         (GridCoordinate):
1238         (WebCore::RenderGrid::GridCoordinate::GridCoordinate):
1239         Added this POD to hold the coordinates in our reverse map.
1240
1241 2013-02-18  Stephen Chenney  <schenney@chromium.org>
1242
1243         feFlood incorrectly applied color-interpolation-filters
1244         https://bugs.webkit.org/show_bug.cgi?id=109985
1245
1246         Reviewed by Dirk Schulze.
1247
1248         The SVG spec defines the color-interpolation-filters property for all
1249         filter effect elements in order to control cases where a color is
1250         based on some arithmetic computation on other colors. For example,
1251         when computing gradients or blending colors. feFlood simply fills a
1252         region with the given color, and that given color is always defined to
1253         be in sRGB space, so the feFlood result should always be sRGB.
1254
1255         The new behavior matches both Opera and Firefox.
1256
1257         Tests: svg/filters/feFlood-color-interpolation-expected.svg
1258                svg/filters/feFlood-color-interpolation.svg
1259
1260         * platform/graphics/filters/FEFlood.cpp:
1261         (WebCore::FEFlood::platformApplySoftware): Force the color mode to be
1262         sRGB before returning.
1263
1264 2013-02-18  Mark Lam  <mark.lam@apple.com>
1265
1266         Introduced AbstractSQLStatement and AbstractSQLStatementBackend.
1267         https://bugs.webkit.org/show_bug.cgi?id=110148.
1268
1269         Reviewed by Geoff Garen.
1270
1271         This is part of the webdatabase refactoring for webkit2.
1272         - Also changed the frontend and backend to only refer to the
1273           abstract interface of each other.
1274
1275         No new tests.
1276
1277         * GNUmakefile.list.am:
1278         * Modules/webdatabase/AbstractSQLStatement.h: Added.
1279         (AbstractSQLStatement):
1280         (WebCore::AbstractSQLStatement::~AbstractSQLStatement):
1281         * Modules/webdatabase/AbstractSQLStatementBackend.h: Added.
1282         (AbstractSQLStatementBackend):
1283         (WebCore::AbstractSQLStatementBackend::~AbstractSQLStatementBackend):
1284         * Modules/webdatabase/SQLStatement.cpp:
1285         (WebCore::SQLStatement::setBackend):
1286         * Modules/webdatabase/SQLStatement.h:
1287         (SQLStatement):
1288         * Modules/webdatabase/SQLStatementBackend.cpp:
1289         (WebCore::SQLStatementBackend::create):
1290         (WebCore::SQLStatementBackend::SQLStatementBackend):
1291         (WebCore::SQLStatementBackend::frontend):
1292         * Modules/webdatabase/SQLStatementBackend.h:
1293         (SQLStatementBackend):
1294         * Modules/webdatabase/SQLTransaction.cpp:
1295         (WebCore::SQLTransaction::deliverStatementCallback):
1296         * Modules/webdatabase/SQLTransactionBackend.cpp:
1297         (WebCore::SQLTransactionBackend::currentStatement):
1298         (WebCore::SQLTransactionBackend::executeSQL):
1299         * Modules/webdatabase/SQLTransactionBackend.h:
1300         (SQLTransactionBackend):
1301         * Target.pri:
1302         * WebCore.gypi:
1303         * WebCore.vcproj/WebCore.vcproj:
1304         * WebCore.vcxproj/WebCore.vcxproj:
1305         * WebCore.vcxproj/WebCore.vcxproj.filters:
1306         * WebCore.xcodeproj/project.pbxproj:
1307
1308 2013-02-18  David Kilzer  <ddkilzer@apple.com>
1309
1310         BUILD FIX (r143230): Fix renamed header and implementation of -[WebAccessibilityObjectWrapper accessibilityPostedNotification:]
1311         <http://webkit.org/b/110077>
1312
1313         Fixes the following build failures:
1314
1315             AccessibilityObjectIOS.mm:35:9: fatal error: 'AccessibilityObjectWrapperIOS.h' file not found
1316             #import "AccessibilityObjectWrapperIOS.h"
1317                     ^
1318             1 error generated.
1319
1320             WebAccessibilityObjectWrapperIOS.mm:2051:35: error: use of undeclared identifier 'notificationString'; did you mean 'notificationType'?
1321                 if (AXNotificationCallback && notificationString)
1322                                               ^~~~~~~~~~~~~~~~~~
1323                                               notificationType
1324             WebAccessibilityObjectWrapperIOS.mm:2049:81: note: 'notificationType' declared here
1325             - (void)accessibilityPostedNotification:(WebCore::AXObjectCache::AXNotification)notificationType
1326                                                                                             ^
1327             WebAccessibilityObjectWrapperIOS.mm:2052:38: error: use of undeclared identifier 'notificationString'; did you mean 'notificationType'?
1328                     AXNotificationCallback(self, notificationString, AXPostedNotificationContext);
1329                                                  ^~~~~~~~~~~~~~~~~~
1330                                                  notificationType
1331             WebAccessibilityObjectWrapperIOS.mm:2049:81: note: 'notificationType' declared here
1332             - (void)accessibilityPostedNotification:(WebCore::AXObjectCache::AXNotification)notificationType
1333                                                                                             ^
1334             WebAccessibilityObjectWrapperIOS.mm:2052:38: error: cannot initialize a parameter of type 'NSString *' with an lvalue of type 'WebCore::AXObjectCache::AXNotification'
1335                     AXNotificationCallback(self, notificationString, AXPostedNotificationContext);
1336                                                  ^~~~~~~~~~~~~~~~~~
1337             WebAccessibilityObjectWrapperIOS.mm:2049:81: error: conflicting parameter types in implementation of 'accessibilityPostedNotification:': 'NSString *' vs 'WebCore::AXObjectCache::AXNotification' [-Werror,-Wmismatched-parameter-types]
1338             - (void)accessibilityPostedNotification:(WebCore::AXObjectCache::AXNotification)notificationType
1339                                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
1340             WebAccessibilityObjectWrapperBase.h:48:53: note: previous definition is here
1341             - (void)accessibilityPostedNotification:(NSString *)notificationName;
1342                                                      ~~~~~~~~~~ ^
1343             4 errors generated.
1344
1345         * accessibility/ios/AccessibilityObjectIOS.mm: Fix name of
1346         included header.
1347         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1348         (-[WebAccessibilityObjectWrapper accessibilityPostedNotification:]):
1349         Fix implementation to match declaration.
1350
1351         * accessibility/ios/WebAccessibilityObjectWrapperIOS.h:
1352         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1353         * accessibility/ios/AXObjectCacheIOS.mm:
1354         - Clean up #endif comments.
1355
1356 2013-02-18  Jer Noble  <jer.noble@apple.com>
1357
1358         EME: Add a CDMPrivate implementation using AVFoundation.
1359         https://bugs.webkit.org/show_bug.cgi?id=109739
1360
1361         Reviewed by Eric Carlson.
1362
1363         Add a CDMPrivate implementation using AVFoundation, similar to the EME v1 implementation
1364         in MediaPlayerPrivateAVFoundationObjC. This requires passing the AVAssetResourceLoadingRequest
1365         from the MediaPlayerPrivateAVFoundationObjC instance to CDMSessionAVFoundation. To do so
1366         without adding platform-specific API to MediaPlayer, add a static map from MediaPlayer ->
1367         MediaPlayerPrivateAVFoundationObjC instances to be used to vend the AVAssetResourceLoadingRequest
1368         to CDMSessionAVFoundation.
1369
1370         * Modules/encryptedmedia/CDM.cpp:
1371         (WebCore::installedCDMFactories): Add the factory for CDMPrivateAVFoundation.
1372         * Modules/encryptedmedia/CDM.h:
1373         * Modules/encryptedmedia/CDMPrivateAVFoundation.h: Added.
1374         (WebCore::CDMPrivateAVFoundation::create): Simple factory method.
1375         (WebCore::CDMPrivateAVFoundation::~CDMPrivateAVFoundation): Simple virtual destructor.
1376         (WebCore::CDMPrivateAVFoundation::cdm): Simple getter.
1377         (WebCore::CDMPrivateAVFoundation::CDMPrivateAVFoundation): Simple constructor.
1378         * Modules/encryptedmedia/CDMPrivateAVFoundation.mm: Added.
1379         (WebCore::CDMSessionAVFoundation::~CDMSessionAVFoundation): Simple destructor.
1380         (WebCore::CDMPrivateAVFoundation::supportsKeySytem): Check whether the given key system is supported.
1381         (WebCore::CDMPrivateAVFoundation::supportsMIMEType): Check whether the given MIME type is supported.
1382         (WebCore::CDMPrivateAVFoundation::createSession): Return a new CDMSessionAVFoundation.
1383         (WebCore::CDMSessionAVFoundation::CDMSessionAVFoundation): Simple constructor.
1384         (WebCore::CDMSessionAVFoundation::generateKeyRequest): Retrieve the AVAssetResourceLoadingRequest
1385             from the MediaPlayer, and use it to generate a key request.
1386         (WebCore::CDMSessionAVFoundation::releaseKeys): No-op.
1387         (WebCore::CDMSessionAVFoundation::update): Add the passed in key to the AVAssetResourceLoadingRequest.
1388         * WebCore.xcodeproj/project.pbxproj:
1389         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1390         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1391         (WebCore::playerToPrivateMap): Lazily instantiate static map.
1392         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): Register with the playerToPrivateMap.
1393         (WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC): Unregister from same.
1394         (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource): Also send keyNeeded event in ENCRYPTED_MEDIA_V2.
1395         (WebCore::MediaPlayerPrivateAVFoundationObjC::extractKeyURIKeyIDAndCertificateFromInitData): Convert this 
1396             method from file-static to class static.
1397         (WebCore::MediaPlayerPrivateAVFoundationObjC::takeRequestForPlayerAndKeyURI): Pull the AVAssetResourceLoadingRequest
1398             from m_keyURIToRequestMap and return it, if present.
1399
1400 2013-02-18  Philip Rogers  <pdr@google.com>
1401
1402         Fix scaling of tiled SVG backgrounds on high-dpi displays
1403         https://bugs.webkit.org/show_bug.cgi?id=110047
1404
1405         Reviewed by Dirk Schulze.
1406
1407         This patch fixes the scaling of SVG when used for drawing patterns. Tiled/patterend SVG
1408         images are first drawn into an image buffer and then the image buffer is used to stamp
1409         out tiles. Because it is a raster source, the size of the image buffer needs to
1410         be scaled to the final resolution of the device. After scaling the image buffer, the
1411         source rect and pattern transforms need to be adjusted so they align in device pixel
1412         coordinates. This adjustment was not done before this patch, causing pixelated rendering.
1413
1414         Additionally, a FIXME has been added due to webkit.org/b/110065 and the image buffer
1415         has been manually scaled (using "zoomedAndScaledContainerRect") instead of relying
1416         on the ImageBuffer's resolutionScale parameter.
1417
1418         Test: svg/as-background-image/tiled-background-image.html
1419
1420         * svg/graphics/SVGImage.cpp:
1421         (WebCore::SVGImage::drawPatternForContainer):
1422
1423             Note that fixing the FIXME does not change that the source rect and transform need
1424             to be adjusted for page scale.
1425
1426 2013-02-18  David Hyatt  <hyatt@apple.com>
1427
1428         Make seamless iframes paginate properly in their enclosing document's pagination context.
1429         https://bugs.webkit.org/show_bug.cgi?id=106125
1430         <rdar://problem/12922720> Text in iframe is clipped while printing
1431
1432         Reviewed by Simon Fraser.
1433
1434         Added new tests in fast/multicol and fast/region.
1435
1436         * rendering/RenderBlock.cpp:
1437         (WebCore::RenderBlock::clampToStartAndEndRegions):
1438         Don't clamp when the RenderView is the containing block of an object in a RenderFlowThread.
1439
1440         * rendering/RenderObject.cpp:
1441         (WebCore::RenderObject::containerForRepaint):
1442         Don't attempt any repaint container antics when we're in a seamless iframe, since the ancestor
1443         document will actually do the handoff into the flow thread.
1444
1445         * rendering/RenderView.cpp:
1446         (WebCore::enclosingSeamlessRenderer):
1447         Heper function to test for an enclosing seamless iframe.
1448         
1449         (WebCore::RenderView::addChild):
1450         Subclass addChild on RenderView to properly set the inRenderFlowThread state for a seamless
1451         child document so thta it will check regions.
1452
1453         (WebCore::RenderView::initializeLayoutState):
1454         New helper method for setting up the initial layout state of a RenderView. If inside a seamless
1455         paginated ancestor, set up the appropriate pagination information so the child document
1456         knows about it. This method will expand to inherit info about line grids and exclusions eventually
1457         also.
1458
1459         (WebCore::RenderView::layout):
1460         Now calls initializeLayoutState to set up the layout state.
1461
1462         * rendering/RenderView.h:
1463         (WebCore::RenderView::pageLogicalHeight):
1464         (WebCore::RenderView::setPageLogicalHeight):
1465         (RenderView):
1466         Fix the type of the page logical height methods to be LayoutUnit instead of unsigned.
1467
1468 2013-02-18  Sheriff Bot  <webkit.review.bot@gmail.com>
1469
1470         Unreviewed, rolling out r143145.
1471         http://trac.webkit.org/changeset/143145
1472         https://bugs.webkit.org/show_bug.cgi?id=110143
1473
1474         Causes frequent crashes. (Requested by eric_carlson on
1475         #webkit).
1476
1477         * dom/EventDispatchMediator.cpp:
1478         (WebCore::EventDispatchMediator::dispatchEvent):
1479         * dom/EventDispatcher.cpp:
1480         (WebCore::EventDispatcher::dispatchEvent):
1481         (WebCore::EventDispatcher::EventDispatcher):
1482         (WebCore::EventDispatcher::ensureEventPath):
1483         (WebCore::EventDispatcher::dispatchSimulatedClick):
1484         (WebCore::EventDispatcher::dispatchEventPreProcess):
1485         (WebCore::EventDispatcher::dispatchEventAtCapturing):
1486         (WebCore::EventDispatcher::dispatchEventAtTarget):
1487         (WebCore::EventDispatcher::dispatchEventAtBubbling):
1488         (WebCore::EventDispatcher::dispatchEventPostProcess):
1489         * dom/EventDispatcher.h:
1490         (EventDispatcher):
1491         (WebCore::EventDispatcher::node):
1492         (WebCore):
1493         * dom/FocusEvent.cpp:
1494         (WebCore::FocusEventDispatchMediator::dispatchEvent):
1495         (WebCore::BlurEventDispatchMediator::dispatchEvent):
1496         (WebCore::FocusInEventDispatchMediator::dispatchEvent):
1497         (WebCore::FocusOutEventDispatchMediator::dispatchEvent):
1498         * dom/GestureEvent.cpp:
1499         (WebCore::GestureEventDispatchMediator::dispatchEvent):
1500         * dom/MouseEvent.cpp:
1501         (WebCore::MouseEventDispatchMediator::dispatchEvent):
1502
1503 2013-02-18  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1504
1505         [Soup] Free cookies explicitly in loops instead of using GOwnPtr
1506         https://bugs.webkit.org/show_bug.cgi?id=110103
1507
1508         Reviewed by Martin Robinson.
1509
1510         Free cookies explicitly in loops instead of using GOwnPtr for this.
1511         Until now, the code was mixing both styles. This patch makes the
1512         code consistent one way. Adopting list items with GOwnPtr for the
1513         sole purpose to free them makes the freeing less obvious and may
1514         lead to mistakes if someone refactors the code and calls "break;"
1515         to abort loop iteration.
1516
1517         No new tests, no behavior change.
1518
1519         * platform/network/soup/CookieJarSoup.cpp:
1520         (WebCore::getRawCookies):
1521         (WebCore::deleteCookie):
1522         (WebCore::getHostnamesWithCookies):
1523
1524 2013-02-18  Joseph Pecoraro  <pecoraro@apple.com>
1525
1526         [JSC]: ASSERT in KURL(ParsedURLStringTag) under sourceMapURLForScript
1527         https://bugs.webkit.org/show_bug.cgi?id=109987
1528
1529         Reviewed by Pavel Feldman.
1530
1531         Improved an existing test to cover this.
1532
1533         * bindings/js/ScriptDebugServer.cpp:
1534         (WebCore::ScriptDebugServer::dispatchDidParseSource):
1535         Remove the sourceURL parsing and script.url replacement from the JSC
1536         implementation of ScriptDebugServer. The WebCore inspector code that
1537         this was added for already does this, at a more appropriate time.
1538
1539 2013-02-18  Mike West  <mkwst@chromium.org>
1540
1541         compareDocumentPosition reports disconnected nodes as following each other
1542         https://bugs.webkit.org/show_bug.cgi?id=108274
1543
1544         Reviewed by Dimitri Glazkov.
1545
1546         jQuery has had to implement their own sorting mechanism in Sizzle[1] due
1547         to Node::compareDocumentPosition always reporting disconnected nodes
1548         as following each other. According to spec[2], we should instead be
1549         indicating that the result is (a) disconnected, (b) implementation
1550         specific, and (c) deterministically ordered.
1551
1552         [1]: https://github.com/jquery/sizzle/commit/1c8aec91284af8d8c14447976235d5dd72b0d75e
1553         [2]: http://dom.spec.whatwg.org/#dom-node-comparedocumentposition
1554
1555         Test: fast/dom/compare-document-position-disconnected-nodes.html
1556
1557         * dom/Node.cpp:
1558         (WebCore::Node::compareDocumentPosition):
1559             After walking the parentNode chain of both Nodes, compare the root.
1560             If the Nodes don't share a root, they're in distinct trees, and
1561             should return as described above. We determine which element
1562             "preceeds" the other in an arbitrary fashion via pointer comparison.
1563
1564 2013-02-18  Andrey Adaikin  <aandrey@chromium.org>
1565
1566         Web Inspector: [Canvas] fix replay log grouping by frames
1567         https://bugs.webkit.org/show_bug.cgi?id=110122
1568
1569         Reviewed by Pavel Feldman.
1570
1571         Bug: log grouping by frames did not work if a frame end call is not a draw call.
1572         Drive-by: Last draw call group may not contain a draw call. In this case merge it into the previous group.
1573
1574         * inspector/front-end/CanvasProfileView.js:
1575         (WebInspector.CanvasProfileView.prototype._appendCallNode):
1576         (WebInspector.CanvasProfileView.prototype._maybeMergeLastDrawCallGroups):
1577
1578 2013-02-18  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1579
1580         [Soup] Superfluous HashMap check in SocketStreamHandleSoup::getHandleFromId()
1581         https://bugs.webkit.org/show_bug.cgi?id=110107
1582
1583         Reviewed by Martin Robinson.
1584
1585         Remove Superfluous HashMap::contains() call in SocketStreamHandleSoup::getHandleFromId()
1586         as HashMap::get() will already return 0 in this case anyway.
1587
1588         No new tests, no behavior change.
1589
1590         * platform/network/soup/SocketStreamHandleSoup.cpp:
1591         (WebCore):
1592         (WebCore::getHandleFromId):
1593
1594 2013-02-18  Zan Dobersek  <zdobersek@igalia.com>
1595
1596         Stop placing std::isfinite and std::signbit inside the global scope
1597         https://bugs.webkit.org/show_bug.cgi?id=109817
1598
1599         Reviewed by Darin Adler.
1600
1601         Prefix calls to the isfinite and signbit methods with std:: as the two
1602         methods are no longer being imported into the global scope.
1603
1604         No new tests as there's no change in functionality.
1605
1606         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
1607         (WebCore::JSCanvasRenderingContext2D::setWebkitLineDash):
1608         * bindings/js/JSDOMBinding.cpp:
1609         (WebCore::jsDateOrNull):
1610         * bindings/js/JSDOMBinding.h:
1611         (WebCore::finiteInt32Value):
1612         * bindings/v8/V8Binding.h:
1613         (WebCore::v8DateOrNull):
1614         * css/CSSPrimitiveValue.cpp:
1615         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1616         * html/BaseDateAndTimeInputType.cpp:
1617         (WebCore::BaseDateAndTimeInputType::parseToNumber):
1618         * html/HTMLInputElement.cpp:
1619         (WebCore::HTMLInputElement::setValueAsNumber):
1620         * html/HTMLMeterElement.cpp:
1621         (WebCore::HTMLMeterElement::setMin):
1622         (WebCore::HTMLMeterElement::setMax):
1623         (WebCore::HTMLMeterElement::setValue):
1624         (WebCore::HTMLMeterElement::setLow):
1625         (WebCore::HTMLMeterElement::setHigh):
1626         (WebCore::HTMLMeterElement::setOptimum):
1627         * html/HTMLProgressElement.cpp:
1628         (WebCore::HTMLProgressElement::value):
1629         (WebCore::HTMLProgressElement::setValue):
1630         (WebCore::HTMLProgressElement::max):
1631         (WebCore::HTMLProgressElement::setMax):
1632         * html/MonthInputType.cpp:
1633         (WebCore::MonthInputType::valueAsDate):
1634         (WebCore::MonthInputType::defaultValueForStepUp):
1635         (WebCore::MonthInputType::parseToNumber):
1636         * html/NumberInputType.cpp:
1637         (WebCore::NumberInputType::typeMismatchFor):
1638         (WebCore::NumberInputType::sanitizeValue):
1639         (WebCore::NumberInputType::hasBadInput):
1640         * html/RangeInputType.cpp:
1641         (WebCore::RangeInputType::typeMismatchFor):
1642         * html/TimeInputType.cpp:
1643         (WebCore::TimeInputType::defaultValueForStepUp):
1644         * html/canvas/CanvasPathMethods.cpp:
1645         (WebCore::CanvasPathMethods::moveTo):
1646         (WebCore::CanvasPathMethods::lineTo):
1647         (WebCore::CanvasPathMethods::quadraticCurveTo):
1648         (WebCore::CanvasPathMethods::bezierCurveTo):
1649         (WebCore::CanvasPathMethods::arcTo):
1650         (WebCore::CanvasPathMethods::arc):
1651         (WebCore::CanvasPathMethods::rect):
1652         * html/canvas/CanvasRenderingContext2D.cpp:
1653         (WebCore::CanvasRenderingContext2D::setLineWidth):
1654         (WebCore::CanvasRenderingContext2D::setMiterLimit):
1655         (WebCore::CanvasRenderingContext2D::setShadowOffsetX):
1656         (WebCore::CanvasRenderingContext2D::setShadowOffsetY):
1657         (WebCore::CanvasRenderingContext2D::setShadowBlur):
1658         (WebCore::lineDashSequenceIsValid):
1659         (WebCore::CanvasRenderingContext2D::setLineDashOffset):
1660         (WebCore::CanvasRenderingContext2D::scale):
1661         (WebCore::CanvasRenderingContext2D::rotate):
1662         (WebCore::CanvasRenderingContext2D::translate):
1663         (WebCore::CanvasRenderingContext2D::transform):
1664         (WebCore::CanvasRenderingContext2D::setTransform):
1665         (WebCore::validateRectForCanvas):
1666         (WebCore::CanvasRenderingContext2D::isPointInPath):
1667         (WebCore::CanvasRenderingContext2D::isPointInStroke):
1668         (WebCore::CanvasRenderingContext2D::drawImage):
1669         (WebCore::CanvasRenderingContext2D::createLinearGradient):
1670         (WebCore::CanvasRenderingContext2D::createRadialGradient):
1671         (WebCore::CanvasRenderingContext2D::createImageData):
1672         (WebCore::CanvasRenderingContext2D::getImageData):
1673         (WebCore::CanvasRenderingContext2D::putImageData):
1674         (WebCore::CanvasRenderingContext2D::drawTextInternal):
1675         * html/parser/HTMLParserIdioms.cpp:
1676         (WebCore::parseToDoubleForNumberType):
1677         * html/shadow/MediaControlElements.cpp:
1678         (WebCore::MediaControlTimelineElement::setDuration):
1679         * html/shadow/MediaControls.cpp:
1680         (WebCore::MediaControls::reset):
1681         * html/shadow/MediaControlsApple.cpp:
1682         (WebCore::MediaControlsApple::reset):
1683         * html/shadow/MediaControlsBlackBerry.cpp:
1684         (WebCore::MediaControlFullscreenTimelineElement::setDuration):
1685         (WebCore::MediaControlsBlackBerry::reset):
1686         * inspector/InspectorValues.cpp:
1687         (WebCore::InspectorBasicValue::writeJSON):
1688         * loader/cache/CachedResource.cpp:
1689         (WebCore::CachedResource::currentAge):
1690         (WebCore::CachedResource::freshnessLifetime):
1691         * page/DOMWindow.cpp:
1692         (WebCore::DOMWindow::adjustWindowRect):
1693         * platform/DateComponents.cpp:
1694         (WebCore::DateComponents::setMillisecondsSinceEpochForDate):
1695         (WebCore::DateComponents::setMillisecondsSinceEpochForDateTime):
1696         (WebCore::DateComponents::setMillisecondsSinceEpochForMonth):
1697         (WebCore::DateComponents::setMillisecondsSinceMidnight):
1698         (WebCore::DateComponents::setMonthsSinceEpoch):
1699         (WebCore::DateComponents::setMillisecondsSinceEpochForWeek):
1700         * platform/Decimal.cpp:
1701         (WebCore::Decimal::fromDouble):
1702         * platform/FileSystem.h:
1703         (WebCore::isValidFileTime):
1704         * platform/LocalizedStrings.cpp:
1705         (WebCore::localizedMediaTimeDescription):
1706         * platform/graphics/cairo/CairoUtilities.cpp:
1707         (WebCore::drawPatternToCairoContext):
1708         * platform/graphics/cairo/PathCairo.cpp:
1709         (WebCore::Path::addArc):
1710         (WebCore::Path::contains):
1711         * platform/graphics/cg/PathCG.cpp:
1712         (WebCore::Path::addArc):
1713         * platform/graphics/gstreamer/FullscreenVideoControllerGStreamer.cpp:
1714         (WebCore::FullscreenVideoControllerGStreamer::timeToString):
1715         * platform/graphics/openvg/PathOpenVG.cpp:
1716         (WebCore::Path::addArc):
1717         * platform/graphics/skia/SkiaUtils.h:
1718         (WebCore::WebCoreFloatToSkScalar):
1719         (WebCore::WebCoreDoubleToSkScalar):
1720         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
1721         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::maxTimeSeekable):
1722         * platform/gtk/LocalizedStringsGtk.cpp:
1723         (WebCore::localizedMediaTimeDescription):
1724         * platform/mac/WebVideoFullscreenHUDWindowController.mm:
1725         (timeToString):
1726         * platform/network/ResourceResponseBase.cpp:
1727         (WebCore::parseDateValueInHeader):
1728         * platform/qt/LocalizedStringsQt.cpp:
1729         (WebCore::localizedMediaTimeDescription):
1730         * rendering/RenderFlexibleBox.cpp:
1731         (WebCore::RenderFlexibleBox::resolveFlexibleLengths):
1732         * rendering/RenderMediaControlsChromium.cpp:
1733         (WebCore::formatChromiumMediaControlsTime):
1734         * rendering/RenderTheme.cpp:
1735         (WebCore::RenderTheme::formatMediaControlsTime):
1736         * rendering/style/RenderStyle.cpp:
1737         (WebCore::RenderStyle::setFontSize):
1738         * svg/SVGPathParser.cpp:
1739         (WebCore::SVGPathParser::decomposeArcToCubic):
1740         * xml/XPathFunctions.cpp:
1741         (WebCore::XPath::FunRound::round):
1742         * xml/XPathValue.cpp:
1743         (WebCore::XPath::Value::toString):
1744
1745 2013-02-18  Chris Fleizach  <cfleizach@apple.com>
1746
1747         AX: Make iOS wrapper use the WebAccessibilityObjectBase wrapper
1748         https://bugs.webkit.org/show_bug.cgi?id=110077
1749
1750         Reviewed by David Kilzer.
1751
1752         Make the iOS wrapper a subclass of the shared wrapper so that iOS can re-use code from the Mac.
1753         Rename the iOS file to reflect the class name.
1754
1755         * WebCore.xcodeproj/project.pbxproj:
1756         * accessibility/ios/AXObjectCacheIOS.mm:
1757         (WebCore::AXObjectCache::attachWrapper):
1758         (WebCore::AXObjectCache::postPlatformNotification):
1759         * accessibility/ios/AccessibilityObjectWrapperIOS.h: Removed.
1760         * accessibility/ios/AccessibilityObjectWrapperIOS.mm: Removed.
1761         * accessibility/ios/WebAccessibilityObjectWrapperIOS.h: Copied from Source/WebCore/accessibility/ios/AccessibilityObjectWrapperIOS.h.
1762         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: Copied from Source/WebCore/accessibility/ios/AccessibilityObjectWrapperIOS.mm.
1763         (-[WebAccessibilityObjectWrapper initWithAccessibilityObject:]):
1764         (-[WebAccessibilityObjectWrapper attachmentView]):
1765         (-[WebAccessibilityObjectWrapper accessibilityPostedNotification:WebCore::AXObjectCache::]):
1766
1767 2013-02-18  Sheriff Bot  <webkit.review.bot@gmail.com>
1768
1769         Unreviewed, rolling out r143210.
1770         http://trac.webkit.org/changeset/143210
1771         https://bugs.webkit.org/show_bug.cgi?id=110128
1772
1773         Still causing some test timeouts (Requested by anttik on
1774         #webkit).
1775
1776         * platform/SharedTimer.h:
1777         (SharedTimer):
1778         (WebCore):
1779         (WebCore::MainThreadSharedTimer::stop):
1780         * platform/ThreadTimers.cpp:
1781         (WebCore::ThreadTimers::fireTimersInNestedEventLoop):
1782         * platform/mac/SharedTimerMac.mm:
1783         (WebCore):
1784         (WebCore::PowerObserver::restartSharedTimer):
1785         (WebCore::setSharedTimerFireInterval):
1786         (WebCore::stopSharedTimer):
1787
1788 2013-02-18  Vladislav Kaznacheev  <kaznacheev@chromium.org>
1789
1790         Web Inspector: Disable hiding the debugger when it is below the source code
1791         https://bugs.webkit.org/show_bug.cgi?id=110106
1792
1793         Reviewed by Pavel Feldman.
1794
1795         When the "Split horizontally" option is checked in the Sources panel the button responsible for the sidebar
1796         visibility is hidden and the sidebar is force-shown. Also set the "Split sidebar" option default to true.
1797
1798         No new tests.
1799
1800         * inspector/front-end/ScriptsPanel.js:
1801         (WebInspector.ScriptsPanel):
1802         * inspector/front-end/scriptsPanel.css:
1803         (.split-view-horizontal #scripts-debug-sidebar-resizer-widget):
1804
1805 2013-02-18  Bear Travis  <betravis@adobe.com>
1806
1807         [CSS Exclusions] Support outside-shape layout for shape-inside property
1808         https://bugs.webkit.org/show_bug.cgi?id=102571
1809
1810         Reviewed by David Hyatt.
1811
1812         A shape-inside value of 'outside-shape' should resolve to the value of
1813         the shape-outside property for layout. This patch introduces a helper
1814         method to resolve shape-inside in RenderStyle, and replaces calls to
1815         RenderStyle::shapeInside() when the resolved (layout) value should be
1816         used.
1817
1818         Test: fast/exclusions/shape-inside/shape-inside-outside-shape.html
1819
1820         * rendering/ExclusionShapeInfo.cpp:
1821         (WebCore::::computedShape): Use the resolved shape-inside getter.
1822         * rendering/ExclusionShapeInsideInfo.h:
1823         (WebCore::ExclusionShapeInsideInfo::isEnabledFor): Ditto.
1824         (WebCore::ExclusionShapeInsideInfo::ExclusionShapeInsideInfo): Ditto.
1825         * rendering/RenderBlock.cpp:
1826         (WebCore::RenderBlock::styleDidChange): Ditto.
1827         (WebCore::RenderBlock::exclusionShapeInsideInfo): Ditto.
1828         * rendering/style/RenderStyle.h: Add the resolved shape inside getter.
1829
1830 2013-02-18  Pavel Feldman  <pfeldman@chromium.org>
1831
1832         Web Inspector: hide vertical-sidebar-split in dock-to-right mode behind single experimental flag.
1833         https://bugs.webkit.org/show_bug.cgi?id=110119
1834
1835         Reviewed by Vsevolod Vlasov.
1836
1837         Removed context menus, made it toggle automatically upon dock orientation change.
1838
1839         * inspector/front-end/DockController.js:
1840         (WebInspector.DockController.prototype._toggleDockState):
1841         * inspector/front-end/ElementsPanel.js:
1842         (WebInspector.ElementsPanel):
1843         (WebInspector.ElementsPanel.prototype._sidebarContextMenuEventFired):
1844         (WebInspector.ElementsPanel.prototype._dockSideChanged):
1845         (WebInspector.ElementsPanel.prototype._setVerticalSplit):
1846         * inspector/front-end/ScriptsPanel.js:
1847         (WebInspector.ScriptsPanel):
1848         (WebInspector.ScriptsPanel.prototype._appendUISourceCodeItems):
1849         (WebInspector.ScriptsPanel.prototype._dockSideChanged):
1850         * inspector/front-end/Settings.js:
1851         (WebInspector.ExperimentsSettings):
1852         * inspector/front-end/inspector.css:
1853         * inspector/front-end/scriptsPanel.css:
1854         (#scripts-sidebar-stack-pane):
1855         (div.sidebar-pane-stack#scripts-debug-sidebar-contents):
1856         * inspector/front-end/tabbedPane.css:
1857         (.tabbed-pane):
1858
1859 2013-02-18  ChangSeok Oh  <shivamidow@gmail.com>
1860
1861         [GTK] Fix nits for configuration
1862         https://bugs.webkit.org/show_bug.cgi?id=110083
1863
1864         Reviewed by Martin Robinson.
1865
1866         Remove trailing white space. It has caused annoying warning while configuration.
1867
1868         No new tests since no funtionality change.
1869
1870         * GNUmakefile.list.am:
1871
1872 2013-02-18  Kondapally Kalyan  <kalyan.kondapally@intel.com>
1873
1874         [WebGL][EFL] Refactor GraphicsContext3DPrivate to add support for SharedContext.
1875         https://bugs.webkit.org/show_bug.cgi?id=109988
1876
1877         Reviewed by Kenneth Rohde Christiansen.
1878
1879         Covered by existing WebGL tests.
1880
1881         This patch refactors PlatformContext and GraphicsContext3DPrivate to
1882         add support for Shared Context. This would help share GL resources
1883         between transport surface and offscreen surface without having to worry
1884         about the context state. So far, we used the same drawable as transport
1885         surface and offscreen surface. After this patch we use pixmap surface as
1886         offscreen surface and use shared context to render texture content to
1887         transport surface. This would also align as to how shared surface is implemented
1888         on EFL and Qt ports.
1889
1890         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
1891         (WebCore::GraphicsContext3D::GraphicsContext3D):
1892         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
1893         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
1894         (WebCore):
1895         (WebCore::GraphicsContext3DPrivate::initialize):
1896         (WebCore::GraphicsContext3DPrivate::makeSharedContextCurrent):
1897         (WebCore::GraphicsContext3DPrivate::copyToGraphicsSurface):
1898         * platform/graphics/efl/GraphicsContext3DPrivate.h:
1899         (GraphicsContext3DPrivate):
1900         * platform/graphics/opengl/GLPlatformContext.cpp:
1901         (WebCore::GLPlatformContext::initialize):
1902         * platform/graphics/opengl/GLPlatformContext.h:
1903         Needed changes to take shared context into use.
1904
1905         * platform/graphics/opengl/GLPlatformSurface.cpp:
1906         (WebCore::GLPlatformSurface::createOffScreenSurface):
1907         (WebCore::GLPlatformSurface::updateContents):
1908         * platform/graphics/opengl/GLPlatformSurface.h:
1909         (GLPlatformSurface):
1910         * platform/graphics/surfaces/glx/GLXConfigSelector.h:
1911         (WebCore::GLXConfigSelector::GLXConfigSelector):
1912         (WebCore::GLXConfigSelector::visualInfo):
1913         (WebCore::GLXConfigSelector::pixmapContextConfig):
1914         (GLXConfigSelector):
1915         (WebCore::GLXConfigSelector::reset):
1916         * platform/graphics/surfaces/glx/GLXContext.cpp:
1917         Added support to query configiration supporting
1918         pixmap surface.
1919
1920         (WebCore::GLXOffScreenContext::initialize):
1921         * platform/graphics/surfaces/glx/GLXContext.h:
1922         (GLXOffScreenContext):
1923         * platform/graphics/surfaces/glx/GLXSurface.cpp:
1924         (WebCore::GLXTransportSurface::GLXTransportSurface):
1925         (WebCore::GLXTransportSurface::swapBuffers):
1926         (WebCore::GLXOffScreenSurface::GLXOffScreenSurface):
1927         (WebCore::GLXOffScreenSurface::~GLXOffScreenSurface):
1928         (WebCore::GLXOffScreenSurface::initialize):
1929         (WebCore::GLXOffScreenSurface::configuration):
1930         (WebCore::GLXOffScreenSurface::destroy):
1931         (WebCore::GLXOffScreenSurface::freeResources):
1932         (WebCore::GLXOffScreenSurface::setGeometry):
1933         Renamed GLXPBuffer surface as GLXOffScreenSurface.
1934
1935         * platform/graphics/surfaces/glx/GLXSurface.h:
1936         (GLXTransportSurface):
1937         (GLXOffScreenSurface):
1938         * platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp:
1939         (WebCore::GraphicsSurfacePrivate::createSurface):
1940         * platform/graphics/surfaces/glx/X11Helper.cpp:
1941         (WebCore::X11Helper::createPixmap):
1942         (WebCore):
1943         (WebCore::X11Helper::destroyPixmap):
1944         (WebCore::X11Helper::createOffScreenWindow):
1945         * platform/graphics/surfaces/glx/X11Helper.h:
1946         (X11Helper):
1947         Added functions to create and destroy pixmap.
1948
1949 2013-02-18  Ilya Tikhonovsky  <loislo@chromium.org>
1950
1951         Web Inspector: Native Memory Instrumentation: Generate meta information for HeapSnapshot parser.
1952         https://bugs.webkit.org/show_bug.cgi?id=110104
1953
1954         Reviewed by Yury Semikhatsky.
1955
1956         The format of Native heap snapshot is slightly different so it should provide its own meta information.
1957
1958
1959         * inspector/HeapGraphSerializer.cpp:
1960         (WebCore::HeapGraphSerializer::HeapGraphSerializer):
1961         (WebCore::HeapGraphSerializer::finish):
1962         (WebCore::HeapGraphSerializer::reportMemoryUsage):
1963         (WebCore::HeapGraphSerializer::registerTypeString):
1964         (WebCore):
1965         * inspector/HeapGraphSerializer.h:
1966         (HeapGraphSerializer):
1967         * inspector/Inspector.json:
1968         * inspector/InspectorMemoryAgent.cpp:
1969         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
1970         (WebCore::InspectorMemoryAgent::getProcessMemoryDistributionImpl):
1971         * inspector/InspectorMemoryAgent.h:
1972         (InspectorMemoryAgent):
1973         * inspector/front-end/HeapSnapshot.js:
1974         (WebInspector.HeapSnapshot.prototype._buildPostOrderIndex):
1975         * inspector/front-end/NativeHeapSnapshot.js:
1976         (WebInspector.NativeHeapSnapshot):
1977
1978 2013-02-18  Carlos Garcia Campos  <cgarcia@igalia.com>
1979
1980         [GTK] Force single header includes in GObject DOM bindings
1981         https://bugs.webkit.org/show_bug.cgi?id=104676
1982
1983         Reviewed by Xan Lopez.
1984
1985         Only including <webkitdom/webkitdom.h> should be allowed from
1986         apps.
1987
1988         * bindings/scripts/CodeGeneratorGObject.pm:
1989         (GenerateHeader):
1990         * bindings/scripts/gobject-generate-headers.pl:
1991         * bindings/scripts/test/GObject/WebKitDOMFloat64Array.h:
1992         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.h:
1993         * bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
1994         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.h:
1995         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.h:
1996         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h:
1997         * bindings/scripts/test/GObject/WebKitDOMTestException.h:
1998         * bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
1999         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.h:
2000         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.h:
2001         * bindings/scripts/test/GObject/WebKitDOMTestNode.h:
2002         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
2003         * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.h:
2004         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
2005
2006 2013-02-16  Antti Koivisto  <antti@apple.com>
2007
2008         Reschedule shared CFRunLoopTimer instead of reconstructing it
2009         https://bugs.webkit.org/show_bug.cgi?id=109765
2010
2011         Reviewed by Andreas Kling.
2012
2013         Using CFRunLoopTimerSetNextFireDate is over 2x faster than deleting and reconstructing timers.
2014
2015         * platform/SharedTimer.h:
2016         (WebCore::SharedTimer::willEnterNestedEventLoop):
2017         (WebCore):
2018         (MainThreadSharedTimer):
2019         (WebCore::MainThreadSharedTimer::willEnterNestedEventLoop):
2020         * platform/ThreadTimers.cpp:
2021         (WebCore::ThreadTimers::fireTimersInNestedEventLoop):
2022         * platform/mac/SharedTimerMac.mm:
2023         (WebCore):
2024         (WebCore::PowerObserver::clearSharedTimer):
2025         (WebCore::ensurePowerObserver):
2026         (WebCore::sharedTimer):
2027         (WebCore::reinsertSharedTimer):
2028         
2029             Before entering nested runloop (used for inspector debugger mostly) reconstruct and reinsert the timer. For some reason
2030             the timer doesn't fire otherwise.
2031
2032         (WebCore::setSharedTimerFireInterval):
2033         (WebCore::stopSharedTimer):
2034
2035 2013-02-18  Alexander Pavlov  <apavlov@chromium.org>
2036
2037         Web Inspector: [Resources] Only remember the tree element selection if explicitly made by user
2038         https://bugs.webkit.org/show_bug.cgi?id=110105
2039
2040         Reviewed by Pavel Feldman.
2041
2042         This change instructs the Resources panel to remember the selected tree element only if it has been
2043         selected by the user (not automatically, like selecting a parent when its child is removed).
2044         All onselect() overrides pass the selectedByUser argument value
2045         to BaseStorageTreeElement.prototype.onselect.
2046         Drive-by: Use === comparisons everywhere.
2047
2048         * inspector/front-end/ResourcesPanel.js:
2049         (WebInspector.ResourcesPanel.prototype._reset): Do not detach [immutable] category views.
2050         (WebInspector.BaseStorageTreeElement.prototype.onselect): Remember itemURL on user gesture only.
2051         (WebInspector.StorageCategoryTreeElement.prototype.onselect):
2052         (WebInspector.FrameTreeElement.prototype.onselect):
2053         (WebInspector.FrameResourceTreeElement.prototype.onselect):
2054         (WebInspector.DatabaseTreeElement.prototype.onselect):
2055         (WebInspector.DatabaseTableTreeElement.prototype.onselect):
2056         (WebInspector.IDBDatabaseTreeElement.prototype.onselect):
2057         (WebInspector.IDBObjectStoreTreeElement.prototype.onselect):
2058         (WebInspector.IDBIndexTreeElement.prototype.onselect):
2059         (WebInspector.DOMStorageTreeElement):
2060         (WebInspector.DOMStorageTreeElement.prototype.onselect):
2061         (WebInspector.CookieTreeElement.prototype.onselect):
2062         (WebInspector.ApplicationCacheManifestTreeElement.prototype.onselect):
2063         (WebInspector.ApplicationCacheFrameTreeElement.prototype.onselect):
2064         (WebInspector.FileSystemTreeElement.prototype.onselect):
2065         (WebInspector.FileSystemTreeElement.prototype.clear):
2066         (WebInspector.ResourcesSearchController.prototype.nextSearchResult):
2067
2068 2013-02-18  Vladislav Kaznacheev  <kaznacheev@chromium.org>
2069
2070         Web Inspector: Color picker should not be available in Computed Styles pane
2071         https://bugs.webkit.org/show_bug.cgi?id=109697
2072
2073         Reviewed by Pavel Feldman.
2074
2075         Refactored PropertiesSection and TreeElement inheritors in StylesSidebarPane.js for cleaner separation
2076         of read-only and editable properties.
2077
2078         * inspector/front-end/StylesSidebarPane.js:
2079         (WebInspector.StylePropertiesSection.prototype.onpopulate):
2080         (WebInspector.StylePropertiesSection.prototype.addNewBlankProperty):
2081         (WebInspector.ComputedStylePropertiesSection):
2082         (WebInspector.ComputedStylePropertiesSection.prototype.onpopulate):
2083         (WebInspector.BlankStylePropertiesSection):
2084         (WebInspector.StylePropertyTreeElementBase):
2085         (WebInspector.StylePropertyTreeElementBase.prototype.node):
2086         (WebInspector.StylePropertyTreeElementBase.prototype.editablePane):
2087         (WebInspector.StylePropertyTreeElementBase.prototype.onattach):
2088         (WebInspector.StylePropertyTreeElementBase.prototype.updateTitle.linkifyURL):
2089         (WebInspector.StylePropertyTreeElementBase.prototype.updateTitle.):
2090         (WebInspector.StylePropertyTreeElementBase.prototype):
2091         (.event):
2092         (.isRevert):
2093
2094 2013-02-18  Andrey Adaikin  <aandrey@chromium.org>
2095
2096         Web Inspector: [Canvas] group replay log calls by frames
2097         https://bugs.webkit.org/show_bug.cgi?id=110101
2098
2099         Reviewed by Pavel Feldman.
2100
2101         Group canvas replay log by frames, then by draw calls.
2102
2103         * inspector/InjectedScriptCanvasModuleSource.js:
2104         (.):
2105         * inspector/Inspector.json:
2106         * inspector/front-end/CanvasProfileView.js:
2107         (WebInspector.CanvasProfileView):
2108         (WebInspector.CanvasProfileView.prototype.dispose):
2109         (WebInspector.CanvasProfileView.prototype._appendCallNode):
2110         (WebInspector.CanvasProfileView.prototype._appendDrawCallGroup):
2111
2112 2013-02-18  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2113
2114         [Soup] CookieJarSoup::deleteCookie() should stop looking for the cookie after it is removed
2115         https://bugs.webkit.org/show_bug.cgi?id=110100
2116
2117         Reviewed by Kenneth Rohde Christiansen.
2118
2119         CookieJarSoup::deleteCookie() retrieves the list of cookies that apply to a given URL, then
2120         iterates through the cookies to find the one with the right name and delete it. However, the
2121         current implementation keeps on comparing cookie names after the cookie was removed. This
2122         patch introduces a "wasDeleted" boolean to stop comparing cookie names after the cookie was
2123         deleted. Note that we cannot break as soon as the cookie is found as we need to keep iterating
2124         so that the cookies get freed by GOwnPtr.
2125
2126         No new tests, no behavior change.
2127
2128         * platform/network/soup/CookieJarSoup.cpp:
2129         (WebCore::deleteCookie):
2130
2131 2013-02-18  Vsevolod Vlasov  <vsevik@chromium.org>
2132
2133         Web Inspector: Create separate project for each domain for UISourceCode based on browser resources.
2134         https://bugs.webkit.org/show_bug.cgi?id=109691
2135
2136         Reviewed by Pavel Feldman.
2137
2138         Separate project of certain type is now created for each domain.
2139         UISourceCode path represents a path in the project now.
2140         UISourceCode uri is now calculated based on project id and path.
2141         It is also possible to calculate path based on projectId and URI, which is used for uiSourceCodeForURI() methods.
2142
2143         * inspector/front-end/FileSystemProjectDelegate.js:
2144         (WebInspector.FileSystemProjectDelegate.prototype._filePathForPath):
2145         (WebInspector.FileSystemProjectDelegate.prototype.setFileContent):
2146         (WebInspector.FileSystemProjectDelegate.prototype._populate.filesLoaded):
2147         (WebInspector.FileSystemProjectDelegate.prototype._populate):
2148         (WebInspector.FileSystemProjectDelegate.prototype._removeFile):
2149         * inspector/front-end/ScriptSnippetModel.js:
2150         (WebInspector.ScriptSnippetModel.prototype._addScriptSnippet):
2151         * inspector/front-end/SimpleWorkspaceProvider.js:
2152         (WebInspector.SimpleProjectDelegate):
2153         (WebInspector.SimpleProjectDelegate.projectId):
2154         (WebInspector.SimpleProjectDelegate.prototype.id):
2155         (WebInspector.SimpleProjectDelegate.prototype.displayName):
2156         (WebInspector.SimpleProjectDelegate.prototype.addFile):
2157         (WebInspector.SimpleWorkspaceProvider):
2158         (WebInspector.SimpleWorkspaceProvider.splitURL):
2159         (WebInspector.SimpleWorkspaceProvider._pathForSplittedURL):
2160         (WebInspector.SimpleWorkspaceProvider.uriForURL):
2161         (WebInspector.SimpleWorkspaceProvider.prototype._projectDelegate):
2162         (WebInspector.SimpleWorkspaceProvider.prototype._innerAddFileForURL):
2163         (WebInspector.SimpleWorkspaceProvider.prototype.addFileByName):
2164         (WebInspector.SimpleWorkspaceProvider.prototype._innerAddFile):
2165         (WebInspector.SimpleWorkspaceProvider.prototype.removeFileByName):
2166         (WebInspector.SimpleWorkspaceProvider.prototype.reset):
2167         * inspector/front-end/UISourceCode.js:
2168         (WebInspector.UISourceCode.uri):
2169         (WebInspector.UISourceCode.path):
2170         (WebInspector.UISourceCode.prototype.uri):
2171         * inspector/front-end/Workspace.js:
2172         (WebInspector.Project.prototype._fileAdded):
2173         (WebInspector.Project.prototype._fileRemoved):
2174         (WebInspector.Project.prototype.uiSourceCodeForURI):
2175
2176 2013-02-18  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2177
2178         [EFL] Rebaseline failure media tests after r142947
2179         https://bugs.webkit.org/show_bug.cgi?id=109904
2180
2181         Reviewed by Kenneth Rohde Christiansen.
2182
2183         * css/mediaControlsEfl.css: Align time text vertically.
2184         (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
2185
2186 2013-02-18  Vsevolod Vlasov  <vsevik@chromium.org>
2187
2188         Web Inspector: Extract FileSystemUtils from FileSystemProjectDelegate as IsolatedFileSystem class.
2189         https://bugs.webkit.org/show_bug.cgi?id=110086
2190
2191         Reviewed by Pavel Feldman.
2192
2193         Extracted IsolatedFileSystem class that could be mocked for tests now.
2194         Renamed IsolatedFileSystemModel to IsolatedFileSystemManager.
2195
2196         * WebCore.gypi:
2197         * WebCore.vcproj/WebCore.vcproj:
2198         * inspector/compile-front-end.py:
2199         * inspector/front-end/FileSystemProjectDelegate.js:
2200         (WebInspector.FileSystemProjectDelegate):
2201         (WebInspector.FileSystemProjectDelegate.prototype.id):
2202         (WebInspector.FileSystemProjectDelegate.prototype.displayName):
2203         (WebInspector.FileSystemProjectDelegate.prototype.setFileContent):
2204         (WebInspector.FileSystemProjectDelegate.prototype._populate.filesLoaded):
2205         (WebInspector.FileSystemProjectDelegate.prototype._populate):
2206         * inspector/front-end/IsolatedFileSystem.js: Added.
2207         (WebInspector.IsolatedFileSystem):
2208         (WebInspector.IsolatedFileSystem.errorMessage):
2209         (WebInspector.IsolatedFileSystem.prototype.id):
2210         (WebInspector.IsolatedFileSystem.prototype.path):
2211         (WebInspector.IsolatedFileSystem.prototype._requestFileSystem):
2212         (WebInspector.IsolatedFileSystem.prototype.fileSystemLoaded):
2213         (WebInspector.IsolatedFileSystem.prototype.innerCallback):
2214         (WebInspector.IsolatedFileSystem.prototype.requestFilesRecursive):
2215         (WebInspector.IsolatedFileSystem.prototype.fileEntryLoaded):
2216         (WebInspector.IsolatedFileSystem.prototype.fileLoaded):
2217         (WebInspector.IsolatedFileSystem.prototype.readerLoadEnd):
2218         (WebInspector.IsolatedFileSystem.prototype.errorHandler):
2219         (WebInspector.IsolatedFileSystem.prototype.requestFileContent):
2220         (WebInspector.IsolatedFileSystem.prototype.fileWriterCreated.fileTruncated):
2221         (WebInspector.IsolatedFileSystem.prototype.fileWriterCreated):
2222         (WebInspector.IsolatedFileSystem.prototype.writerEnd):
2223         (WebInspector.IsolatedFileSystem.prototype.setFileContent):
2224         (WebInspector.IsolatedFileSystem.prototype.):
2225         (WebInspector.IsolatedFileSystem.prototype.toArray):
2226         (WebInspector.IsolatedFileSystem.prototype._readDirectory):
2227         (WebInspector.IsolatedFileSystem.prototype._requestEntries):
2228         * inspector/front-end/IsolatedFileSystemManager.js: Renamed from Source/WebCore/inspector/front-end/IsolatedFileSystemModel.js.
2229         (WebInspector.IsolatedFileSystemManager):
2230         (WebInspector.IsolatedFileSystemManager.prototype.mapping):
2231         (WebInspector.IsolatedFileSystemManager.prototype.supportsFileSystems):
2232         (WebInspector.IsolatedFileSystemManager.prototype._requestFileSystems):
2233         (WebInspector.IsolatedFileSystemManager.prototype.addFileSystem):
2234         (WebInspector.IsolatedFileSystemManager.prototype.removeFileSystem):
2235         (WebInspector.IsolatedFileSystemManager.prototype._fileSystemsLoaded):
2236         (WebInspector.IsolatedFileSystemManager.prototype._innerAddFileSystem):
2237         (WebInspector.IsolatedFileSystemManager.prototype._fileSystemPaths):
2238         (WebInspector.IsolatedFileSystemManager.prototype._processPendingFileSystemRequests):
2239         (WebInspector.IsolatedFileSystemManager.prototype._fileSystemAdded):
2240         (WebInspector.IsolatedFileSystemManager.prototype._fileSystemRemoved):
2241         (WebInspector.IsolatedFileSystemManager.prototype._isolatedFileSystem):
2242         (WebInspector.IsolatedFileSystemManager.prototype.requestDOMFileSystem):
2243         (WebInspector.IsolatedFileSystemDispatcher):
2244         (WebInspector.IsolatedFileSystemDispatcher.prototype.fileSystemsLoaded):
2245         (WebInspector.IsolatedFileSystemDispatcher.prototype.fileSystemRemoved):
2246         (WebInspector.IsolatedFileSystemDispatcher.prototype.fileSystemAdded):
2247         * inspector/front-end/SettingsScreen.js:
2248         (WebInspector.WorkspaceSettingsTab.prototype._createFileSystemsEditor):
2249         (WebInspector.WorkspaceSettingsTab.prototype._addFileSystemRow.removeFileSystemClicked):
2250         (WebInspector.WorkspaceSettingsTab.prototype._addFileSystemClicked):
2251         * inspector/front-end/WebKit.qrc:
2252         * inspector/front-end/inspector.html:
2253         * inspector/front-end/inspector.js:
2254
2255 2013-02-18  Huang Dongsung  <luxtella@company100.net>
2256
2257         [EFL][WK2] compositing/layer-creation/fixed-position-out-of-view-scaled.html is flaky
2258         https://bugs.webkit.org/show_bug.cgi?id=110059
2259
2260         Reviewed by Kenneth Rohde Christiansen.
2261
2262         Remove the ASSERT check in TextureMapperLayer. This assertion seems
2263         valid because CoordinatedGraphicsScene::adjustPositionForFixedLayers() calls
2264         TextureMapperLayer::setScrollPositionDeltaIfNeeded() when the graphics
2265         layer is a fixed position layer. However, the assertion can be failed
2266         because it is possible that TextureMapperLayer is a non-fixed position
2267         layer when the graphics layer that holds the TextureMapperLayer is a
2268         fixed position layer. When CoordinatedGraphicsScene flushes,
2269         TextureMapperLayer becomes a fixed position layer.
2270
2271         No new tests. No change in behavior.
2272
2273         * platform/graphics/texmap/TextureMapperLayer.cpp:
2274         (WebCore::TextureMapperLayer::setScrollPositionDeltaIfNeeded):
2275
2276 2013-02-18  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
2277
2278         [WK2][EFL] Unified text checker implementation
2279         https://bugs.webkit.org/show_bug.cgi?id=107682
2280
2281         Reviewed by Anders Carlsson.
2282
2283         No new tests, covered by editing/spelling tests.
2284
2285         * platform/text/TextChecking.h:
2286         (WebCore):
2287         Enabling unified text checker feature for WebKit-EFL.
2288
2289 2013-02-18  Nico Weber  <thakis@chromium.org>
2290
2291         [chromium/clang] Remove -Wno-return-type-c-linkage
2292         https://bugs.webkit.org/show_bug.cgi?id=110098
2293
2294         Reviewed by Jochen Eisinger.
2295
2296         The one instance where this triggered was removed in
2297         http://trac.webkit.org/changeset/141184 . A clang that has this
2298         warning landed in chromium r182694, so it should be safe to turn
2299         the warning on now.
2300
2301         * WebCore.gyp/WebCore.gyp:
2302
2303 2013-02-18  Pavel Feldman  <pfeldman@chromium.org>
2304
2305         Web Inspector: provide basic console.table implementation (no [,columns] support)
2306         https://bugs.webkit.org/show_bug.cgi?id=109453
2307
2308         Reviewed by Vsevolod Vlasov.
2309
2310         Test: inspector/console/console-format-table.html
2311
2312         Using console preview infrastructure to support console.table.
2313
2314         * English.lproj/localizedStrings.js:
2315         * inspector/ConsoleAPITypes.h:
2316         * inspector/ConsoleMessage.cpp:
2317         (WebCore::messageTypeValue):
2318         (WebCore::ConsoleMessage::addToFrontend):
2319         * inspector/InjectedScript.cpp:
2320         (WebCore::InjectedScript::wrapObject):
2321         (WebCore):
2322         (WebCore::InjectedScript::wrapTable):
2323         * inspector/InjectedScript.h:
2324         (InjectedScript):
2325         * inspector/InjectedScriptSource.js:
2326         (.):
2327         * inspector/Inspector.json:
2328         * inspector/InspectorDOMAgent.cpp:
2329         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
2330         * inspector/front-end/ConsoleMessage.js:
2331         (WebInspector.ConsoleMessageImpl):
2332         (WebInspector.ConsoleMessageImpl.prototype.willHide):
2333         (WebInspector.ConsoleMessageImpl.prototype._format):
2334         (WebInspector.ConsoleMessageImpl.prototype._appendObjectPreview):
2335         (WebInspector.ConsoleMessageImpl.prototype._renderPropertyPreview):
2336         (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsTable):
2337         * inspector/front-end/ConsoleModel.js:
2338         * inspector/front-end/ConsoleView.js:
2339         (WebInspector.ConsoleView.prototype._appendConsoleMessage):
2340         (WebInspector.ConsoleView.prototype._consoleCleared):
2341         (WebInspector.ConsoleView.prototype._updateMessageList):
2342         (WebInspector.ConsoleCommand.prototype.wasShown):
2343         (WebInspector.ConsoleCommand.prototype.willHide):
2344         (WebInspector.ConsoleGroup.prototype.addMessage):
2345         * inspector/front-end/DataGrid.js:
2346         (.sortDataGrid.comparator):
2347         (.sortDataGrid):
2348         (WebInspector.DataGrid.createSortableDataGrid):
2349         (WebInspector.DataGrid.prototype.renderInline):
2350         * inspector/front-end/DatabaseQueryView.js:
2351         (WebInspector.DatabaseQueryView.prototype._queryFinished):
2352         * inspector/front-end/dataGrid.css:
2353         (.data-grid.inline):
2354         (.data-grid.inline td.corner):
2355         * inspector/front-end/resourcesPanel.css:
2356         (.storage-view > .data-grid):
2357         * page/Console.cpp:
2358         (WebCore::Console::table):
2359         (WebCore):
2360         * page/Console.h:
2361         (Console):
2362         * page/Console.idl:
2363
2364 2013-02-18  Vsevolod Vlasov  <vsevik@chromium.org>
2365
2366         Web Inspector: JavaScriptSourceFrame should inherit UISourceCodeFrame
2367         https://bugs.webkit.org/show_bug.cgi?id=110091
2368
2369         Reviewed by Pavel Feldman.
2370
2371         Removed duplicated code from JavaScriptSourceFrame and made it inherit UISourceCodeFrame.
2372
2373         * inspector/front-end/JavaScriptSourceFrame.js:
2374         (WebInspector.JavaScriptSourceFrame):
2375         (WebInspector.JavaScriptSourceFrame.prototype.onUISourceCodeContentChanged):
2376         (WebInspector.JavaScriptSourceFrame.prototype.populateTextAreaContextMenu):
2377         * inspector/front-end/ScriptsPanel.js:
2378         * inspector/front-end/UISourceCodeFrame.js:
2379         (WebInspector.UISourceCodeFrame.prototype.canEditSource):
2380         (WebInspector.UISourceCodeFrame.prototype.onTextChanged):
2381         (WebInspector.UISourceCodeFrame.prototype._onFormattedChanged):
2382         (WebInspector.UISourceCodeFrame.prototype.onUISourceCodeContentChanged):
2383         (WebInspector.UISourceCodeFrame.prototype._innerSetContent):
2384
2385 2013-02-18  Vsevolod Vlasov  <vsevik@chromium.org>
2386
2387         Web Inspector: Remove unused _files field in FileSystemProjectDelegate
2388         https://bugs.webkit.org/show_bug.cgi?id=110082
2389
2390         Reviewed by Pavel Feldman.
2391
2392         * inspector/front-end/FileSystemProjectDelegate.js:
2393         (WebInspector.FileSystemProjectDelegate):
2394         (WebInspector.FileSystemProjectDelegate.prototype._addFile):
2395         (WebInspector.FileSystemProjectDelegate.prototype._removeFile):
2396
2397 2013-02-18  Pavel Feldman  <pfeldman@chromium.org>
2398
2399         Web Inspector: allow 0 as a formatted parameter in console message.
2400         https://bugs.webkit.org/show_bug.cgi?id=110096
2401
2402         Reviewed by Vsevolod Vlasov.
2403
2404         * inspector/front-end/ConsoleMessage.js:
2405         (WebInspector.ConsoleMessageImpl.prototype.append):
2406         (WebInspector.ConsoleMessageImpl.prototype._formatWithSubstitutionString):
2407
2408 2013-02-18  Ilya Tikhonovsky  <loislo@chromium.org>
2409
2410         Unreviewed speculative fix for Chromium Mac.
2411
2412         * WebCore.gypi:
2413
2414 2013-02-13  Ilya Tikhonovsky  <loislo@chromium.org>
2415
2416         Web Inspector: Native Memory Instrumentation: reportLeaf method doesn't report the leaf node properly.
2417         https://bugs.webkit.org/show_bug.cgi?id=109554
2418
2419         In some cases leaves have no pointer so with the old schema we can't generate nodeId for them because we
2420         can't insert 0 into hashmap. It happens when we call addPrivateBuffer method.
2421
2422         Drive by fix: I introduced a client interface for the HeapGraphSerializer.
2423         It helps me to do the tests for the serializer.
2424
2425         Reviewed by Yury Semikhatsky.
2426
2427         It is covered by newly added tests in TestWebKitAPI.
2428
2429         * inspector/HeapGraphSerializer.cpp:
2430         (WebCore::HeapGraphSerializer::HeapGraphSerializer):
2431         (WebCore::HeapGraphSerializer::pushUpdate):
2432         (WebCore::HeapGraphSerializer::reportNode):
2433         (WebCore::HeapGraphSerializer::toNodeId):
2434         (WebCore::HeapGraphSerializer::addRootNode):
2435         * inspector/HeapGraphSerializer.h:
2436         (HeapGraphSerializer):
2437         (Client):
2438         (WebCore::HeapGraphSerializer::Client::~Client):
2439         * inspector/InspectorMemoryAgent.cpp:
2440         (WebCore):
2441         (WebCore::InspectorMemoryAgent::getProcessMemoryDistributionImpl):
2442
2443 2013-02-18  Sheriff Bot  <webkit.review.bot@gmail.com>
2444
2445         Unreviewed, rolling out r143100.
2446         http://trac.webkit.org/changeset/143100
2447         https://bugs.webkit.org/show_bug.cgi?id=110088
2448
2449         Breaks file system support in workspace. (Requested by vsevik
2450         on #webkit).
2451
2452         * inspector/front-end/ScriptSnippetModel.js:
2453         (WebInspector.ScriptSnippetModel.prototype._addScriptSnippet):
2454         * inspector/front-end/SimpleWorkspaceProvider.js:
2455         (WebInspector.SimpleProjectDelegate):
2456         (WebInspector.SimpleProjectDelegate.prototype.id):
2457         (WebInspector.SimpleProjectDelegate.prototype.displayName):
2458         (WebInspector.SimpleProjectDelegate.prototype.addFile):
2459         (WebInspector.SimpleWorkspaceProvider):
2460         (WebInspector.SimpleWorkspaceProvider.uriForURL):
2461         (WebInspector.SimpleWorkspaceProvider.prototype._innerAddFileForURL):
2462         (WebInspector.SimpleWorkspaceProvider.prototype.removeFile):
2463         (WebInspector.SimpleWorkspaceProvider.prototype.reset):
2464         * inspector/front-end/UISourceCode.js:
2465         (WebInspector.UISourceCode.prototype.uri):
2466         * inspector/front-end/Workspace.js:
2467         (WebInspector.Project.prototype._fileAdded):
2468         (WebInspector.Project.prototype._fileRemoved):
2469         (WebInspector.Project.prototype.uiSourceCodeForURI):
2470         (WebInspector.Workspace.prototype.projectForUISourceCode):
2471
2472 2013-02-15  Eugene Klyuchnikov  <eustas@chromium.org>
2473
2474         Web Inspector: Introduce ProfilesPanelDescriptor.
2475         https://bugs.webkit.org/show_bug.cgi?id=109906
2476
2477         Reviewed by Pavel Feldman.
2478
2479         Some constants/methods should be accesible before ProfilesPanel
2480         is instantiated.
2481
2482         Extracted methods to check if profile is "user-initiated" and what is
2483         its index.
2484
2485         Also profile URL regexp moved to ProfilesPanelDescriptor.
2486
2487         * inspector/front-end/ProfilesPanelDescriptor.js: Added.
2488         * WebCore.gypi: Added ProfilesPanelDescriptor.js
2489         * WebCore.vcproj/WebCore.vcproj: Ditto.
2490         * inspector/compile-front-end.py: Ditto.
2491         * inspector/front-end/WebKit.qrc: Ditto.
2492         * inspector/front-end/inspector.html: Ditto.
2493         * inspector/front-end/HeapSnapshotView.js: Adopted changes.
2494         * inspector/front-end/ProfilesPanel.js: Ditto.
2495         * inspector/front-end/externs.js: Ditto.
2496         * inspector/front-end/inspector.js: Ditto.
2497
2498 2013-02-17  Dimitri Glazkov  <dglazkov@chromium.org>
2499
2500         Stop passing around SelectorChecker in SelectorQuery, now that it's stack-allocated.
2501         https://bugs.webkit.org/show_bug.cgi?id=110038
2502
2503         Reviewed by Andreas Kling.
2504
2505         No functional changes, covered by existing tests.
2506
2507         * dom/SelectorQuery.cpp:
2508         (WebCore::SelectorDataList::matches): Moved instantiation of SelectorChecker in here.
2509         (WebCore::SelectorDataList::queryAll): Got rid of unneeded SelectorChecker arg.
2510         (WebCore::SelectorDataList::queryFirst): Ditto.
2511         (WebCore::SelectorDataList::execute): Moved instantiation of SelectorChecker in here.
2512         (WebCore::SelectorQuery::matches): Removed instantiation of SelectorChecker here.
2513         (WebCore::SelectorQuery::queryAll): Ditto.
2514         (WebCore::SelectorQuery::queryFirst): Ditto.
2515         * dom/SelectorQuery.h:
2516         (WebCore): Tweaked headers to make SelectorChecker just an implementation detail.
2517         (SelectorDataList): Tweaked decls to remove SelectorChecker args.
2518
2519 2013-02-17  Dimitri Glazkov  <dglazkov@chromium.org>
2520
2521         Stop passing around SelectorChecker in ContentSelectorQuery.
2522         https://bugs.webkit.org/show_bug.cgi?id=110041
2523
2524         Now that SelectorChecker has no interesting state, we can simplify ContentSelectorQuery and get rid of a class.
2525
2526         Reviewed by Andreas Kling.
2527
2528         No functional changes, covered by existing tests.
2529
2530         * html/shadow/ContentSelectorQuery.cpp:
2531         (WebCore::ContentSelectorDataList::checkContentSelector): Zapped ContentSelectorChecker and moved its only remaining method here.
2532         (WebCore::ContentSelectorDataList::matches): Removed SelectorChecker argument.
2533         (WebCore::ContentSelectorQuery::ContentSelectorQuery): Removed an unnecessary member.
2534         (WebCore::ContentSelectorQuery::matches): Removed unnecessary argument.
2535         * html/shadow/ContentSelectorQuery.h:
2536         (WebCore): Cleaned up the file.
2537         (ContentSelectorDataList): Updated decls.
2538         (ContentSelectorQuery): Ditto.
2539
2540 2013-02-17  Mike West  <mkwst@chromium.org>
2541
2542         WheelEvent should not target text nodes.
2543         https://bugs.webkit.org/show_bug.cgi?id=109939
2544
2545         Reviewed by Darin Adler.
2546
2547         WheelEvent, like other mouse events, should not target text nodes.
2548         EventHandler correctly handles other mouse events by retargeting
2549         events to text nodes' parents; this patch adds that logic to the
2550         WheelEvent handler.
2551
2552         This should allow jQuery to stop working around WebKit's behavior[1].
2553
2554         [1]: https://github.com/jquery/jquery/commit/c61150427fc8ccc8e884df8f221a6c9bb5477929
2555
2556         Test: fast/events/wheelevent-in-text-node.html
2557
2558         * page/EventHandler.cpp:
2559         (WebCore::EventHandler::handleWheelEvent):
2560             If a WheelEvent's hit test lands on a text node, retarget the
2561             event to the text node's parent. Do this before latching the node.
2562
2563 2013-02-17  Filip Pizlo  <fpizlo@apple.com>
2564
2565         Move all Structure out-of-line inline methods to StructureInlines.h
2566         https://bugs.webkit.org/show_bug.cgi?id=110024
2567
2568         Rubber stamped by Sam Weinig.
2569
2570         No new tests because no new behavior. Just rewiring includes.
2571
2572         * ForwardingHeaders/parser/SourceProviderCache.h: Added.
2573         * loader/cache/CachedScript.cpp:
2574
2575 2013-02-17  Hayato Ito  <hayato@chromium.org>
2576
2577         Make EventDispatcher take an Event object in its constructor.
2578         https://bugs.webkit.org/show_bug.cgi?id=109898
2579
2580         Reviewed by Dimitri Glazkov.
2581
2582         That makes EventDispatcher more RAII-like so that we can calculate
2583         an EventPath in its constructor.  I'll remove
2584         EventDispatcher::ensureEventPath() in a following patch.
2585
2586         No tests. No change in behavior.
2587
2588         * dom/EventDispatchMediator.cpp:
2589         (WebCore::EventDispatchMediator::dispatchEvent):
2590         * dom/EventDispatcher.cpp:
2591         (WebCore::EventDispatcher::dispatchEvent):
2592         (WebCore::EventDispatcher::EventDispatcher):
2593         (WebCore::EventDispatcher::ensureEventPath):
2594         (WebCore::EventDispatcher::dispatchSimulatedClick):
2595         (WebCore::EventDispatcher::dispatch):
2596         (WebCore::EventDispatcher::dispatchEventPreProcess):
2597         (WebCore::EventDispatcher::dispatchEventAtCapturing):
2598         (WebCore::EventDispatcher::dispatchEventAtTarget):
2599         (WebCore::EventDispatcher::dispatchEventAtBubbling):
2600         (WebCore::EventDispatcher::dispatchEventPostProcess):
2601         * dom/EventDispatcher.h:
2602         (EventDispatcher):
2603         (WebCore::EventDispatcher::node):
2604         (WebCore::EventDispatcher::event):
2605         * dom/FocusEvent.cpp:
2606         (WebCore::FocusEventDispatchMediator::dispatchEvent):
2607         (WebCore::BlurEventDispatchMediator::dispatchEvent):
2608         (WebCore::FocusInEventDispatchMediator::dispatchEvent):
2609         (WebCore::FocusOutEventDispatchMediator::dispatchEvent):
2610         * dom/GestureEvent.cpp:
2611         (WebCore::GestureEventDispatchMediator::dispatchEvent):
2612         * dom/MouseEvent.cpp:
2613         (WebCore::MouseEventDispatchMediator::dispatchEvent):
2614
2615 2013-02-17  Philip Rogers  <pdr@google.com>
2616
2617         Fix non-root SVG viewport under zoom
2618         https://bugs.webkit.org/show_bug.cgi?id=99453
2619
2620         Reviewed by Dirk Schulze.
2621
2622         The root SVG element handles zoom differently than other SVG nodes because it needs
2623         to translate between CSS (where zoom is applied to all units) and SVG (where zoom is only
2624         applied at the top level). A good description of this difference can be found here:
2625         http://trac.webkit.org/browser/trunk/Source/WebCore/css/StyleResolver.cpp?rev=142855#L2598
2626
2627         SVG elements can appear as children in the SVG tree as well, and in this mode
2628         SVGSVGElement should not consider the current zoom level. This patch fixes a bug
2629         where non-root viewport calculations were removing zoom.
2630
2631         Test: svg/custom/symbol-zoom.html
2632
2633         * svg/SVGSVGElement.cpp:
2634         (WebCore::SVGSVGElement::currentViewportSize):
2635             This change removes the unnecessary zoom calculation for non-root nodes. This is similar
2636             to how zoom is handled elsewhere, e.g., SVGSVGElement::localCoordinateSpaceTransform.
2637
2638 2013-02-17  Chris Fleizach  <cfleizach@apple.com>
2639
2640         AX: Upstream iOS Accessibility files
2641         https://bugs.webkit.org/show_bug.cgi?id=110071
2642
2643         Reviewed by David Kilzer.
2644
2645         Upstream the iOS Accessibility files for WebCore. 
2646
2647         * WebCore.xcodeproj/project.pbxproj:
2648         * accessibility/ios: Added.
2649         * accessibility/ios/AXObjectCacheIOS.mm: Added.
2650         (WebCore):
2651         (WebCore::AXObjectCache::detachWrapper):
2652         (WebCore::AXObjectCache::attachWrapper):
2653         (WebCore::AXObjectCache::postPlatformNotification):
2654         (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
2655         (WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
2656         (WebCore::AXObjectCache::handleFocusedUIElementChanged):
2657         (WebCore::AXObjectCache::handleScrolledToAnchor):
2658         * accessibility/ios/AccessibilityObjectIOS.mm: Added.
2659         (-[WAKView accessibilityIsIgnored]):
2660         (WebCore):
2661         (WebCore::AccessibilityObject::detachFromParent):
2662         (WebCore::AccessibilityObject::overrideAttachmentParent):
2663         (WebCore::AccessibilityObject::accessibilityPasswordFieldLength):
2664         (WebCore::AccessibilityObject::accessibilityIgnoreAttachment):
2665         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
2666         * accessibility/ios/AccessibilityObjectWrapperIOS.h: Added.
2667         (WAKView):
2668         * accessibility/ios/AccessibilityObjectWrapperIOS.mm: Added.
2669         (AccessibilityUnignoredAncestor):
2670         (-[WebAccessibilityTextMarker initWithTextMarker:cache:]):
2671         (-[WebAccessibilityTextMarker initWithData:cache:]):
2672         (-[WebAccessibilityTextMarker initWithData:accessibilityObject:]):
2673         (+[WebAccessibilityTextMarker textMarkerWithVisiblePosition:cache:]):
2674         (-[WebAccessibilityTextMarker dataRepresentation]):
2675         (-[WebAccessibilityTextMarker visiblePosition]):
2676         (-[WebAccessibilityTextMarker description]):
2677         (-[WebAccessibilityObjectWrapper initWithAccessibilityObject:]):
2678         (-[WebAccessibilityObjectWrapper detach]):
2679         (-[WebAccessibilityObjectWrapper dealloc]):
2680         (-[WebAccessibilityObjectWrapper _prepareAccessibilityCall]):
2681         (-[WebAccessibilityObjectWrapper accessibilityObject]):
2682         (-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
2683         (-[WebAccessibilityObjectWrapper accessibilityPostProcessHitTest:]):
2684         (-[WebAccessibilityObjectWrapper accessibilityHitTest:]):
2685         (-[WebAccessibilityObjectWrapper accessibilityElementCount]):
2686         (-[WebAccessibilityObjectWrapper accessibilityElementAtIndex:]):
2687         (-[WebAccessibilityObjectWrapper indexOfAccessibilityElement:]):
2688         (-[WebAccessibilityObjectWrapper accessibilityLanguage]):
2689         (-[WebAccessibilityObjectWrapper _accessibilityIsLandmarkRole:]):
2690         (-[WebAccessibilityObjectWrapper _accessibilityListAncestor]):
2691         (-[WebAccessibilityObjectWrapper _accessibilityLandmarkAncestor]):
2692         (-[WebAccessibilityObjectWrapper _accessibilityTableAncestor]):
2693         (-[WebAccessibilityObjectWrapper _accessibilityTraitsFromAncestors]):
2694         (-[WebAccessibilityObjectWrapper accessibilityTraits]):
2695         (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
2696         (-[WebAccessibilityObjectWrapper isAccessibilityElement]):
2697         (-[WebAccessibilityObjectWrapper stringValueShouldBeUsedInLabel]):
2698         (-[WebAccessibilityObjectWrapper accessibilityLabel]):
2699         (-[WebAccessibilityObjectWrapper tableCellParent]):
2700         (-[WebAccessibilityObjectWrapper tableParent]):
2701         (-[WebAccessibilityObjectWrapper accessibilityTitleElement]):
2702         (-[WebAccessibilityObjectWrapper accessibilityHeaderElements]):
2703         (-[WebAccessibilityObjectWrapper accessibilityElementForRow:andColumn:]):
2704         (-[WebAccessibilityObjectWrapper accessibilityRowRange]):
2705         (-[WebAccessibilityObjectWrapper accessibilityColumnRange]):
2706         (-[WebAccessibilityObjectWrapper accessibilityPlaceholderValue]):
2707         (-[WebAccessibilityObjectWrapper accessibilityValue]):
2708         (-[WebAccessibilityObjectWrapper accessibilityIsComboBox]):
2709         (-[WebAccessibilityObjectWrapper accessibilityHint]):
2710         (-[WebAccessibilityObjectWrapper accessibilityURL]):
2711         (-[WebAccessibilityObjectWrapper _convertIntRectToScreenCoordinates:]):
2712         (-[WebAccessibilityObjectWrapper accessibilityElementRect]):
2713         (-[WebAccessibilityObjectWrapper accessibilityActivationPoint]):
2714         (-[WebAccessibilityObjectWrapper accessibilityFrame]):
2715         (-[WebAccessibilityObjectWrapper containsUnnaturallySegmentedChildren]):
2716         (-[WebAccessibilityObjectWrapper accessibilityContainer]):
2717         (-[WebAccessibilityObjectWrapper accessibilityFocusedUIElement]):
2718         (-[WebAccessibilityObjectWrapper _accessibilityWebDocumentView]):
2719         (-[WebAccessibilityObjectWrapper _accessibilityNextElementsWithCount:]):
2720         (-[WebAccessibilityObjectWrapper _accessibilityPreviousElementsWithCount:]):
2721         (-[WebAccessibilityObjectWrapper accessibilityRequired]):
2722         (-[WebAccessibilityObjectWrapper accessibilityFlowToElements]):
2723         (-[WebAccessibilityObjectWrapper accessibilityLinkedElement]):
2724         (-[WebAccessibilityObjectWrapper isAttachment]):
2725         (-[WebAccessibilityObjectWrapper _accessibilityActivate]):
2726         (-[WebAccessibilityObjectWrapper attachmentView]):
2727         (rendererForView):
2728         (-[WebAccessibilityObjectWrapper _accessibilityParentForSubview:]):
2729         (-[WebAccessibilityObjectWrapper postFocusChangeNotification]):
2730         (-[WebAccessibilityObjectWrapper postSelectedTextChangeNotification]):
2731         (-[WebAccessibilityObjectWrapper postLayoutChangeNotification]):
2732         (-[WebAccessibilityObjectWrapper postLiveRegionChangeNotification]):
2733         (-[WebAccessibilityObjectWrapper postLoadCompleteNotification]):
2734         (-[WebAccessibilityObjectWrapper postChildrenChangedNotification]):
2735         (-[WebAccessibilityObjectWrapper postInvalidStatusChangedNotification]):
2736         (-[WebAccessibilityObjectWrapper accessibilityElementDidBecomeFocused]):
2737         (-[WebAccessibilityObjectWrapper accessibilityModifySelection:increase:]):
2738         (-[WebAccessibilityObjectWrapper accessibilityIncreaseSelection:]):
2739         (-[WebAccessibilityObjectWrapper accessibilityDecreaseSelection:]):
2740         (-[WebAccessibilityObjectWrapper accessibilityMoveSelectionToMarker:]):
2741         (-[WebAccessibilityObjectWrapper accessibilityIncrement]):
2742         (-[WebAccessibilityObjectWrapper accessibilityDecrement]):
2743         (-[WebAccessibilityObjectWrapper _addAccessibilityObject:toTextMarkerArray:]):
2744         (-[WebAccessibilityObjectWrapper stringForTextMarkers:]):
2745         (blockquoteLevel):
2746         (AXAttributeStringSetBlockquoteLevel):
2747         (AXAttributeStringSetHeadingLevel):
2748         (AXAttributeStringSetFont):
2749         (AXAttributeStringSetNumber):
2750         (AXAttributeStringSetStyle):
2751         (AXAttributedStringAppendText):
2752         (-[WebAccessibilityObjectWrapper arrayOfTextForTextMarkers:attributed:]):
2753         (-[WebAccessibilityObjectWrapper _convertToNSRange:]):
2754         (-[WebAccessibilityObjectWrapper _convertToDOMRange:]):
2755         (-[WebAccessibilityObjectWrapper positionForTextMarker:]):
2756         (-[WebAccessibilityObjectWrapper textMarkerRange]):
2757         (-[WebAccessibilityObjectWrapper elementTextRange]):
2758         (-[WebAccessibilityObjectWrapper accessibilityObjectForTextMarker:]):
2759         (-[WebAccessibilityObjectWrapper textMarkerRangeForSelection]):
2760         (-[WebAccessibilityObjectWrapper textMarkerForPosition:]):
2761         (-[WebAccessibilityObjectWrapper _stringForRange:attributed:]):
2762         (-[WebAccessibilityObjectWrapper stringForRange:]):
2763         (-[WebAccessibilityObjectWrapper attributedStringForRange:]):
2764         (-[WebAccessibilityObjectWrapper elementsForRange:]):
2765         (-[WebAccessibilityObjectWrapper selectionRangeString]):
2766         (-[WebAccessibilityObjectWrapper selectedTextMarker]):
2767         (-[WebAccessibilityObjectWrapper lineEndMarkerForMarker:]):
2768         (-[WebAccessibilityObjectWrapper lineStartMarkerForMarker:]):
2769         (-[WebAccessibilityObjectWrapper nextMarkerForMarker:]):
2770         (-[WebAccessibilityObjectWrapper previousMarkerForMarker:]):
2771         (-[WebAccessibilityObjectWrapper frameForTextMarkers:]):
2772         (-[WebAccessibilityObjectWrapper textMarkerForPoint:]):
2773         (-[WebAccessibilityObjectWrapper accessibilityIdentifier]):
2774         (-[WebAccessibilityObjectWrapper accessibilitySpeechHint]):
2775         (-[WebAccessibilityObjectWrapper accessibilityARIAIsBusy]):
2776         (-[WebAccessibilityObjectWrapper accessibilityARIALiveRegionStatus]):
2777         (-[WebAccessibilityObjectWrapper accessibilityARIARelevantStatus]):
2778         (-[WebAccessibilityObjectWrapper accessibilityARIALiveRegionIsAtomic]):
2779         (-[WebAccessibilityObjectWrapper accessibilityInvalidStatus]):
2780         (-[WebAccessibilityObjectWrapper accessibilityMathRootIndexObject]):
2781         (-[WebAccessibilityObjectWrapper accessibilityMathRadicandObject]):
2782         (-[WebAccessibilityObjectWrapper accessibilityMathNumeratorObject]):
2783         (-[WebAccessibilityObjectWrapper accessibilityMathDenominatorObject]):
2784         (-[WebAccessibilityObjectWrapper accessibilityMathBaseObject]):
2785         (-[WebAccessibilityObjectWrapper accessibilityMathSubscriptObject]):
2786         (-[WebAccessibilityObjectWrapper accessibilityMathSuperscriptObject]):
2787         (-[WebAccessibilityObjectWrapper accessibilityMathUnderObject]):
2788         (-[WebAccessibilityObjectWrapper accessibilityMathOverObject]):
2789         (-[WebAccessibilityObjectWrapper accessibilityMathFencedOpenString]):
2790         (-[WebAccessibilityObjectWrapper accessibilityMathFencedCloseString]):
2791         (-[WebAccessibilityObjectWrapper accessibilityIsMathTopObject]):
2792         (-[WebAccessibilityObjectWrapper accessibilityMathType]):
2793         (-[WebAccessibilityObjectWrapper accessibilitySetPostedNotificationCallback:withContext:]):
2794         (-[WebAccessibilityObjectWrapper accessibilityPostedNotification:WebCore::AXObjectCache::]):
2795         (-[WebAccessibilityObjectWrapper description]):
2796
2797 2013-02-17  Chris Fleizach  <cfleizach@apple.com>
2798
2799         AX: rename WebAccessibilityObjectWrapper to WebAccessibilityObjectWrapperBase
2800         https://bugs.webkit.org/show_bug.cgi?id=110061
2801
2802         Reviewed by David Kilzer.
2803
2804         Rename the base accessibility wrapper class so that the iOS class can share the same name.
2805
2806         * WebCore.xcodeproj/project.pbxproj:
2807         * accessibility/mac/AXObjectCacheMac.mm:
2808         (WebCore::AXObjectCache::attachWrapper):
2809         * accessibility/mac/WebAccessibilityObjectWrapper.h: Replaced with Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.h.
2810         * accessibility/mac/WebAccessibilityObjectWrapper.mm: Replaced with Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm.
2811         * accessibility/mac/WebAccessibilityObjectWrapperBase.h: Copied from Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapper.h.
2812         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm: Copied from Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapper.mm.
2813         * accessibility/mac/WebAccessibilityObjectWrapperMac.h: Removed.
2814         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: Removed.
2815
2816 2013-02-17  Andreas Kling  <akling@apple.com>
2817
2818         REGRESSION(r143125): ~5% performance hit on Chromium's intl2 page cycler.
2819         <http://webkit.org/b/108835>
2820
2821         Reviewed by Ojan Vafai.
2822
2823         Streamline the case where GlyphPage has a per-glyph SimpleFontData* lookup table to allow
2824         taking earlier branches on pages with lots of mixed-font text.
2825         We accomplish this by explicitly storing a null SimpleFontData* for glyph #0 in the per-glyph
2826         lookup table instead of relying on "if (!glyph)" checks in getters.
2827
2828         This is a speculative optimization, I can't get stable enough numbers locally to tell if this
2829         will resolve the issue on the bots.
2830
2831         * platform/graphics/GlyphPage.h:
2832         (WebCore::GlyphPage::glyphDataForIndex):
2833         (WebCore::GlyphPage::fontDataForCharacter):
2834         (WebCore::GlyphPage::setGlyphDataForIndex):
2835
2836 2013-02-17  Chris Fleizach  <cfleizach@apple.com>
2837
2838         WebSpeech: plumb through a method to generate fake speech jobs for testing
2839         https://bugs.webkit.org/show_bug.cgi?id=107351
2840
2841         Reviewed by Adam Barth.
2842
2843         We can't reliably use the platforms synthesizer to test speech synthesis internals.
2844         This patch adds an Internals method to enable a mock synthesizer, which is inherits
2845         from the PlatformSpeechSythesizer.
2846
2847         The fake synthesizer goes through all the motions of a real synthesizer but doesn't do anything.
2848         A bunch of changes were needed here to make PlatformSpeechSynthesizer subclassable so that the
2849         right virtual are used.
2850
2851         The Mock synthesizer only lives in WebCoreTestSupport. Because PlatformSpeechSynthesizer uses
2852         a RetainPtr, I needed to make WebCoreTestSupport link CoreFoundation
2853
2854 2013-02-17  Csaba Osztrogon√°c  <ossy@webkit.org>
2855
2856         [Qt] Unreviewed buildfix for !USE(LIBXML) builds after r143112.
2857
2858         * xml/parser/XMLDocumentParserQt.cpp:
2859         (WebCore::XMLDocumentParser::XMLDocumentParser):
2860
2861 2013-02-17  Andreas Kling  <akling@apple.com>
2862
2863         Optimize GlyphPage for case where all glyphs are available in the same font.
2864         <http://webkit.org/b/108835>
2865         <rdar://problem/13157042>
2866
2867         Reviewed by Antti Koivisto.
2868
2869         Let GlyphPage begin optimistically assuming that all its glyphs will be represented in
2870         the same SimpleFontData*. In this (very common) case, only keep a single SimpleFontData*.
2871
2872         If glyphs from multiple fonts are mixed in one page, an array of per-glyph SimpleFontData*
2873         is allocated transparently.
2874
2875         This was landed before with some bogus branch prediction hints and didn't fare well on
2876         page cyclers (intl2 specifically.) These have been removed this time around, and will
2877         hopefully be regression-free.
2878
2879         4.98 MB progression on Membuster3.
2880
2881         * platform/graphics/GlyphPageTreeNode.cpp:
2882         (WebCore::GlyphPageTreeNode::initializePage):
2883         * platform/graphics/GlyphPage.h:
2884         (WebCore::GlyphPage::createUninitialized):
2885         (WebCore::GlyphPage::createZeroedSystemFallbackPage):
2886         (WebCore::GlyphPage::createCopiedSystemFallbackPage):
2887
2888             There are now three ways of constructing a GlyphPage, two of them are only used for
2889             creating system fallback pages.
2890
2891         (WebCore::GlyphPage::setGlyphDataForIndex):
2892
2893             Hold off creating a SimpleFontData* array until we're sure there are two different
2894             SimpleFontData* backing the glyphs in this page.
2895             We don't store font data for glyph #0, instead we let the getters always return null for it.
2896
2897         (WebCore::GlyphPage::~GlyphPage):
2898
2899             Free the SimpleFontData* array if needed.
2900
2901         (WebCore::GlyphPage::glyphDataForCharacter):
2902         (WebCore::GlyphPage::glyphDataForIndex):
2903         (WebCore::GlyphPage::fontDataForCharacter):
2904
2905             The font data for glyph #0 is always a null pointer now.
2906
2907         (WebCore::GlyphPage::clearForFontData):
2908
2909             Updated for new storage format.
2910
2911         * rendering/svg/SVGTextRunRenderingContext.cpp:
2912         (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
2913
2914             Fix bug where non-zero glyph was temporarily associated with null font data,
2915             which triggered the new assertion in setGlyphDataForIndex().
2916
2917 2013-02-16  Andreas Kling  <akling@apple.com>
2918
2919         Remove multi-threading gunk from WebKit2's PluginInfoStore.
2920         <http://webkit.org/b/110046>
2921
2922         Reviewed by Alexey Proskuryakov.
2923
2924         Remove now-unused code for making deep (isolated) copies of WebCore plugin structures.
2925
2926         * plugins/PluginData.h:
2927         (MimeClassInfo):
2928         (PluginInfo):
2929
2930 2013-02-16  Alexey Proskuryakov  <ap@apple.com>
2931
2932         Identifier generated twice in FrameLoader::loadResourceSynchronously()
2933         https://bugs.webkit.org/show_bug.cgi?id=110022
2934
2935         Reviewed by Darin Adler.
2936
2937         * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadResourceSynchronously):
2938         Fix an apparent refactoring mistake.
2939
2940 2013-02-16  Andreas Kling  <akling@apple.com>
2941
2942         [JSC] Remove custom mark function for NamedNodeMap.
2943         <http://webkit.org/b/110029>
2944
2945         Reviewed by Darin Adler.
2946
2947         NamedNodeMap refs and unrefs its Element owner, so there's no need for the wrapper to keep the Element alive.
2948
2949         Covered by fast/dom/Attr/access-after-element-destruction.html
2950
2951         * bindings/js/JSNamedNodeMapCustom.cpp:
2952         * dom/NamedNodeMap.idl:
2953
2954 2013-02-16  Peter Nelson  <peter@peterdn.com>
2955
2956         REGRESSION(r143076): Crash when calling removeNamedItem or removeNamedItemNS with a non-existent attribute of newly created element.
2957         <http://webkit.org/b/110019>
2958
2959         Reviewed by Andreas Kling.
2960
2961         Now checks Element::hasAttributes() before calling Element::getAttributeItemIndex().
2962
2963         Test: http/tests/misc/acid3.html
2964
2965         * dom/NamedNodeMap.cpp:
2966         (WebCore::NamedNodeMap::removeNamedItem):
2967         (WebCore::NamedNodeMap::removeNamedItemNS):
2968
2969 2013-02-16  Andreas Kling  <akling@apple.com>
2970
2971         Element: Devirtualize attribute synchronization functions.
2972         <http://webkit.org/b/110033>
2973
2974         Reviewed by Darin Adler.
2975
2976         Devirtualize the functions that perform re-serialization of lazy attributes and give
2977         them "synchronize"-style names:
2978
2979             - SVGElement::synchronizeAnimatedSVGAttribute()
2980             - StyledElement::synchronizeStyleAttributeInternal()
2981
2982         * dom/Element.cpp:
2983         (WebCore::Element::synchronizeAllAttributes):
2984         (WebCore::Element::synchronizeAttribute):
2985         * dom/Element.h:
2986         * dom/StyledElement.cpp:
2987         (WebCore::StyledElement::synchronizeStyleAttribute):
2988         * dom/StyledElement.h:
2989         (StyledElement):
2990         * rendering/svg/RenderSVGResourceGradient.cpp:
2991         (WebCore::RenderSVGResourceGradient::applyResource):
2992         * rendering/svg/RenderSVGResourcePattern.cpp:
2993         (WebCore::RenderSVGResourcePattern::buildPattern):
2994         * svg/SVGElement.cpp:
2995         (WebCore::SVGElement::synchronizeAnimatedSVGAttribute):
2996         * svg/SVGElement.h:
2997         (SVGElement):
2998
2999 2013-02-16  Andreas Kling  <akling@apple.com>
3000
3001         Element: Avoid unrelated attribute synchronization on other attribute access.
3002         <http://webkit.org/b/110025>
3003
3004         Reviewed by Darin Adler.
3005
3006         We've been extremely trigger happy with re-serializing the style attribute (and SVG animatables)
3007         whenever any Element attribute API was used. This patch narrows this down to (almost always)
3008         only synchronizing an attribute when someone specifically wants to read/update it.
3009
3010         Also removed two more confusing ElementData accessors:
3011
3012             - Element::elementDataWithSynchronizedAttributes()
3013             - Element::ensureElementDataWithSynchronizedAttributes()
3014
3015         * dom/Element.h:
3016         * dom/Element.cpp:
3017         (WebCore::Element::hasAttributes):
3018         (WebCore::Element::hasEquivalentAttributes):
3019         (WebCore::Element::cloneAttributesFromElement):
3020         (WebCore::Element::synchronizeAllAttributes):
3021
3022             Renamed updateInvalidAttributes() to synchronizeAllAttributes().
3023             This function should only be used when we need every single attribute to be up-to-date.
3024
3025         (WebCore::Element::synchronizeAttribute):
3026
3027             Broke out logic for synchronizing a specific attribute, given either a full QualifiedName
3028             or a localName.
3029
3030         (WebCore::Element::setSynchronizedLazyAttribute):
3031
3032             Don't call ensureUniqueElementData() indisciminately here. This avoids converting the attribute
3033             storage when re-serializing the inline style yields the same CSS text that was already in the
3034             style attribute.
3035
3036         (WebCore::Element::hasAttribute):
3037         (WebCore::Element::hasAttributeNS):
3038         (WebCore::Element::getAttribute):
3039         (WebCore::Element::getAttributeNode):
3040         (WebCore::Element::getAttributeNodeNS):
3041         (WebCore::Element::setAttribute):
3042         (WebCore::Element::setAttributeNode):
3043         (WebCore::Element::removeAttributeNode):
3044
3045             Only synchronize the attribute in question.
3046
3047         * dom/Node.cpp:
3048         (WebCore::Node::compareDocumentPosition):
3049
3050             Call synchronizeAllAttributes() when comparing two Attr nodes on the same Element instead
3051             of relying on the side-effects of another function doing this.
3052
3053 2013-02-16  Seokju Kwon  <seokju.kwon@gmail.com>
3054
3055         Fix build warnings after r139853
3056         https://bugs.webkit.org/show_bug.cgi?id=109929
3057
3058         Reviewed by Alexey Proskuryakov.
3059
3060         Use UNUSED_PARAM macro to fix build warning -Wunused-parameter
3061         when INSPECTOR is disabled.
3062
3063         No new tests, no behavior change.
3064
3065         * inspector/InspectorInstrumentation.h:
3066         (WebCore::InspectorInstrumentation::frameStartedLoading):
3067         (WebCore::InspectorInstrumentation::frameStoppedLoading):
3068         (WebCore::InspectorInstrumentation::frameScheduledNavigation):
3069         (WebCore::InspectorInstrumentation::frameClearedScheduledNavigation):
3070
3071 2013-02-16  Sheriff Bot  <webkit.review.bot@gmail.com>
3072
3073         Unreviewed, rolling out r142734.
3074         http://trac.webkit.org/changeset/142734
3075         https://bugs.webkit.org/show_bug.cgi?id=110018
3076
3077         "Triggered crashes on lots of websites" (Requested by ggaren
3078         on #webkit).
3079
3080         * bindings/js/JSLocationCustom.cpp:
3081         (WebCore::JSLocation::getOwnPropertySlotDelegate):
3082
3083 2013-02-16  Robert Hogan  <robert@webkit.org>
3084
3085         percentage top value of position:relative element not calculated using parent's min-height unless height set
3086         https://bugs.webkit.org/show_bug.cgi?id=14762
3087
3088         Reviewed by Julien Chaffraix.
3089
3090         Percentage height "is calculated with respect to the height of the generated box's containing block" says  
3091         http://www.w3.org/TR/CSS21/visudet.html#the-height-property and "If the height of the containing block is not 
3092         specified explicitly (i.e., it depends on content height), and this element is not absolutely positioned, the
3093         value computes to 'auto'." So when calculating the used height of a replaced element do not crawl through ancestor 
3094         blocks except when traversing anonymous blocks. Ensure that anonymous table cells are not skipped through though.
3095
3096         http://www.w3.org/TR/CSS21/tables.html#height-layout adds "In CSS 2.1, the height of a cell box is the minimum 
3097         height required by the content." This height is decided by allowing table cells to report their height as auto.
3098         It's not clear why http://trac.webkit.org/changeset/91242 decided it should no longer do this - doing so caused
3099         us to regress in our rendering of computed-image-width-with-percent-height-inside-table-cell-and-fixed-ancestor.html.
3100
3101         Tests: fast/block/percent-top-parent-respects-min-height.html
3102                fast/replaced/computed-image-width-with-percent-height-and-fixed-ancestor-vertical-lr.html
3103                fast/replaced/computed-image-width-with-percent-height-and-fixed-ancestor.html
3104                fast/replaced/computed-image-width-with-percent-height-inside-table-cell-and-fixed-ancestor-vertical-lr.html
3105                fast/replaced/computed-image-width-with-percent-height-inside-table-cell-and-fixed-ancestor.html
3106
3107         * rendering/RenderBoxModelObject.cpp:
3108         (WebCore::RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight):
3109         (WebCore):
3110         (WebCore::RenderBoxModelObject::relativePositionOffset):
3111         * rendering/RenderBoxModelObject.h:
3112         (RenderBoxModelObject):
3113         * rendering/RenderReplaced.cpp:
3114         (WebCore::RenderReplaced::hasReplacedLogicalHeight):
3115
3116 2013-02-16  Stephen White  <senorblanco@chromium.org>
3117
3118         [skia] FEOffset should have a Skia implementation.
3119         https://bugs.webkit.org/show_bug.cgi?id=109831
3120
3121         Reviewed by James Robinson.
3122
3123         Covered by css3/filters/effect-reference.html and -hw.html.
3124
3125         * WebCore.gypi:
3126         * platform/graphics/filters/FEOffset.h:  Implement createImageFilter()
3127         for the Skia path.
3128         * platform/graphics/filters/skia/FEOffsetSkia.cpp: Added.
3129         (WebCore::FEOffset::createImageFilter):
3130         Instantiate an SkOffsetImageFilter when building the Skia DAG.
3131
3132 2013-02-16  Vsevolod Vlasov  <vsevik@chromium.org>
3133
3134         Web Inspector: Create separate project for each domain for UISourceCode based on browser resources.
3135         https://bugs.webkit.org/show_bug.cgi?id=109691
3136
3137         Reviewed by Pavel Feldman.
3138
3139         Separate project of certain type is now created for each domain.
3140         UISourceCode path represents a path in the project now.
3141         UISourceCode uri is now calculated based on project id and path.
3142         It is also possible to calculate path based on projectId and URI, which is used for uiSourceCodeForURI() methods.
3143
3144         * inspector/front-end/ScriptSnippetModel.js:
3145         (WebInspector.ScriptSnippetModel.prototype._addScriptSnippet):
3146         * inspector/front-end/SimpleWorkspaceProvider.js:
3147         (WebInspector.SimpleProjectDelegate):
3148         (WebInspector.SimpleProjectDelegate.projectId):
3149         (WebInspector.SimpleProjectDelegate.prototype.id):
3150         (WebInspector.SimpleProjectDelegate.prototype.displayName):
3151         (WebInspector.SimpleProjectDelegate.prototype.addFile):
3152         (WebInspector.SimpleWorkspaceProvider):
3153         (WebInspector.SimpleWorkspaceProvider.splitURL):
3154         (WebInspector.SimpleWorkspaceProvider._pathForSplittedURL):
3155         (WebInspector.SimpleWorkspaceProvider.uriForURL):
3156         (WebInspector.SimpleWorkspaceProvider.prototype._projectDelegate):
3157         (WebInspector.SimpleWorkspaceProvider.prototype._innerAddFileForURL):
3158         (WebInspector.SimpleWorkspaceProvider.prototype.addFileByName):
3159         (WebInspector.SimpleWorkspaceProvider.prototype._innerAddFile):
3160         (WebInspector.SimpleWorkspaceProvider.prototype.removeFileByName):
3161         (WebInspector.SimpleWorkspaceProvider.prototype.reset):
3162         * inspector/front-end/UISourceCode.js:
3163         (WebInspector.UISourceCode.uri):
3164         (WebInspector.UISourceCode.path):
3165         (WebInspector.UISourceCode.prototype.uri):
3166         * inspector/front-end/Workspace.js:
3167         (WebInspector.Project.prototype._fileAdded):
3168         (WebInspector.Project.prototype._fileRemoved):
3169         (WebInspector.Project.prototype.uiSourceCodeForURI):
3170
3171 2013-02-15  Chris Fleizach  <cfleizach@apple.com>
3172
3173         AX: Split WebAccessibilityObjectWrapper so code can be shared with iOS
3174         https://bugs.webkit.org/show_bug.cgi?id=109849
3175
3176         Reviewed by David Kilzer.
3177
3178         Split up the WebAccessibilityObjectWrapper so that iOS can share more 
3179         code with MacOS. I imagine over time, more code will move into this base class,
3180         but for now this will be a good start.
3181
3182         A base class called WebAccessibilityObjectWrapper now exists, and Mac has a subclass
3183         of that. iOS will be able to do the same.
3184
3185         * WebCore.xcodeproj/project.pbxproj:
3186         * accessibility/mac/AXObjectCacheMac.mm:
3187         (WebCore::AXObjectCache::attachWrapper):
3188         * accessibility/mac/WebAccessibilityObjectWrapper.h:
3189         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
3190         (-[WebAccessibilityObjectWrapper detach]):
3191         (-[WebAccessibilityObjectWrapper attachmentView]):
3192         (-[WebAccessibilityObjectWrapper accessibilityObject]):
3193         (-[WebAccessibilityObjectWrapper accessibilityPostedNotification:]):
3194         (-[WebAccessibilityObjectWrapper titleTagShouldBeUsedInDescriptionField]):
3195         (-[WebAccessibilityObjectWrapper accessibilityTitle]):
3196         (-[WebAccessibilityObjectWrapper accessibilityDescription]):
3197         (-[WebAccessibilityObjectWrapper accessibilityHelpText]):
3198         * accessibility/mac/WebAccessibilityObjectWrapperMac.h: Added.
3199         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: Added.
3200         (std):
3201         (-[WebAccessibilityObjectWrapperMac detach]):
3202         (-[WebAccessibilityObjectWrapperMac attachmentView]):
3203         (CFAutoreleaseHelper):
3204         (AXObjectIsTextMarker):
3205         (AXObjectIsTextMarkerRange):
3206         (AXTextMarkerRange):
3207         (AXTextMarkerRangeStart):
3208         (AXTextMarkerRangeEnd):
3209         (SearchKeyEntry):
3210         (createAccessibilitySearchKeyMap):
3211         (accessibilitySearchKeyForString):
3212         (textMarkerForVisiblePosition):
3213         (-[WebAccessibilityObjectWrapperMac textMarkerForVisiblePosition:]):
3214         (visiblePositionForTextMarker):
3215         (-[WebAccessibilityObjectWrapperMac visiblePositionForTextMarker:]):
3216         (visiblePositionForStartOfTextMarkerRange):
3217         (visiblePositionForEndOfTextMarkerRange):
3218         (textMarkerRangeFromMarkers):
3219         (AXAttributedStringRangeIsValid):
3220         (AXAttributeStringSetFont):
3221         (CreateCGColorIfDifferent):
3222         (AXAttributeStringSetColor):
3223         (AXAttributeStringSetNumber):
3224         (AXAttributeStringSetStyle):
3225         (AXAttributeStringSetBlockquoteLevel):
3226         (AXAttributeStringSetSpelling):
3227         (AXAttributeStringSetHeadingLevel):
3228         (AXAttributeStringSetElement):
3229         (AXAttributedStringAppendText):
3230         (nsStringForReplacedNode):
3231         (-[WebAccessibilityObjectWrapperMac doAXAttributedStringForTextMarkerRange:]):
3232         (textMarkerRangeFromVisiblePositions):
3233         (-[WebAccessibilityObjectWrapperMac textMarkerRangeFromVisiblePositions:endPosition:]):
3234         (-[WebAccessibilityObjectWrapperMac accessibilityActionNames]):
3235         (-[WebAccessibilityObjectWrapperMac additionalAccessibilityAttributeNames]):
3236         (-[WebAccessibilityObjectWrapperMac accessibilityAttributeNames]):
3237         (-[WebAccessibilityObjectWrapperMac visiblePositionRangeForTextMarkerRange:]):
3238         (-[WebAccessibilityObjectWrapperMac renderWidgetChildren]):
3239         (-[WebAccessibilityObjectWrapperMac remoteAccessibilityParentObject]):
3240         (convertToVector):
3241         (convertToNSArray):
3242         (-[WebAccessibilityObjectWrapperMac textMarkerRangeForSelection]):
3243         (-[WebAccessibilityObjectWrapperMac position]):
3244         (createAccessibilityRoleMap):
3245         (roleValueToNSString):
3246         (-[WebAccessibilityObjectWrapperMac role]):
3247         (-[WebAccessibilityObjectWrapperMac subrole]):
3248         (-[WebAccessibilityObjectWrapperMac roleDescription]):
3249         (-[WebAccessibilityObjectWrapperMac scrollViewParent]):
3250         (-[WebAccessibilityObjectWrapperMac titleTagShouldBeUsedInDescriptionField]):
3251         (-[WebAccessibilityObjectWrapperMac accessibilityTitle]):
3252         (-[WebAccessibilityObjectWrapperMac accessibilityDescription]):
3253         (-[WebAccessibilityObjectWrapperMac accessibilityHelpText]):
3254         (-[WebAccessibilityObjectWrapperMac accessibilityAttributeValue:]):
3255         (-[WebAccessibilityObjectWrapperMac accessibilityFocusedUIElement]):
3256         (-[WebAccessibilityObjectWrapperMac accessibilityHitTest:]):
3257         (-[WebAccessibilityObjectWrapperMac accessibilityIsAttributeSettable:]):
3258         (-[WebAccessibilityObjectWrapperMac accessibilityIsIgnored]):
3259         (-[WebAccessibilityObjectWrapperMac accessibilityParameterizedAttributeNames]):
3260         (-[WebAccessibilityObjectWrapperMac accessibilityPerformPressAction]):
3261         (-[WebAccessibilityObjectWrapperMac accessibilityPerformIncrementAction]):
3262         (-[WebAccessibilityObjectWrapperMac accessibilityPerformDecrementAction]):
3263         (-[WebAccessibilityObjectWrapperMac accessibilityPerformShowMenuAction]):
3264         (-[WebAccessibilityObjectWrapperMac accessibilityShowContextMenu]):
3265         (-[WebAccessibilityObjectWrapperMac accessibilityPerformAction:]):
3266         (-[WebAccessibilityObjectWrapperMac accessibilitySetValue:forAttribute:]):
3267         (rendererForView):
3268         (-[WebAccessibilityObjectWrapperMac _accessibilityParentForSubview:]):
3269         (-[WebAccessibilityObjectWrapperMac accessibilityActionDescription:]):
3270         (-[WebAccessibilityObjectWrapperMac doAXAttributedStringForRange:]):
3271         (-[WebAccessibilityObjectWrapperMac _convertToNSRange:]):
3272         (-[WebAccessibilityObjectWrapperMac _indexForTextMarker:]):
3273         (-[WebAccessibilityObjectWrapperMac _textMarkerForIndex:]):
3274         (-[WebAccessibilityObjectWrapperMac doAXRTFForRange:]):
3275         (-[WebAccessibilityObjectWrapperMac accessibilityAttributeValue:forParameter:]):
3276         (-[WebAccessibilityObjectWrapperMac accessibilitySupportsOverriddenAttributes]):
3277         (-[WebAccessibilityObjectWrapperMac accessibilityShouldUseUniqueId]):
3278         (-[WebAccessibilityObjectWrapperMac accessibilityIndexOfChild:]):
3279         (-[WebAccessibilityObjectWrapperMac accessibilityArrayAttributeCount:]):
3280         (-[WebAccessibilityObjectWrapperMac accessibilityArrayAttributeValues:index:maxCount:]):
3281         ([WebAccessibilityObjectWrapperMac accessibilitySetShouldRepostNotifications:]):
3282         (-[WebAccessibilityObjectWrapperMac accessibilityPostedNotification:]):
3283
3284 2013-02-15  Eric Carlson  <eric.carlson@apple.com>
3285
3286         [Mac] remove wkCaptionAppearance from WebKitSystemInterface
3287         https://bugs.webkit.org/show_bug.cgi?id=109996
3288
3289         Reviewed by Simon Fraser.
3290
3291         * platform/mac/WebCoreSystemInterface.h:
3292         * platform/mac/WebCoreSystemInterface.mm:
3293
3294 2013-02-15  Sheriff Bot  <webkit.review.bot@gmail.com>
3295
3296         Unreviewed, rolling out r143088.
3297         http://trac.webkit.org/changeset/143088
3298         https://bugs.webkit.org/show_bug.cgi?id=110000
3299
3300         Breaks the build (Requested by dgorbik on #webkit).
3301
3302         * platform/mac/WebCoreSystemInterface.h:
3303         * platform/mac/WebCoreSystemInterface.mm:
3304
3305 2013-02-15  Chris Rogers  <crogers@google.com>
3306
3307         Enhance AudioBus copyFrom() and sumFrom() to be able to handle discrete and speakers up and down-mixing
3308         https://bugs.webkit.org/show_bug.cgi?id=109983
3309
3310         Reviewed by Kenneth Russell.
3311
3312         The Web Audio spec has a more detailed explanation for how channels are to be up and down-mixed:
3313         https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#UpMix
3314
3315         This patch adds the initial support for handling ChannelInterpretation, although no
3316         new JS API is yet implemented.
3317
3318         No new tests since no new APIs have yet been exposed.
3319
3320         * platform/audio/AudioBus.cpp:
3321         (WebCore::AudioBus::copyFrom):
3322         (WebCore):
3323         (WebCore::AudioBus::sumFrom):
3324         (WebCore::AudioBus::speakersCopyFrom):
3325         (WebCore::AudioBus::speakersSumFrom):
3326         (WebCore::AudioBus::discreteCopyFrom):
3327         (WebCore::AudioBus::discreteSumFrom):
3328         * platform/audio/AudioBus.h:
3329         (AudioBus):
3330
3331 2013-02-15  Tony Chang  <tony@chromium.org>
3332
3333         Padding and border changes doesn't trigger relayout of children
3334         https://bugs.webkit.org/show_bug.cgi?id=109639
3335
3336         Reviewed by Kent Tamura.
3337
3338         In RenderBlock::layoutBlock, we only relayout our children if our logical width
3339         changes. This misses cases where our logical width doesn't change (i.e., padding
3340         or border changes), but our content width does change.
3341
3342         Also convert the needsLayout ASSERT into the if statement. This is because
3343         RenderScrollbarPart can change border widths and not need a layout if the scrollbar
3344         doesn't have a parent. In this case, we don't need to set any children for layout.
3345
3346         This is a more general case of bug 104997.
3347
3348         Test: fast/block/dynamic-padding-border.html
3349
3350         * rendering/RenderBox.cpp:
3351         (WebCore::borderOrPaddingLogicalWidthChanged): Only check if the logical width changed.
3352         (WebCore::RenderBox::styleDidChange): Drop the border-box condition since this can happen
3353         even without border-box box sizing.
3354
3355 2013-02-15  Mark Lam  <mark.lam@apple.com>
3356
3357         Split SQLStatement work between the frontend and backend.
3358         https://bugs.webkit.org/show_bug.cgi?id=104751.
3359
3360         Reviewed by Geoffrey Garen.
3361
3362         This is part of the webdatabase refactoring for webkit2.
3363
3364         1. Copied SQLTransaction to SQLTransactionBackend, and then reduce the
3365            2 to only handle frontend and backend work respectively.
3366
3367         2. Changed how statements are created.
3368
3369            - SQLTransaction::executeSQL() first creates a SQLStatement frontend
3370              which encapsulates the 2 script callbacks. It then passes the
3371              SQLStatement to the backend database to create the
3372              SQLStatementBackend.
3373            - The SQLStatementBackend manages all sqlite work.
3374
3375         3. Remove the Database::reportExecuteStatementResult() wrapper because
3376            it is only needed in the backend now.
3377
3378         4. Added new files to the build / project files.
3379
3380         5. Updated / added comments about how the SQLStatement life-cycle works.
3381
3382         No new tests.
3383
3384         * CMakeLists.txt:
3385         * GNUmakefile.list.am:
3386         * Modules/webdatabase/Database.cpp:
3387         * Modules/webdatabase/Database.h:
3388         (Database):
3389         (WebCore::Database::reportCommitTransactionResult):
3390         * Modules/webdatabase/DatabaseBackend.h:
3391         (DatabaseBackend):
3392         * Modules/webdatabase/SQLStatement.cpp:
3393         (WebCore::SQLStatement::create):
3394         (WebCore::SQLStatement::SQLStatement):
3395         (WebCore::SQLStatement::setBackend):
3396         (WebCore::SQLStatement::hasCallback):
3397         (WebCore::SQLStatement::hasErrorCallback):
3398         (WebCore::SQLStatement::performCallback):
3399         * Modules/webdatabase/SQLStatement.h:
3400         (SQLStatement):
3401         * Modules/webdatabase/SQLStatementBackend.cpp: Copied from Source/WebCore/Modules/webdatabase/SQLStatement.cpp.
3402         (WebCore::SQLStatementBackend::create):
3403         (WebCore::SQLStatementBackend::SQLStatementBackend):
3404         (WebCore::SQLStatementBackend::frontend):
3405         (WebCore::SQLStatementBackend::sqlError):