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