4d2c2085637f707a7f7cfc5c38a78858ebe6fb7b
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-06-25  Alpha Lam  <hclam@chromium.org>
2
3         Unreviewed, rolling out r121137.
4         http://trac.webkit.org/changeset/121137
5
6         Chromium build fix, (un)touch files to build on Chromium Win
7         Release
8
9         * css/CSSParserMode.h:
10         * css/CSSValue.h:
11         (WebCore):
12         * css/CSSVariableValue.h:
13         * page/Settings.h:
14         * rendering/style/RenderStyle.h:
15         * rendering/style/StyleRareInheritedData.h:
16         * rendering/style/StyleVariableData.h:
17
18 2012-06-25  Alpha Lam  <hclam@chromium.org>
19
20         Unreviewed, rolling out r121129.
21         http://trac.webkit.org/changeset/121129
22         https://bugs.webkit.org/show_bug.cgi?id=89542
23
24         Chromium ASan failure: crbug.com/134402
25
26         * css/CSSParser.cpp:
27         (WebCore::CSSParserContext::CSSParserContext):
28         (WebCore::operator==):
29         (WebCore):
30         (WebCore::CSSParser::detectDashToken):
31         (WebCore::CSSParser::lex):
32         * css/CSSParser.h:
33         (CSSParser):
34         * css/CSSParserMode.h:
35         (CSSParserContext):
36         * css/StyleResolver.cpp:
37         (WebCore::StyleResolver::collectMatchingRulesForList):
38         * page/Settings.h:
39         (Settings):
40         * testing/InternalSettings.cpp:
41         * testing/InternalSettings.h:
42         (InternalSettings):
43         * testing/InternalSettings.idl:
44
45 2012-06-25  Adam Barth  <abarth@webkit.org>
46
47         Use InterpolationLow on chromium-android
48         https://bugs.webkit.org/show_bug.cgi?id=89849
49
50         Reviewed by Daniel Bates.
51
52         Min Qin writes:
53
54           Using InterpolationHigh is very very expensive when resampling
55           images.  For example, it took 1400ms to decode an image on
56           http://www.crossfitsunnyvale.com/blog/, but it took 2800 ms to do the
57           resampling Switch to InterpolationLow will result in linear
58           resampling. It is much faster as the time it tooks is almost
59           non-noticable [sic] on the trace.
60
61         * platform/graphics/skia/PlatformContextSkia.cpp:
62         (WebCore::PlatformContextSkia::State::State):
63
64 2012-06-25  Joshua Bell  <jsbell@chromium.org>
65
66         IndexedDB: Remove unused backend property accessors
67         https://bugs.webkit.org/show_bug.cgi?id=89893
68
69         Reviewed by Darin Fisher.
70
71         Following the "metadata" API addition in trac.webkit.org/changeset/121059
72         the IDBXXXBackendInterface types no longer need per-property accessors.
73
74         No new tests - no functional changes.
75
76         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: Remove method implementation.
77         * Modules/indexeddb/IDBDatabaseBackendImpl.h: Remove methods.
78         (IDBDatabaseBackendImpl):
79         * Modules/indexeddb/IDBDatabaseBackendInterface.h: Remove methods.
80         (IDBDatabaseBackendInterface):
81         * Modules/indexeddb/IDBIndexBackendImpl.h: Make methods simple accessors.
82         (IDBIndexBackendImpl):
83         (WebCore::IDBIndexBackendImpl::name):
84         (WebCore::IDBIndexBackendImpl::keyPath):
85         (WebCore::IDBIndexBackendImpl::unique):
86         (WebCore::IDBIndexBackendImpl::multiEntry):
87         * Modules/indexeddb/IDBIndexBackendInterface.h: Remove methods.
88         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: Remove method implementation.
89         * Modules/indexeddb/IDBObjectStoreBackendImpl.h: Make methods simple accessors.
90         (IDBObjectStoreBackendImpl):
91         (WebCore::IDBObjectStoreBackendImpl::name):
92         (WebCore::IDBObjectStoreBackendImpl::keyPath):
93         (WebCore::IDBObjectStoreBackendImpl::autoIncrement):
94         * Modules/indexeddb/IDBObjectStoreBackendInterface.h: Remove methods.
95
96 2012-06-25  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
97
98         [EFL] Add support for building with ENABLE_MEDIA_STREAM
99         https://bugs.webkit.org/show_bug.cgi?id=88413
100
101         Reviewed by Dirk Pranke.
102
103         Add files which are needed for supporting the Media Stream
104         feature.
105
106         No change in functionality so no new tests.
107
108         * PlatformEfl.cmake:
109
110 2012-06-25  Huang Dongsung  <luxtella@company100.net>
111
112         [Texmap] TextureMapperPaintOptions should keep current surface.
113         https://bugs.webkit.org/show_bug.cgi?id=89266
114
115         Before this patch, if a replica layer has a descendant replica child, the child
116         layer does not render the result in the parent layer's surface because
117         TextureMapperPaintOptions does not keep current surface.
118         This patch amends that TextureMapperPaintOptions keeps current surface before
119         calling paintSelfAndChildrenWithReplica recursively, so previous surface could be
120         restored after paintSelfAndChildrenWithReplica.
121
122         Reviewed by Noam Rosenthal.
123
124         Test: compositing/reflections/animation-inside-reflection.html
125
126         * platform/graphics/texmap/TextureMapperLayer.cpp:
127         (WebCore::TextureMapperLayer::paintRecursive):
128
129 2012-06-25  Ian Vollick  <vollick@chromium.org>
130
131         [chromium] Layer chromium should need a redraw after getting its first non-empty bounds.
132         https://bugs.webkit.org/show_bug.cgi?id=89784
133
134         Reviewed by James Robinson.
135
136         Previously, we'd only set needs redraw if the old bounds were zero,
137         and the new bounds were non-zero, but we should actually have 
138         checked that the old bounds were non-empty.
139
140         Unit test: LayerChromiumTestWithoutFixture.setBoundsTriggersSetNeedsRedrawAfterGettingNonEmptyBounds
141
142         * platform/graphics/chromium/LayerChromium.cpp:
143         (WebCore::LayerChromium::setBounds):
144
145 2012-06-25  Scott Graham  <scottmg@chromium.org>
146
147         Plumb Scrollbar button dimensions down to WebThemeEngine
148         https://bugs.webkit.org/show_bug.cgi?id=89264
149
150         Reviewed by James Robinson.
151
152         Rather than making the height of the scrollbar buttons the same as the
153         width of the scrollbar, delegate to the WebThemeEngine. This allows
154         matching the Aura theme rather than the standard Windows theme.
155
156         No new tests, as bounds are overridden for DRT.
157
158         * platform/chromium/PlatformSupport.h:
159         (PlatformSupport):
160         * platform/chromium/ScrollbarThemeChromiumWin.cpp:
161         (WebCore::ScrollbarThemeChromiumWin::buttonSize):
162
163 2012-06-25  Antti Koivisto  <antti@apple.com>
164
165         Fast path for simple transform parsing
166         https://bugs.webkit.org/show_bug.cgi?id=89898
167
168         Reviewed by Anders Carlsson.
169
170         When manipulating transforms using script, the transform value parsing can show up in profiles pretty heavily 
171         (up 4% in some cases). We can optimize it easily by implementing a fast path that does not spin up the full CSS
172         parser, like we already do for several other common value types.
173         
174         The patch implements a fast path for transform(), transformX/Y/Z() and transform3D(). It speeds up parsing by >5x.
175
176         * css/CSSParser.cpp:
177         (WebCore):
178         (WebCore::parseTransformArguments):
179         (WebCore::parseTransformValue):
180         (WebCore::CSSParser::parseValue):
181
182 2012-06-25  Kwang Yul Seo  <skyul@company100.net>
183
184         Remove unused static function shadowFor
185         https://bugs.webkit.org/show_bug.cgi?id=89824
186
187         Reviewed by Daniel Bates.
188
189         shadowFor is not used anymore after r117796. No behaviour changes.
190
191         * dom/TreeScopeAdopter.cpp:
192
193 2012-06-25  Kwang Yul Seo  <skyul@company100.net>
194
195         Remove unused constant timeWithoutMouseMovementBeforeHidingControls
196         https://bugs.webkit.org/show_bug.cgi?id=89823
197
198         Reviewed by Daniel Bates.
199
200         After r87692, timeWithoutMouseMovementBeforeHidingControls is not used anymore.
201
202         * html/HTMLMediaElement.cpp:
203         (WebCore):
204
205 2012-06-25  Zeev Lieber  <zlieber@chromium.org>
206
207         [Chromium] RenderPass textures are evicted at the end of every frame
208         https://bugs.webkit.org/show_bug.cgi?id=89786
209
210         Reviewed by Adrienne Walker.
211
212         Removed calls to TextureManager::reduceMemoryToLimit inside
213         finishDrawingFrame() method.
214
215         Added unit tests to verify new behavior.
216
217         * platform/graphics/chromium/LayerRendererChromium.cpp:
218         (WebCore::LayerRendererChromium::finishDrawingFrame):
219
220 2012-06-25  Allan Xavier  <allan.xavier@undefinedltd.co.uk>
221
222         [GTK] Add graphviz debug output for the gstreamer video pipeline.
223         https://bugs.webkit.org/show_bug.cgi?id=89660
224
225         Reviewed by Martin Robinson.
226
227         Dump the current video pipeline as a graphviz DOT file when the
228         pipeline state changes or when an error occours.
229
230         No new tests as the change is only useful for debugging.
231
232         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
233         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
234
235 2012-06-25  Adam Barth  <abarth@webkit.org>
236
237         ASSERT(m_wheelEventHandlerCount > 0) can fire
238         https://bugs.webkit.org/show_bug.cgi?id=89856
239
240         Reviewed by Eric Seidel.
241
242         When a node with a wheel or a touch event is moved from one document to
243         another, the didAddMumble/didRemoveMumble calls do not balance because
244         they're called on different documents. This patch twiddles the counts
245         appropriately in that case.
246
247         Test: fast/events/move-element-with-wheel-and-touch-event-listeners.html
248
249         * dom/EventNames.h:
250         (WebCore::EventNames::isTouchEventType):
251         (EventNames):
252         (WebCore::EventNames::touchEventNames):
253         * dom/Node.cpp:
254         (WebCore::Node::didMoveToNewDocument):
255
256 2012-06-25  Eric Seidel  <eric@webkit.org>
257
258         Split map* functions out of StyleResolver into a helper object
259         https://bugs.webkit.org/show_bug.cgi?id=89881
260
261         Reviewed by Daniel Bates.
262
263         These map* functions are completely independent of the rest of StyleResolver
264         and only exist to serve StyleBuilder.
265         CSSToStyleMap doesn't even want to have a StyleResolver pointer, but
266         currently needs one to access the resolve-lifetime caches for the
267         current resolve.  Once we split out that per-resolve state into
268         some sort of ResolveState/ResolveInfo object (akin to PaintInfo/LayoutState)
269         then this object will be even simpler.
270
271         No behavioral change, thus no tests.
272
273         * CMakeLists.txt:
274         * GNUmakefile.list.am:
275         * WebCore.gypi:
276         * WebCore.vcproj/WebCore.vcproj:
277         * WebCore.xcodeproj/project.pbxproj:
278         * css/CSSToStyleMap.cpp: Added.
279         (WebCore):
280         (WebCore::CSSToStyleMap::style):
281         (WebCore::CSSToStyleMap::rootElementStyle):
282         (WebCore::CSSToStyleMap::useSVGZoomRules):
283         (WebCore::CSSToStyleMap::styleImage):
284         (WebCore::CSSToStyleMap::mapFillAttachment):
285         (WebCore::CSSToStyleMap::mapFillClip):
286         (WebCore::CSSToStyleMap::mapFillComposite):
287         (WebCore::CSSToStyleMap::mapFillOrigin):
288         (WebCore::CSSToStyleMap::mapFillImage):
289         (WebCore::CSSToStyleMap::mapFillRepeatX):
290         (WebCore::CSSToStyleMap::mapFillRepeatY):
291         (WebCore::CSSToStyleMap::mapFillSize):
292         (WebCore::CSSToStyleMap::mapFillXPosition):
293         (WebCore::CSSToStyleMap::mapFillYPosition):
294         (WebCore::CSSToStyleMap::mapAnimationDelay):
295         (WebCore::CSSToStyleMap::mapAnimationDirection):
296         (WebCore::CSSToStyleMap::mapAnimationDuration):
297         (WebCore::CSSToStyleMap::mapAnimationFillMode):
298         (WebCore::CSSToStyleMap::mapAnimationIterationCount):
299         (WebCore::CSSToStyleMap::mapAnimationName):
300         (WebCore::CSSToStyleMap::mapAnimationPlayState):
301         (WebCore::CSSToStyleMap::mapAnimationProperty):
302         (WebCore::CSSToStyleMap::mapAnimationTimingFunction):
303         (WebCore::CSSToStyleMap::mapNinePieceImage):
304         (WebCore::CSSToStyleMap::mapNinePieceImageSlice):
305         (WebCore::CSSToStyleMap::mapNinePieceImageQuad):
306         (WebCore::CSSToStyleMap::mapNinePieceImageRepeat):
307         * css/CSSToStyleMap.h: Added.
308         (WebCore):
309         (CSSToStyleMap):
310         (WebCore::CSSToStyleMap::CSSToStyleMap):
311         * css/StyleBuilder.cpp:
312         (WebCore::ApplyPropertyFillLayer::applyValue):
313         (WebCore::ApplyPropertyBorderImage::applyValue):
314         (WebCore::ApplyPropertyBorderImageModifier::applyValue):
315         (WebCore):
316         (WebCore::ApplyPropertyAnimation::map):
317         (WebCore::StyleBuilder::StyleBuilder):
318         * css/StyleResolver.cpp:
319         (WebCore::StyleResolver::StyleResolver):
320         (WebCore::StyleResolver::collectMatchingRulesForList):
321         * css/StyleResolver.h:
322         (WebCore::StyleResolver::styleMap):
323         (StyleResolver):
324
325 2012-06-25  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
326
327         [EFL] Support screenDepth() functionality.
328         https://bugs.webkit.org/show_bug.cgi?id=89423
329
330         Reviewed by Kenneth Rohde Christiansen.
331
332         Support screenDepth() based on ecore_x_window_depth_get(). This functionality may be used by
333         both WebKit1 and WebKit2. So, concrete function is placed into EflScreenUtilities.cpp.
334
335         This patch can't support existing test cases. Because, EFL DumpRenderTree works without X11 window
336         by default.
337
338         * platform/efl/EflScreenUtilities.cpp:
339         (WebCore::getPixelDepth):
340         (WebCore):
341         * platform/efl/EflScreenUtilities.h:
342         (WebCore):
343         * platform/efl/PlatformScreenEfl.cpp:
344         (WebCore::screenDepth):
345         (WebCore::screenDepthPerComponent):
346
347 2012-06-25  Shinya Kawanaka  <shinyak@chromium.org>
348
349         [Shadow] Executing Italic and InsertUnorderedList in Shadow DOM causes a crash
350         https://bugs.webkit.org/show_bug.cgi?id=88495
351
352         Reviewed by Ryosuke Niwa.
353
354         InsertionPoint::removedFrom(insertionPoint) tries to find its owner ElementShadow from
355         parentNode or insertionPoint. If the parent node exsits but we cannot reach ElementShadow from
356         the parent node, InsertionPoint::removedFrom does not try to find ElementShadow anymore.
357
358         It's OK if the ElementShadow is being destructed, but there is a case ElementShadow is not being
359         destructed in editing. In this case, we should try to find ElementShadow from insertionPoint.
360         Otherwise it will bring inconsistency to Shadow DOM, and causes a crash.
361
362         Actually checking the existence of parentNode() does not make any sense. We should get
363         shadowRoot() directly.
364
365         Test: editing/shadow/insertorderedlist-crash.html
366
367         * html/shadow/InsertionPoint.cpp:
368         (WebCore::InsertionPoint::removedFrom):
369
370 2012-06-25  Kinuko Yasuda  <kinuko@chromium.org>
371
372         Remove responseBlob field from XMLHttpResponse.idl
373         https://bugs.webkit.org/show_bug.cgi?id=89859
374
375         Reviewed by Eric Seidel.
376
377         Remove XMLHttpResponse.responseBlob from XMLHttpResponse.idl, which
378         has only been exposed for a very limited time (since r120574) but
379         probably should not have been done so since XHR2 spec no longer has
380         the field.  A quick search also showed that no one seems to be using the field.
381
382         (More context: the field was added long time ago with a runtime guard
383         which had never been enabled until the guard was removed in r120574
384         to remove XHR_RESPONSE_BLOB on all platforms.)
385
386         No new tests as no tests use this field.
387
388         * xml/XMLHttpRequest.idl: Removed responseBlob field.
389
390 2012-06-25  Huang Dongsung  <luxtella@company100.net>
391
392         Add static qualifier to GraphicsContext3D::extractImageData.
393         https://bugs.webkit.org/show_bug.cgi?id=89866
394
395         GraphicsContext3D::extractImageData does not use member variables.
396         Each platform Accelerated-compositing implementation can use this method in
397         order to get pixel data of an Image or ImageBuffer object.
398
399         Reviewed by Noam Rosenthal.
400
401         No new tests since there's no change on code behavior.
402
403         * platform/graphics/GraphicsContext3D.h:
404         (GraphicsContext3D):
405
406 2012-06-25  Pavel Feldman  <pfeldman@chromium.org>
407
408         Web Inspector: toggling style should not start property edit first.
409         https://bugs.webkit.org/show_bug.cgi?id=89834
410
411         Reviewed by Yury Semikhatsky.
412
413         Otherwise property flickers upon toggling.
414
415         * inspector/front-end/StylesSidebarPane.js:
416         (WebInspector.StylePropertyTreeElement.prototype):
417
418 2012-06-25  Alexander Pavlov  <apavlov@chromium.org>
419
420         Web Inspector: "Emulate Touch Events" breaks selecting elements with "touchstart" event listeners for inspection.
421         https://bugs.webkit.org/show_bug.cgi?id=89861
422
423         Reviewed by Vsevolod Vlasov.
424
425         Upon a mousepress, Inspector should be queried for the "Inspect element" mode up-front,
426         before dispatching a synthetic "touchstart" event.
427
428         * page/EventHandler.cpp:
429         (WebCore::EventHandler::handleMousePressEvent):
430
431 2012-06-25  Alexander Pavlov  <apavlov@chromium.org>
432
433         Web Inspector: [Styles] Cannot visually set caret before the first CSS property name character
434         https://bugs.webkit.org/show_bug.cgi?id=89869
435
436         Reviewed by Vsevolod Vlasov.
437
438         The issue was due to the "editbox" SPAN having a negative margin, thus the leftmost caret position was getting clipped
439         by a synthetic SPAN container added by the TextPrompt.
440
441         * inspector/front-end/elementsPanel.css:
442         (.styles-section .properties > li.child-editing .webkit-css-property):
443         (.styles-section .properties li.child-editing):
444
445 2012-06-25  Arko Saha  <arko@motorola.com>
446
447         Microdata: document.getItems(typeNames) is not returning Microdata items when typeNames argument is not specified.
448         https://bugs.webkit.org/show_bug.cgi?id=89757
449
450         Reviewed by Ryosuke Niwa.
451
452         With r120979 change, it creates MicroDataItemList with m_typeNames = "http://webkit.org/microdata/undefinedItemType",
453         when typeNames argument is not specified. Modified the check in nodeMatches() accordingly.
454
455         This fixes the following failing tests :
456             fast/dom/MicroData/002.html
457             fast/dom/MicroData/003.html
458             fast/dom/MicroData/007.html
459             fast/dom/MicroData/009.html
460             fast/dom/MicroData/properties-collection-must-see-the-properties-added-in-itemref.html
461
462         * dom/Document.cpp:
463         (WebCore::Document::getItems): Use undefinedItemType to avoid String conversion.
464         * dom/MicroDataItemList.cpp:
465         (WebCore::MicroDataItemList::undefinedItemType): It defines "http://webkit.org/microdata/undefinedItemType"
466         string using DEFINE_STATIC_LOCAL to avoid String conversion.
467         (WebCore::MicroDataItemList::MicroDataItemList): Use document() method of DynamicNodeList to obtain
468         document of owner element.
469         (WebCore::MicroDataItemList::~MicroDataItemList): Removed originalTypeNames null check.
470         (WebCore::MicroDataItemList::nodeMatches): Return true if originalTypeNames is equal to undefinedItemType.
471         * dom/MicroDataItemList.h:
472
473 2012-06-25  Carlos Garcia Campos  <cgarcia@igalia.com>
474
475         Unreviewed. Fix make distcheck.
476
477         * GNUmakefile.list.am: Add missing header file.
478
479 2012-06-25  Simon Hausmann  <simon.hausmann@nokia.com>
480
481         [Qt] Fix Win32 debug build
482
483         Reviewed by Tor Arne Vestbø.
484
485         Consistently use use_all_in_one_files when requested in the configuration. The previous
486         Linux condition has been moved to Tools/qmake/mkspecs/features/unix/default_pre.prf
487
488         * Target.pri:
489
490 2012-06-25  Philip Rogers  <pdr@google.com>
491
492         Fix rewinding of SVG animations
493         https://bugs.webkit.org/show_bug.cgi?id=89846
494
495         Reviewed by Nikolas Zimmermann.
496
497         r116451 introduced an optimization to only clear non-freeze animations when
498         calling setCurrentTime (via reset()). This causes fill=freeze animations to
499         not clear which breaks rewinding of an animation.
500
501         In the presence of multiple animations, we reset the first animation to the
502         base value and accumulate all results into that; this masked the problem because
503         2 animations were required to hit the bug (our tests primarily cover just 1).
504
505         Test: svg/animations/animate-reset-freeze.html
506
507         * svg/animation/SVGSMILElement.cpp:
508         (WebCore::SVGSMILElement::reset):
509
510 2012-06-25  Kent Tamura  <tkent@chromium.org>
511
512         Change the serialization format of form control state to make the code simple
513         https://bugs.webkit.org/show_bug.cgi?id=89847
514
515         Reviewed by Hajime Morita.
516
517         We used multiple strings to represent state of single form control. It
518         made the code complex. We change the serialization format so that one
519         CSV string represents state.
520
521         Examples in the old format:
522             "0"
523             "1", "value"
524             "3", "value1", "value2,value2", "value3"
525
526         Examples in the new format:
527             ""
528             ",value"
529             ",value1,value2\,value2,value3"
530
531         Test: fast/forms/state-restore-various-values.html
532
533         * html/FormController.cpp:
534         (WebCore::FormControlState::serialize):
535         Generate comma-separated string.
536         ',' in a value is serialized as "\,".
537         We changed the signature because we don't need the out-argument.
538         (WebCore::FormControlState::deserialize):
539         Parses the input comma-separated string.
540         We changed the signature because we don't need multiple input strings.
541         (formStateSignature):
542         Bump up the version because of the representation change.
543         (WebCore::FormController::formElementsState):
544         The new serialized format occupies just one string for one control.
545         - Expected size is now 3n+1.
546         - Use FormControlState::serialize().
547         (WebCore::FormController::setStateForNewFormElements):
548         The new serialized format occupies just one string for one control.
549         So we can check the vector size before the iteration.
550         * html/FormController.h:
551         (FormControlState): Change the function signatures.
552
553         * html/shadow/CalendarPickerElement.cpp:
554         (WebCore::addJavaScriptString): Use StringBuilder::appendEscaped().
555
556 2012-06-22  Yury Semikhatsky  <yurys@chromium.org>
557
558         Web Inspector: add external resources size to the native memory diagram
559         https://bugs.webkit.org/show_bug.cgi?id=89754
560
561         Reviewed by Vsevolod Vlasov.
562
563         Size of external strings and arrays is now reported through the inspector
564         protocol and displayed on the native memory chart.
565
566         * GNUmakefile.list.am:
567         * Target.pri:
568         * WebCore.gypi:
569         * WebCore.vcproj/WebCore.vcproj:
570         * WebCore.xcodeproj/project.pbxproj:
571         * bindings/js/ScriptProfiler.h:
572         (WebCore):
573         (WebCore::ScriptProfiler::visitJSDOMWrappers):
574         (WebCore::ScriptProfiler::visitExternalJSStrings):
575         (WebCore::ScriptProfiler::visitExternalJSArrays):
576         * bindings/v8/ScriptProfiler.cpp:
577         (WebCore::ScriptProfiler::visitJSDOMWrappers):
578         (WebCore::ScriptProfiler::visitExternalJSStrings):
579         (WebCore::ScriptProfiler::visitExternalJSArrays):
580         (WebCore):
581         * bindings/v8/ScriptProfiler.h:
582         (WebCore):
583         (ScriptProfiler):
584         * bindings/v8/V8Binding.cpp:
585         (WebCore::WebCoreStringResource::visitStrings):
586         (WebCore::V8BindingPerIsolateData::visitJSExternalStrings):
587         * bindings/v8/V8Binding.h:
588         (WebCore):
589         (V8BindingPerIsolateData):
590         * inspector/BindingVisitors.h: Renamed from Source/WebCore/inspector/DOMWrapperVisitor.h.
591         (WTF):
592         (WebCore):
593         (NodeWrapperVisitor):
594         (WebCore::NodeWrapperVisitor::~NodeWrapperVisitor):
595         (ExternalStringVisitor):
596         (WebCore::ExternalStringVisitor::~ExternalStringVisitor):
597         (ExternalArrayVisitor):
598         (WebCore::ExternalArrayVisitor::~ExternalArrayVisitor):
599         * inspector/InspectorMemoryAgent.cpp:
600         (MemoryBlockName):
601         (WebCore):
602         (WebCore::jsExternalResourcesInfo):
603         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
604         * inspector/front-end/NativeMemorySnapshotView.js:
605         (WebInspector.MemoryBlockViewProperties._initialize):
606
607 2012-06-24  Fumitoshi Ukai  <ukai@chromium.org>
608
609         Unreviewed compile error fix of Chromium Win Release.
610         Touch header files for ENABLE(CSS_VARIABLES) so that
611         it forces to rebuild files by changing ENABLE(CSS_VARIABLES)
612         in Sources/WebKit/chromium/features.gypi at r121129
613
614         * css/CSSParserMode.h:
615         * css/CSSValue.h:
616         (WebCore):
617         * css/CSSVariableValue.h:
618         * page/Settings.h:
619         * rendering/style/RenderStyle.h:
620         * rendering/style/StyleRareInheritedData.h:
621         * rendering/style/StyleVariableData.h:
622
623 2012-06-24  Simon Hausmann  <simon.hausmann@nokia.com>
624
625         [Texmap] Minor cleanup for TextureMapper::accelerationMode()
626         https://bugs.webkit.org/show_bug.cgi?id=89825
627
628         Reviewed by Kenneth Rohde Christiansen.
629
630         Replace the virtual method with a simple member variable.
631
632         * platform/graphics/texmap/TextureMapper.h:
633         (WebCore::TextureMapper::accelerationMode):
634         (WebCore::TextureMapper::TextureMapper):
635         (TextureMapper):
636         * platform/graphics/texmap/TextureMapperGL.cpp:
637         (WebCore::TextureMapperGL::TextureMapperGL):
638         * platform/graphics/texmap/TextureMapperGL.h:
639         * platform/graphics/texmap/TextureMapperImageBuffer.h:
640         (WebCore::TextureMapperImageBuffer::TextureMapperImageBuffer):
641
642 2012-06-24  Mike Lawther  <mikelawther@chromium.org>
643
644         CSS3 calc: transitions starting and ending with a calc expression move to end state
645         https://bugs.webkit.org/show_bug.cgi?id=89738
646
647         Reviewed by Tony Chang.
648
649         The equality operator for CalculationValue was not working as expected. The 
650         equality operator for OwnPtr is private, as OwnPtrs should always be different.
651         The OwnPtrs ended up getting cast to bool before being compared, and the 
652         comparison was always returning true.
653
654         The comparison between OwnPtrs has been removed. It doesn't add value to compare
655         the raw pointers either, since OwnPtrs should always be unique. We cannot
656         ASSERT the uniqueness though, as it is legitimate to compare a CalculationValue
657         to itself.
658
659         Test: css3/calc/transition-start-end-with-calc.html
660
661         * platform/CalculationValue.h:
662         (WebCore::CalculationValue::operator==):
663
664 2012-06-24  MORITA Hajime  <morrita@google.com>
665
666         NodeRenderingContext::AttachingPhase is redundant.
667         https://bugs.webkit.org/show_bug.cgi?id=79220
668
669         Reviewed by Dimitri Glazkov.
670
671         This change removes NodeRenderingContext::AttachingPhase and
672         NodeRenderingContext::m_phase respectively. The state originally
673         represented as m_phase is naturally encoded into other member variables.
674
675         NodeRenderingContext::m_visualParentShadow is also replaced, with
676         a local variable parentScope.
677
678         Basically, what NodeRenderingContext wants to know is the parent of
679         the composed shadow tree and an optional insertion point where the
680         node is distributed. Once these becomes clear, m_phase is no longer required.
681         It was rather a historical artifact.
682
683         No new tests. No behavioral change.
684
685         * dom/NodeRenderingContext.cpp: Replaced m_phase with implicit states.
686         (WebCore::NodeRenderingContext::NodeRenderingContext):
687         (WebCore::NodeRenderingContext::nextRenderer):
688         (WebCore::NodeRenderingContext::previousRenderer):
689         (WebCore::NodeRenderingContext::parentRenderer):
690         (WebCore::NodeRenderingContext::shouldCreateRenderer):
691         (WebCore::NodeRenderingContext::isOnEncapsulationBoundary):
692         (WebCore::NodeRenderingContext::isOnUpperEncapsulationBoundary):
693         * dom/NodeRenderingContext.h:
694         (NodeRenderingContext):
695         (WebCore::NodeRenderingContext::parentNodeForRenderingAndStyle): Removed an assert which checks m_phase.
696         (WebCore::NodeRenderingContext::resetStyleInheritance): Removed an assert which checks m_phase.
697         * html/shadow/InsertionPoint.h:
698         (WebCore::isInsertionPoint): Fix null case check.
699         (WebCore::isLowerEncapsulationBoundary): Renamed from isShadowBoundary()
700
701 2012-06-24  Antti Koivisto  <antti@apple.com>
702
703         REGRESSION(r121124): LayoutTests/fast/block/inline-children-root-linebox-crash.html asserts
704         https://bugs.webkit.org/show_bug.cgi?id=89844
705         
706         Reviewed by Dan Bernstein.
707
708         We need to check for the flipped writing mode and take the slow path if it is used.
709
710         * rendering/RenderGeometryMap.cpp:
711         (WebCore::RenderGeometryMap::pushMappingsToAncestor):
712
713 2012-06-24  Luke Macpherson  <macpherson@chromium.org>
714
715         Add runtime flag to enable/disable CSS variables (in addition to existing compile-time flag).
716         https://bugs.webkit.org/show_bug.cgi?id=89542
717
718         Reviewed by Dimitri Glazkov.
719
720         Added fast/css/variables/build-supports-variables.html to test runtime flag in test environment.
721         Updated all other css variables tests to enable the runtime flag from JS.
722
723         * css/CSSParser.cpp:
724         (WebCore::CSSParserContext::CSSParserContext):
725         (WebCore::operator==):
726         (WebCore::CSSParser::cssVariablesEnabled):
727         (WebCore):
728         (WebCore::CSSParser::detectDashToken):
729         (WebCore::CSSParser::lex):
730         * css/CSSParser.h:
731         (CSSParser):
732         * css/CSSParserMode.h:
733         (CSSParserContext):
734         * page/Settings.h:
735         (Settings):
736         (WebCore::Settings::setCSSVariablesEnabled):
737         (WebCore::Settings::cssVariablesEnabled):
738
739 2012-06-22  Kent Tamura  <tkent@chromium.org>
740
741         Selected option is not restored correctly
742         https://bugs.webkit.org/show_bug.cgi?id=89623
743
744         Reviewed by Hajime Morita.
745
746         Details of the bug:
747         We saved a state of a <select> element as a string of which length was
748         the size of <select>'s children. e.g. If a <select> had five children
749         and the second and the fifth items were selected, the state string was:
750                 ".X..X"
751
752         This didn't work well if the structure of the children was updated after
753         parsing. For example,
754         1. A page has the following <select> initially:
755           <select multiple>
756             <option>Banana
757             <option>Lemon
758             <option>Orange
759             <option>Strawberry
760           <select>
761
762         2. For some reasons, <option>Apple</option> is prepended to the children.
763         3. Some items are selected.
764         4. The page is unloaded. Selection state is saved.
765         5. A user go back to the page again. A browser parses the page again.
766         6. Try to restore the <select> state with the saved data at 4.
767           But "Apple" is missing. The <select> has wrong selections.
768
769         Solution:
770         We save the state as a set of selected values. If "Banana" and
771         "Strawberry" are selected in the above <select>, we save two strings;
772         "Banana" and "Strawberry", not ".X..X".
773
774         Test: fast/forms/select/select-state-restore.html
775
776         * html/HTMLSelectElement.cpp:
777         (WebCore::HTMLSelectElement::saveFormControlState):
778         Store selected value strings to a FormControlState object.
779         (WebCore::HTMLSelectElement::searchOptionsForValue):
780         A helper function to find an <option> with the specified value.
781         (WebCore::HTMLSelectElement::restoreFormControlState):
782         Clear all of selections, then select options with saved values.
783         In order to avoid O(M x N) loop, we start searching at position we found
784         the previous value.
785         * html/HTMLSelectElement.h: Declare searchOptionsForValue.
786         * html/FormController.cpp:
787         (formStateSignature): Bump up the version because this is a incompatible
788         change.
789
790 2012-06-24  David Barr  <davidbarr@chromium.org>
791
792         Add snap to css3-images image-resolution
793         https://bugs.webkit.org/show_bug.cgi?id=89745
794
795         Reviewed by Tony Chang.
796
797         Due to floating point imprecision, it is difficult to be precise in dpcm.
798         So use PrimitiveValue::roundForImpreciseConversion rather than just floor.
799
800         No new tests; extended fast/css/image-resolution/image-resolution.html
801
802         * css/CSSParser.cpp: Accept snap identifier in image-resolution property.
803         (WebCore::CSSParser::parseImageResolution): Map CSSValueSnap to identifier value from cssValuePool.
804         * css/CSSValueKeywords.in: Add snap.
805         * css/StyleBuilder.cpp: Extend ApplyPropertyImageResolution to apply RenderStyle::imageResolutionSnap.
806         (WebCore::ApplyPropertyImageResolution::applyInheritValue): Apply RenderStyle::imageResolutionSnap.
807         (WebCore::ApplyPropertyImageResolution::applyInitialValue): Apply RenderStyle::imageResolutionSnap.
808         (WebCore::ApplyPropertyImageResolution::applyValue): Map CSSValueSnap to ImageResolutionSnapPixels.
809         * rendering/RenderImage.cpp: Extend conditions for recalculation of intrinsic size.
810         (WebCore::RenderImage::styleDidChange): Update intrinsic size if RenderStyle::imageResolutionSnap() has changed.
811         (WebCore::RenderImage::imageDimensionsChanged): Floor scale factor to int, round up if less than 0.01 away from ceiling.
812         * rendering/style/RenderStyle.cpp: Include StyleRareInheritedData::m_imageResolutionSnap in style diff.
813         (WebCore::RenderStyle::diff): Map change in StyleRareInheritedData::m_imageResolutionSnap to StyleDifferenceLayout.
814         * rendering/style/RenderStyle.h: Add RenderStyle::imageResolutionSnap, RenderStyle::setImageResolutionSnap, RenderStyle::initialImageResolutionSnap.
815         * rendering/style/RenderStyleConstants.h: Add enum ImageResolutionSnap.
816         * rendering/style/StyleRareInheritedData.cpp: Add StyleRareInheritedData::m_imageResolutionSnap.
817         (WebCore::StyleRareInheritedData::StyleRareInheritedData): Add m_imageResolutionSnap to default and copy constructor.
818         (WebCore::StyleRareInheritedData::operator==): Include m_imageResolutionSnap in comparison.
819         * rendering/style/StyleRareInheritedData.h: Add StyleRareInheritedData::m_imageResolutionSnap.
820         (StyleRareInheritedData): Add 1-bit field StyleRareInheritedData::m_imageResolutionSnap.
821
822 2012-06-24  Sheriff Bot  <webkit.review.bot@gmail.com>
823
824         Unreviewed, rolling out r121106.
825         http://trac.webkit.org/changeset/121106
826         https://bugs.webkit.org/show_bug.cgi?id=89841
827
828         Caused 85% performance regressions on Dromaeo/jslib-modify-
829         jquery.html (Requested by rniwa on #webkit).
830
831         * dom/Document.cpp:
832         (WebCore::Document::clearNodeListCaches):
833         * dom/Document.h:
834         (Document):
835         * dom/DynamicNodeList.cpp:
836         (WebCore::DynamicSubtreeNodeList::~DynamicSubtreeNodeList):
837         * dom/DynamicNodeList.h:
838         (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList):
839         * dom/Node.cpp:
840         (WebCore::Node::clearRareData):
841         (WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged):
842         (WebCore::Node::invalidateNodeListsCacheAfterChildrenChanged):
843         (WebCore::Node::getElementsByTagName):
844         (WebCore::Node::getElementsByTagNameNS):
845         (WebCore::Node::getElementsByName):
846         (WebCore::Node::getElementsByClassName):
847         (WebCore::Node::radioNodeList):
848         (WebCore::NodeListsNodeData::invalidateCaches):
849         (WebCore):
850         (WebCore::NodeRareData::createNodeLists):
851         * dom/NodeRareData.h:
852         (NodeListsNodeData):
853         (WebCore::NodeListsNodeData::adoptTreeScope):
854         (WebCore::NodeRareData::ensureNodeLists):
855         (NodeRareData):
856         * dom/TreeScope.cpp:
857         (WebCore::TreeScope::TreeScope):
858         * dom/TreeScope.h:
859         (WebCore::TreeScope::addNodeListCache):
860         (WebCore::TreeScope::removeNodeListCache):
861         (WebCore::TreeScope::hasNodeListCaches):
862         (TreeScope):
863         * dom/TreeScopeAdopter.cpp:
864         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
865         * html/LabelableElement.cpp:
866         (WebCore::LabelableElement::labels):
867         * html/LabelsNodeList.cpp:
868         (WebCore::LabelsNodeList::LabelsNodeList):
869         (WebCore::LabelsNodeList::~LabelsNodeList):
870         * html/RadioNodeList.cpp:
871         (WebCore::RadioNodeList::RadioNodeList):
872         (WebCore::RadioNodeList::~RadioNodeList):
873
874 2012-06-24  Adam Barth  <abarth@webkit.org>
875
876         Change the type of the second argument of FrameSelection::revealSelection to use RevealExtentOption
877         https://bugs.webkit.org/show_bug.cgi?id=89833
878
879         Reviewed by Ryosuke Niwa.
880
881         As requested by Ryosuke Niwa.  Rare boolean parameters are hard to read.
882
883         * WebCore.exp.in:
884         * editing/Editor.cpp:
885         (WebCore::Editor::revealSelectionAfterEditingOperation):
886         * editing/Editor.h:
887         (Editor):
888         * editing/FrameSelection.cpp:
889         (WebCore::FrameSelection::setSelection):
890         (WebCore::FrameSelection::revealSelection):
891         * editing/FrameSelection.h:
892
893 2012-06-24  Antti Koivisto  <antti@apple.com>
894
895         Optimize RenderGeometryMap mappings gathering
896         https://bugs.webkit.org/show_bug.cgi?id=89828
897
898         Reviewed by Simon Fraser.
899
900         RenderGeometryMap currently gathers mappings by climbing the rendering tree. This is slow and can produce 
901         large number of mapping steps. In the common case we already have the child layer coordinates available in
902         the layer tree and we can just use that.
903         
904         The combination of faster mappings gathering and fewer number of applying steps reduces time spent under 
905         RenderLayerCompositor::computeCompositingRequirements to less than half when scrolling the mobile version
906         of twitter.com.
907         
908         * rendering/RenderGeometryMap.cpp:
909         (WebCore):
910         (WebCore::RenderGeometryMap::pushMappingsToAncestor):
911         
912             Use pre-computed mapping from the layer tree when possible.
913
914         (WebCore::RenderGeometryMap::popMappingsToAncestor):
915         * rendering/RenderGeometryMap.h:
916         
917             Add some inline capacity.
918
919         (WebCore):
920         (RenderGeometryMap):
921         * rendering/RenderLayer.h:
922         (WebCore::RenderLayer::canUseConvertToLayerCoords):
923         (RenderLayer):
924         * rendering/RenderLayerCompositor.cpp:
925         (WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
926         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
927
928 2012-06-24  Simon Fraser  <simon.fraser@apple.com>
929
930         Rename isPositioned to isOutOfFlowPositioned for clarity
931         https://bugs.webkit.org/show_bug.cgi?id=89836
932
933         Reviewed by Antti Koivisto.
934         
935         RenderObject and RenderStyle had an isPositioned() method that was
936         confusing, because it excluded relative positioning. Rename to 
937         isOutOfFlowPositioned(), which makes it clearer that it only applies
938         to absolute and fixed positioning.
939
940         Simple rename; no behavior change.
941
942         * css/CSSComputedStyleDeclaration.cpp:
943         (WebCore::getPositionOffsetValue):
944         * css/StyleResolver.cpp:
945         (WebCore::StyleResolver::collectMatchingRulesForList):
946         * dom/Text.cpp:
947         (WebCore::Text::rendererIsNeeded):
948         * editing/DeleteButtonController.cpp:
949         (WebCore::isDeletableElement):
950         * editing/TextIterator.cpp:
951         (WebCore::shouldEmitNewlinesBeforeAndAfterNode):
952         * rendering/AutoTableLayout.cpp:
953         (WebCore::shouldScaleColumns):
954         * rendering/InlineFlowBox.cpp:
955         (WebCore::InlineFlowBox::addToLine):
956         (WebCore::InlineFlowBox::placeBoxesInInlineDirection):
957         (WebCore::InlineFlowBox::requiresIdeographicBaseline):
958         (WebCore::InlineFlowBox::adjustMaxAscentAndDescent):
959         (WebCore::InlineFlowBox::computeLogicalBoxHeights):
960         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
961         (WebCore::InlineFlowBox::flipLinesInBlockDirection):
962         (WebCore::InlineFlowBox::computeOverflow):
963         (WebCore::InlineFlowBox::computeOverAnnotationAdjustment):
964         (WebCore::InlineFlowBox::computeUnderAnnotationAdjustment):
965         * rendering/InlineIterator.h:
966         (WebCore::isIteratorTarget):
967         * rendering/LayoutState.cpp:
968         (WebCore::LayoutState::LayoutState):
969         * rendering/RenderBlock.cpp:
970         (WebCore::RenderBlock::MarginInfo::MarginInfo):
971         (WebCore::RenderBlock::styleWillChange):
972         (WebCore::RenderBlock::styleDidChange):
973         (WebCore::RenderBlock::addChildToContinuation):
974         (WebCore::RenderBlock::addChildToAnonymousColumnBlocks):
975         (WebCore::RenderBlock::containingColumnsBlock):
976         (WebCore::RenderBlock::columnsBlockForSpanningElement):
977         (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks):
978         (WebCore::getInlineRun):
979         (WebCore::RenderBlock::isSelfCollapsingBlock):
980         (WebCore::RenderBlock::layoutBlock):
981         (WebCore::RenderBlock::addOverflowFromBlockChildren):
982         (WebCore::RenderBlock::expandsToEncloseOverhangingFloats):
983         (WebCore::RenderBlock::handlePositionedChild):
984         (WebCore::RenderBlock::moveRunInUnderSiblingBlockIfNeeded):
985         (WebCore::RenderBlock::collapseMargins):
986         (WebCore::RenderBlock::clearFloatsIfNeeded):
987         (WebCore::RenderBlock::simplifiedNormalFlowLayout):
988         (WebCore::RenderBlock::isSelectionRoot):
989         (WebCore::RenderBlock::blockSelectionGaps):
990         (WebCore::RenderBlock::clearFloats):
991         (WebCore::RenderBlock::markAllDescendantsWithFloatsForLayout):
992         (WebCore::RenderBlock::markSiblingsWithFloatsForLayout):
993         (WebCore::isChildHitTestCandidate):
994         (WebCore::InlineMinMaxIterator::next):
995         (WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
996         (WebCore::RenderBlock::firstLineBoxBaseline):
997         (WebCore::RenderBlock::lastLineBoxBaseline):
998         (WebCore::RenderBlock::updateFirstLetter):
999         (WebCore::shouldCheckLines):
1000         (WebCore::getHeightForLineCount):
1001         (WebCore::RenderBlock::adjustForBorderFit):
1002         (WebCore::inNormalFlow):
1003         (WebCore::RenderBlock::adjustLinePositionForPagination):
1004         (WebCore::RenderBlock::adjustBlockChildForPagination):
1005         (WebCore::RenderBlock::renderName):
1006         * rendering/RenderBlock.h:
1007         (WebCore::RenderBlock::shouldSkipCreatingRunsForObject):
1008         * rendering/RenderBlockLineLayout.cpp:
1009         (WebCore::RenderBlock::setMarginsForRubyRun):
1010         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine):
1011         (WebCore::RenderBlock::computeBlockDirectionPositionsForLine):
1012         (WebCore::RenderBlock::layoutInlineChildren):
1013         (WebCore::requiresLineBox):
1014         (WebCore::RenderBlock::LineBreaker::skipTrailingWhitespace):
1015         (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace):
1016         (WebCore::RenderBlock::LineBreaker::nextLineBreak):
1017         * rendering/RenderBox.cpp:
1018         (WebCore::RenderBox::removeFloatingOrPositionedChildFromBlockLists):
1019         (WebCore::RenderBox::styleWillChange):
1020         (WebCore::RenderBox::styleDidChange):
1021         (WebCore::RenderBox::updateBoxModelInfoFromStyle):
1022         (WebCore::RenderBox::offsetFromContainer):
1023         (WebCore::RenderBox::positionLineBox):
1024         (WebCore::RenderBox::computeRectForRepaint):
1025         (WebCore::RenderBox::computeLogicalWidthInRegion):
1026         (WebCore::RenderBox::renderBoxRegionInfo):
1027         (WebCore::RenderBox::computeLogicalHeight):
1028         (WebCore::RenderBox::computePercentageLogicalHeight):
1029         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
1030         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
1031         (WebCore::RenderBox::availableLogicalHeightUsing):
1032         (WebCore::percentageLogicalHeightIsResolvable):
1033         * rendering/RenderBox.h:
1034         (WebCore::RenderBox::stretchesToViewport):
1035         (WebCore::RenderBox::isDeprecatedFlexItem):
1036         * rendering/RenderBoxModelObject.cpp:
1037         (WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
1038         (WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint):
1039         * rendering/RenderBoxModelObject.h:
1040         (WebCore::RenderBoxModelObject::requiresLayer):
1041         * rendering/RenderDeprecatedFlexibleBox.cpp:
1042         (WebCore::childDoesNotAffectWidthOrFlexing):
1043         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
1044         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
1045         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
1046         (WebCore::RenderDeprecatedFlexibleBox::renderName):
1047         * rendering/RenderFieldset.cpp:
1048         (WebCore::RenderFieldset::findLegend):
1049         * rendering/RenderFlexibleBox.cpp:
1050         (WebCore::RenderFlexibleBox::computePreferredLogicalWidths):
1051         (WebCore::RenderFlexibleBox::autoMarginOffsetInMainAxis):
1052         (WebCore::RenderFlexibleBox::availableAlignmentSpaceForChild):
1053         (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
1054         (WebCore::RenderFlexibleBox::computeNextFlexLine):
1055         (WebCore::RenderFlexibleBox::resolveFlexibleLengths):
1056         (WebCore::RenderFlexibleBox::prepareChildForPositionedLayout):
1057         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
1058         (WebCore::RenderFlexibleBox::layoutColumnReverse):
1059         (WebCore::RenderFlexibleBox::adjustAlignmentForChild):
1060         (WebCore::RenderFlexibleBox::flipForRightToLeftColumn):
1061         * rendering/RenderGrid.cpp:
1062         (WebCore::RenderGrid::renderName):
1063         * rendering/RenderImage.cpp:
1064         (WebCore::RenderImage::computeIntrinsicRatioInformation):
1065         * rendering/RenderInline.cpp:
1066         (WebCore::RenderInline::addChildIgnoringContinuation):
1067         (WebCore::RenderInline::addChildToContinuation):
1068         (WebCore::RenderInline::generateCulledLineBoxRects):
1069         (WebCore):
1070         (WebCore::RenderInline::culledInlineFirstLineBox):
1071         (WebCore::RenderInline::culledInlineLastLineBox):
1072         (WebCore::RenderInline::culledInlineVisualOverflowBoundingBox):
1073         (WebCore::RenderInline::computeRectForRepaint):
1074         (WebCore::RenderInline::dirtyLineBoxes):
1075         * rendering/RenderLayer.cpp:
1076         (WebCore::checkContainingBlockChainForPagination):
1077         (WebCore::RenderLayer::updateLayerPosition):
1078         (WebCore::isPositionedContainer):
1079         (WebCore::RenderLayer::calculateClipRects):
1080         (WebCore::RenderLayer::shouldBeNormalFlowOnly):
1081         * rendering/RenderLayerCompositor.cpp:
1082         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
1083         * rendering/RenderLineBoxList.cpp:
1084         (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
1085         * rendering/RenderListItem.cpp:
1086         (WebCore::getParentOfFirstLineBox):
1087         * rendering/RenderMultiColumnBlock.cpp:
1088         (WebCore::RenderMultiColumnBlock::renderName):
1089         * rendering/RenderObject.cpp:
1090         (WebCore::RenderObject::markContainingBlocksForLayout):
1091         (WebCore::RenderObject::setPreferredLogicalWidthsDirty):
1092         (WebCore::RenderObject::invalidateContainerPreferredLogicalWidths):
1093         (WebCore::RenderObject::styleWillChange):
1094         (WebCore::RenderObject::offsetParent):
1095         * rendering/RenderObject.h:
1096         (WebCore::RenderObject::isOutOfFlowPositioned):
1097         (WebCore::RenderObject::isInFlowPositioned):
1098         (WebCore::RenderObject::hasClip):
1099         (WebCore::RenderObject::isFloatingOrOutOfFlowPositioned):
1100         * rendering/RenderObjectChildList.cpp:
1101         (WebCore::RenderObjectChildList::removeChildNode):
1102         * rendering/RenderReplaced.cpp:
1103         (WebCore::hasAutoHeightOrContainingBlockWithAutoHeight):
1104         * rendering/RenderRubyRun.cpp:
1105         (WebCore::RenderRubyRun::rubyText):
1106         * rendering/RenderTable.cpp:
1107         (WebCore::RenderTable::addChild):
1108         (WebCore::RenderTable::computeLogicalWidth):
1109         (WebCore::RenderTable::layout):
1110         * rendering/style/RenderStyle.h:
1111
1112 2012-06-24  Oli Lan  <olilan@chromium.org>
1113
1114         After Editor::setComposition is called, input should scroll to the end of the composition.
1115         https://bugs.webkit.org/show_bug.cgi?id=88999
1116
1117         Reviewed by Ryosuke Niwa.
1118
1119         This fixes an issue where after a call to setComposition, the start of the composition is revealed
1120         (scrolled to) instead of the end (where the caret/editing point should be).
1121
1122         The change is to allow revealSelectionAfterEditingOperation to take a revealExtent parameter,
1123         and to pass that parameter as true when calling from setIgnoreCompositionSelectionChange, which is
1124         called at the end of setComposition.
1125
1126         Test: fast/forms/input-set-composition-scroll.html
1127
1128         * editing/Editor.cpp:
1129         (WebCore::Editor::revealSelectionAfterEditingOperation):
1130         (WebCore::Editor::setIgnoreCompositionSelectionChange):
1131         * editing/Editor.h:
1132         (Editor):
1133
1134 2012-06-24  Joshua Bell  <jsbell@chromium.org>
1135
1136         Web Inspector: Simplify InspectorIndexedDBAgent to use IDB metadata API
1137         https://bugs.webkit.org/show_bug.cgi?id=89495
1138
1139         Reviewed by Vsevolod Vlasov.
1140
1141         No new tests - no functional changes.
1142
1143         * inspector/InspectorIndexedDBAgent.cpp:
1144         (WebCore):
1145
1146 2012-06-24  Pavel Feldman  <pfeldman@chromium.org>
1147
1148         Web Inspector: speed up Timeline and Elements panel rendering
1149         https://bugs.webkit.org/show_bug.cgi?id=89771
1150
1151         Reviewed by Yury Semikhatsky.
1152
1153         I used timeline panel to find unnecessary style operations.
1154
1155         * inspector/front-end/ElementsTreeOutline.js:
1156         (WebInspector.ElementsTreeElement.prototype.updateTitle):
1157         * inspector/front-end/TimelinePanel.js:
1158         (WebInspector.TimelinePanel.prototype._updateEventDividers):
1159         (WebInspector.TimelinePanel.prototype._updateFrames):
1160         (WebInspector.TimelinePanel.prototype.sidebarResized):
1161         (WebInspector.TimelinePanel.prototype.onResize):
1162         (WebInspector.TimelinePanel.prototype._onScroll):
1163         (WebInspector.TimelinePanel.prototype._refresh):
1164         (WebInspector.TimelinePanel.prototype._refreshRecords):
1165         (WebInspector.TimelinePanel.prototype._adjustScrollPosition):
1166
1167 2012-06-23  Ryosuke Niwa  <rniwa@webkit.org>
1168
1169         Inserting nodes is slow due to Node::notifyNodeListsAttributeChanged (20%+)
1170         https://bugs.webkit.org/show_bug.cgi?id=73853
1171
1172         Reviewed by Anders Carlsson and Ojan Vafai.
1173
1174         Invalidate all node lists at document level to avoid having to walk up the DOM tree in the invalidation.
1175         In particular, this makes appending node O(1) with respect to the depth of the tree in common cases when
1176         we have node lists somewhere in the tree scope.
1177
1178         We now invalidate more node lists than we used to but it shouldn't matter much in practice because
1179         most websites don't add or remove nodes or modify relevant attributes while iterating through node lists.
1180         The change would also register each node list to document thereby consuming one extra pointer, however,
1181         this should not have a significant memory impact given we used to do it unintentionally until I fixed it in
1182         r110797 three months ago.
1183
1184         Also, RadioNodeList and LabelsNodeList had always been invalidated at document level so this refactoring
1185         also allows us to move calls to registerDynamicSubtreeNodeList and unregisterDynamicSubtreeNodeList in
1186         those node lists to DynamicSubtreeNodeList, and even delete NodeListsNodeData::invalidateCaches().
1187
1188         In addition, removed m_numNodeListCaches from TreeScope since it was only used to avoid walking up
1189         the ancestors in invalidateNodeListsCacheAfterAttributeChanged and invalidateNodeListsCacheAfterChildrenChanged
1190         but we don't walk up the ancestors any more. Also note that m_listsInvalidatedAtDocument tells us exactly
1191         how many node lists are present for each document.
1192
1193         * dom/Document.cpp:
1194         (WebCore::Document::clearNodeListCaches): Optionally takes a qualified attribute name so that we don't
1195         have to invalidate tag node lists when only attributes are modified.
1196         * dom/Document.h:
1197         (Document):
1198         * dom/DynamicNodeList.cpp:
1199         (WebCore::DynamicSubtreeNodeList::~DynamicSubtreeNodeList): Calls unregisterDynamicSubtreeNodeList.
1200         * dom/DynamicNodeList.h:
1201         (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList): Calls registerDynamicSubtreeNodeList.
1202         * dom/Node.cpp:
1203         (WebCore::Node::clearRareData):
1204         (WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged): No longer walks up the tree to invalidate
1205         node list caches. All invalidations are done in Document::clearNodeListCaches.
1206         (WebCore::Node::invalidateNodeListsCacheAfterChildrenChanged): Ditto.
1207         (WebCore::Node::getElementsByTagName):
1208         (WebCore::Node::getElementsByTagNameNS):
1209         (WebCore::Node::getElementsByName):
1210         (WebCore::Node::getElementsByClassName):
1211         (WebCore::Node::radioNodeList):
1212         (WebCore):
1213         (WebCore::NodeRareData::createNodeLists):
1214         * dom/NodeRareData.h:
1215         (NodeListsNodeData):
1216         (WebCore::NodeListsNodeData::adoptTreeScope): Invalidate node list caches while registering and
1217         unregistering node lists from old and new documents respectively now that invalidateCaches() has been
1218         (WebCore::NodeRareData::ensureNodeLists):
1219         (NodeRareData):
1220         * dom/TreeScope.cpp:
1221         (WebCore::TreeScope::TreeScope):
1222         * dom/TreeScope.h:
1223         (TreeScope):
1224         * dom/TreeScopeAdopter.cpp:
1225         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
1226         * html/LabelableElement.cpp:
1227         (WebCore::LabelableElement::labels):
1228         * html/LabelsNodeList.cpp:
1229         (WebCore::LabelsNodeList::LabelsNodeList):
1230         (WebCore::LabelsNodeList::~LabelsNodeList):
1231         * html/RadioNodeList.cpp:
1232         (WebCore::RadioNodeList::RadioNodeList):
1233         (WebCore::RadioNodeList::~RadioNodeList):
1234
1235 2012-06-23  Ryosuke Niwa  <rniwa@webkit.org>
1236
1237         Clang and cl.exe build fix after r121103. Don't inherit from WTF::PairHash<unsigned char, StringType>.
1238
1239         * dom/NodeRareData.h:
1240
1241 2012-06-23  Ryosuke Niwa  <rniwa@webkit.org>
1242
1243         REGRESSION(r120979): getElementsByTagName is 12% slower
1244         https://bugs.webkit.org/show_bug.cgi?id=89783
1245
1246         Reviewed by Darin Adler.
1247
1248         The problem is that hashing std::pair<unsigned short, AtomicString> is very slow compared to just hashing AtomicString,
1249         which internally holds a hash already. Fixed the regression by replacing the default hash function by the one that
1250         computes AtomicString's hash + list type. This is okay because we only have 7 node list types at the moment.
1251
1252         * dom/NodeRareData.h:
1253         (NodeListsNodeData):
1254         (WebCore::NodeListsNodeData::NodeListCacheMapEntryHash::hash):
1255         (NodeListCacheMapEntryHash):
1256         (WebCore::NodeListsNodeData::NodeListCacheMapEntryHash::equal):
1257         (WebCore::NodeListsNodeData::namedNodeListKey):
1258
1259 2012-06-23  Dan Bernstein  <mitz@apple.com>
1260
1261         RenderText’s minimum preferred width is incorrect automatic hyphenation is used
1262         https://bugs.webkit.org/show_bug.cgi?id=89814
1263
1264         Reviewed by Sam Weinig.
1265
1266         Test: fast/text/hyphen-min-preferred-width.html
1267
1268         * rendering/RenderText.cpp:
1269         (WebCore::maxWordFragmentWidth): Added this helper function. It returns the width of the
1270         widest hyphenated fragment of the word (except for the suffix after the last hyphen) and
1271         the offset of the last hyphenation opportunity.
1272         (WebCore::RenderText::computePreferredLogicalWidths): Changed this function to consider the
1273         widths of hyphenated word fragments rather than entire words when computing the minimum
1274         width. Because hyphenating and measuring all fragments is expensive, hyphenation is only
1275         attempted if the unhyphenated word is wider than the current minimum width.
1276
1277 2012-06-23  Sheriff Bot  <webkit.review.bot@gmail.com>
1278
1279         Unreviewed, rolling out r121058.
1280         http://trac.webkit.org/changeset/121058
1281         https://bugs.webkit.org/show_bug.cgi?id=89809
1282
1283         Patch causes plugins tests to crash in GTK debug builds
1284         (Requested by zdobersek on #webkit).
1285
1286         * bindings/js/GCController.cpp:
1287         (WebCore::collect):
1288         (WebCore::GCController::garbageCollectSoon):
1289         (WebCore::GCController::garbageCollectNow):
1290         (WebCore::GCController::discardAllCompiledCode):
1291         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
1292         (WebCore::JSSQLStatementErrorCallback::handleEvent):
1293         * bindings/js/JSCustomVoidCallback.cpp:
1294         (WebCore::JSCustomVoidCallback::handleEvent):
1295         * bindings/js/JSCustomXPathNSResolver.cpp:
1296         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
1297         * bindings/js/JSErrorHandler.cpp:
1298         (WebCore::JSErrorHandler::handleEvent):
1299         * bindings/js/JSEventCustom.cpp:
1300         (WebCore::toJS):
1301         * bindings/js/JSEventListener.cpp:
1302         (WebCore::JSEventListener::handleEvent):
1303         * bindings/js/JSInjectedScriptHostCustom.cpp:
1304         (WebCore::InjectedScriptHost::nodeAsScriptValue):
1305         (WebCore::JSInjectedScriptHost::inspectedObject):
1306         * bindings/js/JSInjectedScriptManager.cpp:
1307         (WebCore::InjectedScriptManager::createInjectedScript):
1308         (WebCore::InjectedScriptManager::canAccessInspectedWindow):
1309         * bindings/js/JSLazyEventListener.cpp:
1310         (WebCore::JSLazyEventListener::initializeJSFunction):
1311         * bindings/js/JSMainThreadExecState.h:
1312         (WebCore::JSMainThreadExecState::evaluate):
1313         * bindings/js/JSMutationCallbackCustom.cpp:
1314         (WebCore::JSMutationCallback::handleEvent):
1315         * bindings/js/JSNodeFilterCondition.cpp:
1316         (WebCore::JSNodeFilterCondition::acceptNode):
1317         * bindings/js/JSRequestAnimationFrameCallbackCustom.cpp:
1318         (WebCore::JSRequestAnimationFrameCallback::handleEvent):
1319         * bindings/js/JavaScriptCallFrame.cpp:
1320         (WebCore::JavaScriptCallFrame::evaluate):
1321         * bindings/js/PageScriptDebugServer.cpp:
1322         (WebCore::PageScriptDebugServer::recompileAllJSFunctions):
1323         * bindings/js/ScheduledAction.cpp:
1324         (WebCore::ScheduledAction::executeFunctionInContext):
1325         * bindings/js/ScriptCachedFrameData.cpp:
1326         (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
1327         (WebCore::ScriptCachedFrameData::restore):
1328         (WebCore::ScriptCachedFrameData::clear):
1329         * bindings/js/ScriptController.cpp:
1330         (WebCore::ScriptController::evaluateInWorld):
1331         (WebCore::ScriptController::clearWindowShell):
1332         (WebCore::ScriptController::initScript):
1333         (WebCore::ScriptController::updateDocument):
1334         (WebCore::ScriptController::cacheableBindingRootObject):
1335         (WebCore::ScriptController::bindingRootObject):
1336         (WebCore::ScriptController::windowScriptNPObject):
1337         (WebCore::ScriptController::jsObjectForPluginElement):
1338         (WebCore::ScriptController::clearScriptObjects):
1339         * bindings/js/ScriptControllerMac.mm:
1340         (WebCore::ScriptController::windowScriptObject):
1341         * bindings/js/ScriptDebugServer.cpp:
1342         (WebCore::ScriptDebugServer::dispatchDidPause):
1343         * bindings/js/ScriptEventListener.cpp:
1344         (WebCore::eventListenerHandlerBody):
1345         (WebCore::eventListenerHandlerLocation):
1346         * bindings/js/ScriptFunctionCall.cpp:
1347         (WebCore::ScriptCallArgumentHandler::appendArgument):
1348         (WebCore::ScriptFunctionCall::call):
1349         (WebCore::ScriptFunctionCall::construct):
1350         (WebCore::ScriptCallback::call):
1351         * bindings/js/ScriptObject.cpp:
1352         (WebCore::ScriptGlobalObject::set):
1353         (WebCore::ScriptGlobalObject::get):
1354         (WebCore::ScriptGlobalObject::remove):
1355         * bindings/js/ScriptValue.cpp:
1356         (WebCore::ScriptValue::getString):
1357         (WebCore::ScriptValue::toInspectorValue):
1358         * bindings/js/WorkerScriptController.cpp:
1359         (WebCore::WorkerScriptController::~WorkerScriptController):
1360         (WebCore::WorkerScriptController::initScript):
1361         (WebCore::WorkerScriptController::evaluate):
1362         (WebCore::WorkerScriptController::disableEval):
1363         * bindings/objc/WebScriptObject.mm:
1364         (_didExecute):
1365         (-[WebScriptObject _setImp:originRootObject:rootObject:]):
1366         (-[WebScriptObject _setOriginRootObject:andRootObject:]):
1367         (-[WebScriptObject dealloc]):
1368         (-[WebScriptObject finalize]):
1369         (-[WebScriptObject callWebScriptMethod:withArguments:]):
1370         (-[WebScriptObject evaluateWebScript:]):
1371         (-[WebScriptObject setValue:forKey:]):
1372         (-[WebScriptObject valueForKey:]):
1373         (-[WebScriptObject removeWebScriptKey:]):
1374         (-[WebScriptObject hasWebScriptKey:]):
1375         (-[WebScriptObject stringRepresentation]):
1376         (-[WebScriptObject webScriptValueAtIndex:]):
1377         (-[WebScriptObject setWebScriptValueAtIndex:value:]):
1378         (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
1379         * bindings/scripts/CodeGeneratorJS.pm:
1380         (GenerateCallbackImplementation):
1381         * bindings/scripts/test/JS/JSTestCallback.cpp:
1382         (WebCore::JSTestCallback::callbackWithNoParam):
1383         (WebCore::JSTestCallback::callbackWithClass1Param):
1384         (WebCore::JSTestCallback::callbackWithClass2Param):
1385         (WebCore::JSTestCallback::callbackWithStringList):
1386         (WebCore::JSTestCallback::callbackWithBoolean):
1387         (WebCore::JSTestCallback::callbackRequiresThisToPass):
1388         * bridge/NP_jsobject.cpp:
1389         (_NPN_InvokeDefault):
1390         (_NPN_Invoke):
1391         (_NPN_Evaluate):
1392         (_NPN_GetProperty):
1393         (_NPN_SetProperty):
1394         (_NPN_RemoveProperty):
1395         (_NPN_HasProperty):
1396         (_NPN_HasMethod):
1397         (_NPN_Enumerate):
1398         (_NPN_Construct):
1399         * bridge/c/c_class.cpp:
1400         (JSC::Bindings::CClass::~CClass):
1401         (JSC::Bindings::CClass::methodsNamed):
1402         (JSC::Bindings::CClass::fieldNamed):
1403         * bridge/c/c_instance.cpp:
1404         (JSC::Bindings::CInstance::moveGlobalExceptionToExecState):
1405         (JSC::Bindings::CInstance::invokeMethod):
1406         (JSC::Bindings::CInstance::invokeDefaultMethod):
1407         (JSC::Bindings::CInstance::invokeConstruct):
1408         (JSC::Bindings::CInstance::getPropertyNames):
1409         * bridge/c/c_runtime.cpp:
1410         (JSC::Bindings::CField::valueFromInstance):
1411         (JSC::Bindings::CField::setValueToInstance):
1412         * bridge/c/c_utility.cpp:
1413         (JSC::Bindings::convertValueToNPVariant):
1414         (JSC::Bindings::convertNPVariantToValue):
1415         * bridge/jni/jni_jsobject.mm:
1416         (JavaJSObject::call):
1417         (JavaJSObject::eval):
1418         (JavaJSObject::getMember):
1419         (JavaJSObject::setMember):
1420         (JavaJSObject::removeMember):
1421         (JavaJSObject::getSlot):
1422         (JavaJSObject::setSlot):
1423         (JavaJSObject::toString):
1424         (JavaJSObject::convertValueToJObject):
1425         (JavaJSObject::convertJObjectToValue):
1426         * bridge/jni/jni_objc.mm:
1427         (JSC::Bindings::dispatchJNICall):
1428         * bridge/jni/jsc/JNIUtilityPrivate.cpp:
1429         (JSC::Bindings::convertValueToJValue):
1430         * bridge/jni/jsc/JavaClassJSC.cpp:
1431         (JavaClass::JavaClass):
1432         (JavaClass::~JavaClass):
1433         * bridge/jni/jsc/JavaInstanceJSC.cpp:
1434         (JavaInstance::stringValue):
1435         * bridge/jni/jsc/JavaMethodJSC.cpp:
1436         (appendClassName):
1437         (JavaMethod::signature):
1438         * bridge/jni/jsc/JavaStringJSC.h:
1439         (JSC::Bindings::JavaString::JavaString):
1440         (JSC::Bindings::JavaString::~JavaString):
1441         (JSC::Bindings::JavaString::utf8):
1442         (JSC::Bindings::JavaString::init):
1443         * bridge/jsc/BridgeJSC.cpp:
1444         (JSC::Bindings::Instance::createRuntimeObject):
1445         (JSC::Bindings::Instance::newRuntimeObject):
1446         * bridge/objc/objc_instance.mm:
1447         (ObjcInstance::moveGlobalExceptionToExecState):
1448         (ObjcInstance::invokeObjcMethod):
1449         (ObjcInstance::invokeDefaultMethod):
1450         (ObjcInstance::setValueOfUndefinedField):
1451         (ObjcInstance::getValueOfUndefinedField):
1452         * bridge/objc/objc_runtime.mm:
1453         (JSC::Bindings::ObjcField::valueFromInstance):
1454         (JSC::Bindings::ObjcField::setValueToInstance):
1455         * bridge/objc/objc_utility.mm:
1456         (JSC::Bindings::convertValueToObjcValue):
1457         (JSC::Bindings::convertNSStringToString):
1458         (JSC::Bindings::convertObjcValueToValue):
1459         * bridge/qt/qt_instance.cpp:
1460         (JSC::Bindings::QtInstance::~QtInstance):
1461         (JSC::Bindings::QtInstance::getQtInstance):
1462         (JSC::Bindings::QtInstance::newRuntimeObject):
1463         * bridge/qt/qt_pixmapruntime.cpp:
1464         (JSC::Bindings::QtPixmapInstance::createPixmapRuntimeObject):
1465         * bridge/qt/qt_runtime.cpp:
1466         (JSC::Bindings::convertValueToQVariant):
1467         (JSC::Bindings::convertQVariantToValue):
1468         (JSC::Bindings::QtRuntimeMetaMethod::call):
1469         (JSC::Bindings::QtRuntimeConnectionMethod::call):
1470         * bridge/qt/qt_runtime_qt4.cpp:
1471         (JSC::Bindings::convertValueToQVariant):
1472         (JSC::Bindings::convertQVariantToValue):
1473         (JSC::Bindings::QtRuntimeMetaMethod::call):
1474         (JSC::Bindings::QtRuntimeConnectionMethod::call):
1475         * html/HTMLCanvasElement.cpp:
1476         (WebCore::HTMLCanvasElement::createImageBuffer):
1477         * html/HTMLImageLoader.cpp:
1478         (WebCore::HTMLImageLoader::notifyFinished):
1479         * plugins/PluginView.cpp:
1480         (WebCore::PluginView::start):
1481         (WebCore::PluginView::stop):
1482         (WebCore::PluginView::performRequest):
1483         (WebCore::PluginView::npObject):
1484         (WebCore::PluginView::privateBrowsingStateChanged):
1485         * plugins/blackberry/PluginViewBlackBerry.cpp:
1486         (WebCore::PluginView::dispatchNPEvent):
1487         (WebCore::PluginView::setNPWindowIfNeeded):
1488         (WebCore::PluginView::platformStart):
1489         (WebCore::PluginView::getWindowInfo):
1490         * plugins/efl/PluginViewEfl.cpp:
1491         (WebCore::PluginView::dispatchNPEvent):
1492         * plugins/gtk/PluginViewGtk.cpp:
1493         (WebCore::PluginView::dispatchNPEvent):
1494         (WebCore::PluginView::handleKeyboardEvent):
1495         (WebCore::PluginView::handleMouseEvent):
1496         (WebCore::PluginView::setNPWindowIfNeeded):
1497         (WebCore::PluginView::platformStart):
1498         * plugins/mac/PluginViewMac.mm:
1499         (WebCore::PluginView::setNPWindowIfNeeded):
1500         (WebCore::PluginView::dispatchNPEvent):
1501         * plugins/qt/PluginViewQt.cpp:
1502         (WebCore::PluginView::dispatchNPEvent):
1503         (WebCore::PluginView::setNPWindowIfNeeded):
1504         (WebCore::PluginView::platformStart):
1505         * plugins/win/PluginViewWin.cpp:
1506         (WebCore::PluginView::dispatchNPEvent):
1507         (WebCore::PluginView::handleKeyboardEvent):
1508         (WebCore::PluginView::handleMouseEvent):
1509         (WebCore::PluginView::setNPWindowRect):
1510         * testing/js/WebCoreTestSupport.cpp:
1511         (WebCoreTestSupport::injectInternalsObject):
1512         (WebCoreTestSupport::resetInternalsObject):
1513         * xml/XMLHttpRequest.cpp:
1514         (WebCore::XMLHttpRequest::dropProtection):
1515
1516 2012-06-23  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1517
1518         Store hit-test rect in HitTestPoint as Rect.
1519         https://bugs.webkit.org/show_bug.cgi?id=89454
1520
1521         Reviewed by Darin Adler.
1522
1523         Calculate the rectangle early and store that instead of padding
1524         to avoid recalculating the rectangle for every single element
1525         hit tested.
1526
1527         No change in functionality. No new tests.
1528
1529         * page/EventHandler.cpp:
1530         (WebCore::EventHandler::bestClickableNodeForTouchPoint):
1531         (WebCore::EventHandler::bestZoomableAreaForTouchPoint):
1532         * rendering/HitTestResult.cpp:
1533         (WebCore::HitTestPoint::HitTestPoint):
1534         (WebCore::HitTestPoint::operator=):
1535         (WebCore::HitTestPoint::setPoint):
1536         (WebCore::hitTestPointIntersects):
1537         (WebCore::HitTestPoint::intersects):
1538         (WebCore::HitTestResult::addNodeToRectBasedTestResult):
1539         * rendering/HitTestResult.h:
1540         (HitTestPoint):
1541         (WebCore::HitTestPoint::boundingBox):
1542         (WebCore::HitTestPoint::topPadding):
1543         (WebCore::HitTestPoint::rightPadding):
1544         (WebCore::HitTestPoint::bottomPadding):
1545         (WebCore::HitTestPoint::leftPadding):
1546         (HitTestResult):
1547         * rendering/RenderBlock.cpp:
1548         (WebCore::RenderBlock::hitTestColumns):
1549         * rendering/RenderTableSection.cpp:
1550         (WebCore::RenderTableSection::nodeAtPoint):
1551
1552 2012-06-22  Benjamin Poulain  <bpoulain@apple.com>
1553
1554         Text with text-overflow:ellipsis and text-align:right is left aligned
1555         https://bugs.webkit.org/show_bug.cgi?id=88705
1556
1557         Reviewed by Dan Bernstein.
1558
1559         When building the line of a text with overflow, we do not know if we can place
1560         an ellipsis and where it should be. Because of that, text is laid out as if it does
1561         not have text-overflow: ellipsis.
1562
1563         This causes problems with text-alignement right in LTR and left in RTL. The shortened text
1564         did not follow the allignment.
1565
1566         This patch changes the position of lines with ellipsis after layout to follow the allignment.
1567         In RenderBlock::checkLinesForTextOverflow(), the call to RootInlineBox::placeEllipsis() now
1568         also gives the width of the truncated text. We use this width to re-compute the alignement and
1569         shift the box if necessary.
1570
1571         In RenderBlock::deleteEllipsisLineBoxes() we revert the text to the position computed with the
1572         total width. This way all layout computation is done as usual.
1573
1574         Tests: fast/css/text-overflow-ellipsis-text-align-left.html
1575                fast/css/text-overflow-ellipsis-text-align-right.html
1576
1577         * rendering/InlineBox.cpp:
1578         (WebCore::InlineBox::canAccommodateEllipsis): Make the method const for readability, truncating is
1579         done later in placeEllipsisBox().
1580         (WebCore::InlineBox::placeEllipsisBox): Add an output argument, truncatedWidth, giving the width
1581         of the text + ellipsis after truncation (if any truncation can be done).
1582         * rendering/InlineBox.h:
1583         (InlineBox):
1584         * rendering/InlineFlowBox.cpp:
1585         (WebCore::InlineBox::adjustLogicalPosition): adjustPosition() logical coordinates.
1586         (WebCore::InlineFlowBox::canAccommodateEllipsis):
1587         (WebCore::InlineFlowBox::placeEllipsisBox):
1588         * rendering/InlineFlowBox.h:
1589         (InlineFlowBox):
1590         * rendering/InlineTextBox.cpp:
1591         (WebCore::InlineTextBox::placeEllipsisBox):
1592         * rendering/InlineTextBox.h:
1593         (InlineTextBox):
1594         * rendering/RenderBlockLineLayout.cpp:
1595         (WebCore::RenderBlock::deleteEllipsisLineBoxes): In addition to removing the truncation, we
1596         need to revert the shift introduced by checkLinesForTextOverflow(). This restore the lines
1597         to its original, untruncated position in order to layout the block correctly in RenderBlock::layoutInlineChildren().
1598         (WebCore::RenderBlock::checkLinesForTextOverflow): After we truncate the text, we now recompute the shift we need
1599         for alignment, and move the line accordingly.
1600         * rendering/RenderDeprecatedFlexibleBox.cpp:
1601         (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
1602         * rendering/RootInlineBox.cpp:
1603         (WebCore::RootInlineBox::placeEllipsis): Return the width of the truncated text + the width of the ellipsis.
1604         (WebCore::RootInlineBox::placeEllipsisBox):
1605         (WebCore::RootInlineBox::adjustPosition):
1606         * rendering/RootInlineBox.h:
1607         (RootInlineBox):
1608
1609 2012-06-22  Eugene Klyuchnikov  <eustas.big@gmail.com>
1610
1611         Web Inspector: Fix negative time interval on zoom-in
1612         https://bugs.webkit.org/show_bug.cgi?id=89798
1613
1614         Reviewed by Pavel Feldman.
1615
1616         Steps to reproduce:
1617         1) Record timeline
1618         2) Select small range with left tick close to zero
1619         3) Move pointer to the right end of the ruler
1620         4) Zoom-in with mouse-wheel
1621
1622         Result: right tick goes below the zero.
1623
1624         * inspector/front-end/TimelineOverviewPane.js:
1625         (WebInspector.TimelineOverviewWindow.prototype._zoom):
1626
1627 2012-06-22  Alexandru Chiculita  <achicu@adobe.com>
1628
1629         [CSS Shaders] Re-enable the CSS Shaders compile time flag on Safari Mac
1630         https://bugs.webkit.org/show_bug.cgi?id=89781
1631
1632         Reviewed by Dean Jackson.
1633
1634         Added ENABLE_CSS_SHADERS flag as enabled by default on Safari for Mac.
1635
1636         No new tests, just re-enabled existing tests.
1637
1638         * css/CSSValueKeywords.in: Added empty line to force a rebuild of the file on the EWS.
1639         * Configurations/FeatureDefines.xcconfig:
1640
1641 2012-06-22  David Grogan  <dgrogan@chromium.org>
1642
1643         IndexedDB: Avoid infinite loop if we try to encode -1 for leveldb
1644         https://bugs.webkit.org/show_bug.cgi?id=89625
1645
1646         It gets worse, memory is allocated inside the loop so the process is
1647         eventually killed by the OS.
1648
1649         Reviewed by Tony Chang.
1650
1651         Added tests to Source/WebKit/chromium/tests/IDBLevelDBCodingTest.cpp
1652
1653         * Modules/indexeddb/IDBLevelDBCoding.cpp:
1654         (WebCore::IDBLevelDBCoding::encodeInt):
1655         (WebCore::IDBLevelDBCoding::encodeVarInt):
1656
1657 2012-06-22  Hayato Ito  <hayato@chromium.org>
1658
1659         [Shadow] ShadowRoot.activeElement should use the result of re-targeting algorithm.
1660         https://bugs.webkit.org/show_bug.cgi?id=89763
1661
1662         Reviewed by Dimitri Glazkov.
1663
1664         Use the result of the re-targeting algorithm in calculating
1665         shadow root's activeElement so that ShadowRoot.activeElement returns
1666         a focused distributed node correctly as the algorithm says.
1667
1668         The spec is:
1669         https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#active-element
1670
1671         Tests: fast/dom/shadow/shadow-root-activeElement.html
1672
1673         * dom/EventDispatcher.cpp:
1674         (WebCore):
1675         (WebCore::EventRelatedTargetAdjuster::adjust):
1676         (WebCore::EventDispatcher::ensureEventAncestors):
1677         * dom/TreeScope.cpp:
1678         (WebCore::TreeScope::focusedNode):
1679         * html/shadow/InsertionPoint.h:
1680         (WebCore::InsertionPoint::contains):
1681
1682 2012-06-22  James Robinson  <jamesr@chromium.org>
1683
1684         [chromium] LayerRendererChromium is not getting visibility messages in single threaded compositing mode.
1685         https://bugs.webkit.org/show_bug.cgi?id=89045
1686
1687         Reviewed by Adrienne Walker.
1688
1689         Based on patch by Michal Mocny <mmocny@google.com>.
1690
1691         Invariants:
1692
1693         1.) We never commit (paint, animate, any of it) when not visible on the main thread -except- for
1694         compositeAndReadback, regardless of threaded vs non-threaded mode
1695         2.) CCLayerTreeHost::m_contentsTextureManager's memory budget is only set by updateLayers() when we are going to
1696         make a frame and is always set to a non-zero value
1697         3.) Zero-sized allocations from the GPU process are always serviced immediately on the impl thread.  Non-zero
1698         allocations are met in the next frame, whenever we would produce that frame according to our usual frame
1699         scheduling logic.
1700         4.) The impl thread always knows the set of currently-allocated managed texture IDs and can delete them all
1701         whenever it likes without needing the main thread to be responsive.
1702
1703         Details:
1704
1705         There are two main changes - tweaking how the contents texture manager's budget is handled and tweaking frame
1706         scheduling for the !visible case.
1707
1708         The scheduling change is a bit more subtle but it unifies the single and multi threaded paths and is really
1709         important.  Except for compositeAndReadback (which I'll talk about below), we simply won't produce frames when
1710         not visible.  This already happens in the single threaded path thanks to render_widget so the only change is to
1711         the threaded path.  The difficulty here is we might post a beginFrame task from the impl thread and then get a
1712         setVisible(false) call on the main thread before the beginFrame task runs.  Since I'm making the setVisible()
1713         call a blocking call from main thread -> impl thread, when the beginFrame task eventually does run on the main
1714         thread we can know that the impl thread's notion of visibility is in sync with the main threads.  Thus I'm
1715         planning to simply abort the frame before doing any processing on the main thread.  The scheduler will know if
1716         it gets a beginFrameAborted and COMMIT_STATE_IDLE.
1717
1718         compositeAndReadback is special - this call currently does come in when we aren't visible (in single and
1719         threaded mode) and we need to service it.  In particular, we need to send a beginFrame over and have it
1720         not be ignored on the main thread.  For this I'm thinking of having the proxy keep track of whether it's
1721         servicing a compositeAndReadback() and use that bit on the main thread to know to process the beginFrame
1722         normally.  On the impl side, we need a few changes.  First, we have to allocate a default framebuffer
1723         (ensureFramebufferCHROMIUM) even if we've dropped it previously and remember to discard it after the
1724         readPixels().  Second, we have to provide a non-zero contents texture allocation on the beginFrame message, and
1725         again remember to delete the textures after the readPixels().  Third, we have to know that the beginFrame is a
1726         forced frame so when we get the beginFrameComplete we go ahead with the rest of the frame.  For this, I think
1727         I'll have to add ACTION_BEGIN_FORCED_FRAME and a corresponding COMMIT_STATE_FORCED_FRAME_IN_PROGRESS so the
1728         scheduler can keep track of the magicness of this frame, and then add some logic after the readpixels call to
1729         drop resources after the readback.  It's probably a good time to stop swapping on readbacks too....
1730
1731         The contents texture manager's budget is only relevant when we want to make a frame, so it's now passed in on
1732         the updateLayers().  Since we only make frames when we are visible and we never have a zero allocation when
1733         visible (thanks to the frame scheduling changes above), this value is always non-zero.  The other thing the
1734         texture manager needs to know about is if we've killed all of the underlying textures from the impl thread -
1735         this bit is passed in by the proxy before the updateLayers() call.  This means if we're running while visible
1736         and the manager wants to decrease our budget to something other than zero, we'll get a new (non-zero) allocation
1737         on the impl thread, schedule a frame, then when it's time to make the frame pass the new lower limit in to
1738         updateLayers(), then have the contents texture manager evict down to our new limit and make a frame with the new
1739         budget.  When the commit completes we'll get notified on the impl thread of which textures the contents texture
1740         manager decided to evict and issue the deleteTexture() calls on them.
1741
1742         The texture budget we pass in will be based on the most recent non-zero memory allocation we received from the
1743         GPU memory manager, or some default value I'll pull out my ass if we haven't heard anything yet.  On compositor
1744         initialization, we can't afford to wait for a round-trip through the GPU process to get a budget for the first
1745         frame.  I don't think handling a decrease to a non-zero budget on a visible tab needs to be terribly urgent - we
1746         can get to it when we get to making the next frame.  If we wanted to satisfy reduced texture budgets directly
1747         from the impl thread, we could keep a priority-list ordered set of textures once we have priorities and delete
1748         based on that.  Let's worry about that later.
1749
1750         * platform/graphics/chromium/LayerRendererChromium.cpp:
1751         (WebCore::LayerRendererGpuMemoryAllocationChangedCallbackAdapter::onGpuMemoryAllocationChangedOnImpl):
1752         (WebCore::LayerRendererChromium::LayerRendererChromium):
1753         (WebCore::LayerRendererChromium::initialize):
1754         (WebCore::LayerRendererChromium::setVisible):
1755         (WebCore::LayerRendererChromium::setGpuMemoryAllocation):
1756         (WebCore):
1757         (WebCore::LayerRendererChromium::swapBuffers):
1758         (WebCore::LayerRendererChromium::getFramebufferPixels):
1759         * platform/graphics/chromium/LayerRendererChromium.h:
1760         (WebCore):
1761         (LayerRendererChromium):
1762         * platform/graphics/chromium/TextureManager.cpp:
1763         (WebCore::TextureManager::evictAndRemoveAllDeletedTextures):
1764         (WebCore):
1765         * platform/graphics/chromium/TextureManager.h:
1766         (TextureAllocator):
1767         (TextureManager):
1768         * platform/graphics/chromium/TrackingTextureAllocator.cpp:
1769         (WebCore::TrackingTextureAllocator::createTexture):
1770         (WebCore::TrackingTextureAllocator::deleteTexture):
1771         (WebCore):
1772         (WebCore::TrackingTextureAllocator::deleteAllTextures):
1773         * platform/graphics/chromium/TrackingTextureAllocator.h:
1774         (TrackingTextureAllocator):
1775         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1776         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
1777         (WebCore::CCLayerTreeHost::initializeLayerRenderer):
1778         (WebCore::CCLayerTreeHost::finishCommitOnImplThread):
1779         (WebCore::CCLayerTreeHost::setVisible):
1780         (WebCore::CCLayerTreeHost::evictAllContentTextures):
1781         (WebCore::CCLayerTreeHost::updateLayers):
1782         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1783         (CCLayerTreeHost):
1784         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1785         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
1786         (WebCore::CCLayerTreeHostImpl::commitComplete):
1787         (WebCore::CCLayerTreeHostImpl::canDraw):
1788         (WebCore::CCLayerTreeHostImpl::context):
1789         (WebCore::CCLayerTreeHostImpl::releaseContentsTextures):
1790         (WebCore):
1791         (WebCore::CCLayerTreeHostImpl::setMemoryAllocationLimitBytes):
1792         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
1793         (CCLayerTreeHostImplClient):
1794         (WebCore::CCLayerTreeHostImpl::contentsTexturesWerePurgedSinceLastCommit):
1795         (WebCore::CCLayerTreeHostImpl::memoryAllocationLimitBytes):
1796         (CCLayerTreeHostImpl):
1797         * platform/graphics/chromium/cc/CCProxy.h:
1798         (CCProxy):
1799         * platform/graphics/chromium/cc/CCRenderer.h:
1800         (CCRendererClient):
1801         * platform/graphics/chromium/cc/CCScheduler.cpp:
1802         (WebCore::CCScheduler::beginFrameComplete):
1803         (WebCore::CCScheduler::beginFrameAborted):
1804         (WebCore):
1805         (WebCore::CCScheduler::didSwapBuffersComplete):
1806         (WebCore::CCScheduler::didLoseContext):
1807         (WebCore::CCScheduler::didRecreateContext):
1808         (WebCore::CCScheduler::vsyncTick):
1809         * platform/graphics/chromium/cc/CCScheduler.h:
1810         (CCScheduler):
1811         * platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp:
1812         (WebCore::CCSchedulerStateMachine::beginFrameAborted):
1813         (WebCore):
1814         * platform/graphics/chromium/cc/CCSchedulerStateMachine.h:
1815         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
1816         (WebCore::CCSingleThreadProxy::setVisible):
1817         (WebCore):
1818         (WebCore::CCSingleThreadProxy::stop):
1819         (WebCore::CCSingleThreadProxy::commitAndComposite):
1820         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
1821         (CCSingleThreadProxy):
1822         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
1823         (WebCore::CCThreadProxy::CCThreadProxy):
1824         (WebCore::CCThreadProxy::compositeAndReadback):
1825         (WebCore::CCThreadProxy::setVisible):
1826         (WebCore):
1827         (WebCore::CCThreadProxy::setVisibleOnImplThread):
1828         (WebCore::CCThreadProxy::scheduledActionBeginFrame):
1829         (WebCore::CCThreadProxy::beginFrame):
1830         (WebCore::CCThreadProxy::beginFrameAbortedOnImplThread):
1831         (WebCore::CCThreadProxy::scheduledActionDrawAndSwapInternal):
1832         (WebCore::CCThreadProxy::layerTreeHostClosedOnImplThread):
1833         * platform/graphics/chromium/cc/CCThreadProxy.h:
1834         (CCThreadProxy):
1835         (BeginFrameAndCommitState):
1836         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
1837         (WebCore::CCVideoLayerImpl::~CCVideoLayerImpl):
1838         (WebCore::CCVideoLayerImpl::willDraw):
1839         (WebCore::CCVideoLayerImpl::willDrawInternal):
1840         (WebCore::CCVideoLayerImpl::FramePlane::allocateData):
1841         (WebCore::CCVideoLayerImpl::FramePlane::freeData):
1842         (WebCore::CCVideoLayerImpl::allocatePlaneData):
1843         (WebCore::CCVideoLayerImpl::freePlaneData):
1844         (WebCore::CCVideoLayerImpl::freeUnusedPlaneData):
1845         (WebCore::CCVideoLayerImpl::didLoseContext):
1846         * platform/graphics/chromium/cc/CCVideoLayerImpl.h:
1847         (FramePlane):
1848
1849 2012-06-22  Julien Chaffraix  <jchaffraix@webkit.org>
1850
1851         REGRESSION(r116446): Crash in RenderBoxModelObject::adjustedPositionRelativeToOffsetParent
1852         https://bugs.webkit.org/show_bug.cgi?id=89785
1853
1854         Reviewed by Abhishek Arya.
1855
1856         Test: fullscreen/full-screen-crash-offsetLeft.html
1857
1858         * rendering/RenderBoxModelObject.cpp:
1859         (WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
1860         Added a NULL-check for parent() as it can be NULL in fullscreen mode. Also updated a stale
1861         comment while touching the code.
1862
1863 2012-06-22  Kenneth Russell  <kbr@google.com>
1864
1865         Unreviewed, rolling out r121064.
1866         http://trac.webkit.org/changeset/121064
1867         https://bugs.webkit.org/show_bug.cgi?id=88268
1868
1869         Broke Chromium Mac build.
1870
1871         * WebCore.gypi:
1872         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1873         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
1874         (WebCore::CCLayerTreeHost::updateAnimations):
1875         (WebCore::CCLayerTreeHost::finishCommitOnImplThread):
1876         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1877         (WebCore):
1878         (WebCore::CCLayerTreeHost::frameNumber):
1879         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1880         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
1881         (WebCore::CCLayerTreeHostImpl::drawLayers):
1882         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
1883         (WebCore::CCLayerTreeHostImpl::frameNumber):
1884         (CCLayerTreeHostImpl):
1885         * platform/graphics/chromium/cc/CCProxy.h:
1886         (WebCore):
1887         (CCProxy):
1888         * platform/graphics/chromium/cc/CCRenderingStats.h: Removed.
1889         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
1890         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
1891         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
1892         * platform/graphics/chromium/cc/CCThreadProxy.h:
1893         (CCThreadProxy):
1894
1895 2012-06-22  Ryuan Choi  <ryuan.choi@samsung.com>
1896
1897         [EFL][WK2] Support keyboard event
1898         https://bugs.webkit.org/show_bug.cgi?id=89268
1899
1900         Reviewed by Chang Shu.
1901
1902         Extract keyDownCommandsMap and keyPressCommandsMap to share WebKit1/Efl and WebKit2/Efl.
1903
1904         * platform/efl/EflKeyboardUtilities.cpp:
1905         (WebCore):
1906         (WebCore::keyDownCommandsMap):
1907         (WebCore::keyPressCommandsMap):
1908         (KeyDownEntry):
1909         (KeyPressEntry):
1910         (WebCore::createKeyDownCommandMap):
1911         (WebCore::createKeyPressCommandMap):
1912         (WebCore::getKeyDownCommandName):
1913         (WebCore::getKeyPressCommandName):
1914         * platform/efl/EflKeyboardUtilities.h:
1915         (WebCore):
1916
1917 2012-06-22  Alec Flett  <alecflett@chromium.org>
1918
1919         IndexedDB: refactor index-writing to be more self-contained
1920         https://bugs.webkit.org/show_bug.cgi?id=89607
1921
1922         Reviewed by Tony Chang.
1923
1924         Refactor index-writing into the IndexWriter class. Does not change
1925         existing behavior but begins migrating index-writing logic into a
1926         self-contained class that can eventually be used in the
1927         frontend (renderer) side of IndexedDB.
1928
1929         No new tests, behavior is unchanged.
1930
1931         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
1932         (WebCore):
1933         (WebCore::IDBObjectStoreBackendImpl::putInternal):
1934         (WebCore::IDBObjectStoreBackendImpl::populateIndex):
1935
1936 2012-06-22  Dave Tu  <dtu@chromium.org>
1937
1938         [chromium] Expose rendering statistics to WebWidget.
1939         https://bugs.webkit.org/show_bug.cgi?id=88268
1940
1941         Reviewed by James Robinson.
1942
1943         The WebKit side of a basic framework for exposing rendering statistics
1944         to Chromium's --enable-benchmarking extension.
1945
1946         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1947         (WebCore::CCLayerTreeHost::implFrameNumber):
1948         * platform/graphics/chromium/cc/CCProxy.h:
1949         (CCProxy):
1950         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
1951         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
1952         (WebCore::CCThreadProxy::implFrameNumber):
1953         (WebCore):
1954         (WebCore::CCThreadProxy::implFrameNumberOnImplThread):
1955         * platform/graphics/chromium/cc/CCThreadProxy.h:
1956         (CCThreadProxy):
1957
1958 2012-06-22  Shawn Singh  <shawnsingh@chromium.org>
1959
1960         [chromium] Do not accumulate occlusion from 3d layers on the main thread
1961         https://bugs.webkit.org/show_bug.cgi?id=89704
1962
1963         Reviewed by James Robinson.
1964
1965         Layer iterators on the main thread may not iterate over 3d layers
1966         in correct front-to-back or back-to-front order, because layer
1967         sorting is not performed on the main thread. As a result,
1968         occlusion tracking can accidentally think something is occluded if
1969         a 3d layer is processed out of order. This patch choses to solve
1970         this by avoiding accumulating occlusion for 3d layers. It may be
1971         appropriate later to consider adding layer sorting on the main
1972         thread, but for now that seemed like an unnecessary heavy-handed
1973         approach.
1974
1975         In addition to a new unit test that covers this, other unit tests
1976         were changed to work on the impl thread, so that the 3d layers
1977         still accumulate occlusion as required.
1978
1979         Unit test added to CCOcclusionTrackerTest:
1980           CCOcclusionTrackerTestUnsorted3dLayers
1981
1982         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
1983         (WebCore::layerIsInUnsorted3dRenderingContext):
1984         (WebCore):
1985         (WebCore::::markOccludedBehindLayer):
1986
1987 2012-06-22  Joshua Bell  <jsbell@chromium.org>
1988
1989         IndexedDB: Snapshot metadata in front end to avoid IPC round-trips
1990         https://bugs.webkit.org/show_bug.cgi?id=88467
1991
1992         Reviewed by Tony Chang.
1993
1994         Define a new type (IDBDatabaseMetadata) that captures the "schema" of an
1995         IDB database (name, version, properties of stores, properties of indexes).
1996         Add a method for the front end to request this from the back end once up
1997         front to avoid later calls (which may be slow IPC calls in ports). Implement
1998         IDB spec logic that the metadata should be frozen for a particular IDBDatabase
1999         connection, and only change within a version change transaction, and the spec's
2000         funky requirement for aborted version change transactions.
2001
2002         Test: storage/indexeddb/metadata.html
2003
2004         * Modules/indexeddb/IDBDatabase.cpp:
2005         (WebCore::IDBDatabase::IDBDatabase): Fetch metadata from back end when connection is created.
2006         (WebCore::IDBDatabase::transactionCreated):
2007         (WebCore::IDBDatabase::transactionFinished): Update metadata at the end of a transaction in 
2008         case it was rolled back.
2009         (WebCore::IDBDatabase::objectStoreNames): Move implementation to front-end.
2010         (WebCore):
2011         (WebCore::IDBDatabase::createObjectStore): Update local copy of metadata.
2012         (WebCore::IDBDatabase::deleteObjectStore): Update local copy of metadata.
2013         * Modules/indexeddb/IDBDatabase.h:
2014         (WebCore::IDBDatabase::name): Move implementation to front-end.
2015         (WebCore::IDBDatabase::version): Move implementation to front-end.
2016         (IDBDatabase):
2017         (WebCore::IDBDatabase::metadata):
2018         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
2019         (WebCore::IDBDatabaseBackendImpl::metadata): Construct a metadata snapshot.
2020         (WebCore):
2021         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
2022         (IDBDatabaseBackendImpl):
2023         * Modules/indexeddb/IDBDatabaseBackendInterface.h:
2024         (WebCore):
2025         (IDBDatabaseBackendInterface):
2026         * Modules/indexeddb/IDBIndex.cpp: Store a copy of the metadata, which will never
2027         change during the lifetime of the index.
2028         (WebCore::IDBIndex::IDBIndex):
2029         * Modules/indexeddb/IDBIndex.h:
2030         (WebCore::IDBIndex::create):
2031         (WebCore::IDBIndex::name): Move implementation to front-end.
2032         (WebCore::IDBIndex::objectStore): Return RefPtr (unrelated tidying).
2033         (WebCore::IDBIndex::keyPath): Move implementation to front-end.
2034         (WebCore::IDBIndex::unique): Move implementation to front-end.
2035         (WebCore::IDBIndex::multiEntry): Move implementation to front-end.
2036         (IDBIndex):
2037         * Modules/indexeddb/IDBIndexBackendImpl.cpp:
2038         (WebCore::IDBIndexBackendImpl::metadata): Construct a metadata snapshot.
2039         (WebCore):
2040         * Modules/indexeddb/IDBIndexBackendImpl.h:
2041         (IDBIndexBackendImpl):
2042         * Modules/indexeddb/IDBMetadata.h: Added new structs.
2043         (WebCore):
2044         (WebCore::IDBDatabaseMetadata::IDBDatabaseMetadata):
2045         (IDBDatabaseMetadata):
2046         (WebCore::IDBObjectStoreMetadata::IDBObjectStoreMetadata):
2047         (IDBObjectStoreMetadata):
2048         (WebCore::IDBIndexMetadata::IDBIndexMetadata):
2049         (IDBIndexMetadata):
2050         * Modules/indexeddb/IDBObjectStore.cpp:
2051         (WebCore::IDBObjectStore::IDBObjectStore): Store a "live" copy of the metadata, and
2052         and copy in case of an aborted version change transaction.
2053         (WebCore::IDBObjectStore::indexNames): Move implementation to front-end.
2054         (WebCore::IDBObjectStore::createIndex): Update metadata to include new index.
2055         (WebCore::IDBObjectStore::index): Pass along metadata to instance constructor.
2056         (WebCore::IDBObjectStore::deleteIndex): Delete index from metadata.
2057         * Modules/indexeddb/IDBObjectStore.h:
2058         (WebCore::IDBObjectStore::create):
2059         (WebCore::IDBObjectStore::name): Move implementation to front-end.
2060         (WebCore::IDBObjectStore::keyPath): Move implementation to front-end.
2061         (WebCore::IDBObjectStore::transaction): Return RefPtr (unrelated tidying).
2062         (WebCore::IDBObjectStore::autoIncrement): Move implementation to front-end.
2063         (WebCore::IDBObjectStore::metadata): Allow copying the metadata, in case of abort.
2064         (WebCore::IDBObjectStore::resetMetadata): Allow setting the metadata, in case of abort.
2065         (IDBObjectStore):
2066         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
2067         (WebCore::IDBObjectStoreBackendImpl::metadata): Construct a metadata snapshot.
2068         (WebCore):
2069         * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
2070         (WebCore):
2071         (IDBObjectStoreBackendImpl):
2072         * Modules/indexeddb/IDBTransaction.cpp:
2073         (WebCore::IDBTransaction::objectStore): Pass along metadata to instance constructor.
2074         (WebCore::IDBTransaction::objectStoreCreated): Track stores changed during transaction.
2075         (WebCore::IDBTransaction::objectStoreDeleted):Track stores changed during transaction.
2076         (WebCore::IDBTransaction::onAbort): Revert stores metadata potentially changed during transaction.
2077         * Modules/indexeddb/IDBTransaction.h:
2078         (IDBTransaction):
2079         * WebCore.gypi:
2080
2081 2012-06-20  Mark Hahnenberg  <mhahnenberg@apple.com>
2082
2083         JSLock should be per-JSGlobalData
2084         https://bugs.webkit.org/show_bug.cgi?id=89123
2085
2086         Reviewed by Gavin Barraclough.
2087
2088         No new tests. Current regression tests are sufficient.
2089
2090         Changed all sites that used JSLock to instead use the new JSLockHolder
2091         and pass in the correct JS context that the code is about to interact with that 
2092         needs protection. Also added a couple JSLocks to places that didn't already 
2093         have it that needed it.
2094
2095         * bindings/js/GCController.cpp:
2096         (WebCore::collect):
2097         (WebCore::GCController::garbageCollectSoon):
2098         (WebCore::GCController::garbageCollectNow):
2099         (WebCore::GCController::discardAllCompiledCode):
2100         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
2101         (WebCore::JSSQLStatementErrorCallback::handleEvent):
2102         * bindings/js/JSCustomVoidCallback.cpp:
2103         (WebCore::JSCustomVoidCallback::handleEvent):
2104         * bindings/js/JSCustomXPathNSResolver.cpp:
2105         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
2106         * bindings/js/JSErrorHandler.cpp:
2107         (WebCore::JSErrorHandler::handleEvent):
2108         * bindings/js/JSEventCustom.cpp:
2109         (WebCore::toJS):
2110         * bindings/js/JSEventListener.cpp:
2111         (WebCore::JSEventListener::handleEvent):
2112         * bindings/js/JSInjectedScriptHostCustom.cpp:
2113         (WebCore::InjectedScriptHost::nodeAsScriptValue):
2114         (WebCore::JSInjectedScriptHost::inspectedObject):
2115         * bindings/js/JSInjectedScriptManager.cpp:
2116         (WebCore::InjectedScriptManager::createInjectedScript):
2117         (WebCore::InjectedScriptManager::canAccessInspectedWindow):
2118         * bindings/js/JSLazyEventListener.cpp:
2119         (WebCore::JSLazyEventListener::initializeJSFunction):
2120         * bindings/js/JSMainThreadExecState.h:
2121         (WebCore::JSMainThreadExecState::evaluate):
2122         * bindings/js/JSMutationCallbackCustom.cpp:
2123         (WebCore::JSMutationCallback::handleEvent):
2124         * bindings/js/JSNodeFilterCondition.cpp:
2125         (WebCore::JSNodeFilterCondition::acceptNode):
2126         * bindings/js/JSRequestAnimationFrameCallbackCustom.cpp:
2127         (WebCore::JSRequestAnimationFrameCallback::handleEvent):
2128         * bindings/js/JavaScriptCallFrame.cpp:
2129         (WebCore::JavaScriptCallFrame::evaluate):
2130         * bindings/js/PageScriptDebugServer.cpp:
2131         (WebCore::PageScriptDebugServer::recompileAllJSFunctions):
2132         * bindings/js/ScheduledAction.cpp:
2133         (WebCore::ScheduledAction::executeFunctionInContext):
2134         * bindings/js/ScriptCachedFrameData.cpp:
2135         (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
2136         (WebCore::ScriptCachedFrameData::restore):
2137         (WebCore::ScriptCachedFrameData::clear):
2138         * bindings/js/ScriptController.cpp:
2139         (WebCore::ScriptController::evaluateInWorld):
2140         (WebCore::ScriptController::clearWindowShell):
2141         (WebCore::ScriptController::initScript):
2142         (WebCore::ScriptController::updateDocument):
2143         (WebCore::ScriptController::cacheableBindingRootObject):
2144         (WebCore::ScriptController::bindingRootObject):
2145         (WebCore::ScriptController::windowScriptNPObject):
2146         (WebCore::ScriptController::jsObjectForPluginElement):
2147         (WebCore::ScriptController::clearScriptObjects):
2148         * bindings/js/ScriptControllerMac.mm:
2149         (WebCore::ScriptController::windowScriptObject):
2150         * bindings/js/ScriptDebugServer.cpp:
2151         (WebCore::ScriptDebugServer::dispatchDidPause):
2152         * bindings/js/ScriptEventListener.cpp:
2153         (WebCore::eventListenerHandlerBody):
2154         (WebCore::eventListenerHandlerLocation):
2155         * bindings/js/ScriptFunctionCall.cpp:
2156         (WebCore::ScriptCallArgumentHandler::appendArgument):
2157         (WebCore::ScriptFunctionCall::call):
2158         (WebCore::ScriptFunctionCall::construct):
2159         (WebCore::ScriptCallback::call):
2160         * bindings/js/ScriptObject.cpp:
2161         (WebCore::ScriptGlobalObject::set):
2162         (WebCore::ScriptGlobalObject::get):
2163         (WebCore::ScriptGlobalObject::remove):
2164         * bindings/js/ScriptValue.cpp:
2165         (WebCore::ScriptValue::getString):
2166         (WebCore::ScriptValue::toInspectorValue):
2167         * bindings/js/WorkerScriptController.cpp:
2168         (WebCore::WorkerScriptController::~WorkerScriptController):
2169         (WebCore::WorkerScriptController::initScript):
2170         (WebCore::WorkerScriptController::evaluate):
2171         (WebCore::WorkerScriptController::disableEval):
2172         * bindings/objc/WebScriptObject.mm:
2173         (_didExecute):
2174         (-[WebScriptObject _setImp:originRootObject:rootObject:]):
2175         (-[WebScriptObject _setOriginRootObject:andRootObject:]):
2176         (-[WebScriptObject dealloc]):
2177         (-[WebScriptObject finalize]):
2178         (-[WebScriptObject callWebScriptMethod:withArguments:]):
2179         (-[WebScriptObject evaluateWebScript:]):
2180         (-[WebScriptObject setValue:forKey:]):
2181         (-[WebScriptObject valueForKey:]):
2182         (-[WebScriptObject removeWebScriptKey:]):
2183         (-[WebScriptObject hasWebScriptKey:]):
2184         (-[WebScriptObject stringRepresentation]):
2185         (-[WebScriptObject webScriptValueAtIndex:]):
2186         (-[WebScriptObject setWebScriptValueAtIndex:value:]):
2187         (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
2188         * bindings/scripts/CodeGeneratorJS.pm:
2189         (GenerateCallbackImplementation):
2190         * bindings/scripts/test/JS/JSTestCallback.cpp:
2191         (WebCore::JSTestCallback::callbackWithNoParam):
2192         (WebCore::JSTestCallback::callbackWithClass1Param):
2193         (WebCore::JSTestCallback::callbackWithClass2Param):
2194         (WebCore::JSTestCallback::callbackWithStringList):
2195         (WebCore::JSTestCallback::callbackWithBoolean):
2196         (WebCore::JSTestCallback::callbackRequiresThisToPass):
2197         * bridge/NP_jsobject.cpp:
2198         (_NPN_InvokeDefault):
2199         (_NPN_Invoke):
2200         (_NPN_Evaluate):
2201         (_NPN_GetProperty):
2202         (_NPN_SetProperty):
2203         (_NPN_RemoveProperty):
2204         (_NPN_HasProperty):
2205         (_NPN_HasMethod):
2206         (_NPN_Enumerate):
2207         (_NPN_Construct):
2208         * bridge/c/c_class.cpp:
2209         (JSC::Bindings::CClass::~CClass):
2210         (JSC::Bindings::CClass::methodsNamed):
2211         (JSC::Bindings::CClass::fieldNamed):
2212         * bridge/c/c_instance.cpp:
2213         (JSC::Bindings::CInstance::moveGlobalExceptionToExecState):
2214         (JSC::Bindings::CInstance::invokeMethod):
2215         (JSC::Bindings::CInstance::invokeDefaultMethod):
2216         (JSC::Bindings::CInstance::invokeConstruct):
2217         (JSC::Bindings::CInstance::getPropertyNames):
2218         * bridge/c/c_runtime.cpp:
2219         (JSC::Bindings::CField::valueFromInstance):
2220         (JSC::Bindings::CField::setValueToInstance):
2221         * bridge/c/c_utility.cpp:
2222         (JSC::Bindings::convertValueToNPVariant):
2223         (JSC::Bindings::convertNPVariantToValue):
2224         * bridge/jni/jni_jsobject.mm:
2225         (JavaJSObject::call):
2226         (JavaJSObject::eval):
2227         (JavaJSObject::getMember):
2228         (JavaJSObject::setMember):
2229         (JavaJSObject::removeMember):
2230         (JavaJSObject::getSlot):
2231         (JavaJSObject::setSlot):
2232         (JavaJSObject::toString):
2233         (JavaJSObject::convertValueToJObject):
2234         (JavaJSObject::convertJObjectToValue):
2235         * bridge/jni/jni_objc.mm:
2236         (JSC::Bindings::dispatchJNICall):
2237         * bridge/jni/jsc/JNIUtilityPrivate.cpp:
2238         (JSC::Bindings::convertValueToJValue):
2239         * bridge/jni/jsc/JavaClassJSC.cpp:
2240         (JavaClass::JavaClass):
2241         (JavaClass::~JavaClass):
2242         * bridge/jni/jsc/JavaInstanceJSC.cpp:
2243         (JavaInstance::stringValue):
2244         * bridge/jni/jsc/JavaMethodJSC.cpp:
2245         (appendClassName):
2246         (JavaMethod::signature):
2247         * bridge/jni/jsc/JavaStringJSC.h:
2248         (JSC::Bindings::JavaString::JavaString):
2249         (JSC::Bindings::JavaString::~JavaString):
2250         (JSC::Bindings::JavaString::utf8):
2251         (JSC::Bindings::JavaString::init):
2252         * bridge/jsc/BridgeJSC.cpp:
2253         (JSC::Bindings::Instance::createRuntimeObject):
2254         (JSC::Bindings::Instance::newRuntimeObject):
2255         * bridge/objc/objc_instance.mm:
2256         (ObjcInstance::moveGlobalExceptionToExecState):
2257         (ObjcInstance::invokeObjcMethod):
2258         (ObjcInstance::invokeDefaultMethod):
2259         (ObjcInstance::setValueOfUndefinedField):
2260         (ObjcInstance::getValueOfUndefinedField):
2261         * bridge/objc/objc_runtime.mm:
2262         (JSC::Bindings::ObjcField::valueFromInstance):
2263         (JSC::Bindings::ObjcField::setValueToInstance):
2264         * bridge/objc/objc_utility.mm:
2265         (JSC::Bindings::convertValueToObjcValue):
2266         (JSC::Bindings::convertNSStringToString):
2267         (JSC::Bindings::convertObjcValueToValue):
2268         * bridge/qt/qt_instance.cpp:
2269         (JSC::Bindings::QtInstance::~QtInstance):
2270         (JSC::Bindings::QtInstance::getQtInstance):
2271         (JSC::Bindings::QtInstance::newRuntimeObject):
2272         * bridge/qt/qt_pixmapruntime.cpp:
2273         (JSC::Bindings::QtPixmapInstance::createPixmapRuntimeObject):
2274         * bridge/qt/qt_runtime.cpp:
2275         (JSC::Bindings::convertValueToQVariant):
2276         (JSC::Bindings::convertQVariantToValue):
2277         (JSC::Bindings::QtRuntimeMetaMethod::call):
2278         (JSC::Bindings::QtRuntimeConnectionMethod::call):
2279         * bridge/qt/qt_runtime_qt4.cpp:
2280         (JSC::Bindings::convertValueToQVariant):
2281         (JSC::Bindings::convertQVariantToValue):
2282         (JSC::Bindings::QtRuntimeMetaMethod::call):
2283         (JSC::Bindings::QtRuntimeConnectionMethod::call):
2284         * html/HTMLCanvasElement.cpp:
2285         (WebCore::HTMLCanvasElement::createImageBuffer):
2286         * html/HTMLImageLoader.cpp:
2287         (WebCore::HTMLImageLoader::notifyFinished):
2288         * plugins/PluginView.cpp:
2289         (WebCore::PluginView::start):
2290         (WebCore::PluginView::stop):
2291         (WebCore::PluginView::performRequest):
2292         (WebCore::PluginView::npObject):
2293         (WebCore::PluginView::privateBrowsingStateChanged):
2294         * plugins/blackberry/PluginViewBlackBerry.cpp:
2295         (WebCore::PluginView::dispatchNPEvent):
2296         (WebCore::PluginView::setNPWindowIfNeeded):
2297         (WebCore::PluginView::platformStart):
2298         (WebCore::PluginView::getWindowInfo):
2299         * plugins/efl/PluginViewEfl.cpp:
2300         (WebCore::PluginView::dispatchNPEvent):
2301         * plugins/gtk/PluginViewGtk.cpp:
2302         (WebCore::PluginView::dispatchNPEvent):
2303         (WebCore::PluginView::handleKeyboardEvent):
2304         (WebCore::PluginView::handleMouseEvent):
2305         (WebCore::PluginView::setNPWindowIfNeeded):
2306         (WebCore::PluginView::platformStart):
2307         * plugins/mac/PluginViewMac.mm:
2308         (WebCore::PluginView::setNPWindowIfNeeded):
2309         (WebCore::PluginView::dispatchNPEvent):
2310         * plugins/qt/PluginViewQt.cpp:
2311         (WebCore::PluginView::dispatchNPEvent):
2312         (WebCore::PluginView::setNPWindowIfNeeded):
2313         (WebCore::PluginView::platformStart):
2314         * plugins/win/PluginViewWin.cpp:
2315         (WebCore::PluginView::dispatchNPEvent):
2316         (WebCore::PluginView::handleKeyboardEvent):
2317         (WebCore::PluginView::handleMouseEvent):
2318         (WebCore::PluginView::setNPWindowRect):
2319         * testing/js/WebCoreTestSupport.cpp:
2320         (WebCoreTestSupport::injectInternalsObject):
2321         (WebCoreTestSupport::resetInternalsObject):
2322         * xml/XMLHttpRequest.cpp:
2323         (WebCore::XMLHttpRequest::dropProtection):
2324
2325 2012-06-22  Jeff Timanus  <twiz@chromium.org>
2326
2327         [Chromium] Change implementing a fast-path for copying GPU-accelerated Canvas2D instances to WebGL textures.
2328         https://bugs.webkit.org/show_bug.cgi?id=86275
2329
2330         This change adds the necessary plumbing to the various rendering contexts to copy the backing store texture of
2331         a Canvas2D instance to be copied to a WebGL texture.  The GL_CHROMIUM_copy_texture extension is necessary
2332         because the backing-store for a GPU-accelerated skia Canvas2D is normally in BGRA format, which is not supported
2333         by glCopyTexImage.
2334
2335         Reviewed by Kenneth Russell.
2336
2337         Test: fast/canvas/webgl/*
2338
2339         * html/canvas/WebGLRenderingContext.cpp:
2340         (WebCore):
2341         (WebCore::WebGLRenderingContext::texImage2D):
2342         * platform/chromium/support/Extensions3DChromium.cpp:
2343         (WebCore::Extensions3DChromium::copyTextureCHROMIUM):
2344         (WebCore):
2345         * platform/graphics/Extensions3D.h:
2346         (Extensions3D):
2347         * platform/graphics/ImageBuffer.cpp:
2348         (WebCore):
2349         (WebCore::ImageBuffer::copyToPlatformTexture):
2350         * platform/graphics/ImageBuffer.h:
2351         (WebCore):
2352         (ImageBuffer):
2353         * platform/graphics/chromium/Canvas2DLayerBridge.cpp:
2354         (WebCore::Canvas2DLayerBridge::backBufferTexture):
2355         (WebCore):
2356         * platform/graphics/chromium/Canvas2DLayerBridge.h:
2357         (Canvas2DLayerBridge):
2358         * platform/graphics/chromium/Extensions3DChromium.h:
2359         (Extensions3DChromium):
2360         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
2361         (WebCore::Extensions3DOpenGL::copyTextureCHROMIUM):
2362         (WebCore):
2363         * platform/graphics/opengl/Extensions3DOpenGL.h:
2364         (Extensions3DOpenGL):
2365         * platform/graphics/qt/Extensions3DQt.cpp:
2366         (WebCore::Extensions3DQt::copyTextureCHROMIUM):
2367         (WebCore):
2368         * platform/graphics/qt/Extensions3DQt.h:
2369         (Extensions3DQt):
2370         * platform/graphics/skia/ImageBufferSkia.cpp:
2371         (WebCore::ImageBuffer::copyToPlatformTexture):
2372         (WebCore):
2373
2374 2012-06-22  Danilo Cesar Lemes de Paula  <danilo.cesar@collabora.co.uk>
2375
2376         Add url to supportsType
2377         https://bugs.webkit.org/show_bug.cgi?id=89514
2378
2379         Reviewed by Eric Carlson.
2380
2381         No new tests since there's no change on code behavior.
2382
2383         When a blob is created as the address for a Media Stream, the MediaEngine
2384         will ask it's players if they support that media. However, a player built
2385         for MediaStream needs to know to URL to decide if it's supported or not.
2386
2387         * dom/DOMImplementation.cpp:
2388         (WebCore::DOMImplementation::createDocument):
2389         * html/HTMLMediaElement.cpp:
2390         (WebCore::HTMLMediaElement::canPlayType):
2391         (WebCore::HTMLMediaElement::selectNextSourceChild):
2392         * html/HTMLMediaElement.h:
2393         * platform/graphics/MediaPlayer.cpp:
2394         (MediaPlayerFactory):
2395         (WebCore::MediaPlayerFactory::MediaPlayerFactory):
2396         (WebCore):
2397         (WebCore::textPlain):
2398         (WebCore::bestMediaEngineForTypeAndCodecs):
2399         (WebCore::MediaPlayer::load):
2400         (WebCore::MediaPlayer::loadWithNextMediaEngine):
2401         (WebCore::MediaPlayer::paint):
2402         (WebCore::MediaPlayer::supportsType):
2403         * platform/graphics/MediaPlayer.h:
2404         (WebCore):
2405         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2406         (WebCore::MediaPlayerPrivateAVFoundationCF::supportsType):
2407         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
2408         (MediaPlayerPrivateAVFoundationCF):
2409         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2410         (MediaPlayerPrivateAVFoundationObjC):
2411         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2412         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
2413         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
2414         (WebCore::MediaPlayerPrivate::supportsType):
2415         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
2416         (MediaPlayerPrivate):
2417         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2418         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2419         (MediaPlayerPrivateGStreamer):
2420         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
2421         (MediaPlayerPrivateQTKit):
2422         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2423         (WebCore::MediaPlayerPrivateQTKit::supportsType):
2424         * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
2425         (WebCore::MediaPlayerPrivateQt::supportsType):
2426         * platform/graphics/qt/MediaPlayerPrivateQt.h:
2427         (MediaPlayerPrivateQt):
2428         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
2429         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::supportsType):
2430         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h:
2431         (MediaPlayerPrivateQuickTimeVisualContext):
2432         * platform/graphics/wince/MediaPlayerPrivateWinCE.h:
2433         (MediaPlayerPrivate):
2434
2435 2012-06-22  Joshua Netterfield  <jnetterfield@rim.com>
2436
2437         [BlackBerry] Sanitize GLSL code using ANGLE.
2438
2439         BlackBerry port does not sanitize GLSL code with ANGLE
2440         https://bugs.webkit.org/show_bug.cgi?id=89583
2441
2442         Reviewed by Rob Buis.
2443
2444         No new tests are required.
2445
2446         * CMakeLists.txt: Added ANGLE requirment for CMake builds with WEBGL
2447         * platform/graphics/ANGLEWebKitBridge.h: Added include for ANGLE/ShaderLang.h in BlackBerry platform.
2448         * platform/graphics/GraphicsContext3D.h: Added include for ANGLEWebKitBridge.h in BlackBerry platform.
2449
2450 2012-06-22  Dan Bernstein  <mitz@apple.com>
2451
2452         RenderText’s minimum preferred width is incorrect when soft hyphens are used
2453         https://bugs.webkit.org/show_bug.cgi?id=89775
2454
2455         Reviewed by Simon Fraser.
2456
2457         Test: fast/text/soft-hyphen-min-preferred-width.html
2458
2459         * rendering/RenderText.cpp:
2460         (WebCore::hyphenWidth): Added this helper function.
2461         (WebCore::RenderText::computePreferredLogicalWidths): In places where this function tests
2462         for the soft hyphen character, added a check that the 'hyphens' style property is not set
2463         to 'none', because in that case soft hyphens are not break opportunities. Also added an
2464         explicit check to suppress break opportunities from isBreakable() if the occur after a
2465         soft hyphen and 'hyphens' is set to 'none'. Finally, when measuring text up to a potential
2466         line break, added the width of the hyphen string when needed.
2467
2468 2012-06-22  Dean Jackson  <dino@apple.com>
2469
2470         BitmapImage duplicates code to calculate size
2471         https://bugs.webkit.org/show_bug.cgi?id=89728
2472         <rdar://problem/11724321>
2473
2474         Reviewed by Darin Adler.
2475
2476         Add a new updateSize method to BitmapImage that
2477         avoids duplication in the size and
2478         sizeRespectingOrientation methods.
2479
2480         No new tests needed.
2481
2482         * platform/graphics/BitmapImage.cpp:
2483         (WebCore::BitmapImage::updateSize): new method that will set
2484         m_size and m_sizeRespectingOrientation if necessary.
2485         (WebCore):
2486         (WebCore::BitmapImage::size):
2487         (WebCore::BitmapImage::sizeRespectingOrientation): these each
2488         now call updateSize rather than duplicate the update code.
2489         * platform/graphics/BitmapImage.h:
2490         (BitmapImage):
2491
2492 2012-06-22  Erik Arvidsson  <arv@chromium.org>
2493
2494         [V8] Clean up visitDOMWrapper code
2495         https://bugs.webkit.org/show_bug.cgi?id=89774
2496
2497         Reviewed by Tony Chang.
2498
2499         This moves the check if domWrapperVisitorFunction is null into a function of the WrapperTypeInfo struct.
2500         This is so that users of WrapperTypeInfo does not need to know about the inner details of the struct.
2501         It also makes things more consistent since the other fields in the struct have these kind of functions.
2502
2503         This is a follow up change to http://trac.webkit.org/changeset/120854.
2504
2505         No new tests. Covered by existing tests.
2506
2507         * bindings/v8/V8GCController.cpp:
2508         (WebCore::GrouperVisitor::visitDOMWrapper): Call WrapperTypeInfo::visitDOMWrapper instead.
2509         * bindings/v8/WrapperTypeInfo.h:
2510         (WrapperTypeInfo):
2511         (WebCore::WrapperTypeInfo::visitDOMWrapper): If domWrapperVisitorFunction is non null call it.
2512
2513 2012-06-22  Jan Keromnes  <janx@linux.com>
2514
2515         Web Inspector: ExtensionPanel.onSearch listener doesn't work
2516         https://bugs.webkit.org/show_bug.cgi?id=89517
2517
2518         Reviewed by Yury Semikhatsky.
2519
2520         Added a test to see if listener fires on search:
2521         LayoutTests/inspector/extensions/extensions-panel.html
2522
2523         * inspector/front-end/ExtensionPanel.js:
2524         (WebInspector.ExtensionPanel.prototype.searchCanceled):
2525         (WebInspector.ExtensionPanel.prototype.performSearch):
2526         (WebInspector.ExtensionPanel.prototype.jumpToNextSearchResult):
2527         (WebInspector.ExtensionPanel.prototype.jumpToPreviousSearchResult):
2528
2529 2012-06-22  Brian Salomon  <bsalomon@google.com>
2530
2531         Increase the GrContext texture cache count cap to 2K
2532         https://bugs.webkit.org/show_bug.cgi?id=89761
2533
2534         Reviewed by Stephen White.
2535
2536         Tests: The change is for performance. The code is exercised by all the canvas 2d layout tests.
2537
2538         * platform/chromium/support/GraphicsContext3DPrivate.cpp:
2539
2540 2012-06-22  Silvia Pfeiffer  <silviapf@chromium.org>
2541
2542         [Chromium] Adjust the displayed elements of the new Chrome media controls.
2543         https://bugs.webkit.org/show_bug.cgi?id=89416
2544
2545         Reviewed by Eric Carlson.
2546
2547         No new tests - existing media tests cover these cases.
2548
2549         Remove the volume slider for videos without audio or media resource.
2550         Display the transport bar for videos without a media resource.
2551         Don't show the fullscreen button for
2552
2553         * html/shadow/MediaControlRootElementChromium.cpp:
2554         (WebCore::MediaControlRootElementChromium::reset):
2555         Don't display volume slider if media controller has no audio.
2556         Don't display fullscreen button if media controller supportsFullscreen().
2557         (WebCore::MediaControlRootElementChromium::reportedError):
2558         Don't hide the timeline for failed videos, e.g. where the resource doesn't load.
2559
2560 2012-06-22  Alexander Pavlov  <apavlov@chromium.org>
2561
2562         Web Inspector: [Elements] Right-clicking on whitespace should show the same context menu as right-clicking on the tag text
2563         https://bugs.webkit.org/show_bug.cgi?id=89766
2564
2565         Reviewed by Vsevolod Vlasov.
2566
2567         Explicitly check for the TreeElement.representedObject's nodeType()
2568         rather than for the event target's enclosing element class.
2569         Drive-by: do not consider the "collapsed node has children" ellipsis as a text node.
2570
2571         * inspector/front-end/ElementsTreeOutline.js:
2572         (WebInspector.ElementsTreeOutline.prototype.populateContextMenu):
2573
2574 2012-06-22  Florin Malita  <fmalita@chromium.org>
2575
2576         REGRESSION (Safari 5.1.5 - ToT): Crash in RenderSVGRoot::computeReplacedLogicalWidth
2577         https://bugs.webkit.org/show_bug.cgi?id=85797
2578
2579         Reviewed by Darin Adler.
2580
2581         Test: svg/custom/svg-width-intrinsic-crash.html
2582
2583         RenderSVGRoot::computeReplacedLogicalWidth assumes that if
2584         SVGSVGElement::widthAttributeEstablishesViewport returns false, the
2585         SVG must be embedded via <object>. This is not always the case, though:
2586         widthAttributeEstablishesViewport can also return false for inline
2587         SVG if it doesn't have a replaced logical width.
2588
2589         Updated computeReplacedLogical{Width,Height} to handle the
2590         !widthAttributeEstablishesViewport && !isEmbeddedThroughFrameContainingSVGDocument
2591         case gracefully.
2592
2593         * rendering/svg/RenderSVGRoot.cpp:
2594         (WebCore::RenderSVGRoot::computeReplacedLogicalWidth):
2595         (WebCore::RenderSVGRoot::computeReplacedLogicalHeight):
2596
2597 2012-06-22  Hayato Ito  <hayato@chromium.org>
2598
2599         Modify event re-targeting algorithm so that we can tell which distributed node is clicked.
2600         https://bugs.webkit.org/show_bug.cgi?id=89073
2601
2602         Reviewed by Dimitri Glazkov.
2603
2604         Re-landing r120945 since bug 89172 was resolved.
2605
2606         Adopt a new event re-targeting algorithm in the latest Shadow DOM spec.
2607         The corresponding bug in the shadow DOM spec is:
2608         https://www.w3.org/Bugs/Public/show_bug.cgi?id=17090
2609
2610         This change is introduced to handle the following use case:
2611         1. There is an insertion point, with zero or more nodes distributed into it.
2612         2. User clicks on one of the items.
2613         3. The event handler in shadow DOM subtree wants to know which item was clicked on.
2614
2615         The new re-targeting algorithm sets an event's target to a
2616         distributed node where an event was originally fired, instead of
2617         an insertion point to where the node is distributed.
2618
2619         The similar re-targeting algorithm also applies to an event's
2620         relatedTarget.
2621
2622         Test: fast/dom/shadow/shadow-dom-event-dispatching.html
2623
2624         * dom/EventDispatcher.cpp:
2625         (WebCore::EventRelatedTargetAdjuster::adjust):
2626         (WebCore::EventDispatcher::ensureEventAncestors):
2627
2628 2012-06-22  Andrey Kosyakov  <caseq@chromium.org>
2629
2630         Unreviewed follow-up to r121030, fix display of "Duration" in timeline event details popup.
2631
2632         * inspector/front-end/TimelinePresentationModel.js:
2633         (WebInspector.TimelinePresentationModel.Record.prototype.generatePopupContent):
2634
2635 2012-06-22  Kenneth Russell  <kbr@google.com>
2636
2637         Unreviewed, rolling out r121025.
2638         http://trac.webkit.org/changeset/121025
2639         https://bugs.webkit.org/show_bug.cgi?id=89580
2640
2641         Caused crash in
2642         EventHandler.shouldTurnVerticalTicksIntoHorizontal webkit unit
2643         test on 10.7
2644
2645         * page/EventHandler.cpp:
2646         (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal):
2647         (WebCore::EventHandler::handleWheelEvent):
2648         * page/EventHandler.h:
2649         (EventHandler):
2650         * page/chromium/EventHandlerChromium.cpp:
2651         (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal):
2652         * page/gtk/EventHandlerGtk.cpp:
2653         (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal):
2654
2655 2012-06-21  Andrey Kosyakov  <caseq@chromium.org>
2656
2657         Web Inspector: only increase length for timeline bars below minimal width
2658         https://bugs.webkit.org/show_bug.cgi?id=89727
2659
2660         Reviewed by Pavel Feldman.
2661
2662         * inspector/front-end/TimelinePanel.js:
2663         (WebInspector.TimelineCalculator.prototype.computeBarGraphWindowPosition):
2664         (WebInspector.TimelineCalculator.prototype.setDisplayWindow):
2665         (WebInspector.TimelineRecordGraphRow.prototype.update):
2666
2667 2012-06-22  David Kilzer  <ddkilzer@apple.com>
2668
2669         BUILD FIX: FormController.cpp fails to build on 32-bit architectures
2670
2671         This fixes the following build failure introduced in r121004 for
2672         Bug 89628:
2673
2674             FormController.cpp:62:36: error: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to 'size_t' (aka 'unsigned long') [-Werror,-Wshorten-64-to-32]
2675                 state.m_values.reserveCapacity(valueSize);
2676                 ~~~~~                          ^~~~~~~~~
2677
2678         * html/FormController.cpp:
2679         (WebCore::FormControlState::deserialize): Change type of
2680         valueSize from uint64_t to size_t.
2681
2682 2012-06-22  Abhishek Arya  <inferno@chromium.org>
2683
2684         Crash in DragController::concludeEditDrag.
2685         https://bugs.webkit.org/show_bug.cgi?id=89762
2686
2687         Reviewed by Ryosuke Niwa.
2688
2689         RefPtr the innerFrame since it can get destroyed due to mutation
2690         event fired in DragController::dispatchTextInputEventFor().
2691
2692         Test: editing/pasteboard/drop-text-events-sideeffect-crash.html
2693
2694         * page/DragController.cpp:
2695         (WebCore::DragController::concludeEditDrag):
2696
2697 2012-06-22  Andrey Kosyakov  <caseq@chromium.org>
2698
2699         Web Inspector: timeline event details popup misses CPU time
2700         https://bugs.webkit.org/show_bug.cgi?id=89765
2701
2702         Reviewed by Pavel Feldman.
2703
2704         * inspector/front-end/TimelinePresentationModel.js:
2705         (WebInspector.TimelinePresentationModel.Record.prototype.generatePopupContent):
2706
2707 2012-06-22  Peter Beverloo  <peter@chromium.org>
2708
2709         [Chromium] Disable c++0x compatibility warnings in JavaScriptCore.gyp when building for Android
2710         https://bugs.webkit.org/show_bug.cgi?id=88853
2711
2712         Reviewed by Steve Block.
2713
2714         The Android exclusions were necessary to fix a gyp generation error, as
2715         the gcc_version variable wasn't being defined for Android. Remove these
2716         exceptions when Chromium is able to define the gcc_version variable.
2717
2718         * WebCore.gyp/WebCore.gyp:
2719
2720 2012-06-22  Takashi Sakamoto  <tasak@google.com>
2721
2722         [Shadow] parentTreeScope() of nested shadow DOM subtree returns document().
2723         https://bugs.webkit.org/show_bug.cgi?id=89172
2724
2725         Reviewed by Hajime Morita.
2726
2727         Added setParentTreeScope to set parent treescope of shadow root to be
2728         host's treescope in ElementShadow::addShadowRoot.
2729
2730         Test: fast/dom/shadow/parent-tree-scope-in-shadow.html
2731
2732         * dom/ElementShadow.cpp:
2733         (WebCore::ElementShadow::addShadowRoot):
2734         Added setParentTreeScope.
2735         * testing/Internals.cpp:
2736         (WebCore::Internals::parentTreeScope):
2737         Newly added. This method returns a parent tree scope's root node of
2738         a given node, because a tree scope's root node is either document node
2739         or shadow root node and both nodes derive from TreeScope. So root nodes
2740         are treated as TreeScope.
2741         * testing/Internals.h:
2742         (Internals):
2743         * testing/Internals.idl:
2744         Added parentTreeScope.
2745
2746 2012-06-22  Tony Chang  <tony@chromium.org>
2747
2748         -webkit-flex-flow shouldn't be an enumerable property of the computed style
2749         https://bugs.webkit.org/show_bug.cgi?id=89698
2750
2751         Reviewed by Ojan Vafai.
2752
2753         flex-flow is a shorthand for flex-direction and flex-wrap:
2754         http://dev.w3.org/csswg/css3-flexbox/#flex-flow-property
2755         Shorthand properties should not be enumerable in the computed style, although you can still
2756         get the value from the computed style.
2757
2758         Tests: css3/flexbox/css-properties.html: New test case added.
2759
2760         * css/CSSComputedStyleDeclaration.cpp:
2761         (WebCore):
2762
2763 2012-06-22  Robert Kroeger  <rjkroege@chromium.org>
2764
2765         Suppress horizontal conversion of PlatformWheelEvents when hasPreciseScrollingDeltas is true
2766         https://bugs.webkit.org/show_bug.cgi?id=89580
2767
2768         WebKit GTK and Chromium Linux force vertical wheel events to
2769         scroll horizontally when over horizontal scroll bars.  This is
2770         undesirable for touchpad scrolling with
2771         hasPreciseScrollingDeltas() == true. Modified shouldTurnVerticalTicksIntoHorizontal
2772         to not perform this conversion for PlatformWheelEvents with preciseScrollingDeltas.
2773
2774         Reviewed by Adam Barth.
2775
2776         Unit tests in EventHandlerTest.cpp
2777
2778         * page/EventHandler.cpp:
2779         (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal): 
2780         (WebCore::EventHandler::handleWheelEvent):
2781         * page/EventHandler.h:
2782         (EventHandler):
2783         * page/chromium/EventHandlerChromium.cpp:
2784         (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal):
2785         * page/gtk/EventHandlerGtk.cpp:
2786         (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal):
2787
2788 2012-06-22  Ilya Tikhonovsky  <loislo@chromium.org>
2789
2790         Web Inspector: partially instrument DOM Tree native memory.
2791         https://bugs.webkit.org/show_bug.cgi?id=89568
2792
2793         This patch adds MemoryInstrumentation class that counts all visited
2794         objects and calls reportMemoryUsage for the instrumented classes.
2795
2796         Reviewed by Yury Semikhatsky.
2797
2798         * GNUmakefile.list.am:
2799         * Target.pri:
2800         * WebCore.gypi:
2801         * WebCore.vcproj/WebCore.vcproj:
2802         * WebCore.xcodeproj/project.pbxproj:
2803         * bindings/js/ScriptWrappable.h:
2804         (WebCore::ScriptWrappable::reportMemoryUsage):
2805         (ScriptWrappable):
2806         * bindings/v8/ScriptWrappable.h:
2807         (WebCore::ScriptWrappable::reportMemoryUsage):
2808         (ScriptWrappable):
2809         * css/StylePropertySet.h:
2810         (WebCore::StylePropertySet::reportMemoryUsage):
2811         (StylePropertySet):
2812         * dom/ContainerNode.h:
2813         (WebCore::ContainerNode::reportMemoryUsage):
2814         (ContainerNode):
2815         * dom/Element.h:
2816         (WebCore::Element::reportMemoryUsage):
2817         (Element):
2818         * dom/ElementAttributeData.h:
2819         (WebCore::ElementAttributeData::reportMemoryUsage):
2820         (ElementAttributeData):
2821         * dom/MemoryInstrumentation.h: Added.
2822         (WebCore):
2823         (MemoryInstrumentation):
2824         (WebCore::MemoryInstrumentation::~MemoryInstrumentation):
2825         (WebCore::MemoryInstrumentation::reportObject):
2826         (WebCore::MemoryInstrumentation::reportPointer):
2827         (MemoryObjectInfo):
2828         (WebCore::MemoryObjectInfo::MemoryObjectInfo):
2829         (WebCore::MemoryObjectInfo::reportInstrumentedPointer):
2830         (WebCore::MemoryObjectInfo::reportPointer):
2831         (WebCore::MemoryObjectInfo::reportInstrumentedObject):
2832         (WebCore::MemoryObjectInfo::reportObject):
2833         (WebCore::MemoryObjectInfo::reportObjectInfo):
2834         (WebCore::MemoryObjectInfo::objectType):
2835         (WebCore::MemoryObjectInfo::objectSize):
2836         (WebCore::MemoryInstrumentation::reportInstrumentedPointer):
2837         (WebCore::MemoryInstrumentation::reportInstrumentedObject):
2838         * dom/Node.cpp:
2839         (WebCore::Node::reportMemoryUsage):
2840         (WebCore):
2841         * dom/Node.h:
2842         (Node):
2843         * dom/QualifiedName.h:
2844         (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage):
2845         (WebCore::QualifiedName::reportMemoryUsage):
2846         * inspector/InspectorMemoryAgent.cpp:
2847         (MemoryBlockName):
2848         (WebCore):
2849         (WebCore::addMemoryBlockFor):
2850         (WebCore::domTreeInfo):
2851         (WebCore::memoryCacheInfo):
2852         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
2853         * platform/TreeShared.h:
2854         (WebCore::TreeShared::reportMemoryUsage):
2855         (TreeShared):
2856
2857 2012-06-22  Peter Rybin  <peter.rybin@gmail.com>
2858
2859         Web Inspector: Support 'Restart frame' in inspector frontend
2860         https://bugs.webkit.org/show_bug.cgi?id=89678
2861
2862         Reviewed by Pavel Feldman.
2863
2864         Action is added to call frame placard's context menu. Context menu is now built
2865         on a call frame level rather than on callback sidebar level.
2866
2867         * English.lproj/localizedStrings.js:
2868         * inspector/front-end/CallStackSidebarPane.js:
2869         (WebInspector.CallStackSidebarPane):
2870         (WebInspector.CallStackSidebarPane.prototype.update):
2871         (WebInspector.CallStackSidebarPane.Placard):
2872         (WebInspector.CallStackSidebarPane.Placard.prototype._update):
2873         (WebInspector.CallStackSidebarPane.Placard.prototype._placardContextMenu):
2874         (_restartFrame):
2875         * inspector/front-end/DebuggerModel.js:
2876         (WebInspector.DebuggerModel.prototype.rawLocationToUILocation):
2877         (WebInspector.DebuggerModel.prototype.callStackModified):
2878         (WebInspector.DebuggerModel.CallFrame.prototype.restart):
2879         * inspector/front-end/Script.js:
2880         (WebInspector.Script.prototype.editSource):
2881
2882 2012-06-22  Jocelyn Turcotte  <turcotte.j@gmail.com>
2883
2884         [Qt] Fix the remote inspector loading problems on Mac
2885         https://bugs.webkit.org/show_bug.cgi?id=89747
2886
2887         Reviewed by Simon Hausmann.
2888
2889         Make sure that the state of a SocketStreamHandle is set properly
2890         when created from an existing QTcpSocket.
2891
2892         This fixes the inspectorserver Qt api auto test on Mac.
2893
2894         * platform/network/qt/SocketStreamHandleQt.cpp:
2895         (WebCore::SocketStreamHandle::SocketStreamHandle):
2896
2897 2012-06-22  Yoshifumi Inoue  <yosin@chromium.org>
2898
2899         REGRESSION(r117738):[Forms] validationMessage IDL attribute should not have range overflow message if value isn't range overflow
2900         https://bugs.webkit.org/show_bug.cgi?id=89736
2901
2902         Reviewed by Kent Tamura.
2903
2904         Tests: fast/forms/date/input-date-validation-message.html
2905                fast/forms/number/input-number-validation-message.html
2906                fast/forms/range/input-range-validation-message.html
2907
2908         This patch changes comparison operator for range overflow message in
2909         InputType::validationMessage().
2910
2911         * html/InputType.cpp:
2912         (WebCore::InputType::validationMessage):
2913
2914 2012-06-22  Taiju Tsuiki  <tzik@chromium.org>
2915
2916         Web Inspector: Add frontend-side Entry object to FileSystemModel
2917         https://bugs.webkit.org/show_bug.cgi?id=89739
2918
2919         Reviewed by Vsevolod Vlasov.
2920
2921         * inspector/front-end/FileSystemModel.js:
2922         (WebInspector.FileSystemModel.prototype._fileSystemRootReceived):
2923         (WebInspector.FileSystemModel.prototype.requestDirectoryContent):
2924         (WebInspector.FileSystemModel.prototype._directoryContentReceived):
2925         (WebInspector.FileSystemModel.FileSystem):
2926         (WebInspector.FileSystemModel.Entry):
2927         (WebInspector.FileSystemModel.Entry.prototype.get fileSystemModel):
2928         (WebInspector.FileSystemModel.Entry.prototype.get fileSystem):
2929         (WebInspector.FileSystemModel.Entry.prototype.get url):
2930         (WebInspector.FileSystemModel.Entry.prototype.get name):
2931         (WebInspector.FileSystemModel.Entry.prototype.get isDirectory):
2932         (WebInspector.FileSystemModel.Directory):
2933         (WebInspector.FileSystemModel.Directory.prototype.requestDirectoryContent):
2934         (WebInspector.FileSystemModel.File):
2935         (WebInspector.FileSystemModel.File.prototype.get mimeType):
2936         (WebInspector.FileSystemModel.File.prototype.get resourceType):
2937
2938 2012-06-22  Amy Ousterhout  <aousterh@chromium.org>
2939
2940         Renamed DeviceOrientation to DeviceOrientationData
2941         https://bugs.webkit.org/show_bug.cgi?id=88663
2942
2943         Reviewed by Steve Block.
2944
2945         No new tests because this is simply a name change.
2946
2947         Renamed DeviceOrientation to DeviceOrientationData in order to be consistent with DeviceMotionData.
2948         Updated all files that use DeviceOrientation.
2949   
2950         * CMakeLists.txt:
2951         * GNUmakefile.list.am:
2952         * Target.pri:
2953         * WebCore.exp.in:
2954         * WebCore.gypi:
2955         * WebCore.vcproj/WebCore.vcproj:
2956         * WebCore.xcodeproj/project.pbxproj:
2957         * bindings/js/JSDeviceOrientationEventCustom.cpp:
2958         (WebCore::JSDeviceOrientationEvent::initDeviceOrientationEvent):
2959         * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp:
2960         (WebCore::V8DeviceOrientationEvent::initDeviceOrientationEventCallback):
2961         * dom/DOMAllInOne.cpp:
2962         * dom/DeviceOrientationClient.h:
2963         (WebCore):
2964         (DeviceOrientationClient):
2965         * dom/DeviceOrientationController.cpp:
2966         (WebCore::DeviceOrientationController::timerFired):
2967         (WebCore::DeviceOrientationController::didChangeDeviceOrientation):
2968         * dom/DeviceOrientationController.h:
2969         (WebCore):
2970         (DeviceOrientationController):
2971         * dom/DeviceOrientationData.cpp: Renamed from Source/WebCore/dom/DeviceOrientation.cpp.
2972         (WebCore):
2973         (WebCore::DeviceOrientationData::create):
2974         (WebCore::DeviceOrientationData::DeviceOrientationData):
2975         (WebCore::DeviceOrientationData::alpha):
2976         (WebCore::DeviceOrientationData::beta):
2977         (WebCore::DeviceOrientationData::gamma):
2978         (WebCore::DeviceOrientationData::absolute):
2979         (WebCore::DeviceOrientationData::canProvideAlpha):
2980         (WebCore::DeviceOrientationData::canProvideBeta):
2981         (WebCore::DeviceOrientationData::canProvideGamma):
2982         (WebCore::DeviceOrientationData::canProvideAbsolute):
2983         * dom/DeviceOrientationData.h: Renamed from Source/WebCore/dom/DeviceOrientation.h.
2984         (WebCore):
2985         (DeviceOrientationData):
2986         * dom/DeviceOrientationEvent.cpp:
2987         (WebCore::DeviceOrientationEvent::DeviceOrientationEvent):
2988         (WebCore::DeviceOrientationEvent::initDeviceOrientationEvent):
2989         * dom/DeviceOrientationEvent.h:
2990         (WebCore):
2991         (WebCore::DeviceOrientationEvent::create):
2992         (DeviceOrientationEvent):
2993         (WebCore::DeviceOrientationEvent::orientation):
2994         * loader/EmptyClients.h:
2995         (WebCore::EmptyDeviceOrientationClient::lastOrientation):
2996         * platform/mock/DeviceOrientationClientMock.cpp:
2997         (WebCore::DeviceOrientationClientMock::setOrientation):
2998         * platform/mock/DeviceOrientationClientMock.h:
2999         (WebCore::DeviceOrientationClientMock::lastOrientation):
3000         (DeviceOrientationClientMock):
3001         * platform/qt/DeviceOrientationClientQt.cpp:
3002         (DeviceOrientationClientQt):
3003         * platform/qt/DeviceOrientationClientQt.h:
3004         (DeviceOrientationClientQt):
3005         * platform/qt/DeviceOrientationProviderQt.h:
3006         (DeviceOrientationProviderQt):
3007  
3008 2012-06-21  Vsevolod Vlasov  <vsevik@chromium.org>
3009
3010         Web Inspector: Support separate script compilation and execution.
3011         https://bugs.webkit.org/show_bug.cgi?id=89646
3012
3013         Reviewed by Pavel Feldman.
3014
3015         Separate script compilation and run commands added to protocol and DebuggerAgent.
3016         Separate script compilation and run implemented in v8 ScriptDebugServer, stubs added for js implementation.
3017
3018         Test: inspector/debugger/debugger-compile-and-run.html
3019
3020         * bindings/js/ScriptDebugServer.cpp:
3021         (WebCore::ScriptDebugServer::compileScript):
3022         (WebCore):
3023         (WebCore::ScriptDebugServer::clearCompiledScripts):
3024         (WebCore::ScriptDebugServer::runScript):
3025         * bindings/js/ScriptDebugServer.h:
3026         (WebCore::ScriptDebugServer::supportsSeparateScriptCompilationAndExecution):
3027         (ScriptDebugServer):
3028         * bindings/v8/PageScriptDebugServer.cpp:
3029         (WebCore::PageScriptDebugServer::compileScript):
3030         (WebCore):
3031         (WebCore::PageScriptDebugServer::clearCompiledScripts):
3032         (WebCore::PageScriptDebugServer::runScript):
3033         * bindings/v8/PageScriptDebugServer.h:
3034         (PageScriptDebugServer):
3035         * bindings/v8/ScriptDebugServer.cpp:
3036         (WebCore::ScriptDebugServer::compileScript):
3037         (WebCore):
3038         (WebCore::ScriptDebugServer::clearCompiledScripts):
3039         (WebCore::ScriptDebugServer::runScript):
3040         * bindings/v8/ScriptDebugServer.h:
3041         (WebCore):
3042         (WebCore::ScriptDebugServer::supportsSeparateScriptCompilationAndExecution):
3043         (ScriptDebugServer):
3044         * inspector/Inspector.json:
3045         * inspector/InspectorDebuggerAgent.cpp:
3046         (WebCore::InspectorDebuggerAgent::disable):
3047         (WebCore::InspectorDebuggerAgent::supportsSeparateScriptCompilationAndExecution):
3048         (WebCore):
3049         (WebCore::InspectorDebuggerAgent::compileScript):
3050         (WebCore::InspectorDebuggerAgent::runScript):
3051         * inspector/InspectorDebuggerAgent.h:
3052         (InspectorDebuggerAgent):
3053         (WebCore::InspectorDebuggerAgent::injectedScriptManager):
3054         * inspector/PageDebuggerAgent.cpp:
3055         (WebCore::PageDebuggerAgent::injectedScriptForEval):
3056         (WebCore):
3057         * inspector/PageDebuggerAgent.h:
3058         (PageDebuggerAgent):
3059         * inspector/WorkerDebuggerAgent.cpp:
3060         (WebCore::WorkerDebuggerAgent::injectedScriptForEval):
3061         (WebCore):
3062         * inspector/WorkerDebuggerAgent.h:
3063         (WorkerDebuggerAgent):
3064         * inspector/front-end/Settings.js:
3065         * inspector/front-end/inspector.js:
3066         (WebInspector.doLoadedDone):
3067
3068 2012-06-22  Joseph Pecoraro  <pecoraro@apple.com>
3069
3070         Web Inspector: InspectorState::updateCookie should not do JSON serialization if unsupported
3071         https://bugs.webkit.org/show_bug.cgi?id=89743
3072
3073         Since all InspectorClient's are InspectorStateClient's provide a
3074         virtual accessor that determines whether or not InspectorClient updates
3075         are supported or not.
3076
3077         Reviewed by Yury Semikhatsky.
3078
3079         * inspector/InspectorState.cpp:
3080         (WebCore::InspectorState::updateCookie):
3081         Don't serialize and message the client if the client doesn't do anything with it.
3082
3083         * inspector/InspectorStateClient.h:
3084         * inspector/WorkerInspectorController.cpp:
3085         (WebCore::InspectorStateClient::supportsInspectorStateUpdates):
3086         Let the client say whether or not supports updates or not.
3087
3088 2012-06-21  Sheriff Bot  <webkit.review.bot@gmail.com>
3089
3090         Unreviewed, rolling out r120982.
3091         http://trac.webkit.org/changeset/120982
3092         https://bugs.webkit.org/show_bug.cgi?id=89740
3093
3094         [chromium] ASSERTION FAILED:
3095         m_allocatedTextureIds.contains(textureId) (Requested by ukai
3096         on #webkit).
3097
3098         * platform/graphics/chromium/LayerRendererChromium.cpp:
3099         (WebCore::LayerRendererGpuMemoryAllocationChangedCallbackAdapter::onGpuMemoryAllocationChangedOnImpl):
3100         (WebCore::LayerRendererChromium::LayerRendererChromium):
3101         (WebCore::LayerRendererChromium::initialize):
3102         (WebCore::LayerRendererChromium::setVisible):
3103         (WebCore::LayerRendererChromium::swapBuffers):
3104         (WebCore::LayerRendererChromium::getFramebufferPixels):
3105         * platform/graphics/chromium/LayerRendererChromium.h:
3106         (WebCore):
3107         (LayerRendererChromium):
3108         * platform/graphics/chromium/TextureManager.cpp:
3109         * platform/graphics/chromium/TextureManager.h:
3110         (TextureAllocator):
3111         (TextureManager):
3112         * platform/graphics/chromium/TrackingTextureAllocator.cpp:
3113         (WebCore::TrackingTextureAllocator::createTexture):
3114         (WebCore::TrackingTextureAllocator::deleteTexture):
3115         * platform/graphics/chromium/TrackingTextureAllocator.h:
3116         (TrackingTextureAllocator):
3117         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3118         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
3119         (WebCore::CCLayerTreeHost::initializeLayerRenderer):
3120         (WebCore::CCLayerTreeHost::finishCommitOnImplThread):
3121         (WebCore::CCLayerTreeHost::setNeedsForcedCommit):
3122         (WebCore):
3123         (WebCore::CCLayerTreeHost::setVisible):
3124         (WebCore::CCLayerTreeHost::setContentsMemoryAllocationLimitBytes):
3125         (WebCore::CCLayerTreeHost::updateLayers):
3126         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
3127         (CCLayerTreeHost):
3128         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3129         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
3130         (WebCore::CCLayerTreeHostImpl::commitComplete):
3131         (WebCore::CCLayerTreeHostImpl::canDraw):
3132         (WebCore::CCLayerTreeHostImpl::context):
3133         (WebCore::CCLayerTreeHostImpl::setContentsMemoryAllocationLimitBytes):
3134         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
3135         (CCLayerTreeHostImplClient):
3136         (WebCore::CCLayerTreeHostImpl::sourceFrameCanBeDrawn):
3137         (WebCore::CCLayerTreeHostImpl::setSourceFrameCanBeDrawn):
3138         (CCLayerTreeHostImpl):
3139         * platform/graphics/chromium/cc/CCProxy.h:
3140         (CCProxy):
3141         * platform/graphics/chromium/cc/CCRenderer.h:
3142         (CCRendererClient):
3143         * platform/graphics/chromium/cc/CCScheduler.cpp:
3144         (WebCore::CCScheduler::beginFrameComplete):
3145         (WebCore::CCScheduler::didSwapBuffersComplete):
3146         (WebCore::CCScheduler::didLoseContext):
3147         (WebCore::CCScheduler::didRecreateContext):
3148         (WebCore::CCScheduler::vsyncTick):
3149         * platform/graphics/chromium/cc/CCScheduler.h:
3150         (CCScheduler):
3151         * platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp:
3152         * platform/graphics/chromium/cc/CCSchedulerStateMachine.h:
3153         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
3154         (WebCore::CCSingleThreadProxy::setNeedsForcedCommit):
3155         (WebCore):
3156         (WebCore::CCSingleThreadProxy::stop):
3157         (WebCore::CCSingleThreadProxy::postSetContentsMemoryAllocationLimitBytesToMainThreadOnImplThread):
3158         (WebCore::CCSingleThreadProxy::commitAndComposite):
3159         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
3160         (CCSingleThreadProxy):
3161         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
3162         (WebCore::CCThreadProxy::CCThreadProxy):
3163         (WebCore::CCThreadProxy::compositeAndReadback):
3164         (WebCore::CCThreadProxy::setNeedsForcedCommit):
3165         (WebCore):
3166         (WebCore::CCThreadProxy::postSetContentsMemoryAllocationLimitBytesToMainThreadOnImplThread):
3167         (WebCore::CCThreadProxy::scheduledActionBeginFrame):
3168         (WebCore::CCThreadProxy::beginFrame):
3169         (WebCore::CCThreadProxy::scheduledActionDrawAndSwapInternal):
3170         (WebCore::CCThreadProxy::setContentsMemoryAllocationLimitBytes):
3171         (WebCore::CCThreadProxy::layerTreeHostClosedOnImplThread):
3172         * platform/graphics/chromium/cc/CCThreadProxy.h:
3173         (CCThreadProxy):
3174         (BeginFrameAndCommitState):
3175         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
3176         (WebCore::CCVideoLayerImpl::~CCVideoLayerImpl):
3177         (WebCore::CCVideoLayerImpl::willDraw):
3178         (WebCore::CCVideoLayerImpl::willDrawInternal):
3179         (WebCore::CCVideoLayerImpl::FramePlane::allocateData):
3180         (WebCore::CCVideoLayerImpl::FramePlane::freeData):
3181         (WebCore::CCVideoLayerImpl::allocatePlaneData):
3182         (WebCore::CCVideoLayerImpl::freePlaneData):
3183         (WebCore::CCVideoLayerImpl::freeUnusedPlaneData):
3184         (WebCore::CCVideoLayerImpl::didLoseContext):
3185         * platform/graphics/chromium/cc/CCVideoLayerImpl.h:
3186         (FramePlane):
3187
3188 2012-06-21  Kent Tamura  <tkent@chromium.org>
3189
3190         Make FormControlState capable to store multiple values
3191         https://bugs.webkit.org/show_bug.cgi?id=89628
3192
3193         Reviewed by Hajime Morita.
3194
3195         Make FormControlState capable to store multiple values in order to
3196         clean FileInputType.cpp up and prepare to fix Bug 89623.
3197
3198         No new tests. This doesn't change web-exposed behavior, and
3199         fast/forms/file/recover-file-input-in-unposted-form.html covers
3200         major part of this change.
3201
3202         * html/FormController.cpp:
3203         (WebCore::FormControlState::serializeTo): Support for two or more values.
3204         (WebCore::FormControlState::deserialize): ditto.
3205         (WebCore::formStateSignature):
3206         Bump up the version because the state format for <input type=file> is changed.
3207         * html/FormController.h:
3208          - String m_value -> Vector<String> m_values
3209          - Add some functions.
3210          - Remove hasValue() and value().
3211         (WebCore::FormControlState::FormControlState): m_value -> m_values.
3212         (WebCore::FormControlState::valueSize): Added.
3213         (WebCore::FormControlState::operator[]): Added.
3214         (FormControlState): Add append() declaration, etc.
3215         (WebCore::FormControlState::operator=): m_value -> m_values
3216         (WebCore::FormControlState::append): Added.
3217
3218         * html/HTMLFormControlElementWithState.cpp:
3219         (WebCore::HTMLFormControlElementWithState::finishParsingChildren):
3220         Use valueSize() instead of hasValue().
3221         * html/HTMLFormControlElementWithState.h:
3222         (HTMLFormControlElementWithState): Update the comment.
3223
3224         * html/FileInputType.cpp:
3225         (WebCore::FileInputType::saveFormControlState):
3226         Use multiple value capability of FormControlState
3227         (WebCore::FileInputType::restoreFormControlState): ditto.
3228
3229         * html/BaseCheckableInputType.cpp:
3230         (WebCore::BaseCheckableInputType::restoreFormControlState): Use [0] instead of value().
3231         * html/HTMLSelectElement.cpp:
3232         (WebCore::HTMLSelectElement::restoreFormControlState): ditto.
3233         * html/HTMLTextAreaElement.cpp:
3234         (WebCore::HTMLTextAreaElement::restoreFormControlState): ditto.
3235         * html/HiddenInputType.cpp:
3236         (WebCore::HiddenInputType::restoreFormControlState): ditto.
3237         * html/InputType.cpp:
3238         (WebCore::InputType::restoreFormControlState): ditto.
3239
3240 2012-06-21  Ryosuke Niwa  <rniwa@webkit.org>
3241
3242         LabelsNodeList isn't updated properly after its owner node is adopted into a new document
3243         https://bugs.webkit.org/show_bug.cgi?id=89730
3244
3245         Reviewed by Darin Adler.
3246
3247         When a node is adopted, node lists that are invalidated at document level need to be unregistered
3248         from old document and registered to new document so that DOM mutations in new document will invalidate
3249         caches in the node lists. Done that in NodeListsNodeData::adoptTreeScope, which was extracted from
3250         TreeScopeAdopter::moveTreeToNewScope.
3251
3252         Also renamed DynamicNodeList::node() and m_node to rootNode() and m_ownerNode to better express
3253         their semantics and added ownerNode() to make m_ownerNode private to DynamicNodeList.
3254
3255         Test: fast/forms/label/labels-owner-node-adopted.html
3256
3257         * bindings/js/JSNodeListCustom.cpp:
3258         (WebCore::JSNodeListOwner::isReachableFromOpaqueRoots):
3259         * dom/ChildNodeList.cpp:
3260         (WebCore::ChildNodeList::~ChildNodeList):
3261         (WebCore::ChildNodeList::length):
3262         (WebCore::ChildNodeList::item):
3263         (WebCore::ChildNodeList::nodeMatches):
3264         * dom/ClassNodeList.cpp:
3265         (WebCore::ClassNodeList::ClassNodeList):
3266         (WebCore::ClassNodeList::~ClassNodeList):
3267         * dom/DynamicNodeList.cpp:
3268         (WebCore::DynamicSubtreeNodeList::length):
3269         (WebCore::DynamicSubtreeNodeList::itemForwardsFromCurrent):
3270         (WebCore::DynamicSubtreeNodeList::itemBackwardsFromCurrent):
3271         (WebCore::DynamicSubtreeNodeList::item):
3272         (WebCore::DynamicNodeList::itemWithName):
3273         * dom/DynamicNodeList.h:
3274         (WebCore::DynamicNodeList::DynamicNodeList):
3275         (WebCore::DynamicNodeList::ownerNode):
3276         (WebCore::DynamicNodeList::rootedAtDocument):
3277         (WebCore::DynamicNodeList::shouldInvalidateOnAttributeChange):
3278         (WebCore::DynamicNodeList::rootNode):
3279         (WebCore::DynamicNodeList::document):
3280         (DynamicNodeList):
3281         * dom/NameNodeList.cpp:
3282         (WebCore::NameNodeList::~NameNodeList):
3283         * dom/NodeRareData.h:
3284         (WebCore::NodeListsNodeData::adoptTreeScope):
3285         (NodeListsNodeData):
3286         * dom/TagNodeList.cpp:
3287         (WebCore::TagNodeList::~TagNodeList):
3288         * dom/TreeScopeAdopter.cpp:
3289         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
3290         * html/LabelsNodeList.cpp:
3291         (WebCore::LabelsNodeList::~LabelsNodeList):
3292         (WebCore::LabelsNodeList::nodeMatches):
3293         * html/RadioNodeList.cpp:
3294         (WebCore::RadioNodeList::~RadioNodeList):
3295         (WebCore::RadioNodeList::checkElementMatchesRadioNodeListFilter):
3296
3297 2012-06-21  Alexei Filippov  <alexeif@chromium.org>
3298
3299         Web Inspector: Properly display native memory sizes bigger than 2GB
3300         https://bugs.webkit.org/show_bug.cgi?id=89661
3301
3302         Reviewed by Pavel Feldman.
3303
3304         * inspector/Inspector.json:
3305         * inspector/InspectorMemoryAgent.cpp:
3306         (WebCore::jsHeapInfo):
3307         (WebCore::inspectorData):
3308         (WebCore::renderTreeInfo):
3309         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
3310
3311 2012-06-21  Abhishek Arya  <inferno@chromium.org>
3312
3313         Crash in RenderBlock::layoutPositionedObjects.
3314         https://bugs.webkit.org/show_bug.cgi?id=89599
3315
3316         Reviewed by Julien Chaffraix.
3317
3318         Test: fast/table/table-split-positioned-object-crash.html
3319
3320         * rendering/RenderBlock.cpp:
3321         (WebCore::RenderBlock::splitBlocks): no longer need to explicitly call
3322         removePositionedObjects, since it is part of moveChildrenTo.
3323         * rendering/RenderBlock.h:
3324         (WebCore::RenderBlock::hasPositionedObjects): helper to tell if we have
3325         positioned objects in our list.
3326         * rendering/RenderBox.cpp:
3327         (WebCore::RenderBox::splitAnonymousBoxesAroundChild): Like r102263, this
3328         condition was wrong and while moving children across completely different 
3329         trees, we need fullRemoveInsert as true.
3330         * rendering/RenderBoxModelObject.cpp:
3331         (WebCore::RenderBoxModelObject::moveChildTo): see code comment.
3332         (WebCore::RenderBoxModelObject::moveChildrenTo): see code comment. 
3333
3334 2012-06-21  Kwang Yul Seo  <skyul@company100.net>
3335
3336         Make HTMLDocumentParser::create(DocumentFragment*,Element*, FragmentScriptingPermission) private.
3337         https://bugs.webkit.org/show_bug.cgi?id=89724
3338
3339         Reviewed by Darin Adler.
3340
3341         It is used only by HTMLDocumentParser::parseDocumentFragment. No behavioral changes.
3342
3343         * html/parser/HTMLDocumentParser.h:
3344         (WebCore::HTMLDocumentParser::create):
3345         (HTMLDocumentParser):
3346
3347 2012-06-21  Kalev Lember  <kalevlember@gmail.com>
3348
3349         [GTK] Use the empty plugin support on non-X11 and non-Windows platforms
3350         https://bugs.webkit.org/show_bug.cgi?id=89501
3351
3352         Reviewed by Martin Robinson.
3353
3354         The GTK+ port doesn't currently support NPAPI plugins on platforms other
3355         than X11 or Windows. Using PluginPackageNone and PluginViewNone makes it
3356         easier to build it on other platforms and also allows us to drop some
3357         ifdefs from PluginPackageGtk and PluginViewGtk.
3358
3359         * GNUmakefile.list.am:
3360
3361 2012-06-21  Shinya Kawanaka  <shinyak@chromium.org>
3362
3363         [Shadow][Editing] Assertion in VisibleSelection::adjuseSelectionToAvoidCrossingBoundaries() is triggered.
3364         https://bugs.webkit.org/show_bug.cgi?id=89081
3365
3366         Reviewed by Ryosuke Niwa.
3367
3368         firstEditablePositionAfterPositionInRoot and lastEditablePositionBeforePositionInRoot did not
3369         consider a case that an argument hiehestRoot can be in Shadow DOM. So when adjusting selection to
3370         avoid crossing editing boundaries, VisiblePosition can break shadow boundaries, and it causes
3371         an assertion trigger.
3372
3373         By this patch, firstEditablePositionAfterPositionInRoot and lastEditablePositionBeforePositionInRoot will
3374         adjust position to the tree scope of highestRoot instead of its parent tree scope.
3375
3376         Test: editing/shadow/adjusting-editing-boundary-with-table-in-shadow.html
3377
3378         * editing/htmlediting.cpp:
3379         (WebCore::firstEditablePositionAfterPositionInRoot):
3380         (WebCore::lastEditablePositionBeforePositionInRoot):
3381
3382 2012-06-21  Andrey Kosyakov  <caseq@chromium.org>
3383
3384         Web Inspector: exception in TimelinePresentationModel when recording timeline
3385         https://bugs.webkit.org/show_bug.cgi?id=89716
3386
3387         Reviewed by Pavel Feldman.
3388
3389         * inspector/front-end/TimelinePanel.js:
3390         (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline.processRecord):
3391         (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline):
3392         * inspector/front-end/TimelinePresentationModel.js:
3393         (WebInspector.TimelinePresentationModel.prototype.filteredRecords):
3394         (WebInspector.TimelinePresentationModel.prototype.isVisible):
3395
3396 2012-06-21  Oli Lan  <olilan@chromium.org>
3397
3398         Add methods to select between offsets in an editable field.
3399         https://bugs.webkit.org/show_bug.cgi?id=89098
3400
3401         Reviewed by Ryosuke Niwa.
3402
3403         Reviewed by Ryosuke Niwa.
3404
3405         Adds a new method setSelectionOffsets to Editor. This selects between
3406         the two integer offsets provided in the node currently being edited,
3407         assuming the offsets are given relative to the rootEditableElement.
3408         If no node or field is currently being edited, the method returns false.
3409         
3410         Test: a new test has been added to the chromium port's WebViewTest that
3411         calls this via WebViewImpl::setSelectionEditableOffsets.
3412         
3413         * editing/Editor.cpp:
3414         (WebCore::Editor::setSelectionOffsets):
3415         (WebCore):
3416         * editing/Editor.h:
3417         (Editor):
3418
3419 2012-06-21  Julien Chaffraix  <jchaffraix@webkit.org>
3420
3421         Add support for the grid and inline-grid display types.
3422         https://bugs.webkit.org/show_bug.cgi?id=60732
3423
3424         Reviewed by Tony Chang.
3425
3426         Tests: fast/css-grid-layout/containing-block-grids-expected.html
3427                fast/css-grid-layout/containing-block-grids.html
3428                fast/css-grid-layout/floating-empty-grids-expected.html
3429                fast/css-grid-layout/floating-empty-grids.html
3430
3431         Based on an earlier patch by David Hyatt <hyatt@apple.com>.
3432
3433         Added the first renderer for grid elements.
3434
3435         * CMakeLists.txt:
3436         * GNUmakefile.list.am:
3437         * Target.pri:
3438         * WebCore.gypi:
3439         * WebCore.vcproj/WebCore.vcproj:
3440         * WebCore.xcodeproj/project.pbxproj:
3441         Added RenderGrid files to the build systems.
3442
3443         * rendering/RenderGrid.cpp: Added.
3444         (WebCore::RenderGrid::RenderGrid):
3445         (WebCore::RenderGrid::~RenderGrid):
3446         (WebCore::RenderGrid::layoutBlock):
3447         (WebCore::RenderGrid::renderName):
3448         * rendering/RenderGrid.h: Added.
3449         (RenderGrid):
3450         Skeleton renderer for now.
3451
3452         * rendering/RenderObject.cpp:
3453         (WebCore::RenderObject::createObject):
3454         Return our new RenderGrid for our 2 new |display| values.
3455
3456         * rendering/style/RenderStyle.h:
3457         Added INLINE_GRID to the inline and replaced types.
3458
3459 2012-06-21  Ryosuke Niwa  <rniwa@webkit.org>
3460
3461         Clang build fix.
3462
3463         * dom/NodeRareData.h:
3464
3465 2012-06-19  James Robinson  <jamesr@chromium.org>
3466
3467         [chromium] LayerRendererChromium is not getting visibility messages in single threaded compositing mode.
3468         https://bugs.webkit.org/show_bug.cgi?id=89045
3469
3470         Reviewed by Adrienne Walker.
3471
3472         Based on patch by Michal Mocny <mmocny@google.com>.
3473
3474         Invariants:
3475
3476         1.) We never commit (paint, animate, any of it) when not visible on the main thread -except- for
3477         compositeAndReadback, regardless of threaded vs non-threaded mode
3478         2.) CCLayerTreeHost::m_contentsTextureManager's memory budget is only set by updateLayers() when we are going to
3479         make a frame and is always set to a non-zero value
3480         3.) Zero-sized allocations from the GPU process are always serviced immediately on the impl thread.  Non-zero
3481         allocations are met in the next frame, whenever we would produce that frame according to our usual frame
3482         scheduling logic.
3483         4.) The impl thread always knows the set of currently-allocated managed texture IDs and can delete them all
3484         whenever it likes without needing the main thread to be responsive.
3485
3486         Details:
3487
3488         There are two main changes - tweaking how the contents texture manager's budget is handled and tweaking frame
3489         scheduling for the !visible case.
3490
3491         The scheduling change is a bit more subtle but it unifies the single and multi threaded paths and is really
3492         important.  Except for compositeAndReadback (which I'll talk about below), we simply won't produce frames when
3493         not visible.  This already happens in the single threaded path thanks to render_widget so the only change is to
3494         the threaded path.  The difficulty here is we might post a beginFrame task from the impl thread and then get a
3495         setVisible(false) call on the main thread before the beginFrame task runs.  Since I'm making the setVisible()
3496         call a blocking call from main thread -> impl thread, when the beginFrame task eventually does run on the main
3497         thread we can know that the impl thread's notion of visibility is in sync with the main threads.  Thus I'm
3498         planning to simply abort the frame before doing any processing on the main thread.  The scheduler will know if
3499         it gets a beginFrameAborted and COMMIT_STATE_IDLE.
3500
3501         compositeAndReadback is special - this call currently does come in when we aren't visible (in single and
3502         threaded mode) and we need to service it.  In particular, we need to send a beginFrame over and have it
3503         not be ignored on the main thread.  For this I'm thinking of having the proxy keep track of whether it's
3504         servicing a compositeAndReadback() and use that bit on the main thread to know to process the beginFrame
3505         normally.  On the impl side, we need a few changes.  First, we have to allocate a default framebuffer
3506         (ensureFramebufferCHROMIUM) even if we've dropped it previously and remember to discard it after the
3507         readPixels().  Second, we have to provide a non-zero contents texture allocation on the beginFrame message, and
3508         again remember to delete the textures after the readPixels().  Third, we have to know that the beginFrame is a
3509         forced frame so when we get the beginFrameComplete we go ahead with the rest of the frame.  For this, I think
3510         I'll have to add ACTION_BEGIN_FORCED_FRAME and a corresponding COMMIT_STATE_FORCED_FRAME_IN_PROGRESS so the
3511         scheduler can keep track of the magicness of this frame, and then add some logic after the readpixels call to
3512         drop resources after the readback.  It's probably a good time to stop swapping on readbacks too....
3513
3514         The contents texture manager's budget is only relevant when we want to make a frame, so it's now passed in on
3515         the updateLayers().  Since we only make frames when we are visible and we never have a zero allocation when
3516         visible (thanks to the frame scheduling changes above), this value is always non-zero.  The other thing the
3517         texture manager needs to know about is if we've killed all of the underlying textures from the impl thread -
3518         this bit is passed in by the proxy before the updateLayers() call.  This means if we're running while visible
3519         and the manager wants to decrease our budget to something other than zero, we'll get a new (non-zero) allocation
3520         on the impl thread, schedule a frame, then when it's time to make the frame pass the new lower limit in to
3521         updateLayers(), then have the contents texture manager evict down to our new limit and make a frame with the new
3522         budget.  When the commit completes we'll get notified on the impl thread of which textures the contents texture
3523         manager decided to evict and issue the deleteTexture() calls on them.
3524
3525         The texture budget we pass in will be based on the most recent non-zero memory allocation we received from the
3526         GPU memory manager, or some default value I'll pull out my ass if we haven't heard anything yet.  On compositor
3527         initialization, we can't afford to wait for a round-trip through the GPU process to get a budget for the first
3528         frame.  I don't think handling a decrease to a non-zero budget on a visible tab needs to be terribly urgent - we
3529         can get to it when we get to making the next frame.  If we wanted to satisfy reduced texture budgets directly
3530         from the impl thread, we could keep a priority-list ordered set of textures once we have priorities and delete
3531         based on that.  Let's worry about that later.
3532
3533         * platform/graphics/chromium/LayerRendererChromium.cpp:
3534         (WebCore::LayerRendererGpuMemoryAllocationChangedCallbackAdapter::onGpuMemoryAllocationChangedOnImpl):
3535         (WebCore::LayerRendererChromium::LayerRendererChromium):
3536         (WebCore::LayerRendererChromium::initialize):
3537         (WebCore::LayerRendererChromium::setVisible):
3538         (WebCore::LayerRendererChromium::setGpuMemoryAllocation):
3539         (WebCore):
3540         (WebCore::LayerRendererChromium::swapBuffers):
3541         (WebCore::LayerRendererChromium::getFramebufferPixels):
3542         * platform/graphics/chromium/LayerRendererChromium.h:
3543         (WebCore):
3544         (LayerRendererChromium):
3545         * platform/graphics/chromium/TextureManager.cpp:
3546         (WebCore::TextureManager::evictAndRemoveAllDeletedTextures):
3547         (WebCore):
3548         * platform/graphics/chromium/TextureManager.h:
3549         (TextureAllocator):
3550         (TextureManager):
3551         * platform/graphics/chromium/TrackingTextureAllocator.cpp:
3552         (WebCore::TrackingTextureAllocator::createTexture):
3553         (WebCore::TrackingTextureAllocator::deleteTexture):
3554         (WebCore):
3555         (WebCore::TrackingTextureAllocator::deleteAllTextures):
3556         * platform/graphics/chromium/TrackingTextureAllocator.h:
3557         (TrackingTextureAllocator):
3558         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3559         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
3560         (WebCore::CCLayerTreeHost::initializeLayerRenderer):
3561         (WebCore::CCLayerTreeHost::finishCommitOnImplThread):
3562         (WebCore::CCLayerTreeHost::setVisible):
3563         (WebCore::CCLayerTreeHost::evictAllContentTextures):
3564         (WebCore::CCLayerTreeHost::updateLayers):
3565         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
3566         (CCLayerTreeHost):
3567         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3568         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
3569         (WebCore::CCLayerTreeHostImpl::commitComplete):
3570         (WebCore::CCLayerTreeHostImpl::canDraw):
3571         (WebCore::CCLayerTreeHostImpl::context):
3572         (WebCore::CCLayerTreeHostImpl::releaseContentsTextures):
3573         (WebCore):
3574         (WebCore::CCLayerTreeHostImpl::setMemoryAllocationLimitBytes):
3575         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
3576         (CCLayerTreeHostImplClient):
3577         (WebCore::CCLayerTreeHostImpl::contentsTexturesWerePurgedSinceLastCommit):
3578         (WebCore::CCLayerTreeHostImpl::memoryAllocationLimitBytes):
3579         (CCLayerTreeHostImpl):
3580         * platform/graphics/chromium/cc/CCProxy.h:
3581         (CCProxy):
3582         * platform/graphics/chromium/cc/CCRenderer.h:
3583         (CCRendererClient):
3584         * platform/graphics/chromium/cc/CCScheduler.cpp:
3585         (WebCore::CCScheduler::beginFrameComplete):
3586         (WebCore::CCScheduler::beginFrameAborted):
3587         (WebCore):
3588         (WebCore::CCScheduler::didSwapBuffersComplete):
3589         (WebCore::CCScheduler::didLoseContext):
3590         (WebCore::CCScheduler::didRecreateContext):
3591         (WebCore::CCScheduler::vsyncTick):
3592         * platform/graphics/chromium/cc/CCScheduler.h:
3593         (CCScheduler):
3594         * platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp:
3595         (WebCore::CCSchedulerStateMachine::beginFrameAborted):
3596         (WebCore):
3597         * platform/graphics/chromium/cc/CCSchedulerStateMachine.h:
3598         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
3599         (WebCore::CCSingleThreadProxy::setVisible):
3600         (WebCore):
3601         (WebCore::CCSingleThreadProxy::stop):
3602         (WebCore::CCSingleThreadProxy::commitAndComposite):
3603         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
3604         (CCSingleThreadProxy):
3605         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
3606         (WebCore::CCThreadProxy::CCThreadProxy):
3607         (WebCore::CCThreadProxy::compositeAndReadback):
3608         (WebCore::CCThreadProxy::setVisible):
3609         (WebCore):
3610         (WebCore::CCThreadProxy::setVisibleOnImplThread):
3611         (WebCore::CCThreadProxy::scheduledActionBeginFrame):
3612         (WebCore::CCThreadProxy::beginFrame):
3613         (WebCore::CCThreadProxy::beginFrameAbortedOnImplThread):
3614         (WebCore::CCThreadProxy::scheduledActionDrawAndSwapInternal):
3615         (WebCore::CCThreadProxy::layerTreeHostClosedOnImplThread):
3616         * platform/graphics/chromium/cc/CCThreadProxy.h:
3617         (CCThreadProxy):
3618         (BeginFrameAndCommitState):
3619         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
3620         (WebCore::CCVideoLayerImpl::~CCVideoLayerImpl):
3621         (WebCore::CCVideoLayerImpl::willDraw):
3622         (WebCore::CCVideoLayerImpl::willDrawInternal):
3623         (WebCore::CCVideoLayerImpl::FramePlane::allocateData):
3624         (WebCore::CCVideoLayerImpl::FramePlane::freeData):
3625         (WebCore::CCVideoLayerImpl::allocatePlaneData):
3626         (WebCore::CCVideoLayerImpl::freePlaneData):
3627         (WebCore::CCVideoLayerImpl::freeUnusedPlaneData):
3628         (WebCore::CCVideoLayerImpl::didLoseContext):
3629         * platform/graphics/chromium/cc/CCVideoLayerImpl.h:
3630         (FramePlane):
3631
3632 2012-06-20  Ryosuke Niwa  <rniwa@webkit.org>
3633
3634         Shrink NodeListsNodeData
3635         https://bugs.webkit.org/show_bug.cgi?id=89036
3636
3637         Reviewed by Andreas Kling.
3638
3639         Replaced 6 hash maps of AtomicString, String, and RefPtr<QualifiedName::QualifiedNameImpl> and a raw pointer
3640         by 3 hash maps of std::pair<unsigned short, AtomicString>, std::pair<unsigned short, String>, and QualifiedName,
3641         to halve the NodeListsNodeData's size (Reduced from 7 pointers to 3 pointers). Made those hash maps private and
3642         added addCacheWith* and removeCacheWith* member functions to reduce the code duplication.
3643
3644         Also got rid of removeCached*NodeList member functions from Node and Document now that DynamicSubtreeNodeList can
3645         simply call nodeLists()->removeCacheWith* on m_node.
3646
3647         * dom/ChildNodeList.cpp:
3648         (WebCore::ChildNodeList::ChildNodeList):
3649         * dom/ClassNodeList.cpp:
3650         (WebCore::ClassNodeList::~ClassNodeList):
3651         * dom/Document.cpp:
3652         (WebCore::Document::getItems): Use addCacheWithName.
3653         * dom/Document.h: Got rid of removeCachedMicroDataItemList.
3654         (Document):
3655         * dom/DynamicNodeList.cpp:
3656         (WebCore): Moved the constructor to the header file.
3657         * dom/DynamicNodeList.h: Added NodeListType and InvalidationType to be used in NodeListsNodeData.
3658         (WebCore::DynamicNodeList::DynamicNodeList): Takes the invalidation type.
3659         (WebCore::DynamicNodeList::document): Added.
3660         (WebCore::DynamicNodeList::shouldInvalidateOnAttributeChange): Added.
3661         (WebCore::DynamicNodeList::Caches::Caches): Added shouldInvalidateOnAttributeChange to retain the invalidation type.
3662         (Caches):
3663         (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList):
3664         * dom/MicroDataItemList.cpp:
3665         (WebCore::MicroDataItemList::~MicroDataItemList):
3666         * dom/NameNodeList.cpp:
3667         (WebCore::NameNodeList::NameNodeList):
3668         (WebCore::NameNodeList::~NameNodeList):
3669         (WebCore::NameNodeList::nodeMatches):
3670         * dom/NameNodeList.h:
3671         (WebCore):
3672         (NameNodeList):
3673         (WebCore::NameNodeList::create):
3674         * dom/Node.cpp:
3675         (WebCore::Node::nodeLists): Added so that node lists can directly call removeCacheWith*.
3676         (WebCore::Node::getElementsByTagName):
3677         (WebCore::Node::getElementsByTagNameNS):
3678         (WebCore::Node::getElementsByName):
3679         (WebCore::Node::getElementsByClassName):
3680         (WebCore::Node::radioNodeList):
3681         (WebCore::NodeListsNodeData::invalidateCaches): Merged invalidateCachesThatDependOnAttributes. The function takes
3682         the attribute name to avoid invalidating tag node lists when only attributes are modified. Also, now we have exactly
3683         three hash maps to invalidate: m_atomicNameCaches, m_nameCaches, and m_tagNodeListCacheNS.
3684         (WebCore): NodeListsNodeData::isEmpty is moved to NodeRareData.h.
3685         * dom/Node.h:
3686         (WebCore):
3687         (Node):
3688         * dom/NodeRareData.h:
3689         (NodeListsNodeData):
3690         (WebCore::NodeListsNodeData::addCacheWithAtomicName):
3691         (WebCore::NodeListsNodeData::addCacheWithName):
3692         (WebCore::NodeListsNodeData::addCacheWithQualifiedName):
3693         (WebCore::NodeListsNodeData::removeCacheWithAtomicName):
3694         (WebCore::NodeListsNodeData::removeCacheWithName):
3695         (WebCore::NodeListsNodeData::removeCacheWithQualifiedName):
3696         (WebCore::NodeListsNodeData::isEmpty): Moved from Node.cpp now that this function is much shorter.
3697         (WebCore::NodeListsNodeData::NodeListsNodeData):
3698         (WebCore::NodeListsNodeData::namedNodeListKey): Helper member functions to obtain the key for AtomicString and
3699         String hash maps.
3700         * dom/TagNodeList.cpp:
3701         (WebCore::TagNodeList::TagNodeList):
3702         (WebCore::TagNodeList::~TagNodeList):
3703         (WebCore::HTMLTagNodeList::HTMLTagNodeList): Hard code namespaceURI = starAtom since other values are never used.
3704         (WebCore::HTMLTagNodeList::nodeMatches): Given that, assert m_namespace == starAtom.
3705         * dom/TagNodeList.h:
3706         (WebCore::TagNodeList::create): Add a new version of create that doesn't take namespace (assume starAtom) so that
3707         addCacheWithAtomicName works with this class.
3708         (WebCore::HTMLTagNodeList::create): Removed namespaceURI from the argument list since it's always starAtom.
3709         (HTMLTagNodeList):
3710         * html/LabelableElement.cpp:
3711         (WebCore::LabelableElement::labels):
3712         * html/LabelsNodeList.cpp:
3713         (WebCore::LabelsNodeList::LabelsNodeList): Removed redundant m_forNode (identical to m_node in DynamicNodeList).
3714         (WebCore::LabelsNodeList::~LabelsNodeList):
3715         (WebCore::LabelsNodeList::nodeMatches):
3716         * html/LabelsNodeList.h:
3717         (WebCore::LabelsNodeList::create):
3718         (LabelsNodeList):
3719         * html/RadioNodeList.cpp:
3720         (WebCore::RadioNodeList::RadioNodeList): Removed redundant m_baseElement (identical to m_node in DynamicNodeList).
3721         Also changed the first argument's type from Element* to Node* so that it works better with new template member
3722         functions of NodeListsNodeData.
3723         (WebCore::RadioNodeList::~RadioNodeList):
3724         (WebCore::RadioNodeList::checkElementMatchesRadioNodeListFilter):
3725         * html/RadioNodeList.h:
3726         (WebCore::RadioNodeList::create):
3727         (RadioNodeList):
3728
3729 2012-06-21  Sheriff Bot  <webkit.review.bot@gmail.com>
3730
3731         Unreviewed, rolling out r120945.
3732         http://trac.webkit.org/changeset/120945
3733         https://bugs.webkit.org/show_bug.cgi?id=89703
3734
3735         editing/shadow/breaking-editing-boundaries.html started to
3736         crash (Requested by hayato on #webkit).
3737
3738         * dom/EventDispatcher.cpp:
3739         (WebCore::EventRelatedTargetAdjuster::adjust):
3740         (WebCore::EventDispatcher::ensureEventAncestors):
3741
3742 2012-06-21  Philippe Normand  <pnormand@igalia.com>
3743
3744         [GStreamer] Use setGstElementClassMetadata.
3745
3746         Rubber/stamped by Martin Robinson.
3747
3748         This function was introduced in r120790 but I forgot to actually
3749         use it in that patch.
3750
3751         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
3752         (webkit_video_sink_class_init):
3753         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
3754
3755 2012-06-21  Erik Arvidsson  <arv@chromium.org>
3756
3757         [V8] Use v8::V8::AddImplicitReferences instead of SetHiddenValue
3758         https://bugs.webkit.org/show_bug.cgi?id=80880
3759
3760         Reviewed by Adam Barth.
3761
3762         We used to add a hidden property in the getter to the returned wrapper.
3763         With this patch we instead handle the liveness of the wrapper in the GC phase by
3764         calling v8::V8::AddHiddenReference.
3765
3766         To reduce the amount of custom code we need, the V8 code generator now supports
3767         GenerateIsReachable (as well as CustomIsReachable) which, even though different
3768         from the JSC attribute, is used in the same cases and takes the same values (even though
3769         at the moment not all JSC values are supported by V8). Interfaces that have *IsReachable
3770         also have a dependent life time (just like if V8DependentLifetime was present).
3771
3772         No new tests. Covered by existing tests.
3773
3774         * Target.pri:
3775         * UseV8.cmake:
3776         * WebCore.gypi:
3777         * bindings/scripts/CodeGeneratorJS.pm:
3778         (GetGenerateIsReachable): Abstracted GenerateIsReachable and JSGenerateIsReachable.
3779         (GetCustomIsReachable): Ditto.
3780         (GenerateHeader):
3781         (GenerateImplementation):
3782         * bindings/scripts/CodeGeneratorV8.pm:
3783         (NeedsToVisitDOMWrapper):
3784         (GetGenerateIsReachable):
3785         (GetCustomIsReachable):
3786         (GenerateVisitDOMWrapper):
3787         (GenerateHeader):
3788         (GenerateNamedConstructorCallback):
3789         (GenerateImplementation):
3790         * bindings/scripts/IDLAttributes.txt:
3791         * bindings/scripts/test/V8/V8Float64Array.cpp:
3792         (WebCore):
3793         * bindings/scripts/test/V8/V8Float64Array.h:
3794         (V8Float64Array):
3795         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
3796         (WebCore):
3797         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
3798         (V8TestActiveDOMObject):
3799         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
3800         (WebCore):
3801         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
3802         (V8TestCustomNamedGetter):
3803         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
3804         (WebCore):
3805         * bindings/scripts/test/V8/V8TestEventConstructor.h:
3806         (V8TestEventConstructor):
3807         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
3808         (WebCore):
3809         * bindings/scripts/test/V8/V8TestEventTarget.h:
3810         (V8TestEventTarget):
3811         * bindings/scripts/test/V8/V8TestException.cpp:
3812         (WebCore):
3813         * bindings/scripts/test/V8/V8TestException.h:
3814         (V8TestException):
3815         * bindings/scripts/test/V8/V8TestInterface.cpp:
3816         (WebCore):
3817         * bindings/scripts/test/V8/V8TestInterface.h:
3818         (V8TestInterface):
3819         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
3820         (WebCore):
3821         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
3822         (V8TestMediaQueryListListener):
3823         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
3824         (WebCore):
3825         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
3826         (V8TestNamedConstructor):
3827         * bindings/scripts/test/V8/V8TestNode.cpp:
3828         (WebCore):
3829         * bindings/scripts/test/V8/V8TestNode.h:
3830         (V8TestNode):
3831         * bindings/scripts/test/V8/V8TestObj.cpp:
3832         (WebCore):
3833         * bindings/scripts/test/V8/V8TestObj.h:
3834         (V8TestObj):
3835         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
3836         (WebCore):
3837         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
3838         (V8TestSerializedScriptValueInterface):
3839         * bindings/v8/NPV8Object.cpp:
3840         (WebCore::npObjectTypeInfo):
3841         * bindings/v8/V8GCController.cpp:
3842         (WebCore::GrouperVisitor::visitDOMWrapper):
3843         * bindings/v8/WrapperTypeInfo.h:
3844         (WebCore):
3845         (WrapperTypeInfo):
3846         * bindings/v8/custom/V8CSSStyleSheetCustom.cpp: Removed.
3847         * bindings/v8/custom/V8DOMStringMapCustom.cpp:
3848         * bindings/v8/custom/V8DOMTokenListCustom.cpp: Removed.
3849         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
3850         (WebCore):
3851         * bindings/v8/custom/V8NamedNodeMapCustom.cpp:
3852         * bindings/v8/custom/V8StyleSheetCustom.cpp:
3853         (WebCore::toV8):
3854         * bindings/v8/custom/V8TextTrackListCustom.cpp: Removed.
3855         * css/CSSStyleSheet.idl:
3856         * css/StyleSheet.idl:
3857         * dom/DOMStringMap.idl:
3858         * dom/NamedNodeMap.idl:
3859         * html/DOMTokenList.idl:
3860         * html/track/TextTrackList.idl:
3861
3862 2012-06-21  Alec Flett  <alecflett@chromium.org>
3863
3864         IndexedDB: Implement spec behavior for multiEntry indexes with invalid/duplicate subkeys
3865         https://bugs.webkit.org/show_bug.cgi?id=86123
3866
3867         Reviewed by Darin Fisher.
3868
3869         Distinguish between an actual invalid IDBKey, and an array of
3870         possibly-invalid subkeys by making IDBKey::isValid() check subkeys
3871         if the type is an array.
3872
3873         Introduce a new way to transform an IDBKey into a
3874         multiEntry-specific IDBKey, (IDBKey::createMultiEntryArray)
3875         throwing out duplicates and invalid keys. Use it when storing
3876         index entries for multiEntry indexes.
3877
3878         No new tests: existing tests have been altered to include new behavior.
3879
3880         * Modules/indexeddb/IDBCursor.cpp:
3881         (WebCore::IDBCursor::continueFunction):
3882         * Modules/indexeddb/IDBFactory.cpp:
3883         (WebCore::IDBFactory::cmp):
3884         * Modules/indexeddb/IDBIndex.cpp:
3885         (WebCore::IDBIndex::get):
3886         (WebCore::IDBIndex::getKey):
3887         * Modules/indexeddb/IDBKey.cpp:
3888         (WebCore::IDBKey::isValid):
3889         (WebCore):
3890         * Modules/indexeddb/IDBKey.h:
3891         (WebCore::IDBKey::createMultiEntryArray):
3892         (IDBKey):
3893         * Modules/indexeddb/IDBKeyRange.cpp:
3894         (WebCore::IDBKeyRange::only):
3895         (WebCore::IDBKeyRange::lowerBound):
3896         (WebCore::IDBKeyRange::upperBound):
3897         (WebCore::IDBKeyRange::bound):
3898         * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
3899         (WebCore::IDBLevelDBBackingStore::putObjectStoreRecord):
3900         (WebCore::IDBLevelDBBackingStore::putIndexDataForRecord):
3901         * Modules/indexeddb/IDBLevelDBCoding.cpp:
3902         (WebCore::IDBLevelDBCoding::encodeIDBKey):
3903         * Modules/indexeddb/IDBObjectStore.cpp:
3904         (WebCore::IDBObjectStore::get):
3905         (WebCore::IDBObjectStore::add):
3906         (WebCore::IDBObjectStore::put):
3907         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
3908         (WebCore::IDBObjectStoreBackendImpl::putInternal):
3909         (WebCore):
3910         * bindings/v8/IDBBindingUtilities.cpp:
3911         (WebCore::createIDBKeyFromValue):
3912
3913 2012-06-21  Ian Vollick  <vollick@chromium.org>
3914
3915         [chromium] Overlays when using the web inspector are blurry with device scale factor > 1
3916         https://bugs.webkit.org/show_bug.cgi?id=89676
3917
3918         Reviewed by James Robinson.
3919
3920         Whenever we construct a GraphicsLayerChromium, make initialize the
3921         device and page scale factors, if possible.
3922
3923         Unit test: GraphicsLayerChromiumTest.shouldStartWithCorrectContentsScale
3924
3925         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
3926         (WebCore::GraphicsLayerChromium::GraphicsLayerChromium):
3927
3928 2012-06-21  Philippe Normand  <pnormand@igalia.com>
3929
3930         [Qt] REGRESSION(r120790): broke video rendering
3931         https://bugs.webkit.org/show_bug.cgi?id=89619
3932
3933         Reviewed by Alexis Menard.
3934
3935         Invert the pixel components of the Image on little endian architectures.
3936
3937         * platform/graphics/gstreamer/ImageGStreamerQt.cpp:
3938         (ImageGStreamer::ImageGStreamer):
3939
3940 2012-06-21  James Simonsen  <simonjam@chromium.org>
3941
3942         [Resource Timing] Implement Resource Timing interface
3943         https://bugs.webkit.org/show_bug.cgi?id=61152
3944
3945         This patch implements the Resource Timing interface. It doesn't do anything
3946         useful, because nothing populates the timeline yet. There are also some gaps
3947         in the implementation, which have been filed as bugs.
3948
3949         http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/ResourceTiming/Overview.html
3950
3951         Reviewed by Tony Gentilcore.
3952
3953         No new tests. Feature is disabled on all platforms.
3954
3955         * CMakeLists.txt:
3956         * DerivedSources.pri:
3957         * GNUmakefile.list.am:
3958         * Target.pri:
3959         * UseV8.cmake:
3960         * WebCore.gypi:
3961         * WebCore.vcproj/WebCore.vcproj:
3962         * WebCore.xcodeproj/project.pbxproj:
3963         * bindings/v8/custom/V8PerformanceEntryCustom.cpp:
3964         (WebCore):
3965         (WebCore::toV8): Support PerformanceEntry polymorphism.
3966         * dom/EventNames.h:
3967         (WebCore):
3968         * dom/EventTargetFactory.in:
3969         * page/Performance.cpp:
3970         (WebCore::Performance::~Performance):
3971         (WebCore):
3972         (WebCore::Performance::interfaceName): Reqired for EventTarget.
3973         (WebCore::Performance::scriptExecutionContext): Ditto.
3974         (WebCore::Performance::webkitGetEntries): Return "resource" entries.
3975         (WebCore::Performance::webkitGetEntriesByType): Ditto.
3976         (WebCore::Performance::webkitGetEntriesByName): Ditto.
3977         (WebCore::Performance::webkitClearResourceTimings): New.
3978         (WebCore::Performance::webkitSetResourceTimingBufferSize): New. Unimplemented.
3979         (WebCore::Performance::addResourceTiming): This is how resources in WebCore will report to the timeline.
3980         (WebCore::Performance::eventTargetData): Required for EventTarget.
3981         (WebCore::Performance::ensureEventTargetData): Ditto.
3982         * page/Performance.h:
3983         (Performance):
3984         (WebCore::Performance::refEventTarget):
3985         (WebCore::Performance::derefEventTarget):
3986         * page/Performance.idl:
3987         * page/PerformanceEntry.cpp:
3988         (WebCore::PerformanceEntry::~PerformanceEntry):
3989         (WebCore):
3990         * page/PerformanceEntry.h:
3991         (PerformanceEntry):
3992         (WebCore::PerformanceEntry::isResource):
3993         * page/PerformanceEntry.idl:
3994         * page/PerformanceResourceTiming.cpp: Added.
3995         (WebCore):
3996         (WebCore::PerformanceResourceTiming::PerformanceResourceTiming):
3997         (WebCore::PerformanceResourceTiming::initiatorType):
3998         (WebCore::PerformanceResourceTiming::redirectStart):
3999         (WebCore::PerformanceResourceTiming::redirectEnd):
4000         (WebCore::Pe