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