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