ccaec09d8edd947f2bd6fa7ab38a975460807abb
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-12-20  Joshua Bell  <jsbell@chromium.org>
2
3         IndexedDB: Layout test showing delete database getting two blocked events
4         https://bugs.webkit.org/show_bug.cgi?id=92674
5
6         Reviewed by Tony Chang.
7
8         Match the steps specified behavior for deleteDatabase() in the spec: versionchange/blocked
9         events fire if necessary, then waits until a condition is satisfied before continuing with
10         the steps to delete the database. The bug was caused by retrying the full call again. Events
11         are also now sent out immediately when a "versionchange" transaction is running, rather
12         than entering a limbo state - again, the new behavior matches the spec more accurately.
13
14         Tests: storage/indexeddb/delete-in-upgradeneeded-close-in-open-success.html
15                storage/indexeddb/delete-in-upgradeneeded-close-in-versionchange.html
16                storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange.html
17                storage/indexeddb/intversion-gated-on-delete.html
18
19         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
20         (WebCore::IDBDatabaseBackendImpl::processPendingCalls):
21         (WebCore::IDBDatabaseBackendImpl::deleteDatabase): First half of the steps.
22         (WebCore):
23         (WebCore::IDBDatabaseBackendImpl::isDeleteDatabaseBlocked): Pull out condition test.
24         (WebCore::IDBDatabaseBackendImpl::deleteDatabaseFinal): Second half of the of steps.
25         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
26         (IDBDatabaseBackendImpl):
27
28 2012-12-20  Viatcheslav Ostapenko  <sl.ostapenko@samsung.com>
29
30         [EFL] [WebGL] [Wk2] Contents are not rendered properly.
31         https://bugs.webkit.org/show_bug.cgi?id=104664
32
33         Reviewed by Noam Rosenthal.
34
35         WebGL pages that render more than one frame are broken. Only 1st
36         frame comes to the UI side. All webgl repaint tests fail because
37         of this.
38         Specification of EXT_texture_from_pixmap extension here
39         http://www.opengl.org/registry/specs/EXT/texture_from_pixmap.txt
40         says, that:
41         "The contents of the texture after the drawable has been bound are defined
42         as the result of all rendering that has completed before the call to
43         glXBindTexImageEXT."
44         It means that in order to get updates for every frame glXBindTexImageEXT has
45         to be called on every frame update.
46
47         Covered by existing fast/canavs/webgl/*repaint tests.
48
49         * platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp:
50         (WebCore::GraphicsSurfacePrivate::isReceiver):
51         (WebCore::GraphicsSurface::platformSwapBuffers):
52         * platform/graphics/texmap/TextureMapperBackingStore.cpp:
53         (WebCore::TextureMapperSurfaceBackingStore::swapBuffersIfNeeded):
54
55 2012-12-20  Erik Arvidsson  <arv@chromium.org>
56
57         CodeGen: Make [Reflect] use fastGetAttribute and fastHasAttribute
58         https://bugs.webkit.org/show_bug.cgi?id=105540
59
60         Reviewed by Andreas Kling.
61
62         Currently the codegen generates code that use getAttribute and hasAttribute. We can use
63         fastGetAttribute and fastHasAttribute when we use a non SVG animated attribute and not
64         HTML::styleAttr.
65
66         This improves Bindings/id-getter by 16% and Dromaeo/dom-attr by 21%.
67
68         No new tests. No change in behavior.
69
70         * bindings/scripts/CodeGenerator.pm:
71         * bindings/scripts/CodeGeneratorV8.pm:
72         * bindings/scripts/test/CPP/WebDOMTestObj.cpp:
73         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
74         * bindings/scripts/test/JS/JSTestObj.cpp:
75         * bindings/scripts/test/ObjC/DOMTestObj.mm:
76         * bindings/scripts/test/V8/V8TestObj.cpp:
77
78 2012-12-20  Tiancheng Jiang  <tijiang@rim.com>
79
80         [BlackBerry]Change fullscreen back button size
81         https://bugs.webkit.org/show_bug.cgi?id=105541
82
83         Reviewed by Rob Buis.
84
85         Internally Reviewed by John Griggs.
86         Resize fullscreen mode back button size to meet browser back button size.
87
88         * platform/blackberry/RenderThemeBlackBerry.cpp:
89         (WebCore):
90         (WebCore::RenderThemeBlackBerry::paintMediaFullscreenButton):
91
92 2012-12-20  Dominic Mazzoni  <dmazzoni@google.com>
93
94         AX: support clickPoint in DRT for chromium
95         https://bugs.webkit.org/show_bug.cgi?id=97359
96
97         Reviewed by Chris Fleizach.
98
99         When computing the accessible bounding box of an
100         SVG root, be sure to call a method that uses transforms,
101         otherwise an assertion fails.
102
103         Newly unskipped tests: accessibility/svg-bounds.html and
104         accessibility/svg-remote-element.html
105
106         * accessibility/AccessibilityRenderObject.cpp:
107         (WebCore::AccessibilityRenderObject::boundingBoxRect):
108
109 2012-12-20  Carlos Garcia Campos  <cgarcia@igalia.com>
110
111         [Qt]REGRESSION(r138222): It made fast/forms/number/number-spinbutton-click-in-iframe.html crash
112         https://bugs.webkit.org/show_bug.cgi?id=105529
113
114         Reviewed by Nate Chapin.
115
116         Make sure assignIdentifierToInitialRequest() and
117         dispatchWillSendRequest() are called before all other
118         notification callbacks for the substitute data.
119
120         Fixes a crash in fast/forms/number/number-spinbutton-click-in-iframe.html.
121
122         * loader/MainResourceLoader.cpp:
123         (WebCore::MainResourceLoader::load): Call
124         handleSubstituteDataLoadSoon() after assigning the substitute data
125         identifier.
126
127 2012-12-20  Kunihiko Sakamoto  <ksakamoto@chromium.org>
128
129         INPUT_MULTIPLE_FIELDS_UI: Add minimum/maximum value to DateTimeEditElement::LayoutParameters
130         https://bugs.webkit.org/show_bug.cgi?id=105510
131
132         Reviewed by Kent Tamura.
133
134         Add two DateComponents fields, minimum and maximum, to DateTimeEditElement::LayoutParameters, replacing minimumYear and maximumYear.
135         They will be used to limit selectable values of month, day, etc.
136
137         No new tests. No behavior change.
138
139         * html/BaseMultipleFieldsDateAndTimeInputType.cpp: Removed fullYear().
140         * html/BaseMultipleFieldsDateAndTimeInputType.h:
141         (BaseMultipleFieldsDateAndTimeInputType): Ditto.
142         * html/DateInputType.cpp:
143         (WebCore::DateInputType::setupLayoutParameters): Populates minimum/maximum.
144         * html/DateTimeInputType.cpp:
145         (WebCore::DateTimeInputType::setupLayoutParameters): Ditto.
146         * html/DateTimeLocalInputType.cpp:
147         (WebCore::DateTimeLocalInputType::setupLayoutParameters): Ditto.
148         * html/MonthInputType.cpp:
149         (WebCore::MonthInputType::setupLayoutParameters): Ditto.
150         * html/WeekInputType.cpp:
151         (WebCore::WeekInputType::setupLayoutParameters): Ditto.
152         * html/shadow/DateTimeEditElement.cpp:
153         (WebCore::DateTimeEditBuilder::visitField): Replace the usage of minimumYear/maximumYear with minimum/maximum DateComponents.
154         * html/shadow/DateTimeEditElement.h:
155         (LayoutParameters): Removed minimumYear, maximumYear, and undefinedYear(), and added minimum and maximum fields.
156         (WebCore::DateTimeEditElement::LayoutParameters::LayoutParameters):
157
158 2012-12-20  Zan Dobersek  <zandobersek@gmail.com>
159
160         [GTK] Remove the --enable-unstable-features configuration option
161         https://bugs.webkit.org/show_bug.cgi?id=105327
162
163         Reviewed by Martin Robinson.
164
165         Remove the ENABLE_UNSTABLE_FEATURES guards in various GNUmakefiles now that
166         the configuration option is removed.
167
168         No new tests - no new testable functionality.
169
170         * GNUmakefile.am: Remove the ENABLE_UNSTABLE_FEATURES guards in GNUmakefile.am
171         where they were used to override certain feature define values in case of a release build.
172         * GNUmakefile.features.am.in: Adjust the default value for the feature defines that were
173         previously overriden in release builds. This feature define list will eventually represent
174         feature status in release builds with overriding being done through build-webkit.
175         * bindings/gobject/GNUmakefile.am: Move the DOM bindings targets that were previously guarded
176         by the ENABLE_UNSTABLE_FEATURES guards to the common listing of the video-dependent DOM bindings.
177
178 2012-12-20  Florin Malita  <fmalita@chromium.org>
179
180         Incorrect color space conversion for FEImage
181         https://bugs.webkit.org/show_bug.cgi?id=105437
182
183         Reviewed by Dirk Schulze.
184
185         When no color-interpolation-filters property is specified, SVG filters are assumed to
186         operate in LinearRGB color space (http://www.w3.org/TR/SVG/filters.html#FilterPrimitivesOverviewIntro).
187         Currently, FilterEffect relies on filters generating results in the same color space they
188         are requested to use (LinearRGB by default) - but this is not true for FEImage as its
189         result is always a DeviceRGB image buffer. Hence, in FEImage's case, the filter chain
190         performs an invalid LinearRGB->DeviceRGB conversion at the end (for an image buffer already
191         encoded in DeviceRGB).
192
193         This patch introduces a mechanism for filters to override the requested result color space
194         and updates FEImage to always mark its result as DeviceRGB. If a dependent filter requires
195         input in a different color space, FilterEffect::apply() already handles the conversion.
196
197         No new tests - existing tests cover this extensively, after rebaseline.
198
199         * platform/graphics/filters/FilterEffect.cpp:
200         (WebCore::FilterEffect::transformResultColorSpace):
201         Minor cleanup: asImageBuffer() already handles this logic.
202
203         * platform/graphics/filters/FilterEffect.h:
204         (WebCore::FilterEffect::setResultColorSpace):
205         (FilterEffect):
206         New method for overriding the result color space.
207
208         * rendering/FilterEffectRenderer.cpp:
209         (WebCore::FilterEffectRenderer::apply):
210         * rendering/svg/RenderSVGResourceFilter.cpp:
211         (WebCore::RenderSVGResourceFilter::postApplyResource):
212         Do not perform an explicit conversion in these places, as the result color space may be
213         different from the requested color space. Let FilterEffect::transformResultColorSpace()
214         figure it out.
215
216         * svg/graphics/filters/SVGFEImage.cpp:
217         (WebCore::FEImage::platformApplySoftware):
218         FEImage results are always ColorSpaceDeviceRGB.
219
220 2012-12-20  Dominik Röttsches  <dominik.rottsches@intel.com>
221
222         [EFL] MiniBrowser does not play Infinite Gangnam Style
223         https://bugs.webkit.org/show_bug.cgi?id=103531
224
225         Reviewed by Kenneth Rohde Christiansen.
226
227         Specifying additional define to avoid deprecation warning.
228
229         No new tests, compile time change which doesn't affect behavior.
230
231         * PlatformEfl.cmake:
232
233 2012-12-19  Simon Hausmann  <simon.hausmann@digia.com>, Jedrzej Nowacki <jedrzej.nowacki@digia.com>
234
235         [Qt] JS bridge does not transmit QVariants anymore in Qt5
236         https://bugs.webkit.org/show_bug.cgi?id=104540
237
238         Reviewed by Kenneth Rohde Christiansen.
239
240         A data corruption exists in the QObject bridge when calling slots that
241         take a QVariant.
242
243         The calling convention for slots is that the void* parameter array must
244         contain pointers to the actually required destination argument type. If
245         a function takes an int for example, the corresponding entry in the
246         void* parameter array must be a pointer to an int that the moc
247         generated code then can "safely" cast to an int* and dereference.
248         Similarly if the function takes a QVariant it must be a pointer to a
249         QVariant.
250
251         We implement this calling convention by constructing QVariants of the
252         requested parameter types and passing the value of data() into the
253         void* parameter array. This works fine for all types except if the
254         requested type is a QVariant. In that case data() will _not_ return a
255         pointer that can later be safely casted to a QVariant pointer and
256         dereferenced. Instead we must use the address of our variant to ensure
257         a working cast.
258
259         Our auto tests cover this case, but they worked by accident because the
260         provided pointer when casted to a QVariant happens to have the correct
261         type id that doesn't produce the warning seen in the test case of the
262         provided example and the unit test just copies the QVariant and thus
263         pointer.
264
265         * bridge/qt/qt_runtime.cpp:
266         (JSC::Bindings::QtMethodMatchType::typeId): Replace string based meta
267         type id determination of QVariant with a quicker table lookup.
268         (JSC::Bindings::findMethodIndex): Remember the chosen (requested) types
269         and pass the pointer to the QVariant instead of its data() pointer if
270         requested.
271         (JSC::Bindings::QtRuntimeMethod::call): Fixed determination of whether
272         we need to convert a return value or not solely based on the return
273         type _specified_ in the meta method instead of the variant value
274         returned. The latter is not sufficient because a slot can return an
275         invalid variant, which is not the same as returning void. This was
276         triggered by an unit test that accidentally passed due to this memory
277         corruption in the first place.
278
279 2012-12-20  Yury Semikhatsky  <yurys@chromium.org>
280
281         Web Inspector: extract native heap graph representation into a separate file
282         https://bugs.webkit.org/show_bug.cgi?id=105524
283
284         Reviewed by Alexander Pavlov.
285
286         Moved native heap graph parser into NativeHeapGraph.js, renamed NativeHeapGraphNode to NativeHeapGraph.Node
287         and NativeHeapGraphEdge to NativeHeapGraph.Edge
288         Removed unused pie chart view.
289
290         * WebCore.gypi:
291         * WebCore.vcproj/WebCore.vcproj:
292         * inspector/InspectorMemoryAgent.cpp:
293         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution): fixed optional parameter handling
294         * WebCore.gypi:
295         * inspector/InspectorMemoryAgent.cpp:
296         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
297         * inspector/compile-front-end.py:
298         * inspector/front-end/NativeHeapGraph.js: Added.
299         (WebInspector.NativeHeapGraph):
300         (WebInspector.NativeHeapGraph.prototype.rootNodes):
301         (WebInspector.NativeHeapGraph.prototype._calculateNodeEdgeIndexes):
302         (WebInspector.NativeHeapGraph.prototype._addDummyNode):
303         (WebInspector.NativeHeapGraph.Edge):
304         (WebInspector.NativeHeapGraph.Edge.prototype.type):
305         (WebInspector.NativeHeapGraph.Edge.prototype.name):
306         (WebInspector.NativeHeapGraph.Edge.prototype.target):
307         (WebInspector.NativeHeapGraph.Edge.prototype._getStringField):
308         (WebInspector.NativeHeapGraph.Edge.prototype.toString):
309         (WebInspector.NativeHeapGraph.Node):
310         (WebInspector.NativeHeapGraph.Node.prototype.id):
311         (WebInspector.NativeHeapGraph.Node.prototype.type):
312         (WebInspector.NativeHeapGraph.Node.prototype.size):
313         (WebInspector.NativeHeapGraph.Node.prototype.className):
314         (WebInspector.NativeHeapGraph.Node.prototype.name):
315         (WebInspector.NativeHeapGraph.Node.prototype.hasReferencedNodes):
316         (WebInspector.NativeHeapGraph.Node.prototype.referencedNodes):
317         (WebInspector.NativeHeapGraph.Node.prototype.outgoingEdges):
318         (WebInspector.NativeHeapGraph.Node.prototype.targetOfEdge):
319         (WebInspector.NativeHeapGraph.Node.prototype.targetsOfAllEdges):
320         (WebInspector.NativeHeapGraph.Node.prototype._firstEdgePoistion):
321         (WebInspector.NativeHeapGraph.Node.prototype._afterLastEdgePosition):
322         (WebInspector.NativeHeapGraph.Node.prototype._getStringField):
323         (WebInspector.NativeHeapGraph.Node.prototype.toString):
324         * inspector/front-end/NativeMemorySnapshotView.js:
325         * inspector/front-end/ProfilesPanel.js:
326         * inspector/front-end/WebKit.qrc:
327
328 2012-12-20  Eugene Klyuchnikov  <eustas.bug@gmail.com>
329
330         Web Inspector: Timeline: enhance short-records filter.
331         https://bugs.webkit.org/show_bug.cgi?id=101749
332
333         Reviewed by Pavel Feldman.
334
335         Currently filter could be "on" (accepting records longer than 15ms) or
336         "off" (accepting all records). Adding some options between 0ms and 15ms
337         will make this feature much more useful.
338
339         Additional changes:
340         - removed hardcoded size constant WebInspector.StatusBarComboBox.width
341
342         * English.lproj/localizedStrings.js: Added new / removed orphan strings.
343         * inspector/front-end/ProfilesPanel.js: Changed offset calculation.
344         * inspector/front-end/TimelineOverviewPane.js: Enhanced filter.
345         * inspector/front-end/TimelinePanel.js: Replaced button with combobox.
346         (WebInspector.TimelineIsLongFilter): Enhanced filter.
347         * inspector/front-end/TimelinePresentationModel.js:
348         Removed Record "isLong" method.
349         * inspector/front-end/timelinePanel.css: Removed orphan styles.
350
351 2012-12-20  Eugene Klyuchnikov  <eustas@chromium.org>
352
353         Web Inspector: [CPU Profile] Idle time is always 0
354         https://bugs.webkit.org/show_bug.cgi?id=105509
355
356         Reviewed by Pavel Feldman.
357
358         Fix: pass correct profile object to method.
359
360         * inspector/front-end/CPUProfileView.js:
361         (WebInspector.CPUProfileView.profileCallback):
362         (WebInspector.CPUProfileView.prototype._injectIdleTimeNode):
363
364 2012-12-20  Andrey Lushnikov  <lushnikov@chromium.com>
365
366         Web Inspector: fix |_repaintAll| behaviour of a DefaultTextEditor
367         https://bugs.webkit.org/show_bug.cgi?id=105429
368
369         Reviewed by Pavel Feldman.
370
371         Override |_repainAll| method in TextEditorMainPanel and manually
372         repaint visible chunks.
373
374         * inspector/front-end/DefaultTextEditor.js:
375         (WebInspector.TextEditorChunkedPanel.prototype._splitChunkOnALine): Call |_repaintAll| method because |expand()| does not do any repaints anymore.
376         (WebInspector.TextEditorChunkedPanel.prototype._repaintAll): Return |false| in case of fast return, and |true| otherwise.
377         (WebInspector.TextEditorMainPanel.prototype._repaintAll): Added.
378         (WebInspector.TextEditorMainChunk.prototype.expand): Remove painting operations.
379
380 2012-12-19  Pavel Feldman  <pfeldman@chromium.org>
381
382         Web Inspector: introduce Page.captureScreenshot
383         https://bugs.webkit.org/show_bug.cgi?id=105315
384
385         Reviewed by Yury Semikhatsky.
386
387         It will be primarily used by the automation clients, but maybe we find a good place
388         for it in the front-end as well.
389
390         * inspector/Inspector.json:
391         * inspector/InspectorClient.h:
392         (WebCore::InspectorClient::captureScreenshot):
393         (InspectorClient):
394         * inspector/InspectorPageAgent.cpp:
395         (WebCore::InspectorPageAgent::captureScreenshot):
396         (WebCore):
397         * inspector/InspectorPageAgent.h:
398
399 2012-12-19  Carlos Garcia Campos  <cgarcia@igalia.com>
400
401         Make order iterator member stack allocated in RenderFlexibleBox
402         https://bugs.webkit.org/show_bug.cgi?id=104366
403
404         Reviewed by Tony Chang.
405
406         It avoids a heap allocation during layout.
407
408         * rendering/RenderFlexibleBox.cpp:
409         (WebCore::RenderFlexibleBox::OrderIterator::OrderIterator):
410         (WebCore::RenderFlexibleBox::OrderIterator::setOrderValues):
411         (WebCore::RenderFlexibleBox::OrderIterator::first):
412         (WebCore::RenderFlexibleBox::OrderIterator::next):
413         (WebCore::RenderFlexibleBox::OrderIterator::reset):
414         (WebCore::RenderFlexibleBox::RenderFlexibleBox):
415         (WebCore::RenderFlexibleBox::firstLineBoxBaseline):
416         (WebCore::RenderFlexibleBox::layoutBlock):
417         (WebCore::RenderFlexibleBox::appendChildFrameRects):
418         (WebCore::RenderFlexibleBox::repaintChildrenDuringLayoutIfMoved):
419         (WebCore::RenderFlexibleBox::paintChildren):
420         (WebCore::RenderFlexibleBox::layoutFlexItems):
421         (WebCore::RenderFlexibleBox::computeNextFlexLine):
422         (WebCore::RenderFlexibleBox::alignFlexLines):
423         (WebCore::RenderFlexibleBox::alignChildren):
424         (WebCore::RenderFlexibleBox::flipForRightToLeftColumn):
425         (WebCore::RenderFlexibleBox::flipForWrapReverse):
426         * rendering/RenderFlexibleBox.h:
427         (OrderIterator):
428         (WebCore::RenderFlexibleBox::OrderIterator::currentChild):
429         (RenderFlexibleBox):
430
431 2012-12-20  Huang Dongsung  <luxtella@company100.net>
432
433         Remove GraphicsLayer::setGraphicsLayerFactory().
434         https://bugs.webkit.org/show_bug.cgi?id=105503
435
436         Reviewed by Kenneth Rohde Christiansen.
437
438         We don't need GraphicsLayer::setGraphicsLayerFactory() anymore. After r130302,
439         we have used a graphics layer factory explicitly.
440
441         No new tests. Refactoring only.
442
443         * platform/graphics/GraphicsLayer.cpp:
444         * platform/graphics/GraphicsLayer.h:
445         (GraphicsLayer):
446         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
447         (WebCore::GraphicsLayer::create):
448
449 2012-12-20  Dominik Röttsches  <dominik.rottsches@intel.com>
450
451         [WK2] WebAudio WKTR support
452         https://bugs.webkit.org/show_bug.cgi?id=95084
453
454         Reviewed by Kenneth Rohde Christiansen.
455
456         Mac build fixes for adding WebAudio WKTR support.
457
458         No new tests, enables audio testing using WebKitTestRunner.
459
460         * WebCore.exp.in: toUint8Array symbol exported.
461         * WebCore.xcodeproj/project.pbxproj: JSUint8Array.h and JSArrayBufferView.h headers made available as private headers.
462
463 2012-12-20  Patrick Gansterer  <paroga@webkit.org>
464
465         Build fix for WinCE after r137534.
466
467         * inspector/InspectorInstrumentation.h:
468         (WebCore):
469
470 2012-12-19  Yury Semikhatsky  <yurys@chromium.org>
471
472         Web Inspector: deny access from injected script to nodes from document with another origin
473         https://bugs.webkit.org/show_bug.cgi?id=105423
474
475         Reviewed by Pavel Feldman.
476
477         Check that calling context can access the document inspected node belong to
478         before returning JS wrapper for the node.
479
480         Test: http/tests/inspector-protocol/access-inspected-object.html
481
482         * bindings/js/JSInjectedScriptHostCustom.cpp:
483         (WebCore::JSInjectedScriptHost::inspectedObject):
484         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
485         (WebCore::InjectedScriptHost::nodeAsScriptValue):
486
487 2012-12-19  Nico Weber  <thakis@chromium.org>
488
489         Remove slighly confusing "} if" pattern
490         https://bugs.webkit.org/show_bug.cgi?id=105492
491
492         Reviewed by Andreas Kling.
493
494         ADVANCE_TO ends in a goto statement, so this doesn't change behavior.
495
496         * html/parser/HTMLTokenizer.cpp:
497         (WebCore::HTMLTokenizer::nextToken):
498
499 2012-12-19  Mark Pilgrim  <pilgrim@chromium.org>
500
501         [Chromium] Remove idbFactory from PlatformSupport
502         https://bugs.webkit.org/show_bug.cgi?id=105460
503
504         Reviewed by Darin Fisher.
505
506         Part of a larger refactoring series; see tracking bug 82948.
507
508         * WebCore.gyp/WebCore.gyp:
509         * WebCore.gypi:
510         * platform/chromium/PlatformSupport.h: Removed.
511         * storage/chromium: Removed.
512         * storage/chromium/IDBFactoryBackendInterface.cpp: Removed.
513
514 2012-12-19  Eric Carlson  <eric.carlson@apple.com>
515
516         Crash in TextTrack::trackIndexRelativeToRenderedTracks()
517         https://bugs.webkit.org/show_bug.cgi?id=105371
518
519         Reviewed by Simon Fraser.
520
521         Add an RAII object to manage text track update blocking, use it to always process the 
522         current cues to ensure that cues from a track that is deleted are removed from the 
523         shadow DOM before the next layout.
524
525         No new tests, this fixes a crash in media/video-controls-captions-trackmenu.html.
526
527         * html/HTMLMediaElement.cpp:
528         (WebCore::TrackDisplayUpdateScope::TrackDisplayUpdateScope): New, call beginIgnoringTrackDisplayUpdateRequests.
529         (WebCore::TrackDisplayUpdateScope::~TrackDisplayUpdateScope): New, call endIgnoringTrackDisplayUpdateRequests.
530         (WebCore::HTMLMediaElement::beginIgnoringTrackDisplayUpdateRequests):
531         (WebCore::HTMLMediaElement::endIgnoringTrackDisplayUpdateRequests): Call updateActiveTextTrackCues
532             when the ignore count reaches zero.
533         (WebCore::HTMLMediaElement::textTrackAddCues): Use TrackDisplayUpdateScope instead of calling 
534             beginIgnoringTrackDisplayUpdateRequests and endIgnoringTrackDisplayUpdateRequests directly.
535         (WebCore::HTMLMediaElement::textTrackRemoveCues): Ditto.
536         (WebCore::HTMLMediaElement::removeTrack): Ditto.
537         (WebCore::HTMLMediaElement::removeAllInbandTracks): Ditto.
538         (WebCore::HTMLMediaElement::didRemoveTrack): Ditto. Call removeTrack.
539         * html/HTMLMediaElement.h: Declare TrackDisplayUpdateScope as a friend of HTMLMediaElement so it
540             can call protected methods.
541
542 2012-12-19  Nate Chapin  <japhet@chromium.org>
543
544         REGRESSION(r137607): resource load client callbacks are not called for the main resource when loading HTML string
545         https://bugs.webkit.org/show_bug.cgi?id=105330
546
547         Reviewed by Brady Eidson.
548
549         * loader/MainResourceLoader.cpp:
550         (WebCore::MainResourceLoader::responseReceived):
551         (WebCore::MainResourceLoader::dataReceived):
552         (WebCore::MainResourceLoader::didFinishLoading):
553         (WebCore::MainResourceLoader::load):
554         (WebCore::MainResourceLoader::identifier):
555         * loader/MainResourceLoader.h:
556         (MainResourceLoader):
557
558 2012-12-19  Cosmin Truta  <ctruta@rim.com>
559
560         [BlackBerry] RSS reader mangles UTF-8
561         https://bugs.webkit.org/show_bug.cgi?id=105440
562
563         RIM PR 235099
564
565         Reviewed by Yong Li.
566         Reviewed internally by Liam Quinn.
567
568         The HTML string built from RSS parse data is encoded in UTF-8,
569         and it should not be converted to UTF-8 repeatedly.
570
571         * platform/network/blackberry/rss/RSSFilterStream.cpp:
572         (WebCore::RSSFilterStream::convertContentToHtml):
573         * platform/network/blackberry/rss/RSSGenerator.cpp:
574         (WebCore::RSSGenerator::generateHtml):
575
576 2012-12-19  Jon Lee  <jonlee@apple.com>
577
578         Leak in StringImpl::createCFString()
579         https://bugs.webkit.org/show_bug.cgi?id=105485
580         <rdar://problem/12801963>
581
582         Reviewed by Anders Carlsson.
583
584         * platform/text/cf/StringImplCF.cpp:
585         (WTF::StringImpl::createCFString): Missing adoptCF()'s.
586
587 2012-12-19  Alexey Proskuryakov  <ap@apple.com>
588
589         <rdar://problem/12890242> [WK2 NetworkProcess] Client doesn't receive SSL certificates
590         https://bugs.webkit.org/show_bug.cgi?id=105467
591
592         Reviewed by Brady Eidson.
593
594         Implement a way to store certificate chain in ResourceResponse separately from
595         NSURLResponse. There is no way to re-add it to a deserialized NSURLResponse.
596
597         * WebCore.exp.in:
598         * platform/mac/WebCoreSystemInterface.h:
599         * platform/mac/WebCoreSystemInterface.mm:
600         * platform/network/cf/ResourceResponse.h:
601         * platform/network/mac/ResourceResponseMac.mm:
602         (WebCore::ResourceResponse::setCertificateChain):
603         (WebCore::ResourceResponse::certificateChain):
604
605 2012-12-19  Gustavo Noronha Silva  <gns@gnome.org>
606
607         Unreviewed. Add new strings to GTK+'s implementation of
608         LocalizedStrings, using glib's context-aware macro.
609
610         * platform/gtk/LocalizedStringsGtk.cpp:
611         (WebCore):
612         (WebCore::textTrackClosedCaptionsText):
613         (WebCore::textTrackSubtitlesText):
614         (WebCore::textTrackOffText):
615         (WebCore::textTrackNoLabelText):
616
617 2012-12-18  James Simonsen  <simonjam@chromium.org>
618
619         Set the original resource's response even on a 304
620         https://bugs.webkit.org/show_bug.cgi?id=105373
621
622         Reviewed by Nate Chapin.
623
624         The existing setResponse was renamed to responseReceived to better reflect what it does. A new
625         setResponse was added that only sets the response. This is used in the 304 case.
626
627         No new tests. A new Resource Timing test will depend on this soon.
628
629         * loader/SubresourceLoader.cpp:
630         (WebCore::SubresourceLoader::didReceiveResponse):
631         * loader/cache/CachedImage.cpp:
632         (WebCore::CachedImage::responseReceived):
633         * loader/cache/CachedImage.h:
634         (CachedImage):
635         * loader/cache/CachedRawResource.cpp:
636         (WebCore::CachedRawResource::responseReceived):
637         * loader/cache/CachedRawResource.h:
638         (CachedRawResource):
639         * loader/cache/CachedResource.cpp:
640         (WebCore::CachedResource::responseReceived):
641         * loader/cache/CachedResource.h:
642         (CachedResource):
643         (WebCore::CachedResource::setResponse):
644
645 2012-12-19  Emil A Eklund  <eae@chromium.org>
646
647         [Regression] text-overflow ellipsis clips content when zoomed
648         https://bugs.webkit.org/show_bug.cgi?id=105456
649
650         Reviewed by Levi Weintraub.
651
652         At certain zoom levels text-overflow ellipsis incorrectly clips
653         content and displays the ellipsis even though the full content
654         would fit.
655
656         Test: fast/sub-pixel/ellipsis-zoom.html
657         
658         * rendering/RenderBlock.h:
659         (WebCore::RenderBlock::pixelSnappedLogicalRightOffsetForLine):
660         Add bug url to FIXME.
661         
662         * rendering/RenderBlockLineLayout.cpp:
663         (WebCore::RenderBlock::checkLinesForTextOverflow):
664         Pixel snap the content edge before comparing with the line box
665         edge as the line box edge is aligned to a pixel boundary.
666
667 2012-12-19  Antti Koivisto  <antti@apple.com>
668
669         Use ElementTraversal in LiveNodeListBase
670         https://bugs.webkit.org/show_bug.cgi?id=105324
671
672         Reviewed by Ryosuke Niwa.
673
674         Factor the code so that we get clean minimally branchy traversal functions for all the common cases.
675
676         This patch changes the more performance critical forward traversal only, backwards traversal is unaffected for now.
677
678         Instruments thinks it is a progression at least in DOM/DOMDivWalk.html. Bots should tell more.
679
680         * dom/ClassNodeList.cpp:
681         (WebCore::ClassNodeList::nodeMatches):
682         * dom/ClassNodeList.h:
683         (ClassNodeList):
684         (WebCore::ClassNodeList::create):
685         (WebCore):
686         (WebCore::ClassNodeList::nodeMatchesInlined):
687
688             Add inlined version of the matching function for class lists.
689
690         * dom/LiveNodeList.cpp:
691         (WebCore::LiveNodeListBase::rootContainerNode):
692
693             Root is always ContainerNode if the list has anything in it. Traversal functions are slightly more
694             efficient if we know we are operating on ContainerNodes.
695
696         (WebCore):
697         * dom/LiveNodeList.h:
698         (LiveNodeListBase):
699         (WebCore::LiveNodeListBase::shouldOnlyIncludeDirectChildren):
700         * dom/Node.cpp:
701         (WebCore::Node::getElementsByTagName):
702         * dom/TagNodeList.cpp:
703         (WebCore::TagNodeList::TagNodeList):
704         (WebCore::TagNodeList::~TagNodeList):
705         (WebCore::HTMLTagNodeList::HTMLTagNodeList):
706         (WebCore::HTMLTagNodeList::nodeMatches):
707         * dom/TagNodeList.h:
708         (WebCore):
709         (TagNodeList):
710         (WebCore::TagNodeList::create):
711         (HTMLTagNodeList):
712         (WebCore::HTMLTagNodeList::create):
713
714             Use separate ContainerType enum value for HTMLTagNodeList so we can tell it apart from TagNodeList.
715
716         (WebCore::HTMLTagNodeList::nodeMatchesInlined):
717
718             Add inlined version of the matching function for tag lists.
719
720         * html/CollectionType.h:
721         * html/HTMLCollection.cpp:
722         (WebCore::shouldOnlyIncludeDirectChildren):
723         (WebCore::rootTypeFromCollectionType):
724         (WebCore::invalidationTypeExcludingIdAndNameAttributes):
725         (WebCore):
726         (WebCore::isMatchingElement):
727         
728             List type templated matching functions for common cases.
729
730         (WebCore::HTMLCollection::HTMLCollection):
731         (WebCore::HTMLCollection::create):
732         (WebCore::HTMLCollection::~HTMLCollection):
733         (WebCore::previousNode):
734         (WebCore::lastNode):
735         (WebCore::LiveNodeListBase::iterateForPreviousNode):
736         (WebCore::LiveNodeListBase::itemBefore):
737
738             Leave the backwards traversal unchanged for now but remove the forward traversal code.
739
740         (WebCore::firstMatchingElement):
741         (WebCore::nextMatchingElement):
742         (WebCore::firstMatchingChildElement):
743         (WebCore::nextMatchingChildElement):
744         (WebCore::traverseMatchingElementsForwardToOffset):
745
746             List type templated traversal functions with matching. Separate functions for first and subsequent elements
747
748         (WebCore::LiveNodeListBase::traverseChildNodeListForwardToOffset):
749         (WebCore::LiveNodeListBase::traverseLiveNodeListFirstElement):
750         (WebCore::LiveNodeListBase::traverseLiveNodeListForwardToOffset):
751
752             LiveNodeList traversal, picking the right template.
753
754         (WebCore::LiveNodeListBase::item):
755         (WebCore::LiveNodeListBase::itemBeforeOrAfterCachedItem):
756
757             Switch to new traversal functions.
758
759         (WebCore::HTMLCollection::traverseFirstElement):
760         (WebCore::HTMLCollection::traverseForwardToOffset):
761         (WebCore::HTMLCollection::traverseNextElement):
762
763             HTMLCollection traversal, picking the right template.
764
765         (WebCore::HTMLCollection::namedItem):
766         (WebCore::HTMLCollection::updateNameCache):
767
768             Switch to new traversal functions.
769
770         * html/HTMLCollection.h:
771         (HTMLCollection):
772
773 2012-12-19  Alexey Proskuryakov  <ap@apple.com>
774
775         <rdar://problem/12896478> Cannot log into gmail/facebook with NetworkProcess and private browsing enabled
776         https://bugs.webkit.org/show_bug.cgi?id=105454
777
778         Reviewed by Brady Eidson.
779
780         Request was using a wrong session after a redirect, because session cannot be
781         preserved over IPC.
782
783         Just set the storage session after calling the client, it is not really meaningful
784         for a client to change session behind WebKit's back.
785
786         * platform/network/cf/ResourceHandleCFNet.cpp:
787         (WebCore::ResourceHandle::willSendRequest):
788         * platform/network/mac/ResourceHandleMac.mm:
789         (WebCore::ResourceHandle::willSendRequest):
790
791 2012-12-19  Alexis Menard  <alexis@webkit.org>
792
793         Implement CSS parsing for CSS transitions unprefixed.
794         https://bugs.webkit.org/show_bug.cgi?id=104804
795
796         Reviewed by Dean Jackson.
797
798         Add support of an unprefixed version of CSS transitions modules by adding unprefixed versions
799         of each CSS properties. The work is protected behind the flag ENABLE_CSS_TRANSFORMS_ANIMATIONS_TRANSITIONS_UNPREFIXED
800         to cover the work of unprefixing Transforms, Animations and Transitions. It will let the possibility of each ports to turn it off 
801         in their release branches until we're confident that these CSS properties are ready to be unprefixed.
802
803         Test: transitions/transitions-parsing.html
804
805         * Configurations/FeatureDefines.xcconfig:
806         * GNUmakefile.am:
807         * GNUmakefile.features.am.in:
808         * css/CSSPropertyNames.in: alias the unprefixed versions to the prefixed versions.
809
810 2012-12-12  Antonio Gomes  <a1.gomes@sisa.samsung.com>
811
812         Make RenderLayerCompositor::requiresCompositingForScrollableFrame scrollbars agnostic
813         https://bugs.webkit.org/show_bug.cgi?id=97903
814
815         Reviewed by Simon Fraser.
816
817         Some ports (including Qt-wk1 and BlackBerry) allow disabling
818         scrollbars at FrameView creation level. Regardless the scrollbars
819         presence though, their frame's content can still be scrolled as needed.
820         The said, checking for the scrollbars presence in order to determine
821         the scrollability of an inner frame is flaky, as done in RenderLayerCompositor::requiresCompositingForScrollableFrame.
822
823         Instead, the patch factors out part of the logic in
824         FrameView::updateScrollableAreaSet into a new ::isScrollable method.
825         The later can be used to check the scrollability of a given FrameView.
826
827         No new tests added, since there is no behavior change: ports like Chromium and others
828         who currently check for the scrollbars presence in order to determine
829         an inner frame scrollability should not be affected.
830
831         * page/FrameView.cpp:
832         (WebCore::FrameView::isScrollable):
833         (WebCore):
834         (WebCore::FrameView::updateScrollableAreaSet):
835         * page/FrameView.h:
836         (FrameView):
837         * rendering/RenderLayerCompositor.cpp:
838         (WebCore::RenderLayerCompositor::requiresCompositingForScrollableFrame):
839
840 2012-12-18  Roger Fong  <roger_fong@apple.com>
841
842         Popup menu on Windows should fade in instead of sliding in.
843         https://bugs.webkit.org/show_bug.cgi?id=105358
844         <rdar://problem/7611211>
845
846         Reviewed by Timothy Horton.
847
848         Changing popup menu display animation to match what most other Windows applications do.
849
850         * platform/win/PopupMenuWin.cpp:
851         (WebCore::PopupMenuWin::show):
852
853 2012-12-19  Levi Weintraub  <leviw@chromium.org>
854
855         Correct missing touch event handler de-registration for nested Documents and DOMWindows
856         https://bugs.webkit.org/show_bug.cgi?id=105384
857
858         Reviewed by James Robinson.
859
860         Correcting case by which a nested DOMWindow wouldn't clean up its event handler references
861         on its Document when removeAllEventListeners was called. Also, correctly propagating this
862         from a nested Document to its owner Document.
863
864         Updating fast/events/touch/touch-handler-count.html to catch this bug.
865
866         * dom/Document.cpp:
867         (WebCore::Document::didRemoveEventTargetNode):
868         * page/DOMWindow.cpp:
869         (WebCore::DOMWindow::removeAllEventListeners):
870
871 2012-12-18  Simon Fraser  <simon.fraser@apple.com>
872
873         Fix regression from r137923 that caused all tiles to paint when scrolling
874         https://bugs.webkit.org/show_bug.cgi?id=105394
875
876         Reviewed by Dean Jackson.
877
878         r137923 removed a 'continue' from the loop that ensures we have tile coverage,
879         but this caused us to issue repaints for all existing tiles.
880         
881         Fix to 'continue' when the tile size is unchanged. Also remove 'primaryLayerCount'
882         which was unused.
883
884         * platform/graphics/ca/mac/TileCache.mm:
885         (WebCore::TileCache::revalidateTiles):
886
887 2012-12-19  Nate Chapin  <japhet@chromium.org>
888
889         REGRESSION(r137607): PluginDocument loads consume huge amounts of memory
890         https://bugs.webkit.org/show_bug.cgi?id=105359
891
892         Reviewed by Alexey Proskuryakov.
893
894         No new tests, verified manually that http://www.scb.se/statistik/_publikationer/NR0001_2012K02_TI_A28TI1203.pdf
895         no longer consumes several GB of memory.
896
897         * loader/ResourceLoader.cpp:
898         (WebCore::ResourceLoader::setShouldBufferData): shouldBufferData is an enum, not a boolean, so this is reversed.
899         * loader/cache/CachedRawResource.cpp:
900         (WebCore::CachedRawResource::data): If the dataReceived() callback tells us to stop buffering data, be sure to
901             notify the ResourceLoader and clear the data buffer.
902
903 2012-12-19  Gavin Peters  <gavinp@chromium.org>
904
905         [chromium] WebCore::Prerender::didStartPrerender depends on LinkLoader
906         https://bugs.webkit.org/show_bug.cgi?id=105290
907
908         Reviewed by Abhishek Arya.
909
910         The LinkLoader now removes itself from its prerender in time.
911
912         Tested in unit tests, PrerenderingTest.FastRemoveElement.
913
914         * loader/LinkLoader.cpp:
915         (WebCore::LinkLoader::~LinkLoader):
916         (WebCore::LinkLoader::released):
917
918 2012-12-19  Brian Salomon  <bsalomon@google.com>
919
920         [Chromium/Skia] Check whether bitmap has pixels in image encoders
921         https://bugs.webkit.org/show_bug.cgi?id=105349
922
923         Reviewed by Stephen White.
924
925         This adds NULL checks to the JPEG, PNG, WEBP encoders.
926
927         Difficult to test as condition occurs when OOM.
928
929         * platform/image-encoders/skia/JPEGImageEncoder.cpp:
930         (WebCore::JPEGImageEncoder::encode):
931         * platform/image-encoders/skia/PNGImageEncoder.cpp:
932         (WebCore::PNGImageEncoder::encode):
933         * platform/image-encoders/skia/WEBPImageEncoder.cpp:
934         (WebCore::WEBPImageEncoder::encode):
935
936 2012-12-19  Arpita Bahuguna  <arpitabahuguna@gmail.com>
937
938         Unable to place the caret at the end of the first line, when followed by a block, in the vertical writing mode.
939         https://bugs.webkit.org/show_bug.cgi?id=104794
940
941         Reviewed by Ryosuke Niwa.
942
943         In the vertical writing mode, when trying to place the caret at the end
944         of a text line which is followed by a block, the local point sent as
945         part of the hitTest result in the mouse click event is not correct.
946
947         When clicking on the empty region (beyond the text) in the first line,
948         the local point computed is not in accordance with the writing mode.
949
950         Test: editing/selection/caret-at-end-of-text-line-followed-by-block-in-vertical-mode.html
951
952         * rendering/RenderBlock.cpp:
953         (WebCore::RenderBlock::nodeAtPoint):
954         Modified the code to handle the point as per the writing mode when
955         computing the hitTest result. Calling flipForWritingMode() on the
956         point for achieving the same.
957
958 2012-12-19  Sheriff Bot  <webkit.review.bot@gmail.com>
959
960         Unreviewed, rolling out r138157.
961         http://trac.webkit.org/changeset/138157
962         https://bugs.webkit.org/show_bug.cgi?id=105439
963
964         Crashes with assertion failures in EFL debug build. (Requested
965         by drott on #webkit).
966
967         * platform/graphics/texmap/TextureMapperGL.cpp:
968         (SharedGLData):
969         (WebCore::TextureMapperGL::drawTexture):
970         (WebCore::TextureMapperGL::drawTextureWithAntialiasing):
971         (WebCore::keyForFilterType):
972         (WebCore::prepareFilterProgram):
973         (WebCore::TextureMapperGL::drawFiltered):
974         (WebCore::TextureMapperGL::beginClip):
975         * platform/graphics/texmap/TextureMapperShaderManager.cpp:
976         (WebCore):
977         (ShaderSpec):
978         (WebCore::ShaderSpec::ShaderSpec):
979         (WebCore::getShaderSpec):
980         (WebCore::TextureMapperShaderManager::getShaderProgram):
981         * platform/graphics/texmap/TextureMapperShaderManager.h:
982         (TextureMapperShaderProgram):
983         (TextureMapperShaderManager):
984
985 2012-12-19  Zan Dobersek  <zandobersek@gmail.com>
986
987         [GTK] Enable Navigation Timing by default
988         https://bugs.webkit.org/show_bug.cgi?id=105322
989
990         Reviewed by Martin Robinson.
991
992         The Navigation Timing specification (of which implementation is guarder
993         by the ENABLE_WEB_TIMING feature define) has been promoted to the W3C Recommendation
994         status. Because of this we should enable it by default in the release builds of
995         the GTK port.
996
997         No new tests - they already exist and are in majority passing.
998
999         * GNUmakefile.am:
1000         * bindings/gobject/GNUmakefile.am: Move the DOM bindings for interfaces related to this
1001         feature out of the unstable features define guard and into the general list.
1002
1003 2012-12-19  Pavel Feldman  <pfeldman@chromium.org>
1004
1005         Web Inspector: default font on mac is Monaco (should do be Menlo)
1006         https://bugs.webkit.org/show_bug.cgi?id=105435
1007
1008         Reviewed by Alexander Pavlov.
1009
1010         Regressed when I introduced mountain lion modifier in the inspector.css.
1011
1012         * inspector/front-end/inspector.css:
1013         (body.platform-mac .monospace, body.platform-mac .source-code):
1014         (body.platform-mac.platform-mac-tiger .source-code):
1015
1016 2012-12-19  Hayato Ito  <hayato@chromium.org>
1017
1018         Expose WebKitShadowRoot constructor to DOMWindow.
1019         https://bugs.webkit.org/show_bug.cgi?id=105385
1020
1021         Reviewed by Dimitri Glazkov.
1022
1023         This is a follow-up patch for r137870.  WebKitShadowRoot
1024         constructor should be in DOMWindow, just like all of the other
1025         not-callable-constructors like HTMLDivElement, etc.  We need it
1026         for instanceof tests and so on.
1027
1028         Test: fast/dom/shadow/shadow-root-js-api.html
1029               fast/js/global-constructors-expected.html
1030
1031         * page/DOMWindow.idl:
1032
1033 2012-12-19  Andrey Lushnikov  <lushnikov@chromium.com>
1034
1035         Web Inspector: refactor DefaultTextEditor's |expanded| setters
1036         https://bugs.webkit.org/show_bug.cgi?id=105415
1037
1038         Reviewed by Pavel Feldman.
1039
1040         Refactor |expanded| setters and getters into |collapse()|, |expand()|
1041         and |expanded()| methods
1042
1043         * inspector/front-end/DefaultTextEditor.js:
1044         (WebInspector.TextEditorChunkedPanel.prototype._splitChunkOnALine):
1045         (WebInspector.TextEditorChunkedPanel.prototype._expandChunks):
1046         (WebInspector.TextEditorGutterPanel.prototype.textChanged):
1047         (WebInspector.TextEditorGutterChunk.prototype.expanded): Added.
1048         (WebInspector.TextEditorGutterChunk.prototype.collapse): Added.
1049         (WebInspector.TextEditorGutterChunk.prototype.expand): Added.
1050         (WebInspector.TextEditorMainPanel.prototype.markAndRevealRange):
1051         (WebInspector.TextEditorMainPanel.prototype._updateHighlightsForRange):
1052         (WebInspector.TextEditorMainChunk.prototype.expanded): Added.
1053         (WebInspector.TextEditorMainChunk.prototype.collapse): Added.
1054         (WebInspector.TextEditorMainChunk.prototype.expand): Added.
1055
1056 2012-12-19  Pan Deng  <pan.deng@intel.com>
1057
1058         Web Inspector: Use Document* as argument in WebSocket Instrumentation.
1059         https://bugs.webkit.org/show_bug.cgi?id=105279.
1060
1061         Reviewed by Pavel Feldman.
1062
1063         Some WebSocket instrumentation fuctions adopted ScriptExecutionContext* as argument, it is not clear that
1064         their clients and implementations are all using Document*. This patch adopt Document* as argument, and 
1065         Document* could supply more information in future.
1066
1067         No functionality changed, no new tests.
1068
1069         * inspector/InspectorInstrumentation.h:
1070         (InspectorInstrumentation):
1071         (WebCore::InspectorInstrumentation::didCreateWebSocket):
1072         (WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequest):
1073         (WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponse):
1074         (WebCore::InspectorInstrumentation::didCloseWebSocket):
1075
1076 2012-12-19  Tim Volodine  <timvolodine@chromium.org>
1077
1078         Text Autosizing: Work out what to do about form controls
1079         https://bugs.webkit.org/show_bug.cgi?id=102560
1080
1081         Reviewed by Kenneth Rohde Christiansen.
1082
1083         Disallow autosizing of form input controls like buttons, text input fields, selection controls, radio buttons
1084         and check boxes. This is a short term solution to avoid inconsistent autosizing of form controls (which is
1085         worse than not autosizing at all).
1086
1087         Tests: fast/text-autosizing/form-controls-autosizing-button-input-elements.html
1088                fast/text-autosizing/form-controls-autosizing-checkbox-input-element.html
1089                fast/text-autosizing/form-controls-autosizing-radio-input-element.html
1090                fast/text-autosizing/form-controls-autosizing-select-element.html
1091                fast/text-autosizing/form-controls-autosizing-textfield-input-elements.html
1092
1093         * rendering/TextAutosizer.cpp:
1094         (WebCore):
1095         (WebCore::formInputTags):
1096         (WebCore::TextAutosizer::isAutosizingContainer):
1097         (WebCore::TextAutosizer::contentHeightIsConstrained):
1098         (WebCore::TextAutosizer::containerShouldBeAutosized):
1099         (WebCore::TextAutosizer::containerContainsOneOfTags):
1100         * rendering/TextAutosizer.h:
1101
1102 2012-12-19  Vsevolod Vlasov  <vsevik@chromium.org>
1103
1104         Web Inspector: Add Workspace.setFileContent() method
1105         https://bugs.webkit.org/show_bug.cgi?id=105434
1106
1107         Reviewed by Pavel Feldman.
1108
1109         Added method that will be usedto save file system-based uiSourceCodes to the disk.
1110
1111         * inspector/front-end/UISourceCode.js:
1112         (WebInspector.UISourceCode.prototype._commitContent):
1113         * inspector/front-end/Workspace.js:
1114         (WebInspector.WorkspaceProvider.prototype.setFileContent):
1115         (WebInspector.Project.prototype.setFileContent):
1116
1117 2012-12-19  Vsevolod Vlasov  <vsevik@chromium.org>
1118
1119         Web Inspector: Rename workspace path to uri.
1120         https://bugs.webkit.org/show_bug.cgi?id=105433
1121
1122         Reviewed by Pavel Feldman.
1123
1124         URI should later become file unique id / address in workspace.
1125
1126         * inspector/front-end/NetworkWorkspaceProvider.js:
1127         (WebInspector.NetworkWorkspaceProvider.prototype.requestFileContent):
1128         (WebInspector.NetworkWorkspaceProvider.prototype.setFileContent):
1129         (WebInspector.NetworkWorkspaceProvider.prototype.searchInFileContent):
1130         (WebInspector.NetworkWorkspaceProvider.prototype.addFile):
1131         (WebInspector.NetworkWorkspaceProvider.prototype.removeFile):
1132         * inspector/front-end/Workspace.js:
1133         (WebInspector.FileDescriptor):
1134         (WebInspector.WorkspaceProvider.prototype.requestFileContent):
1135         (WebInspector.WorkspaceProvider.prototype.searchInFileContent):
1136         (WebInspector.Project.prototype._fileAdded):
1137         (WebInspector.Project.prototype._fileRemoved):
1138         (WebInspector.Project.prototype.requestFileContent):
1139         (WebInspector.Project.prototype.searchInFileContent):
1140         (WebInspector.Workspace.prototype.addTemporaryUISourceCode):
1141
1142 2012-12-14  Alexander Pavlov  <apavlov@chromium.org>
1143
1144         Web Inspector: Refactor CSS[Keyword]Completions to augment property metadata
1145         https://bugs.webkit.org/show_bug.cgi?id=105020
1146
1147         Reviewed by Pavel Feldman.
1148
1149         - CSSCompletions and CSSKeywordCompletions of WebInspector have been merged into CSSMetadata.
1150         - Valid value keyword lists have been added or augmented for some properties.
1151         - Some properties have been made inherited or color-aware.
1152
1153         * English.lproj/localizedStrings.js:
1154         * WebCore.gypi:
1155         * WebCore.vcproj/WebCore.vcproj:
1156         * inspector/compile-front-end.py:
1157         * inspector/front-end/CSSCompletions.js: Removed.
1158         * inspector/front-end/CSSKeywordCompletions.js: Removed.
1159         * inspector/front-end/CSSMetadata.js: Added.
1160         (WebInspector.CSSMetadata):
1161         (WebInspector.CSSMetadata.isColorAwareProperty):
1162         (WebInspector.CSSMetadata.colors):
1163         (WebInspector.CSSMetadata.valuesForProperty):
1164         (WebInspector.CSSMetadata.descriptor):
1165         (WebInspector.CSSMetadata.requestCSSShorthandData):
1166         (WebInspector.CSSMetadata.cssPropertiesMetainfoKeySet):
1167         (WebInspector.CSSMetadata.prototype.startsWith):
1168         (WebInspector.CSSMetadata.prototype.mostUsedOf):
1169         (WebInspector.CSSMetadata.prototype._firstIndexOfPrefix):
1170         (WebInspector.CSSMetadata.prototype.keySet):
1171         (WebInspector.CSSMetadata.prototype.next):
1172         (WebInspector.CSSMetadata.prototype.previous):
1173         (WebInspector.CSSMetadata.prototype._closest):
1174         (WebInspector.CSSMetadata.prototype.longhands):
1175         (WebInspector.CSSMetadata.prototype.shorthands):
1176         * inspector/front-end/CSSStyleModel.js:
1177         (WebInspector.CSSStyleDeclaration.prototype.longhandProperties):
1178         * inspector/front-end/SourceCSSTokenizer.js:
1179         (WebInspector.SourceCSSTokenizer):
1180         * inspector/front-end/SourceCSSTokenizer.re2js:
1181         * inspector/front-end/StylesSidebarPane.js:
1182         (WebInspector.StylesSidebarPane.createExclamationMark):
1183         (WebInspector.StylesSidebarPane.prototype._markUsedProperties):
1184         (WebInspector.StylesSidebarPane.prototype._containsInherited):
1185         (WebInspector.StylePropertiesSection.prototype.isPropertyInherited):
1186         (WebInspector.StylePropertiesSection.prototype.isPropertyOverloaded):
1187         (WebInspector.StylePropertiesSection.prototype.onpopulate):
1188         (WebInspector.ComputedStylePropertiesSection.prototype.rebuildComputedTrace):
1189         (WebInspector.StylePropertyTreeElement.prototype):
1190         * inspector/front-end/WebKit.qrc:
1191         * inspector/front-end/inspector.html:
1192         * inspector/front-end/inspector.js:
1193
1194 2012-12-19  No'am Rosenthal  <noam@webkit.org>
1195
1196         [Texmap] Instead of having multiple shaders sources with lots of duplication, we should have one shader source with MACRO variants
1197         https://bugs.webkit.org/show_bug.cgi?id=104815
1198
1199         Reviewed by Kenneth Rohde Christiansen.
1200
1201         Created templates for the vertex and fragment shaders, and added some MACROs in 
1202         TextureMapperShaderManager to allow GLSL precompiler-based configuration.
1203
1204         The template follows a pattern where the main function in the shader calls
1205         applyFooBarIfNeeded(), while applyFooBar() is implemented. The Macros prepended to the template define whether applyIfNeeded resolves to the real function or to a noop.
1206
1207         In addition, made some small changes to the filter shaders so that they can use the same code as the normal shaders.
1208
1209         Covered by existing pixel/ref tests when run on Qt/EFL/GTK.
1210
1211         * platform/graphics/texmap/TextureMapperGL.cpp:
1212         (WebCore::TextureMapperGL::drawTexture):
1213         (WebCore::TextureMapperGL::drawSolidColor):
1214         (WebCore::TextureMapperGL::drawTextureWithAntialiasing):
1215         (WebCore::optionsForFilterType):
1216         (WebCore):
1217         (WebCore::getPassesRequiredForFilter):
1218         (WebCore::prepareFilterProgram):
1219         (WebCore::TextureMapperGL::drawFiltered):
1220         (WebCore::BitmapTextureGL::applyFilters):
1221             Always draw using the drawQuad function, and use the new TextureMapperShaderManager::Options mask instead of the old ShaderKey.
1222
1223         * platform/graphics/texmap/TextureMapperShaderManager.cpp:
1224         (WebCore):
1225         (WebCore::getShaderSpec):
1226         (WebCore::TextureMapperShaderManager::getShaderProgram):
1227         * platform/graphics/texmap/TextureMapperShaderManager.h:
1228         (TextureMapperShaderProgram):
1229         (TextureMapperShaderManager):
1230
1231 2012-12-19  Vsevolod Vlasov  <vsevik@chromium.org>
1232
1233         Web Inspector: Support removing several tabs from TabbedEditorContainer/TabbedPane at once.
1234         https://bugs.webkit.org/show_bug.cgi?id=104881
1235
1236         Reviewed by Alexander Pavlov.
1237
1238         * inspector/front-end/ScriptsPanel.js:
1239         (WebInspector.ScriptsPanel.prototype._uiSourceCodeRemoved):
1240         * inspector/front-end/TabbedEditorContainer.js:
1241         (WebInspector.TabbedEditorContainer.prototype.removeUISourceCode):
1242         * inspector/front-end/TabbedPane.js:
1243         (WebInspector.TabbedPane.prototype.closeTab):
1244         (WebInspector.TabbedPane.prototype.closeTabs):
1245
1246 2012-12-19  Andrey Kosyakov  <caseq@chromium.org>
1247
1248         Web Inspector: scripts to evaluate on load are not removed from inspector state when Page agent is disabled
1249         https://bugs.webkit.org/show_bug.cgi?id=105422
1250
1251         Reviewed by Alexander Pavlov.
1252
1253         - reset scripts to evaluate on load when InspectorPageAgent is disabled.
1254         - added InspectorState::remove();
1255
1256         * inspector/InspectorPageAgent.cpp:
1257         (WebCore::InspectorPageAgent::disable):
1258         * inspector/InspectorState.cpp:
1259         (WebCore::InspectorState::remove):
1260         (WebCore):
1261         * inspector/InspectorState.h:
1262         (InspectorState):
1263
1264 2012-12-19  Kunihiko Sakamoto  <ksakamoto@chromium.org>
1265
1266         INPUT_MULTIPLE_FIELDS_UI: Make year field readonly if min and max have the same year
1267         https://bugs.webkit.org/show_bug.cgi?id=105383
1268
1269         Reviewed by Kent Tamura.
1270
1271         Make year field readonly if min and max have the same year, and it does not have
1272         value with different year.
1273
1274         Test: fast/forms/date-multiple-fields/date-multiple-fields-readonly-subfield.html
1275
1276         * css/html.css: Add CSS rule for the year field.
1277         * html/shadow/DateTimeEditElement.cpp:
1278         (DateTimeEditBuilder):
1279         (WebCore::DateTimeEditBuilder::visitField): Make year-field readonly when appropriate.
1280         (WebCore::DateTimeEditBuilder::shouldYearFieldReadOnly): Added.
1281
1282 2012-12-19  Max Feil  <mfeil@rim.com>
1283
1284         [BlackBerry] Fix undesired re-entrant calls during media error dialog
1285         https://bugs.webkit.org/show_bug.cgi?id=105398
1286
1287         Reviewed by Rob Buis.
1288
1289         A recent change in libwebview (PR194379) to the dialog
1290         handling means that dialogs are not truly blocking anymore.
1291         While the dialog is up, a sub-event loop is called. Therefore
1292         the HTML5 media code will continue processing pps messages from
1293         mm-renderer, responding to periodic timers, etc., all while a
1294         media error dialog call higher up in the stack is waiting for
1295         the user to respond. Unfortunately certain places in our code
1296         do not anticipate being called in this re-entrant way.
1297
1298         This patch restores previous behaviour, covered by existing tests.
1299
1300         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
1301         (WebCore::MediaPlayerPrivate::waitMetadataTimerFired):
1302
1303 2012-12-19  Alexander Pavlov  <apavlov@chromium.org>
1304
1305         Web Inspector: [REGRESSION] The last remembered tab is not restored when the Settings dialog is opened
1306         https://bugs.webkit.org/show_bug.cgi?id=105414
1307
1308         Reviewed by Vsevolod Vlasov.
1309
1310         Do not force the "General" tab when opening settings upon the Cog button click.
1311
1312         * inspector/front-end/SettingsScreen.js:
1313         (WebInspector.SettingsController.prototype._mouseUp):
1314
1315 2012-12-19  Renata Hodovan  <reni@webkit.org>
1316
1317         CSSParser crases, when no context is available, and the value is a valid keyword
1318         https://bugs.webkit.org/show_bug.cgi?id=105275
1319
1320         Reviewed by Tony Chang.
1321
1322         ParserContext could be null even if the keyword is valid. We have to check it.
1323
1324         Test: fast/css/invalid-parsercontext-valid-keyword-crash.svg
1325
1326         * css/CSSParser.cpp:
1327         (WebCore::CSSParser::parseValue):
1328
1329 2012-12-19  Kondapally Kalyan  <kalyan.kondapally@intel.com>
1330
1331         [EFL][WebGL] Refactor GLXSurface.
1332         https://bugs.webkit.org/show_bug.cgi?id=105357
1333
1334         Reviewed by Kenneth Rohde Christiansen.
1335
1336         This is in preparation for adding EGL support.
1337         There is lot of X related code which could be shared between our current GLX implementation
1338         and EGL. This patch makes it possible to share the common code but doesn't change any functionality.
1339
1340         * PlatformEfl.cmake:
1341         * platform/graphics/surfaces/glx/GLXSurface.cpp:
1342         (WebCore):
1343         (WebCore::GLXTransportSurface::GLXTransportSurface):
1344         (WebCore::GLXTransportSurface::configuration):
1345         (WebCore::GLXTransportSurface::destroy):
1346         (WebCore::GLXTransportSurface::freeResources):
1347         (WebCore::GLXPBuffer::GLXPBuffer):
1348         (WebCore::GLXPBuffer::initialize):
1349         (WebCore::GLXPBuffer::configuration):
1350         (WebCore::GLXPBuffer::setGeometry):
1351         * platform/graphics/surfaces/glx/GLXSurface.h:
1352         (GLXTransportSurface):
1353         (GLXPBuffer):
1354
1355         GLX related implementation.
1356         * platform/graphics/surfaces/glx/GLXWindowResources.h: Added.
1357         (WebCore):
1358         (SharedGLXResources):
1359         (WebCore::SharedGLXResources::create):
1360         (WebCore::SharedGLXResources::nativeDisplay):
1361         (WebCore::SharedGLXResources::pBufferContextConfig):
1362         (WebCore::SharedGLXResources::surfaceContextConfig):
1363         (WebCore::SharedGLXResources::SharedGLXResources):
1364         (WebCore::SharedGLXResources::createConfig):
1365
1366         Moving X related code to a seperate class.
1367         * platform/graphics/surfaces/glx/X11WindowResources.cpp: Added.
1368         (WebCore):
1369         (WebCore::X11OffScreenWindow::X11OffScreenWindow):
1370         (WebCore::X11OffScreenWindow::~X11OffScreenWindow):
1371         (WebCore::X11OffScreenWindow::setGeometry):
1372         (WebCore::X11OffScreenWindow::createOffscreenWindow):
1373         * platform/graphics/surfaces/glx/X11WindowResources.h: Added.
1374         (WebCore):
1375         (SharedX11Resources):
1376         (WebCore::SharedX11Resources::deref):
1377         (WebCore::SharedX11Resources::x11Display):
1378         (WebCore::SharedX11Resources::getXWindow):
1379         (WebCore::SharedX11Resources::visualInfo):
1380         (WebCore::SharedX11Resources::isXRenderExtensionSupported):
1381         (WebCore::SharedX11Resources::SharedX11Resources):
1382         (WebCore::SharedX11Resources::~SharedX11Resources):
1383         (X11OffScreenWindow):
1384
1385 2012-12-19  Tommy Widenflycht  <tommyw@chromium.org>
1386
1387         [JSC] Add support for overloaded constructors
1388         https://bugs.webkit.org/show_bug.cgi?id=103226
1389
1390         Reviewed by Kentaro Hara.
1391
1392         This patch adds the same support for overloaded constructors to JSC as V8.
1393         As proof of implementation soundness WebSockets custom constructor is removed.
1394
1395         Existing tests cover patch. As they should.
1396
1397         * GNUmakefile.list.am:
1398         * Modules/websockets/WebSocket.idl:
1399         * Target.pri:
1400         * UseJSC.cmake:
1401         * WebCore.vcproj/WebCore.vcproj:
1402         * WebCore.xcodeproj/project.pbxproj:
1403         * bindings/js/JSBindingsAllInOne.cpp:
1404         * bindings/js/JSWebSocketCustom.cpp: Removed.
1405         * bindings/scripts/CodeGeneratorJS.pm:
1406         (GenerateConstructorDeclaration):
1407         (GenerateConstructorDefinitions):
1408         (GenerateOverloadedConstructorDefinition):
1409         (GenerateConstructorDefinition):
1410         (GenerateConstructorHelperMethods):
1411         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1412         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors1):
1413         (WebCore):
1414         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors2):
1415         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors3):
1416         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors4):
1417         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors):
1418         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
1419         (JSTestOverloadedConstructorsConstructor):
1420
1421 2012-12-19  Seokju Kwon  <seokju.kwon@gmail.com>
1422
1423         Pass debuggerTaskMode as a parameter in WorkerScriptDebugServer constructor
1424         https://bugs.webkit.org/show_bug.cgi?id=105085
1425
1426         Reviewed by Yury Semikhatsky.
1427
1428         Leave WorkerDebuggerAgent::debuggerTaskMode
1429         and remove WorkerScriptDebugServer::debuggerTaskMode.
1430
1431         No new tests, no behavior change.
1432
1433         * bindings/js/WorkerScriptDebugServer.cpp:
1434         (WebCore::WorkerScriptDebugServer::WorkerScriptDebugServer):
1435         (WebCore::WorkerScriptDebugServer::runEventLoopWhilePaused):
1436         * bindings/js/WorkerScriptDebugServer.h:
1437         (WorkerScriptDebugServer):
1438         * bindings/v8/WorkerScriptDebugServer.cpp:
1439         (WebCore::WorkerScriptDebugServer::WorkerScriptDebugServer):
1440         (WebCore::WorkerScriptDebugServer::runMessageLoopOnPause):
1441         * bindings/v8/WorkerScriptDebugServer.h:
1442         (WorkerScriptDebugServer):
1443         * inspector/WorkerDebuggerAgent.cpp:
1444         (WebCore::WorkerDebuggerAgent::WorkerDebuggerAgent):
1445
1446 2012-12-19  Ilya Tikhonovsky  <loislo@chromium.org>
1447
1448         Unreviewed, rolling out r138129.
1449         http://trac.webkit.org/changeset/138129
1450         https://bugs.webkit.org/show_bug.cgi?id=105399
1451
1452         reapply patch r138123. The problem was on chromium side at r173875.
1453
1454         * dom/Element.cpp:
1455         (WebCore::Element::insertedInto):
1456         (WebCore::Element::removedFrom):
1457         * dom/Element.h:
1458         (WebCore::Node::insertedInto):
1459         (WebCore):
1460         (WebCore::Node::removedFrom):
1461         * dom/Node.cpp:
1462
1463 2012-12-19  Takashi Sakamoto  <tasak@google.com>
1464
1465         [Shadow] TITLE elements in Shadow DOM should not affect document.title attribute
1466         https://bugs.webkit.org/show_bug.cgi?id=85864
1467
1468         Reviewed by Ryosuke Niwa.
1469
1470         Modified HTMLTitleElement to check whether a title element is in a
1471         shadow tree or not when it is inserted or removed. Now if a title
1472         element has been just removed from or inserted into a shadow tree,
1473         document.title is not updated independent of inDocument().  If the
1474         title element is not in a shadow tree and in document,
1475         document.title is updated.
1476
1477         Test: fast/dom/shadow/title-element-in-shadow.html
1478
1479         * html/HTMLTitleElement.cpp:
1480         (WebCore::HTMLTitleElement::insertedInto):
1481         Added a condition: isInShadowTree() to the code which checks
1482         inDocument or not.
1483         (WebCore::HTMLTitleElement::removedFrom):
1484         Added a condition: insertionPoint.isInShadowTree() to the code which
1485         checks an insertion point is in a document or not.
1486         (WebCore::HTMLTitleElement::childrenChanged):
1487         Added a condition: isInShadowTree() before setTitle.
1488         If not isInShadowTree, modified to removeTitle from document.
1489
1490 2012-12-19  Sheriff Bot  <webkit.review.bot@gmail.com>
1491
1492         Unreviewed, rolling out r138123.
1493         http://trac.webkit.org/changeset/138123
1494         https://bugs.webkit.org/show_bug.cgi?id=105399
1495
1496         It broke compositing/visibility/visibility-simple-video-
1497         layer.html (Requested by loislo on #webkit).
1498
1499         * dom/Element.cpp:
1500         (WebCore::Element::insertedInto):
1501         (WebCore::Element::removedFrom):
1502         * dom/Element.h:
1503         * dom/Node.cpp:
1504         (WebCore::Node::insertedInto):
1505         (WebCore):
1506         (WebCore::Node::removedFrom):
1507
1508 2012-12-18  Shinya Kawanaka  <shinyak@chromium.org>
1509
1510         ShadowRoot.getElementById() returns a deleted element
1511         https://bugs.webkit.org/show_bug.cgi?id=105243
1512
1513         Reviewed by Dimitri Glazkov.
1514
1515         Only when the treeScope of an element and the treeScope of insertionPoint is the same in insertedInto or removedFrom,
1516         we can call updatedId() etc. However, we didn't check it's same.
1517
1518         For removedFrom, since an element has been removed, treeScope() doesn't return the original treeScope but document()
1519         every time.
1520
1521         This patch might hurt html5-full-render a bit: the result is here. The first 2 results are without this patch,
1522         the last 2 results are with this patch.
1523
1524         Dromaeo/dom-modify [runs/s]
1525              35.97,   36.09 -->   36.05,   35.69
1526         Parser/html5-full-render [ms]
1527            4156.58, 4166.09 --> 4155.22, 4216.38
1528
1529         Test: fast/dom/shadow/getelementbyid-shadow.html
1530
1531         * dom/Element.cpp:
1532         (WebCore::Element::insertedInto):
1533         (WebCore::Element::removedFrom):
1534         * dom/Element.h:
1535         (WebCore::Node::insertedInto): Moved from Node.cpp to make this inline.
1536         (WebCore):
1537         (WebCore::Node::removedFrom): ditto.
1538         * dom/Node.cpp:
1539
1540 2012-12-18  Vivek Galatage  <vivek.vg@samsung.com>
1541
1542         Web Inspector: AuditLauncherView UI components should be disabled until ongoing audit finishes
1543         https://bugs.webkit.org/show_bug.cgi?id=105389
1544
1545         Reviewed by Alexander Pavlov.
1546
1547         While the Audit request is on-going, UI components on the AuditLauncherView are disabled
1548         until the request is completed or explicitly stopped. Also changed the _categoriesElement
1549         from div to fieldset and modified the associated CSS file accordingly.
1550
1551         No new tests as this is a UI change.
1552
1553         * inspector/front-end/AuditLauncherView.js:
1554         (WebInspector.AuditLauncherView.prototype._setAuditRunning):
1555         (WebInspector.AuditLauncherView.prototype._toggleUIComponents):
1556         * inspector/front-end/auditsPanel.css:
1557         (.audit-launcher-view fieldset.audit-categories-container):
1558
1559 2012-12-18  KyungTae Kim  <ktf.kim@samsung.com>
1560
1561         [EFL] regression(r138071) Add mission functions for build fix
1562         https://bugs.webkit.org/show_bug.cgi?id=105392
1563
1564         Unreviewed build fix.
1565
1566         r138071 add new functions to LocalizedStrings.cpp, but EFL port doesn't use them.
1567         So, add those functions to LocalizedStringsEfl.cpp 
1568
1569         * platform/efl/LocalizedStringsEfl.cpp:
1570         (WebCore):
1571         (WebCore::textTrackClosedCaptionsText):
1572         (WebCore::textTrackSubtitlesText):
1573         (WebCore::textTrackOffText):
1574         (WebCore::textTrackNoLabelText):
1575
1576 2012-12-18  Eugene Klyuchnikov  <eustas@chromium.org>
1577
1578         Web Inspector: [Chromium] profiler - differentiate between native code (program) and idle time
1579         https://bugs.webkit.org/show_bug.cgi?id=88446
1580
1581         Reviewed by Pavel Feldman.
1582
1583         Now idleTime is supplied in profile object. In this patch, idleTime,
1584         if any, is subtracted from "(program)" node, and new node "(idle)" is
1585         injected as a top level node to profile.
1586
1587         * inspector/front-end/CPUProfileView.js:
1588         (WebInspector.CPUProfileView.profileCallback): Call _injectIdleTimeNode
1589         if non-zero idleTime is specified.
1590         (WebInspector.CPUProfileView.prototype._injectIdleTimeNode): Lookup for
1591         "(program)" node, modify it, add "(idle)" node.
1592
1593 2012-12-18  Sheriff Bot  <webkit.review.bot@gmail.com>
1594
1595         Unreviewed, rolling out r138097.
1596         http://trac.webkit.org/changeset/138097
1597         https://bugs.webkit.org/show_bug.cgi?id=105386
1598
1599         multiple crashes on media tests (Requested by loislo on
1600         #webkit).
1601
1602         * html/HTMLMediaElement.cpp:
1603         (WebCore::HTMLMediaElement::canPlayType):
1604         (WebCore::createFileURLForApplicationCacheResource):
1605         (WebCore::stringForNetworkState):
1606         (WebCore::HTMLMediaElement::preload):
1607         (WebCore::HTMLMediaElement::setLoop):
1608         (WebCore::HTMLMediaElement::getPluginProxyParams):
1609
1610 2012-12-18  Julien Chaffraix  <jchaffraix@webkit.org>
1611
1612         Free one bit in RenderObject
1613         https://bugs.webkit.org/show_bug.cgi?id=105065
1614
1615         Reviewed by Simon Fraser.
1616
1617         This change uses the mutual exclusivity between the different position bits to pack
1618         the information more efficiently. Because you can be only in one position at any point
1619         in time, you only need to store 4 states in RenderObject (ie 2 bits of information) but
1620         we were using 3 bits to store this information, thus losing one bit that I am reclaiming.
1621
1622         The change covers the 3 bits into a single PositionState. In order to avoid any extra branch
1623         on the common code path, the logic was modified to be able to convert a EPosition to a PositionState
1624         using only a bit mask. This also means that we now sets up and clears all the bits at once instead
1625         of several calls, which matches more closely what happens at style change.
1626
1627         Change covered by existing tests.
1628
1629         * rendering/RenderBox.cpp:
1630         (WebCore::RenderBox::updateFromStyle):
1631         Removed a call, superseed by the one in RenderBoxModelObject::updateFromStyle.
1632
1633         * rendering/RenderBoxModelObject.cpp:
1634         (WebCore::RenderBoxModelObject::updateFromStyle):
1635         Changed to set the positioned bits in only one call to setPositionedState.
1636
1637         * rendering/RenderObject.cpp:
1638         (WebCore::RenderObject::styleWillChange):
1639         Changed to clear all positioned bits at once.
1640
1641         * rendering/RenderScrollbarPart.cpp:
1642         (WebCore::RenderScrollbarPart::styleDidChange):
1643         Ditto, which was probably the intent anyway.
1644
1645         * rendering/RenderView.cpp:
1646         (WebCore::RenderView::RenderView):
1647         Changed to explicitly be AbsolutelyPositioned, not that it really matters as we only store
1648         the out-of-flow information.
1649
1650         * rendering/RenderObject.h:
1651         (WebCore::RenderObject::isOutOfFlowPositioned):
1652         (WebCore::RenderObject::isInFlowPositioned):
1653         (WebCore::RenderObject::isRelPositioned):
1654         (WebCore::RenderObject::isStickyPositioned):
1655         (WebCore::RenderObject::isPositioned):
1656         (WebCore::RenderObject::clearPositionedState):
1657         Updated after the renaming below.
1658
1659         (WebCore::RenderObject::setPositionState):
1660         Ditto, but added an ASSERT to ensure that the out-of-flow bit is only set on boxes, to match
1661         existing code.
1662
1663         * rendering/style/RenderStyleConstants.h:
1664         Changed the values so that the conversion to PositionState is a simple bit mask, e.g
1665         FixedPosition & 0x3 == AbsolutePosition as we only store the out-of-flow position information.
1666
1667         (WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields):
1668         Introduced PositionState to hold the different bits.
1669
1670         (WebCore::RenderObject::RenderObjectBitfields::setPositionedState):
1671         (WebCore::RenderObject::RenderObjectBitfields::clearPositionedState):
1672         (WebCore::RenderObject::RenderObjectBitfields::isOutOfFlowPositioned):
1673         (WebCore::RenderObject::RenderObjectBitfields::isRelPositioned):
1674         (WebCore::RenderObject::RenderObjectBitfields::isStickyPositioned):
1675         (WebCore::RenderObject::RenderObjectBitfields::isPositioned):
1676         Re-implemented these getters / setters and renamed them to match our style while at it.
1677
1678
1679 2012-12-18  Anton Vayvod  <avayvod@chromium.org>
1680
1681         Text Autosizing: containers wider than their enclosing clusters should be autosized as separate clusters
1682         https://bugs.webkit.org/show_bug.cgi?id=103627
1683
1684         Reviewed by Julien Chaffraix.
1685
1686         Some blocks of texts might be wider than their parent clusters and need to be autosized separately.
1687
1688         isAutosizingCluster() now checks for the width of the container being greater than the width of the lowest
1689         common ancestor of the text nodes of the enclosing cluster. This block containing all text is passed to all
1690         tree traversal methods.
1691         An overloaded version is added for cases when we don't have the lowest common ancestor yet.
1692
1693         The change fixes several cases covered by existing tests.
1694
1695         * rendering/TextAutosizer.cpp:
1696         (WebCore::TextAutosizer::processSubtree):
1697
1698             Calls processCluster with a new number of arguments.
1699
1700         (WebCore::TextAutosizer::processCluster):
1701
1702             Passes block containing all text nodes into processContainer. Assertion removed since it can no longer be
1703             checked without passing an additional parameter (the parent block containing all text) to the function
1704             for the sake of this assertion only.
1705
1706         (WebCore::TextAutosizer::processContainer):
1707
1708             |parentBlockContainingAllText| parameter passed into isAutosizingCluster.
1709
1710         (WebCore::TextAutosizer::isAutosizingCluster(const RenderBlock*, const RenderBlock*)):
1711
1712             The overloaded method that is used when the render block checked is already known to be an autosizing
1713             container and there's full information necessary to determine if it's a cluster like the parent block
1714             containing all text within the enclosing cluster. 
1715             Considers a block a cluster if it is wider than its parent block containing all text within enclosing
1716             cluster.
1717
1718         (WebCore::TextAutosizer::isAutosizingCluster(const RenderObject*)):
1719
1720             The overloaded method that checks for the given object to be an autosizing container first (for
1721             convenience of the caller) and doesn't require information about the parent cluster. Used when such
1722             information is not available, for example, in the process of retrieving the information for the parent
1723             cluster or when looking for the root cluster in the tree.
1724
1725         (WebCore::TextAutosizer::clusterShouldBeAutosized):
1726
1727             Passes new parameter to measureDescendantTextWidth.
1728
1729         (WebCore::TextAutosizer::measureDescendantTextWidth):
1730
1731             Uses blockContainingAllText parameter to pass to isAutosizingCluster.
1732
1733         (WebCore::TextAutosizer::findDeepestBlockContainingAllText):
1734
1735             Assertion removed since it can no longer be checked without passing an additional parameter (the
1736             parent block containing all text) to the function for the sake of this assertion only.
1737
1738         (WebCore::TextAutosizer::findFirstTextLeafNotInCluster):
1739             Uses shorter isAutosizingCluster call.
1740
1741 2012-12-18  Alexey Proskuryakov  <ap@apple.com>
1742
1743         Remove unnecessary functions from CookiesStrategy
1744         https://bugs.webkit.org/show_bug.cgi?id=105369
1745
1746         Reviewed by Brady Eidson.
1747
1748         Remove CookieJar functions that are only ever called from WebKit.
1749
1750         * WebCore.exp.in:
1751         * loader/CookieJar.cpp:
1752         * loader/CookieJar.h:
1753         * platform/CookiesStrategy.h:
1754
1755 2012-12-18  ChangSeok Oh  <shivamidow@gmail.com>
1756
1757         [GTK][AC] Assertion failed while destroying GraphicsLayer
1758         https://bugs.webkit.org/show_bug.cgi?id=105312
1759
1760         Reviewed by Gustavo Noronha Silva.
1761
1762         According to the comment in GraphicsLayer::~GraphicsLayer(), we should call
1763         willBeDestroyed() before destructor of GraphicsLayer.
1764
1765         No new tests since this patch can be covered by already existing gtk ac tests.
1766
1767         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
1768         (WebCore::GraphicsLayerClutter::~GraphicsLayerClutter): call willBeDestroyed()
1769
1770 2012-12-18  Joseph Pecoraro  <pecoraro@apple.com>
1771
1772         Minor improvements to HTMLMediaElement
1773         https://bugs.webkit.org/show_bug.cgi?id=105353
1774
1775         Reviewed by Eric Carlson.
1776
1777         * html/HTMLMediaElement.cpp:
1778         (WebCore::HTMLMediaElement::canPlayType):
1779         (WebCore::createFileURLForApplicationCacheResource):
1780         (WebCore::stringForNetworkState):
1781         (WebCore::HTMLMediaElement::preload):
1782         (WebCore::HTMLMediaElement::getPluginProxyParams):
1783         Use ASCIILiteral for literal strings becoming WTFStrings.
1784
1785         (WebCore::HTMLMediaElement::setLoop):
1786         By going through setAttribute, parseAttribute would already take care of
1787         updating the disable sleep, so the call here is not needed.
1788
1789 2012-12-18  Levi Weintraub  <leviw@chromium.org>
1790
1791         Input elements with default touch handlers don't update handler counts when changing documents
1792         https://bugs.webkit.org/show_bug.cgi?id=105334
1793
1794         Reviewed by James Robinson.
1795
1796         When an Input element with default touch event handlers changes documents, it failed to
1797         update the touch event handler sets in both the old and new document. This patch fixes this
1798         case.
1799
1800         Test: fast/events/touch/touch-input-element-change-documents.html
1801
1802         * dom/Document.h:
1803         (WebCore::Document::didRemoveTouchEventTargetNode) This function makes sense when touch
1804         handling is enabled, regardless of whether we're tracking the rects.
1805         * dom/Document.cpp:
1806         * html/HTMLInputElement.cpp:
1807         (WebCore::HTMLInputElement::~HTMLInputElement): Switch from didRemoveTouchEventHandler to
1808         didRemoveTouchEventTargetNode, since we don't care about counts in the destructor.
1809         (WebCore::HTMLInputElement::updateType): Fixing incorrect indentation.
1810         (WebCore::HTMLInputElement::didMoveToNewDocument): Adding the node to the new document and
1811         removing it from the old.
1812
1813 2012-12-18  Mark Lam  <mark.lam@apple.com>
1814
1815         Fixed bad merge in "Initial refactoring of database functionality into the manager and server".
1816         https://bugs.webkit.org/show_bug.cgi?id=104748.
1817
1818         Not reviewed.
1819
1820         No new tests.
1821
1822         * Modules/webdatabase/DBBackendServer.cpp:
1823
1824 2012-12-18  Mark Lam  <mark.lam@apple.com>
1825
1826         Initial refactoring of database functionality into the manager and server.
1827         https://bugs.webkit.org/show_bug.cgi?id=104748.
1828
1829         Reviewed by Brady Eidson.
1830
1831         This is not a complete refactor, but a stepping stone on the way to isolating
1832         script side database activity from the SQL backend.
1833
1834         No new tests.
1835
1836         * CMakeLists.txt:
1837         * GNUmakefile.list.am:
1838         * Modules/webdatabase/AbstractDatabase.cpp:
1839         (WebCore):
1840         (WebCore::updateGuidVersionMap):
1841         (WebCore::guidForOriginAndName):
1842         (WebCore::AbstractDatabase::AbstractDatabase):
1843         (WebCore::AbstractDatabase::maximumSize):
1844         * Modules/webdatabase/AbstractDatabase.h:
1845         (AbstractDatabase):
1846         - Moved isAvailable() and setIsAvailable() to the DatabaseManager.
1847         * Modules/webdatabase/AbstractDatabaseServer.h:
1848         (AbstractDatabaseServer):
1849         * Modules/webdatabase/DBBackendServer.cpp: Added.
1850         (WebCore::DBBackend::Server::initialize):
1851         (WebCore::DBBackend::Server::setClient):
1852         (WebCore::DBBackend::Server::databaseDirectoryPath):
1853         (WebCore::DBBackend::Server::setDatabaseDirectoryPath):
1854         (WebCore::DBBackend::Server::fullPathForDatabase):
1855         (WebCore::DBBackend::Server::hasEntryForOrigin):
1856         (WebCore::DBBackend::Server::origins):
1857         (WebCore::DBBackend::Server::databaseNamesForOrigin):
1858         (WebCore::DBBackend::Server::detailsForNameAndOrigin):
1859         (WebCore::DBBackend::Server::usageForOrigin):
1860         (WebCore::DBBackend::Server::quotaForOrigin):
1861         (WebCore::DBBackend::Server::setQuota):
1862         (WebCore::DBBackend::Server::deleteAllDatabases):
1863         (WebCore::DBBackend::Server::deleteOrigin):
1864         (WebCore::DBBackend::Server::deleteDatabase):
1865         (WebCore::DBBackend::Server::scheduleNotifyDatabaseChanged):
1866         (WebCore::DBBackend::Server::databaseChanged):
1867         (WebCore::DBBackend::Server::closeDatabasesImmediately):
1868         (WebCore::DBBackend::Server::interruptAllDatabasesForContext):
1869         (WebCore::DBBackend::Server::canEstablishDatabase):
1870         (WebCore::DBBackend::Server::addOpenDatabase):
1871         (WebCore::DBBackend::Server::removeOpenDatabase):
1872         (WebCore::DBBackend::Server::setDatabaseDetails):
1873         (WebCore::DBBackend::Server::getMaxSizeForDatabase):
1874         - Refactored all calls to the DatabaseTracker to go thru the DBBackend::Server.
1875         * Modules/webdatabase/DBBackendServer.h:
1876         * Modules/webdatabase/DOMWindowWebDatabase.cpp:
1877         (WebCore::DOMWindowWebDatabase::openDatabase):
1878         * Modules/webdatabase/Database.cpp:
1879         (WebCore::Database::close):
1880         (WebCore::Database::maximumSize):
1881         * Modules/webdatabase/Database.h:
1882         (Database):
1883         - Moved the openDatabase() factory method to the DatabaseManager.
1884         - Removed the unused deliverPendingCallback() prototype.
1885         * Modules/webdatabase/DatabaseBasicTypes.h: Added.
1886         - A place to define some common basic types used by the database module.
1887         * Modules/webdatabase/DatabaseContext.cpp:
1888         (WebCore::DatabaseContext::databaseExceededQuota):
1889         * Modules/webdatabase/DatabaseManager.cpp:
1890         (WebCore::DatabaseManager::DatabaseManager):
1891         (WebCore::DatabaseManager::initialize):
1892         (WebCore::DatabaseManager::setClient):
1893         (WebCore::DatabaseManager::databaseDirectoryPath):
1894         (WebCore::DatabaseManager::setDatabaseDirectoryPath):
1895         (WebCore::DatabaseManager::isAvailable):
1896         (WebCore::DatabaseManager::setIsAvailable):
1897         (DatabaseCreationCallbackTask):
1898         (WebCore::DatabaseCreationCallbackTask::create):
1899         (WebCore::DatabaseCreationCallbackTask::performTask):
1900         (WebCore::DatabaseCreationCallbackTask::DatabaseCreationCallbackTask):
1901         (WebCore::DatabaseManager::openDatabase):
1902         (WebCore::DatabaseManager::openDatabaseSync):
1903         (WebCore::DatabaseManager::setHasOpenDatabases):
1904         (WebCore::DatabaseManager::fullPathForDatabase):
1905         (WebCore::DatabaseManager::hasEntryForOrigin):
1906         (WebCore::DatabaseManager::origins):
1907         (WebCore::DatabaseManager::databaseNamesForOrigin):
1908         (WebCore::DatabaseManager::detailsForNameAndOrigin):
1909         (WebCore::DatabaseManager::usageForOrigin):
1910         (WebCore::DatabaseManager::quotaForOrigin):
1911         (WebCore::DatabaseManager::setQuota):
1912         (WebCore::DatabaseManager::deleteAllDatabases):
1913         (WebCore::DatabaseManager::deleteOrigin):
1914         (WebCore::DatabaseManager::deleteDatabase):
1915         (WebCore::DatabaseManager::scheduleNotifyDatabaseChanged):
1916         (WebCore::DatabaseManager::databaseChanged):
1917         (WebCore::DatabaseManager::closeDatabasesImmediately):
1918         (WebCore::DatabaseManager::interruptAllDatabasesForContext):
1919         (WebCore::DatabaseManager::canEstablishDatabase):
1920         (WebCore::DatabaseManager::addOpenDatabase):
1921         (WebCore::DatabaseManager::removeOpenDatabase):
1922         (WebCore::DatabaseManager::setDatabaseDetails):
1923         (WebCore::DatabaseManager::getMaxSizeForDatabase):
1924         * Modules/webdatabase/DatabaseManager.h:
1925         (DatabaseManager):
1926         * Modules/webdatabase/DatabaseSync.cpp:
1927         (WebCore::DatabaseSync::~DatabaseSync):
1928         (WebCore::DatabaseSync::closeImmediately):
1929         * Modules/webdatabase/DatabaseSync.h:
1930         (DatabaseSync):
1931         - Moved the openDatabaseSync() factory method to the DatabaseManager.
1932         * Modules/webdatabase/DatabaseTask.h:
1933         * Modules/webdatabase/SQLResultSet.h:
1934         * Modules/webdatabase/SQLStatementSync.h:
1935         * Modules/webdatabase/SQLTransaction.h:
1936         * Modules/webdatabase/SQLTransactionClient.cpp:
1937         (WebCore::SQLTransactionClient::didCommitWriteTransaction):
1938         (WebCore::SQLTransactionClient::didExecuteStatement):
1939         (WebCore::SQLTransactionClient::didExceedQuota):
1940         * Modules/webdatabase/SQLTransactionSync.h:
1941         * Modules/webdatabase/WorkerContextWebDatabase.cpp:
1942         (WebCore::WorkerContextWebDatabase::openDatabase):
1943         (WebCore::WorkerContextWebDatabase::openDatabaseSync):
1944         * Target.pri:
1945         * WebCore.gypi:
1946         * WebCore.vcproj/WebCore.vcproj:
1947         * WebCore.xcodeproj/project.pbxproj:
1948
1949 2012-12-18  Per-Erik Brodin  <per-erik.brodin@ericsson.com>
1950
1951         EventSource should support CORS
1952         https://bugs.webkit.org/show_bug.cgi?id=61862
1953
1954         Reviewed by Alexey Proskuryakov.
1955
1956         Enabled CORS in EventSource with optional constructor argument to
1957         indicate whether credentials should be included or not, as per the spec.
1958         Added didFailAccessControlCheck to ThreadableLoaderClient to be able to
1959         properly distinguish CORS failures from other errors.
1960
1961         Tests: http/tests/eventsource/eventsource-cors-basic.html
1962                http/tests/eventsource/eventsource-cors-no-server.html
1963                http/tests/eventsource/eventsource-cors-with-credentials.html
1964
1965         * loader/DocumentThreadableLoader.cpp:
1966         (WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest):
1967         (WebCore::DocumentThreadableLoader::didReceiveResponse):
1968         (WebCore::DocumentThreadableLoader::preflightFailure):
1969         * loader/ThreadableLoaderClient.h:
1970         (WebCore::ThreadableLoaderClient::didFailAccessControlCheck):
1971         * loader/ThreadableLoaderClientWrapper.h:
1972         (WebCore::ThreadableLoaderClientWrapper::didFailAccessControlCheck):
1973         (ThreadableLoaderClientWrapper):
1974         * loader/WorkerThreadableLoader.cpp:
1975         (WebCore::workerContextDidFailAccessControlCheck):
1976         (WebCore):
1977         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFailAccessControlCheck):
1978         * loader/WorkerThreadableLoader.h:
1979         (MainThreadBridge):
1980         * page/EventSource.cpp:
1981         (WebCore::EventSource::EventSource):
1982         (WebCore::EventSource::create):
1983         (WebCore::EventSource::connect):
1984         (WebCore::EventSource::withCredentials):
1985         (WebCore):
1986         (WebCore::EventSource::didReceiveResponse):
1987         (WebCore::EventSource::didFailAccessControlCheck):
1988         (WebCore::EventSource::didFailRedirectCheck):
1989         (WebCore::EventSource::abortConnectionAttempt):
1990         (WebCore::EventSource::parseEventStreamLine):
1991         (WebCore::EventSource::createMessageEvent):
1992         * page/EventSource.h:
1993         (WebCore):
1994         (EventSource):
1995         (WebCore::EventSource::refEventTarget):
1996         (WebCore::EventSource::derefEventTarget):
1997         * page/EventSource.idl:
1998
1999 2012-12-18  Michael Pruett  <michael@68k.org>
2000
2001         IndexedDB: Implement custom bindings for parsing options
2002         https://bugs.webkit.org/show_bug.cgi?id=96614
2003
2004         Reviewed by Darin Adler.
2005
2006         Parsing the options dictionary in IDBDatabase.createObjectStore()
2007         and IDBObjectStore.createIndex() requires custom bindings in JSC.
2008
2009         Tests: storage/indexeddb/*
2010
2011         * GNUmakefile.list.am:
2012         * Modules/indexeddb/IDBDatabase.cpp:
2013         (WebCore::IDBDatabase::createObjectStore):
2014         (WebCore):
2015         * Modules/indexeddb/IDBDatabase.h:
2016         (IDBDatabase):
2017         * Modules/indexeddb/IDBDatabase.idl:
2018         * Modules/indexeddb/IDBObjectStore.cpp:
2019         (WebCore::IDBObjectStore::createIndex):
2020         (WebCore):
2021         * Modules/indexeddb/IDBObjectStore.h:
2022         (IDBObjectStore):
2023         * Modules/indexeddb/IDBObjectStore.idl:
2024         * UseJSC.cmake:
2025         * bindings/js/IDBBindingUtilities.cpp:
2026         (WebCore::idbKeyPathFromValue): Added utility function for converting a JSValue to an IDBKeyPath.
2027         (WebCore):
2028         * bindings/js/IDBBindingUtilities.h:
2029         (WebCore):
2030         * bindings/js/JSIDBDatabaseCustom.cpp: Added.
2031         (WebCore):
2032         (WebCore::JSIDBDatabase::createObjectStore):
2033         * bindings/js/JSIDBObjectStoreCustom.cpp: Added.
2034         (WebCore):
2035         (WebCore::JSIDBObjectStore::createIndex):
2036
2037 2012-12-18  Yuki Sekiguchi  <yuki.sekiguchi@access-company.com>
2038
2039         Cannot click an element at 2nd line or more inside inline-block in vertical writing mode.
2040         https://bugs.webkit.org/show_bug.cgi?id=104775
2041
2042         Reviewed by Dean Jackson.
2043
2044         If the parent of an inline box changes writing mode, then the inline box must flip incoming hit point coordinates.
2045         Otherwise, the coordinate will be misunderstood because the box has a different origin from its parent.
2046         If the InlineBox doesn't flip its offset, its children will use the wrong offset
2047         because they don't know their grandparent changed writing modes.
2048         InlineBox::nodeAtPoint should flip accumulatedOffset like InlineBox::paint().
2049
2050         Test: fast/writing-mode/vertical-inline-block-hittest.html
2051
2052         * rendering/InlineBox.cpp:
2053         (WebCore::InlineBox::nodeAtPoint):
2054
2055 2012-12-18  Simon Fraser  <simon.fraser@apple.com>
2056
2057         Allow position:sticky elements to be moved by the scrolling thread
2058         https://bugs.webkit.org/show_bug.cgi?id=105245
2059
2060         Reviewed by Beth Dakin.
2061
2062         Allow sticky position elements to be repositioned on the scrolling thread.
2063         
2064         RenderLayerCompositor::requiresCompositingForPosition() is changed to make
2065         all position:-webkit-sticky elements composited.
2066         
2067         Sticky position constraints are already communicated to the ScrollingCoordinator,
2068         but now we created ScrollingStateStickyNodes for them, and send the constraints
2069         over to the scrolling thread for new ScrollingTreeStickyNodes. That allows
2070         their layers to be repositioned on the scrolling thread.
2071
2072         Tests: platform/mac/tiled-drawing/sticky/sticky-horizontal.html
2073                platform/mac/tiled-drawing/sticky/sticky-vertical.html
2074
2075         * WebCore.xcodeproj/project.pbxproj: Add new files.
2076         * page/scrolling/ScrollingConstraints.h:
2077         (WebCore::StickyPositionViewportConstraints::absoluteContainingBlockRect): New accessors.
2078         (WebCore::StickyPositionViewportConstraints::absoluteStickyBoxRect):
2079         (WebCore::StickyPositionViewportConstraints::operator==):
2080         (WebCore::StickyPositionViewportConstraints::operator!=):
2081         * page/scrolling/ScrollingCoordinator.h: Added StickyNode type.
2082         * page/scrolling/ScrollingStateFixedNode.cpp:
2083         (WebCore::ScrollingStateFixedNode::syncLayerPositionForViewportRect):
2084         New virtual method that allows different kinds of nodes to sync layer positions.
2085         * page/scrolling/ScrollingStateFixedNode.h:
2086         * page/scrolling/ScrollingStateNode.h:
2087         (WebCore::ScrollingStateNode::isStickyNode):
2088         (WebCore::ScrollingStateNode::syncLayerPositionForViewportRect):
2089         * page/scrolling/ScrollingStateStickyNode.cpp: Added.
2090         (WebCore::ScrollingStateStickyNode::create):
2091         (WebCore::ScrollingStateStickyNode::ScrollingStateStickyNode):
2092         (WebCore::ScrollingStateStickyNode::~ScrollingStateStickyNode):
2093         (WebCore::ScrollingStateStickyNode::clone):
2094         (WebCore::ScrollingStateStickyNode::updateConstraints):
2095         (WebCore::ScrollingStateStickyNode::syncLayerPositionForViewportRect):
2096         (WebCore::ScrollingStateStickyNode::dumpProperties):
2097         * page/scrolling/ScrollingStateStickyNode.h: Copied from Source/WebCore/page/scrolling/ScrollingStateFixedNode.h.
2098         (ScrollingStateStickyNode):
2099         (WebCore::ScrollingStateStickyNode::viewportConstraints):
2100         (WebCore::toScrollingStateStickyNode):
2101         * page/scrolling/ScrollingTree.cpp:
2102         (WebCore::ScrollingTree::updateTreeFromStateNode):
2103         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
2104         (WebCore::ScrollingCoordinatorMac::attachToStateTree): Handle sticky nodes.
2105         (WebCore::ScrollingCoordinatorMac::syncChildPositions): Generalize to different kinds of nodes by
2106         calling a virtual method on the node.
2107         (WebCore::ScrollingCoordinatorMac::updateViewportConstrainedNode):
2108         * page/scrolling/mac/ScrollingTreeFixedNode.mm:
2109         (WebCore::ScrollingTreeFixedNode::ScrollingTreeFixedNode):
2110         * page/scrolling/mac/ScrollingTreeStickyNode.h: Added.
2111         (ScrollingTreeStickyNode):
2112         * page/scrolling/mac/ScrollingTreeStickyNode.mm: Copied from Source/WebCore/page/scrolling/mac/ScrollingTreeFixedNode.mm.
2113         (WebCore::ScrollingTreeStickyNode::create):
2114         (WebCore::ScrollingTreeStickyNode::ScrollingTreeStickyNode):
2115         (WebCore::ScrollingTreeStickyNode::~ScrollingTreeStickyNode):
2116         (WebCore::ScrollingTreeStickyNode::update):
2117         (WebCore::operator*):
2118         (WebCore::ScrollingTreeStickyNode::parentScrollPositionDidChange):
2119         * rendering/RenderLayerBacking.cpp:
2120         (WebCore::RenderLayerBacking::attachToScrollingCoordinator):
2121         * rendering/RenderLayerCompositor.cpp:
2122         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
2123         (WebCore::RenderLayerCompositor::computeFixedViewportConstraints):
2124         (WebCore::RenderLayerCompositor::computeStickyViewportConstraints):
2125         (WebCore::RenderLayerCompositor::registerOrUpdateViewportConstrainedLayer):
2126         * rendering/RenderLayerCompositor.h:
2127         (RenderLayerCompositor):
2128
2129 2012-12-18  David Grogan  <dgrogan@chromium.org>
2130
2131         IndexedDB: Split BackingStore histogram
2132         https://bugs.webkit.org/show_bug.cgi?id=105222
2133
2134         Reviewed by Tony Chang.
2135
2136         Add separate histograms for Consistency, Write, and Read errors.
2137         Recategorize some read errors as consistency errors.
2138
2139         Tested the preprocessor logic by manually making some functions fail
2140         and printing the histogram string from chromium code.
2141
2142         Next up is logging successes to get an idea of which functions have
2143         the highest failure _rate_.
2144
2145         * Modules/indexeddb/IDBBackingStore.cpp:
2146         (WebCore::recordInternalError):
2147         (WebCore):
2148         (WebCore::setUpMetadata):
2149         (WebCore::IDBBackingStore::getIDBDatabaseMetaData):
2150         (WebCore::getNewDatabaseId):
2151         (WebCore::IDBBackingStore::createIDBDatabaseMetaData):
2152         (WebCore::IDBBackingStore::getObjectStores):
2153         (WebCore::setMaxObjectStoreId):
2154         (WebCore::IDBBackingStore::deleteObjectStore):
2155         (WebCore::IDBBackingStore::getRecord):
2156         (WebCore::getNewVersionNumber):
2157         (WebCore::IDBBackingStore::getKeyGeneratorCurrentNumber):
2158         (WebCore::IDBBackingStore::keyExistsInObjectStore):
2159         (WebCore::IDBBackingStore::getIndexes):
2160         (WebCore::setMaxIndexId):
2161         (WebCore::versionExists):
2162         (WebCore::IDBBackingStore::findKeyInIndex):
2163         (WebCore::IDBBackingStore::getPrimaryKeyViaIndex):
2164         (WebCore::IDBBackingStore::keyExistsInIndex):
2165         (WebCore::ObjectStoreKeyCursorImpl::loadCurrentRow):
2166         (WebCore::ObjectStoreCursorImpl::loadCurrentRow):
2167         (WebCore::IndexKeyCursorImpl::loadCurrentRow):
2168         (WebCore::IndexCursorImpl::loadCurrentRow):
2169
2170 2012-12-18  Dean Jackson  <dino@apple.com>
2171
2172         Track menu needs localization
2173         https://bugs.webkit.org/show_bug.cgi?id=105233
2174
2175         Reviewed by Eric Carlson.
2176
2177         Allow the UI strings in the closed captions menu to be localized, and
2178         profile strings for the English locale.
2179
2180         Test: media/video-controls-captions-trackmenu-localized.html
2181
2182         * English.lproj/Localizable.strings: Adds the four new captions strings.
2183         * html/shadow/MediaControlElements.cpp:
2184         (WebCore::MediaControlClosedCaptionsTrackListElement::rebuildTrackListMenu): Use localized getters.
2185         * platform/LocalizedStrings.cpp:
2186         (WebCore::textTrackClosedCaptionsText): New localized string getter.
2187         (WebCore::textTrackSubtitlesText): Ditto.
2188         (WebCore::textTrackOffText): Ditto.
2189         (WebCore::textTrackNoLabelText): Ditto.
2190         * platform/LocalizedStrings.h:
2191
2192 2012-12-18  Beth Dakin  <bdakin@apple.com>
2193
2194         https://bugs.webkit.org/show_bug.cgi?id=102579
2195         [mac] Enable scaled cursors
2196
2197         Reviewed by Dean Jackson.
2198
2199         Not much is required to get this turned on. We just need the feature to be 
2200         defined, and we need to initialize m_imageScaleFactor in the Cursor constructors.
2201
2202         * Configurations/FeatureDefines.xcconfig:
2203         * platform/mac/CursorMac.mm:
2204         (WebCore::Cursor::Cursor):
2205         (WebCore::Cursor::operator=):
2206
2207 2012-12-18  Joseph Pecoraro  <pecoraro@apple.com>
2208
2209         [Mac] Add Build Phase to Check Headers for Inappropriate Macros (Platform.h macros)
2210         https://bugs.webkit.org/show_bug.cgi?id=104279
2211
2212         Reviewed by David Kilzer.
2213
2214         Set the executable as an input path on the check-* build phases.
2215         
2216         * WebCore.xcodeproj/project.pbxproj:
2217
2218 2012-12-18  Adam Klein  <adamk@chromium.org>
2219
2220         [HTMLTemplateElement] Prevent first-level recursive <template> from resetting the implied context
2221         https://bugs.webkit.org/show_bug.cgi?id=104142
2222
2223         Reviewed by Eric Seidel.
2224
2225         This patch adds a stack of InsertionModes retains the chosen
2226         "implied context" for each template element.
2227
2228         Based on a patch by Rafael Weinstein.
2229
2230         Tests added to html5lib/run-template.html
2231
2232         * html/parser/HTMLTreeBuilder.cpp:
2233         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder): Initialize the stack appropriately for HTMLTemplateElement.innerHTML.
2234         (WebCore::HTMLTreeBuilder::processTemplateStartTag):
2235         (WebCore::HTMLTreeBuilder::processTemplateEndTag):
2236         (WebCore::HTMLTreeBuilder::processStartTag): Once we've figured out the insertion mode for a given <template> store it in the stack.
2237         (WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately):
2238         (WebCore::HTMLTreeBuilder::processEndTag):
2239         (WebCore::HTMLTreeBuilder::processEndOfFile): Clear the stack if we hit end of file to allow the assertion in finish().
2240         (WebCore::HTMLTreeBuilder::finished):
2241         * html/parser/HTMLTreeBuilder.h:
2242         (HTMLTreeBuilder):
2243
2244 2012-12-18  Andrew Lo  <anlo@rim.com>
2245
2246         [BlackBerry] Use midpoint for fixed position heuristic
2247         https://bugs.webkit.org/show_bug.cgi?id=105329
2248
2249         Reviewed by Rob Buis.
2250         Internally reviewed by Joe Mason.
2251
2252         Use the midpoint of the layer when determining whether the
2253         fixed-position layer is on the top or bottom half of the screen
2254         rather than the top of the layer.
2255         Internal PR 237073.
2256
2257         No new tests are needed.
2258
2259         * platform/graphics/blackberry/LayerRenderer.cpp:
2260         (WebCore::LayerRenderer::updateLayersRecursive):
2261
2262 2012-12-18  Andrew Lo  <anlo@rim.com>
2263
2264         [BlackBerry] Fixed position elements should be fixed position on x axis
2265         https://bugs.webkit.org/show_bug.cgi?id=105333
2266
2267         Reviewed by Rob Buis.
2268         Internally reviewed by Joe Mason.
2269
2270         Have fixed position elements be fixed on the X axis as well as Y.
2271         This better aligns with what other ports are doing.
2272         Internal PR237073.
2273
2274         No new tests are needed.
2275
2276         * platform/graphics/blackberry/LayerRenderer.cpp:
2277         (WebCore::LayerRenderer::updateLayersRecursive):
2278
2279 2012-12-18  James Simonsen  <simonjam@chromium.org>
2280
2281         [Resource Timing] Populate responseEnd on cross-origin requests
2282         https://bugs.webkit.org/show_bug.cgi?id=105231
2283
2284         Reviewed by Tony Gentilcore.
2285
2286         No new tests. Covered by existing cross-origin test, but masked by iframe bug.
2287
2288         * page/PerformanceResourceTiming.cpp:
2289         (WebCore::PerformanceResourceTiming::responseEnd):
2290
2291 2012-12-18  Tim Horton  <timothy_horton@apple.com>
2292
2293         Unreviewed build fix after http://trac.webkit.org/changeset/138041
2294
2295         Need to cast int64_t to int32_t to avoid a warning on some compilers.
2296
2297         * platform/LayoutUnit.h:
2298         (WebCore::boundedMultiply):
2299
2300 2012-12-18  Hans Muller  <hmuller@adobe.com>
2301
2302         [CSS Exclusions] shape-inside layout fails to adjust first line correctly for writing-mode: vertical-rl
2303         https://bugs.webkit.org/show_bug.cgi?id=104419
2304
2305         Reviewed by Dirk Schulze.
2306
2307         ExclusionShapes no longer maintain a private "internal" coordinate system,
2308         they're now defined in logical coordinates. The createExclusionShape() method
2309         now handles the one-time conversion from physical to logical coordinates.
2310
2311         Test: fast/exclusions/shape-inside/shape-inside-rounded-rectangle-fit-003.html
2312
2313         * rendering/ExclusionPolygon.cpp:
2314         (WebCore::ExclusionPolygon::getExcludedIntervals): Removed logical to internal coordinate conversions.
2315         (WebCore::ExclusionPolygon::getIncludedIntervals): Ditto.
2316         (WebCore::ExclusionPolygon::firstIncludedIntervalLogicalTop): Ditto.
2317         * rendering/ExclusionPolygon.h:
2318         * rendering/ExclusionRectangle.cpp:
2319         (WebCore::ExclusionRectangle::getExcludedIntervals): Removed logical to internal coordinate conversions.
2320         (WebCore::ExclusionRectangle::getIncludedIntervals): Ditto.
2321         (WebCore::ExclusionRectangle::firstIncludedIntervalLogicalTop): Ditto.
2322         * rendering/ExclusionRectangle.h:
2323         * rendering/ExclusionShape.cpp:
2324         (WebCore::physicalRectToLogical): Convert a FloatRect defined with coordinates to logical coordinates.
2325         (WebCore::physicalPointToLogical): Similar.
2326         (WebCore::physicalSizeToLogical): Simlar.
2327         (WebCore::ExclusionShape::createExclusionShape): Convert shapes from physical to logical coordinates.
2328         * rendering/ExclusionShape.h:
2329         (ExclusionShape): Removed internal to logical coordinate conversion utility methods.
2330
2331 2012-12-17  Emil A Eklund  <eae@chromium.org>
2332
2333         Optimize LayoutUnit::boundedMultiply
2334         https://bugs.webkit.org/show_bug.cgi?id=105216
2335
2336         Reviewed by Levi Weintraub.
2337
2338         LayoutUnit::boundedMultiply is used for multiplication that's
2339         prone to overflow and for all LayoutUnit multiplication if
2340         SATURATED_LAYOUT_ARITHMETIC is enabled. The current approach is
2341         quite inefficient.
2342
2343         Change it to use a more efficient saturated multiplication
2344         implementation. As the implementation needs to use
2345         kFixedPointDenominator it is implemented in LayoutUnit.h instead
2346         of in wtf/SaturatedArithmetic.h.
2347
2348         Test: Covered by TestWebKitAPI/Tests/WebCore/LayoutUnit.cpp
2349
2350         * platform/LayoutUnit.h:
2351         (WebCore::boundedMultiply):
2352
2353 2012-12-18  Bear Travis  <betravis@adobe.com>
2354
2355         [CSS Exclusions] Blocks should not re-use their parent's ExclusionShapeInsideInfo
2356         if they participate in inline layout
2357         https://bugs.webkit.org/show_bug.cgi?id=104582
2358
2359         Reviewed by Julien Chaffraix.
2360
2361         Blocks that participate in inline layout should not re-use a parent's
2362         ExclusionShapeInsideInfo, as the parent and child would both use the info for
2363         layout at the same time. This patch alters LayoutState to not include
2364         ExclusionShapeInsideInfo if the current block participates in inline layout (ie,
2365         it is a float, inline-block, or inline-table).
2366
2367         Test: fast/exclusions/shape-inside/shape-inside-recursive-layout.html
2368
2369         * rendering/ExclusionShapeInsideInfo.h:
2370         (WebCore::ExclusionShapeInsideInfo::ownerBlock): Return the block associated with
2371         the shape-inside style.
2372         * rendering/LayoutState.cpp:
2373         (WebCore::LayoutState::LayoutState): Do not re-use ExclusionShapeInsideInfo
2374         on a block that participates in inline layout (floats and inline blocks).
2375         * rendering/RenderBlock.h:
2376         (WebCore::RenderBlock::allowsExclusionShapeInsideInfoSharing): Returns whether the
2377         block can re-use an ExclusionShapeInsideInfo from its parent block.
2378         * rendering/RenderBlockLineLayout.cpp:
2379         (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Adding an assert to make sure
2380         we do not overwrite ExclusionShapeInsideInfo's state during a recursive layout.
2381         * rendering/RenderView.h:
2382         (WebCore::RenderView::pushLayoutState): Push a new LayoutState in the case that
2383         ExclusionShapeInsideInfo exists but should not be propagated.
2384
2385 2012-12-18  Tony Chang  <tony@chromium.org>
2386
2387         REGRESSION(r136324): flex items with percent heights not resizing
2388         https://bugs.webkit.org/show_bug.cgi?id=105213
2389
2390         Reviewed by Ojan Vafai.
2391
2392         We were missing some of the logic for when to relayout a flex child. Refactor
2393         the code in RenderBlock::layoutBlockChildren so we can use it in RenderFlexibleBox.
2394
2395         Test: css3/flexbox/flexitem-percent-height-change.html
2396
2397         * rendering/RenderBlock.cpp:
2398         (WebCore::RenderBlock::updateNeedsLayoutAndPreferredLogicalWidthsDirtyBeforeBlockChildLayout):
2399         Pull out logic needed by RenderFlexibleBox.
2400         (WebCore::RenderBlock::layoutBlockChildren): Use helper method.
2401         * rendering/RenderBlock.h:
2402         (RenderBlock): Add updateNeedsLayoutAndPreferredLogicalWidthsDirtyBeforeBlockChildLayout.
2403         * rendering/RenderFlexibleBox.cpp:
2404         (WebCore::RenderFlexibleBox::layoutBlock): Pass through relayoutChildren bool.
2405         (WebCore::RenderFlexibleBox::layoutFlexItems): Pass through relayoutChildren and mark the child as needing
2406         layout if it has a percent height.
2407         (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes): We need to always layout here since we're
2408         trying to get the preferred size.
2409         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
2410         * rendering/RenderFlexibleBox.h:
2411
2412 2012-12-17  Simon Fraser  <simon.fraser@apple.com>
2413
2414         Fix position:-webkit-sticky behavior when zoomed
2415         https://bugs.webkit.org/show_bug.cgi?id=105251
2416
2417         Reviewed by Dean Jackson.
2418
2419         Position sticky elements were misplaced when stickily-constrained, under zooming.
2420         The cause was that some of the functions used to compute sticky position
2421         took page scale into account, and some did not.
2422         
2423         Fix by using localToContainerQuad(..., view()) to compute RenderView-relative
2424         quads, which avoids page scale, so all the constraints math is done ignoring
2425         page scale. This also requires that we compute a scale-free viewport rect
2426         in stickyPositionOffset().
2427
2428         Test: fast/css/sticky/sticky-top-zoomed.html
2429
2430         * rendering/RenderBoxModelObject.cpp:
2431         (WebCore::RenderBoxModelObject::computeStickyPositionConstraints):
2432         (WebCore::RenderBoxModelObject::stickyPositionOffset):
2433
2434 2012-12-18  Eugene Klyuchnikov  <eustas@chromium.org>
2435
2436         Web Inspector: DataGrid cell values are "clipped" in editing mode.
2437         https://bugs.webkit.org/show_bug.cgi?id=105277
2438
2439         Reviewed by Pavel Feldman.
2440
2441         UIUtils expects that "text-overflow" is not "ellipsis".
2442
2443         * inspector/front-end/dataGrid.css:
2444         (.data-grid td.editing > div): Override text-overflow for editing mode.
2445
2446 2012-12-18  Ken Kania  <kkania@chromium.org>
2447
2448         [Inspector] Add frameId for frame owner nodes.
2449         https://bugs.webkit.org/show_bug.cgi?id=105317
2450
2451         Reviewed by Pavel Feldman.
2452
2453         This is needed to translate from a node ID to the execution context ID for
2454         evaluating scripts in the associated frame.
2455
2456         * inspector/Inspector.json:
2457         * inspector/InspectorDOMAgent.cpp:
2458         (WebCore::InspectorDOMAgent::buildObjectForNode):
2459
2460 2012-12-18  peavo@outlook.com  <peavo@outlook.com>
2461
2462         [WinCairo] Compile fix.
2463         https://bugs.webkit.org/show_bug.cgi?id=105175
2464
2465         Reviewed by Simon Fraser.
2466
2467         * rendering/RenderLayer.h: Compile fixes for USE(ACCELERATED_COMPOSITING) mismatch.
2468
2469 2012-12-18  Emil A Eklund  <eae@chromium.org>
2470
2471         Have kFixedPointDenominator be constant across ports
2472         https://bugs.webkit.org/show_bug.cgi?id=104843
2473
2474         Reviewed by Julien Chaffraix.
2475
2476         Currently the kFixedPointDenominator constant is set to either
2477         64 or 1 depending on the SUBPIXEL_LAYOUT flag. As this constant
2478         is used to limit the range of supported values this results in
2479         inconsistencies across ports.
2480
2481         Change kFixedPointDenominator to always be 64 and introduce a
2482         new constant (kEffectiveFixedPointDenominator) that varies.
2483         This ensures that the same range of values are supported across
2484         ports regardless of the SUBPIXEL_LAYOUT flag.
2485         
2486         Covered by fast/css/large-numbers.html and fast/css/large-number-round-trip.html
2487
2488         * platform/LayoutUnit.h:
2489         Add kEffectiveFixedPointDenominator constant and change
2490         LayoutUnit code to use it instead of kFixedPointDenominator
2491         which is now set to 64 regardless of the SUBPIXEL_LAYOUT flag.
2492
2493 2012-12-18  Sheriff Bot  <webkit.review.bot@gmail.com>
2494
2495         Unreviewed, rolling out r137979.
2496         http://trac.webkit.org/changeset/137979
2497         https://bugs.webkit.org/show_bug.cgi?id=105311
2498
2499         nodeName returned by the inspector protocol commands should
2500         match one accessible fro JS (Requested by yurys_ on #webkit).
2501
2502         * inspector/InspectorDOMAgent.cpp:
2503         (WebCore::InspectorDOMAgent::buildObjectForNode):
2504
2505 2012-12-18  Alexander Pavlov  <apavlov@chromium.org>
2506
2507         Web Inspector: [Styles] Selector matches are not marked after property editing
2508         https://bugs.webkit.org/show_bug.cgi?id=105284
2509
2510         Reviewed by Vsevolod Vlasov.
2511
2512         Once a property edit is committed, the selector markup is reset and needs to be re-applied.
2513
2514         * inspector/front-end/StylesSidebarPane.js:
2515         (WebInspector.StylePropertiesSection.prototype.update):
2516
2517 2012-12-18  Eric Carlson  <eric.carlson@apple.com>
2518
2519         Add in-band text track cues only once
2520         https://bugs.webkit.org/show_bug.cgi?id=104593
2521
2522         Reviewed by Dean Jackson.
2523
2524         Test: media/track/track-in-band-cues-added-once.html
2525
2526         * html/track/InbandTextTrack.cpp:
2527         (WebCore::InbandTextTrack::hasCue): New.
2528         * html/track/InbandTextTrack.h:
2529
2530         * html/track/TextTrackCue.cpp:
2531         (WebCore::TextTrackCue::setCueSettings): Remember the raw cue settings so they can be accessed later.
2532         * html/track/TextTrackCue.h:
2533
2534         * platform/graphics/InbandTextTrackPrivateClient.h: Declare hasCue.
2535
2536         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
2537         (WebCore::InbandTextTrackPrivateAVF::processCue): Early return if m_player has been cleared.
2538         (WebCore::InbandTextTrackPrivateAVF::setMode): Ditto.
2539
2540         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2541         (WebCore::MediaPlayerPrivateAVFoundation::seek): Clear the partially accumulated cue when the seek 
2542             starts, not when it completes.
2543         (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): Ditto.
2544         (WebCore::MediaPlayerPrivateAVFoundation::flushCurrentCue): Don't add a cue if it is already in the
2545             text track cue list.
2546         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2547         (WebCore::MediaPlayerPrivateAVFoundationObjC::clearTextTracks): Drive-by cleanup, clear the track list completely.
2548
2549 2012-12-18  Eugene Klyuchnikov  <eustas@chromium.org>
2550
2551         Web Inspector: [Network] Ordering of cookies displayed is nondeterministic.
2552         https://bugs.webkit.org/show_bug.cgi?id=105272
2553
2554         Reviewed by Vsevolod Vlasov.
2555
2556         This patch fixes double-selection of request and sets default ordering
2557         of cookies.
2558
2559         * inspector/front-end/CookiesTable.js: By default sort by name.
2560         * inspector/front-end/NetworkPanel.js: Do not fire "select" on
2561         mouse-click in viewing-request mode.
2562
2563 2012-12-18  Alexander Pavlov  <apavlov@chromium.org>
2564
2565         Unreviewed, rolling out r138011.
2566         http://trac.webkit.org/changeset/138011
2567         https://bugs.webkit.org/show_bug.cgi?id=105272
2568
2569         WebInspector: Broke request selection in the Network panel
2570
2571         * inspector/front-end/CookiesTable.js:
2572         (WebInspector.CookiesTable):
2573         * inspector/front-end/NetworkPanel.js:
2574         (WebInspector.NetworkPanel.prototype._toggleGridMode):
2575         (WebInspector.NetworkPanel.prototype._toggleViewingRequestMode):
2576         (WebInspector.NetworkDataGridNode.prototype.createCells):
2577         (WebInspector.NetworkDataGridNode.prototype.get selectable):
2578
2579 2012-12-18  Nate Chapin  <japhet@chromium.org>
2580
2581         REGRESSION (r137607): Cannot download files, stuck in “Preparing to download”
2582         https://bugs.webkit.org/show_bug.cgi?id=105044
2583
2584         Reviewed by Antti Koivisto.
2585
2586         The work done by DocumentLoader::mainReceivedError() changed subtly in r137607,
2587         such that it cancels the ResourceHandle. We want to treat switching to a download
2588         like a failure, where WebCore assumes that the load is finished, and no
2589         cancellation is required.
2590
2591         No new tests, tested manually by verifying that downloading files works in
2592         Safari Mac.
2593
2594         * loader/MainResourceLoader.cpp:
2595         (WebCore::MainResourceLoader::continueAfterContentPolicy):
2596         * platform/network/mac/ResourceHandleMac.mm:
2597         (WebCore::ResourceHandle::cancel): Remove the workaround added in r137763.
2598
2599 2012-12-18  Eugene Klyuchnikov  <eustas@chromium.org>
2600
2601         Web Inspector: [Network] Ordering of cookies displayed is nondeterministic.
2602         https://bugs.webkit.org/show_bug.cgi?id=105272
2603
2604         Reviewed by Alexander Pavlov.
2605
2606         This patch fixes double-selection of request and sets default ordering
2607         of cookies.
2608
2609         * inspector/front-end/CookiesTable.js: By default sort by name.
2610         * inspector/front-end/NetworkPanel.js: Remove redundant member, make
2611         rows "not-selectable", activate request selection on "mouse-down".
2612
2613 2012-12-18  Tommy Widenflycht  <tommyw@chromium.org>
2614
2615         [JSC] Refactoring CodeGeneratorJS.pm to simplify adding support for overloaded constructors
2616         https://bugs.webkit.org/show_bug.cgi?id=105271
2617
2618         Reviewed by Kentaro Hara.
2619
2620         This patch splits the very large function that generates constructor code into a few smaller ones.
2621         No changes in actual generated code but some functions in the generated bindings code moves.
2622
2623         Existing tests cover patch.
2624
2625         * bindings/scripts/CodeGeneratorJS.pm:
2626         (GenerateImplementation):
2627         (GenerateConstructorDefinitions):
2628         (GenerateConstructorDefinition):
2629         (GenerateConstructorSupportDefinitions):
2630         (IsCustomConstructable):
2631         (IsConstructable):
2632         * bindings/scripts/test/JS/JSFloat64Array.cpp:
2633         (WebCore::JSFloat64ArrayConstructor::constructJSFloat64Array):
2634         (WebCore):
2635         (WebCore::toJS):
2636         (WebCore::JSFloat64Array::indexSetter):
2637         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2638         (WebCore):
2639         (WebCore::JSTestEventConstructorConstructor::JSTestEventConstructorConstructor):
2640         (WebCore::JSTestEventConstructorConstructor::finishCreation):
2641         (WebCore::JSTestEventConstructorConstructor::getOwnPropertySlot):
2642         (WebCore::JSTestEventConstructorConstructor::getOwnPropertyDescriptor):
2643         * bindings/scripts/test/JS/JSTestInterface.cpp:
2644         (WebCore::JSTestInterfaceConstructor::constructJSTestInterface):
2645         (WebCore):
2646         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2647         (WebCore):
2648         (WebCore::JSTestNamedConstructorNamedConstructor::JSTestNamedConstructorNamedConstructor):
2649         (WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
2650         * bindings/scripts/test/JS/JSTestNode.cpp:
2651         (WebCore::JSTestNodeConstructor::constructJSTestNode):
2652         (WebCore):
2653         * bindings/scripts/test/JS/JSTestObj.cpp:
2654         (WebCore::JSTestObjConstructor::constructJSTestObj):
2655         (WebCore):
2656         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2657         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors):
2658         (WebCore):
2659         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2660         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface):
2661         (WebCore):
2662
2663 2012-12-18  Max Feil  <mfeil@rim.com>
2664
2665         [BlackBerry] Add support for setMuted() for media
2666         https://bugs.webkit.org/show_bug.cgi?id=105254
2667
2668         Reviewed by George Staikos.
2669
2670         Simply pass the API call through to the platform layer.
2671
2672         Covered by existing tests.
2673
2674         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
2675         (WebCore::MediaPlayerPrivate::setMuted):
2676         (WebCore):
2677         (WebCore::MediaPlayerPrivate::muted):
2678         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
2679         (MediaPlayerPrivate):
2680         (WebCore::MediaPlayerPrivate::supportsMuting):
2681
2682 2012-12-18  Yury Semikhatsky  <yurys@chromium.org>
2683
2684         Web Inspector: show cached images under MemoryCache -> Images section
2685         https://bugs.webkit.org/show_bug.cgi?id=105261
2686
2687         Reviewed by Pavel Feldman.
2688
2689         Provided class name and name for several objects related to CachedImage.
2690         Changed native memory snapsho view so that MemoryCache.Image section can
2691         be expanded into individual images.
2692
2693         * inspector/front-end/NativeMemorySnapshotView.js:
2694         (WebInspector.NativeMemorySnapshotView):
2695         (WebInspector.NativeSnapshotNode.prototype._addChildrenFromGraph):
2696         (WebInspector.NativeHeapGraphEdge):
2697         (WebInspector.NativeHeapGraphEdge.prototype.type):
2698         (WebInspector.NativeHeapGraphEdge.prototype.name):
2699         (WebInspector.NativeHeapGraphEdge.prototype.target):
2700         (WebInspector.NativeHeapGraphEdge.prototype._getStringField):
2701         (WebInspector.NativeHeapGraphEdge.prototype.toString):
2702         (WebInspector.NativeHeapGraphNode.prototype.size):
2703         (WebInspector.NativeHeapGraphNode.prototype.referencedNodes):
2704         (WebInspector.NativeHeapGraphNode.prototype.outgoingEdges):
2705         (WebInspector.NativeHeapGraphNode.prototype.targetOfEdge):
2706         (WebInspector.NativeHeapGraphNode.prototype.targetsOfAllEdges):
2707         (WebInspector.NativeHeapGraphNode.prototype._firstEdgePoistion):
2708         (WebInspector.NativeHeapGraphNode.prototype._afterLastEdgePosition):
2709         (WebInspector.NativeHeapGraphNode.prototype._getStringField):
2710         (WebInspector.NativeHeapGraphNode.prototype.toString):
2711         (WebInspector.NativeHeapGraph):
2712         (WebInspector.NativeHeapGraph.prototype.rootNodes):
2713         (WebInspector.NativeHeapGraph.prototype._calculateNodeEdgeIndexes):
2714         (WebInspector.NativeHeapGraph.prototype._addDummyNode):
2715         (WebInspector.NativeMemoryProfileType.prototype.buttonClicked.didReceiveMemorySnapshot):
2716         (WebInspector.NativeMemoryProfileType.prototype.buttonClicked):
2717         * loader/cache/CachedImage.cpp:
2718         (WebCore::CachedImage::reportMemoryUsage):
2719         * loader/cache/CachedResource.cpp:
2720         (WebCore::CachedResource::reportMemoryUsage):
2721         * loader/cache/MemoryCache.cpp:
2722         (WebCore::MemoryCache::reportMemoryUsage):
2723         * platform/graphics/BitmapImage.cpp:
2724         (WebCore::BitmapImage::reportMemoryUsage):
2725         (WebCore::FrameData::reportMemoryUsage):
2726         * platform/graphics/Image.cpp:
2727         (WebCore::Image::reportMemoryUsage):
2728         * platform/graphics/skia/MemoryInstrumentationSkia.cpp:
2729         (reportMemoryUsage):
2730
2731 2012-12-18  Eugene Klyuchnikov  <eustas@chromium.org>
2732
2733         Web Inspector: Calculate "idle" time for CPU profiles.
2734         https://bugs.webkit.org/show_bug.cgi?id=103120
2735
2736         Reviewed by Pavel Feldman.
2737
2738         CPU profiles contain a very confusing "(program)" item.
2739         It is time when there is no JS stack.
2740         That could be either idle time, or time when browser is doing something.
2741
2742         To split "(program)" item to idle and really program time we are to
2743         calculate idle time during profiling.
2744
2745         * bindings/js/ScriptProfile.cpp: Added "idleTime" getter.
2746         * bindings/js/ScriptProfile.h: Ditto.
2747         * bindings/js/ScriptProfiler.h:
2748         Added getter of thread-local map of currently written profiles.
2749         * bindings/v8/ScriptProfile.cpp: Added "idleTime" getter.
2750         * bindings/v8/ScriptProfile.h: Ditto.
2751         * bindings/v8/ScriptProfiler.cpp:
2752         (WebCore::ScriptProfiler::start): Put profile name to map.
2753         (WebCore::ScriptProfiler::stop): Remove profile name from map;
2754         pass idleTime to profile constructor.
2755         * bindings/v8/ScriptProfiler.h:
2756         Added getter of thread-local map of currently written profiles.
2757         * inspector/Inspector.json: Added "idleTime" field to profile.
2758         * inspector/InspectorController.cpp: Pass hooks to profiler agent.
2759         * inspector/InspectorProfilerAgent.cpp:
2760         Add idle time to currently written profiles.
2761         * inspector/InspectorProfilerAgent.h:
2762         Added member to hold reference to map of currently written profiles.
2763         * inspector/InspectorTimelineAgent.h:
2764         Cleanup.
2765         * inspector/ScriptProfile.idl:
2766         Add "idleTime" member.
2767
2768 2012-12-17  Yury Semikhatsky  <yurys@chromium.org>
2769
2770         Web Inspector: MediaQueryList listener silently catches errors
2771         https://bugs.webkit.org/show_bug.cgi?id=105162
2772
2773         Reviewed by Alexander Pavlov.
2774
2775         Drive-by: removed unused ScriptCallback::call(bool).
2776
2777         Test: inspector-protocol/media-query-listener-exception.html
2778
2779         * bindings/js/ScriptFunctionCall.cpp:
2780         (WebCore::ScriptCallback::call):
2781         * bindings/js/ScriptFunctionCall.h:
2782         (ScriptCallback):
2783         * bindings/v8/ScriptFunctionCall.cpp: report uncaught exception to the inspector
2784         if it was thrown during the function call.
2785         (WebCore::ScriptCallback::call):
2786         * bindings/v8/ScriptFunctionCall.h:
2787         (ScriptCallback):
2788
2789 2012-12-18  Eugene Klyuchnikov  <eustas@chromium.org>
2790
2791         Web Inspector: Network: display JavaScript stack in case of script initiator.
2792         https://bugs.webkit.org/show_bug.cgi?id=104899
2793
2794         Reviewed by Vsevolod Vlasov.
2795
2796         Show popup with navigavle stack-trace.
2797
2798         * inspector/front-end/NetworkPanel.js:
2799         (WebInspector.NetworkLogView.prototype._getPopoverAnchor):
2800         Added new target.
2801         (WebInspector.NetworkLogView.prototype._showPopover):
2802         Added case for new target.
2803         (WebInspector.NetworkLogView.prototype._generateScriptInitiatedPopoverContent):
2804         Generates table with stack trace items.
2805         (WebInspector.NetworkDataGridNode.prototype._refreshInitiatorCell):
2806         Added target marker, removed annoying titles.
2807
2808 2012-12-18  Tamas Czene  <tczene@inf.u-szeged.hu>
2809
2810         Style fix to OpenCL SVG Filters
2811         https://bugs.webkit.org/show_bug.cgi?id=105265
2812
2813         Reviewed by Zoltan Herczeg.
2814
2815         Inserted missing spaces and correct copyright text. There were no vital changes.
2816
2817         * platform/graphics/gpu/opencl/FilterContextOpenCL.cpp:
2818         (WebCore):
2819         * platform/graphics/gpu/opencl/FilterContextOpenCL.h:
2820         (FilterContextOpenCL):
2821         * platform/graphics/gpu/opencl/OpenCLFEColorMatrix.cpp:
2822         (WebCore::FilterContextOpenCL::applyFEColorMatrix):
2823         * platform/graphics/gpu/opencl/OpenCLFETurbulence.cpp:
2824         (WebCore):
2825         (WebCore::FilterContextOpenCL::compileFETurbulence):
2826         (WebCore::FilterContextOpenCL::applyFETurbulence):
2827         (WebCore::FETurbulence::platformApplyOpenCL):
2828         * platform/graphics/gpu/opencl/OpenCLHandle.h:
2829
2830 2012-12-17  Andrey Adaikin  <aandrey@chromium.org>
2831
2832         Web Inspector: [WebGL] handle video elements used in WebGL
2833         https://bugs.webkit.org/show_bug.cgi?id=105170
2834
2835         Reviewed by Yury Semikhatsky.
2836
2837         Copy current image of video elements into a canvas to use it later in the replay.
2838
2839         * inspector/InjectedScriptCanvasModuleSource.js:
2840         (.):
2841
2842 2012-12-17  Luke Macpherson   <macpherson@chromium.org>
2843
2844         Add ASSERTions to ensure that CSSPropertys that are variables only ever refer to CSSValues that are variables.
2845         https://bugs.webkit.org/show_bug.cgi?id=104876
2846
2847         Reviewed by Steve Block.
2848
2849         Add assertions to CSSProperty constructors to make that if it is initialized with CSSPropertyVariable that
2850         the value type associated with it is also a variable. This is already asserted at read time, but ASSERTing
2851         here will produce a more useful backtrace.
2852
2853         No new tests as functionality unchanged.
2854
2855         * css/CSSProperty.h:
2856         (WebCore::CSSProperty::CSSProperty):
2857
2858 2012-12-17  Vsevolod Vlasov  <vsevik@chromium.org>
2859
2860         Web Inspector: Make inspector scripts sourceURL absolute.
2861         https://bugs.webkit.org/show_bug.cgi?id=105166
2862
2863         Reviewed by Yury Semikhatsky.
2864
2865         * inspector/front-end/utilities.js:
2866
2867 2012-12-17  Huang Dongsung  <luxtella@company100.net>
2868
2869         REGRESSION(r137442): Crash because of an uninitialized member.
2870         https://bugs.webkit.org/show_bug.cgi?id=105246
2871
2872         Reviewed by Noam Rosenthal.
2873
2874         TextureMapperGL defines m_context although TextureMapper defines m_context.
2875         r137442 removes the initialization code in TextureMapperGL, which is
2876         what causes this regression. This patch removes the duplicated member
2877         in TextureMapperGL.
2878
2879         No new tests. Covered by existing tests.
2880
2881         * platform/graphics/texmap/TextureMapper.cpp:
2882         (WebCore::TextureMapper::TextureMapper):
2883         * platform/graphics/texmap/TextureMapper.h:
2884         (WebCore::TextureMapper::setGraphicsContext):
2885         (WebCore::TextureMapper::graphicsContext):
2886         (TextureMapper):
2887         * platform/graphics/texmap/TextureMapperGL.h:
2888         (WebCore):
2889
2890 2012-12-17  Philip Rogers  <pdr@google.com>
2891
2892         Queue container size requests while images are loading.
2893         https://bugs.webkit.org/show_bug.cgi?id=105097
2894
2895         Reviewed by Dean Jackson.
2896
2897         We use CachedImage::setContainerSizeForRenderer(...) to notify images of requesting
2898         container sizes. Unfortunately, if the image is not yet loaded we ignore this container
2899         size information! This patch stores requesting container sizes made while the image is
2900         not yet loaded.
2901
2902         This patch fixes a bug where SVG images would display incorrectly on the first load but
2903         correctly thereafter. Additionally, this bug caused the SVGImageCache to not be used in many
2904         real world scenarios.
2905
2906         This patch is loosely based on a patch by blambov in WK98403.
2907
2908         Test: http/tests/misc/svg-image-delayed-size-negotiation.html
2909
2910         * loader/cache/CachedImage.cpp:
2911         (WebCore::CachedImage::didRemoveClient):
2912         (WebCore::CachedImage::allClientsRemoved):
2913         (WebCore::CachedImage::setContainerSizeForRenderer):
2914         (WebCore::CachedImage::clear):
2915         (WebCore::CachedImage::createImage):
2916         * loader/cache/CachedImage.h:
2917
2918             A new map has been added to track renderer -> size information before an image has
2919             loaded. Note that this affects all images (not just images that require container size
2920             information) but we cannot know the image type before the image has loaded.
2921
2922 2012-12-17  Shinya Kawanaka  <shinyak@chromium.org>
2923
2924         Web Inspector: need to visually distinguish UA shadow roots
2925         https://bugs.webkit.org/show_bug.cgi?id=104877
2926
2927         Reviewed by Yury Semikhatsky.
2928
2929         Now we have an option to show ShadowRoot in the Inspector. Since the Inspector has displayed UserAgent ShadowRoot and
2930         Author ShadowRoot as the same #shadow-root, a user could not distinguish them.
2931
2932         We would like to show UserAgent ShadowRoot as #webkit-shadow-root.
2933
2934         Test: inspector/shadow-root.html
2935
2936         * inspector/InspectorDOMAgent.cpp:
2937         (WebCore::InspectorDOMAgent::buildObjectForNode): Make nodeName of UserAgent ShadowRoot #webkit-shadow-root.
2938         Since the correct nodeName of ShadowRoot is #document-fragment, we have to specify the nodeName of Author ShadowRoot
2939         as #shadow-root here.
2940
2941 2012-12-17  Huang Dongsung  <luxtella@company100.net>
2942
2943         Coordinated Graphics: Refactor TiledBackingStore code in CoordinatedGraphicsLayer.
2944         https://bugs.webkit.org/show_bug.cgi?id=103959
2945
2946         Reviewed by Kenneth Rohde Christiansen.
2947
2948         TiledBackingStore::setCommitTileUpdatesOnIdleEventLoop() is used when class
2949         methods cannot be called asynchronously by client. Updates of tiles are
2950         committed as soon as all the events in event queue have been processed.
2951         After this patch Frame sets m_commitTileUpdatesOnIdleEventLoop to true.
2952
2953         In addition, remove TiledBackingStoreClient::tiledBackingStoreUpdatesAllowed()
2954         which was introduced for Coordinated Graphics.
2955
2956         Refactoring covered by existing tests.
2957
2958         * page/Frame.cpp:
2959         (WebCore::Frame::setTiledBackingStoreEnabled):
2960         * platform/graphics/TiledBackingStore.cpp:
2961         (WebCore::TiledBackingStore::TiledBackingStore):
2962         (WebCore::TiledBackingStore::setTrajectoryVector):
2963           Separate setting a trajectory vector from coverWithTilesIfNeeded().
2964         (WebCore::TiledBackingStore::coverWithTilesIfNeeded):
2965         (WebCore::TiledBackingStore::updateTileBuffers):
2966         (WebCore::TiledBackingStore::createTiles):
2967         (WebCore::TiledBackingStore::isTileBufferUpdatesSuspended):
2968         (WebCore::TiledBackingStore::startTileBufferUpdateTimer):
2969         (WebCore::TiledBackingStore::tileBufferUpdateTimerFired):
2970         (WebCore::TiledBackingStore::startBackingStoreUpdateTimer):
2971         (WebCore::TiledBackingStore::backingStoreUpdateTimerFired):
2972         * platform/graphics/TiledBackingStore.h:
2973         (TiledBackingStore):
2974         (WebCore::TiledBackingStore::setCommitTileUpdatesOnIdleEventLoop):
2975         * platform/graphics/TiledBackingStoreClient.h:
2976         (WebCore::TiledBackingStoreClient::tiledBackingStoreHasPendingTileCreation):
2977             If TiledBackingStore does not create all tiles, TiledBackingStore
2978             notifies a client of needing to create tiles more, when
2979             m_commitTileUpdatesOnIdleEventLoop is false.
2980
2981 2012-12-17  Dean Jackson  <dino@apple.com>
2982
2983         Track menu should be sorted
2984         https://bugs.webkit.org/show_bug.cgi?id=105229
2985
2986         Reviewed by Eric Carlson.
2987
2988         Make sure that the <li> elements in the track menu are correctly
2989         sorted as they are built. This uses insertion sort, but it shouldn't
2990         be horrible given that we don't expect a huge number of tracks.
2991
2992         Test: media/video-controls-captions-trackmenu-sorted.html
2993
2994         * html/shadow/MediaControlElements.cpp:
2995         (WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay):
2996         (WebCore::insertTextTrackMenuItemIntoSortedContainer): New function that calls insertBefore with
2997         the correct parameters to ensure the <ul> is correctly sorted.
2998         (WebCore::MediaControlClosedCaptionsTrackListElement::rebuildTrackListMenu):
2999         * html/shadow/MediaControlElements.h:
3000         (MediaControlClosedCaptionsTrackListElement): Rename menuItems to m_menuItems for consistency.
3001
3002 2012-12-17  Matthew Dempsky  <mdempsky@google.com>
3003
3004         Regression causing DOM objects to have unstable NPObject* references with v8 bindings
3005         https://bugs.webkit.org/show_bug.cgi?id=104921
3006
3007         Reviewed by Kentaro Hara.
3008
3009         Fix regression introduced by changeset 135804 resulting in
3010         unstable NPObject* references for v8 objects.  In the iter !=
3011         v8NPObjectMap->end() code path, objectVector was left unassigned
3012         if the for loop terminated without returning.
3013
3014         Also, V8Object::GetIdentityHash() is documented as not being guaranteed
3015         as unique.  As such, don't ASSERT() that two objects with the same hash
3016         must therefor be the same object.
3017
3018         Tests: plugins/npruntime/embed-property-iframe-equality.html
3019
3020         * bindings/v8/NPV8Object.cpp:
3021         (WebCore::npCreateV8ScriptObject): Fix.
3022
3023 2012-12-17  Chris Fleizach  <cfleizach@apple.com>
3024
3025         Seamless iframe should not announce a new browsing context
3026         https://bugs.webkit.org/show_bug.cgi?id=86317
3027
3028         Reviewed by Eric Seidel.
3029
3030         Introduce a new role for seamless frames so that the platforms can decide what to do
3031         with this kind of object. For the mac, it's exposed as a group.
3032
3033         Test: platform/mac/accessibility/seamless-iframe.html
3034
3035         * accessibility/AccessibilityNodeObject.cpp:
3036         (WebCore):
3037         * accessibility/AccessibilityNodeObject.h:
3038         (AccessibilityNodeObject):
3039         * accessibility/AccessibilityObject.h:
3040         (WebCore::AccessibilityObject::isWebArea):
3041         (WebCore::AccessibilityObject::isSeamlessWebArea):
3042         * accessibility/AccessibilityRenderObject.cpp:
3043         (WebCore::AccessibilityRenderObject::parentObjectIfExists):
3044         (WebCore::AccessibilityRenderObject::parentObject):
3045         (WebCore::AccessibilityRenderObject::boundingBoxRect):
3046         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
3047         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
3048         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
3049         (createAccessibilityRoleMap):
3050
3051 2012-12-17  KyungTae Kim  <ktf.kim@samsung.com>
3052
3053         Percentage width replaced element incorrectly rendered when intrinsic size changed
3054         https://bugs.webkit.org/show_bug.cgi?id=102784
3055
3056         Reviewed by Tony Chang.
3057
3058         To make relayout when the image dimension is changed,
3059         and if the logical width is percent type and the containing block fits to it.
3060         In this case, the containing block's width need to be updated first,
3061         because the 'newWidth' was calculated from the 'old containing block width'.
3062
3063         Test: fast/css/percent-width-img-src-change.html
3064
3065         * rendering/RenderImage.cpp:
3066         (WebCore::RenderImage::imageDimensionsChanged):
3067
3068 2012-12-17  Beth Dakin  <bdakin@apple.com>
3069
3070         DidHitRelevantRepaintedObjectsAreaThreshold should not use the viewRect since 
3071         that varies
3072         https://bugs.webkit.org/show_bug.cgi?id=105116
3073         -and corresponding-
3074         <rdar://problem/12889449>
3075
3076         Reviewed by Geoff Garen.
3077
3078         DidHitRelevantRepaintedObjectsAreaThreshold should not use the viewRect since that 
3079         varies depending on window size. This can lead to a huge amount of variability in 
3080         the heuristic which is not desired. Instead, we should use a hard-coded rect.
3081         * page/Page.cpp:
3082         (WebCore::relevantViewRect):
3083         (WebCore):
3084         (WebCore::Page::addRelevantRepaintedObject):
3085         (WebCore::Page::addRelevantUnpaintedObject):
3086
3087 2012-12-17  Simon Fraser  <simon.fraser@apple.com>
3088
3089         Fix repositioning of fixed elements on zooming
3090         https://bugs.webkit.org/show_bug.cgi?id=105223
3091
3092         Reviewed by Beth Dakin.
3093
3094         When zoomed, scrolling would move the layers of fixed-position
3095         elements oddly. This happened because on the scrolling thread we
3096         passed a scale of 1, rather than the actual page scale to 
3097         scrollOffsetForFixedPosition().
3098         
3099         Fix by plumbing the page scale through the scrolling state node
3100         to the scrolling node.
3101
3102         Test: platform/mac/tiled-drawing/fixed/four-bars-zoomed.html
3103
3104         * page/scrolling/ScrollingStateScrollingNode.cpp:
3105         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
3106         (WebCore::ScrollingStateScrollingNode::setFrameScaleFactor):
3107         (WebCore::ScrollingStateScrollingNode::dumpProperties):
3108         * page/scrolling/ScrollingStateScrollingNode.h:
3109         (WebCore::ScrollingStateScrollingNode::frameScaleFactor):
3110         (ScrollingStateScrollingNode):
3111         * page/scrolling/ScrollingTreeScrollingNode.cpp:
3112         (WebCore::ScrollingTreeScrollingNode::ScrollingTreeScrollingNode):
3113         (WebCore::ScrollingTreeScrollingNode::update):
3114         * page/scrolling/ScrollingTreeScrollingNode.h:
3115         (WebCore::ScrollingTreeScrollingNode::frameScaleFactor):
3116         (ScrollingTreeScrollingNode):
3117         * page/scrolling/mac/ScrollingCoordinatorMac.h:
3118         (ScrollParameters):
3119         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
3120         (WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated):
3121         (WebCore::ScrollingCoordinatorMac::setScrollParametersForNode):
3122         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
3123         (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
3124
3125 2012-12-17  Dima Gorbik  <dgorbik@apple.com>
3126
3127         Implement matching cue by the class name with ::cue pseudo element
3128         https://bugs.webkit.org/show_bug.cgi?id=104191
3129
3130         Reviewed by Antti Koivisto.
3131
3132         Implemented the ::cue() pseudo-element with an argument that may hold a simple selector list.
3133         This enables matching cue objects by the class name.
3134
3135         Test: media/track/track-css-matching.html
3136
3137         * css/CSSGrammar.y.in: support parsing the ::cue() with an argument.
3138         * css/CSSParser.cpp:
3139         (WebCore::CSSParser::detectFunctionTypeToken): tokenize the 'cue'.
3140         (WebCore::CSSParser::updateSpecifiersWithElementName): do not set the tag for the cue pseudo-element because
3141         the ::cue may match elements with different tags.
3142         (WebCore::CSSParser::updateSpecifiers): the behavior for the PseudoCue selector should be same as for
3143         unknown pseudo elements - the pseudo-element should stay on top of the selector chain.
3144         * css/CSSSelector.cpp: added the type detection for the new selector.
3145         (WebCore::CSSSelector::pseudoId):
3146         (WebCore::nameToPseudoTypeMap):
3147         (WebCore::CSSSelector::extractPseudoType):
3148         * css/CSSSelector.h:
3149         * css/RuleSet.cpp: add a new list to hold all the rulesets for the new pseudo element.
3150         (WebCore::RuleSet::reportMemoryUsage):
3151         (WebCore::RuleSet::addRule):
3152         (WebCore::RuleSet::shrinkToFit):
3153         * css/RuleSet.h:
3154         (RuleSet):
3155         (WebCore::RuleSet::cuePseudoRules):
3156         * css/SelectorChecker.cpp:
3157         (WebCore::SelectorChecker::checkOneSelector):
3158         * css/SelectorChecker.h:
3159         (WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext):
3160         * css/StyleResolver.cpp:
3161         (WebCore::StyleResolver::collectMatchingRules):
3162         * dom/Element.cpp: an addition to the rare data to be able to find out if the node is a webvtt node.
3163         (WebCore):
3164         (WebCore::Element::isWebVTTNode):
3165         (WebCore::Element::setIsWebVTTNode):
3166         (WebCore::Element::cloneDataFromElement):
3167         * dom/Element.h:
3168         (Element):
3169         * dom/ElementRareData.h:
3170         (ElementRareData):
3171         * dom/NodeRareData.h:
3172         (WebCore::NodeRareData::NodeRareData):
3173         (NodeRareData):
3174         (WebCore::NodeRareData::isWebVTTNode):
3175         (WebCore::NodeRareData::setIsWebVTTNode):
3176         * html/track/TextTrackCue.cpp:
3177         (WebCore::TextTrackCue::markNodesAsWebVTTNodes): mark the cloned nodes as WebVTT nodes.
3178         (WebCore):
3179         (WebCore::TextTrackCue::getCueAsHTML):
3180         * html/track/TextTrackCue.h:
3181         (TextTrackCue):
3182         * html/track/WebVTTParser.cpp:
3183         (WebCore::WebVTTParser::constructTreeFromToken):
3184         * rendering/style/RenderStyleConstants.h:
3185
3186 2012-12-17  Michael Pruett  <michael@68k.org>
3187
3188         IndexedDB: Don't use strings to represent serialized values
3189         https://bugs.webkit.org/show_bug.cgi?id=104354
3190
3191         Reviewed by Kentaro Hara.
3192
3193         Use Vector<uint8_t> rather than String to represent serialized values
3194         in IndexedDB. This change is necessary to implement IndexedDB for JSC.
3195
3196         Tests: storage/indexeddb/*
3197
3198         * Modules/indexeddb/IDBBackingStore.cpp:
3199         (WebCore::IDBBackingStore::getRecord):
3200         (WebCore::IDBBackingStore::putRecord):
3201         (WebCore::ObjectStoreKeyCursorImpl::value):
3202         (WebCore::ObjectStoreKeyCursorImpl::ObjectStoreKeyCursorImpl):
3203         (WebCore::ObjectStoreCursorImpl::value):
3204         (ObjectStoreCursorImpl):
3205         (WebCore::ObjectStoreCursorImpl::loadCurrentRow):
3206         (WebCore::IndexKeyCursorImpl::value):
3207         (WebCore::IndexCursorImpl::value):
3208         (WebCore::IndexCursorImpl::IndexCursorImpl):
3209         (IndexCursorImpl):
3210         (WebCore::IndexCursorImpl::loadCurrentRow):
3211         * Modules/indexeddb/IDBBackingStore.h:
3212         (IDBBackingStore):
3213         (Cursor):
3214         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
3215         (WebCore::IDBCursorBackendImpl::CursorPrefetchIterationOperation::perform):
3216         * Modules/indexeddb/IDBCursorBackendImpl.h:
3217         (WebCore::IDBCursorBackendImpl::value):
3218         * Modules/indexeddb/IDBIndexBackendImpl.cpp:
3219         (WebCore::IDBIndexBackendImpl::IndexReferencedValueRetrievalOperation::perform):
3220         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
3221         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreRetrievalOperation::perform):
3222         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreStorageOperation::perform):
3223         * bindings/js/SerializedScriptValue.cpp:
3224         (WebCore::SerializedScriptValue::SerializedScriptValue):
3225         (WebCore):
3226         * bindings/js/SerializedScriptValue.h:
3227         * bindings/v8/SerializedScriptValue.cpp:
3228         (WebCore::SerializedScriptValue::createFromWireBytes):
3229         (WebCore):
3230         (WebCore::SerializedScriptValue::toWireBytes):
3231         * bindings/v8/SerializedScriptValue.h:
3232         (SerializedScriptValue):
3233
3234 2012-12-17  Jaehun Lim  <ljaehun.lim@samsung.com>
3235
3236         Change SET_VAR, SET_BORDERVALUE_COLOR macro to require semicolon(;) at the end of the line
3237         https://bugs.webkit.org/show_bug.cgi?id=104774
3238
3239         Reviewed by Eric Seidel.
3240
3241         Remove the last ; in SET_VAR, SET_BORDERVALUE_COLOR macro definition.
3242         Add the omitted ; in RenderStyle.h | .cpp
3243
3244         No new tests, just style change.
3245
3246         * rendering/style/RenderStyle.cpp:
3247         (WebCore::RenderStyle::setColor):
3248         (WebCore::RenderStyle::setVisitedLinkColor):
3249         (WebCore::RenderStyle::setHorizontalBorderSpacing):
3250         (WebCore::RenderStyle::setVerticalBorderSpacing):
3251         * rendering/style/RenderStyle.h:
3252
3253 2012-12-17  Yong Li  <yoli@rim.com>
3254
3255         [BlackBerry] Deadlock caused by PluginViewPrivate::destroyBuffers()
3256         https://bugs.webkit.org/show_bug.cgi?id=105215
3257
3258         Reviewed by Rob Buis.
3259         Also internally reviewed by George Staikos.
3260
3261         PR# 266443
3262         It should release mutexes before sending sync message.
3263
3264         * plugins/blackberry/PluginViewPrivateBlackBerry.cpp:
3265         (WebCore::PluginViewPrivate::destroyBuffers):
3266
3267 2012-12-17  Sheriff Bot  <webkit.review.bot@gmail.com>
3268
3269         Unreviewed, rolling out r137198.
3270         http://trac.webkit.org/changeset/137198
3271         https://bugs.webkit.org/show_bug.cgi?id=105212
3272
3273         This patch is causing API behavior compatibility problems
3274         (Requested by zdobersek on #webkit).
3275
3276         * platform/network/soup/ResourceRequestSoup.cpp:
3277         (WebCore::ResourceRequest::updateFromSoupMessage):
3278
3279 2012-12-17  Dominic Mazzoni  <dmazzoni@google.com>
3280
3281         AX: textUnderElement should consider alt text, but skip links and controls
3282         https://bugs.webkit.org/show_bug.cgi?id=101650
3283
3284         Reviewed by Chris Fleizach.
3285
3286         Getting inner text from an element now ignores focusable descendants
3287         and containers, but uses alternative text.  The computation of
3288         textUnderElement is now recursive and doesn't depend on text
3289         iterators, which might not do the right thing for accessibility
3290         anyways.
3291
3292         For GTK, the old behavior is retained so that support for
3293         the object replacement character is still there. Filed a new
3294         bug (105214) for GTK folks to look at this.
3295
3296         Test: accessibility/button-title-uses-inner-img-alt.html
3297         Test: accessibility/focusable-div.html
3298
3299         * accessibility/AccessibilityNodeObject.cpp:
3300         (WebCore):
3301         (WebCore::shouldUseAccessiblityObjectInnerText):
3302         (WebCore::AccessibilityNodeObject::textUnderElement):
3303         * accessibility/AccessibilityRenderObject.cpp:
3304         (WebCore::AccessibilityRenderObject::textUnderElement):
3305
3306 2012-12-17  Otto Derek Cheung  <otcheung@rim.com>
3307
3308         [BlackBerry] Prevent CookieManager from blocking the WKT thread
3309         https://bugs.webkit.org/show_bug.cgi?id=105111
3310
3311         Prevent CookieManager from blocking the WKT Thread.
3312
3313         PR 265603
3314
3315         Reviewed by Rob Buis.
3316
3317         Adding some guards to CookieManager so it will return immedately
3318         if getCookie functions are called when the database isn't loaded yet.
3319
3320         setCookie functions will be redispatched until the database is ready.
3321
3322         * platform/blackberry/CookieManager.cpp:
3323         (WebCore::CookieManager::CookieManager):
3324         (WebCore::CookieManager::setCookies):
3325         (WebCore::CookieManager::getCookie):
3326         (WebCore::CookieManager::generateHtmlFragmentForCookies):
3327         (WebCore::CookieManager::getRawCookies):
3328         (WebCore::CookieManager::removeAllCookies):
3329         (WebCore::CookieManager::getBackingStoreCookies):
3330         (WebCore::CookieManager::setPrivateMode):
3331         (WebCore::CookieManager::removeCookieWithName):
3332         * platform/blackberry/CookieManager.h:
3333
3334 2012-12-17  Levi Weintraub  <leviw@chromium.org>
3335
3336         Add support for tracking hit test rectangles to enable fast event rejection in the compositor
3337         https://bugs.webkit.org/show_bug.cgi?id=103914
3338
3339         Reviewed by James Robinson.
3340
3341         Adding support for tracking hit test target regions for the purpose of performing initial hit testing
3342         in the compositor to avoid blocking scrolling on the main thread while waiting to hit test events that
3343         aren't occuring in regions with handlers. This is initially being done to avoid having to go to the main
3344         thread when scrolling by flicking on touch devices when the flick occurs outside a tracked touch event
3345         region. This patch includes the implementation to turn this on in Chromium.
3346
3347         To accomplish this goal, Document will now keep a counted hash set of nodes with touch event handlers
3348         instead of only an unsigned integer of the total count. ScrollingCoordinator then updates the compositor
3349         when new touch event handlers are registered or removed, or after layout much like how
3350         nonFastScrollableRegions are currently tracked.
3351
3352         This implementation will not properly update the hit test rects when the renderers are inside a sub-
3353         tree that scrolls.
3354
3355         This change was initially rolled out due to stale Node pointers in Document's touchEventTargets. This
3356         patch adds a callback to remove the Node from that structure to Node's destructor. This is covered
3357         by the touch-target-removed-crash.html test case which is also added.
3358
3359         Test: platform/chromium/fast/events/touch/compositor-touch-hit-rects.html
3360               platform/chromium/fast/events/touch/touch-target-removed-crash.html
3361
3362         * dom/Document.cpp:
3363         (WebCore::Document::Document): Added a HashCountedSet of touch target nodes. Note: DOMWindow targets
3364         are stored as the Document they point to.
3365         (WebCore::Document::didAddTouchEventHandler): Changed to keep track of the handler instead of a count, and
3366         to update the ScrollingCoordinator with the change.
3367         (WebCore::Document::didRemoveTouchEventHandler): Ditto.
3368         * dom/Document.h:
3369         (WebCore::Document::hasTouchEventHandlers): It's no longer O(1) to get the count of touch handlers, so
3370         expose whether there are any or not.
3371         (WebCore::Document::touchEventTargets):
3372         * dom/Node.cpp:
3373         (WebCore::Node::didMoveToNewDocument):
3374         (WebCore::tryAddEventListener):
3375         (WebCore::tryRemoveEventListener):
3376         * history/CachedFrame.cpp:
3377         (WebCore::CachedFrameBase::restore):
3378         * html/HTMLInputElement.cpp:
3379         (WebCore::HTMLInputElement::~HTMLInputElement):
3380         (WebCore::HTMLInputElement::updateType):
3381         * page/DOMWindow.cpp:
3382         (WebCore::DOMWindow::addEventListener): Add the Document to the touch target set instead of DOMWindow.
3383         (WebCore::DOMWindow::removeEventListener):
3384         * page/EventHandler.cpp:
3385         (WebCore::EventHandler::handleTouchEvent):
3386         * page/Frame.cpp:
3387         (WebCore::Frame::setDocument):
3388         * page/scrolling/ScrollingCoordinator.cpp:
3389         (WebCore::ScrollingCoordinator::computeAbsoluteTouchEventTargetRects): Walk the renderers for event handler
3390         nodes and generate the absolute hit testing rects.
3391         * page/scrolling/ScrollingCoordinator.h:
3392         (WebCore::ScrollingCoordinator::setTouchEventTargetRectsChanged): Hook to pass along the hit test rects to
3393         the scrolling tree/compositor.
3394         (ScrollingCoordinator):
3395         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
3396         (WebCore::ScrollingCoordinatorChromium::frameViewLayoutUpdated):
3397         (WebCore::ScrollingCoordinatorChromium::setTouchEventTargetRectsChanged):
3398         (WebCore::ScrollingCoordinatorChromium::setNonFastScrollableRegion):
3399         (WebCore::ScrollingCoordinatorChromium::setTouchEventTargetRects):
3400         * page/scrolling/chromium/ScrollingCoordinatorChromium.h:
3401         (ScrollingCoordinatorChromium):
3402         * testing/Internals.cpp:
3403         (WebCore::Internals::touchEventHandlerCount): Changed to do the work to calculate the actual count since
3404         it's no longer stored as an int in Document.
3405         (WebCore::Internals::touchEventTargetClientRects):
3406         * testing/Internals.h:
3407         (Internals):
3408         * testing/Internals.idl:
3409
3410 2012-12-17  Avi Drissman  <avi@chromium.org>
3411
3412         Dragging a .jpg to Finder saves it as .jpeg
3413         https://bugs.webkit.org/show_bug.cgi?id=105140
3414         https://code.google.com/p/chromium/issues/detail?id=35811
3415
3416         Reviewed by Tony Chang.
3417
3418         If the filename's extension is already valid for the MIME type, we don't
3419         need to rewrite it to the preferred extension.
3420
3421         No layout tests because it involves dragging items to the desktop.
3422
3423         * platform/chromium/ClipboardChromium.cpp:
3424         (WebCore::writeImageToDataObject):
3425
3426 2012-12-17  Bem Jones-Bey  <bjonesbe@adobe.com>
3427
3428         [CSS Exclusions] shape-outside on floats for rectangle shapes height/width
3429         https://bugs.webkit.org/show_bug.cgi?id=100398
3430
3431         Reviewed by Julien Chaffraix.
3432
3433         Implement shape outside for floats changing only the height and width
3434         as a simple starting point.
3435
3436         This implementation changes floats to use the bounding box of the
3437         shape outside instead of the margin box for layout. The content box of
3438         the float is unchanged. This patch does not support positioning the
3439         shape outside box, so the x and y parameters are currently ignored in
3440         the specified shape. This will be fixed in a patch for bug 100399.
3441
3442         Tests: fast/exclusions/shape-outside-floats/shape-outside-floats-margin-is-ignored.html
3443                fast/exclusions/shape-outside-floats/shape-outside-floats-simple-rectangle-horizontal-multiple.html
3444                fast/exclusions/shape-outside-floats/shape-outside-floats-simple-rectangle-percentage.html
3445                fast/exclusions/shape-outside-floats/shape-outside-floats-simple-rectangle.html
3446
3447         * CMakeLists.txt: Add ExclusionShapeOutsideInfo.{cpp,h}.
3448         * GNUmakefile.list.am: Add ExclusionShapeOutsideInfo.{cpp,h}.
3449         * Target.pri: Add ExclusionShapeOutsideInfo.{cpp,h}.
3450         * WebCore.gypi: Add ExclusionShapeOutsideInfo.{cpp,h}.
3451         * WebCore.vcproj/WebCore.vcproj: Add ExclusionShapeOutsideInfo.{cpp,h}.
3452         * WebCore.xcodeproj/project.pbxproj: Add ExclusionShapeOutsideInfo.{cpp,h}.
3453         * rendering/ExclusionShapeOutsideInfo.cpp: Added. Associates the
3454             ExclusionShape object for shape outside with a RenderBox. Analagous to
3455             ExclusionShapeInsideInfo.
3456         (WebCore::exclusionShapeOutsideInfoMap):
3457         (WebCore::ExclusionShapeOutsideInfo::ExclusionShapeOutsideInfo):
3458         (WebCore::ExclusionShapeOutsideInfo::~ExclusionShapeOutsideInfo):
3459         (WebCore::ExclusionShapeOutsideInfo::ensureInfoForRenderBox):
3460         (WebCore::ExclusionShapeOutsideInfo::infoForRenderBox):
3461         (WebCore::ExclusionShapeOutsideInfo::isInfoEnabledForRenderBox):
3462         (WebCore::ExclusionShapeOutsideInfo::removeInfoForRenderBox):
3463         (WebCore::ExclusionShapeOutsideInfo::computedShape):
3464         * rendering/ExclusionShapeOutsideInfo.h: Added. Associates the
3465             ExclusionShape object for shape outside with a RenderBox. Analagous to
3466             ExclusionShapeInsideInfo.
3467         (ExclusionShapeOutsideInfo):
3468         (WebCore::ExclusionShapeOutsideInfo::create):
3469         (WebCore::ExclusionShapeOutsideInfo::shapeLogicalLeft):
3470         (WebCore::ExclusionShapeOutsideInfo::shapeLogicalRight):
3471         (WebCore::ExclusionShapeOutsideInfo::shapeLogicalTop):
3472         (WebCore::ExclusionShapeOutsideInfo::shapeLogicalBottom):
3473         (WebCore::ExclusionShapeOutsideInfo::shapeLogicalWidth):
3474         (WebCore::ExclusionShapeOutsideInfo::shapeLogicalHeight):
3475         (WebCore::ExclusionShapeOutsideInfo::setShapeSize):
3476         (WebCore::ExclusionShapeOutsideInfo::dirtyShapeSize):
3477         * rendering/RenderBlock.cpp:
3478         (WebCore::RenderBlock::insertFloatingObject): Use the shape outside's bounding box to set the width that is
3479             used for inline layout for the float and it's siblings.
3480         (WebCore::RenderBlock::positionNewFloats): Use the shape outside's bounding box to set the height that
3481             is used for inline layout for the float and it's siblings. Ignore margins when positioning if the float
3482             has shape outside, per the exclusions spec. 
3483         * rendering/RenderBox.cpp:
3484         (WebCore::RenderBox::willBeDestroyed): Clean up associated ExclusionShape.
3485         (WebCore::RenderBox::styleDidChange): Handle style change for shape outside.
3486         (WebCore::RenderBox::updateExclusionShapeOutsideInfoAfterStyleChange): Handle style change for shape outside.
3487         * rendering/RenderBox.h:
3488         (WebCore::RenderBox::exclusionShapeOutsideInfo): Get the ExclusionShapeOutsideInfo associated with this
3489             RenderBox.
3490
3491 2012-12-17  John J. Barton  <johnjbarton@chromium.org>
3492
3493         Web Inspector: Search by selection
3494         https://bugs.webkit.org/show_bug.cgi?id=104970
3495
3496         Reviewed by Vsevolod Vlasov.
3497
3498         Upon activation of the search control, conditionally set input.value to window.getSelection().
3499         For both single file (SearchController) and multifile (AdvancedSearchController).
3500
3501         Test: inspector/editor/text-editor-selection-to-search.html
3502
3503         * inspector/front-end/AdvancedSearchController.js:
3504         (WebInspector.AdvancedSearchController.prototype.show):
3505         (WebInspector.SearchView.prototype.syncToSelection):
3506         * inspector/front-end/SearchController.js:
3507         (WebInspector.SearchController.prototype.showSearchField):
3508
3509 2012-12-17  Eduardo Lima Mitev  <elima@igalia.com>
3510
3511         [GStreamer] Use gst_element_link_pads_full() with CHECK_NOTHING for speed and sanity
3512         https://bugs.webkit.org/show_bug.cgi?id=105181
3513
3514         Reviewed by Philippe Normand.
3515
3516         Replace some calls to gst_pad_link() on request pads, by
3517         gst_element_link_pads_full() with CHECK_NOTHING flag, removing
3518         unnecessary pad compatibility checks and simplifying code.
3519
3520         * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
3521         (webKitWebAudioSrcConstructed): Links audioconvert source with a
3522         requested interleave sink using gst_element_link_pads_full().
3523         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: Links a
3524         requested source pad from videoTee with the queue sink.
3525
3526 2012-12-17  Emil A Eklund  <eae@chromium.org>
3527
3528         Clamp values in LayoutUnit::operator/ when SATURATED_LAYOUT_ARITHMETIC is enabled
3529         https://bugs.webkit.org/show_bug.cgi?id=104955
3530
3531         Reviewed by Julien Chaffraix.
3532
3533         LayoutUnit::operator/ currently does not clamp values and
3534         instead overflows when given a value greater than INT_MAX or
3535         less than INT_MIN. 
3536
3537         Test: TestWebKitAPI/Tests/WebCore/LayoutUnit.cpp
3538
3539         * platform/LayoutUnit.h:
3540         (WebCore::operator/):
3541         Clamp value if SATURATED_LAYOUT_ARITHMETIC is enabled.
3542
3543 2012-12-17  Simon Fraser  <simon.fraser@apple.com>
3544
3545         Don't allow edge TileCache tiles to be larger than necessary
3546         https://bugs.webkit.org/show_bug.cgi?id=105195
3547
3548         Reviewed by Anders Carlsson.
3549
3550         The TileCache would allow edge tiles to be larger than the required size, with the assumption
3551         that the extra space would never be visible. However, for content tiled layers, it can be,
3552         and it doesn't get correctly cleared. So always keep the edge tiles at the specified size.
3553
3554         * platform/graphics/ca/mac/TileCache.mm:
3555         (WebCore::TileCache::revalidateTiles):
3556
3557 2012-12-17  Bem Jones-Bey  <bjonesbe@adobe.com>
3558
3559         [CSS Exclusions] Floats should respect shape-inside on exclusions
3560         https://bugs.webkit.org/show_bug.cgi?id=89261
3561
3562         Reviewed by David Hyatt.
3563
3564         Position floats properly with respect to an exclusion shape. Note that
3565         this will not attempt to position floats in a polygon that has
3566         multiple segments. In the multiple segment case, the floats will be
3567         positioned as if the exclusion did not exist.
3568
3569         Updated an existing test case to test for this.
3570         Test: fast/exclusions/shape-inside/shape-inside-floats-simple.html
3571
3572         * rendering/RenderBlock.cpp:
3573         (WebCore::RenderBlock::computeLogicalLocationForFloat): Adjust the
3574         right and left offsets to take into account the right and left offset
3575         contributed by the exclusion shape.
3576
3577 2012-12-17  Antoine Quint  <graouts@apple.com>
3578
3579         GraphicsLayer's repaint count should update even when debugging option to show it is off
3580         https://bugs.webkit.org/show_bug.cgi?id=105178
3581
3582         Reviewed by Simon Fraser.
3583
3584         Update the repain count even if the debug option to show them is turned off.
3585         This allows the count to be accurate in between toggles of the debug option
3586         and to allow the InspectorLayerTreeAgent to get accurate results any time
3587         the layer tree is requested (see webkit.org/b/105024).
3588
3589         * platform/graphics/mac/WebLayer.mm:
3590         (drawLayerContents):
3591
3592 2012-12-17  Hans Muller  <hmuller@adobe.com>
3593
3594         [CSS Exclusions] Add helper functions for converting floats to LayoutUnits
3595         https://bugs.webkit.org/show_bug.cgi?id=103450
3596
3597         Reviewed by Dirk Schulze.
3598
3599         When a float logicalTop value is converted to a LayoutUnit it's necessary to
3600         use LayoutUnit::fromFloatCeil() to ensure that we're snapping to a value that's
3601         inside the ExclusionShape.  Similarly, to convert a logicalBottom value from
3602         float to LayoutUnit we use LayoutUnit::fromFloatFloor().  Added a pair of private
3603         ExlcusionShapeInsideInfo methods that do the conversions and refactored existing
3604         code to use them.
3605
3606         This is just a cleanup.  No new tests are needed, the existing tests cover
3607         these changes.
3608
3609         * rendering/ExclusionShapeInsideInfo.cpp:
3610         (WebCore::ExclusionShapeInsideInfo::adjustLogicalLineTop): Use the new floatLogicalTopToLayoutUnit() method.
3611         * rendering/ExclusionShapeInsideInfo.h:
3612         (WebCore::ExclusionShapeInsideInfo::shapeLogicalTop): Use the new floatLogicalTopToLayoutUnit() method.
3613         (WebCore::ExclusionShapeInsideInfo::shapeLogicalBottom): Use the new floatLogicalBottomToLayoutUnit() method.
3614         (ExclusionShapeInsideInfo):
3615         (WebCore::ExclusionShapeInsideInfo::floatLogicalTopToLayoutUnit): Convert a float to a LayoutUnit with LayoutUnit::fromFloatCeil().
3616         (WebCore::ExclusionShapeInsideInfo::floatLogicalBottomToLayoutUnit): Convert a float to a LayoutUnit with LayoutUnit::fromFloatFloor().
3617
3618 2012-12-17  Antoine Quint  <graouts@apple.com>
3619
3620         Web Inspector: Provide the paint count of layers through the LayerTreeAgent
3621         https://bugs.webkit.org/show_bug.cgi?id=105024
3622
3623         Reviewed by Pavel Feldman.
3624
3625         We add a new optional .paintCount property to the Layer object, passing through the
3626         relevant information from GraphicsLayer.
3627
3628         * inspector/Inspector.json:
3629         * inspector/InspectorLayerTreeAgent.cpp:
3630         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
3631
3632 2012-12-17  Pavel Feldman  <pfeldman@chromium.org>
3633
3634         Web Inspector: [chromium] make toolbar render with Mountain Lion-friendly colors
3635         https://bugs.webkit.org/show_bug.cgi?id=105177
3636
3637         Reviewed by Vsevolod Vlasov.
3638
3639         * inspector/front-end/UIUtils.js:
3640         (WebInspector.platformFlavor):
3641         * inspector/front-end/inspector.css:
3642         (#toolbar):
3643         (body.dock-to-bottom #toolbar):
3644         (.toolbar-item):
3645
3646 2012-12-17  Andreas Kling  <akling@apple.com>
3647
3648         Attribute: Remove unused constructor and isNull().
3649         <http://webkit.org/b/105179>
3650
3651         Reviewed by Antti Koivisto.
3652
3653         Removed the Attribute constructor that takes a localName rather than a full QualifiedName as that was never used.
3654         Also removed Attribute::isNull(), since that was only called in one place where isNull() will never be true.
3655
3656         * dom/Attribute.h:
3657         * html/HTMLIFrameElement.cpp:
3658         (WebCore::HTMLIFrameElement::collectStyleForPresentationAttribute):
3659
3660 2012-12-17  Anthony Scian  <ascian@rim.com>
3661
3662         [Blackberry] Static code analysis warning fixes
3663         https://bugs.webkit.org/show_bug.cgi?id=105129
3664
3665         Reviewed by Rob Buis.
3666
3667         - alloca can return NULL, recoded to just use a temp var
3668
3669         * plugins/blackberry/PluginViewBlackBerry.cpp:
3670         (WebCore::PluginView::updateBuffer):
3671
3672 2012-12-17  Eugene Klyuchnikov  <eustas@chromium.org>
3673
3674         Web Inspector: Make popover content accessible for clicks.
3675         https://bugs.webkit.org/show_bug.cgi?id=105167
3676
3677         Reviewed by Vsevolod Vlasov.
3678
3679         Currently it is very hard to move mouse pointer inside of popover area.
3680         The only maneuver is to precisely jerk the mouse in direction of popover.
3681
3682         This path makes anchor and popover "active" areas overlap, so it becomes
3683         possible to smoothly move mouse to popover interior.
3684
3685         * inspector/front-end/Popover.js:
3686         (WebInspector.Popover.prototype._innerShow): Make popover "outer" border
3687         an be "active" area.
3688         * inspector/front-end/popover.css: Allow popover "outer" border receive
3689         mouse events.
3690
3691 2012-12-17  Andrey Kosyakov  <caseq@chromium.org>
3692
3693         Web Inspector: Persist Audit selections across sessions
3694         https://bugs.webkit.org/show_bug.cgi?id=103944
3695
3696         Reviewed by Alexander Pavlov.
3697
3698         Make selected audit categories a persistent setting, to simplify life for those
3699         repeatedly running same set of categories.
3700
3701         * inspector/front-end/AuditLauncherView.js:
3702         (WebInspector.AuditLauncherView):
3703         (WebInspector.AuditLauncherView.prototype.addCategory.get var):
3704         (WebInspector.AuditLauncherView.prototype.addCategory):
3705         (WebInspector.AuditLauncherView.prototype._selectAllClicked):
3706         (WebInspector.AuditLauncherView.prototype._categoryClicked):
3707         (WebInspector.AuditLauncherView.prototype._createCategoryElement):
3708
3709 2012-12-17  Zeno Albisser  <zeno@webkit.org>
3710
3711         [Texmap] Drawing of ARB textures broken after r137498.
3712         https://bugs.webkit.org/show_bug.cgi?id=105165
3713
3714         Disable antialiasing for ARB textures after unifying
3715         code paths. We are currently missing a fragment shader
3716         to do antialiasing with ARB textures.
3717
3718         Reviewed by Kenneth Rohde Christiansen.
3719
3720         * platform/graphics/texmap/TextureMapperGL.cpp:
3721         (WebCore::TextureMapperGL::drawTexture):
3722
3723 2012-12-17  Eugene Klyuchnikov  <eustas@chromium.org>
3724
3725         Web Inspector: Popup flickers when cursor moves between elements with same anchor.
3726         https://bugs.webkit.org/show_bug.cgi?id=104992
3727
3728         Reviewed by Pavel Feldman.
3729
3730         Popup disappears and then appears again when mouse pointer traverses
3731         between sub-elements of anchor element.
3732
3733         * inspector/front-end/Popover.js: Split method "_mouseOut".
3734         (WebInspector.PopoverHelper.prototype._popoverMouseOut):
3735         Handler for Popover.
3736         (WebInspector.PopoverHelper.prototype._mouseOut):
3737         Handler for PopoverHelper.
3738
3739 2012-12-12  Andrey Kosyakov  <caseq@chromium.org>
3740
3741         [Chromium] Remove support for TRACE_EVENT_IF_LONGER_THANx macros
3742         https://bugs.webkit.org/show_bug.cgi?id=104784
3743
3744         Reviewed by Pavel Feldman.
3745
3746         - removed TRACE_EVENT_IF_LONGER_THANx macros;
3747         - changed addTraceEvent() to return void, as we no longer need the index of added event.
3748
3749         * platform/EventTracer.h:
3750         (EventTracer):
3751         * platform/chromium/EventTracerChromium.cpp:
3752         (WebCore::EventTracer::addTraceEvent):
3753         * platform/chromium/TraceEvent.h:
3754         (TraceEvent):
3755         (WebCore::TraceEvent::addTraceEvent):
3756         (WebCore::TraceEvent::TraceEndOnScopeClose::addEventIfEnabled):
3757         (Data):
3758
3759 2012-12-17  Kentaro Hara  <haraken@chromium.org>
3760
3761         Unreviewed, rolling out r136794.
3762         http://trac.webkit.org/changeset/136794
3763         https://bugs.webkit.org/show_bug.cgi?id=104203
3764
3765         The GC change can leak memory
3766
3767         * bindings/v8/V8GCController.cpp:
3768         (WebCore):
3769         (WebCore::addImplicitReferencesForNodeWithEventListeners):
3770
3771 2012-12-17  Gabor Rapcsanyi  <rgabor@webkit.org>
3772
3773         Reduce the code size of ARM SIMD in GraphicsContext3D
3774         https://bugs.webkit.org/show_bug.cgi?id=105086
3775
3776         Reviewed by Zoltan Herczeg.
3777
3778         Reduce the code size of ARM SIMD in GraphicsContext3D and change the ARM
3779         namespace to SIMD.
3780
3781         * platform/graphics/GraphicsContext3D.cpp:
3782         (WebCore):
3783         * platform/graphics/cpu/arm/GraphicsContext3DNEON.h:
3784         (WebCore::SIMD::unpackOneRowOfRGBA4444ToRGBA8):
3785         (WebCore::SIMD::packOneRowOfRGBA8ToUnsignedShort4444):
3786         (WebCore::SIMD::unpackOneRowOfRGBA5551ToRGBA8):
3787         (WebCore::SIMD::packOneRowOfRGBA8ToUnsignedShort5551):
3788         (WebCore::SIMD::unpackOneRowOfRGB565ToRGBA8):
3789         (WebCore::SIMD::packOneRowOfRGBA8ToUnsignedShort565):
3790
3791 2012-12-16  Andrey Kosyakov  <caseq@chromium.org>
3792
3793         Web Inspector: frame bars on timeline do not react on hover and double click
3794         https://bugs.webkit.org/show_bug.cgi?id=105153
3795
3796         Reviewed by Alexander Pavlov.
3797
3798         Remove z-index: -100 from #timeline-grid-header, as it prevents mouse events from
3799         reaching frame strip. Use pointer-events: none on frame dividers instead.
3800
3801         * inspector/front-end/timelinePanel.css:
3802         (.timeline .resources-event-divider.timeline-frame-divider):
3803         (#timeline-grid-header):
3804
3805 2012-12-16  Kentaro Hara  <haraken@chromium.org>
3806
3807         [V8] Improve performance of a conversion from WebKit strings to V8 strings
3808         https://bugs.webkit.org/show_bug.cgi?id=105150
3809
3810         Reviewed by Eric Seidel.
3811
3812         V8 provides v8::Weak(isolate) and v8::Local::New(isolate, ...),
3813         which are much faster than v8::Weak() and v8::Local::New().
3814         By using the faster APIs, we can improve performance of a conversion
3815         from a WebKit string to a V8 string. This improves performance of
3816         div.id, div.className, ...and a lot of DOM attributes that return
3817         strings.
3818
3819         [Dromaeo/dom-attr]
3820         120 runs/sec, 120 runs/sec, 118 runs/sec => 125 runs/sec, 123 run/sec, 125 runs/sec (+4.1%)
3821
3822         [Dromaeo/dom-traverse]
3823         94 runs/sec, 94 runs/sec, 96 runs/sec => 107 runs/sec, 105 runs/sec, 107 runs/sec (+12.3%)
3824
3825         [Bindings/id-getter]
3826         356 runs/sec, 356 runs/sec, 341 runs/sec => 423 runs/sec, 424 runs/sec, 424 runs/sec (+20.7%)
3827
3828         No tests. No change in behavior.
3829
3830         * bindings/v8/V8ValueCache.h:
3831         (WebCore::StringCache::v8ExternalString):
3832
3833 2012-12-16  Arvid Nilsson  <anilsson@rim.com>
3834
3835         [BlackBerry] Adapt to new BlackBerry::Platform::TouchPoint API
3836         https://bugs.webkit.org/show_bug.cgi?id=105143
3837         RIM PR 171941
3838
3839         Reviewed by Rob Buis.
3840         Internally reviewed by George Staikos.
3841
3842         TouchPoint instances now provide document coordinates for the viewport
3843         and content position of the touch event. The pixel coordinates stored
3844         in the TouchPoint should no longer be needed in WebKit.
3845
3846         Also adapt to new method names and encapsulation of TouchPoint data
3847         members.
3848
3849         No change in behavior, no new tests.
3850
3851         * platform/blackberry/PlatformTouchPointBlackBerry.cpp:
3852         (WebCore::PlatformTouchPoint::PlatformTouchPoint):
3853
3854 2012-12-16  Eugene Klyuchnikov  <eustas@chromium.org>
3855
3856         Web Inspector: Fix JS compiler warning.
3857         https://bugs.webkit.org/show_bug.cgi?id=105032
3858
3859         Reviewed by Pavel Feldman.
3860
3861         Problem: event handler parameter has actial parameter
3862         type KeyboardEvent, but ".addEventListener" refuses listeners with such
3863         signature.
3864
3865         Solution: explicitly upcast argument type.
3866
3867         * inspector/front-end/ElementsTreeOutline.js: Update JsDocs.
3868
3869 2012-12-16  Tim Horton  <timothy_horton@apple.com>
3870
3871         PDFPlugin: The "Open in Preview" HUD button should work
3872         https://bugs.webkit.org/show_bug.cgi?id=102448
3873         <rdar://problem/12695729>
3874
3875         Reviewed by Alexey Proskuryakov.
3876
3877         Expose createCanonicalUUIDString and UUID.h.
3878
3879         * WebCore.exp.in:
3880         * WebCore.xcodeproj/project.pbxproj:
3881
3882 2012-12-16  Seokju Kwon  <seokju.kwon@gmail.com>
3883
3884         Fix unused parameter compile warnings
3885         https://bugs.webkit.org/show_bug.cgi?id=105089
3886
3887         Reviewed by Kentaro Hara.
3888
3889         Use UNUSED_PARAM macro to fix build warning -Wunused-parameter.
3890
3891         No new tests, no behavior change.
3892
3893         * bindings/js/JSDOMWindowBase.cpp:
3894         (WebCore::JSDOMWindowBase::supportsProfiling):
3895         (WebCore::JSDOMWindowBase::supportsRichSourceInfo):
3896
3897 2012-12-16  Alexey Proskuryakov  <ap@apple.com>
3898
3899         <rdar://problem/12886898> Bundle uploads don't work
3900         https://bugs.webkit.org/show_bug.cgi?id=105149
3901
3902         Reviewed by Sam Weinig.
3903
3904         * WebCore.exp.in: Exported FormData::removeGeneratedFilesIfNeeded().
3905
3906         * platform/network/FormData.cpp:
3907         (WebCore::encodeElement):
3908         (WebCore::decodeElement):
3909         Encode generated file name for archive, too. I'm not entirely sure how this affects other uses
3910         of FormData serialization, but it seems logical that if we encode m_hasGeneratedFiles, we
3911         should also encode their names.
3912
3913 2012-12-16  Hayato Ito  <hayato@chromium.org>
3914
3915         [Shadow DOM] Kill ShadowRoot constructor
3916         https://bugs.webkit.org/show_bug.cgi?id=102913
3917
3918         Reviewed by Dimitri Glazkov.
3919
3920         Re-landing r137408 which breaks browser tests on chromium. I've
3921         updated the browser tests on chromium so that they do not use
3922         WebKitShadowRoot constructor.
3923
3924         No new tests. Updating existing layout tests.
3925
3926         * dom/ShadowRoot.idl:
3927         * page/DOMWindow.idl:
3928
3929 2012-12-16  Jon Lee  <jonlee@apple.com>
3930
3931         Allow built-in PDF plugin and plugin documents to auto-start
3932         https://bugs.webkit.org/show_bug.cgi?id=105000
3933         <rdar://problem/12633351>
3934
3935         Reviewed by Sam Weinig.
3936
3937         Plug-ins in plug-in documents that are in the main frame should always auto-start.
3938
3939         Add a virtual function that returns whether the PluginViewBase should auto-start its plug-in.
3940         Add a callback that gives the HTML plug-in element an opportunity to set the display state
3941         based on the widget.
3942
3943         * plugins/PluginViewBase.h:
3944         (WebCore::PluginViewBase::shouldAlwaysAutoStart): Added. By default returns false.
3945
3946         * html/HTMLPlugInImageElement.cpp:
3947         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Renamed from
3948         subframeLoaderWillLoadPlugIn() for consistency. This call will also be made a little later
3949         in the subframe loader. Adds a check to see if the plug-in is inside a plug-in document
3950         of the main frame. If so, auto-start.
3951         (WebCore::HTMLPlugInImageElement::subframeLoaderDidCreatePlugIn): Given the widget created,
3952         check to see if it should always auto-start. If so, set the display state to Playing. Otherwise
3953         leave the display state alone.
3954         * html/HTMLPlugInImageElement.h:
3955
3956         * loader/SubframeLoader.cpp:
3957         (WebCore::SubframeLoader::requestPlugin): Move the will-load-plug-in call into loadPlugin().
3958         (WebCore::SubframeLoader::loadPlugin): Immediately prior to the plug-in's creation, make the
3959         will-create call. If a plug-in was made, make the did-create call. The did-create call should
3960         be made before setWidget() since that might initialize the plug-in, which could take the display
3961         state into account if being initialized synchronously.
3962
3963 2012-12-16  Huang Dongsung  <luxtella@company100.net>
3964
3965         [TexMap] Perform the layer-tree traversal in GraphicsLayerTextureMapper.
3966         https://bugs.webkit.org/show_bug.cgi?id=103366
3967
3968         Reviewed by Noam Rosenthal.
3969
3970         Currently, Texture Mapper performs the layer-tree traversal in
3971         TextureMapperLayer, while Coordinated Graphics performs the traversal in
3972         CoordinatedGraphicsLayer. This patch makes Texture Mapper perform the
3973         traversal in GraphicsLayerTextureMapper.
3974
3975         Also removed the SyncOptions enum, which is redundant since no client
3976         calls it with ComputationsOnly.
3977
3978         This is in preparation for refactoring TextureMapper to work in an actor
3979         model (http://webkit.org/b/103854).
3980
3981         No new tests. Covered by existing tests.
3982
3983         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
3984         (WebCore::GraphicsLayerTextureMapper::flushCompositingStateForThisLayerOnly):
3985         (WebCore::GraphicsLayerTextureMapper::flushCompositingState):
3986         (WebCore::GraphicsLayerTextureMapper::didFlushCompositingState):
3987         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
3988         (GraphicsLayerTextureMapper):
3989         * platform/graphics/texmap/TextureMapperLayer.cpp:
3990         (WebCore::TextureMapperLayer::flushCompositingStateForThisLayerOnly):
3991         * platform/graphics/texmap/TextureMapperLayer.h:
3992         (TextureMapperLayer):
3993
3994 2012-12-16  Levi Weintraub  <leviw@chromium.org>
3995
3996         Push pixel snapping logic into TransformState
3997         https://bugs.webkit.org/show_bug.cgi?id=101779
3998
3999         Reviewed by Simon Fraser.
4000
4001         The old SnapOffsetForTransforms behavior fell apart when there was content nested in
4002         multiple levels of containers with sub-pixel offsets. The point of this flag was to
4003         mirror the pixel snapping that occurs in paint, where offsets are accumulated bottom-
4004         up through the render tree and snapped at the end. This change eliminates this flag
4005         and pushes pixel snapping logic down into TransformState.
4006
4007         TransformState now tracks a LayoutSize accumulated offset when there's no transform
4008         or we're just translating. We then snap and apply this offset before accumulating
4009         values into a transform, and when returning planar coordinates to callers.
4010
4011         Test: fast/sub-pixel/transformed-iframe-copy-on-scroll.html added,
4012               fast/sub-pixel/sub-pixel-iframe-copy-on-scroll.html modified to also catch this bug.
4013
4014         * platform/graphics/transforms/TransformState.cpp:
4015         (WebCore::TransformState::operator=): Pass accumulated offset.
4016         (WebCore::TransformState::translateTransform): Extracted this functionality for
4017         re-use when applying the accumulated offset, or accumulating from a call to move.
4018         (WebCore::TransformState::translateMappedCoordinates): Same as above when we're not
4019         acculating into a transform.
4020         (WebCore::TransformState::move): Changed to accumulate into m_accumulatedOffset when
4021         not accumulating into a transform.
4022         (WebCore::TransformState::applyAccumulatedOffset):
4023         (WebCore::TransformState::applyTransform): Applies the accumulated offset before the
4024         transform.
4025         (WebCore::TransformState::flatten): Ditto for flattening.
4026         (WebCore::TransformState::mappedPoint): Translates by the accumulated offset before
4027         returning.
4028         (WebCore::TransformState::mappedQuad): Ditto.
4029         * platform/graphics/transforms/TransformState.h:
4030         (TransformState): Added m_accumulatedOffset.
4031         * rendering/RenderGeometryMap.cpp:
4032         (WebCore::RenderGeometryMap::mapToContainer): When not using a transform, we still need
4033         to snap our offset before applying to our float result. Also, flatten when we have a
4034         non-uniform step.
4035         * rendering/RenderGeometryMap.h:
4036         (RenderGeometryMap): Remove use of SnapOffsetForTransforms.
4037
4038         Everything below simply drops the use of SnapOffsetForTransforms:
4039
4040         * dom/ContainerNode.cpp:
4041         (WebCore::ContainerNode::getUpperLeftCorner):
4042         * dom/MouseRelatedEvent.cpp:
4043         (WebCore::MouseRelatedEvent::computeRelativePosition):
4044         * editing/FrameSelection.cpp:
4045         (WebCore::CaretBase::absoluteBoundsForLocalRect):
4046         * editing/RenderedPosition.cpp:
4047         (WebCore::RenderedPosition::absoluteRect):
4048         * editing/VisiblePosition.cpp:
4049         (WebCore::VisiblePosition::absoluteCaretBounds):
4050         * html/HTMLSelectElement.cpp:
4051         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):