288219674c07a41c1a52b2f95a030ccb0fb9df58
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-05-22  Abhishek Arya  <inferno@chromium.org>
2
3         Assertion failure (toRenderBox() called on a RenderInline) beneath RenderBlock::blockBeforeWithinSelectionRoot()
4         https://bugs.webkit.org/show_bug.cgi?id=86500
5
6         Reviewed by Ojan Vafai.
7
8         Patch by Dan Bernstein<mitz@apple.com>. I just added the test.
9
10         Test: fast/block/line-layout/selection-highlight-crash.html
11
12         * rendering/RenderBlock.cpp:
13         (WebCore::RenderBlock::blockBeforeWithinSelectionRoot): Demoted the object local variable to
14         RenderObject, changed use of parentBox() to parent(), and added toRenderBlock() in two places.
15
16 2012-05-22  Rob Buis  <rbuis@rim.com>
17
18         ASSERTs in RenderInline::layout()
19         https://bugs.webkit.org/show_bug.cgi?id=63365
20
21         Reviewed by Nikolas Zimmermann.
22
23         Do not allow creation of renderers for text content children in elements by default.
24         Subclasses like SVGTextElement override this behavior.
25         This also fixes the <a><textPath</a> case because the <a> parent decides to allow <textPath> or not:
26         http://www.w3.org/2003/01/REC-SVG11-20030114-errata#linking-text-environment
27
28         Test: svg/custom/disallowed-text-content-rendering.svg
29
30         * svg/SVGElement.cpp:
31         (WebCore::SVGElement::childShouldCreateRenderer):
32         * svg/SVGElement.h:
33         (SVGElement):
34
35 2012-05-22  Takashi Sakamoto  <tasak@google.com>
36
37         Implement DOM_KEY_LOCATION_LEFT and RIGHT of KeyboardEvent's location property
38         https://bugs.webkit.org/show_bug.cgi?id=86694
39
40         As KeyboardEvent for left/right location key, e.g. left-control,
41         right-control, provides DOM_KEY_LOCATION_STANDARD as keyLocation property,
42         modified KeyCodeConversion to make PlatformKeyboardEvent
43         provide virtual keycodes with location information, e.g. VK_LCONTROL or
44         VK_RCONTROL, and modified KeyboardEvent to generate location information
45         from the virtual keycodes, e.g. genrating DOM_KEY_LOCATION_LEFT for
46         VK_LCONTROL. KeyboardEvent also removes location information from
47         the virtual keycodes, e.g. genrating VK_CONTROL for VK_LCONTROL.
48         The location property is defined in the W3C DOM3 specification:
49         http://www.w3.org/TR/DOM-Level-3-Events/#events-keyboardevents
50
51         Reviewed by Alexey Proskuryakov.
52
53         Test: fast/events/keydown-leftright-keys.html
54
55         * dom/KeyboardEvent.cpp:
56         (WebCore::windowsVirtualKeyCodeWithoutLocation):
57         Added a function which removes location information from a given
58         keycode. For example, when VK_LCONTROL is given, returns VK_CONTROL.
59         (WebCore::keyLocationCode):
60         Added a function which provides location information from a given
61         keycode. For example, when VK_LCONTROL is given,
62         returns DOM_KEY_LOCATION_LEFT.
63         (WebCore::KeyboardEvent::KeyboardEvent):
64         Initialized m_keyLocation by using the above keyLocationCode.
65         (WebCore::KeyboardEvent::keyCode):
66         Modified to use the above two functions to initialize keycode property
67         and keylocation property.
68         * platform/chromium/KeyCodeConversionAndroid.cpp:
69         (WebCore::windowsKeyCodeForKeyEvent):
70         * platform/chromium/KeyCodeConversionGtk.cpp:
71         (WebCore::windowsKeyCodeForKeyEvent):
72         * platform/cocoa/KeyEventCocoa.mm:
73         (WebCore::windowsKeyCodeForKeyCode):
74         Modified these keycode conversions to return keycodes with location
75         information, e.g. modified keycode conversions returns VK_LCONTROL
76         for left control.
77
78 2012-05-22  Pavel Feldman  <pfeldman@chromium.org>
79
80         Web Inspector: provide content-related actions on the sources panel.
81         https://bugs.webkit.org/show_bug.cgi?id=87144
82
83         Reviewed by Vsevolod Vlasov.
84
85         Now that the authoring focus moved to the Source panel, context menu actions should follow:
86         - refactored context menu actions to be provider-based
87         - edited call sites to add applicable actions.
88
89         * English.lproj/localizedStrings.js:
90         * inspector/front-end/ContextMenu.js:
91         (WebInspector.ContextMenu.prototype.appendApplicableItems):
92         * inspector/front-end/HandlerRegistry.js:
93         (WebInspector.HandlerRegistry.prototype.unregisterHandler):
94         (WebInspector.HandlerRegistry.prototype.appendApplicableItems.doSave):
95         (WebInspector.HandlerRegistry.prototype.appendApplicableItems.save):
96         (WebInspector.HandlerRegistry.prototype.appendApplicableItems):
97         * inspector/front-end/JavaScriptSourceFrame.js:
98         (WebInspector.JavaScriptSourceFrame.prototype.populateTextAreaContextMenu):
99         * inspector/front-end/NavigatorView.js:
100         (WebInspector.NavigatorView.prototype.handleContextMenu):
101         (WebInspector.BaseNavigatorTreeElement.prototype.onattach):
102         * inspector/front-end/NetworkPanel.js:
103         (WebInspector.NetworkPanel):
104         (WebInspector.NetworkPanel.prototype.searchCanceled):
105         (WebInspector.NetworkPanel.prototype.appendApplicableItems.reveal):
106         (WebInspector.NetworkPanel.prototype.appendApplicableItems):
107         * inspector/front-end/ResourceView.js:
108         (WebInspector.ResourceSourceFrame.prototype._contentChanged):
109         (WebInspector.ResourceSourceFrame.prototype.populateTextAreaContextMenu):
110         * inspector/front-end/ResourcesPanel.js:
111         (WebInspector.FrameResourceTreeElement.prototype._handleContextMenuEvent):
112         * inspector/front-end/ScriptsPanel.js:
113         (WebInspector.ScriptsPanel.prototype.appendApplicableItems):
114         * inspector/front-end/SourceFrame.js:
115         (WebInspector.SourceFrame.prototype.populateTextAreaContextMenu):
116         * inspector/front-end/TextViewer.js:
117         (WebInspector.TextViewer.prototype._contextMenu):
118         * inspector/front-end/UIUtils.js:
119         * inspector/front-end/externs.js:
120         * inspector/front-end/inspector.js:
121         (WebInspector._doLoadedDoneWithCapabilities.get if):
122
123 2012-05-22  Nico Weber  <thakis@chromium.org>
124
125         Give FileInputType a setFiles() method, let Drag-n-Drop call it.
126         https://bugs.webkit.org/show_bug.cgi?id=87139
127
128         Reviewed by Ojan Vafai.
129
130         filesChosen(), the FileChooserClient callback, used to modify
131         m_fileList directly. Instead, convert the FileChooserClient
132         data to a FileList and pass that to a factored-out setFiles()
133         method. This is in preparation to making the files property
134         writable.
135
136         Pure refactoring, no functionality change.
137
138         * html/FileInputType.cpp:
139         (WebCore::FileInputType::toFileList):
140         (WebCore::FileInputType::setFiles):
141         (WebCore::FileInputType::filesChosen):
142         (WebCore):
143         * html/FileInputType.h:
144         (FileInputType):
145
146 2012-05-22  Vsevolod Vlasov  <vsevik@chromium.org>
147
148         Web Inspector: JavaScriptSourceFrame should be based on JavaScriptSource not UISourceCode.
149         https://bugs.webkit.org/show_bug.cgi?id=87135
150
151         Reviewed by Pavel Feldman.
152
153         Renamed _uiSourceCode to _javaScriptSource in JavaScriptSourceFrame.
154         Removed unused uiSourceCode getter from JavaScriptSourceFrame.
155
156         * inspector/front-end/JavaScriptSourceFrame.js:
157         (WebInspector.JavaScriptSourceFrame):
158         (WebInspector.JavaScriptSourceFrame.prototype.canEditSource):
159         (WebInspector.JavaScriptSourceFrame.prototype.commitEditing):
160         (WebInspector.JavaScriptSourceFrame.prototype._onContentChanged):
161         (WebInspector.JavaScriptSourceFrame.prototype.populateLineGutterContextMenu):
162         (WebInspector.JavaScriptSourceFrame.prototype.populateTextAreaContextMenu):
163         (WebInspector.JavaScriptSourceFrame.prototype.afterTextChanged):
164         (WebInspector.JavaScriptSourceFrame.prototype.beforeTextChanged):
165         (WebInspector.JavaScriptSourceFrame.prototype._onMouseDown):
166         (WebInspector.JavaScriptSourceFrame.prototype._breakpointAdded):
167         (WebInspector.JavaScriptSourceFrame.prototype._breakpointRemoved):
168         (WebInspector.JavaScriptSourceFrame.prototype.onTextViewerContentLoaded):
169         (WebInspector.JavaScriptSourceFrame.prototype._setBreakpoint):
170         (WebInspector.JavaScriptSourceFrame.prototype._continueToLine):
171         * inspector/front-end/ScriptsPanel.js:
172         (WebInspector.ScriptsPanel.prototype._createSourceFrame):
173
174 2012-05-22  Lu Guanqun  <guanqun.lu@intel.com>
175
176         add OVERRIDE annotations to classes derived from CCAnimationCurve
177         https://bugs.webkit.org/show_bug.cgi?id=87073
178
179         Reviewed by James Robinson.
180
181         No new tests required.
182
183         * platform/graphics/chromium/cc/CCAnimationCurve.h:
184
185 2012-05-22  Lu Guanqun  <guanqun.lu@intel.com>
186
187         add OVERRIDE annotations to CCThreadTask
188         https://bugs.webkit.org/show_bug.cgi?id=87074
189
190         Reviewed by James Robinson.
191
192         No new tests required.
193
194         * platform/graphics/chromium/cc/CCThreadTask.h:
195
196 2012-05-22  Julien Chaffraix  <jchaffraix@webkit.org>
197
198         Centralize and clean-up table column iteration
199         https://bugs.webkit.org/show_bug.cgi?id=87051
200
201         Reviewed by Eric Seidel.
202
203         Tests: fast/table/caption-between-column-and-column-group.html
204                fast/table/caption-between-column-group-and-column.html
205                fast/table/caption-between-columns.html
206
207         The existing code had duplications between different classes and some
208         of the iterating functions could use a better place. That's what this
209         change solves, along with several renamings.
210
211         * rendering/RenderTableCol.h:
212         (WebCore::RenderTableCol::isTableColumnGroupWithColumnChildren):
213         Renamed isTableColGroup to this to better reflect what it checks.
214         Also added a new function: nextColumn.
215
216         * rendering/FixedTableLayout.cpp:
217         (WebCore::FixedTableLayout::calcWidthArray):
218         Updated after isTableColGroup renaming.
219
220         * rendering/RenderTable.cpp:
221         (WebCore::RenderTable::firstColumn):
222         Added this new function to get the first column (or column group).
223
224         (WebCore::RenderTable::colElement):
225         Cleaned up this function: switched the loop to a 'for' now that the
226         helper functions make it easy. Cleaned up the ordering and the naming.
227
228         * rendering/RenderTable.h:
229         Added firstColumn.
230
231         * rendering/RenderTableCell.cpp:
232         (WebCore::RenderTableCell::styleOrColLogicalWidth):
233         Updated to use nextColumn().
234
235         * rendering/RenderTableCol.cpp:
236         (WebCore::RenderTableCol::nextColumn):
237         Added this new helper function to centralize the code to iterate over columns.
238
239 2012-05-22  Hao Zheng  <zhenghao@chromium.org>
240
241         [chromium] Make color of spelling check marker cross-platform.
242         https://bugs.webkit.org/show_bug.cgi?id=87095
243
244         Reviewed by Adam Barth.
245
246         Pixel layout is RGBA on Android, while it is BGRA on other platforms.
247
248         No new tests. To run tests on Android.
249
250         * platform/graphics/skia/GraphicsContextSkia.cpp:
251         (WebCore::GraphicsContext::drawLineForDocumentMarker):
252
253 2012-05-22  Dana Jansens  <danakj@chromium.org>
254
255         [chromium] Expand damage from the background-blurred layer to ensure readback is only including pixels below that layer
256         https://bugs.webkit.org/show_bug.cgi?id=86884
257
258         Reviewed by Adrienne Walker.
259
260         Consider layers in back-to-front order A, B, and C, where layer B has
261         a blur background filter applied, and C exactly covers A. When B does
262         its readback to perform its blur, it should include the pixels of A
263         not C. With partial swap, if B is damaged, that damaged area will read
264         pixels from outside of the damage rect. Those pixels should use the
265         contents of A, not C, so we must expand the damage to ensure we redraw
266         all pixels that are going to be included in the blur for the current
267         frame.
268
269         Also, when a layer below B has damage outside the contentBounds of B
270         but within its blur radius, then that damage will be blurred inside B,
271         so expand all damage within B's blurred contentBounds.
272
273         Unit test: CCDamageTrackerTest.verifyDamageForBackgroundBlurredChild
274
275         * platform/graphics/chromium/cc/CCDamageTracker.cpp:
276         (WebCore::expandRectWithFilters):
277         (WebCore::expandDamageRectInsideRectWithFilters):
278         (WebCore::CCDamageTracker::updateDamageTrackingState):
279         (WebCore::CCDamageTracker::extendDamageForRenderSurface):
280
281 2012-05-22  Mihnea Ovidenie  <mihnea@adobe.com>
282
283         [CSSRegions] Add region styling support for color property
284         https://bugs.webkit.org/show_bug.cgi?id=85633
285
286         Reviewed by David Hyatt.
287
288         Test: fast/regions/region-style-color.html
289
290         This patch extends the region styling support. In addition to background-color, it adds
291         the possibility of styling color in regions.
292
293         * css/StyleResolver.cpp:
294         (WebCore::StyleResolver::collectMatchingRulesForList):
295         * rendering/RenderFlowThread.cpp:
296         (WebCore::RenderFlowThread::removeFlowChildInfo):
297         (WebCore::RenderFlowThread::addRegionToThread):
298         (WebCore::RenderFlowThread::removeRegionFromThread):
299         (WebCore::RenderFlowThread::clearRenderObjectCustomStyle):
300         (WebCore::RenderFlowThread::setRegionRangeForBox):
301         (WebCore):
302         (WebCore::RenderFlowThread::checkRegionsWithStyling):
303         * rendering/RenderFlowThread.h:
304         * rendering/RenderInline.cpp:
305         (WebCore::RenderInline::updateAlwaysCreateLineBoxes):
306         * rendering/RenderObjectChildList.cpp:
307         (WebCore::RenderObjectChildList::removeChildNode):
308         * rendering/RenderRegion.cpp:
309         (WebCore::RenderRegion::paintReplaced):
310         (WebCore::RenderRegion::styleDidChange):
311         (WebCore::RenderRegion::setRegionObjectsRegionStyle):
312         (WebCore::RenderRegion::restoreRegionObjectsOriginalStyle):
313         (WebCore::RenderRegion::computeStyleInRegion):
314         (WebCore):
315         (WebCore::RenderRegion::computeChildrenStyleInRegion):
316         (WebCore::RenderRegion::setObjectStyleInRegion):
317         (WebCore::RenderRegion::clearObjectStyleInRegion):
318         * rendering/RenderRegion.h:
319         (RenderRegion):
320         (ObjectRegionStyleInfo):
321
322 2012-05-22  Kentaro Hara  <haraken@chromium.org>
323
324         [V8] Remove GenerateSetDOMException() from CodeGeneratorV8.pm
325         https://bugs.webkit.org/show_bug.cgi?id=87114
326
327         Reviewed by Nate Chapin.
328
329         GenerateSetDOMException() is used by only one place. This patch removes it.
330
331         No tests. No change in behavior.
332
333         * bindings/scripts/CodeGeneratorV8.pm:
334         (GenerateNormalAttrGetter):
335
336 2012-05-22  David Grogan  <dgrogan@chromium.org>
337
338         IndexedDB: Fire error when there are problems opening a DB
339         https://bugs.webkit.org/show_bug.cgi?id=85579
340
341         We used to either fire success or get into an infinite loop.
342
343         Reviewed by Tony Chang.
344
345         New unit test in
346         Source/WebKit/chromium/tests/IDBAbortOnCorruptTest.cpp
347
348         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
349         (WebCore::IDBDatabaseBackendImpl::IDBDatabaseBackendImpl):
350         (WebCore::IDBDatabaseBackendImpl::openInternal):
351         (WebCore::IDBDatabaseBackendImpl::openConnection):
352         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
353         (WebCore::IDBDatabaseBackendImpl::create):
354         (IDBDatabaseBackendImpl):
355         * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
356         (WebCore::IDBFactoryBackendImpl::deleteDatabase):
357         (WebCore::IDBFactoryBackendImpl::openInternal):
358         * Modules/indexeddb/IDBFactoryBackendImpl.h:
359         (IDBFactoryBackendImpl):
360         * Modules/indexeddb/IDBLevelDBBackingStore.h:
361         (IDBLevelDBBackingStore):
362
363 2012-05-22  Nikolas Zimmermann  <nzimmermann@rim.com>
364
365         Not reviewed.
366
367         Follow-up patch after r117975, as the strict approach fires assertions.
368         CSS generated content can violate the ASSERT(child->isSVGInline() || child->isSVGInlineText()) logic.
369
370         * rendering/svg/RenderSVGText.cpp:
371         (WebCore::RenderSVGText::subtreeChildWasAdded):
372         (WebCore::RenderSVGText::subtreeChildWillBeRemoved):
373
374 2012-05-22  Dominic Mazzoni  <dmazzoni@google.com>
375
376         Chromium AX: Crash when menulist adds selected option via document.write
377         https://bugs.webkit.org/show_bug.cgi?id=87028
378
379         Reviewed by Chris Fleizach.
380
381         Test: platform/chromium/accessibility/add-to-menu-list-crashes.html
382
383         * rendering/RenderMenuList.cpp:
384         (WebCore::RenderMenuList::addChild):
385
386 2012-05-22  Nikolas Zimmermann  <nzimmermann@rim.com>
387
388         Crash in WebCore::SVGTextLayoutAttributesBuilder::fillCharacterDataMap
389         https://bugs.webkit.org/show_bug.cgi?id=86781
390
391         Reviewed by Rob Buis.
392
393         Always invalidate the text positioning element cache if the <text> render subtree mutates.
394         Currently only RenderSVGInlineText renderers are tracked correctly, RenderSVGInline
395         renderers like RenderSVGTSpan didn't cause text positioning element cache mutations
396         so far. Fix that.
397
398         Test: svg/custom/bug86781.html
399
400         * rendering/svg/RenderSVGInline.cpp:
401         (WebCore::RenderSVGInline::removeChild):
402         * rendering/svg/RenderSVGText.cpp:
403         (WebCore::RenderSVGText::subtreeChildWasAdded):
404         (WebCore::RenderSVGText::subtreeChildWillBeRemoved):
405         (WebCore::RenderSVGText::removeChild):
406         * rendering/svg/RenderSVGText.h:
407         (RenderSVGText):
408
409 2012-05-22  Pavel Feldman  <pfeldman@chromium.org>
410
411         Web Inspector: make "Go to source" shortcut accessible from all panels.
412         https://bugs.webkit.org/show_bug.cgi?id=87132
413
414         Reviewed by Vsevolod Vlasov.
415
416         * English.lproj/localizedStrings.js:
417         * inspector/front-end/AdvancedSearchController.js:
418         (WebInspector.AdvancedSearchController.prototype.handleShortcut):
419         * inspector/front-end/FilteredItemSelectionDialog.js:
420         (WebInspector.OpenResourceDialog.filterOutEmptyURLs):
421         (WebInspector.OpenResourceDialog.compareFunction):
422         (WebInspector.OpenResourceDialog):
423         (WebInspector.OpenResourceDialog.prototype.itemTitleAt):
424         (WebInspector.OpenResourceDialog.prototype.itemKeyAt):
425         (WebInspector.OpenResourceDialog.prototype.itemsCount):
426         (WebInspector.OpenResourceDialog.prototype.requestItems):
427         (WebInspector.OpenResourceDialog.prototype.selectItem):
428         (WebInspector.OpenResourceDialog.show):
429         * inspector/front-end/ScriptsPanel.js:
430         (WebInspector.ScriptsPanel.prototype.appendApplicableItems):
431         (WebInspector.ScriptsPanel.prototype.showGoToSourceDialog):
432         * inspector/front-end/SearchController.js:
433         (WebInspector.SearchController.prototype.handleShortcut):
434         * inspector/front-end/inspector.js:
435         (WebInspector._registerShortcuts):
436         (WebInspector.documentKeyDown):
437
438 2012-05-22  Ilya Tikhonovsky  <loislo@chromium.org>
439
440         Web Inspector: HeapSnapshot: speedUp buildAggregates.
441         https://bugs.webkit.org/show_bug.cgi?id=87131
442
443         Engine can't inline getters and use fast-case if the function has for(i in object) loops.
444
445         Reviewed by Yury Semikhatsky.
446
447         No logic changes.
448
449         * inspector/front-end/HeapSnapshot.js:
450         (WebInspector.HeapSnapshotNode.prototype.classIndex):
451         (WebInspector.HeapSnapshot.prototype._buildAggregates):
452         (WebInspector.HeapSnapshot.prototype._calculateClassesRetainedSize):
453
454 2012-05-22  Nikolas Zimmermann  <nzimmermann@rim.com>
455
456         Crash in WebCore::RenderSVGContainer::paint
457         https://bugs.webkit.org/show_bug.cgi?id=86392
458
459         Reviewed by Rob Buis.
460
461         Modernize the <marker> code, switch to the same design pattern used for handling zero-length subpaths.
462         Decouple the generation of the marker start/mid/end positions from the actual usage of these information.
463         Only generate those marker positions if the underlying Path changes, and never else.
464
465         When figuring out the bounds for a shape, access to current set of RenderSVGResourceMarker start/mid/end resources
466         and ask the marker resources for their bounds using the previously figured out marker positions on the Path.
467         Drawing markers is handled in the same way.
468
469         Remove SVGMarkerLayoutInfo alltogether which stored raw pointers to the RenderSVGResourceMarkers.
470         We assumed that those objects would stay alive from layout() to paint(), but that assumption is wrong.
471
472         Tests: svg/custom/bug86392.html
473                svg/custom/marker-zero-length-linecaps-expected.svg
474                svg/custom/marker-zero-length-linecaps.svg
475
476         * CMakeLists.txt: Remove SVGMarkerLayoutInfo.*.
477         * GNUmakefile.list.am: Ditto.
478         * Target.pri: Ditto.
479         * WebCore.gypi: Ditto.
480         * WebCore.order: Ditto.
481         * WebCore.vcproj/WebCore.vcproj: Ditto.
482         * WebCore.xcodeproj/project.pbxproj: Ditto.
483         * rendering/svg/RenderSVGAllInOne.cpp: Ditto.
484         * rendering/svg/RenderSVGShape.cpp: Handle markers just like the existing zero leng subpath code, which is superior.
485         (WebCore::RenderSVGShape::createShape):
486         (WebCore::RenderSVGShape::layout):
487         (WebCore::RenderSVGShape::shouldGenerateMarkerPositions):
488         (WebCore::RenderSVGShape::paint):
489         (WebCore::markerForType):
490         (WebCore::RenderSVGShape::markerRect):
491         (WebCore::RenderSVGShape::inflateWithStrokeAndMarkerBounds):
492         (WebCore::RenderSVGShape::drawMarkers):
493         (WebCore::RenderSVGShape::processMarkerPositions):
494         * rendering/svg/RenderSVGShape.h:
495         (RenderSVGShape):
496         * rendering/svg/SVGMarkerData.h:
497         (WebCore::MarkerPosition::MarkerPosition):
498         (MarkerPosition):
499         (WebCore::SVGMarkerData::SVGMarkerData):
500         (WebCore::SVGMarkerData::updateFromPathElement):
501         (WebCore::SVGMarkerData::pathIsDone):
502         (SVGMarkerData):
503         (WebCore::SVGMarkerData::currentAngle):
504         * rendering/svg/SVGMarkerLayoutInfo.cpp: Removed.
505         * rendering/svg/SVGMarkerLayoutInfo.h: Removed.
506         * rendering/svg/SVGResourcesCache.cpp:
507         (WebCore::resourcesCacheFromRenderObject):
508         (WebCore::SVGResourcesCache::cachedResourcesForRenderObject):
509         * rendering/svg/SVGResourcesCache.h:
510         (SVGResourcesCache):
511
512 2012-05-22  Alexander Pavlov  <apavlov@chromium.org>
513
514         [Chromium] Implement the ContextMenuItem SubMenu type
515         https://bugs.webkit.org/show_bug.cgi?id=86625
516
517         Reviewed by Pavel Feldman.
518
519         This change is the WebKit part of a two-sided patch that adds subMenuItems to ContextMenuItem
520         and introduces code needed to handle it properly.
521
522         * platform/ContextMenuItem.h:
523         (PlatformMenuItemDescription): Add a Vector for subMenuItems.
524         * platform/PlatformMenuDescription.h:
525         (WebCore): Introduce a meaningful typedef for PlatformMenuDescription in Chromium.
526         * platform/chromium/ContextMenuChromium.cpp:
527         (WebCore::ContextMenu::itemWithAction): Search submenus when looking up a requested action id.
528         (WebCore::ContextMenu::platformDescription): Return a real PlatformMenuDescription rather than 0.
529         * platform/chromium/ContextMenuItemChromium.cpp:
530         (WebCore::ContextMenuItem::ContextMenuItem): Set submenu if one has been passed in.
531         (WebCore::ContextMenuItem::platformSubMenu): Return real subMenuItems instead of an empty PlatformMenuDescription.
532         (WebCore::ContextMenuItem::setSubMenu): Implemented.
533         (WebCore):
534
535 2012-05-22  Andrey Kosyakov  <caseq@chromium.org>
536
537         Web Inspector: use canvas to render timeline category strips in overview pane
538         https://bugs.webkit.org/show_bug.cgi?id=87109
539
540         Reviewed by Pavel Feldman.
541
542         - use canvas, not DOM to represent timeline category strips in the default overview mode
543
544         * inspector/front-end/TimelineOverviewPane.js:
545         (WebInspector.TimelineOverviewPane):
546         (WebInspector.TimelineOverviewPane.prototype._setVerticalOverview): propagate to TimelineCategoryStrips;
547         (WebInspector.TimelineOverviewPane.prototype._onCategoryVisibilityChanged): force update of category strips;
548         (WebInspector.TimelineOverviewPane.prototype._update):
549         (WebInspector.TimelineOverviewPane.prototype.setShowShortEvents):
550         (WebInspector.TimelineCategoryStrips):
551         (WebInspector.TimelineCategoryStrips.prototype.update.appendRecord): process one record;
552         (WebInspector.TimelineCategoryStrips.prototype.update): re-draw everything;
553         (WebInspector.TimelineCategoryStrips.prototype.setShowShortEvents):
554         (WebInspector.TimelineCategoryStrips.prototype._renderBar): render single bar;
555         (WebInspector.TimelineVerticalOverview):
556         (WebInspector.TimelineVerticalOverview.prototype._renderBar):
557         * inspector/front-end/TimelinePresentationModel.js:
558         (WebInspector.TimelinePresentationModel.categories):
559         (WebInspector.TimelinePresentationModel.createFillStyle): utility methods to create gradients for category bars;
560         (WebInspector.TimelinePresentationModel.createFillStyleForCategory):
561         (WebInspector.TimelineCategory):
562
563 2012-05-22  Pavel Feldman  <pfeldman@chromium.org>
564
565         Web Inspector: [regression] dynamically created script tab is bound to the document resource.
566         https://bugs.webkit.org/show_bug.cgi?id=87119
567
568         Reviewed by Vsevolod Vlasov.
569
570         Test: inspector/debugger/dynamic-script-tag.html
571
572         * inspector/front-end/BreakpointManager.js:
573         (WebInspector.BreakpointManager.Breakpoint.prototype._setInDebugger.didSetBreakpoint):
574         (WebInspector.BreakpointManager.Breakpoint.prototype._setInDebugger):
575         * inspector/front-end/DebuggerModel.js:
576         (WebInspector.DebuggerModel.prototype.rawLocationToUILocation):
577         * inspector/front-end/ResourceScriptMapping.js:
578         (WebInspector.ResourceScriptMapping.prototype.addScript):
579         (WebInspector.ResourceScriptMapping.prototype._shouldBindScriptToContentProvider):
580         * inspector/front-end/Script.js:
581         (WebInspector.Script.prototype.rawLocationToUILocation):
582         (WebInspector.Script.Location.prototype.update):
583
584 2012-05-22  Vsevolod Vlasov  <vsevik@chromium.org>
585
586         Web Inspector: JavaScript breakpoints disappear when Ctrl+S is pressed for the script without changes.
587         https://bugs.webkit.org/show_bug.cgi?id=87121
588
589         Reviewed by Pavel Feldman.
590
591         JavaScriptSourceFrame and StylesSourceFrame should not commit working copy unless UISourceCode is dirty.
592
593         * inspector/front-end/JavaScriptSourceFrame.js:
594         (WebInspector.JavaScriptSourceFrame.prototype.commitEditing):
595         * inspector/front-end/StylesPanel.js:
596         (WebInspector.StyleSourceFrame.prototype.commitEditing):
597         * inspector/front-end/UISourceCode.js:
598         (WebInspector.UISourceCode.prototype.commitWorkingCopy):
599
600 2012-05-22  Ilya Tikhonovsky  <loislo@chromium.org>
601
602         Web Inspector: HeapSnapshot: speed-up calculateRetainedSize functon.
603         https://bugs.webkit.org/show_bug.cgi?id=87124
604
605         I found that in all dominators related functions we use nodeOrdinals.
606         At the moment we divide nodeIndex to nodeFieldCount and this operation too expensive for these simple algorithms.
607
608         Reviewed by Yury Semikhatsky.
609
610         Covered by existing tests.
611
612         * inspector/front-end/HeapSnapshot.js:
613         (WebInspector.HeapSnapshotNode.prototype.get dominatorIndex):
614         (WebInspector.HeapSnapshot.prototype._init):
615         (WebInspector.HeapSnapshot.prototype._buildPostOrderIndex):
616         (WebInspector.HeapSnapshot.prototype._buildDominatorTree):
617         (WebInspector.HeapSnapshot.prototype._calculateRetainedSizes):
618         (WebInspector.HeapSnapshot.prototype._buildDominatedNodes):
619
620 2012-05-22  Yury Semikhatsky  <yurys@chromium.org>
621
622         Web Inspector: annotate InjectedScriptSource.js for closure compiler
623         https://bugs.webkit.org/show_bug.cgi?id=87120
624
625         Reviewed by Pavel Feldman.
626
627         Annotated InjectedScriptSource.js for closure compiler. Replaced call of undefined
628         _isPrimitiveValue function with isPrimitiveValue.
629
630         * inspector/InjectedScriptExterns.js: Added. External APIs used in InjectedScriptSource.js
631         (console.log):
632         (InjectedScriptHost.prototype.storageId):
633         (InjectedScriptHost.prototype.functionDetails):
634         (InjectedScriptHost.prototype.isHTMLAllCollection):
635         (InjectedScriptHost.prototype.internalConstructorName):
636         (InjectedScriptHost.prototype.copyText):
637         (InjectedScriptHost.prototype.clearConsoleMessages):
638         (InjectedScriptHost.prototype.inspectedObject):
639         (InjectedScriptHost.prototype.databaseId):
640         (InjectedScriptHost.prototype.inspect):
641         (InjectedScriptHost.prototype.type):
642         (InjectedScriptHost.prototype.getEventListeners):
643         (JavaScriptCallFrame.prototype.scopeType):
644         * inspector/InjectedScriptSource.js:
645
646 2012-05-22  Ian Vollick  <vollick@chromium.org>
647
648         [chromium] Speed up CCLayerTreeHostTestTickAnimationWhileBackgrounded
649         https://bugs.webkit.org/show_bug.cgi?id=86871
650
651         Reviewed by James Robinson.
652
653         With this patch, the background animation timer is lazily created,
654         allowing for different time intervals to be used. In particular, a
655         very short interval for unit tests.
656
657         Unit tests: CCLayerTreeHostTestTickAnimationWhileBackgrounded.runSingleThread
658                     CCLayerTreeHostTestTickAnimationWhileBackgrounded.runMultiThread
659
660         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
661         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
662         (WebCore::CCLayerTreeHostImpl::setBackgroundTickingEnabled):
663         (WebCore):
664         (WebCore::CCLayerTreeHostImpl::setVisible):
665         (WebCore::CCLayerTreeHostImpl::animateLayers):
666         (WebCore::CCLayerTreeHostImpl::lowFrequencyAnimationInterval):
667         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
668         (CCLayerTreeHostImpl):
669         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
670         (WebCore::CCSingleThreadProxy::setVisible):
671
672 2012-05-22  Alexander Pavlov  <apavlov@chromium.org>
673
674         Web Inspector: [Styles] Odd synthetic shorthands may appear in the style
675         https://bugs.webkit.org/show_bug.cgi?id=87081
676
677         Reviewed by Vsevolod Vlasov.
678
679         * inspector/front-end/StylesSidebarPane.js:
680         (WebInspector.StylePropertiesSection.prototype.onpopulate):
681
682 2012-05-22  Hayato Ito  <hayato@chromium.org>
683
684         Fix crashes when a mouse points a <svg> element in shadow DOM subtree.
685         https://bugs.webkit.org/show_bug.cgi?id=86795
686
687         Reviewed by Nikolas Zimmermann.
688
689         <svg> elements in shadow dom subtree are still not supported.
690         This fixes only crashes.
691
692         Test: fast/dom/shadow/shadow-dom-event-dispatching.html
693
694         * dom/EventDispatcher.cpp:
695         (WebCore::eventTargetRespectingSVGTargetRules):
696         * page/EventHandler.cpp:
697         (WebCore::instanceAssociatedWithShadowTreeElement):
698
699 2012-05-22  Andreas Kling  <kling@webkit.org>
700
701         DOM Attr objects pointing to "style" attribute should force reification when read.
702         <http://webkit.org/b/87076>
703
704         Reviewed by Antti Koivisto.
705
706         Make sure that the "style" attribute is reserialized as needed when it gets retrieved
707         through an Attr object. This fixes a bug where updating an element's inline style
708         through the CSSOM API, and then retrieving the style attribute through an Attr node
709         that was previously created by element.getAttributeNode() would return the old style
710         attribute value.
711
712         Test: fast/dom/attr-style-too-lazy.html
713
714         * dom/Attr.cpp:
715         (WebCore::Attr::value):
716
717 2012-05-22  Ilya Tikhonovsky  <loislo@chromium.org>
718
719         Web Inspector: HeapProfiler: upstream retainedSize calculation.
720         https://bugs.webkit.org/show_bug.cgi?id=87107
721
722         This patch upstreams V8::HeapSnapshotGenerator::CalculateRetainedSizes function to front-end.
723         After that we will be able to drop retainedSize field from the snapshot serialized data.
724         See meta-bug https://bugs.webkit.org/show_bug.cgi?id=87089
725
726         Reviewed by Yury Semikhatsky.
727
728         * inspector/front-end/HeapSnapshot.js:
729         (WebInspector.HeapSnapshotNode.prototype.get retainedSize):
730         (WebInspector.HeapSnapshot.prototype._init):
731         (WebInspector.HeapSnapshot.prototype._calculateRetainedSizes):
732
733 2012-05-22  Emil A Eklund  <eae@chromium.org>
734
735         Change RenderBlock to user RenderBox/RenderInline writing mode logic
736         https://bugs.webkit.org/show_bug.cgi?id=87040
737
738         Reviewed by Eric Seidel.
739
740         Remove unnecessary writing mode logic in RenderBlock and use the
741         implementation in RenderBox and RenderInline instead.
742
743         No new tests, no change in functionality.
744
745         * rendering/RenderBlock.cpp:
746         (WebCore):
747         * rendering/RenderBlock.h:
748         (WebCore::RenderBlock::marginBeforeForChild):
749         (WebCore::RenderBlock::marginAfterForChild):
750         (WebCore::RenderBlock::marginStartForChild):
751         (WebCore::RenderBlock::marginEndForChild):
752         (WebCore::RenderBlock::setMarginStartForChild):
753         (WebCore::RenderBlock::setMarginEndForChild):
754         (WebCore::RenderBlock::setMarginBeforeForChild):
755         (WebCore::RenderBlock::setMarginAfterForChild):
756         * rendering/RenderBox.cpp:
757         (WebCore::RenderBox::marginBefore):
758         (WebCore::RenderBox::marginAfter):
759         (WebCore::RenderBox::marginStart):
760         (WebCore::RenderBox::marginEnd):
761         (WebCore::RenderBox::setMarginStart):
762         (WebCore::RenderBox::setMarginEnd):
763         (WebCore::RenderBox::setMarginBefore):
764         (WebCore::RenderBox::setMarginAfter):
765         * rendering/RenderBox.h:
766         (RenderBox):
767         * rendering/RenderBoxModelObject.h:
768         (RenderBoxModelObject):
769         * rendering/RenderInline.cpp:
770         (WebCore::RenderInline::marginStart):
771         (WebCore::RenderInline::marginEnd):
772         (WebCore::RenderInline::marginBefore):
773         (WebCore::RenderInline::marginAfter):
774         * rendering/RenderInline.h:
775         (RenderInline):
776
777 2012-05-22  Li Yin  <li.yin@intel.com>
778
779         [WebSocket] WebSocket object should fire a simple event named error when it is required to fail the websocket connection.
780         https://bugs.webkit.org/show_bug.cgi?id=86958
781
782         Reviewed by Kent Tamura.
783
784         Spec:http://dev.w3.org/html5/websockets/#feedback-from-the-protocol
785         If the user agent was required to fail the websocket connection or the 
786         WebSocket connection is closed with prejudice, fire a simple event 
787         named error at the WebSocket object.
788
789         Tests: http/tests/websocket/tests/hybi/close.html
790
791         * Modules/websockets/WebSocket.cpp:
792         (WebCore::WebSocket::didReceiveMessageError):
793         * Modules/websockets/WebSocketChannel.cpp:
794         (WebCore::WebSocketChannel::fail):
795
796 2012-05-22  Yury Semikhatsky  <yurys@chromium.org>
797
798         Web Inspector: allow showing selected object in another heap profiler view
799         https://bugs.webkit.org/show_bug.cgi?id=87098
800
801         Reviewed by Vsevolod Vlasov.
802
803         Added 2 context menu actions: 1) to jump from a node in the heap snapshot summary
804         view to the same node in the dominators view; 2) to jump from a node in the dominators
805         view to the same node in the summary view.
806
807         * inspector/front-end/HeapSnapshotDataGrids.js:
808         (WebInspector.HeapSnapshotSortableDataGrid): "sorting complete" event is only dispatched on
809         when the data grid is populated. If we switch to already populated data grid the event is not
810         dispatched. However when switching between different views of a heap snapshot we want to track
811         the moment when the data grid is shown and populated. I added
812         WebInspector.HeapSnapshotSortableDataGrid.Events.ContentShown for such cases. The event will always
813         be dispatched after the data grid is shown and its content is populated.
814         (WebInspector.HeapSnapshotSortableDataGrid.prototype.wasShown):
815         (WebInspector.HeapSnapshotSortableDataGrid.prototype._sortingComplete):
816         (WebInspector.HeapSnapshotSortableDataGrid.prototype.populateContextMenu.revealInDominatorsView):
817         (WebInspector.HeapSnapshotSortableDataGrid.prototype.populateContextMenu.else.revealInSummaryView):
818         (WebInspector.HeapSnapshotSortableDataGrid.prototype.populateContextMenu):
819         (WebInspector.HeapSnapshotSortableDataGrid.prototype._performSorting):
820         * inspector/front-end/HeapSnapshotGridNodes.js:
821         (WebInspector.HeapSnapshotGenericObjectNode.prototype._createObjectCell):
822         (WebInspector.HeapSnapshotDominatorObjectNode.prototype.retrieveChildBySnapshotObjectId):
823         * inspector/front-end/HeapSnapshotView.js:
824         (WebInspector.HeapSnapshotView.prototype.populateContextMenu):
825         (WebInspector.HeapSnapshotView.prototype.changeView.dataGridContentShown):
826         (WebInspector.HeapSnapshotView.prototype.changeView):
827         (WebInspector.HeapSnapshotView.prototype._onSelectedViewChanged):
828         (WebInspector.HeapSnapshotView.prototype._changeView):
829         * inspector/front-end/ProfilesPanel.js:
830         (WebInspector.ProfilesPanel.prototype._handleContextMenuEvent):
831
832 2012-05-22  Yury Semikhatsky  <yurys@chromium.org>
833
834         Web Inspector: show more button node should have height multiple of row height
835         https://bugs.webkit.org/show_bug.cgi?id=87104
836
837         Reviewed by Vsevolod Vlasov.
838
839         Made "show more" button height multiple of the data grid row height.
840
841         * inspector/front-end/ShowMoreDataGridNode.js:
842         (WebInspector.ShowMoreDataGridNode.prototype.nodeHeight):
843         * inspector/front-end/dataGrid.css:
844         (.data-grid button):
845
846 2012-05-22  Kentaro Hara  <haraken@chromium.org>
847
848         [V8] Add an optional 'isolate' argument to throwTypeError()
849         https://bugs.webkit.org/show_bug.cgi?id=87070
850
851         Reviewed by Adam Barth.
852
853         The objective is to pass Isolate around in V8 bindings.
854         This patch adds an optional 'isolate' argument to throwTypeError(),
855         and passes Isolate to throwTypeError()s. In a following patch,
856         I'll pass Isolate to all throwTypeError("message")s.
857
858         No tests. No change in behavior.
859
860         * bindings/scripts/CodeGeneratorV8.pm:
861         (GenerateNormalAttrSetter):
862         (GenerateOverloadedFunctionCallback):
863         (GenerateParametersCheck):
864         * bindings/scripts/test/V8/V8TestObj.cpp:
865         (WebCore::TestObjV8Internal::overloadedMethodCallback):
866         (WebCore::TestObjV8Internal::overloadedMethod1Callback):
867         * bindings/v8/V8Proxy.cpp:
868         (WebCore::V8Proxy::throwTypeError):
869         * bindings/v8/V8Proxy.h:
870         (V8Proxy):
871         * bindings/v8/custom/V8ArrayBufferViewCustom.h:
872         (WebCore::constructWebGLArray):
873         * bindings/v8/custom/V8DataViewCustom.cpp:
874         (WebCore::V8DataView::constructorCallback):
875         * bindings/v8/custom/V8SVGLengthCustom.cpp:
876         (WebCore::V8SVGLength::valueAccessorSetter):
877         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
878         (WebCore::V8WebGLRenderingContext::getAttachedShadersCallback):
879         (WebCore::V8WebGLRenderingContext::getProgramParameterCallback):
880         (WebCore::V8WebGLRenderingContext::getShaderParameterCallback):
881         (WebCore::V8WebGLRenderingContext::getUniformCallback):
882         (WebCore::vertexAttribAndUniformHelperf):
883         (WebCore::uniformHelperi):
884         (WebCore::uniformMatrixHelper):
885
886 2012-05-22  Yoshifumi Inoue  <yosin@chromium.org>
887
888         [Forms][Meter][Progress] Change function signature of parseToDoubleForNumberType
889         https://bugs.webkit.org/show_bug.cgi?id=87077
890
891         Reviewed by Hajime Morita.
892
893         This patch changes function signature of parseToDoubleForNumberType and
894         parseToDoubleForNumberTypeWithDecimalPlaces to return double value instead
895         of bool for reducing code in call sites for ease of maintenance. This patch
896         also allows to use functional style of using these functions.
897
898         No new tests. This patch doesn't change behavior.
899
900         * html/HTMLMeterElement.cpp:
901         (WebCore::HTMLMeterElement::min): Changed for using double return value.
902         (WebCore::HTMLMeterElement::max): Changed for using double return value.
903         (WebCore::HTMLMeterElement::value): Changed for using double return value.
904         (WebCore::HTMLMeterElement::low): Changed for using double return value.
905         (WebCore::HTMLMeterElement::high): Changed for using double return value.
906         (WebCore::HTMLMeterElement::optimum): Changed for using double return value.
907         * html/HTMLProgressElement.cpp:
908         (WebCore::HTMLProgressElement::value): Changed for using double return value.
909         (WebCore::HTMLProgressElement::max): Changed for using double return value.
910         * html/NumberInputType.cpp:
911         (WebCore::NumberInputType::typeMismatchFor): Changed for using double return value.
912         (WebCore::NumberInputType::sizeShouldIncludeDecoration): Changed for using double return value.
913         (WebCore::NumberInputType::parseToDouble): Changed for using double return value.
914         (WebCore::NumberInputType::parseToDoubleWithDecimalPlaces): Changed for using double return value.
915         (WebCore::NumberInputType::visibleValue): Changed for using double return value.
916         (WebCore::NumberInputType::sanitizeValue): Changed for using double return value.
917         * html/RangeInputType.cpp:
918         (WebCore::RangeInputType::parseToDouble): Changed for using double return value.
919         * html/StepRange.cpp:
920         (WebCore::StepRange::parseStep): Changed for using double return value.
921         * html/StepRange.h:
922         (WebCore::StepRange::defaultValue): Added "const" attribute
923         (WebCore::StepRange::proportionFromValue): Added "const" attribute
924         (WebCore::StepRange::valueFromProportion): Added "const" attribute
925         * html/parser/HTMLParserIdioms.cpp:
926         (WebCore::parseToDoubleForNumberType): Changed for using double return value. Added one parameter function.
927         (WebCore::parseToDoubleForNumberTypeWithDecimalPlaces): Changed for using double return value. Added function for providing default fallback value.
928         * html/parser/HTMLParserIdioms.h: Changed function prototype and added one parameter prototypes.
929         * html/shadow/SliderThumbElement.cpp:
930         (WebCore::sliderPosition): Changed for using double return value.
931
932 2012-05-22  Kentaro Hara  <haraken@chromium.org>
933
934         REGRESSION r110315: Event handler throws TypeError for an input element with name="arguments"
935         https://bugs.webkit.org/show_bug.cgi?id=86991
936
937         Reviewed by Ojan Vafai.
938
939         Original Chromium bug: http://code.google.com/p/chromium/issues/detail?id=128723
940
941         Consider the following html:
942
943         <html><body><form>
944         <input type="hidden" name="arguments"></input>
945         <div onclick="onclicked()" id="divInsideForm">Click here</div>
946         </form></body>
947         <script>
948         function onclicked() {
949           alert("onclicked");
950         }
951         </script>
952         </html>
953
954         If we click "Click here", JavaScript throws "Uncaught TypeError: undefined has no properties".
955
956         This is a regression caused by r110315. V8LazyEventListener should not use
957         'arguments' to retrieve the execution contexts, since 'arguments' can be
958         shadowed by JavaScript.
959
960         This patch changes V8LazyEventListener so that it retrieves contexts
961         by this[2], this[1] and this[0].
962
963         Test: fast/forms/form-input-named-arguments.html
964
965         * bindings/v8/V8LazyEventListener.cpp:
966         (WebCore::V8LazyEventListener::prepareListenerObject):
967
968 2012-05-22  Kentaro Hara  <haraken@chromium.org>
969
970         [V8] setDOMException() should return v8::Handle<v8::Value>()
971         https://bugs.webkit.org/show_bug.cgi?id=87083
972
973         Reviewed by Adam Barth.
974
975         The following patterns are used here and there in V8 bindings:
976
977             setDOMException();
978             return v8::Handle<v8::Value>();
979
980         and
981
982             setDOMException();
983             return v8::Undefined();
984
985         By returning v8::Handle<v8::Value>() from setDOMException(), we can simplify the above patterns into this:
986
987             return setDOMException();
988
989         This patch just replaces the code in CodeGeneratorV8.pm. I'll replace
990         all other custom bindings in a follow-up patch.
991
992         No tests. No change in behavior.
993
994         * bindings/scripts/CodeGeneratorV8.pm:
995         (GenerateSetDOMException):
996         (GenerateFunctionCallback):
997         (GenerateFunctionCallString):
998         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
999         (WebCore::TestEventTargetV8Internal::itemCallback):
1000         (WebCore::TestEventTargetV8Internal::dispatchEventCallback):
1001         * bindings/scripts/test/V8/V8TestInterface.cpp:
1002         (WebCore::TestInterfaceV8Internal::supplementalMethod2Callback):
1003         * bindings/scripts/test/V8/V8TestObj.cpp:
1004         (WebCore::TestObjV8Internal::attrWithGetterExceptionAttrGetter):
1005         (WebCore::TestObjV8Internal::stringAttrWithGetterExceptionAttrGetter):
1006         (WebCore::TestObjV8Internal::withScriptStateAttributeRaisesAttrGetter):
1007         (WebCore::TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrGetter):
1008         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrGetter):
1009         (WebCore::TestObjV8Internal::methodThatRequiresAllArgsAndThrowsCallback):
1010         (WebCore::TestObjV8Internal::methodWithExceptionCallback):
1011         (WebCore::TestObjV8Internal::withScriptStateVoidExceptionCallback):
1012         (WebCore::TestObjV8Internal::withScriptStateObjExceptionCallback):
1013         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateObjExceptionCallback):
1014         (WebCore::TestObjV8Internal::getSVGDocumentCallback):
1015         (WebCore::TestObjV8Internal::strictFunctionCallback):
1016         * bindings/v8/V8Proxy.cpp:
1017         (WebCore::V8Proxy::setDOMException):
1018         * bindings/v8/V8Proxy.h:
1019         (V8Proxy):
1020
1021 2012-05-22  MORITA Hajime  <morrita@google.com>
1022
1023         Unreviewed expectations update against r117989.
1024
1025         * bindings/scripts/test/V8/V8Float64Array.cpp:
1026         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
1027         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
1028         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
1029         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
1030         * bindings/scripts/test/V8/V8TestException.cpp:
1031         * bindings/scripts/test/V8/V8TestInterface.cpp:
1032         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
1033         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
1034         * bindings/scripts/test/V8/V8TestNode.cpp:
1035         * bindings/scripts/test/V8/V8TestObj.cpp:
1036         (WebCore::V8TestObj::installPerContextProperties):
1037         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
1038
1039 2012-05-21  Ilya Tikhonovsky  <loislo@chromium.org>
1040
1041         Web Inspector: migrate dominatorIndex code to the front-end calculated dominatorsTree.
1042         https://bugs.webkit.org/show_bug.cgi?id=87024
1043
1044         Reviewed by Yury Semikhatsky.
1045
1046         * inspector/front-end/HeapSnapshot.js:
1047         (WebInspector.HeapSnapshotNode.prototype.get dominatorIndex):
1048         (WebInspector.HeapSnapshot.prototype._init):
1049
1050 2012-05-22  Kentaro Hara  <haraken@chromium.org>
1051
1052         [V8] Replace 'throwError(); return Undefined();' with 'return throwError()'
1053         https://bugs.webkit.org/show_bug.cgi?id=87079
1054
1055         Reviewed by Adam Barth.
1056
1057         This patch replaces
1058
1059             throwError();
1060             return v8::Undefined();
1061
1062         with
1063
1064             return throwError();
1065
1066         No tests. No change in behavior.
1067
1068         * bindings/v8/DateExtension.cpp:
1069         (WebCore::DateExtension::OnSleepDetected):
1070         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
1071         (WebCore::V8HTMLDocument::openCallback):
1072         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
1073         (WebCore::V8InjectedScriptHost::inspectedObjectCallback):
1074         * bindings/v8/custom/V8SQLResultSetRowListCustom.cpp:
1075         (WebCore::V8SQLResultSetRowList::itemCallback):
1076         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
1077         (WebCore::V8WebGLRenderingContext::getAttachedShadersCallback):
1078         (WebCore::V8WebGLRenderingContext::getProgramParameterCallback):
1079         (WebCore::V8WebGLRenderingContext::getShaderParameterCallback):
1080         (WebCore::V8WebGLRenderingContext::getUniformCallback):
1081         (WebCore::vertexAttribAndUniformHelperf):
1082         (WebCore::uniformHelperi):
1083         (WebCore::uniformMatrixHelper):
1084
1085 2012-05-22  Kenneth Russell  <kbr@google.com>
1086
1087         Must set/reset pixel unpack alignment to 1 during texSubImage2D
1088         https://bugs.webkit.org/show_bug.cgi?id=86877
1089
1090         Reviewed by James Robinson.
1091
1092         Set pixel unpack alignment to 1 during upload, resetting afterward.
1093
1094         Tests: fast/canvas/webgl/tex-image-and-sub-image-2d-with-canvas-rgb565.html
1095                fast/canvas/webgl/tex-image-and-sub-image-2d-with-canvas-rgba4444.html
1096                fast/canvas/webgl/tex-image-and-sub-image-2d-with-canvas-rgba5551.html
1097                fast/canvas/webgl/tex-image-and-sub-image-2d-with-canvas.html
1098                fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-data-rgb565.html
1099                fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-data-rgba4444.html
1100                fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-data-rgba5551.html
1101                fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-rgb565.html
1102                fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-rgba4444.html
1103                fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-rgba5551.html
1104
1105         * html/canvas/WebGLRenderingContext.cpp:
1106         (WebCore::WebGLRenderingContext::texSubImage2DImpl):
1107         (WebCore::WebGLRenderingContext::texSubImage2D):
1108             Set pixel unpack alignment to 1 during upload; reset afterward.
1109
1110 2012-05-21  Sam D  <dsam2912@gmail.com>
1111
1112         Web Inspector: "Deactivate All Breakpoints" should visually get reflected in Breakpoints pane.
1113         https://bugs.webkit.org/show_bug.cgi?id=86844
1114
1115         Reviewed by Pavel Feldman.
1116
1117         Added an option for activate/deactivate breakpoints into Breakpoints
1118         pane section. Style properties has been attached with
1119         breakpoint list to reflect active state of breakpoints.
1120
1121         No new tests. UI Change.
1122
1123         * English.lproj/localizedStrings.js:
1124         * inspector/front-end/BreakpointsSidebarPane.js:
1125         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointContextMenu):
1126         * inspector/front-end/ScriptsPanel.js:
1127         (WebInspector.ScriptsPanel.prototype._breakpointsActiveStateChanged):
1128         * inspector/front-end/inspector.css:
1129         (.breakpoints-list-deactivated):
1130
1131 2012-05-21  Alexis Menard  <alexis.menard@openbossa.org>
1132
1133         Web Inspector: Remove some dead code in CSSStyleModel.js.
1134         https://bugs.webkit.org/show_bug.cgi?id=87048
1135
1136         Reviewed by Pavel Feldman.
1137
1138         Remove dead and unused code in CSSStyleModel.js.
1139
1140         No new tests : the code is supposedly dead so we should not have
1141         any regressions.
1142
1143         * inspector/front-end/CSSStyleModel.js:
1144
1145 2012-05-21  Adam Barth  <abarth@webkit.org>
1146
1147         !HAVE(ACCESSIBILITY) should be able to build without linking in any code from WebCore/accessibility
1148         https://bugs.webkit.org/show_bug.cgi?id=87035
1149
1150         Reviewed by Chris Fleizach.
1151
1152         The OS(ANDROID) already builds with !HAVE(ACCESSIBILITY), but because
1153         there are a few straggling references to objects in the
1154         WebCore/accessibility directory, we end up pulling in a bunch of code
1155         into the binary that we don't need.
1156
1157         This patch stubs out a few more functions for !HAVE(ACCESSIBILITY) so
1158         we can link without any objects from WebCore/accessibility. This patch
1159         also locks in that property by actually excluding the
1160         WebCore/accessibility directory from the build on OS(ANDROID).
1161
1162         * WebCore.gyp/WebCore.gyp:
1163         * accessibility/AXObjectCache.h:
1164         (AXObjectCache):
1165         (WebCore::AXObjectCache::enableAccessibility):
1166         (WebCore::AXObjectCache::setEnhancedUserInterfaceAccessibility):
1167         (WebCore::AXObjectCache::accessibilityEnabled):
1168         (WebCore::AXObjectCache::accessibilityEnhancedUserInterfaceEnabled):
1169         (WebCore::AXObjectCache::AXObjectCache):
1170         (WebCore::AXObjectCache::~AXObjectCache):
1171         (WebCore::AXObjectCache::get):
1172         (WebCore::AXObjectCache::getOrCreate):
1173         (WebCore::AXObjectCache::rootObject):
1174         (WebCore::AXObjectCache::rootObjectForFrame):
1175         (WebCore::AXObjectCache::rootAXEditableElement):
1176         (WebCore::AXObjectCache::childrenChanged):
1177         (WebCore::AXObjectCache::contentChanged):
1178         (WebCore::AXObjectCache::detachWrapper):
1179         (WebCore::AXObjectCache::handleActiveDescendantChanged):
1180         (WebCore::AXObjectCache::handleAriaRoleChanged):
1181         (WebCore::AXObjectCache::handleFocusedUIElementChanged):
1182         (WebCore::AXObjectCache::handleScrolledToAnchor):
1183         (WebCore::AXObjectCache::nodeTextChangeNotification):
1184         (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
1185         (WebCore::AXObjectCache::postNotification):
1186         (WebCore::AXObjectCache::postPlatformNotification):
1187         (WebCore::AXObjectCache::remove):
1188         (WebCore::AXObjectCache::selectedChildrenChanged):
1189         * accessibility/AccessibilityObject.h:
1190         (WebCore):
1191         (WebCore::AccessibilityObject::updateBackingStore):
1192         (WebCore::AccessibilityObject::lineForPosition):
1193         (WebCore::AccessibilityObject::children):
1194
1195 2012-05-21  Andreas Kling  <kling@webkit.org>
1196
1197         Use stack-allocated BitArray in StylePropertySet serialization.
1198         <http://webkit.org/b/87071>
1199
1200         Reviewed by Anders Carlsson.
1201
1202         Use BitArray instead of BitVector to track seen properties in StylePropertySet::asText().
1203         This removes two heap allocations from this path.
1204
1205         * css/StylePropertySet.cpp:
1206         (WebCore::StylePropertySet::asText):
1207
1208 2012-05-21  Hajime Morrita  <morrita@chromium.org>
1209
1210         Unreviewed Qt build fix against r117898.
1211
1212         * Target.pri:
1213
1214 2012-05-21  Hajime Morrita  <morrita@chromium.org>
1215
1216         [V8] Shadow DOM should be per-window-configurable.
1217         https://bugs.webkit.org/show_bug.cgi?id=86555
1218
1219         Reviewed by Kentaro Hara.
1220
1221         This change introduces an IDL attribute named "V8EnabledAtContext"
1222         which allows DOMWindow properties to be turned on or off per
1223         windows basis. RuntimeEnabledFeatures::xxxAllowed() method decides the availability.
1224
1225         - CodeGeneratorV8.pm now accepts V8EnabledAtContext and allows such properties
1226           to be configured per-Object basis, instead of per-ObjectTemplate basis.
1227           The script generates V8Window::installPerContextProperties(), which injects such
1228           per-object-turnable properties to newly created DOMWindow wrapper.
1229         - Added RuntimeEnabledFeatures::shadowDOMAllowed(DOMWindow*) which is used to
1230           decide the shadow dom availability of Shadow DOM feature.
1231           It delegates the call to FrameLoaderClient::shadowDOMAllowed() to make the decision.
1232         - The new IDL attribute is applied to DOMWindow.WebKitShadowRoot.
1233         - Updated existing shadowDOMEnabled() call sites with shadowDOMAllowed().
1234
1235         No new tests except run-bindings-test. This isn't testable from
1236         DRT and this change itself doesn't chagne the behaviour.  It needs
1237         a client implementation.
1238
1239         * CMakeLists.txt:
1240         * GNUmakefile.list.am:
1241         * Target.pri:
1242         * WebCore.gypi:
1243         * WebCore.vcproj/WebCore.vcproj:
1244         * WebCore.xcodeproj/project.pbxproj:
1245         * bindings/generic/ContextEnabledFeatures.cpp: Added.
1246         (WebCore):
1247         (WebCore::ContextEnabledFeatures::shadowDOMEnabled):
1248         * bindings/generic/ContextEnabledFeatures.h: Added.
1249         (WebCore):
1250         (ContextEnabledFeatures):
1251         * bindings/scripts/CodeGeneratorV8.pm:
1252         (GenerateHeader):
1253         (GenerateImplementation):
1254         (GetContextEnableFunction):
1255         * bindings/scripts/IDLAttributes.txt:
1256         * bindings/scripts/test/TestObj.idl:
1257         * bindings/scripts/test/V8/V8TestObj.cpp:
1258         (WebCore::TestObjV8Internal::enabledAtContextAttr1AttrGetter):
1259         (TestObjV8Internal):
1260         (WebCore::TestObjV8Internal::enabledAtContextAttr1AttrSetter):
1261         (WebCore::TestObjV8Internal::enabledAtContextAttr2AttrGetter):
1262         (WebCore::TestObjV8Internal::enabledAtContextAttr2AttrSetter):
1263         (WebCore::V8TestObj::installPerContextProperties):
1264         * bindings/scripts/test/V8/V8TestObj.h:
1265         (V8TestObj):
1266         * bindings/v8/V8DOMWindowShell.cpp:
1267         (WebCore::V8DOMWindowShell::installDOMWindow): Adopted installPerContextProperties()
1268         * bindings/v8/V8Proxy.h:
1269         (WebCore):
1270         (WebCore::configureAttribute): Generalized to accept both ObjectTemplate and Object.
1271         * dom/Position.cpp: Adopted ContextEnabledFeatures
1272         (WebCore::Position::Position):
1273         (WebCore::Position::findParent):
1274         * dom/ShadowRoot.idl:
1275         * dom/TreeScope.cpp:
1276         (WebCore::TreeScope::getSelection):
1277         * html/shadow/HTMLContentElement.cpp: Adopted ContextEnabledFeatures
1278         (WebCore::contentTagName):
1279         (WebCore::HTMLContentElement::create):
1280         * loader/FrameLoaderClient.h:
1281         (FrameLoaderClient):
1282         (WebCore::FrameLoaderClient::shadowDOMAllowed): Added with a default behavior.
1283         * page/DOMWindow.cpp:
1284         * page/DOMWindow.idl:
1285
1286
1287 2012-05-21  Tony Chang  <tony@chromium.org>
1288
1289         auto margins on flexbox should allocate space in the flex direction
1290         https://bugs.webkit.org/show_bug.cgi?id=83086
1291
1292         Reviewed by Ojan Vafai.
1293
1294         Test: css3/flexbox/flex-flow-auto-margins.html
1295
1296         * rendering/RenderFlexibleBox.cpp:
1297         (WebCore::RenderFlexibleBox::autoMarginOffsetInMainAxis):
1298         (WebCore):
1299         (WebCore::RenderFlexibleBox::updateAutoMarginsInMainAxis):
1300         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Update the margins on the RenderBox *after* we do the final child layout.
1301         * rendering/RenderFlexibleBox.h:
1302
1303 2012-05-21  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1304
1305         [EFL] Add inital mediaControlsEflfullscreen.css for fullscreen control UI
1306         https://bugs.webkit.org/show_bug.cgi?id=86988
1307
1308         Reviewed by Eric Carlson.
1309
1310         In order to support fullscreen feature, EFL port needs to have new css file for fullscreen media control UI.
1311
1312         No new tests because this patch is covered by existing tests.
1313
1314         * PlatformEfl.cmake:
1315         * css/mediaControlsEflFullscreen.css: Added.
1316         (video::-webkit-media-controls-panel):
1317         (video:-webkit-full-page-media::-webkit-media-controls-panel):
1318         (video::-webkit-media-controls-mute-button):
1319         (video::-webkit-media-controls-play-button):
1320         (video::-webkit-media-controls-timeline-container):
1321         (video::-webkit-media-controls-current-time-display):
1322         (video::-webkit-media-controls-time-remaining-display):
1323         (video::-webkit-media-controls-timeline):
1324         (video::-webkit-media-controls-volume-slider-container):
1325         (video::-webkit-media-controls-volume-slider):
1326         (video::-webkit-media-controls-seek-back-button):
1327         (video::-webkit-media-controls-seek-forward-button):
1328         (video::-webkit-media-controls-fullscreen-button):
1329         (video::-webkit-media-controls-rewind-button):
1330         (video::-webkit-media-controls-return-to-realtime-button):
1331         (video::-webkit-media-controls-toggle-closed-captions-button):
1332         * platform/efl/RenderThemeEfl.cpp:
1333         (WebCore):
1334         (WebCore::RenderThemeEfl::extraFullScreenStyleSheet):
1335         * platform/efl/RenderThemeEfl.h:
1336         (RenderThemeEfl):
1337
1338 2012-05-21  Kentaro Hara  <haraken@chromium.org>
1339
1340         [V8] Remove V8Proxy::notHandledByInterceptor()
1341         https://bugs.webkit.org/show_bug.cgi?id=86831
1342
1343         Reviewed by Adam Barth.
1344
1345         This patch replaces 'return V8Proxy::notHandledByInterceptor()'
1346         with 'return v8::Handle<v8::Value>()'. See the discussion in
1347         https://bugs.webkit.org/show_bug.cgi?id=85330 for more details.
1348
1349         No tests. No change in behavior.
1350
1351         * bindings/scripts/CodeGeneratorV8.pm:
1352         (GenerateOverloadedFunctionCallback):
1353         (GenerateParametersCheck):
1354         * bindings/scripts/test/V8/V8TestObj.cpp:
1355         (WebCore::TestObjV8Internal::overloadedMethodCallback):
1356         (WebCore::TestObjV8Internal::overloadedMethod1Callback):
1357         * bindings/v8/V8Collection.h:
1358         (WebCore::collectionNamedPropertyGetter):
1359         * bindings/v8/V8DOMWrapper.cpp:
1360         (WebCore::V8DOMWrapper::convertEventTargetToV8Object):
1361         * bindings/v8/V8NPObject.cpp:
1362         (WebCore::npObjectSetProperty):
1363         * bindings/v8/V8Proxy.cpp:
1364         (WebCore::V8Proxy::runScript):
1365         (WebCore::V8Proxy::throwError):
1366         * bindings/v8/V8Proxy.h:
1367         (WebCore):
1368         * bindings/v8/custom/V8ArrayBufferViewCustom.h:
1369         (WebCore::constructWebGLArrayWithArrayBufferArgument):
1370         (WebCore::setWebGLArrayHelper):
1371         * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
1372         (WebCore::V8CSSStyleDeclaration::namedPropertyGetter):
1373         (WebCore::V8CSSStyleDeclaration::namedPropertySetter):
1374         * bindings/v8/custom/V8DOMStringMapCustom.cpp:
1375         (WebCore::V8DOMStringMap::namedPropertyGetter):
1376         * bindings/v8/custom/V8DOMWindowCustom.cpp:
1377         (WebCore::V8DOMWindow::indexedPropertyGetter):
1378         (WebCore::V8DOMWindow::namedPropertyGetter):
1379         * bindings/v8/custom/V8HTMLAllCollectionCustom.cpp:
1380         (WebCore::V8HTMLAllCollection::namedPropertyGetter):
1381         * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
1382         (WebCore::V8HTMLCollection::namedPropertyGetter):
1383         * bindings/v8/custom/V8HTMLFormElementCustom.cpp:
1384         (WebCore::V8HTMLFormElement::indexedPropertyGetter):
1385         (WebCore::V8HTMLFormElement::namedPropertyGetter):
1386         * bindings/v8/custom/V8HTMLFrameSetElementCustom.cpp:
1387         (WebCore::V8HTMLFrameSetElement::namedPropertyGetter):
1388         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
1389         (WebCore::V8HTMLOptionsCollection::indexedPropertyGetter):
1390         * bindings/v8/custom/V8HTMLPlugInElementCustom.cpp:
1391         (WebCore::npObjectNamedGetter):
1392         (WebCore::npObjectNamedSetter):
1393         (WebCore::npObjectIndexedGetter):
1394         (WebCore::npObjectIndexedSetter):
1395         * bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
1396         (WebCore::V8HTMLSelectElement::indexedPropertyGetter):
1397         * bindings/v8/custom/V8NamedNodeMapCustom.cpp:
1398         (WebCore::V8NamedNodeMap::indexedPropertyGetter):
1399         (WebCore::V8NamedNodeMap::namedPropertyGetter):
1400         * bindings/v8/custom/V8NodeListCustom.cpp:
1401         (WebCore::V8NodeList::namedPropertyGetter):
1402         * bindings/v8/custom/V8StorageCustom.cpp:
1403         (WebCore::storageGetter):
1404         (WebCore::V8Storage::namedPropertyGetter):
1405         (WebCore::storageSetter):
1406         * bindings/v8/custom/V8StyleSheetListCustom.cpp:
1407         (WebCore::V8StyleSheetList::namedPropertyGetter):
1408         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
1409         (WebCore::V8WebGLRenderingContext::getAttachedShadersCallback):
1410         (WebCore::V8WebGLRenderingContext::getProgramParameterCallback):
1411         (WebCore::V8WebGLRenderingContext::getShaderParameterCallback):
1412         (WebCore::V8WebGLRenderingContext::getUniformCallback):
1413         (WebCore::vertexAttribAndUniformHelperf):
1414         (WebCore::uniformHelperi):
1415         (WebCore::uniformMatrixHelper):
1416
1417 2012-05-21  Rob Buis  <rbuis@rim.com>
1418
1419         Shrink FontDescription object size
1420         https://bugs.webkit.org/show_bug.cgi?id=86950
1421
1422         Reviewed by Alexey Proskuryakov.
1423
1424         Reduce object size of FontDescription by 8 bytes on 64-bit, 4 bytes on 32-bit systems.
1425         Note that this means Font, StyleInheritedData and RenderSVGInlineText shrink too.
1426
1427         * platform/graphics/FontDescription.cpp:
1428         * platform/graphics/FontDescription.h:
1429         (WebCore::FontDescription::script):
1430         (FontDescription):
1431
1432 2012-05-21  Abhishek Arya  <inferno@chromium.org>
1433
1434         Regression(r117482): Run-in crashes relating to generated content and inline line box clearing.
1435         https://bugs.webkit.org/show_bug.cgi?id=86879
1436
1437         Reviewed by Julien Chaffraix.
1438
1439         Tests: fast/runin/generated-content-crash.html
1440                fast/runin/move-run-in-original-position-crash.html
1441
1442         * rendering/RenderBlock.cpp:
1443         (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks): Use the new helper
1444         placeRunInIfNeeded. Do not place the run-in if it is a generated container since
1445         the caller such as updateBeforeAfterContent might be keeping a reference to it
1446         and adding children to it later.
1447         (WebCore::destroyRunIn): Add ability to clear line box tree for inlines.
1448         (WebCore::RenderBlock::placeRunInIfNeeded): Helper to place run-in. Add an
1449         argument to not modify generated content during addChild, it should be moved
1450         only at end of updateBeforeAfterContent.
1451         (WebCore::RenderBlock::moveRunInUnderSiblingBlockIfNeeded): 
1452         (WebCore::RenderBlock::runInIsPlacedIntoSiblingBlock): helper to tell if this run-in
1453         is actually placed into the next sibling block.
1454         (WebCore::RenderBlock::moveRunInToOriginalPosition):
1455         * rendering/RenderInline.cpp:
1456         (WebCore::RenderInline::deleteLineBoxTree): like RenderBlock, add a helper
1457         for deleteLineBoxTree. Virtualizing this might not be good, since this is
1458         the only call site for inline line box tree clearing and RenderBlock::deleteLineBoxTree
1459         is called a lot.
1460         * rendering/RenderObjectChildList.cpp:
1461         (WebCore::createRendererForBeforeAfterContent): fix a typo.
1462         (WebCore::RenderObjectChildList::updateBeforeAfterContent): If insertBefore is equal
1463         to the intruded run-in, then set it to next sibling so that new child will come after it. At
1464         the end, place the generatedContainer if it is a run-in.
1465
1466 2012-05-21  James Robinson  <jamesr@chromium.org>
1467
1468         [chromium] Port chromium compositor to use WebFilterOperation(s)
1469         https://bugs.webkit.org/show_bug.cgi?id=87046
1470
1471         Reviewed by Adrienne Walker.
1472
1473         This converts all compositor implementation logic to use WebFilterOperation(s) directly instead of the WebCore
1474         types. GraphicsLayerChromium bridges between a WebCore::FilterOperations to WebFilterOperations, doing the
1475         necessary type conversions and checking for filters that our compositor implementation supports. This cleans up
1476         the chromium compositor's dependencies and removes any thread constraints from WebCore::FilterOperation /
1477         WebCore::FilterOperations.
1478
1479         Covered by existing layout tests and unit tests in FilterOperationsTest.cpp
1480
1481         * WebCore.gyp/WebCore.gyp:
1482         * WebCore.gypi:
1483         * platform/chromium/support/WebFilterOperations.cpp: Moved to Source/Platform/chromium/src/
1484         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
1485         (WebCore::copyWebCoreFilterOperationsToWebFilterOperations):
1486         (WebCore):
1487         (WebCore::GraphicsLayerChromium::setFilters):
1488         (WebCore::GraphicsLayerChromium::setBackgroundFilters):
1489         (WebCore::GraphicsLayerChromium::updateTransform):
1490         (WebCore::GraphicsLayerChromium::updateChildrenTransform):
1491         * platform/graphics/chromium/GraphicsLayerChromium.h:
1492         (GraphicsLayerChromium):
1493         * platform/graphics/chromium/LayerChromium.cpp:
1494         (WebCore::LayerChromium::setFilters):
1495         (WebCore::LayerChromium::setBackgroundFilters):
1496         (WebCore::LayerChromium::pushPropertiesTo):
1497         * platform/graphics/chromium/LayerChromium.h:
1498         (LayerChromium):
1499         (WebCore::LayerChromium::filters):
1500         (WebCore::LayerChromium::backgroundFilters):
1501         * platform/graphics/chromium/RenderSurfaceChromium.h:
1502         (WebCore::RenderSurfaceChromium::setFilters):
1503         (WebCore::RenderSurfaceChromium::filters):
1504         (WebCore::RenderSurfaceChromium::setBackgroundFilters):
1505         (WebCore::RenderSurfaceChromium::backgroundFilters):
1506         (RenderSurfaceChromium):
1507         * platform/graphics/chromium/cc/CCDamageTracker.cpp:
1508         (WebCore::expandDamageRectWithFilters):
1509         (WebCore::expandDamageRectInsideRectWithFilters):
1510         (WebCore::CCDamageTracker::updateDamageTrackingState):
1511         * platform/graphics/chromium/cc/CCDamageTracker.h:
1512         (WebKit):
1513         (WebCore):
1514         (CCDamageTracker):
1515         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
1516         (WebCore::CCLayerImpl::setFilters):
1517         (WebCore::CCLayerImpl::setBackgroundFilters):
1518         * platform/graphics/chromium/cc/CCLayerImpl.h:
1519         (CCLayerImpl):
1520         (WebCore::CCLayerImpl::filters):
1521         (WebCore::CCLayerImpl::backgroundFilters):
1522         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
1523         (WebCore::CCRenderSurface::applyFilters):
1524         * platform/graphics/chromium/cc/CCRenderSurface.h:
1525         (WebCore::CCRenderSurface::setFilters):
1526         (WebCore::CCRenderSurface::filters):
1527         (CCRenderSurface):
1528         (WebCore::CCRenderSurface::setBackgroundFilters):
1529         (WebCore::CCRenderSurface::backgroundFilters):
1530         * platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp:
1531         (WebCore::CCRenderSurfaceFilters::apply):
1532         * platform/graphics/chromium/cc/CCRenderSurfaceFilters.h:
1533         (WebKit):
1534         (CCRenderSurfaceFilters):
1535         * testing/Internals.cpp:
1536         (WebCore::Internals::setBackgroundBlurOnNode):
1537
1538 2012-05-15  Gavin Barraclough  <barraclough@apple.com>
1539
1540         Add support for private names
1541         https://bugs.webkit.org/show_bug.cgi?id=86509
1542
1543         Reviewed by Oliver Hunt.
1544
1545         The spec isn't final, but we can start adding support to allow property maps
1546         to contain keys that aren't identifiers.
1547
1548         Test: fast/js/names.html
1549
1550         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1551         (WebCore::cssPropertyIDForJSCSSPropertyName):
1552         * bindings/js/JSDOMBinding.cpp:
1553         (WebCore::findAtomicString):
1554         (WebCore::objectToStringFunctionGetter):
1555         * bindings/js/JSDOMBinding.h:
1556         (WebCore::propertyNameToString):
1557         (WebCore::propertyNameToAtomicString):
1558         * bindings/js/JSDOMWindowCustom.cpp:
1559         (WebCore::nonCachingStaticFunctionGetter):
1560         * bindings/js/JSHistoryCustom.cpp:
1561         (WebCore::nonCachingStaticBackFunctionGetter):
1562         (WebCore::nonCachingStaticForwardFunctionGetter):
1563         (WebCore::nonCachingStaticGoFunctionGetter):
1564         * bindings/js/JSLocationCustom.cpp:
1565         (WebCore::nonCachingStaticReplaceFunctionGetter):
1566         (WebCore::nonCachingStaticReloadFunctionGetter):
1567         (WebCore::nonCachingStaticAssignFunctionGetter):
1568         * bridge/c/c_class.cpp:
1569         (JSC::Bindings::CClass::methodsNamed):
1570         (JSC::Bindings::CClass::fieldNamed):
1571         * bridge/c/c_instance.cpp:
1572         (JSC::Bindings::CInstance::getMethod):
1573         * bridge/jni/jsc/JavaClassJSC.cpp:
1574         (JavaClass::methodsNamed):
1575         (JavaClass::fieldNamed):
1576         * bridge/jni/jsc/JavaInstanceJSC.cpp:
1577         * bridge/objc/objc_class.mm:
1578         (JSC::Bindings::ObjcClass::methodsNamed):
1579         (JSC::Bindings::ObjcClass::fieldNamed):
1580         (JSC::Bindings::ObjcClass::fallbackObject):
1581         * bridge/objc/objc_instance.mm:
1582         (ObjcInstance::setValueOfUndefinedField):
1583         (ObjcInstance::getValueOfUndefinedField):
1584             - Removed PropertyName::impl(), call publicName() to get the string associated with a name.
1585
1586 2012-05-21  Tim Horton  <timothy_horton@apple.com>
1587
1588         GeneratorGeneratedImage should cache intermediate images
1589         https://bugs.webkit.org/show_bug.cgi?id=86906
1590         <rdar://problem/11484852>
1591
1592         Reviewed by Dean Jackson.
1593
1594         Cache generated images in GeneratorGeneratedImage. The cache is invalidated:
1595             a) if the Generator's hash changes.
1596             b) if the rendered size changes.
1597             c) if the cached image is incompatible with the destination context (acceleration state or CTM scale).
1598             d) after one second of disuse.
1599
1600         Add a hash() function to Generator, which should be implemented in subclasses
1601         to provide a straightforward way to determine if Generators have been mutated
1602         in a way that will affect the resultant rendering.
1603
1604         No new tests, performance optimization. Correctness is covered by the multitude of existing gradient tests.
1605
1606         * platform/graphics/Generator.h:
1607         (Generator):
1608         * platform/graphics/GeneratorGeneratedImage.cpp:
1609         (WebCore::GeneratorGeneratedImage::drawPattern):
1610         * platform/graphics/GeneratorGeneratedImage.h:
1611         (WebCore):
1612         (GeneratorGeneratedImage):
1613         (WebCore::GeneratorGeneratedImage::~GeneratorGeneratedImage):
1614         (WebCore::GeneratorGeneratedImage::GeneratorGeneratedImage):
1615         (GeneratedImageCacheTimer):
1616         (WebCore::GeneratorGeneratedImage::GeneratedImageCacheTimer::GeneratedImageCacheTimer):
1617         (WebCore::GeneratorGeneratedImage::GeneratedImageCacheTimer::restart):
1618         * platform/graphics/Gradient.cpp:
1619         (WebCore::Gradient::Gradient):
1620         (WebCore::Gradient::addColorStop):
1621         (WebCore::Gradient::sortStopsIfNecessary):
1622         (WebCore::Gradient::setSpreadMethod):
1623         (WebCore::Gradient::setGradientSpaceTransform):
1624         (WebCore::Gradient::hash):
1625         * platform/graphics/Gradient.h:
1626         (WebCore::Gradient::setP0):
1627         (WebCore::Gradient::setP1):
1628         (WebCore::Gradient::setStartRadius):
1629         (WebCore::Gradient::setEndRadius):
1630         (Gradient):
1631         (WebCore::Gradient::clearHashCache):
1632         * platform/graphics/GraphicsContext.cpp:
1633         (WebCore::GraphicsContext::isCompatibleWithBuffer):
1634         (WebCore):
1635         * platform/graphics/GraphicsContext.h:
1636         (GraphicsContext):
1637
1638 2012-05-21  Emil A Eklund  <eae@chromium.org>
1639
1640         Fix bug in paintNinePieceImage exposed by subpixel change
1641         https://bugs.webkit.org/show_bug.cgi?id=87060
1642
1643         Reviewed by Levi Weintraub.
1644
1645         Fix rounding in paintNinePieceImage where the left/right images where
1646         drawn on subpixel bounds.
1647
1648         Covered by existing tests.
1649
1650         * rendering/RenderBoxModelObject.cpp:
1651         (WebCore::RenderBoxModelObject::paintNinePieceImage):
1652
1653 2012-05-21  Emil A Eklund  <eae@chromium.org>
1654
1655         Move padding/margin/offset writing mode logic from RenderStyle to LengthBox
1656         https://bugs.webkit.org/show_bug.cgi?id=86970
1657
1658         Reviewed by Eric Seidel.
1659
1660         Move writing mode and bidi logic for paddings, margins and offsets from
1661         RenderStyle to LengthBox. This way the same logic can be used for all
1662         three removing unnecessary code duplication.
1663
1664         No new tests, no change in functionality.
1665
1666         * CMakeLists.txt:
1667         * GNUmakefile.list.am:
1668         * Target.pri:
1669         * WebCore.gypi:
1670         * WebCore.vcproj/WebCore.vcproj:
1671         * WebCore.xcodeproj/project.pbxproj:
1672         * platform/LengthBox.cpp: Added.
1673         * platform/LengthBox.h:
1674         * rendering/style/RenderStyle.cpp:
1675         * rendering/style/RenderStyle.h:
1676
1677 2012-05-21  Mike West  <mkwst@chromium.org>
1678
1679         Improving console error for CSP-blocked  `setTimeout` and `setInterval` evaluation.
1680         https://bugs.webkit.org/show_bug.cgi?id=86943
1681
1682         Reviewed by Adam Barth.
1683
1684         If the inspector is open, a stack trace is generated before calling
1685         ContentSecurityPolicy::allowEval, and passed through to
1686         ContentSecurityPolicy::reportViolation for use in the console message.
1687
1688         Test: http/tests/inspector-enabled/contentSecurityPolicy-blocks-setInterval.html
1689               http/tests/inspector-enabled/contentSecurityPolicy-blocks-setTimeout.html
1690
1691         * bindings/js/ScheduledAction.cpp:
1692         (WebCore::ScheduledAction::create):
1693         * bindings/v8/custom/V8DOMWindowCustom.cpp:
1694         (WebCore::WindowSetTimeoutImpl):
1695         * page/ContentSecurityPolicy.cpp:
1696         (CSPDirectiveList):
1697         (WebCore::CSPDirectiveList::reportViolation):
1698         (WebCore::CSPDirectiveList::checkEvalAndReportViolation):
1699         (WebCore::CSPDirectiveList::allowEval):
1700         (WebCore):
1701         (WebCore::isAllowedByAllWithCallStack):
1702         (WebCore::isAllowedByAllWithURL):
1703         (WebCore::ContentSecurityPolicy::allowEval):
1704         (WebCore::ContentSecurityPolicy::allowScriptFromSource):
1705         (WebCore::ContentSecurityPolicy::allowObjectFromSource):
1706         (WebCore::ContentSecurityPolicy::allowChildFrameFromSource):
1707         (WebCore::ContentSecurityPolicy::allowImageFromSource):
1708         (WebCore::ContentSecurityPolicy::allowStyleFromSource):
1709         (WebCore::ContentSecurityPolicy::allowFontFromSource):
1710         (WebCore::ContentSecurityPolicy::allowMediaFromSource):
1711         (WebCore::ContentSecurityPolicy::allowConnectToSource):
1712         * page/ContentSecurityPolicy.h:
1713         (WebCore):
1714
1715 2012-05-21  Antoine Labour  <piman@chromium.org>
1716
1717         Don't force rendering in finishAllRendering
1718         https://bugs.webkit.org/show_bug.cgi?id=86919
1719
1720         Reviewed by James Robinson.
1721
1722         After we acquire the texture layers on the main thread, we can't draw.
1723         In particular if we destroyed the texture ids used previously by
1724         TextureLayerChromium, drawing before a commit would cause a
1725         bind-after-destroy.
1726
1727         Tested by CCLayerTreeHostTestFinishAllRendering.
1728
1729         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
1730         (WebCore::CCThreadProxy::CCThreadProxy):
1731         (WebCore::CCThreadProxy::finishAllRenderingOnImplThread):
1732         (WebCore::CCThreadProxy::scheduledActionDrawAndSwapInternal):
1733
1734 2012-05-21  Joshua Bell  <jsbell@chromium.org>
1735
1736         IndexedDB: Store key paths in IDBKeyPath type instead of String
1737         https://bugs.webkit.org/show_bug.cgi?id=85298
1738
1739         Reviewed by Tony Chang, Kentaro Hara and James Robinson.
1740
1741         Migrate from storing key paths as (nullable) Strings to a dedicated IDBKeyPath
1742         type. Prep work for supporting array-type key paths: http://webkit.org/b/84207
1743
1744         Only functional change is handling of null/undefined parameters for key paths,
1745         to align with IDB spec, covered by layout test.
1746
1747         Test: storage/indexeddb/keypath-basics.html
1748         Test: WebKit/chromium/IDBLevelDBCodingTest.cpp
1749
1750         * Modules/indexeddb/IDBAny.cpp: Allow IDBAny to yield DOMStrings.
1751         (WebCore::IDBAny::createString):
1752         (WebCore):
1753         (WebCore::IDBAny::string):
1754         (WebCore::IDBAny::set):
1755         * Modules/indexeddb/IDBAny.h:
1756         (IDBAny):
1757         * Modules/indexeddb/IDBBackingStore.h: Switch from String to IDBKeyPath.
1758         (IDBBackingStore):
1759         * Modules/indexeddb/IDBDatabase.cpp: Switch from String to IDBKeyPath.
1760         (WebCore::IDBDatabase::createObjectStore):
1761         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: Switch from String to IDBKeyPath.
1762         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
1763         (WebCore::IDBDatabaseBackendImpl::loadObjectStores):
1764         * Modules/indexeddb/IDBDatabaseBackendImpl.h: Switch from String to IDBKeyPath.
1765         (IDBDatabaseBackendImpl):
1766         * Modules/indexeddb/IDBDatabaseBackendInterface.h: Switch from String to IDBKeyPath.
1767         (WebCore):
1768         (IDBDatabaseBackendInterface):
1769         * Modules/indexeddb/IDBIndex.h: Switch from String to IDBAny (via IDBKeyPath).
1770         (WebCore::IDBIndex::keyPath):
1771         * Modules/indexeddb/IDBIndex.idl: Switch from DOMString? to IDBAny.
1772         * Modules/indexeddb/IDBIndexBackendImpl.cpp: Switch from String to IDBKeyPath.
1773         (WebCore::IDBIndexBackendImpl::IDBIndexBackendImpl):
1774         * Modules/indexeddb/IDBIndexBackendImpl.h: Switch from String to IDBKeyPath.
1775         (WebCore::IDBIndexBackendImpl::create):
1776         (WebCore::IDBIndexBackendImpl::keyPath):
1777         (IDBIndexBackendImpl):
1778         * Modules/indexeddb/IDBIndexBackendInterface.h: Switch from String to IDBKeyPath.
1779         (WebCore):
1780         (IDBIndexBackendInterface):
1781         * Modules/indexeddb/IDBKeyPath.cpp: Non-trivial method implementations.
1782         (WebCore::IDBKeyPath::isValid):
1783         (WebCore):
1784         (WebCore::IDBKeyPath::operator PassRefPtr<IDBAny>):
1785         * Modules/indexeddb/IDBKeyPath.h: Introduce IDBKeyPath type.
1786         (IDBKeyPath):
1787         (WebCore::IDBKeyPath::IDBKeyPath):
1788         (WebCore::IDBKeyPath::type):
1789         (WebCore::IDBKeyPath::array):
1790         (WebCore::IDBKeyPath::string):
1791         (WebCore::IDBKeyPath::isNull):
1792         (WebCore):
1793         * Modules/indexeddb/IDBKeyPathBackendImpl.cpp: Switch from String to IDBKeyPath.
1794         (WebCore::IDBKeyPathBackendImpl::createIDBKeysFromSerializedValuesAndKeyPath):
1795         (WebCore::IDBKeyPathBackendImpl::injectIDBKeyIntoSerializedValue):
1796         * Modules/indexeddb/IDBKeyPathBackendImpl.h: Switch from String to IDBKeyPath.
1797         (WebCore):
1798         (IDBKeyPathBackendImpl):
1799         * Modules/indexeddb/IDBLevelDBBackingStore.cpp: Switch from String to IDBKeyPath, with back-compat.
1800         (WebCore):
1801         (WebCore::putIDBKeyPath):
1802         (WebCore::IDBLevelDBBackingStore::getObjectStores):
1803         (WebCore::IDBLevelDBBackingStore::createObjectStore):
1804         (WebCore::IDBLevelDBBackingStore::getIndexes):
1805         (WebCore::IDBLevelDBBackingStore::createIndex):
1806         * Modules/indexeddb/IDBLevelDBBackingStore.h:
1807         (IDBLevelDBBackingStore):
1808         * Modules/indexeddb/IDBLevelDBCoding.cpp: New coding scheme for key paths (with back-compat).
1809         (IDBLevelDBCoding):
1810         (WebCore::IDBLevelDBCoding::encodeIDBKeyPath):
1811         (WebCore::IDBLevelDBCoding::decodeIDBKeyPath):
1812         * Modules/indexeddb/IDBLevelDBCoding.h: Add key-path-specific methods.
1813         (WebCore):
1814         (IDBLevelDBCoding):
1815         * Modules/indexeddb/IDBObjectStore.cpp: Switch from String to IDBKeyPath.
1816         (WebCore::IDBObjectStore::keyPath):
1817         (WebCore::IDBObjectStore::createIndex):
1818         (WebCore):
1819         * Modules/indexeddb/IDBObjectStore.h: Switch from String to IDBAny (via IDBKeyPath).
1820         (IDBObjectStore):
1821         * Modules/indexeddb/IDBObjectStore.idl: Switch from DOMString? to IDBAny.
1822         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: Switch from String to IDBKeyPath.
1823         (WebCore::IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl):
1824         (WebCore::fetchKeyFromKeyPath):
1825         (WebCore::injectKeyIntoKeyPath):
1826         (WebCore::IDBObjectStoreBackendImpl::createIndex):
1827         (WebCore::IDBObjectStoreBackendImpl::loadIndexes):
1828         * Modules/indexeddb/IDBObjectStoreBackendImpl.h: Switch from String to IDBKeyPath.
1829         (WebCore::IDBObjectStoreBackendImpl::create):
1830         (WebCore::IDBObjectStoreBackendImpl::keyPath):
1831         (IDBObjectStoreBackendImpl):
1832         * Modules/indexeddb/IDBObjectStoreBackendInterface.h: Switch from String to IDBKeyPath.
1833         (WebCore):
1834         (IDBObjectStoreBackendInterface):
1835         * bindings/v8/Dictionary.cpp: Add getter for DOMString[] (i.e. Vector<String>)
1836         (WebCore):
1837         (WebCore::Dictionary::get):
1838         * bindings/v8/Dictionary.h:
1839         (Dictionary):
1840         * bindings/v8/IDBBindingUtilities.cpp: Switch from String to IDBKeyPath.
1841         (WebCore::createIDBKeyFromSerializedValueAndKeyPath):
1842         (WebCore::injectIDBKeyIntoSerializedValue):
1843         * bindings/v8/IDBBindingUtilities.h: Switch from String to IDBKeyPath.
1844         (WebCore):
1845         * bindings/v8/custom/V8IDBAnyCustom.cpp: Support String/DOMString.
1846         (WebCore::toV8):
1847         * dom/DOMStringList.h: Allow easy (const) access to strings.
1848         (WebCore::DOMStringList::operator const Vector<String>&):
1849         (DOMStringList):
1850         * inspector/InspectorIndexedDBAgent.cpp: Temporary shim for non-strings: see http://webkit.org/b/84303
1851         (WebCore):
1852         * platform/chromium/PlatformSupport.h: Switch from String to IDBKeyPath.
1853         (WebCore):
1854         (PlatformSupport):
1855         * storage/chromium/IDBKeyPathBackendImpl.cpp: Switch from String to IDBKeyPath.
1856         (WebCore::IDBKeyPathBackendImpl::createIDBKeysFromSerializedValuesAndKeyPath):
1857         (WebCore::IDBKeyPathBackendImpl::injectIDBKeyIntoSerializedValue):
1858
1859 2012-05-21  Zhenyao Mo  <zmo@google.com>
1860
1861         Restore WebGL's framebuffer binding after DrawingBuffer's prepareBackBuffer()
1862         https://bugs.webkit.org/show_bug.cgi?id=87032
1863
1864         Reviewed by James Robinson.
1865
1866         * platform/graphics/chromium/DrawingBufferChromium.cpp:
1867         (WebCore::DrawingBuffer::prepareBackBuffer): restore the user's framebuffer binding if there is one.
1868
1869 2012-05-21  Ryosuke Niwa  <rniwa@webkit.org>
1870
1871         isStartOfDocument and isEndOfDocument are poorly named
1872         https://bugs.webkit.org/show_bug.cgi?id=86649
1873
1874         Reviewed by Levi Weintraub.
1875
1876         Renamed isEndOfDocument to isEndOfEditableOrNonEditableContent because that's what this function checks.
1877
1878         Also added new versions of isStartOfDocument and isEndOfDocument that correctly cross editing boundaries
1879         to be used in selectFrameElementInParentIfFullySelected.
1880
1881         * editing/CompositeEditCommand.cpp:
1882         (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
1883         * editing/Editor.cpp:
1884         (WebCore::Editor::insertLineBreak):
1885         (WebCore::Editor::insertParagraphSeparator):
1886         * editing/ReplaceSelectionCommand.cpp:
1887         (WebCore::ReplaceSelectionCommand::doApply):
1888         * editing/VisibleSelection.cpp:
1889         (WebCore::VisibleSelection::setStartAndEndFromBaseAndExtentRespectingGranularity):
1890         * editing/visible_units.cpp:
1891         (WebCore::isEndOfEditableOrNonEditableContent):
1892         * editing/visible_units.h:
1893
1894 2012-05-21 Anna Cavender  <annacc@chromium.org>
1895
1896         Only render text track cues if kind=captions or kind=subtitles.
1897         https://bugs.webkit.org/show_bug.cgi?id=83321
1898
1899         Reviewed by Eric Carlson.
1900
1901         No new tests. Modification to media/track/track-kind.html
1902
1903         * html/HTMLMediaElement.cpp:
1904         (WebCore::HTMLMediaElement::textTrackKindChanged):
1905            If the kind changes from a 'visible' kind to a 'non-visible' kind,
1906            update the track's mode to HIDDEN.
1907
1908         * html/shadow/MediaControlElements.cpp:
1909         (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
1910             Do not render cues from tracks that are not captions or subtitles.
1911
1912         * html/track/TextTrack.cpp:
1913         (WebCore::TextTrack::setMode):
1914             If the track's mode changes from SHOWING to HIDDEN or DISABLED,
1915             ensure any currently visible cues will no longer be rendered.
1916
1917         * html/track/TextTrackCue.cpp:
1918         (WebCore::TextTrackCue::removeDisplayTree): New method.
1919         * html/track/TextTrackCue.h:
1920         (TextTrackCue):
1921  
1922 2012-05-21  Andreas Kling  <kling@webkit.org>
1923
1924         CSS: Move duplicate property elimination to parser.
1925         <http://webkit.org/b/86948>
1926
1927         Reviewed by Antti Koivisto.
1928
1929         Remove the StylePropertySet constructor that handled elimination of duplicate
1930         properties and move that to a new parser method, CSSParser::filteredProperties().
1931         Call sites are converted to using StylePropertySet(const Vector<CSSProperty>&).
1932
1933         Instead of building a hashmap of seen properties, use the new WTF::BitArray class
1934         to track whether a given property ID has been seen, and whether we have an
1935         !important entry for a given ID.
1936
1937         * css/CSSParser.cpp:
1938         (WebCore::CSSParser::parseValue):
1939         (WebCore::CSSParser::parseDeclaration):
1940         (WebCore::CSSParser::filteredProperties):
1941         (WebCore::CSSParser::createStyleRule):
1942         (WebCore::CSSParser::createFontFaceRule):
1943         (WebCore::CSSParser::createPageRule):
1944         (WebCore::CSSParser::createKeyframe):
1945         * css/CSSParser.h:
1946         * css/StylePropertySet.cpp:
1947         (WebCore::StylePropertySet::StylePropertySet):
1948         (WebCore::StylePropertySet::addParsedProperties):
1949         * css/StylePropertySet.h:
1950         (WebCore::StylePropertySet::create):
1951         (StylePropertySet):
1952         * svg/SVGFontFaceElement.cpp:
1953         (WebCore::SVGFontFaceElement::rebuildFontFace):
1954
1955 2012-05-21  Joshua Bell  <jsbell@chromium.org>
1956
1957         IndexedDB: Index key paths that yield invalid keys should not fail an add/put
1958         https://bugs.webkit.org/show_bug.cgi?id=86122
1959
1960         Reviewed by Tony Chang.
1961
1962         A clause was removed from the IDB spec. Previously, on add/put, if evaluating an
1963         index's key path yielded a value that was not a valid key, an exception would be
1964         raised. Now, it is treated the same as if no value was yielded.
1965
1966         Test: storage/indexeddb/index-basics.html
1967         Test: storage/indexeddb/index-basics-workers.html
1968         Test: storage/indexeddb/objectstore-basics.html
1969         Test: storage/indexeddb/objectstore-basics-workers.html
1970
1971         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
1972         (WebCore::IDBObjectStoreBackendImpl::put): Preconditions removed
1973         (WebCore::IDBObjectStoreBackendImpl::putInternal): Treat invalid keys the same as missing keys.
1974
1975 2012-05-21  Pavel Feldman  <pfeldman@chromium.org>
1976
1977         Web Inspector: refactor revision history to not include resource itself.
1978         https://bugs.webkit.org/show_bug.cgi?id=87026
1979
1980         Reviewed by Vsevolod Vlasov.
1981
1982         This change makes resource contain pure revisions, it stops updating Resources upon free flow editing.
1983
1984         * inspector/front-end/JavaScriptSource.js:
1985         (WebInspector.JavaScriptSource.prototype.setFormatted.didGetContent.didFormatContent):
1986         (WebInspector.JavaScriptSource.prototype.setFormatted.didGetContent):
1987         (WebInspector.JavaScriptSource.prototype.setFormatted):
1988         * inspector/front-end/JavaScriptSourceFrame.js:
1989         (WebInspector.JavaScriptSourceFrame.prototype.commitEditing):
1990         (WebInspector.JavaScriptSourceFrame.prototype._onContentChanged):
1991         (WebInspector.JavaScriptSourceFrame.prototype._didEditContent):
1992         * inspector/front-end/Resource.js:
1993         (WebInspector.Resource.prototype.addRevision):
1994         (WebInspector.Resource.prototype._innerRequestContent.callback):
1995         (WebInspector.Resource.prototype._innerRequestContent):
1996         (WebInspector.Resource.prototype.revertToOriginal):
1997         (WebInspector.ResourceRevision.prototype.revertToThis):
1998         (WebInspector.ResourceRevision.prototype.requestContent):
1999         (WebInspector.ResourceRevision.prototype.searchInContent):
2000         (WebInspector.ResourceRevision.prototype._persistRevision):
2001         * inspector/front-end/RevisionHistoryView.js:
2002         (WebInspector.RevisionHistoryView):
2003         (WebInspector.RevisionHistoryView.prototype._revisionAdded):
2004         (WebInspector.RevisionHistoryTreeElement):
2005         * inspector/front-end/ScriptSnippetModel.js:
2006         (WebInspector.ScriptSnippetModel.prototype.setScriptSnippetContent):
2007         * inspector/front-end/StylesPanel.js:
2008         (WebInspector.StyleSourceFrame.prototype.commitEditing):
2009         (WebInspector.StyleSourceFrame.prototype._didEditContent):
2010         (WebInspector.StyleSourceFrame.prototype._onContentChanged):
2011         * inspector/front-end/UISourceCode.js:
2012         (WebInspector.UISourceCode.prototype._revisionAdded):
2013         (WebInspector.UISourceCode.prototype.contentChanged):
2014         (WebInspector.UISourceCode.prototype.commitWorkingCopy):
2015         * inspector/front-end/inspector.js:
2016         (WebInspector._doLoadedDoneWithCapabilities.get if):
2017
2018 2012-05-21  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
2019
2020         GCC 4.7 and C++11
2021         https://bugs.webkit.org/show_bug.cgi?id=86465
2022
2023         Reviewed by Darin Adler.
2024
2025         Avoid triggering C++11 string literals and use nullptr for correct type casting.
2026
2027         * bindings/js/JSNodeFilterCondition.cpp:
2028         (WebCore::JSNodeFilterCondition::JSNodeFilterCondition):
2029         * platform/sql/SQLiteFileSystem.cpp:
2030         (WebCore::SQLiteFileSystem::getFileNameForNewDatabase):
2031
2032 2012-05-18  Michael Nordman  <michaeln@google.com>
2033
2034         [chromium] DomStorage events handling needs TLC (2)
2035         https://bugs.webkit.org/show_bug.cgi?id=85221
2036         Alter the StorageArea virtual interface such that the mutators no longer
2037         return old values. This is to allow implementations of the interface to operate
2038         more asynchronously.
2039
2040         Reviewed by Adam Barth.
2041
2042         No new tests. Existing tests cover this.
2043
2044         * storage/StorageArea.h: Alter the interface so the mutators no longer return previous values
2045         * storage/StorageAreaImpl.cpp:
2046         (WebCore::StorageAreaImpl::disabledByPrivateBrowsingInFrame):  removed an unneeded PLATFORM(CHROMIUM) guard
2047         (WebCore::StorageAreaImpl::setItem): no longer return the old value
2048         (WebCore::StorageAreaImpl::removeItem): no longer return the old value
2049         (WebCore::StorageAreaImpl::clear): no longer return whether something was cleared
2050         * storage/StorageAreaImpl.h: match StorageArea's virtual interface
2051
2052
2053 2012-05-21  MORITA Hajime  <morrita@google.com>
2054
2055         [Refactoring] Node should have youngestShadowRoot.
2056         https://bugs.webkit.org/show_bug.cgi?id=86427
2057
2058         Reviewed by Dimitri Glazkov.
2059
2060         This change adds Node::youngestShadowRoot() and replaced
2061         ElementShadow::youngestShadowRoot() with it if appropriate.
2062
2063         By introducing this, traversal across node and its shadow tree can
2064         look more fluent and idiomatic. There are a few non-trivial traversal
2065         remaining like ElementShadow::recalcStyle() and attach().
2066         But they should be flattened out eventually.
2067
2068         No new tests. Refactoring.
2069
2070         * dom/ContainerNodeAlgorithms.cpp:
2071         (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoTree):
2072         * dom/Document.cpp:
2073         (WebCore::Document::buildAccessKeyMap):
2074         * dom/ElementShadow.cpp:
2075         * dom/ElementShadow.h:
2076         (ElementShadow):
2077         (WebCore::Node::youngestShadowRoot):
2078         (WebCore):
2079         * dom/Node.h:
2080         (Node):
2081         * dom/TreeScopeAdopter.cpp:
2082         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
2083         (WebCore::TreeScopeAdopter::moveTreeToNewDocument):
2084         * dom/TreeScopeAdopter.h:
2085         (TreeScopeAdopter):
2086         * html/shadow/TextFieldDecorationElement.cpp:
2087         (WebCore::getDecorationRootAndDecoratedRoot):
2088
2089 2012-05-21  Christophe Dumez  <christophe.dumez@intel.com>
2090
2091         Add support for MessagePortArray type to JSC
2092         https://bugs.webkit.org/show_bug.cgi?id=84093
2093
2094         Reviewed by Adam Barth.
2095
2096         Add support for MessagePortArray type to JSC code generator similarly
2097         to what was done for the V8 generator in r114319.
2098
2099         Update bindings test results to reflect to change to the bindings
2100         generator.
2101
2102         * CMakeLists.txt: Add new DeliveredIntent files to CMake.
2103         * bindings/js/JSDOMBinding.h:
2104         (WebCore):
2105         (WebCore::jsArray): Tweak jsArray() so that it accepts MessagePortArray as argument.
2106         * bindings/scripts/CodeGeneratorJS.pm:
2107         (JSValueToNative):
2108         (NativeToJSValue):
2109         * bindings/scripts/test/JS/JSTestObj.cpp:
2110         (WebCore::jsTestObjPrototypeFunctionSerializedValue):
2111         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2112         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface):
2113         (WebCore::jsTestSerializedScriptValueInterfacePorts):
2114         (WebCore::setJSTestSerializedScriptValueInterfaceValue):
2115         (WebCore::setJSTestSerializedScriptValueInterfaceCachedValue):
2116         (WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionAcceptTransferList):
2117         (WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionMultiTransferList):
2118
2119 2012-05-21  Alexander Pavlov  <apavlov@chromium.org>
2120
2121         Web Inspector: [Styles] Cannot tab from selector of inherited rule, which in turn has leading inherited properties
2122         https://bugs.webkit.org/show_bug.cgi?id=87014
2123
2124         Reviewed by Yury Semikhatsky.
2125
2126         * inspector/front-end/StylesSidebarPane.js:
2127         (WebInspector.StylePropertiesSection.prototype._moveEditorFromSelector):
2128
2129 2012-05-21  Greg Billock  <gbillock@google.com>
2130
2131         Add suggestions field to web intents API.
2132         https://bugs.webkit.org/show_bug.cgi?id=86791
2133
2134         Reviewed by Adam Barth.
2135
2136         The |suggestions| field is used by the client to avoid an empty
2137         web intents selection window (picker). The UA can add the given
2138         suggestions to the picker if it would otherwise be empty. See
2139         http://dvcs.w3.org/hg/web-intents/raw-file/tip/spec/Overview.html#intent-parameters-dictionary
2140
2141         * Modules/intents/DeliveredIntent.cpp:
2142         (WebCore::DeliveredIntent::DeliveredIntent):
2143         * Modules/intents/Intent.cpp:
2144         (WebCore::Intent::create):
2145         (WebCore::Intent::Intent):
2146         * Modules/intents/Intent.h:
2147         (WebCore::Intent::suggestions):
2148         (Intent):
2149
2150 2012-05-21  Stephen Chenney  <schenney@chromium.org>
2151
2152         SVGAnimatedPropertyTearOff does not clear a self pointer on deletion
2153         https://bugs.webkit.org/show_bug.cgi?id=86119
2154
2155         Reviewed by Nikolas Zimmermann.
2156
2157         SVGAnimatedPropertyTearOff contains two SVGPropertyTearOff objects
2158         that have a pointer back to the SVGAnimatedPropertyTearOff. JS may
2159         also have a reference to these SVGPropertyTearOff objects. When the
2160         SVGAnimatedPropertyTearOff is deleted, the SVGPropertyTearOff objects
2161         may live on, but the pointer back to the deleted animated property
2162         tear off is left invalid. This patch clears the pointers on destruction
2163         of the SVGAnimatedPropertyTearOff.
2164
2165         Test: svg/custom/bug86119.html
2166
2167         * svg/properties/SVGAnimatedPropertyTearOff.h:
2168         (WebCore::SVGAnimatedPropertyTearOff::~SVGAnimatedPropertyTearOff):
2169         (SVGAnimatedPropertyTearOff):
2170
2171 2012-05-21  Stephen Chenney  <schenney@chromium.org>
2172
2173         [Chromium] REGRESSION: Assertion failure on svg/custom/acid3-test-77.html
2174         https://bugs.webkit.org/show_bug.cgi?id=86715
2175
2176         Reviewed by Nikolas Zimmermann.
2177
2178         Calls to clear the text positioning elements in RenderSVGText must be
2179         protected with a FontCachePurgeProtector so that fonts are not removed
2180         before the SVG metrics are rebuilt. The protection must cover both the
2181         cache clearing and the reconstruction calls.
2182
2183         Patch fixes existing tests.
2184
2185         * rendering/svg/RenderSVGText.cpp:
2186         (WebCore::RenderSVGText::subtreeChildWasAdded):
2187         (WebCore::RenderSVGText::subtreeChildWasRemoved):
2188         (WebCore::RenderSVGText::subtreeTextDidChange):
2189         (WebCore::RenderSVGText::removeChild):
2190
2191 2012-05-21  Stephen Chenney  <schenney@chromium.org>
2192
2193         SVGTextRunRenderingContext can return null font, calling code asserts not null
2194         https://bugs.webkit.org/show_bug.cgi?id=86738
2195
2196         Reviewed by Nikolas Zimmermann.
2197
2198         SVGTextRunRenderingContext::glyphDataForCharacter was returning a glyph with
2199         null font data for numerous code paths. It seems that it was doing so
2200         whenever it detected null fontData, rather than try to continue.
2201         Calling code would then immediately assert on this null fontData.
2202
2203         This patch refactors SVGTextRunRenderingContext::glyphDataForCharacter
2204         so that it never returns null font data, adding an assertion to that
2205         effect. In particular, when the font data is null the code will reach
2206         the fallback glyph calculations.
2207
2208         Refactoring covered by existing tests. A previously crashing test, svg/custom/acid3-test-77.html, no longer crashes.
2209
2210         * rendering/svg/SVGTextRunRenderingContext.cpp:
2211         (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
2212
2213 2012-05-21  Ilya Tikhonovsky  <loislo@chromium.org>
2214
2215         Web Inspector: switch buildDominatedNodes function to front-end calculated _dominatorsTree
2216         https://bugs.webkit.org/show_bug.cgi?id=87022
2217
2218         The new version is using _dominatorsTree array that was build at front-end.
2219
2220         Reviewed by Yury Semikhatsky.
2221
2222         * inspector/front-end/HeapSnapshot.js:
2223         (WebInspector.HeapSnapshot.prototype._init):
2224         (WebInspector.HeapSnapshot.prototype._buildDominatedNodes):
2225
2226 2012-05-21  Pavel Feldman  <pfeldman@chromium.org>
2227
2228         Web Inspector: change WebCore/English.lproj/locallizedStrings encoding from UTF-16 to UTF-8.
2229         https://bugs.webkit.org/show_bug.cgi?id=86822
2230
2231         Reviewed by Yury Semikhatsky.
2232
2233         * English.lproj/localizedStrings.js:
2234
2235 2012-05-21  Vsevolod Vlasov  <vsevik@chromium.org>
2236
2237         Web Inspector: Move working copy support to UISourceCode and use it for both styles and scripts.
2238         https://bugs.webkit.org/show_bug.cgi?id=87021
2239
2240         Reviewed by Pavel Feldman.
2241
2242         UISourceCode now listens for RevisionAdded event.
2243         Virtual methods workingCopyChanged and workingCopyCommitted added to UISourceCode and implemented in descendants.
2244         DebuggerResourceBinding does not call contentChanged on UISourceCode explicitly anymore.
2245
2246         * inspector/front-end/DebuggerResourceBinding.js:
2247         (WebInspector.DebuggerResourceBinding.setScriptSource.didEditScriptSource):
2248         (WebInspector.DebuggerResourceBinding.setScriptSource):
2249         * inspector/front-end/JavaScriptSource.js:
2250         (WebInspector.JavaScriptSource.prototype.workingCopyCommitted):
2251         * inspector/front-end/JavaScriptSourceFrame.js:
2252         (WebInspector.JavaScriptSourceFrame.prototype.commitEditing):
2253         * inspector/front-end/ScriptSnippetModel.js:
2254         (WebInspector.SnippetJavaScriptSource.prototype.workingCopyCommitted):
2255         * inspector/front-end/StylesPanel.js:
2256         (WebInspector.StyleSource.prototype.workingCopyCommitted):
2257         (WebInspector.StyleSource.prototype.workingCopyChanged):
2258         (WebInspector.StyleSourceFrame):
2259         (WebInspector.StyleSourceFrame.prototype.commitEditing):
2260         (WebInspector.StyleSourceFrame.prototype.afterTextChanged):
2261         (WebInspector.StyleSourceFrame.prototype._didEditContent):
2262         (WebInspector.StyleSourceFrame.prototype._onContentChanged):
2263         * inspector/front-end/UISourceCode.js:
2264         (WebInspector.UISourceCode):
2265         (WebInspector.UISourceCode.prototype._revisionAdded):
2266         (WebInspector.UISourceCode.prototype.contentChanged):
2267         (WebInspector.UISourceCode.prototype.workingCopy):
2268         (WebInspector.UISourceCode.prototype.setWorkingCopy):
2269         (WebInspector.UISourceCode.prototype.workingCopyChanged):
2270         (WebInspector.UISourceCode.prototype.commitWorkingCopy):
2271         (WebInspector.UISourceCode.prototype.workingCopyCommitted):
2272
2273 2012-05-21  Andrey Kosyakov  <caseq@chromium.org>
2274
2275         Web Inspector: [refactoring] promote fill/border colors used by timeline's frame overview to TimelineCategory
2276         https://bugs.webkit.org/show_bug.cgi?id=87016
2277
2278         Reviewed by Pavel Feldman.
2279
2280         - drop unused 'color' field from TimelineCategory;
2281         - add borderColor and fillColorStop[0-1] to TimelineCategory;
2282         - fix style in a handful of places.
2283
2284         Note we store textual values for color stops, not premade gradients so we can build gradients with different
2285         orientations rather than transforming a gradient.
2286
2287         * inspector/front-end/TimelineOverviewPane.js:
2288         (WebInspector.HeapGraph):
2289         (WebInspector.HeapGraph.prototype.get element):
2290         (WebInspector.HeapGraph.prototype.get visible):
2291         (WebInspector.HeapGraph.prototype.show):
2292         (WebInspector.HeapGraph.prototype.hide):
2293         (WebInspector.HeapGraph.prototype._clear):
2294         (WebInspector.TimelineCategoryStrips):
2295         (WebInspector.TimelineVerticalOverview):
2296         (WebInspector.TimelineVerticalOverview.prototype._renderBar):
2297         * inspector/front-end/TimelinePresentationModel.js:
2298         (WebInspector.TimelinePresentationModel.categories):
2299         (WebInspector.TimelinePresentationModel.recordStyle):
2300         (WebInspector.TimelineCategory):
2301
2302 2012-05-21  'Pavel Feldman'  <pfeldman@chromium.org>
2303
2304         Web Inspector: declare setFormatted on UISourceCode (otherwise fails for styles).
2305
2306         Not reviewed: front-end fix as a follow up to r117751.
2307
2308         * inspector/front-end/UISourceCode.js:
2309         (WebInspector.UISourceCode.prototype.consoleMessagesCleared):
2310         (WebInspector.UISourceCode.prototype.setFormatted):
2311
2312 2012-05-21  Yury Semikhatsky  <yurys@chromium.org>
2313
2314         Unreviewed. Fix Closure compiler error after r117753.
2315
2316         * inspector/front-end/HeapSnapshotGridNodes.js:
2317         (WebInspector.HeapSnapshotConstructorNode.prototype.revealNodeBySnapshotObjectId.didGetNodePosition):
2318
2319 2012-05-21  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
2320
2321         Move setEditingBehavior() from layoutTestController to window.internals
2322         https://bugs.webkit.org/show_bug.cgi?id=42689
2323
2324         Reviewed by Hajime Morita and Kenneth Rohde Christiansen.
2325
2326         Add setEditingBehavior() to window.internals.settings. No new tests, but this
2327         change will allow more tests to run in WebKitTestRunner.
2328
2329         * testing/InternalSettings.cpp:
2330         (WebCore::InternalSettings::InternalSettings):
2331         (WebCore::InternalSettings::restoreTo):
2332         (WebCore::InternalSettings::setEditingBehavior):
2333         (WebCore):
2334         * testing/InternalSettings.h:
2335         (InternalSettings):
2336         * testing/InternalSettings.idl:
2337
2338 2012-05-21  Vsevolod Vlasov  <vsevik@chromium.org>
2339
2340         Web Inspector: Temporary UISourceCode should be replaced each time another inline script is added in RawSourceCode with pending request.
2341         https://bugs.webkit.org/show_bug.cgi?id=87003
2342
2343         Reviewed by Pavel Feldman.
2344
2345         This is needed to correctly show document content when debugger stops on several breakpoints in different scripts during page load.
2346
2347         * inspector/front-end/RawSourceCode.js:
2348         (WebInspector.RawSourceCode.prototype.addScript):
2349         (WebInspector.RawSourceCode.prototype._finishedLoading):
2350
2351 2012-05-20  Kinuko Yasuda  <kinuko@chromium.org>
2352
2353         Cleanup: Remove WebCore::revealFolderInOS() which is no longer used anywhere
2354         https://bugs.webkit.org/show_bug.cgi?id=86993
2355
2356         Reviewed by Adam Barth.
2357
2358         No new tests as this must be just removing dead code.
2359
2360         * platform/FileSystem.h:
2361         * platform/chromium/FileSystemChromium.cpp:
2362         * platform/chromium/PlatformSupport.h:
2363         (PlatformSupport):
2364
2365 2012-05-21  Alexander Pavlov  <apavlov@chromium.org>
2366
2367         Web Inspector: Annotate CSSStyleModel.js for the closure compiler
2368         https://bugs.webkit.org/show_bug.cgi?id=86858
2369
2370         Reviewed by Yury Semikhatsky.
2371
2372         * inspector/front-end/CSSStyleModel.js:
2373         (WebInspector.CSSStyleDeclaration.parseComputedStylePayload):
2374         (WebInspector.CSSStyleDeclaration.prototype.newBlankProperty):
2375         (WebInspector.CSSStyleDeclaration.prototype.insertPropertyAt):
2376         (WebInspector.CSSProperty.parsePayload):
2377         (WebInspector.CSSProperty.prototype.setText):
2378         (WebInspector.CSSProperty.prototype.setDisabled):
2379         (WebInspector.CSSStyleSheet.prototype.setText):
2380         (WebInspector.CSSStyleModelResourceBinding.prototype._innerSetContent.callbackWrapper):
2381         (WebInspector.CSSStyleModelResourceBinding.prototype._innerSetContent):
2382         (WebInspector.CSSStyleModelResourceBinding.prototype._loadStyleSheetHeaders):
2383
2384 2012-05-21  Rakesh KN  <rakesh.kn@motorola.com>
2385
2386         [Forms] Refactor HTMLFormCollection
2387         https://bugs.webkit.org/show_bug.cgi?id=86602
2388
2389         Reviewed by Kent Tamura.
2390
2391         Modify HTMLFormCollection to be independent of HTMLFormElement which is needed
2392         for implementing HTMLFieldSetElement's element attribute.
2393
2394         Covered by existing tests.
2395
2396         * html/HTMLFormCollection.cpp:
2397         (WebCore::HTMLFormCollection::HTMLFormCollection):
2398         Modified to take more generic HTMLElement* instead of HTMLFormElement* so that
2399         HTMLFormCollection for HTMLFieldSetElement can also be created.
2400         (WebCore::HTMLFormCollection::create): Ditto.
2401         (WebCore::HTMLFormCollection::formControlElements):
2402         Helper function for getting the array of FormAssociatedElements for this form.
2403         (WebCore::HTMLFormCollection::formImageElements):
2404         Helper function for getting the array of image elements for this form.
2405         (WebCore::HTMLFormCollection::numberOfFormControlElements):
2406         Helper function for getting the number of elements in this form.
2407         (WebCore::HTMLFormCollection::calcLength):
2408         Modified to use new helper functions defined for getting the FormAssociatedElements
2409         and image elements array instead of static_cast to HTMLFormElement.
2410         (WebCore::HTMLFormCollection::item): Ditto.
2411         (WebCore::HTMLFormCollection::getNamedFormItem): Ditto.
2412         (WebCore::HTMLFormCollection::updateNameCache): Ditto.
2413         * html/HTMLFormCollection.h:
2414         (WebCore):
2415         (HTMLFormCollection):
2416         * html/HTMLFormElement.h:
2417         (WebCore::HTMLFormElement::imageElements):
2418         New accessor for image elements array of form element.
2419         Also HTMLFormCollection is not needed to be friend of HTMLFormElement as collection
2420         does not access the form element memebers directly now.
2421
2422 2012-05-21  Yury Semikhatsky  <yurys@chromium.org>
2423
2424         Web Inspector: expand only neighbors of the highlighted node when revealing it in heap snapshot
2425         https://bugs.webkit.org/show_bug.cgi?id=86998
2426
2427         Reviewed by Pavel Feldman.
2428
2429         Only nearest nodes are expanded when a node is revealed in heap snapshot
2430         summary view.
2431
2432         * inspector/front-end/HeapSnapshotDataGrids.js:
2433         (WebInspector.HeapSnapshotSortableDataGrid.prototype.highlightNode):
2434         (WebInspector.HeapSnapshotViewportDataGrid.prototype.highlightNode):
2435         (WebInspector.HeapSnapshotViewportDataGrid.prototype._isScrolledIntoView):
2436         * inspector/front-end/HeapSnapshotGridNodes.js:
2437         (WebInspector.HeapSnapshotConstructorNode.prototype.revealNodeBySnapshotObjectId):
2438         (WebInspector.HeapSnapshotConstructorNode.prototype.revealNodeBySnapshotObjectId.didGetNodePosition):
2439         * inspector/front-end/ProfilesPanel.js:
2440         (WebInspector.ProfilesPanel.prototype.showProfile):
2441
2442 2012-05-21  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
2443
2444         [EFL] PlatformKeyboardEventEfl is missing ESC key handling.
2445         https://bugs.webkit.org/show_bug.cgi?id=86837
2446
2447         Reviewed by Kenneth Rohde Christiansen.
2448
2449         Added ESC key handling.
2450
2451         * platform/efl/EflKeyboardUtilities.cpp:
2452         (WebCore::createKeyMap):
2453         (WebCore::singleCharacterString):
2454
2455 2012-05-21  Pavel Feldman  <pfeldman@chromium.org>
2456
2457         Web Inspector: move sources panel out of experimental.
2458         https://bugs.webkit.org/show_bug.cgi?id=86997
2459
2460         Reviewed by Yury Semikhatsky.
2461
2462         This change moves sources panel out of experimental, removes revision support from the resources panel.
2463
2464         * English.lproj/localizedStrings.js:
2465         * inspector/front-end/JavaScriptSourceFrame.js:
2466         (WebInspector.JavaScriptSourceFrame.prototype._onContentChanged):
2467         (WebInspector.JavaScriptSourceFrame.prototype._continueToLine):
2468         * inspector/front-end/ResourceView.js:
2469         * inspector/front-end/ResourcesPanel.js:
2470         (WebInspector.ResourcesPanel.prototype._showResourceView):
2471         (WebInspector.FrameTreeElement.prototype.appendResource):
2472         (WebInspector.FrameResourceTreeElement):
2473         (WebInspector.FrameResourceTreeElement.prototype.sourceView):
2474         * inspector/front-end/ScriptsNavigator.js:
2475         (WebInspector.ScriptsNavigator):
2476         * inspector/front-end/ScriptsPanel.js:
2477         (WebInspector.ScriptsPanel.prototype.get toolbarItemLabel):
2478         (WebInspector.ScriptsPanel.prototype.appendApplicableItems):
2479         * inspector/front-end/Settings.js:
2480         (WebInspector.ExperimentsSettings):
2481         * inspector/front-end/SourceFrame.js:
2482         (WebInspector.SourceFrame.prototype._setTextViewerDecorations):
2483         * inspector/front-end/textViewer.css:
2484         * inspector/front-end/utilities.js:
2485
2486 2012-05-21  Pavel Feldman  <pfeldman@chromium.org>
2487
2488         Web Inspector: implement revision history view.
2489         https://bugs.webkit.org/show_bug.cgi?id=86966
2490
2491         Reviewed by Yury Semikhatsky.
2492
2493         Added revision view into the drawer. It now lists all the revisions
2494         along with the inline diffs. Once source panel is enabled by default,
2495         this view will completely substitute the one in the resources panel.
2496         See the screenshot attached. View is updated when revisions are added
2497         and when editor view is switched.
2498
2499         * English.lproj/localizedStrings.js:
2500         * WebCore.gypi:
2501         * WebCore.vcproj/WebCore.vcproj:
2502         * inspector/compile-front-end.py:
2503         * inspector/front-end/AdvancedSearchController.js:
2504         (WebInspector.FileBasedSearchResultsPane.prototype._appendSearchMatches):
2505         * inspector/front-end/ContextMenu.js:
2506         (WebInspector.ContextMenu.prototype._itemSelected):
2507         (WebInspector.ContextMenu.prototype.appendApplicableItems):
2508         (WebInspector.ContextMenu.Provider.prototype.appendApplicableItems):
2509         (WebInspector.ContextMenu.registerProvider):
2510         * inspector/front-end/JavaScriptSourceFrame.js:
2511         (WebInspector.JavaScriptSourceFrame.prototype.populateTextAreaContextMenu):
2512         * inspector/front-end/Resource.js:
2513         (WebInspector.ResourceRevision.prototype.revertToThis):
2514         * inspector/front-end/RevisionHistoryView.js: Added.
2515         (WebInspector.RevisionHistoryView):
2516         (WebInspector.RevisionHistoryView.showHistory):
2517         (WebInspector.RevisionHistoryView.uiSourceCodeSelected):
2518         (WebInspector.RevisionHistoryView.prototype._revisionAdded):
2519         (WebInspector.RevisionHistoryView.prototype._onclose):
2520         (WebInspector.RevisionHistoryTreeElement.else.revert):
2521         (WebInspector.RevisionHistoryTreeElement):
2522         (WebInspector.RevisionHistoryTreeElement.prototype.onexpand.step1):
2523         (WebInspector.RevisionHistoryTreeElement.prototype.onexpand.step2):
2524         (WebInspector.RevisionHistoryTreeElement.prototype.onexpand):
2525         (WebInspector.RevisionHistoryTreeElement.prototype._createLine):
2526         (WebInspector.RevisionHistoryTreeElement.prototype._diff.popsym):
2527         (WebInspector.RevisionHistoryTreeElement.prototype._diff):
2528         * inspector/front-end/ScriptsPanel.js:
2529         (WebInspector.ScriptsPanel.prototype._editorSelected):
2530         (WebInspector.ScriptsPanel.prototype.registerUISourceCodeProvider):
2531         (WebInspector.ScriptsPanel.prototype._showLocalHistory):
2532         (WebInspector.ScriptsPanel.prototype.appendApplicableItems):
2533         * inspector/front-end/StylesPanel.js:
2534         (WebInspector.StyleSourceFrame.prototype._contentChanged):
2535         (WebInspector.StyleSourceFrame.prototype.populateTextAreaContextMenu):
2536         * inspector/front-end/WebKit.qrc:
2537         * inspector/front-end/inspector.css:
2538         (#search-results-pane-file-based .search-result):
2539         (#search-results-pane-file-based .search-result:hover):
2540         (#search-results-pane-file-based .search-match:hover):
2541         (#search-results-pane-file-based .search-match .search-match-content):
2542         * inspector/front-end/inspector.html:
2543         * inspector/front-end/scriptsPanel.css:
2544         (.outline-disclosure.revision-history-drawer):
2545         (.outline-disclosure.revision-history-drawer ol):
2546         (.outline-disclosure.revision-history-drawer > ol):
2547         (.outline-disclosure.revision-history-drawer li):
2548         (.outline-disclosure.revision-history-drawer li.parent):
2549         (.revision-history-link):
2550         (.outline-disclosure.revision-history-drawer .revision-history-line):
2551         (.revision-history-drawer .webkit-line-number):
2552         (.revision-history-line-added):
2553         (.revision-history-line-removed):
2554         * inspector/front-end/textViewer.css:
2555         (.webkit-added-line.webkit-line-number):
2556         (.webkit-removed-line.webkit-line-number):
2557         (.webkit-changed-line.webkit-line-number):
2558
2559 2012-05-18  Ilya Tikhonovsky  <loislo@chromium.org>
2560
2561         Web Inspector: upstream build dominators tree procedure from v8.
2562         https://bugs.webkit.org/show_bug.cgi?id=86640
2563
2564         The idea is to reduce transfer size and move all the post-processing steps to the front-end.
2565         The JS implementation is ~1.5 times slower.
2566
2567         Reviewed by Yury Semikhatsky.
2568
2569         Covered by existing tests and performance tests.
2570
2571         * inspector/front-end/HeapSnapshot.js:
2572         (WebInspector.HeapSnapshot.prototype._init):
2573         (WebInspector.HeapSnapshot.prototype._buildAggregates):
2574         (WebInspector.HeapSnapshot.prototype._buildPostOrderIndex):
2575         (WebInspector.HeapSnapshot.prototype._buildDominatorTree):
2576         (WebInspector.HeapSnapshot.prototype._markPageOwnedNodes):
2577         (WebInspector.HeapSnapshot.prototype._markQueriableHeapObjects):
2578         (WebInspector.HeapSnapshot.prototype._calculateFlags):
2579
2580 2012-05-21  Mike Lawther  <mikelawther@chromium.org>
2581
2582         Crash in -webkit-calc
2583         https://bugs.webkit.org/show_bug.cgi?id=86954
2584
2585         Reviewed by Abhishek Arya.
2586
2587         Ensure that both ends of a blend are checked for being Calculated. The current
2588         check did not cover the case where the 'from' end was Calculated and nonzero,
2589         and the 'to' end was zero and not Calculated. 
2590
2591         Blending doesn't work with calculated expressions and is being tracked in
2592         bug http://webkit.org/b/86160
2593
2594         Tests: css3/calc/transition-crash3.html
2595                css3/calc/transition-crash4.html
2596
2597         * platform/Length.h:
2598         (WebCore::Length::blend):
2599
2600 2012-05-21  Pavel Feldman  <pfeldman@chromium.org>
2601
2602         Web Inspector: make search results view more dense
2603         https://bugs.webkit.org/show_bug.cgi?id=86937
2604
2605         Reviewed by Yury Semikhatsky.
2606
2607         - moved search field to the 'drawer status bar'
2608         - search view is now shown on scripts panel only
2609         - switching from the scripts panel closes the search view
2610         - beautified the looks (see the screenshot)
2611
2612         * English.lproj/localizedStrings.js:
2613         * inspector/front-end/AdvancedSearchController.js:
2614         (WebInspector.AdvancedSearchController.prototype.handleShortcut):
2615         (WebInspector.AdvancedSearchController.prototype.show):
2616         (WebInspector.AdvancedSearchController.prototype.close):
2617         (WebInspector.SearchView):
2618         (WebInspector.FileBasedSearchResultsPane):
2619         * inspector/front-end/ScriptsPanel.js:
2620         (WebInspector.ScriptsPanel.prototype.willHide):
2621         * inspector/front-end/externs.js:
2622         (WebInspector.showViewInDrawer):
2623         (WebInspector.closeViewInDrawer):
2624         * inspector/front-end/inspector.css:
2625         (.search-drawer-header input[type="search"].search-config-search):
2626         (.search-drawer-header label.search-config-label):
2627         (.search-drawer-header input[type="checkbox"].search-config-checkbox):
2628         (body:not(.platform-mac) .search-drawer-header input[type="checkbox"].search-config-checkbox):
2629         (body.platform-mac .search-drawer-header input[type="checkbox"].search-config-checkbox):
2630         (.drawer-header):
2631         (.drawer-header-close-button):
2632         (.drawer-header-close-button:hover):
2633         (.drawer-header-close-button:active):
2634         (.search-view .search-results):
2635         (#search-results-pane-file-based li):
2636         (#search-results-pane-file-based ol):
2637         (#search-results-pane-file-based ol.children):
2638         (#search-results-pane-file-based ol.children.expanded):
2639         (#search-results-pane-file-based li.parent::before):
2640         (#search-results-pane-file-based li.parent.expanded::before):
2641         (#search-results-pane-file-based .search-result):
2642         (#search-results-pane-file-based .show-more-matches):
2643         * inspector/front-end/inspector.js:
2644         (WebInspector.showViewInDrawer.closeButtonPressed):
2645         (WebInspector.showViewInDrawer):
2646         (WebInspector.closeViewInDrawer):
2647         (WebInspector.postDocumentKeyDown):
2648
2649 2012-05-18  Andreas Kling  <kling@webkit.org>
2650
2651         REGRESSION(r117501): IconDatabase asserts on startup in synchronousIconForPageURL().
2652         <http://webkit.org/b/86935>
2653         <rdar://problem/11480012>
2654
2655         Reviewed by Anders Carlsson.
2656
2657         - Correctly set m_retainOrReleaseIconRequested to true in retainIconForPageURL().
2658           This was causing the assertions, as we would end up doing nothing until the first
2659           icon release request came in.
2660
2661         - Require that m_urlsToRetainOrReleaseLock be held when accessing m_retainOrReleaseIconRequested.
2662           This removes a possible race condition in double checked locking.
2663
2664         - Swap over the retain/release work queues while holding m_urlsToRetainOrReleaseLock
2665           and release it right away to avoid sitting on the lock while updating the database.
2666
2667         * loader/icon/IconDatabase.cpp:
2668         (WebCore::IconDatabase::synchronousIconForPageURL):
2669         (WebCore::IconDatabase::retainIconForPageURL):
2670         (WebCore::IconDatabase::releaseIconForPageURL):
2671         (WebCore::IconDatabase::retainedPageURLCount):
2672         (WebCore::IconDatabase::performURLImport):
2673         (WebCore::IconDatabase::syncThreadMainLoop):
2674         (WebCore::IconDatabase::performPendingRetainAndReleaseOperations):
2675         * loader/icon/IconDatabase.h:
2676         (IconDatabase):
2677
2678 2012-05-21  Kent Tamura  <tkent@chromium.org>
2679
2680         Unreviewed, build fix.
2681
2682         * html/StepRange.cpp:
2683         (WebCore::StepRange::parseStep): Remove bogus asssetions.
2684
2685 2012-05-21  Kent Tamura  <tkent@chromium.org>
2686
2687         Unreviewed, build fix.
2688
2689         * html/StepRange.cpp:
2690         (WebCore::StepRange::StepRange): Remove another ASSERT_NOT_REACHED.
2691
2692 2012-05-21  Kent Tamura  <tkent@chromium.org>
2693
2694         Unreviewed, build fix.
2695
2696         * html/StepRange.h:
2697         (WebCore::StepRange::StepDescription::StepDescription):
2698         Remove ASSERT_NOT_REACHED.
2699
2700 2012-05-21  Yoshifumi Inoue  <yosin@chromium.org>
2701
2702         [Forms] Move numeric related methods in HTMLInputElement class to another place
2703         https://bugs.webkit.org/show_bug.cgi?id=82034
2704
2705         Reviewed by Kent Tamura.
2706
2707         This patch moves step and range related methods into StepRange class
2708         for ease of using step calculation other than double floating point
2709         number arithmetic, e.g. decimal, long double, and so on.
2710
2711         New class StepRange::StepDescription holds values for calculating
2712         stepped value, defaultStep, defaultStepBase, integer rounding flags,
2713         step scale factor instead of virtual methods in InputType class.
2714
2715         No new tests because of this patch doesn't change behavior.
2716
2717         * WebCore.xcodeproj/project.pbxproj: Set attribute of StepRange.h to "Private" for including it in HTMLInputElement.cpp.
2718         * html/BaseDateAndTimeInputType.cpp:
2719         (WebCore::InputType::rangeOverflow): Moved to use InputType class.
2720         (WebCore::InputType::rangeUnderflow): Moved to use InputType class.
2721         (WebCore::BaseDateAndTimeInputType::stepMismatch): Moved to use stepRange.
2722         * html/BaseDateAndTimeInputType.h:
2723         (BaseDateAndTimeInputType): Removed method declaration for stepBase.
2724         * html/DateInputType.cpp:
2725         (WebCore::DateInputType::setupStepRange): Added.
2726         * html/DateInputType.h:
2727         (DateInputType): Removed method declarations.
2728         * html/DateTimeInputType.cpp:
2729         (WebCore::DateTimeInputType::defaultStep): Removed.
2730         (WebCore::DateTimeInputType::maximum): Removed.
2731         (WebCore::DateTimeInputType::minimum): Removed.
2732         (WebCore::DateTimeInputType::setupStepRange): Added
2733         (WebCore::DateTimeInputType::stepScaleFactor): Removed.
2734         * html/DateTimeInputType.h:
2735         (DateTimeInputType): Removed deprecated method declarations.
2736         * html/DateTimeLocalInputType.cpp:
2737         (WebCore::DateTimeLocalInputType::defaultStep): Removed.
2738         (WebCore::DateTimeLocalInputType::maximum): Removed.
2739         (WebCore::DateTimeLocalInputType::minimum): Removed.
2740         (WebCore::DateTimeLocalInputType::setupStepRange): Added.
2741         (WebCore::DateTimeLocalInputType::stepScaleFactor): Removed.
2742         * html/DateTimeLocalInputType.h:
2743         (DateTimeLocalInputType):
2744         * html/HTMLInputElement.cpp:
2745         (WebCore::HTMLInputElement::isInRange): Changed to call InputType::isInRange.
2746         (WebCore::HTMLInputElement::isOutOfRange): Changed to call InputType::isOutOfRange.
2747         (WebCore::HTMLInputElement::setupStepRange): Added.
2748         * html/HTMLInputElement.h:
2749         (HTMLInputElement):
2750         * html/InputType.cpp:
2751         (WebCore::InputType::acceptableError): Moved to StepRange class.
2752         (WebCore::InputType::alignValueForStep): Moved to StepRange class.
2753         (WebCore::InputType::minimum): Changed to use StepRange class.
2754         (WebCore::InputType::maximum): Changed to use StepRange class.
2755         (WebCore::InputType::parseToDouble): Changed to have ASSERT_NOT_REACHED.
2756         (WebCore::InputType::stepBaseWithDecimalPlaces): Changed to use StepRange class.
2757         (WebCore::InputType::validationMessage):  Changed to use StepRange class.
2758         (WebCore::InputType::applyStep):  Changed to use StepRange class.
2759         (WebCore::InputType::getAllowedValueStep):  Changed to use StepRange class.
2760         (WebCore::InputType::isInRange): Added.
2761         (WebCore::InputType::isOutOfRange): Added.
2762         (WebCore::InputType::rangeOverflow): Changed to use StepRange class.
2763         (WebCore::InputType::rangeUnderflow): Changed to use StepRange class.
2764         (WebCore::InputType::setupStepRange): Added.
2765         (WebCore::InputType::stepUpFromRenderer):  Changed to use StepRange class.
2766         (WebCore::InputType::stepMismatch): Changed to use StepRange class.
2767         * html/InputType.h:
2768         (InputType):
2769         * html/MonthInputType.cpp:
2770         (WebCore::MonthInputType::defaultStep): Removed.
2771         (WebCore::MonthInputType::maximum): Removed.
2772         (WebCore::MonthInputType::minimum): Removed.
2773         (WebCore::MonthInputType::setupStepRange): Added.
2774         (WebCore::MonthInputType::stepScaleFactor): Removed.
2775         * html/MonthInputType.h:
2776         (MonthInputType):
2777         * html/NumberInputType.cpp:
2778         (WebCore):
2779         (WebCore::NumberInputType::defaultStep): Removed.
2780         (WebCore::NumberInputType::maximum): Removed.
2781         (WebCore::NumberInputType::minimum): Removed.
2782         (WebCore::NumberInputType::rangeOverflow): Moved to InputType class.
2783         (WebCore::NumberInputType::rangeUnderflow): Moved to InputType class.
2784         (WebCore::NumberInputType::setupStepRange): Added.
2785         (WebCore::NumberInputType::stepMismatch): Moved to InputType class.
2786         (WebCore::NumberInputType::stepBaseWithDecimalPlaces): Changed to use StepRange class.
2787         (WebCore::NumberInputType::stepScaleFactor): Removed.
2788         * html/NumberInputType.h:
2789         (NumberInputType):
2790         * html/RangeInputType.cpp:
2791         (WebCore::RangeInputType::defaultStep): Removed.
2792         (WebCore::RangeInputType::maximum): Removed.
2793         (WebCore::RangeInputType::minimum): Removed.
2794         (WebCore::RangeInputType::setupStepRange): Added.
2795         (WebCore::RangeInputType::stepScaleFactor): Removed.
2796         (WebCore::RangeInputType::handleKeydownEvent): Changed to use StepRange class.
2797         (WebCore::RangeInputType::fallbackValue): Changed to use StepRange class.
2798         (WebCore::RangeInputType::sanitizeValue): Changed to use StepRange class.
2799         * html/RangeInputType.h:
2800         (RangeInputType):
2801         * html/StepRange.cpp:
2802         (WebCore::StepRange::StepRange): Added.
2803         (WebCore::StepRange::clampValue): Changed for member variable name changes.
2804         (WebCore::StepRange::hasStep): Added.
2805         (WebCore::StepRange::maximum): Added.
2806         (WebCore::StepRange::minimum): Added.
2807         (WebCore::StepRange::step): Added.
2808         (WebCore::StepRange::stepBase): Added.
2809         (WebCore::StepRange::stepDecimalPlaces): Added.
2810         (WebCore::StepRange::stepScaleFactor): Added.
2811         (WebCore::StepRange::setHasStep): Added.
2812         (WebCore::StepRange::setup): Added.
2813         (WebCore::StepRange::parse): Added.
2814         * html/StepRange.h:
2815         (StepDescription): Added
2816         (WebCore::StepRange::StepDescription::StepDescription):
2817         (WebCore::StepRange::acceptableError): Moved from InputType class.
2818         (WebCore::StepRange::alignValueForStep): Moved from InputType class.
2819         (WebCore::StepRange::defaultValue): Changed for member variable name changes.
2820         (WebCore::StepRange::proportionFromValue): Changed for member variable name changes.
2821         (WebCore::StepRange::valueFromProportion): Changed for member variable name changes.
2822         * html/TimeInputType.cpp:
2823         (WebCore::TimeInputType::defaultStep): Removed.
2824         (WebCore::TimeInputType::maximum): Removed.
2825         (WebCore::TimeInputType::minimum): Removed.
2826         (WebCore::TimeInputType::setupStepRange): Added.
2827         (WebCore::TimeInputType::stepScaleFactor): Removed.
2828         * html/TimeInputType.h:
2829         (TimeInputType):
2830         * html/WeekInputType.cpp:
2831         (WebCore):
2832         (WebCore::WeekInputType::defaultStep): Removed.
2833         (WebCore::WeekInputType::maximum): Removed.
2834         (WebCore::WeekInputType::minimum): Removed.
2835         (WebCore::WeekInputType::setupStepRange): Added.
2836         (WebCore::WeekInputType::stepScaleFactor): Removed.
2837         * html/WeekInputType.h:
2838         (WeekInputType):
2839         * html/shadow/SliderThumbElement.cpp:
2840         (WebCore::sliderPosition): Changed to use StepRange class.
2841         (WebCore::SliderThumbElement::setPositionFromPoint): Changed to use StepRange class.
2842
2843 2012-05-21  Kentaro Hara  <haraken@chromium.org>
2844
2845         [V8] Pass Isolate to throwNotEnoughArgumentsError()
2846         https://bugs.webkit.org/show_bug.cgi?id=86983
2847
2848         Reviewed by Adam Barth.
2849
2850         The objective is to pass Isolate around in V8 bindings.
2851         This patch passes Isolate to throwNotEnoughArgumentsError().
2852
2853         No tests. No change in behavior.
2854
2855         * bindings/scripts/CodeGeneratorV8.pm:
2856         (GenerateArgumentsCountCheck):
2857         (GenerateEventConstructorCallback):
2858         * bindings/scripts/test/V8/V8Float64Array.cpp:
2859         (WebCore::Float64ArrayV8Internal::fooCallback):
2860         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
2861         (WebCore::TestActiveDOMObjectV8Internal::excitingFunctionCallback):
2862         (WebCore::TestActiveDOMObjectV8Internal::postMessageCallback):
2863         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
2864         (WebCore::TestCustomNamedGetterV8Internal::anotherFunctionCallback):
2865         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
2866         (WebCore::V8TestEventConstructor::constructorCallback):
2867         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
2868         (WebCore::TestEventTargetV8Internal::itemCallback):
2869         (WebCore::TestEventTargetV8Internal::dispatchEventCallback):
2870         * bindings/scripts/test/V8/V8TestInterface.cpp:
2871         (WebCore::TestInterfaceV8Internal::supplementalMethod2Callback):
2872         (WebCore::V8TestInterface::constructorCallback):
2873         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
2874         (WebCore::TestMediaQueryListListenerV8Internal::methodCallback):
2875         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
2876         (WebCore::V8TestNamedConstructorConstructorCallback):
2877         * bindings/scripts/test/V8/V8TestObj.cpp:
2878         (WebCore::TestObjV8Internal::voidMethodWithArgsCallback):
2879         (WebCore::TestObjV8Internal::intMethodWithArgsCallback):
2880         (WebCore::TestObjV8Internal::objMethodWithArgsCallback):
2881         (WebCore::TestObjV8Internal::methodWithSequenceArgCallback):
2882         (WebCore::TestObjV8Internal::methodReturningSequenceCallback):
2883         (WebCore::TestObjV8Internal::methodThatRequiresAllArgsAndThrowsCallback):
2884         (WebCore::TestObjV8Internal::serializedValueCallback):
2885         (WebCore::TestObjV8Internal::idbKeyCallback):
2886         (WebCore::TestObjV8Internal::optionsObjectCallback):
2887         (WebCore::TestObjV8Internal::methodWithNonOptionalArgAndOptionalArgCallback):
2888         (WebCore::TestObjV8Internal::methodWithNonOptionalArgAndTwoOptionalArgsCallback):
2889         (WebCore::TestObjV8Internal::methodWithCallbackArgCallback):
2890         (WebCore::TestObjV8Internal::methodWithNonCallbackArgAndCallbackArgCallback):
2891         (WebCore::TestObjV8Internal::overloadedMethod1Callback):
2892         (WebCore::TestObjV8Internal::overloadedMethod2Callback):
2893         (WebCore::TestObjV8Internal::overloadedMethod3Callback):
2894         (WebCore::TestObjV8Internal::overloadedMethod4Callback):
2895         (WebCore::TestObjV8Internal::overloadedMethod5Callback):
2896         (WebCore::TestObjV8Internal::overloadedMethod6Callback):
2897         (WebCore::TestObjV8Internal::overloadedMethod7Callback):
2898         (WebCore::TestObjV8Internal::overloadedMethod11Callback):
2899         (WebCore::TestObjV8Internal::overloadedMethod12Callback):
2900         (WebCore::TestObjV8Internal::enabledAtRuntimeMethod1Callback):
2901         (WebCore::TestObjV8Internal::enabledAtRuntimeMethod2Callback):
2902         (WebCore::TestObjV8Internal::convert1Callback):
2903         (WebCore::TestObjV8Internal::convert2Callback):
2904         (WebCore::TestObjV8Internal::convert3Callback):
2905         (WebCore::TestObjV8Internal::convert4Callback):
2906         (WebCore::TestObjV8Internal::convert5Callback):
2907         (WebCore::TestObjV8Internal::strictFunctionCallback):
2908         (WebCore::V8TestObj::constructorCallback):
2909         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
2910         (WebCore::TestSerializedScriptValueInterfaceV8Internal::acceptTransferListCallback):
2911         (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
2912         * bindings/v8/ScriptController.cpp:
2913         (WebCore::setValueAndClosePopupCallback):
2914         * bindings/v8/V8Proxy.cpp:
2915         (WebCore::V8Proxy::throwNotEnoughArgumentsError):
2916         * bindings/v8/V8Proxy.h:
2917         (V8Proxy):
2918         * bindings/v8/custom/V8AudioContextCustom.cpp:
2919         (WebCore::V8AudioContext::constructorCallback):
2920         * bindings/v8/custom/V8DataViewCustom.cpp:
2921         (WebCore::V8DataView::getInt8Callback):
2922         (WebCore::V8DataView::getUint8Callback):
2923         (WebCore::V8DataView::setInt8Callback):
2924         (WebCore::V8DataView::setUint8Callback):
2925         * bindings/v8/custom/V8DirectoryEntryCustom.cpp:
2926         (WebCore::V8DirectoryEntry::getDirectoryCallback):
2927         (WebCore::V8DirectoryEntry::getFileCallback):
2928         * bindings/v8/custom/V8IntentConstructor.cpp:
2929         (WebCore::V8Intent::constructorCallback):
2930         * bindings/v8/custom/V8SVGLengthCustom.cpp:
2931         (WebCore::V8SVGLength::convertToSpecifiedUnitsCallback):
2932         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
2933         (WebCore::getObjectParameter):
2934         (WebCore::V8WebGLRenderingContext::getAttachedShadersCallback):
2935         (WebCore::V8WebGLRenderingContext::getExtensionCallback):
2936         (WebCore::V8WebGLRenderingContext::getFramebufferAttachmentParameterCallback):
2937         (WebCore::V8WebGLRenderingContext::getParameterCallback):
2938         (WebCore::V8WebGLRenderingContext::getProgramParameterCallback):
2939         (WebCore::V8WebGLRenderingContext::getShaderParameterCallback):
2940         (WebCore::V8WebGLRenderingContext::getUniformCallback):
2941         (WebCore::vertexAttribAndUniformHelperf):
2942         (WebCore::uniformHelperi):
2943         (WebCore::uniformMatrixHelper):
2944         * bindings/v8/custom/V8WebKitMutationObserverCustom.cpp:
2945         (WebCore::V8WebKitMutationObserver::constructorCallback):
2946         (WebCore::V8WebKitMutationObserver::observeCallback):
2947         * bindings/v8/custom/V8WebSocketCustom.cpp:
2948         (WebCore::V8WebSocket::constructorCallback):
2949         (WebCore::V8WebSocket::sendCallback):
2950         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
2951         (WebCore::V8XMLHttpRequest::openCallback):
2952
2953 2012-05-20  Kentaro Hara  <haraken@chromium.org>
2954
2955         [V8] Pass Isolate to throwError()s in V8 custom bindings (Part 2)
2956         https://bugs.webkit.org/show_bug.cgi?id=86981
2957
2958         Reviewed by Adam Barth.
2959
2960         The objective is to pass Isolate around in V8 bindings.
2961         This patch passes Isolate to throwError()s in V8 custom bindings.
2962
2963         No tests. No change in behavior.
2964
2965         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
2966         (WebCore::v8HTMLImageElementConstructorCallback):
2967         * bindings/v8/custom/V8HistoryCustom.cpp:
2968         (WebCore::V8History::pushStateCallback):
2969         (WebCore::V8History::replaceStateCallback):
2970         * bindings/v8/custom/V8IntentConstructor.cpp:
2971         (WebCore::V8Intent::constructorCallback):
2972         * bindings/v8/custom/V8MessagePortCustom.cpp:
2973         (WebCore::handlePostMessageCallback):
2974         * bindings/v8/custom/V8NotificationCenterCustom.cpp:
2975         (WebCore::V8NotificationCenter::createHTMLNotificationCallback):
2976         (WebCore::V8NotificationCenter::createNotificationCallback):
2977         (WebCore::V8NotificationCenter::requestPermissionCallback):
2978         * bindings/v8/custom/V8SQLResultSetRowListCustom.cpp:
2979         (WebCore::V8SQLResultSetRowList::itemCallback):
2980         * bindings/v8/custom/V8SQLTransactionCustom.cpp:
2981         (WebCore::V8SQLTransaction::executeSqlCallback):
2982         * bindings/v8/custom/V8SQLTransactionSyncCustom.cpp:
2983         (WebCore::V8SQLTransactionSync::executeSqlCallback):
2984         * bindings/v8/custom/V8StorageCustom.cpp:
2985         (WebCore::storageSetter):
2986         * bindings/v8/custom/V8WebKitMutationObserverCustom.cpp:
2987         (WebCore::V8WebKitMutationObserver::constructorCallback):
2988         (WebCore::V8WebKitMutationObserver::observeCallback):
2989         * bindings/v8/custom/V8WebSocketCustom.cpp:
2990         (WebCore::V8WebSocket::constructorCallback):
2991         (WebCore::V8WebSocket::sendCallback):
2992         (WebCore::V8WebSocket::closeCallback):
2993         * bindings/v8/custom/V8WorkerContextCustom.cpp:
2994         (WebCore::V8WorkerContext::importScriptsCallback):
2995         * bindings/v8/custom/V8WorkerCustom.cpp:
2996         (WebCore::handlePostMessageCallback):
2997         * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
2998         (WebCore::V8XMLHttpRequest::constructorCallback):
2999         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
3000         (WebCore::V8XMLHttpRequest::responseTextAccessorGetter):
3001         (WebCore::V8XMLHttpRequest::openCallback):
3002         (WebCore::V8XMLHttpRequest::sendCallback):
3003
3004 2012-05-20  Kentaro Hara  <haraken@chromium.org>
3005
3006         [V8] Pass Isolate to throwError()s in V8 custom bindings (Part 1)
3007         https://bugs.webkit.org/show_bug.cgi?id=86980
3008
3009         Reviewed by Adam Barth.
3010
3011         The objective is to pass Isolate around in V8 bindings.
3012         This patch passes Isolate to throwError()s in V8 custom bindings.
3013
3014         No tests. No change in behavior.
3015
3016         * bindings/v8/custom/V8ArrayBufferCustom.cpp:
3017         (WebCore::V8ArrayBuffer::constructorCallback):
3018         * bindings/v8/custom/V8ArrayBufferViewCustom.h:
3019         (WebCore::constructWebGLArrayWithArrayBufferArgument):
3020         (WebCore::constructWebGLArray):
3021         * bindings/v8/custom/V8AudioContextCustom.cpp:
3022         (WebCore::V8AudioContext::constructorCallback):
3023         * bindings/v8/custom/V8BlobCustom.cpp:
3024         (WebCore::V8Blob::constructorCallback):
3025         * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
3026         (WebCore::V8CSSStyleDeclaration::namedPropertySetter):
3027         * bindings/v8/custom/V8ClipboardCustom.cpp:
3028         (WebCore::V8Clipboard::clearDataCallback):
3029         (WebCore::V8Clipboard::setDragImageCallback):
3030         * bindings/v8/custom/V8DOMFormDataCustom.cpp:
3031         (WebCore::V8DOMFormData::appendCallback):
3032         * bindings/v8/custom/V8DOMStringMapCustom.cpp:
3033         (WebCore::V8DOMStringMap::namedPropertySetter):
3034         * bindings/v8/custom/V8DOMWindowCustom.cpp:
3035         (WebCore::handlePostMessageCallback):
3036         * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp:
3037         (WebCore::handlePostMessageCallback):
3038         * bindings/v8/custom/V8DirectoryEntryCustom.cpp:
3039         (WebCore::V8DirectoryEntry::getDirectoryCallback):
3040         (WebCore::V8DirectoryEntry::getFileCallback):
3041         * bindings/v8/custom/V8DocumentCustom.cpp:
3042         (WebCore::V8Document::evaluateCallback):
3043
3044 2012-05-20  Kentaro Hara  <haraken@chromium.org>
3045
3046         [V8] Pass Isolate to V8NPObject::npObjectGetProperty() and V8NPObject::npObjectSetProperty()
3047         https://bugs.webkit.org/show_bug.cgi?id=86979
3048
3049         Reviewed by Adam Barth.
3050
3051         The objective is to pass Isolate around in V8 bindings.
3052         This patch passes Isolate to V8NPObject::npObjectGetProperty()
3053         and V8NPObject::npObjectSetProperty().
3054
3055         No tests. No change in behavior.
3056
3057         * bindings/v8/V8NPObject.cpp:
3058         (WebCore::npObjectGetProperty):
3059         (WebCore::npObjectNamedPropertyGetter):
3060         (WebCore::npObjectIndexedPropertyGetter):
3061         (WebCore::npObjectGetNamedProperty):
3062         (WebCore::npObjectGetIndexedProperty):
3063         (WebCore::npObjectQueryProperty):
3064         (WebCore::npObjectSetProperty):
3065         (WebCore::npObjectNamedPropertySetter):
3066         (WebCore::npObjectIndexedPropertySetter):
3067         (WebCore::npObjectSetNamedProperty):
3068         (WebCore::npObjectSetIndexedProperty):
3069         * bindings/v8/V8NPObject.h:
3070         (WebCore):
3071         * bindings/v8/custom/V8HTMLPlugInElementCustom.cpp:
3072         (WebCore::npObjectNamedGetter):
3073         (WebCore::npObjectNamedSetter):
3074         (WebCore::npObjectIndexedGetter):
3075         (WebCore::npObjectIndexedSetter):
3076
3077 2012-05-20  Ryosuke Niwa  <rniwa@webkit.org>
3078
3079         Using createContextualFragment to insert a <script> does not cause the script to execute
3080         https://bugs.webkit.org/show_bug.cgi?id=12234
3081
3082         Reviewed by Adam Barth.
3083
3084         Renamed FragmentScriptingAllowed and FragmentScriptingNotAllowed to DisallowScriptingContent
3085         and AllowScriptingContent as these two flags are used in code for non-fragment cases and they
3086         indicate whether attributes and elements that can invoke scripting should be removed or not.
3087
3088         To fix the bug, added a new value AllowScriptingContentAndDoNotMarkAlreadyStarted unset
3089         already-started and parser-inserted flags [1] on script elements in addition to allowing
3090         scripting contents.
3091
3092         While the HTML5 specification and the DOM Parsing and Serialization specification [2] state that
3093         we should set these flags in the parser and later unset them, doing so would require traversing
3094         the parsed fragment to find relevant script elements. We short circuit this logic by simply not
3095         setting parser-inserted and already-started flags in createContextualFragment.
3096
3097         [1] http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#already-started
3098         [2] http://html5.org/specs/dom-parsing.html#dom-range-createcontextualfragment
3099
3100         Tests: fast/dom/Range/create-contextual-fragment-script-not-ran.html
3101                fast/dom/Range/create-contextual-fragment-script-unmark-already-started.html
3102
3103         * dom/DocumentFragment.h:
3104         (DocumentFragment):
3105         * dom/Element.cpp:
3106         (WebCore::Element::parserSetAttributes):
3107         (WebCore::Element::setAttributeNS):
3108         * dom/Element.h:
3109         (Element):
3110         * dom/FragmentScriptingPermission.h:
3111         * dom/Range.cpp:
3112         (WebCore::Range::createContextualFragment): Removed FragmentScriptingPermission from the argument
3113         list since no one uses it. Always use AllowScriptingContentAndDoNotMarkAlreadyStarted instead.
3114         * dom/Range.h:
3115         * editing/markup.h:
3116         * html/parser/HTMLConstructionSite.cpp:
3117         (WebCore::HTMLConstructionSite::HTMLConstructionSite):
3118         (WebCore::HTMLConstructionSite::insertScriptElement): Pass false to both parserInserted and
3119         alreadyStarted when the scripting permission is AllowScriptingContentAndDoNotMarkAlreadyStarted.
3120         Also call parserSetAttributes when the scripting permission is either AllowScriptingContent or
3121         AllowScriptingContentAndDoNotMarkAlreadyStarted.
3122         * html/parser/HTMLDocumentParser.h:
3123         (HTMLDocumentParser):
3124         * html/parser/HTMLTreeBuilder.cpp:
3125         (WebCore::HTMLTreeBuilder::FragmentParsingContext::FragmentParsingContext):
3126         (WebCore::HTMLTreeBuilder::processEndTag):
3127         * html/parser/HTMLTreeBuilder.h:
3128         (FragmentParsingContext):
3129         * platform/blackberry/PasteboardBlackBerry.cpp:
3130         (WebCore::Pasteboard::documentFragment):
3131         * platform/chromium/DragDataChromium.cpp:
3132         (WebCore::DragData::asFragment):
3133         * platform/chromium/PasteboardChromium.cpp:
3134         (WebCore::Pasteboard::documentFragment):
3135         * platform/gtk/PasteboardGtk.cpp:
3136         (WebCore::Pasteboard::documentFragment):
3137         * platform/mac/PasteboardMac.mm:
3138         (WebCore::Pasteboard::documentFragment):
3139         * platform/qt/DragDataQt.cpp:
3140         (WebCore::DragData::asFragment):
3141         * platform/qt/PasteboardQt.cpp:
3142         (WebCore::Pasteboard::documentFragment):
3143         * platform/win/ClipboardUtilitiesWin.cpp:
3144         (WebCore::fragmentFromCFHTML):
3145         (WebCore::fragmentFromHTML):
3146         * xml/XMLErrors.cpp:
3147         (WebCore::createXHTMLParserErrorHeader):
3148         (WebCore::XMLErrors::insertErrorMessageBlock):
3149         * xml/parser/NewXMLDocumentParser.h:
3150         (NewXMLDocumentParser):
3151         * xml/parser/XMLDocumentParser.h:
3152         (XMLDocumentParser):
3153         * xml/parser/XMLDocumentParserLibxml2.cpp:
3154         (WebCore::XMLDocumentParser::XMLDocumentParser):
3155         (WebCore::XMLDocumentParser::endElementNs):
3156         * xml/parser/XMLDocumentParserQt.cpp:
3157         (WebCore::XMLDocumentParser::XMLDocumentParser):
3158         (WebCore::XMLDocumentParser::parseEndElement):
3159
3160 2012-05-20  Kentaro Hara  <haraken@chromium.org>
3161
3162         [V8] Pass Isolate to V8Utilities::createFunctionCallback()
3163         https://bugs.webkit.org/show_bug.cgi?id=86978
3164
3165         Reviewed by Adam Barth.
3166
3167         The objective is to pass Isolate around in V8 bindings.
3168         This patch passes Isolate to V8Utilities::createFunctionCallback().
3169
3170         No tests. No change in behavior.
3171
3172         * bindings/v8/V8Utilities.cpp:
3173         (WebCore::throwTypeMismatchException):
3174         * bindings/v8/V8Utilities.h:
3175         (WebCore):
3176         (WebCore::createFunctionOnlyCallback):
3177         * bindings/v8/custom/V8GeolocationCustom.cpp:
3178         (WebCore::V8Geolocation::getCurrentPositionCallback):
3179         (WebCore::V8Geolocation::watchPositionCallback):
3180         * bindings/v8/custom/V8NotificationCustom.cpp:
3181         (WebCore::V8Notification::requestPermissionCallback):
3182
3183 2012-05-20  Kentaro Hara  <haraken@chromium.org>
3184
3185         [V8] Pass Isolate to throwError()s in bindings/v8/*.{h,cpp}
3186         https://bugs.webkit.org/show_bug.cgi?id=86977
3187
3188         Reviewed by Adam Barth.
3189
3190         The objective is to pass Isolate around in V8 bindings.
3191         This patch passes Isolate to throwError()s in bindings/v8/*.{h,cpp}
3192         except for a couple of non-trivial cases. I'll upload a follow-up patch
3193         for the non-trivial cases.
3194
3195         No tests. No change in behavior.
3196
3197         * bindings/v8/DateExtension.cpp:
3198         (WebCore::DateExtension::OnSleepDetected):
3199         * bindings/v8/SerializedScriptValue.cpp:
3200         (WebCore::SerializedScriptValue::transferArrayBuffers):
3201         (WebCore::SerializedScriptValue::SerializedScriptValue):
3202         * bindings/v8/SerializedScriptValue.h:
3203         * bindings/v8/V8NPObject.cpp:
3204         (WebCore::npObjectInvokeImpl):
3205         (WebCore::npObjectPropertyEnumerator):
3206         * bindings/v8/V8Proxy.cpp:
3207         (WebCore::V8Proxy::checkNewLegal):
3208
3209 2012-05-20  Keishi Hattori  <keishi@webkit.org>
3210
3211         [Chromium] Enable datalist for input type email
3212         https://bugs.webkit.org/show_bug.cgi?id=85356
3213
3214         Reviewed by Kent Tamura.
3215
3216         No new tests. Covered in fast/forms/datalist/input-list.html
3217
3218         * rendering/RenderThemeChromiumCommon.cpp:
3219         (WebCore::RenderThemeChromiumCommon::supportsDataListUI):
3220
3221 2012-05-20  Kentaro Hara  <haraken@chromium.org>
3222
3223         [V8] Pass Isolate to throwError()s in CodeGeneratorV8.pm
3224         https://bugs.webkit.org/show_bug.cgi?id=86976
3225
3226         Reviewed by Adam Barth.
3227
3228         The objective is to pass Isolate around in V8 bindings.
3229         This patch passes Isolate to throwError()s in CodeGeneratorV8.pm.
3230
3231         No tests. No change in behavior.
3232
3233         * bindings/scripts/CodeGeneratorV8.pm:
3234         (GenerateNormalAttrGetter):
3235         (GenerateNormalAttrSetter):
3236         (GenerateParametersCheck):
3237         (GenerateConstructorCallback):
3238         (GenerateNamedConstructorCallback):
3239         (GenerateFunctionCallString):
3240         * bindings/scripts/test/V8/V8TestInterface.cpp:
3241         (WebCore::V8TestInterface::constructorCallback):
3242         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
3243         (WebCore::V8TestNamedConstructorConstructorCallback):
3244         * bindings/scripts/test/V8/V8TestObj.cpp:
3245         (WebCore::TestObjV8Internal::withScriptStateAttributeAttrSetter):
3246         (WebCore::TestObjV8Internal::withScriptStateAttributeRaisesAttrGetter):
3247         (WebCore::TestObjV8Internal::withScriptStateAttributeRaisesAttrSetter):
3248         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttrSetter):
3249         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrGetter):
3250         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrSetter):
3251         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrSetter):
3252         (WebCore::TestObjV8Internal::withScriptStateVoidCallback):
3253         (WebCore::TestObjV8Internal::withScriptStateObjCallback):
3254         (WebCore::TestObjV8Internal::withScriptStateVoidExceptionCallback):
3255         (WebCore::TestObjV8Internal::withScriptStateObjExceptionCallback):
3256         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateCallback):
3257         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateObjExceptionCallback):
3258         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesCallback):
3259         (WebCore::TestObjV8Internal::methodWithCallbackArgCallback):
3260         (WebCore::TestObjV8Internal::methodWithNonCallbackArgAndCallbackArgCallback):
3261         (WebCore::TestObjV8Internal::methodWithCallbackAndOptionalArgCallback):
3262         (WebCore::TestObjV8Internal::overloadedMethod5Callback):
3263         (WebCore::V8TestObj::constructorCallback):
3264
3265 2012-05-20  George Staikos  <staikos@webkit.org>
3266
3267         [BlackBerry] Implement the Screen functions to get DPI.
3268         https://bugs.webkit.org/show_bug.cgi?id=86967
3269
3270         Reviewed by Antonio Gomes.
3271
3272         * platform/blackberry/PlatformScreenBlackBerry.cpp:
3273         (WebCore::screenHorizontalDPI):
3274         (WebCore::screenVerticalDPI):
3275
3276 2012-05-20  Shinya Kawanaka  <shinyak@chromium.org>
3277
3278         [Refactoring] Node::shadowHost() and Node::setShadowHost() can be moved to ShadowRoot.
3279         https://bugs.webkit.org/show_bug.cgi?id=86585
3280
3281         Reviewed by Hajime Morita.
3282
3283         Since Node::shadowHost() and Node::setShadowHost() are valid only if Node is ShadowRoot,
3284         they should be moved to ShadowRoot.
3285
3286         However, Node::setParent cannot be called from ShadowRoot, we add Node::setParentOrHostNode
3287         to call it as Node::parentOrHostNode() calls Node::parent(). Node::setParent() is now private.
3288         We also add SVGElementInstance::setParentOrHostNode() to share ContainerNodeAlgorithm.
3289
3290         No new tests, no change in behavior.
3291
3292         * dom/Attr.cpp:
3293         (WebCore::Attr::createTextChild):
3294         * dom/ContainerNode.cpp:
3295         (WebCore::ContainerNode::insertBeforeCommon):
3296         (WebCore::ContainerNode::removeBetween):
3297         (WebCore::ContainerNode::removeChildren):
3298         * dom/ContainerNodeAlgorithms.h:
3299         (WebCore::appendChildToContainer):
3300         (WebCore::Private::addChildNodesToDeletionQueue):
3301         * dom/ElementShadow.cpp:
3302         (WebCore::validateShadowRoot):
3303         (WebCore::ElementShadow::addShadowRoot):
3304         (WebCore::ElementShadow::removeAllShadowRoots):
3305         * dom/EventDispatcher.cpp:
3306         (WebCore::eventTargetRespectingSVGTargetRules):
3307         (WebCore::EventDispatcher::ensureEventAncestors):
3308         (WebCore::EventDispatcher::determineDispatchBehavior):
3309         * dom/EventDispatcher.h:
3310         (WebCore):
3311         (EventDispatcher):
3312         * dom/Node.cpp:
3313         (WebCore::Node::parentOrHostElement):
3314         * dom/Node.h:
3315         (Node):
3316         (WebCore::Node::setParentOrHostNode):
3317         (WebCore):
3318         * dom/NodeRenderingContext.cpp:
3319         (WebCore::NodeRenderingContext::NodeRenderingContext):
3320         * dom/ShadowRoot.h:
3321         (WebCore::ShadowRoot::host):
3322         (WebCore):
3323         (WebCore::ShadowRoot::setHost):
3324         * dom/TreeScope.cpp:
3325         (WebCore::TreeScope::focusedNode):
3326         * html/shadow/ContentSelectorQuery.cpp:
3327         (WebCore::ContentSelectorQuery::matches):
3328         * page/DragController.cpp:
3329         (WebCore::asFileInput):
3330         * page/EventHandler.cpp:
3331         (WebCore::EventHandler::handleMousePressEvent):
3332         (WebCore::instanceAssociatedWithShadowTreeElement):
3333         (WebCore::EventHandler::dispatchMouseEvent):
3334         * page/FocusController.cpp:
3335         (WebCore::FocusScope::owner):
3336         * rendering/RenderBlock.cpp:
3337         (WebCore::RenderBlock::hasLineIfEmpty):
3338         * svg/SVGElementInstance.h:
3339         (WebCore::SVGElementInstance::setParentOrHostNode):
3340         (SVGElementInstance):
3341         * svg/SVGStyledElement.cpp:
3342         (WebCore::SVGStyledElement::title):
3343         * svg/SVGTRefElement.cpp:
3344         (WebCore::SVGShadowText::willRecalcTextStyle):
3345
3346 2012-05-20  Joe Thomas  <joethomas@motorola.com>
3347
3348         Unsupported commands should have queryCommandValue() = "", not false
3349         https://bugs.webkit.org/show_bug.cgi?id=86964
3350
3351         Reviewed by Ryosuke Niwa.
3352
3353         queryCommandValue for unsupported commands should return empty string.
3354         The specification related to this can be located at http://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#methods-to-query-and-execute-commands
3355
3356         Test: editing/execCommand/queryCommandValue-unsupported-commands.html
3357
3358         * dom/Document.idl:
3359
3360 2012-05-20  Kentaro Hara  <haraken@chromium.org>
3361
3362         Unreviewed. Rebaselined run-bindings-tests results.
3363
3364         * bindings/scripts/test/JS/JSTestInterface.cpp:
3365         (WebCore::setJSTestInterfaceSupplementalStr2):
3366         (WebCore::setJSTestInterfaceSupplementalStr3):
3367         (WebCore::setJSTestInterfaceSupplementalNode):
3368         * bindings/scripts/test/JS/JSTestObj.cpp:
3369         (WebCore::setJSTestObjShortAttr):
3370         (WebCore::setJSTestObjUnsignedShortAttr):
3371         (WebCore::setJSTestObjIntAttr):
3372         (WebCore::setJSTestObjLongLongAttr):
3373         (WebCore::setJSTestObjUnsignedLongLongAttr):
3374         (WebCore::setJSTestObjStringAttr):
3375         (WebCore::setJSTestObjTestObjAttr):
3376         (WebCore::setJSTestObjSequenceAttr):
3377         (WebCore::setJSTestObjIntSequenceAttr):
3378         (WebCore::setJSTestObjShortSequenceAttr):
3379         (WebCore::setJSTestObjLongSequenceAttr):
3380         (WebCore::setJSTestObjLongLongSequenceAttr):
3381         (WebCore::setJSTestObjUnsignedIntSequenceAttr):
3382         (WebCore::setJSTestObjUnsignedShortSequenceAttr):
3383         (WebCore::setJSTestObjUnsignedLongSequenceAttr):
3384         (WebCore::setJSTestObjUnsignedLongLongSequenceAttr):
3385         (WebCore::setJSTestObjFloatSequenceAttr):
3386         (WebCore::setJSTestObjDoubleSequenceAttr):
3387         (WebCore::setJSTestObjBooleanSequenceAttr):
3388         (WebCore::setJSTestObjVoidSequenceAttr):
3389         (WebCore::setJSTestObjDateSequenceAttr):
3390         (WebCore::setJSTestObjXMLObjAttr):
3391         (WebCore::setJSTestObjCreate):
3392         (WebCore::setJSTestObjReflectedStringAttr):
3393         (WebCore::setJSTestObjReflectedIntegralAttr):
3394         (WebCore::setJSTestObjReflectedUnsignedIntegralAttr):
3395         (WebCore::setJSTestObjReflectedBooleanAttr):
3396         (WebCore::setJSTestObjReflectedURLAttr):
3397         (WebCore::setJSTestObjReflectedCustomIntegralAttr):
3398         (WebCore::setJSTestObjReflectedCustomBooleanAttr):
3399         (WebCore::setJSTestObjReflectedCustomURLAttr):
3400         (WebCore::setJSTestObjAttrWithGetterException):
3401         (WebCore::setJSTestObjAttrWithSetterException):
3402         (WebCore::setJSTestObjStringAttrWithGetterException):
3403         (WebCore::setJSTestObjStringAttrWithSetterException):
3404         (WebCore::setJSTestObjCustomAttr):
3405         (WebCore::setJSTestObjWithScriptStateAttribute):
3406         (WebCore::setJSTestObjWithScriptExecutionContextAttribute):
3407         (WebCore::setJSTestObjWithScriptStateAttributeRaises):
3408         (WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises):
3409         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute):
3410         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
3411         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
3412         (WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute):
3413         (WebCore::setJSTestObjConditionalAttr1):
3414         (WebCore::setJSTestObjConditionalAttr2):
3415         (WebCore::setJSTestObjConditionalAttr3):
3416         (WebCore::setJSTestObjConditionalAttr4Constructor):
3417         (WebCore::setJSTestObjConditionalAttr5Constructor):
3418         (WebCore::setJSTestObjConditionalAttr6Constructor):
3419         (WebCore::setJSTestObjMutablePoint):
3420         (WebCore::setJSTestObjImmutablePoint):
3421         (WebCore::setJSTestObjStrawberry):
3422         (WebCore::setJSTestObjStrictFloat):
3423         (WebCore::setJSTestObjId):
3424         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3425         (WebCore::setJSTestSerializedScriptValueInterfaceValue):
3426         (WebCore::setJSTestSerializedScriptValueInterfaceCachedValue):
3427
3428 2012-05-20  George Staikos  <staikos@webkit.org>
3429
3430         Use reinterpret_cast_ptr<> to fix an alignment warning.
3431         https://bugs.webkit.org/show_bug.cgi?id=80790
3432
3433         Reviewed by Rob Buis.
3434
3435         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
3436         (WebCore::error_exit):
3437
3438 2012-05-20  Takashi Sakamoto  <tasak@google.com>
3439
3440         Needs style recalculation by changing applyAuthorStyles dynamically
3441         https://bugs.webkit.org/show_bug.cgi?id=84251
3442
3443         Modifying setApplyAuthorStyles to invoke owner()'s
3444         setNeedsRedistributing if applyAuthorStyles changes.
3445
3446         Reviewed by Hajime Morita.
3447
3448         No new tests. Adding new tests to existing
3449         fast/dom/shadow/shadow-root-applyAuthorStyles.html to test this
3450         feature.
3451
3452         * dom/ShadowRoot.cpp:
3453         (WebCore::ShadowRoot::setApplyAuthorStyles):
3454         If applyAuthorStyles changes, invoke owner's setNeedsRedistributing to
3455         recalculate styles of the shadow root's child elements.
3456
3457 2012-05-20  Philip Rogers  <pdr@google.com>
3458
3459         Accumulate SVG animations into first contributing element
3460         https://bugs.webkit.org/show_bug.cgi?id=86385
3461
3462         Reviewed by Nikolas Zimmermann.
3463
3464         Previously we were accumulating animations into the first animation element when
3465         there were multiple animations for a single element. This crashed if the first
3466         animation ended first because the first animation was prematurely cleaned up.
3467         This change accumulates animations into the first _contributing_ animation element.
3468
3469         Tests: svg/animations/multiple-animations-ending.html
3470                svg/animations/svg-two-animate-elements-crash-expected.svg
3471                svg/animations/svg-two-animate-elements-crash.svg
3472
3473         * svg/animation/SMILTimeContainer.cpp:
3474         (WebCore::SMILTimeContainer::updateAnimations):
3475         * svg/animation/SVGSMILElement.cpp:
3476         (WebCore::SVGSMILElement::progress):
3477
3478 2012-05-20  Philip Rogers  <pdr@google.com>
3479
3480         Fix hit testing on non-scaling strokes
3481         https://bugs.webkit.org/show_bug.cgi?id=82628
3482
3483         Reviewed by Nikolas Zimmermann.
3484
3485         This change fixes hit testing on non-scaling strokes. It contains fixes for 3 bugs:
3486         1) RenderSVGRect::shapeDependentStrokeContains was not falling back to shape-based hit testing.
3487         2) m_strokeAndMarkerBoundingBox did not account for non-scaling strokes.
3488         3) RenderSVGShape::shapeDependentStrokeContains did not have any support for non-scaling strokes.
3489
3490         This change also contains some refactoring/cleanup of the non-scale-stroke codepaths.
3491
3492         Test: svg/hittest/svg-shapes-non-scale-stroke.html
3493
3494         * rendering/svg/RenderSVGEllipse.cpp:
3495         (WebCore::RenderSVGEllipse::createShape):
3496         * rendering/svg/RenderSVGRect.cpp:
3497         (WebCore::RenderSVGRect::createShape):
3498         (WebCore::RenderSVGRect::shapeDependentStrokeContains):
3499         * rendering/svg/RenderSVGShape.cpp:
3500         (WebCore::RenderSVGShape::shapeDependentStrokeContains):
3501         (WebCore::RenderSVGShape::shapeDependentFillContains):
3502         (WebCore::RenderSVGShape::nonScalingStrokePath):
3503         (WebCore):
3504         (WebCore::RenderSVGShape::setupNonScalingStrokeContext):
3505         (WebCore::RenderSVGShape::nonScalingStrokeTransform):
3506         (WebCore::RenderSVGShape::strokePath):
3507         (WebCore::RenderSVGShape::fillAndStrokePath):
3508         (WebCore::RenderSVGShape::updateCachedBoundaries):
3509         (WebCore::RenderSVGShape::inflateWithStrokeAndMarkerBounds):
3510         * rendering/svg/RenderSVGShape.h:
3511         (WebCore::RenderSVGShape::hasNonScalingStroke):
3512         (RenderSVGShape):
3513
3514 2012-05-19  Emil A Eklund  <eae@chromium.org>
3515
3516         Simplify RenderOverflow by using Rects
3517         https://bugs.webkit.org/show_bug.cgi?id=86894
3518
3519         Reviewed by Eric Seidel.
3520
3521         Simplify the RenderOverflow class and the uses of it by storing the
3522         overflow values in rects and using the rects instead of the individual
3523         values where it makes sense.
3524
3525         No new tests, no change in functionality.
3526
3527         * page/FrameView.cpp:
3528         (WebCore::FrameView::adjustPageHeightDeprecated):
3529         Change to use layoutOverflowRect().maxX() and replace C style casts with
3530         C++ style to comply with style guide.
3531         
3532         * rendering/InlineFlowBox.h:
3533         (WebCore::InlineFlowBox::logicalLeftLayoutOverflow):
3534         (WebCore::InlineFlowBox::logicalRightLayoutOverflow):
3535         (WebCore::InlineFlowBox::logicalTopLayoutOverflow):
3536         (WebCore::InlineFlowBox::logicalBottomLayoutOverflow):
3537         (WebCore::InlineFlowBox::logicalLeftVisualOverflow):
3538         (WebCore::InlineFlowBox::logicalRightVisualOverflow):
3539         (WebCore::InlineFlowBox::logicalTopVisualOverflow):
3540         (WebCore::InlineFlowBox::logicalBottomVisualOverflow):
3541         Change methods to use layoutOverflowRect() and visualOverflowRect().
3542         
3543         * rendering/RenderBox.cpp:
3544         (WebCore::RenderBox::scrollWidth):
3545         (WebCore::RenderBox::scrollHeight):
3546         Change methods to use visualOverflowRect().
3547         
3548         (WebCore::RenderBox::clearLayoutOverflow):
3549         Use setLayoutOverflow instead of resetLayoutOverflow (which has been
3550         removed as it did exactly the same thing as the set method).
3551         
3552         * rendering/RenderBox.h:
3553         (WebCore::RenderBox::maxLayoutOverflow):
3554         (WebCore::RenderBox::logicalLeftLayoutOverflow):
3555         (WebCore::RenderBox::logicalRightLayoutOverflow):
3556         (WebCore::RenderBox::logicalLeftVisualOverflow):
3557         (WebCore::RenderBox::logicalRightVisualOverflow):
3558         Remove minYLayoutOverflow, maxYLayoutOverflow, minXLayoutOverflow and
3559         maxXLayoutOverflow and update the remaining methods to use
3560         layoutOverflowRect().
3561         
3562         * rendering/RenderMarquee.cpp:
3563         (WebCore::RenderMarquee::computePosition):
3564         Change to use layoutOverflowRect().
3565         
3566         * rendering/RenderOverflow.h:
3567         (WebCore::RenderOverflow::RenderOverflow):
3568         (WebCore::RenderOverflow::layoutOverflowRect):
3569         (WebCore::RenderOverflow::visualOverflowRect):
3570         (RenderOverflow):
3571         (WebCore::RenderOverflow::setMinYLayoutOverflow):
3572         (WebCore::RenderOverflow::setMaxYLayoutOverflow):
3573         (WebCore::RenderOverflow::setMinXLayoutOverflow):
3574         (WebCore::RenderOverflow::setMaxXLayoutOverflow):
3575         (WebCore::RenderOverflow::setMinYVisualOverflow):
3576         (WebCore::RenderOverflow::setMaxYVisualOverflow):
3577         (WebCore::RenderOverflow::setMinXVisualOverflow):
3578         (WebCore::RenderOverflow::setMaxXVisualOverflow):
3579         (WebCore):
3580         (WebCore::RenderOverflow::move):
3581         (WebCore::RenderOverflow::addLayoutOverflow):
3582         (WebCore::RenderOverflow::addVisualOverflow):
3583         (WebCore::RenderOverflow::setLayoutOverflow):
3584         (WebCore::RenderOverflow::setVisualOverflow):
3585         Change RenderOverflow to use two rects instead of two sets of four
3586         values. Remove [min|max][Layout|Visual]Overflow getters and change the
3587         layoutOverflowRect and visualOverflowRect methods to return the rects.
3588         
3589         * rendering/RenderReplaced.cpp:
3590         (WebCore::RenderReplaced::shouldPaint):
3591         Change to use visualOverflowRect().
3592         
3593         * rendering/RenderTable.cpp:
3594         (WebCore::RenderTable::layout):
3595         Change to use visualOverflowRect().
3596         
3597         * rendering/RenderTableCell.cpp:
3598         (WebCore::RenderTableCell::clippedOverflowRectForRepaint):
3599         Change to use visualOverflowRect().
3600         
3601         * rendering/RenderTreeAsText.cpp:
3602         (WebCore::writeLayers):
3603         Change to use layoutOverflowRect().
3604
3605 2012-05-19  Rob Buis  <rbuis@rim.com>
3606
3607         Remove bbox caching from SVGPathElement
3608         https://bugs.webkit.org/show_bug.cgi?id=86233
3609
3610         Reviewed by Nikolas Zimmermann.
3611
3612         Remove caching of path bounding box, since SVGLocatable::getBBox is not used much at all.
3613         This saves 200k of memory for worldcup.svg on 64-bit machine.
3614
3615         * svg/SVGPathElement.cpp:
3616         (WebCore::SVGPathElement::SVGPathElement):
3617         (WebCore::SVGPathElement::svgAttributeChanged):
3618         (WebCore::SVGPathElement::pathSegListChanged):
3619         (WebCore::SVGPathElement::getBBox):
3620         * svg/SVGPathElement.h:
3621         (SVGPathElement):
3622
3623 2012-05-19  Andy Estes  <aestes@apple.com>
3624
3625         Fix build errors found when disabling ENABLE_DRAG_SUPPORT
3626         https://bugs.webkit.org/show_bug.cgi?id=86947
3627
3628         Reviewed by Jon Honeycutt.
3629
3630         * page/mac/EventHandlerMac.mm:
3631         (WebCore::EventHandler::passMouseMoveEventToSubframe):
3632         * platform/mac/ClipboardMac.mm:
3633         (WebCore):
3634
3635 2012-05-19  Joe Thomas  <joethomas@motorola.com>
3636
3637         The order of CSS properties is wrong in background shorthand
3638         https://bugs.webkit.org/show_bug.cgi?id=86152
3639
3640         Reviewed by Ryosuke Niwa.
3641
3642         Corrected the order of properties returned in StylePropertySet::getPropertyValue for background shorthand property to match the specification  
3643         http://www.w3.org/TR/css3-background/#background.
3644
3645         * css/StylePropertyShorthand.cpp:
3646         (WebCore::backgroundShorthand):
3647
3648 2012-05-19  Ryosuke Niwa  <rniwa@webkit.org>
3649
3650         Touch Internals.* in an attempt to fix Windows builds after r117646.
3651
3652         * testing/Internals.cpp:
3653         * testing/Internals.h:
3654         * testing/Internals.idl:
3655
3656 2012-05-18  Ryosuke Niwa  <rniwa@webkit.org>
3657
3658         WebKit erroneously add 1px padding in input elements
3659         https://bugs.webkit.org/show_bug.cgi?id=86784
3660
3661         Reviewed by Kent Tamura.
3662
3663         Fixed the bug by removing the code that added left and right paddings in input elements.
3664         The code was added in r13567 to match a very old version of Internet Explorer but this quirk
3665         does not seem to exists in IE9 (both in quirks and standard modes).
3666
3667         A lot of tests need to be rebaselined due to 1px difference inside input elements, and 2px
3668         differences for the width of input elements. (In some extreme cases, line breaking changed
3669         due to the width change).
3670
3671         Test: fast/forms/input-textarea-padding-match.html
3672
3673         * css/html.css:
3674         (input::-webkit-input-placeholder, isindex::-webkit-input-placeholder):
3675         * rendering/RenderTextControlSingleLine.cpp:
3676         (WebCore::RenderTextControlSingleLine::createInnerTextStyle):
3677
3678 2012-05-18  Adrienne Walker  <enne@google.com>
3679
3680         [chromium] Add diagnostic CRASH calls for tiler crashes
3681         https://bugs.webkit.org/show_bug.cgi?id=86930
3682
3683         Reviewed by James Robinson.
3684
3685         These lines would normally crash on their own due to null pointers,
3686         but having an explicit CRASH call will help us differentiate what the
3687         real problem might be in the crash report.
3688
3689         * platform/graphics/chromium/TiledLayerChromium.cpp:
3690         (WebCore::TiledLayerChromium::createTile):
3691         (WebCore::TiledLayerChromium::updateTiles):
3692
3693 2012-05-18  Aaron Colwell  <acolwell@chromium.org>
3694
3695         Update Media Source implementation to reflect changes in 0.5 spec.
3696         https://bugs.webkit.org/show_bug.cgi?id=83607
3697
3698         Reviewed by Darin Fisher.
3699
3700         Tests: http/tests/media/media-source/video-media-source-event-attributes.html
3701                http/tests/media/media-source/webm/video-media-source-abort.html
3702                http/tests/media/media-source/webm/video-media-source-add-and-remove-ids.html
3703
3704         * html/HTMLAttributeNames.in: Add onwebkitsourcexxx event attribute names.
3705         * html/HTMLMediaElement.cpp: 
3706         (WebCore::HTMLMediaElement::parseAttribute): Add code to register event listeners for the onwebkitsourcexxx attributes.
3707         (WebCore::HTMLMediaElement::pauseInternal):
3708         (WebCore):
3709         (WebCore::HTMLMediaElement::webkitSourceAddId): Changed code to pass the parsed type & codecs to m_player instead of the whole MIME-type string. This was done to allow some simple parsing & validation code to be shared in WebKit instead of reimplemented in every port.
3710         (WebCore::HTMLMediaElement::webkitSourceBuffered): New method in the v0.5 spec. It validates the parameters & that it is being called in the correct state. If so it forwards the call to m_player.
3711         (WebCore::HTMLMediaElement::webkitSourceAppend): Adds id parameter to match v0.5 signature. Minor logic changes that avoid calling m_player for 0 byte arrays and fixes exceptions reported for a null array and a parse error so they match the spec text.
3712         (WebCore::HTMLMediaElement::webkitSourceAbort): New method in the v0.5 spec. It validates the parameter & that it is being called in athe correct state. If so it forwards the call to m_player.
3713         * html/HTMLMediaElement.h:
3714         (HTMLMediaElement): Added new methods, signature updates, and onwebitsourcexxx event listener attributes.
3715         * html/HTMLMediaElement.idl: Added new methods, signature updates, and onwebitsourcexxx event listener attributes.
3716         * platform/ContentType.cpp:
3717         (WebCore::ContentType::codecs): A new method that parses the codecs parameter into a vector of codec strings.
3718         (WebCore):
3719         * platform/ContentType.h: 
3720         (ContentType):
3721         * platform/graphics/MediaPlayer.cpp:
3722         (WebCore::NullMediaPlayerPrivate::sourceAddId): Update the signature to take the parsed type and codecs vector.
3723         (WebCore::NullMediaPlayerPrivate::sourceBuffered): Add default implementation for this new method.
3724         (WebCore::NullMediaPlayerPrivate::sourceRemoveId): Remove id parameter name to match other methods.
3725         (WebCore::NullMediaPlayerPrivate::sourceAppend): Updated signature to include id parameter.
3726         (WebCore::NullMediaPlayerPrivate::sourceAbort): Add default implementation for this new method.
3727         (WebCore::NullMediaPlayerPrivate::sourceEndOfStream): Remove parameter name to match other methods.
3728         (WebCore::MediaPlayer::sourceAddId): Update the signature to take the parsed type and codecs vector.
3729         (WebCore):
3730         (WebCore::MediaPlayer::sourceBuffered): Add implementation for new method that forwards the call to the MediaPlayerPrivate interface.
3731         (WebCore::MediaPlayer::sourceAppend): Update method to forward the new id parameter in the signature.
3732         (WebCore::MediaPlayer::sourceAbort): Add implementation for new method that forwards the call to the MediaPlayerPrivate interface.
3733         * platform/graphics/MediaPlayer.h: Update interface to include new methods and updated signatures.
3734         * platform/graphics/MediaPlayerPrivate.h:
3735         (WebCore::MediaPlayerPrivateInterface::sourceAddId): Update the signature to take the parsed type and codecs vector.
3736         (WebCore::MediaPlayerPrivateInterface::sourceBuffered): Add default implementation for new method.
3737         (WebCore::MediaPlayerPrivateInterface::sourceAppend): Update method to forward the new id parameter in the signature.
3738         (WebCore::MediaPlayerPrivateInterface::sourceAbort): Add default implementation for new method.
3739
3740 2012-05-18  Levi Weintraub  <leviw@chromium.org>
3741
3742         Revert to float method of selection rect alignment for line box tree
3743         https://bugs.webkit.org/show_bug.cgi?id=86904
3744
3745         Reviewed by Eric Seidel.
3746
3747         In r117491, we introduced a new method of alignment for the selection rect in the sub-pixel case.
3748         It turns out there is at least one case on Mac where this leaves a gap when painting selection rects
3749         originating in the line box tree. This patch reverts us to the float method for the line box tree,
3750         but retains the LayoutRect snapping for gap rects.
3751
3752         No new tests. Covered by existing tests with sub-pixel layout enabled.
3753
3754         * rendering/EllipsisBox.cpp:
3755         (WebCore::EllipsisBox::paintSelection): Re-enabling the FloatRect flavor of
3756         alignSelectionRectToDevicePixels for the line box tree.
3757         * rendering/InlineTextBox.cpp:
3758         (WebCore::alignSelectionRectToDevicePixels): Moving LayoutRect flavor to RenderBlock.
3759         (WebCore::InlineTextBox::paintSelection): Happily clearing up the bifurcation of algorithms for
3760         sub-pixel layout.
3761         * rendering/InlineTextBox.h: Re-enabling the FloatRect flavor of alignSelectionRectToDevicePixels
3762         for the line box tree.
3763         * rendering/RenderBlock.cpp:
3764         (WebCore::alignSelectionRectToDevicePixels): Re-seating the LayoutRect version of
3765         alignSelectionRectToDevicePixels for use with GapRects.
3766
3767 2012-05-18  Eric Seidel  <eric@webkit.org>
3768
3769         Assertion failure in BidiResolver::commitExplicitEmbedding() (!inIsolate() || m_currentExplicitEmbeddingSequence.isEmpty()) at wikipedia.org
3770         https://bugs.webkit.org/show_bug.cgi?id=76574
3771
3772         Reviewed by Levi Weintraub.
3773
3774         Consider this example:
3775         <span style="unicode-bidi: embed"><span style="unicode-bidi: isolate">a</span></span>
3776         Before this patch, we would ASSERT when computing the text runs, as we would have encountered
3777         the "embed LTR" directive from the outer span, but not try to "commit" this embedding until
3778         we encountered the first charater (an optimization to avoid creating unnecessary bidi embedding contexts).
3779         The ASSERT we were hitting was to ensure that embedding directives inside an isolated span
3780         did not bleed out and effect the surrounding text.
3781
3782         bidi "isolate" support uses a multi-pass Unicode Bidi Algorithm (UBA), which when encountering
3783         "isolated" sections of text ignores them in the first pass, and then goes back and runs
3784         a separate instance of the UBA on those isolated sections.
3785
3786         Once we scan into an "isolate" section (during an outer UBA application) we should not respect
3787         any embedding directives inside that "isolate" section.
3788
3789         However, in the above example, our "don't commit embeddings until we need them" and
3790         "assert we don't respect embeddings inside isolated spans" were conflicting.
3791         The fix is to make sure we always commit any pending embedding directives *before*
3792         we enter an isolate section.
3793
3794         Luckly there was no functional bug here as we were still respecting
3795         the embedding directives we were belatedly committing. After this change we're commiting
3796         those directives at a more appropriate time, thus avoiding the ASSERT.
3797
3798         Test: fast/text/bidi-isolate-embedding-crash.html
3799
3800         * platform/text/BidiResolver.h:
3801         (WebCore::::commitExplicitEmbedding):
3802         * rendering/InlineIterator.h:
3803         (WebCore::notifyObserverEnteredObject):
3804         (WebCore::IsolateTracker::commitExplicitEmbedding):
3805
3806 2012-05-18  Pratik Solanki  <psolanki@apple.com>
3807
3808         BitmapImage::BitmapImage(CGImageRef, ImageObserver*) needs to set m_sizeRespectingOrientation
3809         https://bugs.webkit.org/show_bug.cgi?id=86915
3810
3811         Reviewed by Oliver Hunt.
3812
3813         Set m_sizeRespectingOrientation to be the same as m_size. Otherwise it stays at 0x0 since
3814         this constructor also sets m_haveSize to true for the BitmapImage.
3815
3816         * platform/graphics/cg/ImageCG.cpp:
3817         (WebCore::BitmapImage::BitmapImage):
3818
3819 2012-05-18  Dan Bernstein  <mitz@apple.com>
3820
3821         Build fix after r117607.
3822
3823         * platform/mac/WebCoreNSCellExtras.m:
3824
3825 2012-05-18  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
3826
3827         Fix remaining uses of JSValue::toBoolean()
3828         https://bugs.webkit.org/show_bug.cgi?id=86912
3829
3830         Reviewed by Filip Pizlo.
3831
3832         And unbreak Qt build.
3833
3834         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3835         (WebCore::jsTestEventTargetPrototypeFunctionAddEventListener):
3836         (WebCore::jsTestEventTargetPrototypeFunctionRemoveEventListener):
3837         * bindings/scripts/test/JS/JSTestObj.cpp:
3838         (WebCore::setJSTestObjCreate):
3839         (WebCore::setJSTestObjReflectedBooleanAttr):
3840         (WebCore::setJSTestObjReflectedCustomBooleanAttr):
3841         (WebCore::jsTestObjPrototypeFunctionAddEventListener):
3842         (WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
3843         * bridge/qt/qt_runtime.cpp:
3844         (JSC::Bindings::convertValueToQVariant):
3845         * bridge/qt/qt_runtime_qt4.cpp:
3846         (JSC::Bindings::convertValueToQVariant):
3847
3848 2012-04-27  Filip Pizlo  <fpizlo@apple.com>
3849
3850         DFG should have control flow graph simplification
3851         https://bugs.webkit.org/show_bug.cgi?id=84553
3852
3853         Reviewed by Oliver Hunt.
3854
3855         Merged r115512 from dfgopt.
3856
3857         JSValue::toBoolean(ExecState*) -> JSValue::toBoolean()
3858         
3859         No new tests, because no new behavior.
3860
3861         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
3862         (WebCore::JSSQLStatementErrorCallback::handleEvent):
3863         * bindings/js/JSDOMWindowCustom.cpp:
3864         (WebCore::JSDOMWindow::addEventListener):
3865         (WebCore::JSDOMWindow::removeEventListener):
3866         * bindings/js/JSDataViewCustom.cpp:
3867         (WebCore::getDataViewMember):
3868         * bindings/js/JSDeviceMotionEventCustom.cpp:
3869         (WebCore::JSDeviceMotionEvent::initDeviceMotionEvent):
3870         * bindings/js/JSDeviceOrientationEventCustom.cpp:
3871         (WebCore::JSDeviceOrientationEvent::initDeviceOrientationEvent):
3872         * bindings/js/JSDictionary.cpp:
3873         (WebCore::JSDictionary::convertValue):
3874         * bindings/js/JSDirectoryEntryCustom.cpp:
3875         (WebCore::JSDirectoryEntry::getFile):
3876         (WebCore::JSDirectoryEntry::getDirectory):
3877         * bindings/js/JSDirectoryEntrySyncCustom.cpp:
3878         (WebCore::getFlags):
3879         * bindings/js/JSHTMLCanvasElementCustom.cpp:
3880         (WebCore::JSHTMLCanvasElement::getContext):
3881         * bindings/js/JSInspectorFrontendHostCustom.cpp:
3882         (WebCore::JSInspectorFrontendHost::showContextMenu):
3883         * bindings/js/JSMessageEventCustom.cpp:
3884         (WebCore::handleInitMessageEvent):
3885         * bindings/js/JSWebGLRenderingContextCustom.cpp:
3886         (WebCore::dataFunctionMatrix):
3887         * bindings/js/JSXMLHttpRequestCustom.cpp:
3888         (WebCore::JSXMLHttpRequest::open):
3889         * bindings/js/ScriptDebugServer.cpp:
3890         (WebCore::ScriptDebugServer::hasBreakpoint):
3891         * bindings/scripts/CodeGeneratorJS.pm:
3892         (GenerateEventListenerCall):
3893         (GenerateImplementation):
3894         (JSValueToNative):
3895         * bridge/c/c_utility.cpp:
3896         (JSC::Bindings::convertValueToNPVariant):
3897         * bridge/jni/jni_jsobject.mm:
3898         (JavaJSObject::convertValueToJObject):
3899
3900 2012-05-18  Shawn Singh  <shawnsingh@chromium.org>
3901
3902         [chromium] add back-face visibility check for renderSurfaces
3903         https://bugs.webkit.org/show_bug.cgi?id=86870
3904
3905         Reviewed by Adrienne Walker.
3906
3907         Test added CCLayerTreeHostCommonTest::verifyBackFaceCullingWithPreserves3dForFlatteningSurface
3908
3909         Chromium was not checking back-face visibility for renderSurfaces
3910         that needed it. This patch adds that check and the appropriate
3911         unit test.
3912
3913         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
3914         (WebCore::layerIsInExisting3DRenderingContext):
3915         (WebCore):
3916         (WebCore::subtreeShouldRenderToSeparateSurface):
3917         (WebCore::calculateDrawTransformsAndVisibilityInternal):
3918
3919 2012-05-18  Levi Weintraub  <leviw@chromium.org>
3920
3921         Standalone table-columns should be wrapped in anonymous tables
3922         https://bugs.webkit.org/show_bug.cgi?id=86671
3923
3924         Reviewed by Julien Chaffraix.
3925
3926         The CSS2 spec specifies that table-columns misparented outside of a table or
3927         table-column-group should be wrapped in an anonymous table. Updating 
3928         RenderObject::addChild to follow the spec.
3929         see http://www.w3.org/TR/CSS2/tables.html#anonymous-boxes for details.
3930
3931         Tests: fast/table/table-column-generates-anonymous-table.html
3932                fast/table/table-column-group-generates-anonymous-table.html
3933
3934         * rendering/RenderObject.cpp:
3935         (WebCore::RenderObject::addChild):
3936
3937 2012-05-18  Keyar Hood  <keyar@chromium.org>
3938
3939         Support imageSmoothingEnabled
3940         https://bugs.webkit.org/show_bug.cgi?id=82804
3941
3942         Reviewed by Stephen White.
3943
3944         Test: fast/canvas/canvas-imageSmoothingEnabled.html
3945
3946         Added the imageSmoothingEnabled parameter to the
3947         CanvasRenderingContext2D object. When it is set to false, it sets
3948         InterpolationQuality to InterpolationNone. When set to true, it sets
3949         the InterpolationQuality to DefaultInterpolationQuality (as that is the
3950         only other value used).
3951
3952         * html/canvas/CanvasRenderingContext2D.cpp:
3953         (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
3954         (WebCore::CanvasRenderingContext2D::webkitImageSmoothingEnabled):
3955         (WebCore):
3956         (WebCore::CanvasRenderingContext2D::setWebkitImageSmoothingEnabled):
3957         * html/canvas/CanvasRenderingContext2D.h:
3958         (CanvasRenderingContext2D):
3959         * html/canvas/CanvasRenderingContext2D.idl:
3960
3961 2012-05-18  Terry Anderson  <tdanderson@chromium.org>
3962
3963         Percentage height replaced elements sometimes cause overflow of table contents
3964         https://bugs.webkit.org/show_bug.cgi?id=85581
3965
3966         Reviewed by Eric Seidel.
3967
3968         Test: fast/replaced/table-replaced-element.html
3969
3970         * rendering/RenderBox.cpp:
3971         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
3972         This change guarantees that the containing block of a replaced element with percentage
3973         height will be marked as having a percentage height descendant.
3974
3975 2012-05-18  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
3976
3977         [Qt] REGRESSION(r117501): It made almost all tests assert in debug mode
3978         https://bugs.webkit.org/show_bug.cgi?id=86854
3979
3980         Reviewed by Andreas Kling.
3981
3982         Initialize boolean flag in constructor and recheck the flag which can be 
3983         modified by another thread under mutex.
3984
3985         No new tests, fixes regression that caused layout test crash.
3986
3987         * loader/icon/IconDatabase.cpp:
3988         (WebCore::IconDatabase::IconDatabase):
3989         (WebCore::IconDatabase::syncThreadMainLoop):
3990
3991 2012-05-18  Christophe Dumez  <christophe.dumez@intel.com>
3992
3993         [EFL] Web Intents code is not compiling
3994         https://bugs.webkit.org/show_bug.cgi?id=85364
3995
3996         Reviewed by Adam Barth.
3997
3998         Add missing implementation for
3999         JSIntentConstructor::constructJSIntent() in JS bindings.
4000
4001         * CMakeLists.txt:
4002         * UseJSC.cmake:
4003         * bindings/js/JSIntentConstructor.cpp: Added.
4004         (WebCore):
4005         (WebCore::JSIntentConstructor::constructJSIntent):
4006
4007 2012-05-18  Joe Thomas  <joethomas@motorola.com>
4008
4009         background-size specified by a single value in background shorthand fails to parse.
4010         https://bugs.webkit.org/show_bug.cgi?id=86739
4011
4012         Reviewed by Tony Chang.
4013
4014         While parsing the background shorthand property, if the second parsedValue is not a valid unit,
4015         parseFillSize should return the first parsedValue instead of failing.
4016
4017         * css/CSSParser.cpp:
4018         (WebCore::CSSParser::parseFillSize):
4019
4020 2012-05-18  Tony Chang  <tony@chromium.org>
4021
4022         remove the CSS_GRID_LAYOUT compiler define, but default grid layout to off
4023         https://bugs.webkit.org/show_bug.cgi?id=86767
4024
4025         Reviewed by Ojan Vafai.
4026
4027         We disable grid by ignoring