[V8] Unify the V8GCController visitors
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-11-01  Adam Barth  <abarth@webkit.org>
2
3         [V8] Unify the V8GCController visitors
4         https://bugs.webkit.org/show_bug.cgi?id=100897
5
6         Reviewed by Eric Seidel.
7
8         After this patch, we use a single visitor for all DOM wrappers,
9         regardless of type. We also visit all the wrappers in one pass by
10         calling v8::V8::VisitHandlesWithClassIds directly rather than via
11         visitAllDOMNodes.
12
13         This patch also introduces a wrapper class ID for non-Node DOM objects.
14         Previously, only DOM nodes had a class ID.
15
16         * bindings/v8/IntrusiveDOMWrapperMap.h:
17         * bindings/v8/ScriptProfiler.cpp:
18         (WebCore::retainedDOMInfo):
19         (WebCore::ScriptProfiler::initialize):
20         * bindings/v8/V8DOMMap.cpp:
21         (WebCore::visitAllDOMNodes):
22         * bindings/v8/V8DOMWrapper.cpp:
23         (WebCore::V8DOMWrapper::setJSWrapperForDOMNode):
24         * bindings/v8/V8DOMWrapper.h:
25         (WebCore::V8DOMWrapper::setJSWrapperForDOMObject):
26         * bindings/v8/V8GCController.cpp:
27         (WebCore::GCHandleVisitor::notifyFinished):
28         (GCHandleVisitor):
29         (WebCore::V8GCController::majorGCPrologue):
30         * bindings/v8/WrapperTypeInfo.h:
31         (WebCore):
32
33 2012-11-01  Stephen White  <senorblanco@chromium.org>
34
35         Unreviewed, rolling out r133143.
36         http://trac.webkit.org/changeset/133143
37         https://bugs.webkit.org/show_bug.cgi?id=96894
38
39         Causing content_browsertests failures
40
41         * CMakeLists.txt:
42         * GNUmakefile.list.am:
43         * Target.pri:
44         * WebCore.gypi:
45         * WebCore.vcproj/WebCore.vcproj:
46         * WebCore.xcodeproj/project.pbxproj:
47         * dom/DeviceOrientationClient.h:
48         (DeviceOrientationClient):
49         * dom/DeviceOrientationController.cpp:
50         (WebCore::DeviceOrientationController::DeviceOrientationController):
51         (WebCore):
52         (WebCore::DeviceOrientationController::~DeviceOrientationController):
53         (WebCore::DeviceOrientationController::timerFired):
54         (WebCore::DeviceOrientationController::addListener):
55         (WebCore::DeviceOrientationController::removeListener):
56         (WebCore::DeviceOrientationController::removeAllListeners):
57         (WebCore::DeviceOrientationController::suspendEventsForAllListeners):
58         (WebCore::DeviceOrientationController::resumeEventsForAllListeners):
59         (WebCore::DeviceOrientationController::didChangeDeviceOrientation):
60         (WebCore::DeviceOrientationController::supplementName):
61         * dom/DeviceOrientationController.h:
62         (WebCore):
63         (DeviceOrientationController):
64         (WebCore::DeviceOrientationController::isActive):
65         (WebCore::DeviceOrientationController::client):
66         (WebCore::DeviceOrientationController::from):
67         * dom/Document.cpp:
68         (WebCore::Document::suspendActiveDOMObjects):
69         (WebCore::Document::resumeActiveDOMObjects):
70         * loader/EmptyClients.h:
71         (WebCore::EmptyDeviceOrientationClient::startUpdating):
72         (WebCore::EmptyDeviceOrientationClient::stopUpdating):
73         * page/DOMWindow.cpp:
74         (WebCore::DOMWindow::addEventListener):
75         (WebCore::DOMWindow::removeEventListener):
76         (WebCore::DOMWindow::removeAllEventListeners):
77         * page/DeviceClient.h: Removed.
78         * page/DeviceController.cpp: Removed.
79         * page/DeviceController.h: Removed.
80
81 2012-11-01  Kondapally Kalyan  <kalyan.kondapally@intel.com>
82
83         [EFL][AC]Free GL resources allocated by GraphicsContext3DEfl.
84         https://bugs.webkit.org/show_bug.cgi?id=100923.
85
86         Reviewed by Kenneth Rohde Christiansen.
87
88         GraphicsContext3DEfl creates FBO's, textures and render buffer's, but doesn't free them.
89         This patch makes sure that GraphicsContext3dEfl frees all the GL resources allocated by it.
90
91         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
92         (WebCore::GraphicsContext3D::~GraphicsContext3D):
93
94 2012-11-01  Andreas Kling  <kling@webkit.org>
95
96         Fix StylePropertySet/ElementAttributeData custom allocation in debug builds.
97         <http://webkit.org/b/100753>
98
99         Unreviewed debug bot crash fix after r133138.
100
101         There's additional padding after StylePropertySet and ElementAttributeData
102         in 64-bit debug builds since there are additional members in RefCountedBase.
103         Use 'sizeof(ImmutableFoo) - sizeof(void*)' as the base size of ImmutableFoo.
104
105         * css/StylePropertySet.cpp:
106         (WebCore::sizeForImmutableStylePropertySetWithPropertyCount):
107         * dom/ElementAttributeData.cpp:
108         (WebCore::sizeForImmutableElementAttributeDataWithAttributeCount):
109         (WebCore::ElementAttributeData::createImmutable):
110         (WebCore::ElementAttributeData::reportMemoryUsage):
111
112 2012-11-01  Stephen Chenney  <schenney@chromium.org>
113
114         FEImage::m_document is never cleared. Why not?
115         https://bugs.webkit.org/show_bug.cgi?id=99243
116
117         Reviewed by Dirk Schulze.
118
119         Adding a comment to explain why the failure to clear m_document is not a problem.
120
121         No new tests because no code change at all.
122
123         * svg/graphics/filters/SVGFEImage.h:
124         (FEImage): Add a comment on the lifetime of m_document.
125
126 2012-11-01  Eugene Klyuchnikov  <eustas.bug@gmail.com>
127
128         Web Inspector: Timeline: make "addRecord" unambiguous
129         https://bugs.webkit.org/show_bug.cgi?id=100761
130
131         Reviewed by Pavel Feldman.
132
133         TimelinePresentationModel.addRecord accepts two parameters:
134         record and parentRecord. parentRecord is always root record.
135         Make this explicit by removing parentRecord parameter.
136
137         * inspector/front-end/TimelinePanel.js: Removed parameter.
138         * inspector/front-end/TimelinePresentationModel.js:
139         (WebInspector.TimelinePresentationModel.prototype.addRecord):
140         Used root recoed instead of parent record.
141
142 2012-11-01  Charles Wei  <charles.wei@torchmobile.com.cn>
143
144         [BlackBerry] Browser prematurely sends wrong credentials
145         https://bugs.webkit.org/show_bug.cgi?id=100585
146
147         Reviewed by George Staikos.
148
149         Don't send credentials to the server before been challenged.
150
151         * platform/network/blackberry/NetworkManager.cpp:
152         (WebCore::NetworkManager::startJob):
153
154 2012-11-01  Stephen Chenney  <schenney@chromium.org>
155
156         SVG as an image may recreate the renderer on zoom
157         https://bugs.webkit.org/show_bug.cgi?id=99508
158
159         Reviewed by Abhishek Arya.
160
161         The SVGImage code, when SVG is used in <img> tags, caches the renderer
162         at the start of the painting method and re-uses the pointer at the end
163         of the method. However, when the page is zoomed the renderer may be
164         detached mid-method, thus leaving a stray pointer. The fix is to
165         re-fetch the pointer after the zooms.
166
167         Test: svg/as-image/img-zoom-svg-stylesheet.html
168
169         * svg/graphics/SVGImage.cpp:
170         (WebCore::SVGImage::drawSVGToImageBuffer): Re-fetch the renderer after
171         the zoom operations.
172
173 2012-11-01  Pavel Feldman  <pfeldman@chromium.org>
174
175         Web Inspector: introduce Inspector.detached message containing termination cause.
176         https://bugs.webkit.org/show_bug.cgi?id=100948
177
178         Reviewed by Yury Semikhatsky.
179
180         Now protocol clients have more information to process connection termination.
181
182         * English.lproj/localizedStrings.js:
183         * inspector/Inspector.json:
184         * inspector/front-end/InspectorFrontendHostStub.js:
185         (WebInspector.RemoteDebuggingTerminatedScreen):
186         * inspector/front-end/inspector.js:
187         (WebInspector.loaded.WebInspector.socket.onopen):
188         (WebInspector.loaded):
189         (WebInspector.detached):
190
191 2012-11-01  Vsevolod Vlasov  <vsevik@chromium.org>
192
193         Web Inspector: Restoring breakpoints for formatted UISourceCode should be triggered by BreakpointManager, not ScriptsPanel.
194         https://bugs.webkit.org/show_bug.cgi?id=100593
195
196         Reviewed by Pavel Feldman.
197
198         BreakpointManager now listen for FormattedChanged event and restores formatted breakpoints on it.
199         Removed now redundant callback from UISourceCode.setFormatted().
200
201         * inspector/front-end/BreakpointManager.js:
202         (WebInspector.BreakpointManager.prototype._restoreBreakpoints):
203         (WebInspector.BreakpointManager.prototype._uiSourceCodeAdded):
204         (WebInspector.BreakpointManager.prototype._uiSourceCodeFormatted):
205         (WebInspector.BreakpointManager.prototype._uiSourceCodeRemoved):
206         * inspector/front-end/ScriptsPanel.js:
207         (WebInspector.ScriptsPanel.prototype._addUISourceCode):
208         (WebInspector.ScriptsPanel.prototype._revealExecutionLine):
209         (WebInspector.ScriptsPanel.prototype._toggleFormatSource):
210         * inspector/front-end/UISourceCode.js:
211         (WebInspector.UISourceCode.prototype._fireContentAvailable):
212         (WebInspector.UISourceCode.prototype.setFormatted.formattedChanged):
213         (WebInspector.UISourceCode.prototype.setFormatted.didGetContent):
214         (WebInspector.UISourceCode.prototype.setFormatted):
215
216 2012-10-30  Yury Semikhatsky  <yurys@chromium.org>
217
218         Web Inspector: Output code evaluated in the console the same as console.log
219         https://bugs.webkit.org/show_bug.cgi?id=100695
220
221         Reviewed by Pavel Feldman.
222
223         Added an option to return object preview from evaluation commands in the protocol.
224         The option is used to generate preview for console eval results.
225
226         * inspector/InjectedScript.cpp:
227         (WebCore::InjectedScript::evaluate):
228         (WebCore::InjectedScript::callFunctionOn):
229         (WebCore::InjectedScript::evaluateOnCallFrame):
230         * inspector/InjectedScript.h:
231         (InjectedScript):
232         * inspector/InjectedScriptSource.js:
233         (.):
234         * inspector/Inspector.json:
235         * inspector/InspectorDebuggerAgent.cpp:
236         (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame):
237         * inspector/InspectorDebuggerAgent.h:
238         (InspectorDebuggerAgent):
239         * inspector/InspectorRuntimeAgent.cpp:
240         (WebCore::InspectorRuntimeAgent::evaluate):
241         (WebCore::InspectorRuntimeAgent::callFunctionOn):
242         * inspector/InspectorRuntimeAgent.h:
243         (InspectorRuntimeAgent):
244         * inspector/front-end/ConsoleMessage.js:
245         (WebInspector.ConsoleMessageImpl.prototype.useArrayPreviewInFormatter):
246         (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsArray):
247         * inspector/front-end/ConsoleView.js:
248         (WebInspector.ConsoleCommandResult.prototype.useArrayPreviewInFormatter):
249         * inspector/front-end/DebuggerModel.js:
250         (WebInspector.DebuggerModel.prototype.evaluateOnSelectedCallFrame):
251         (WebInspector.DebuggerModel.CallFrame.prototype.evaluate):
252         * inspector/front-end/ExtensionServer.js:
253         (WebInspector.ExtensionServer.prototype.evaluate):
254         * inspector/front-end/JavaScriptSourceFrame.js:
255         (WebInspector.JavaScriptSourceFrame.prototype._resolveObjectForPopover):
256         * inspector/front-end/RemoteObject.js:
257         (WebInspector.RemoteObject.prototype.):
258         (WebInspector.RemoteObject.prototype.callFunction):
259         (WebInspector.RemoteObject.prototype.callFunctionJSON):
260         * inspector/front-end/RuntimeModel.js:
261         (WebInspector.RuntimeModel.prototype.evaluate):
262         (WebInspector.RuntimeModel.prototype.evaluated):
263         * inspector/front-end/WatchExpressionsSidebarPane.js:
264         (WebInspector.WatchExpressionsSection.prototype.update):
265
266 2012-11-01  Vsevolod Vlasov  <vsevik@chromium.org>
267
268         Web Inspector: Remove obsolete code from JavaScriptSourceFrame
269         https://bugs.webkit.org/show_bug.cgi?id=100594
270
271         Reviewed by Yury Semikhatsky.
272
273         Removed obsolete WorkingCopyCommitted listener.
274         Removed redundant code that removes breakpoints from _innerSetContent.
275
276         * inspector/front-end/JavaScriptSourceFrame.js:
277         (WebInspector.JavaScriptSourceFrame):
278         (WebInspector.JavaScriptSourceFrame.prototype._innerSetContent):
279
280 2012-11-01  Andreas Kling  <kling@webkit.org>
281
282         Update average StylePropertySet size estimation.
283         <http://webkit.org/b/100940>
284
285         Reviewed by Antti Koivisto.
286
287         Use sizeForImmutableStylePropertySetWithPropertyCount(2) as the average StylePropertySet
288         size to keep it in sync with the changed object memory layout.
289
290         * css/StylePropertySet.cpp:
291         (WebCore::sizeForImmutableStylePropertySetWithPropertyCount):
292         (WebCore::StylePropertySet::createImmutable):
293         (WebCore::StylePropertySet::averageSizeInBytes):
294         (WebCore::StylePropertySet::reportMemoryUsage):
295
296
297 2012-11-01  Kondapally Kalyan  <kalyan.kondapally@intel.com>
298
299         [EFL][Qt][AC] Remove an unnecessary connection to X-Server.
300         https://bugs.webkit.org/show_bug.cgi?id=100628.
301
302         Reviewed by Kenneth Rohde Christiansen.
303
304         With Changset: https://bugs.webkit.org/show_bug.cgi?id=100523
305         GraphicsSurfacePrivate should always use the Display returned by offscreenwindow.
306         However, in GraphicsSurfacePrivate constructor we call XOpenDisplay before asking
307         display from offscreenwindow.
308         This patch removes unnecessary call to XOpenDisplay made in GraphicsSurfacePrivate.
309
310         * platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp:
311         (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
312
313 2012-11-01  Mihnea Ovidenie  <mihnea@adobe.com>
314
315         [CSSRegions]Former auto-height regions should not ignore their defined height
316         https://bugs.webkit.org/show_bug.cgi?id=100749
317
318         Reviewed by Julien Chaffraix.
319
320         When a region with height auto has its height defined, we should also clear the override logical content height.
321         Otherwise, the region will use the wrong height when laying out content from the associated render flow thread.
322
323         Test: fast/regions/autoheight-definedheight-changenotdetected.html
324
325         * rendering/RenderRegion.cpp:
326         (WebCore::RenderRegion::updateRegionHasAutoLogicalHeightFlag):
327
328 2012-11-01  Yury Semikhatsky  <yurys@chromium.org>
329
330         Memory instrumentation: do not report memory occupied by RenderObjects referenced from CSSImageGeneratorValue
331         https://bugs.webkit.org/show_bug.cgi?id=100934
332
333         Reviewed by Alexander Pavlov.
334
335         * css/CSSImageGeneratorValue.cpp:
336         (WTF): Skip rederences to RenderObjects from CSSImageGeneratorValue when collecting
337         memory usage data.
338
339 2012-11-01  Kihong Kwon  <kihong.kwon@samsung.com>
340
341         Add DeviceController base-class to remove duplication of DeviceXXXControler
342         https://bugs.webkit.org/show_bug.cgi?id=96894
343
344         Reviewed by Hajime Morita.
345
346         Add DeviceController which is extracted from DeviceOrientationController to remove duplication.
347         And soon-to-be-added DeviceMotionController and ProximityController.
348
349         Covered by existing tests.
350
351         * CMakeLists.txt:
352         * GNUmakefile.list.am:
353         * Target.pri:
354         * WebCore.gypi:
355         * WebCore.vcproj/WebCore.vcproj:
356         * WebCore.xcodeproj/project.pbxproj:
357         * dom/DeviceOrientationClient.h:
358         * dom/DeviceOrientationController.cpp:
359         Remove member functions to move to DeviceController.
360         - addListener(), removeListener(), removeAllListeners(), isActive()
361         (WebCore::DeviceOrientationController::DeviceOrientationController):
362         (WebCore::DeviceOrientationController::didChangeDeviceOrientation):
363         (WebCore::DeviceOrientationController::client):
364         (WebCore::DeviceOrientationController::hasLastData):
365         (WebCore::DeviceOrientationController::getLastEvent):
366         (WebCore::DeviceOrientationController::from):
367         (WebCore):
368         * dom/DeviceOrientationController.h:
369         (WebCore):
370         (WebCore::DeviceOrientationController::~DeviceOrientationController):
371         (DeviceOrientationController):
372         * dom/Document.cpp:
373         Remove suspendEventsForAllListeners() and resumeEventsForAllListeners() function calls.
374         These calls can be made by checking activeDOMObjectsAreSuspended() and activeDOMObjectsAreStopped() before dispatchEvent.
375         (WebCore::Document::suspendActiveDOMObjects):
376         (WebCore::Document::resumeActiveDOMObjects):
377         * loader/EmptyClients.h:
378         (EmptyDeviceClient):
379         (WebCore::EmptyDeviceClient::startUpdating):
380         (WebCore::EmptyDeviceClient::stopUpdating):
381         (WebCore):
382         * page/DOMWindow.cpp:
383         (WebCore::DOMWindow::addEventListener):
384         (WebCore::DOMWindow::removeEventListener):
385         (WebCore::DOMWindow::removeAllEventListeners):
386         * page/DeviceClient.h: Added.
387         (WebCore):
388         (DeviceClient):
389         (WebCore::DeviceClient::~DeviceClient):
390         * page/DeviceController.cpp: Added.
391         DeviceController has extracted functions from DeviceOrientationController and DeviceMotionController.
392         - addDeviceEventListener(), removeDeviceEventlistener(), removeAllDeviceEventListeners(), dispatchDeviceEvent()
393         All kind of device event controller which has DeviceClient can be inherited from DeviceController.
394         (WebCore):
395         (WebCore::DeviceController::DeviceController):
396         (WebCore::DeviceController::addDeviceEventListener):
397         (WebCore::DeviceController::removeDeviceEventListener):
398         (WebCore::DeviceController::removeAllDeviceEventListeners):
399         (WebCore::DeviceController::dispatchDeviceEvent):
400         (WebCore::DeviceController::fireDeviceEvent):
401         * page/DeviceController.h: Added.
402         (WebCore):
403         (DeviceController):
404         (WebCore::DeviceController::~DeviceController):
405         (WebCore::DeviceController::isActive):
406         (WebCore::DeviceController::client):
407         (WebCore::DeviceController::hasLastData):
408         (WebCore::DeviceController::getLastEvent):
409
410 2012-11-01  Yury Semikhatsky  <yurys@chromium.org>
411
412         Memory instrumentation: report memory occupied by ResourceRequest instead of its base ResourceRequestBase
413         https://bugs.webkit.org/show_bug.cgi?id=100497
414
415         Reviewed by Alexander Pavlov.
416
417         Added memory reporting method to chromium implementation of ResourceRequest.
418
419         * platform/network/ResourceRequestBase.cpp:
420         (WebCore::ResourceRequestBase::reportMemoryUsageBase): Renamed reportMemoryUsage
421         on ResourceRequestBase to reportMemoryUsageBase and made it protected. I'd
422         rather make ResourceRequestBase::reportMemoryUsage virtual and override it
423         in the descendant but ResourceRequestBase doesn't have any virtual methods
424         and shouldn't be used directly(ResourceRequest should be used instead).
425         * platform/network/ResourceRequestBase.h:
426         (ResourceRequestBase):
427         * platform/network/chromium/ResourceRequest.cpp:
428         (WebCore::ResourceRequest::reportMemoryUsage):
429         (WebCore):
430         * platform/network/chromium/ResourceRequest.h:
431         (ResourceRequest):
432
433 2012-11-01  Andreas Kling  <kling@webkit.org>
434
435         Pack immutable StylePropertySets harder on 64-bit.
436         <http://webkit.org/b/100753>
437         <rdar://problem/12599155>
438
439         Reviewed by Antti Koivisto.
440
441         Move away from using CSSProperty as internal storage for immutable StylePropertySets.
442         Instead use two arrays, one for property metadata (ID, shorthand ID, !important, ...)
443         and one for the CSSValue pointers. This saves 4 bytes per property on 64-bit.
444
445         Old object layout:
446
447             Ref count                   (4 bytes)
448             Metadata                    (4 bytes)
449             CSSProperty [N]             (16 bytes each)
450
451         New object layout:
452
453             Ref count                   (4 bytes)
454             Metadata                    (4 bytes)
455             CSSValue* [N]               (8 bytes each)
456             StylePropertyMetadata [N]   (4 bytes each)
457
458         901kB progress on Membuster3 (22% overall reduction in StylePropertySet memory.)
459
460         The CSSProperty class sticks around for now, it's still used in mutable StylePropertySets
461         and by the StylePropertySet constructors.
462
463         * css/CSSProperty.cpp:
464         * css/CSSProperty.h:
465         (CSSProperty):
466         (WebCore::CSSProperty::CSSProperty):
467         (WebCore::CSSProperty::id):
468         (WebCore::CSSProperty::shorthandID):
469         (WebCore::CSSProperty::isImportant):
470         (WebCore::CSSProperty::metadata):
471
472             Break the bitfield from CSSProperty out into a StylePropertyMetadata class (actually a union.)
473
474         * css/StylePropertySet.cpp:
475         (WebCore::immutableStylePropertySetSize):
476
477             Updated size calculation for immutable StylePropertySets, 1/4 smaller!
478
479         (WebCore::ImmutableStylePropertySet::ImmutableStylePropertySet):
480         (WebCore::ImmutableStylePropertySet::~ImmutableStylePropertySet):
481         (WebCore::MutableStylePropertySet::MutableStylePropertySet):
482         (WebCore::StylePropertySet::mergeAndOverrideOnConflict):
483         (WebCore::StylePropertySet::reportMemoryUsage):
484         (WebCore::StylePropertySet::PropertyReference::cssName):
485         (WebCore::StylePropertySet::PropertyReference::cssText):
486         * css/StylePropertySet.h:
487         (WebCore::StylePropertySet::PropertyReference::id):
488         (WebCore::StylePropertySet::PropertyReference::shorthandID):
489         (WebCore::StylePropertySet::PropertyReference::isImportant):
490         (WebCore::StylePropertySet::PropertyReference::isInherited):
491         (WebCore::StylePropertySet::PropertyReference::isImplicit):
492         (PropertyReference):
493         (WebCore::StylePropertySet::PropertyReference::value):
494         (WebCore::StylePropertySet::PropertyReference::toCSSProperty):
495         (WebCore::StylePropertySet::PropertyReference::propertyMetadata):
496         (WebCore::StylePropertySet::PropertyReference::propertyValue):
497         (StylePropertySet):
498         (ImmutableStylePropertySet):
499         (WebCore::StylePropertySet::immutableValueArray):
500         (WebCore::StylePropertySet::immutableMetadataArray):
501
502             Refactored internal storage for StylePropertySet.
503
504 2012-11-01  Kent Tamura  <tkent@chromium.org>
505
506         Remove unused Locale::parseDateTime
507         https://bugs.webkit.org/show_bug.cgi?id=100910
508
509         Reviewed by Kentaro Hara.
510
511         For date/time input types, InputType::convertFromVisibleValue is never
512         called. convertFromVisibleValue is called when an inner editable node is
513         updated. However input elements don't have such editable nodes if
514         ENABLE_INPUT_MULTIPLE_FIELDS_UI is enabled, and a user can't edit the
515         inner editable node otherwise because we open date/time pickers when a
516         user try to change the field value.
517
518         We had used convertFromVisibleValue for input[type=date] with an old UI.
519
520         No new tests because of no behavior changes.
521
522         * html/BaseDateAndTimeInputType.cpp:
523         (WebCore::BaseDateAndTimeInputType::convertFromVisibleValue):
524         Remove Locale::parseDateTiem and put ASSERT_NOT_REACHED.
525
526         * platform/text/PlatformLocale.h: Remove parseDateTime.
527
528         * platform/text/LocaleICU.h: Remove parseDateTime and a bogus comment.
529         * platform/text/LocaleICU.cpp: Remove parseDateTime.
530
531         * platform/text/LocaleNone.cpp: Remove parseDateTime.
532
533         * platform/text/mac/LocaleMac.h: Remove parseDateTime.
534         * platform/text/mac/LocaleMac.mm: Ditto.
535         * platform/text/win/LocaleWin.h:
536         - Remove parseDateTime, its helpers, and m_baseYear.
537         - Remove appendNumber, appendTwoDigitsNumber, appendFourDigitsNumber,
538           and formatDate. They don't exist.
539         * platform/text/win/LocaleWin.cpp:
540         Remove the above functions.
541         (WebCore::LocaleWin::LocaleWin): Remove m_baseYear iniitalization.
542
543 2012-10-31  Nate Chapin  <japhet@chromium.org>
544
545         Remove some CachedResource::Status's in favor of looking at CachedResource::m_error
546         https://bugs.webkit.org/show_bug.cgi?id=100901
547
548         Reviewed by Adam Barth.
549
550         No new tests, refactor only.
551
552         * inspector/InspectorPageAgent.cpp:
553         (WebCore::InspectorPageAgent::buildObjectForFrameTree):
554         * loader/DocumentThreadableLoader.cpp:
555         (WebCore::DocumentThreadableLoader::notifyFinished):
556         * loader/FrameLoader.cpp:
557         (WebCore::FrameLoader::loadInSameDocument):
558         * loader/SubresourceLoader.cpp:
559         (WebCore::SubresourceLoader::didFail):
560         (WebCore::SubresourceLoader::willCancel):
561         * loader/cache/CachedResource.cpp:
562         (WebCore::CachedResource::stopLoading):
563         * loader/cache/CachedResource.h:
564         (WebCore::CachedResource::wasCanceled):
565         (WebCore::CachedResource::errorOccurred):
566         (WebCore::CachedResource::loadFailedOrCanceled):
567
568 2012-10-31  Stephen White  <senorblanco@chromium.org>
569
570         Unreviewed, rolling out r133122.
571         http://trac.webkit.org/changeset/133122
572         https://bugs.webkit.org/show_bug.cgi?id=99083
573
574         Broke Chromium Win, Android, ChromeOS builds
575
576         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
577         (WebCore::GraphicsLayerChromium::setContentsOpaque):
578         (WebCore::GraphicsLayerChromium::paint):
579         * platform/graphics/chromium/OpaqueRectTrackingContentLayerDelegate.cpp:
580         (WebCore::OpaqueRectTrackingContentLayerDelegate::paintContents):
581         * platform/graphics/chromium/OpaqueRectTrackingContentLayerDelegate.h:
582         (OpaqueRectTrackingContentLayerDelegate):
583
584 2012-10-31  Takashi Sakamoto  <tasak@google.com>
585
586         [Refactoring] Move initial style setting for ProgressValueElement from attach method to createShadowSubtree method in HTMLProgressElement.
587         https://bugs.webkit.org/show_bug.cgi?id=83664
588
589         Reviewed by Hajime Morita.
590
591         The original code updates inline style during attach(). However,
592         the attach would be invoked from Element::recalcStyle()'s reattach().
593         If updating inline styles during the reattach(), style related flags,
594         i.e. childNeedsStyleRecalc, and needsStyleRecalc are cleared after the
595         reattach(). So the inline styles are not updated in next
596         setNeedsStyleRecalc, because ProgressValueElement has already had
597         InlineStyleChange (existingChanegType == InlineStyleChange) and
598         markAncestorsWithChildNeedsStyleRecalc is not invoked.
599
600         Test: fast/dom/HTMLProgressElement/progress-bar-set-value.html
601
602         * html/HTMLProgressElement.cpp:
603         (WebCore::HTMLProgressElement::attach):
604         Copied updateFromElement from didElementStateChange. If removing the
605         update, indeterminate-progress-001.html and progress-element.html
606         under fast/dom/HTMLProgressElement will fail. We still need attach()
607         and updateFromElement. To remove the attach(), need more refactoring,
608         i.e. investigating where attach() is invoked from and modifying all
609         related codes.
610         (WebCore::HTMLProgressElement::createShadowSubtree):
611         Initialize m_value by indeterminate-position. The value is default
612         value of progress element.
613
614 2012-10-31  Hayato Ito  <hayato@chromium.org>
615
616         Make resolveReprojection() defined in ComposedShadowTreeWalker.cpp callable from outside.
617         https://bugs.webkit.org/show_bug.cgi?id=100832
618
619         Reviewed by Dimitri Glazkov.
620
621         InsertionPoint.h now defines resolveReprojection() so that it can be called from outside.
622
623         No new tests as no new functionality.
624
625         * dom/ComposedShadowTreeWalker.cpp:
626         * html/shadow/InsertionPoint.h:
627         (WebCore::shadowOfParentForDistribution):
628         (WebCore):
629         (WebCore::resolveReprojection):
630
631 2012-10-31  Alok Priyadarshi  <alokp@chromium.org>
632
633         [chromium] Pass canPaintLCDText to WebContentLayerClient::paintContents
634         https://bugs.webkit.org/show_bug.cgi?id=99083
635
636         Reviewed by James Robinson.
637
638         Use LCD text setting passed to WebContentLayerClient::paintContents instead of turning it off for all composited layers.
639
640         No new tests needed. This patch does not change anything functionally.
641
642         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
643         (WebCore::GraphicsLayerChromium::setContentsOpaque):
644         (WebCore::GraphicsLayerChromium::paint):
645         * platform/graphics/chromium/OpaqueRectTrackingContentLayerDelegate.cpp:
646         (WebCore::OpaqueRectTrackingContentLayerDelegate::paintContents):
647         * platform/graphics/chromium/OpaqueRectTrackingContentLayerDelegate.h:
648         (OpaqueRectTrackingContentLayerDelegate):
649
650 2012-10-31  Chris Evans  <cevans@google.com>
651
652         RenderArena has a memory leak and poor efficiency
653         https://bugs.webkit.org/show_bug.cgi?id=100893
654
655         Reviewed by Eric Seidel.
656
657         1) Avoid memory leak that persists for the Document lifetime by
658         increasing recycled size buckets up to 1024. It was previously 400,
659         and sizeof(RenderNamedFlowThread) / sizeof(RenderSVGText) both blew this
660         quota. An assert was added to prevent this happening again.
661
662         2) Fix the size of the recyled size bucket array on 64-bit. We only
663         need 8 byte granularity on 64-bit, but we had 4.
664
665         3) Try and pass power-of-two sizes to the underlying malloc() call, so
666         that we're space efficient. We now take Arena metadata into account.
667
668         4) Double the default RenderArena size allocation to 8192 bytes. Even
669         for a render of a trivial text file, 4096 bytes is not enough to prevent
670         extra calls into the underlying malloc() for more arena pool.
671
672         * rendering/RenderArena.cpp:
673         (WebCore::RenderArena::RenderArena): Adjust arena size so that we pass on the page-sized multiple to the underlying malloc() implementation.
674         (WebCore::RenderArena::allocate):
675         (WebCore::RenderArena::free): Assert that the allocation size is handled by our recycling buckets.
676         * rendering/RenderArena.h:
677         (WebCore): Maintain free buckets up to 1024 bytes to avoid memory leak.
678         (RenderArena): Double the default allocation size and handle 64-bit systems more efficiently.
679
680 2012-10-31  Adam Barth  <abarth@webkit.org>
681
682         [V8] Garbage collection should use opaque roots rather than implicit references
683         https://bugs.webkit.org/show_bug.cgi?id=100707
684
685         Reviewed by Kentaro Hara.
686
687         This patch replaces visitDOMWrapper with opaqueRootForGC. The
688         former used to inform V8 of implicit relationships between wrapper
689         objects on a per-wrapper basis. That meant that we needed to know which
690         DOMDataStore a given wrapper was in during garbage collection.
691
692         After this patch, we now use object groups rather than implicit
693         references to inform V8 of these relationships. That has two benefits:
694
695         1) We no longer need to know which DOMDataStore a wrapper belongs
696            because we don't need to find the exact source wrapper for the
697            implicit connection.
698
699         2) We can now handle more complicated implicit relationships, for
700            example when some of the intervening objects haven't had their
701            JavaScript wrappers created yet.
702
703         This patch also unlocks to paths of future development:
704         A) Fixing the remaining failures in fast/dom/gc-9.html
705         B) Enumerating DOM wrappers entirely from V8 rather than from the
706            DOMWrapperMaps (so that we can move more object towards using
707            IntrusiveDOMWrapperMaps, which aren't enumerable from WebCore).
708
709         * bindings/scripts/CodeGeneratorV8.pm:
710         (NeedsCustomOpaqueRootForGC):
711         (GenerateOpaqueRootForGC):
712         (GenerateHeader):
713         (GenerateImplementation):
714         * bindings/v8/V8GCController.cpp:
715         (ImplicitConnection):
716         (WebCore::ImplicitConnection::ImplicitConnection):
717         (WebCore::ImplicitConnection::root):
718         (WebCore::ImplicitConnection::wrapper):
719         (WebCore):
720         (WebCore::operator<):
721         (WrapperGrouper):
722         (WebCore::WrapperGrouper::WrapperGrouper):
723         (WebCore::WrapperGrouper::addToGroup):
724         (WebCore::WrapperGrouper::keepAlive):
725         (WebCore::WrapperGrouper::apply):
726         (WebCore::ObjectVisitor::ObjectVisitor):
727         (WebCore::ObjectVisitor::visitDOMWrapper):
728         (ObjectVisitor):
729         (WebCore::V8GCController::opaqueRootForGC):
730         (WebCore::NodeVisitor::NodeVisitor):
731         (WebCore::NodeVisitor::visitNodeWrapper):
732         (NodeVisitor):
733         (WebCore::V8GCController::majorGCPrologue):
734         * bindings/v8/V8GCController.h:
735         (WebCore):
736         (V8GCController):
737         * bindings/v8/WrapperTypeInfo.h:
738         (WebCore):
739         (WebCore::WrapperTypeInfo::opaqueRootForGC):
740         (WrapperTypeInfo):
741         * bindings/v8/custom/V8NodeListCustom.cpp:
742         (WebCore::V8NodeList::opaqueRootForGC):
743         * bindings/v8/custom/V8SpeechRecognitionResultCustom.cpp:
744         (WebCore::V8SpeechRecognitionResult::opaqueRootForGC):
745
746 2012-10-31  Stephen White  <senorblanco@chromium.org>
747
748         Unreviewed, rolling out r133107.
749         http://trac.webkit.org/changeset/133107
750         https://bugs.webkit.org/show_bug.cgi?id=100425
751
752         Broke compile on Chromium Win.
753
754         * Modules/indexeddb/IDBCallbacks.h:
755         (IDBCallbacks):
756         * Modules/indexeddb/IDBDatabase.cpp:
757         (WebCore::IDBDatabase::objectStoreNames):
758         (WebCore::IDBDatabase::createObjectStore):
759         (WebCore::IDBDatabase::deleteObjectStore):
760         (WebCore::IDBDatabase::transaction):
761         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
762         (WebCore::IDBDatabaseBackendImpl::metadata):
763         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
764         (WebCore::IDBDatabaseBackendImpl::objectStore):
765         (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
766         (WebCore::IDBDatabaseBackendImpl::transaction):
767         (WebCore::IDBDatabaseBackendImpl::loadObjectStores):
768         (WebCore::IDBDatabaseBackendImpl::removeObjectStoreFromMap):
769         (WebCore::IDBDatabaseBackendImpl::addObjectStoreToMap):
770         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
771         (IDBDatabaseBackendImpl):
772         * Modules/indexeddb/IDBDatabaseBackendInterface.h:
773         (IDBDatabaseBackendInterface):
774         * Modules/indexeddb/IDBFactory.cpp:
775         * Modules/indexeddb/IDBFactory.h:
776         * Modules/indexeddb/IDBIndex.h:
777         (WebCore::IDBIndex::openKeyCursor):
778         * Modules/indexeddb/IDBIndexBackendInterface.h:
779         * Modules/indexeddb/IDBKeyPath.cpp:
780         * Modules/indexeddb/IDBMetadata.h:
781         (WebCore):
782         (IDBDatabaseMetadata):
783         (WebCore::IDBDatabaseMetadata::IDBDatabaseMetadata):
784         (IDBObjectStoreMetadata):
785         (WebCore::IDBIndexMetadata::IDBIndexMetadata):
786         (IDBIndexMetadata):
787         * Modules/indexeddb/IDBObjectStore.cpp:
788         (WebCore::IDBObjectStore::indexNames):
789         (WebCore::IDBObjectStore::put):
790         (WebCore::IDBObjectStore::createIndex):
791         (WebCore::IDBObjectStore::index):
792         (WebCore::IDBObjectStore::deleteIndex):
793         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
794         (WebCore::IDBObjectStoreBackendImpl::putWithIndexKeys):
795         (WebCore):
796         (WebCore::makeIndexWriters):
797         (WebCore::IDBObjectStoreBackendImpl::setIndexKeys):
798         (WebCore::IDBObjectStoreBackendImpl::setIndexesReady):
799         (WebCore::IDBObjectStoreBackendImpl::setIndexesReadyInternal):
800         (WebCore::IDBObjectStoreBackendImpl::putInternal):
801         (WebCore::IDBObjectStoreBackendImpl::deleteInternal):
802         (WebCore::IDBObjectStoreBackendImpl::createIndex):
803         (WebCore::IDBObjectStoreBackendImpl::index):
804         (WebCore::IDBObjectStoreBackendImpl::deleteIndex):
805         (WebCore::IDBObjectStoreBackendImpl::loadIndexes):
806         (WebCore::IDBObjectStoreBackendImpl::removeIndexFromMap):
807         (WebCore::IDBObjectStoreBackendImpl::addIndexToMap):
808         * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
809         (IDBObjectStoreBackendImpl):
810         * Modules/indexeddb/IDBObjectStoreBackendInterface.h:
811         * Modules/indexeddb/IDBOpenDBRequest.cpp:
812         (WebCore::IDBOpenDBRequest::onUpgradeNeeded):
813         * Modules/indexeddb/IDBRequest.cpp:
814         (WebCore::IDBRequest::onSuccess):
815         (WebCore::IDBRequest::uncaughtExceptionInEventHandler):
816         * Modules/indexeddb/IDBTransaction.cpp:
817         (WebCore::IDBTransaction::create):
818         (WebCore::IDBTransaction::IDBTransaction):
819         (WebCore::IDBTransaction::objectStore):
820         * Modules/indexeddb/IDBTransaction.h:
821         (IDBTransaction):
822         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
823         (WebCore::IDBTransactionBackendImpl::create):
824         (WebCore::IDBTransactionBackendImpl::IDBTransactionBackendImpl):
825         (WebCore::IDBTransactionBackendImpl::objectStore):
826         (WebCore::IDBTransactionBackendImpl::scheduleTask):
827         * Modules/indexeddb/IDBTransactionBackendImpl.h:
828         (IDBTransactionBackendImpl):
829         * Modules/indexeddb/IDBTransactionBackendInterface.h:
830         * Modules/indexeddb/IDBTransactionCoordinator.h:
831
832 2012-10-31  Alec Flett  <alecflett@chromium.org>
833
834         IndexedDB: add methods to support id-based backend APIs
835         https://bugs.webkit.org/show_bug.cgi?id=100425
836
837         Reviewed by Tony Chang.
838
839         First half of refactor involves adding a number of methods that
840         are int64_t-based rather than String-based. As a part of this, the
841         IDB*Metadata structs and the backend objectStore/index maps all
842         use int64_t as keys, rather than String.
843
844         In addition, there were a number of cleanups that came out of the
845         refactor:
846
847         - The list of object stores active in a transaction is now
848           maintained by the frontend IDBTransaction rather than the backend
849           IDBTransactionBackendImpl. This also had a simplifying rippling
850           effect through other call signatures.
851
852         - I was able to remove an apparently old FIXME from
853           IDBTransactionBackendImpl::objectStore and replace it with an ASSERT.
854
855         - IDBObjectStoreBackendImpl's IndexWriter class got a little
856           simpler since the id is now easily available in the
857           IDBIndexMetadata.
858
859         - A number of methods got simpler in their int64_t versions,
860           specifically dropping a number of ExceptionCodes.
861
862         There is also some glue code
863         (getIndexId/getIndexIds/getObjectStoreId) that will go away with
864         the 2nd half of this: https://bugs.webkit.org/show_bug.cgi?id=100425
865
866         No new tests, no new functionality as this is just a refactor.
867
868         * Modules/indexeddb/IDBDatabase.cpp:
869         (WebCore::IDBDatabase::objectStoreNames):
870         (WebCore::IDBDatabase::createObjectStore):
871         (WebCore::IDBDatabase::deleteObjectStore):
872         (WebCore::IDBDatabase::transaction):
873         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
874         (WebCore::IDBDatabaseBackendImpl::metadata):
875         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
876         (WebCore::IDBDatabaseBackendImpl::objectStore):
877         (WebCore::IDBDatabaseBackendImpl::getObjectStoreId):
878         (WebCore):
879         (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
880         (WebCore::IDBDatabaseBackendImpl::transaction):
881         (WebCore::IDBDatabaseBackendImpl::loadObjectStores):
882         (WebCore::IDBDatabaseBackendImpl::removeObjectStoreFromMap):
883         (WebCore::IDBDatabaseBackendImpl::addObjectStoreToMap):
884         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
885         (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
886         (IDBDatabaseBackendImpl):
887         * Modules/indexeddb/IDBDatabaseBackendInterface.h:
888         (IDBDatabaseBackendInterface):
889         * Modules/indexeddb/IDBIndex.h:
890         (WebCore::IDBIndex::id):
891         (WebCore::IDBIndex::openKeyCursor):
892         * Modules/indexeddb/IDBIndexBackendInterface.h:
893         * Modules/indexeddb/IDBMetadata.h:
894         (WebCore::IDBIndexMetadata::IDBIndexMetadata):
895         (IDBIndexMetadata):
896         (IDBObjectStoreMetadata):
897         (WebCore::IDBObjectStoreMetadata::containsIndex):
898         (IDBDatabaseMetadata):
899         (WebCore::IDBDatabaseMetadata::IDBDatabaseMetadata):
900         (WebCore::IDBDatabaseMetadata::containsObjectStore):
901         * Modules/indexeddb/IDBObjectStore.cpp:
902         (WebCore::IDBObjectStore::indexNames):
903         (WebCore::IDBObjectStore::put):
904         (WebCore::IDBObjectStore::createIndex):
905         (WebCore::IDBObjectStore::index):
906         (WebCore::IDBObjectStore::deleteIndex):
907         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
908         (WebCore::IDBObjectStoreBackendImpl::put):
909         (WebCore::IDBObjectStoreBackendImpl::putWithIndexKeys):
910         (WebCore):
911         (WebCore::makeIndexWriters):
912         (WebCore::IDBObjectStoreBackendImpl::setIndexKeys):
913         (WebCore::IDBObjectStoreBackendImpl::setIndexesReady):
914         (WebCore::IDBObjectStoreBackendImpl::setIndexesReadyInternal):
915         (WebCore::IDBObjectStoreBackendImpl::putInternal):
916         (WebCore::IDBObjectStoreBackendImpl::deleteInternal):
917         (WebCore::IDBObjectStoreBackendImpl::createIndex):
918         (WebCore::IDBObjectStoreBackendImpl::index):
919         (WebCore::IDBObjectStoreBackendImpl::getIndexId):
920         (WebCore::IDBObjectStoreBackendImpl::getIndexIds):
921         (WebCore::IDBObjectStoreBackendImpl::deleteIndex):
922         (WebCore::IDBObjectStoreBackendImpl::loadIndexes):
923         (WebCore::IDBObjectStoreBackendImpl::removeIndexFromMap):
924         (WebCore::IDBObjectStoreBackendImpl::addIndexToMap):
925         * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
926         (IDBObjectStoreBackendImpl):
927         * Modules/indexeddb/IDBObjectStoreBackendInterface.h:
928         * Modules/indexeddb/IDBOpenDBRequest.cpp:
929         (WebCore::IDBOpenDBRequest::onUpgradeNeeded):
930         * Modules/indexeddb/IDBRequest.cpp:
931         (WebCore::IDBRequest::onSuccess):
932         (WebCore::IDBRequest::uncaughtExceptionInEventHandler):
933         * Modules/indexeddb/IDBTransaction.cpp:
934         (WebCore::IDBTransaction::create):
935         (WebCore::IDBTransaction::IDBTransaction):
936         (WebCore::IDBTransaction::objectStore):
937         * Modules/indexeddb/IDBTransaction.h:
938         (IDBTransaction):
939         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
940         (WebCore::IDBTransactionBackendImpl::create):
941         (WebCore::IDBTransactionBackendImpl::IDBTransactionBackendImpl):
942         (WebCore::IDBTransactionBackendImpl::objectStore):
943         (WebCore):
944         (WebCore::IDBTransactionBackendImpl::scheduleTask):
945         * Modules/indexeddb/IDBTransactionBackendImpl.h:
946         (IDBTransactionBackendImpl):
947         * Modules/indexeddb/IDBTransactionBackendInterface.h:
948
949 2012-10-30  Mark Lam  <mark.lam@apple.com>
950
951         A JSC printf (support for %J+s and %b).
952         https://bugs.webkit.org/show_bug.cgi?id=100566.
953
954         Reviewed by Michael Saboff.
955
956         Added forwarding header for VMInspector.h.
957
958         No new tests needed for this.
959
960         * ForwardingHeaders/interpreter/VMInspector.h: Added.
961
962 2012-10-31  Chris Rogers  <crogers@google.com>
963
964         Implement optional arguments in AudioBufferSourceNode start() method
965         https://bugs.webkit.org/show_bug.cgi?id=100894
966
967         Reviewed by Kenneth Russell.
968
969         The start() method should be able to take 1, 2, or 3 arguments, optionally supporting
970         offset and duration.  Currently, only 1 and 3 arguments are supported.
971
972         Test: webaudio/audiobuffersource-start.html
973
974         * Modules/webaudio/AudioBufferSourceNode.cpp:
975         (WebCore::AudioBufferSourceNode::renderFromBuffer):
976         (WebCore::AudioBufferSourceNode::startGrain):
977         (WebCore):
978         * Modules/webaudio/AudioBufferSourceNode.h:
979         (AudioBufferSourceNode):
980         * Modules/webaudio/AudioBufferSourceNode.idl:
981
982 2012-10-31  Mike West  <mkwst@chromium.org>
983
984         Implement the canonical "Content-Security-Policy" header.
985         https://bugs.webkit.org/show_bug.cgi?id=96765
986
987         Reviewed by Adam Barth.
988
989         The CSP 1.0 specification defines the "Content-Security-Policy" header
990         as the canonical mechanism of defining a resource's security policy. Up
991         through this patch, we've implemented the functionality behind a prefix
992         in order to ensure compatibility with the standard once it's released as
993         a recommendation. Both the specification and WebKit's implementation are
994         far enough along in that process that it makes sense to support the
995         unprefixed header for sites that wish to opt-in to CSP 1.0.
996
997         As discussed on public-webappsec[1], we'll keep the experimental 1.1
998         features behind the prefixed header ('X-WebKit-CSP') until that standard
999         is far enough along to justify moving them out to the canonical header.
1000
1001         This patch defines the 'Content-Security-Policy' header for all ports,
1002         just as the 'X-WebKit-CSP' header is currently supported on all ports.
1003         Ports that have not opted-in to the CSP_NEXT flag will see exactly the
1004         same behavior with both headers. Ports that have opted-in will see much
1005         of CSP 1.1's current definition on the prefixed header, and CSP 1.0 on
1006         the canonical header.
1007
1008         The functionality in this change is covered by the changes made to
1009         existing tests. No expectations changed, only the headers that are sent.
1010
1011         * dom/Document.cpp:
1012         (WebCore::Document::processHttpEquiv):
1013             Add canonical header support to 'meta' element definitions.
1014         * loader/FrameLoader.cpp:
1015         (WebCore::FrameLoader::didBeginDocument):
1016             Add canonical header support to FrameLoader.
1017         * page/ContentSecurityPolicy.cpp:
1018         (WebCore::CSPDirectiveList::headerType):
1019             The ContentSecurityPolicy::HeaderType enum now has four values:
1020             prefixed/report-only, unprefixed/report-only, prefixed/enforce, and
1021             unprefixed/enforce. Instead of creating logic to output the proper
1022             type based on internal flags, CSPDirectiveList now saves the value
1023             provided at creation time, and returns it via this method.
1024         (CSPDirectiveList):
1025         (WebCore::CSPDirectiveList::CSPDirectiveList):
1026             The constructor now accepts a type, which is stored on the object.
1027             It also stores a new internal variable, 'm_experimental', which
1028             defines whether or not experimental features ought to be available.
1029             These features are still locked behind the CSP_NEXT flag, but that
1030             might not be the case forever.
1031         (WebCore::CSPDirectiveList::create):
1032             The static constructor wrapper now passes the type into the real
1033             constructor, which also now handles setting its internal variables.
1034         (WebCore::CSPDirectiveList::parse):
1035             'parse()' is given the header, so it makes sense to store it here as
1036             well, rather than in the create wrapper.
1037         (WebCore::CSPDirectiveList::addDirective):
1038             1.1 directives remain locked behind CSP_NEXT, but now also require
1039             that 'm_experimental' is set, signaling usage of the prefixed header
1040             and an implicit opt-in to 1.1.
1041         * page/ContentSecurityPolicy.h:
1042             Added two new types to the HeaderTypes enum: PrefixedReportOnly, and
1043             PrefixedEnforcePolicy. These map to 'X-WebKitCSP-Report-Only' and
1044             'X-WebKit-CSP', respectively.
1045
1046 2012-10-31  Roger Fong  <roger_fong@apple.com>
1047
1048         Change PopupMenu positioning on Windows such that behaviour on multiple monitors matches Windows standards.
1049         https://bugs.webkit.org/show_bug.cgi?id=100317
1050
1051         Reviewed by Sam Weinig.
1052
1053         The existing code determines which screen the popup menu "belongs" to by determining which screen the owning application's hwnd belongs to,
1054         where ownership is determined by how much of the hwnd is on which screen.
1055         To match what most Windows applications do, the owning screen should be whichever screen the drop down button belongs to.
1056         To determine which screen an element belongs to in Windows we need to pass in an hwnd for that element.
1057         However, since the drop down button is something that WebKit renders there is no hwnd.
1058
1059         To remedy this issue, we can temporarily move the popup menu's hwnd to match the position and size of the button,
1060         determine the correct screen, and then eventually move it back to the correct final position after the rest of 
1061         the calculations have been completed. This is all done in the same function call so no rendering of the popup menu occurs
1062         between the temporary and final positionings.
1063
1064         There's not really a good way of testing popup menus except manually, they're separate hwnds created outside of the WebView.
1065
1066         * platform/win/PopupMenuWin.cpp:
1067         (WebCore::monitorFromHwnd):
1068         (WebCore):
1069         (WebCore::PopupMenuWin::show):
1070         (WebCore::PopupMenuWin::calculatePositionAndSize):
1071
1072 2012-10-31  Thiago Marcos P. Santos  <thiago.santos@intel.com>
1073
1074         Added viewport at-rule to the CSS parser and tokenizer
1075         https://bugs.webkit.org/show_bug.cgi?id=95961
1076
1077         Reviewed by Kenneth Rohde Christiansen.
1078
1079         Add tokens and grammar rules to parse @-webkit-viewport blocks. Also add
1080         the newly parsed rule to the rule list.
1081
1082         This parser now implements the following part of the CSS Device Adaptation
1083         specification: http://www.w3.org/TR/css-device-adapt/#syntax
1084
1085         Test: css3/device-adapt/viewport-at-rule-parsing.html
1086
1087         * CMakeLists.txt:
1088         * GNUmakefile.list.am:
1089         * Target.pri:
1090         * WebCore.gypi:
1091         * WebCore.vcproj/WebCore.vcproj:
1092         * WebCore.xcodeproj/project.pbxproj:
1093         * css/CSSGrammar.y.in:
1094         * css/CSSParser.cpp:
1095         (WebCore::CSSParser::CSSParser):
1096         (WebCore::CSSParser::detectAtToken):
1097         (WebCore):
1098         (WebCore::CSSParser::createViewportRule):
1099         * css/CSSParser.h:
1100         (CSSParser):
1101         (WebCore::CSSParser::markViewportRuleBodyStart):
1102         (WebCore::CSSParser::markViewportRuleBodyEnd):
1103         (WebCore::CSSParser::inViewport):
1104
1105             These methods are needed by the next patch validating the properties.
1106             Some viewport properties are common to other rules but have different
1107             semantics, and accepts different keywords. The validation needs to be
1108             done in a different code path.
1109
1110         * css/CSSPropertySourceData.h:
1111         * css/CSSRule.cpp:
1112         (WebCore):
1113         (WebCore::CSSRule::cssText):
1114         (WebCore::CSSRule::destroy):
1115         (WebCore::CSSRule::reattach):
1116         (WebCore::CSSRule::reportMemoryUsage):
1117         * css/CSSRule.h:
1118         (CSSRule):
1119         (WebCore::CSSRule::isViewportRule):
1120         * css/StyleRule.cpp:
1121         (WebCore::StyleRuleBase::reportMemoryUsage):
1122         (WebCore::StyleRuleBase::destroy):
1123         (WebCore::StyleRuleBase::copy):
1124         (WebCore::StyleRuleBase::createCSSOMWrapper):
1125         (WebCore):
1126         (WebCore::StyleRuleViewport::StyleRuleViewport):
1127         (WebCore::StyleRuleViewport::~StyleRuleViewport):
1128         (WebCore::StyleRuleViewport::mutableProperties):
1129         (WebCore::StyleRuleViewport::setProperties):
1130         (WebCore::StyleRuleViewport::reportDescendantMemoryUsage):
1131         * css/StyleRule.h:
1132         (StyleRuleBase):
1133         (WebCore::StyleRuleBase::isViewportRule):
1134         (WebCore):
1135         (StyleRuleViewport):
1136         (WebCore::StyleRuleViewport::create):
1137         (WebCore::StyleRuleViewport::properties):
1138         (WebCore::StyleRuleViewport::copy):
1139         * css/WebKitCSSViewportRule.cpp: Added.
1140         (WebCore):
1141         (WebCore::WebKitCSSViewportRule::WebKitCSSViewportRule):
1142         (WebCore::WebKitCSSViewportRule::~WebKitCSSViewportRule):
1143         (WebCore::WebKitCSSViewportRule::style):
1144         (WebCore::WebKitCSSViewportRule::cssText):
1145         (WebCore::WebKitCSSViewportRule::reattach):
1146         (WebCore::WebKitCSSViewportRule::reportDescendantMemoryUsage):
1147         * css/WebKitCSSViewportRule.h: Added.
1148         (WebCore):
1149
1150 2012-10-31  Max Vujovic  <mvujovic@adobe.com>
1151
1152         [CSS Shaders] Validate types of built-in uniforms
1153         https://bugs.webkit.org/show_bug.cgi?id=98974
1154
1155         Reviewed by Dean Jackson.
1156
1157         Reject shaders which define built-in uniforms with the wrong type. For example, we reject a
1158         shader with the GLSL code "uniform float u_textureSize;" because u_textureSize should be a
1159         vec2, not a float.
1160
1161         Relevant Spec Section:
1162         https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html#shader-uniform-variables
1163
1164         Test: css3/filters/custom/invalid-custom-filter-uniform-types.html
1165
1166         * platform/graphics/filters/CustomFilterValidatedProgram.cpp:
1167         (WebCore):
1168         (WebCore::builtInUniformNameToTypeMap):
1169         (WebCore::validateSymbols):
1170
1171 2012-10-31  Sheriff Bot  <webkit.review.bot@gmail.com>
1172
1173         Unreviewed, rolling out r133044.
1174         http://trac.webkit.org/changeset/133044
1175         https://bugs.webkit.org/show_bug.cgi?id=100888
1176
1177         Hits an ASSERT in the isolatedWorlds tests (Requested by
1178         abarth on #webkit).
1179
1180         * bindings/scripts/CodeGeneratorV8.pm:
1181         (NeedsToVisitDOMWrapper):
1182         (GenerateVisitDOMWrapper):
1183         (GenerateHeader):
1184         (GenerateImplementation):
1185         * bindings/v8/V8GCController.cpp:
1186         (WebCore::ObjectVisitor::ObjectVisitor):
1187         (WebCore::ObjectVisitor::visitDOMWrapper):
1188         (ObjectVisitor):
1189         (WebCore::rootForGC):
1190         (ImplicitConnection):
1191         (WebCore::ImplicitConnection::ImplicitConnection):
1192         (WebCore::ImplicitConnection::root):
1193         (WebCore::ImplicitConnection::wrapper):
1194         (WebCore):
1195         (WebCore::operator<):
1196         (WebCore::NodeVisitor::NodeVisitor):
1197         (WebCore::NodeVisitor::visitNodeWrapper):
1198         (NodeVisitor):
1199         (WebCore::NodeVisitor::applyGrouping):
1200         (WebCore::V8GCController::majorGCPrologue):
1201         * bindings/v8/V8GCController.h:
1202         (V8GCController):
1203         * bindings/v8/WrapperTypeInfo.h:
1204         (WebCore):
1205         (WebCore::WrapperTypeInfo::visitDOMWrapper):
1206         (WrapperTypeInfo):
1207         * bindings/v8/custom/V8NodeListCustom.cpp:
1208         (WebCore::V8NodeList::visitDOMWrapper):
1209         * bindings/v8/custom/V8SpeechRecognitionResultCustom.cpp:
1210         (WebCore::V8SpeechRecognitionResult::visitDOMWrapper):
1211
1212 2012-10-31  Philip Rogers  <pdr@google.com>
1213
1214         Cache animationMode() in SVG animations.
1215         https://bugs.webkit.org/show_bug.cgi?id=99694
1216
1217         Reviewed by Eric Seidel.
1218
1219         This patch caches animationMode() which accounted for 25% of the CPU time of a simple
1220         animation benchmark! This is the 3rd patch for WK99694.
1221
1222         Background: SVGAnimationElement contains most of the shared animation logic for <animate>,
1223         <set>, <animateColor>, <animateTransform>, and <animateMotion>. <animateMotion> is the only
1224         animation element that can depend on other elements in the page. For example:
1225         <path id="mypath" d="M0 0 L 100 100Z"/> <!-- note, can be animated! -->
1226         <rect x="0" y="0" width="100" height="100" fill="green">
1227             <animateMotion dur="6s" repeatCount="indefinite">
1228                 <mpath xlink:href="#mypath"/>
1229             </animateMotion>
1230         </rect>
1231         See: http://www.w3.org/TR/SVG/single-page.html#animate-AnimateMotionElement
1232
1233         animationMode depends on several properties of an animation element: the set tag, whether
1234         the animation has a path, and the "values", "to", and "by" attributes. animationMode() was
1235         a hot function for two reasons:
1236         1) hasAttribute(SVGNames::valuesAttr) is expensive because we are unable to use
1237            fastHasAttribute. This is cacheable by simply calculating the animationMode when the
1238            "values" attribute changes.
1239         2) In the <animateMotion> case, determining if a path is empty or changed is expensive.
1240            AnimateMotion can have a path attribute, or it can have <mpath> children that reference
1241            a (possibly non-existent) <path> element elsewhere in the page. Before this patch we did
1242            this path lookup on every animation loop in case something changed. After this patch we
1243            only update AnimateMotion's path when it changes.
1244
1245         A previous patch, http://trac.webkit.org/changeset/132847, laid the groundwork for tracking
1246         <path> changes in <mpath>. This patch adds <mpath> to our resource tracking infrastructure
1247         to track when target <path>s change, instead of looking this up every time.
1248
1249         This refactoring is covered by existing tests.
1250         svg/animations/mozilla/animateMotion-mpath-targetChange-1.svg fails after this patch
1251         because our element dependency tracking has a bug with duplicate ids; see WK99893.
1252
1253         * svg/SVGAnimateMotionElement.cpp:
1254         (WebCore::SVGAnimateMotionElement::parseAttribute):
1255         (WebCore::SVGAnimateMotionElement::updateAnimationPath):
1256
1257             animationPath() has been changed to updateAnimationPath() and should only be called
1258             when the animation path (path attribute, or mpath's referenced path) has changed.
1259
1260         (WebCore::SVGAnimateMotionElement::buildTransformForProgress):
1261         (WebCore::SVGAnimateMotionElement::updateAnimationMode):
1262
1263             If an animationPath exists, we use PathAnimation, otherwise we fall back to the normal
1264             updateAnimationMode() codepath.
1265
1266         (WebCore):
1267         * svg/SVGAnimateMotionElement.h:
1268         (SVGAnimateMotionElement):
1269         * svg/SVGAnimationElement.cpp:
1270         (WebCore::SVGAnimationElement::SVGAnimationElement):
1271         (WebCore::SVGAnimationElement::isSupportedAttribute):
1272         (WebCore::SVGAnimationElement::parseAttribute):
1273
1274             The from, by, and to attributes have been added so that we can track when they change
1275             and update the animation mode. Similarly for when the values attribute changes.
1276
1277         (WebCore::SVGAnimationElement::updateAnimationMode):
1278         * svg/SVGAnimationElement.h:
1279         (WebCore::SVGAnimationElement::animationMode):
1280         (SVGAnimationElement):
1281         (WebCore::SVGAnimationElement::setAnimationMode):
1282         (WebCore::SVGAnimationElement::calculateDistance):
1283         * svg/SVGMPathElement.cpp:
1284         (WebCore::SVGMPathElement::buildPendingResource):
1285
1286             It would be nice to move all the duplicated buildPendingResource() logic into a central
1287             place (SVGURIReference?) but for now it is copied. This function is nearly identical to
1288             SVGFEImageElement::buildPendingResource.
1289
1290         (WebCore):
1291         (WebCore::SVGMPathElement::clearResourceReferences):
1292         (WebCore::SVGMPathElement::insertedInto):
1293         (WebCore::SVGMPathElement::removedFrom):
1294         (WebCore::SVGMPathElement::svgAttributeChanged):
1295         (WebCore::SVGMPathElement::targetPathChanged):
1296         (WebCore::SVGMPathElement::notifyParentOfPathChange):
1297         * svg/SVGMPathElement.h:
1298         (SVGMPathElement):
1299         * svg/SVGPathElement.cpp:
1300
1301             When a <path>'s path changes, we need to notify any dependent <mpath> elements. This is
1302             typically handled with RenderSVGResource::markForLayoutAndParentResourceInvalidation
1303             but for the special-case of <mpath> we only need to track when the path's "d" attribute
1304             changes so invalidateMPathDependencies() has been added.
1305
1306         (WebCore::SVGPathElement::svgAttributeChanged):
1307         (WebCore::SVGPathElement::invalidateMPathDependencies):
1308         (WebCore):
1309         (WebCore::SVGPathElement::insertedInto):
1310         (WebCore::SVGPathElement::removedFrom):
1311         * svg/SVGPathElement.h:
1312         (SVGPathElement):
1313         * svg/SVGSetElement.cpp:
1314         (WebCore::SVGSetElement::SVGSetElement):
1315         (WebCore::SVGSetElement::updateAnimationMode):
1316         (WebCore):
1317         * svg/SVGSetElement.h:
1318         (SVGSetElement):
1319         * svg/animation/SVGSMILElement.cpp:
1320         (WebCore::SVGSMILElement::isSupportedAttribute):
1321
1322 2012-10-31  Beth Dakin  <bdakin@apple.com>
1323
1324         https://bugs.webkit.org/show_bug.cgi?id=100879
1325         ScrollingStateNode::cloneAndResetNode() should not be virtual
1326
1327         Reviewed by Simon Fraser.
1328
1329         cloneAndResetNode() is currently pure virtual and implemented only 
1330         in ScrollingStateScrollingNode. However, all of the work that it 
1331         does at this time is stuff that a generic ScrollingStateNode could 
1332         do. We should move this implementation to the base class so that it 
1333         does not need to be duplicated for future node types.
1334
1335         This patch also re-names cloneAndResetNode() to cloneAndReset()
1336         and correspondingly re-names cloneAndResetChildNodes() to 
1337         cloneAndResetChildren(). 
1338
1339         Finally the patch also changes the copy constructors of both of these 
1340         classes to take a const reference instead of a pointer.
1341
1342         * page/scrolling/ScrollingStateNode.cpp:
1343         (WebCore::ScrollingStateNode::ScrollingStateNode):
1344         (WebCore::ScrollingStateNode::cloneAndReset):
1345         (WebCore):
1346         (WebCore::ScrollingStateNode::cloneAndResetChildren):
1347         * page/scrolling/ScrollingStateNode.h:
1348         (ScrollingStateNode):
1349         * page/scrolling/ScrollingStateScrollingNode.cpp:
1350         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
1351         (WebCore):
1352         * page/scrolling/ScrollingStateScrollingNode.h:
1353         (ScrollingStateScrollingNode):
1354         * page/scrolling/ScrollingStateTree.cpp:
1355         (WebCore::ScrollingStateTree::commit):
1356
1357 2012-10-31  Tom Sepez  <tsepez@chromium.org>
1358         
1359         Malformed X-XSS-Protection headers not reported.
1360         https://bugs.webkit.org/show_bug.cgi?id=100538
1361
1362         Reviewed by Adam Barth.
1363
1364         Re-writes X-XSS-Protection header parser to be more particular, and to
1365         return better information on error.
1366
1367         Tests: http/tests/security/xssAuditor/malformed-xss-protection-header-1.html
1368                http/tests/security/xssAuditor/malformed-xss-protection-header-2.html
1369                http/tests/security/xssAuditor/malformed-xss-protection-header-4.html
1370                http/tests/security/xssAuditor/xss-protection-parsing-02.html
1371
1372         * html/parser/XSSAuditor.cpp:
1373         (WebCore::XSSAuditor::init):
1374         Detect error return code and log console message with details
1375         * platform/network/HTTPParsers.cpp:
1376         (WebCore):
1377         (WebCore::skipWhiteSpace):
1378         Use safe less-than comparsion in case called with pos already out of range.
1379         (WebCore::skipToken):
1380         Fix comparison to properly reject substrings at end of input.  Prevent advancing
1381         returned position when match fails, so that this may someday be used to match
1382         optional tokens.
1383         (WebCore::parseXSSProtectionHeader):
1384         Return detailled error status. Avoid needless string copy.
1385         * platform/network/HTTPParsers.h:
1386         Add new error returns for x-xss-protection header parser.
1387         
1388 2012-10-31  Simon Fraser  <simon.fraser@apple.com>
1389
1390         REGRESSION (tile cache layers): bits of tiled layers are missing with certain 3D transforms
1391         https://bugs.webkit.org/show_bug.cgi?id=100808
1392         <rdar://problem/12562541>
1393
1394         Reviewed by Dean Jackson.
1395
1396         When projecting rects down into transformed layers, the projection can fail with severe
1397         3D rotations if the computed w component in TransformationMatrix::projectPoint() is negative.
1398         In this case we already clamp, but the fact that we clamped doesn't make it out to
1399         GraphicsLayerCA::computeVisibleRect() which resulted in incorrect visible rects being
1400         computed.
1401         
1402         Fix by propagating the fact that clamping occurred out of the TransformState functions
1403         which can clamp. In computeVisibleRect(), simply consider the entire layer bounds
1404         to be visible if clamping occurred.
1405
1406         Tests: compositing/tiling/rotated-tiled-clamped.html
1407                compositing/tiling/rotated-tiled-preserve3d-clamped.html
1408
1409         * platform/graphics/ca/GraphicsLayerCA.cpp:
1410         (WebCore::GraphicsLayerCA::computeVisibleRect): If either the applyTransform()
1411         or the state.mappedQuad() clamped, use our bounds as the visible rect.
1412         * platform/graphics/transforms/TransformState.cpp:
1413         (WebCore::TransformState::applyTransform): Pass out clamping state.
1414         (WebCore::TransformState::flatten): Ditto.
1415         (WebCore::TransformState::mappedPoint): Ditto.
1416         (WebCore::TransformState::mappedQuad): Ditto.
1417         (WebCore::TransformState::flattenWithTransform): Ditto. No need to initialize
1418         wasClamped, since this function is internal.
1419         * platform/graphics/transforms/TransformState.h:
1420         (TransformState):
1421         * platform/graphics/transforms/TransformationMatrix.cpp:
1422         (WebCore::TransformationMatrix::projectQuad): If any point projection clamped,
1423         set the flag to say we clamped.
1424         * platform/graphics/transforms/TransformationMatrix.h:
1425         (TransformationMatrix):
1426
1427 2012-10-31  Tiancheng Jiang  <tijiang@rim.com>
1428
1429         Change bubble message style to BB10 UX spec.
1430         https://bugs.webkit.org/show_bug.cgi?id=100862
1431
1432         Reviewed by Rob Buis.
1433
1434         RIM PR 198108
1435         Internal Reviewed by Otto Cheung.
1436         No new tests.
1437
1438         * css/themeBlackBerry.css:
1439         (::-webkit-validation-bubble-message): Added.
1440         (::-webkit-validation-bubble-arrow): Added.
1441         (::-webkit-validation-bubble-heading): Added.
1442
1443 2012-10-31  Mike West  <mkwst@chromium.org>
1444
1445         Prefer document->addConsoleMessage to document->domWindow->console->addMessage.
1446         https://bugs.webkit.org/show_bug.cgi?id=100850
1447
1448         Reviewed by Adam Barth.
1449
1450         For historical reasons, a few places in WebCore talk to Console directly
1451         via 'document()->domWindow()->console()->addMessage(...)'. This is more
1452         safely wrapped by calling 'addConsoleMessage' on the Document itself.
1453
1454         No visible functionality should change; we'll simply avoid potential
1455         null dereferences in the future.
1456
1457         * html/HTMLFormElement.cpp:
1458         (WebCore::HTMLFormElement::validateInteractively):
1459         * html/canvas/WebGLRenderingContext.cpp:
1460         (WebCore):
1461         (WebCore::WebGLRenderingContext::printWarningToConsole):
1462         * loader/FrameLoader.cpp:
1463         (WebCore::FrameLoader::reportLocalLoadFailed):
1464         * loader/MixedContentChecker.cpp:
1465         (WebCore::MixedContentChecker::logWarning):
1466         * loader/appcache/ApplicationCacheGroup.cpp:
1467         (WebCore::ApplicationCacheGroup::abort):
1468         (WebCore::ApplicationCacheGroup::didReceiveResponse):
1469         (WebCore::ApplicationCacheGroup::didFinishLoading):
1470         (WebCore::ApplicationCacheGroup::didFail):
1471         (WebCore::ApplicationCacheGroup::didReceiveManifestResponse):
1472         (WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
1473         (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
1474         * loader/cache/CachedResourceLoader.cpp:
1475         (WebCore::CachedResourceLoader::printAccessDeniedMessage):
1476
1477 2012-10-31  Pavel Feldman  <pfeldman@chromium.org>
1478
1479         Web Inspector: frame chooser does not work on subsequent inspector open.
1480         https://bugs.webkit.org/show_bug.cgi?id=100771
1481
1482         Reviewed by Yury Semikhatsky.
1483
1484         - Make WorkerRuntimeAgent and PageRuntimeAgent register themselves in the instrumenting agents independently
1485         - Move pause / run worker handling from InspectorRuntimeAgent into WorkerRuntimeAgent
1486         - Remove remains of the front-end reused signal from InspectorAgent
1487         - Send execution contexts post clear window object instead of post commit load.
1488
1489         * inspector/InspectorAgent.cpp:
1490         (WebCore::InspectorAgent::InspectorAgent):
1491         (WebCore::InspectorAgent::clearFrontend):
1492         (WebCore::InspectorAgent::didCommitLoad):
1493         * inspector/InspectorAgent.h:
1494         (InspectorAgent):
1495         * inspector/InspectorInstrumentation.cpp:
1496         (WebCore):
1497         (WebCore::InspectorInstrumentation::didClearWindowObjectInWorldImpl):
1498         (WebCore::InspectorInstrumentation::willEvaluateWorkerScript):
1499         * inspector/InspectorInstrumentation.h:
1500         (InspectorInstrumentation):
1501         * inspector/InspectorPageAgent.cpp:
1502         (WebCore::InspectorPageAgent::restore):
1503         * inspector/InspectorRuntimeAgent.cpp:
1504         (WebCore::InspectorRuntimeAgent::InspectorRuntimeAgent):
1505         (WebCore::InspectorRuntimeAgent::~InspectorRuntimeAgent):
1506         (WebCore::InspectorRuntimeAgent::run):
1507         (WebCore::InspectorRuntimeAgent::setScriptDebugServer):
1508         * inspector/InspectorRuntimeAgent.h:
1509         (InspectorRuntimeAgent):
1510         * inspector/InstrumentingAgents.h:
1511         (WebCore):
1512         (WebCore::InstrumentingAgents::InstrumentingAgents):
1513         (WebCore::InstrumentingAgents::workerRuntimeAgent):
1514         (WebCore::InstrumentingAgents::setWorkerRuntimeAgent):
1515         (InstrumentingAgents):
1516         * inspector/PageRuntimeAgent.cpp:
1517         (WebCore::PageRuntimeAgent::PageRuntimeAgent):
1518         (WebCore::PageRuntimeAgent::~PageRuntimeAgent):
1519         (WebCore::PageRuntimeAgent::setFrontend):
1520         (WebCore::PageRuntimeAgent::clearFrontend):
1521         (WebCore::PageRuntimeAgent::enable):
1522         (WebCore::PageRuntimeAgent::didCreateMainWorldContext):
1523         * inspector/PageRuntimeAgent.h:
1524         (PageRuntimeAgent):
1525         * inspector/WorkerRuntimeAgent.cpp:
1526         (WebCore::WorkerRuntimeAgent::WorkerRuntimeAgent):
1527         (WebCore::WorkerRuntimeAgent::~WorkerRuntimeAgent):
1528         (WebCore::WorkerRuntimeAgent::run):
1529         (WebCore):
1530         (WebCore::WorkerRuntimeAgent::pauseWorkerContext):
1531         * inspector/WorkerRuntimeAgent.h:
1532         (WorkerRuntimeAgent):
1533
1534 2012-10-31  Kondapally Kalyan  <kalyan.kondapally@intel.com>
1535
1536         [Qt][EFL][AC][WK2]TextureMapperLayer backing store contents are drawn upside down on screen.
1537         https://bugs.webkit.org/show_bug.cgi?id=100845.
1538
1539         Reviewed by Noam Rosenthal.
1540
1541         WebGL displays the Canvas with (0,0) being the bottom left corner.
1542         In GraphicsSurface::platformPaintToTextureMapper we don't set ShouldFlipTexture
1543         flag before painting to TextureMapper.
1544         It results in backing store contents being drawn upside down on screen.
1545         This patch enables ShouldFlipTexture flag when TextureMapperLayer renders 
1546         it's backing store contents into a TextureMapper.
1547
1548         * platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp:
1549         (WebCore::GraphicsSurface::platformPaintToTextureMapper):
1550
1551 2012-10-31  Noam Rosenthal  <noam.rosenthal@nokia.com>
1552
1553         [Texmap] Enable filter animations in GraphicsLayerAnimation
1554         https://bugs.webkit.org/show_bug.cgi?id=100318
1555
1556         Reviewed by Kenneth Rohde Christiansen.
1557
1558         Use the same method of animating filters in WebCore to animate filters for TextureMapper.
1559         Added the appropriate methods to GraphicsLayerAnimation and TextureMapperLayer.
1560
1561         Tested by LayoutTests/css3/filters/filter-animation-hw.html and other tests.
1562
1563         * platform/graphics/GraphicsLayerAnimation.cpp:
1564         (WebCore):
1565         (WebCore::blendFunc):
1566         (WebCore::applyFilterAnimation):
1567         (WebCore::GraphicsLayerAnimation::applyInternal):
1568         * platform/graphics/GraphicsLayerAnimation.h:
1569         (Client):
1570         * platform/graphics/texmap/TextureMapperLayer.cpp:
1571         (WebCore::TextureMapperLayer::intermediateSurfaceRect):
1572         (WebCore::TextureMapperLayer::shouldPaintToIntermediateSurface):
1573         (WebCore::TextureMapperLayer::paintRecursive):
1574         (WebCore::TextureMapperLayer::syncAnimations):
1575         * platform/graphics/texmap/TextureMapperLayer.h:
1576         (TextureMapperLayer):
1577         (WebCore::TextureMapperLayer::setFilters):
1578         (WebCore::TextureMapperLayer::setAnimatedFilters):
1579
1580 2012-10-31  Adam Barth  <abarth@webkit.org>
1581
1582         [V8] Garbage collection should use opaque roots rather than implicit references
1583         https://bugs.webkit.org/show_bug.cgi?id=100707
1584
1585         Reviewed by Kentaro Hara.
1586
1587         This patch replaces visitDOMWrapper with opaqueRootForGC. The
1588         former used to inform V8 of implicit relationships between wrapper
1589         objects on a per-wrapper basis. That meant that we needed to know which
1590         DOMDataStore a given wrapper was in during garbage collection.
1591
1592         After this patch, we now use object groups rather than implicit
1593         references to inform V8 of these relationships. That has two benefits:
1594
1595         1) We no longer need to know which DOMDataStore a wrapper belongs
1596            because we don't need to find the exact source wrapper for the
1597            implicit connection.
1598
1599         2) We can now handle more complicated implicit relationships, for
1600            example when some of the intervening objects haven't had their
1601            JavaScript wrappers created yet.
1602
1603         This patch also unlocks to paths of future development:
1604         A) Fixing the remaining failures in fast/dom/gc-9.html
1605         B) Enumerating DOM wrappers entirely from V8 rather than from the
1606            DOMWrapperMaps (so that we can move more object towards using
1607            IntrusiveDOMWrapperMaps, which aren't enumerable from WebCore).
1608
1609         * bindings/scripts/CodeGeneratorV8.pm:
1610         (NeedsCustomOpaqueRootForGC):
1611         (GenerateOpaqueRootForGC):
1612         (GenerateHeader):
1613         (GenerateImplementation):
1614         * bindings/v8/V8GCController.cpp:
1615         (ImplicitConnection):
1616         (WebCore::ImplicitConnection::ImplicitConnection):
1617         (WebCore::ImplicitConnection::root):
1618         (WebCore::ImplicitConnection::wrapper):
1619         (WebCore):
1620         (WebCore::operator<):
1621         (WrapperGrouper):
1622         (WebCore::WrapperGrouper::WrapperGrouper):
1623         (WebCore::WrapperGrouper::addToGroup):
1624         (WebCore::WrapperGrouper::keepAlive):
1625         (WebCore::WrapperGrouper::apply):
1626         (WebCore::ObjectVisitor::ObjectVisitor):
1627         (WebCore::ObjectVisitor::visitDOMWrapper):
1628         (ObjectVisitor):
1629         (WebCore::V8GCController::opaqueRootForGC):
1630         (WebCore::NodeVisitor::NodeVisitor):
1631         (WebCore::NodeVisitor::visitNodeWrapper):
1632         (NodeVisitor):
1633         (WebCore::V8GCController::majorGCPrologue):
1634         * bindings/v8/V8GCController.h:
1635         (WebCore):
1636         (V8GCController):
1637         * bindings/v8/WrapperTypeInfo.h:
1638         (WebCore):
1639         (WebCore::WrapperTypeInfo::opaqueRootForGC):
1640         (WrapperTypeInfo):
1641         * bindings/v8/custom/V8NodeListCustom.cpp:
1642         (WebCore::V8NodeList::opaqueRootForGC):
1643         * bindings/v8/custom/V8SpeechRecognitionResultCustom.cpp:
1644         (WebCore::V8SpeechRecognitionResult::opaqueRootForGC):
1645
1646 2012-10-31  Alexei Filippov  <alph@chromium.org>
1647
1648         Web Inspector: Add total node to native memory snapshot tree
1649         https://bugs.webkit.org/show_bug.cgi?id=100843
1650
1651         Reviewed by Yury Semikhatsky.
1652
1653         * inspector/front-end/NativeMemorySnapshotView.js:
1654         (WebInspector.NativeSnapshotDataGrid):
1655         (WebInspector.NativeSnapshotNode):
1656         (WebInspector.MemoryBlockViewProperties._initialize):
1657
1658 2012-10-31  Arpita Bahuguna  <arpitabahuguna@gmail.com>
1659
1660         Table with percentage column widths doesn't scale to fill the entire width of a table containing it
1661         https://bugs.webkit.org/show_bug.cgi?id=11645
1662
1663         Reviewed by Julien Chaffraix.
1664
1665         When the inner (or nested) table has auto width and column(s) with
1666         percent width, we should scale our column(s) to the width of the
1667         containing table (unless it has auto width).
1668
1669         Test: fast/table/scale-nested-percent-width-cols.html
1670
1671         * rendering/AutoTableLayout.cpp:
1672         (WebCore::shouldScaleColumns):
1673         If the containing table width was of percent type, we were disallowing
1674         our inner or nested table's column from scaling to the size of the parent
1675         table. We should prohibit the scaling of the nested table columns only
1676         if the parent table has auto width.
1677
1678 2012-10-31  Ian Vollick  <vollick@chromium.org>
1679
1680         Add support for text-based repaint testing
1681         https://bugs.webkit.org/show_bug.cgi?id=100584
1682
1683         Reviewed by Simon Fraser.
1684
1685         Allows tracked repaint rects to be dumped as text.
1686
1687         The following layout tests have been converted:
1688           fast/repaint/layer-full-repaint.html
1689           fast/repaint/overflow-flipped-writing-mode-table.html
1690
1691         * WebCore.exp.in:
1692           Exports for:
1693             FrameView::setTracksRepaints(bool)
1694             Frame::trackedRepaintRectsAsText() const
1695         * page/Frame.cpp:
1696         (WebCore::Frame::trackedRepaintRectsAsText):
1697           Returns a string containing information on all tracked repaint rects.
1698         * page/FrameView.cpp:
1699         (WebCore::FrameView::setTracksRepaints):
1700           Rather than calling m_trackedRepaintRects.clear() directly, I've
1701           called resetTrackedRepaints(). This will allow us to do more
1702           sophisticated resetting when we start tracking repaint rects for
1703           composited layers.
1704         (WebCore::FrameView::trackedRepaintRectsAsText):
1705           Provides the string returned by Frame::trackedRepaintRectsAsText.
1706         * testing/Internals.cpp:
1707         (WebCore::Internals::repaintRectsAsText):
1708           Returns Frame::trackedRepaintRectsAsText.
1709         (WebCore):
1710         (WebCore::Internals::startTrackingRepaints):
1711           Calls FrameView::setTracksRepaints(true)
1712         (WebCore::Internals::stopTrackingRepaints):
1713           Calls FrameView::setTracksRepaints(false)
1714         * testing/Internals.h:
1715         * testing/Internals.idl:
1716           Declarations for:
1717             repaintRectsAsText
1718             startTrackingRepaints
1719             stopTrackingRepaints
1720
1721 2012-10-31  Yury Semikhatsky  <yurys@chromium.org>
1722
1723         Web Inspector: page crash when pausing in dedicated worker
1724         https://bugs.webkit.org/show_bug.cgi?id=100837
1725
1726         Reviewed by Pavel Feldman.
1727
1728         Pass debugger agent to InjectedScriptHost::init in case of workers.
1729
1730         Test: inspector-protocol/debugger-pause-dedicated-worker.html
1731
1732         * inspector/WorkerInspectorController.cpp:
1733         (WebCore::WorkerInspectorController::WorkerInspectorController):
1734
1735 2012-10-31  Zoltan Nyul  <zoltan.nyul@intel.com>
1736
1737         perspective-origin should ignore values with more then two lengths and use the default values
1738         https://bugs.webkit.org/show_bug.cgi?id=100835
1739
1740         Reviewed by Kenneth Rohde Christiansen.
1741
1742         Perspective-origin should ignore values with more then two lengths
1743         (http://www.w3.org/TR/css3-transforms/#perspective-origin) and use
1744         the default values instead of parsing it as an unlimited-length list,
1745         of which all but the first two values are ignored. This makes perspective-origin 
1746         behave similar to transform-origin which uses default value in this case,
1747         as well as firefox does the same.
1748
1749         Test: transforms/2d/computed-style-origin.html
1750
1751         * css/CSSParser.cpp:
1752         (WebCore::CSSParser::parsePerspectiveOrigin):
1753
1754 2012-10-31  Sheriff Bot  <webkit.review.bot@gmail.com>
1755
1756         Unreviewed, rolling out r133016.
1757         http://trac.webkit.org/changeset/133016
1758         https://bugs.webkit.org/show_bug.cgi?id=100856
1759
1760         broke compile-webkit on several bots (Requested by podivilov
1761         on #webkit).
1762
1763         * CMakeLists.txt:
1764         * GNUmakefile.list.am:
1765         * Target.pri:
1766         * WebCore.gypi:
1767         * WebCore.vcproj/WebCore.vcproj:
1768         * WebCore.xcodeproj/project.pbxproj:
1769         * dom/DeviceOrientationClient.h:
1770         (DeviceOrientationClient):
1771         * dom/DeviceOrientationController.cpp:
1772         (WebCore::DeviceOrientationController::DeviceOrientationController):
1773         (WebCore):
1774         (WebCore::DeviceOrientationController::~DeviceOrientationController):
1775         (WebCore::DeviceOrientationController::timerFired):
1776         (WebCore::DeviceOrientationController::addListener):
1777         (WebCore::DeviceOrientationController::removeListener):
1778         (WebCore::DeviceOrientationController::removeAllListeners):
1779         (WebCore::DeviceOrientationController::suspendEventsForAllListeners):
1780         (WebCore::DeviceOrientationController::resumeEventsForAllListeners):
1781         (WebCore::DeviceOrientationController::didChangeDeviceOrientation):
1782         (WebCore::DeviceOrientationController::supplementName):
1783         * dom/DeviceOrientationController.h:
1784         (WebCore):
1785         (DeviceOrientationController):
1786         (WebCore::DeviceOrientationController::isActive):
1787         (WebCore::DeviceOrientationController::client):
1788         (WebCore::DeviceOrientationController::from):
1789         * dom/Document.cpp:
1790         (WebCore::Document::suspendActiveDOMObjects):
1791         (WebCore::Document::resumeActiveDOMObjects):
1792         * loader/EmptyClients.h:
1793         (WebCore::EmptyDeviceOrientationClient::startUpdating):
1794         (WebCore::EmptyDeviceOrientationClient::stopUpdating):
1795         * page/DOMWindow.cpp:
1796         (WebCore::DOMWindow::addEventListener):
1797         (WebCore::DOMWindow::removeEventListener):
1798         (WebCore::DOMWindow::removeAllEventListeners):
1799         * page/DeviceClient.h: Removed.
1800         * page/DeviceController.cpp: Removed.
1801         * page/DeviceController.h: Removed.
1802
1803 2012-10-31  Antti Koivisto  <antti@apple.com>
1804
1805         Remove stray calls to mutableAttributeData()
1806         https://bugs.webkit.org/show_bug.cgi?id=100849
1807
1808         Reviewed by Andreas Kling.
1809
1810         Changing the cached class attribute value does not require mutable attribute data.
1811
1812         * dom/Element.cpp:
1813         (WebCore::Element::classAttributeChanged):
1814         * dom/ElementAttributeData.h:
1815         (WebCore::ElementAttributeData::clearClass):
1816         
1817             Make const like setClass().
1818
1819 2012-10-31  Mike West  <mkwst@chromium.org>
1820
1821         X-Frame-Options console message should be associated with a request.
1822         https://bugs.webkit.org/show_bug.cgi?id=100735
1823
1824         Reviewed by Pavel Feldman.
1825
1826         In 99941, we added the possibility to tie console messages to requests,
1827         which enables automatic generation of stack traces, line numbers, etc.
1828         making the error simpler to diagnose for web developers. This patch
1829         uses the piping laid in that patch to improve the console message
1830         generated when a document is blocked by X-Frame-Options.
1831
1832         No new tests; the functionality is covered by changes to existing tests.
1833
1834         * dom/Document.cpp:
1835         (WebCore::Document::processHttpEquiv):
1836             Grab the request identifier from the currently active DocumentLoader
1837             and pass it into the console message.
1838         * loader/MainResourceLoader.cpp:
1839         (WebCore::MainResourceLoader::didReceiveResponse):
1840             Grab the request identifier from the MainResourceLoader, and pass it
1841             into the console message.
1842
1843 2012-10-31  Sheriff Bot  <webkit.review.bot@gmail.com>
1844
1845         Unreviewed, rolling out r133015.
1846         http://trac.webkit.org/changeset/133015
1847         https://bugs.webkit.org/show_bug.cgi?id=100847
1848
1849         broke Apple Win Debug compilation (Requested by podivilov on
1850         #webkit).
1851
1852         * inspector/InspectorAgent.cpp:
1853         (WebCore::InspectorAgent::InspectorAgent):
1854         (WebCore::InspectorAgent::clearFrontend):
1855         (WebCore::InspectorAgent::didCommitLoad):
1856         * inspector/InspectorAgent.h:
1857         (WebCore::InspectorAgent::didCommitLoadFired):
1858         (InspectorAgent):
1859         * inspector/InspectorInstrumentation.cpp:
1860         (WebCore):
1861         (WebCore::InspectorInstrumentation::didClearWindowObjectInWorldImpl):
1862         (WebCore::InspectorInstrumentation::willEvaluateWorkerScript):
1863         (WebCore::InspectorInstrumentation::runtimeAgentEnabled):
1864         * inspector/InspectorInstrumentation.h:
1865         (InspectorInstrumentation):
1866         * inspector/InspectorPageAgent.cpp:
1867         (WebCore::InspectorPageAgent::restore):
1868         * inspector/InspectorRuntimeAgent.cpp:
1869         (WebCore::InspectorRuntimeAgent::InspectorRuntimeAgent):
1870         (WebCore::InspectorRuntimeAgent::~InspectorRuntimeAgent):
1871         (WebCore::InspectorRuntimeAgent::run):
1872         (WebCore):
1873         (WebCore::InspectorRuntimeAgent::pauseWorkerContext):
1874         * inspector/InspectorRuntimeAgent.h:
1875         (InspectorRuntimeAgent):
1876         * inspector/InstrumentingAgents.h:
1877         (WebCore):
1878         (WebCore::InstrumentingAgents::InstrumentingAgents):
1879         (WebCore::InstrumentingAgents::inspectorRuntimeAgent):
1880         (WebCore::InstrumentingAgents::setInspectorRuntimeAgent):
1881         (InstrumentingAgents):
1882         * inspector/PageRuntimeAgent.cpp:
1883         (WebCore::PageRuntimeAgent::PageRuntimeAgent):
1884         (WebCore::PageRuntimeAgent::~PageRuntimeAgent):
1885         (WebCore::PageRuntimeAgent::setFrontend):
1886         (WebCore::PageRuntimeAgent::clearFrontend):
1887         (WebCore::PageRuntimeAgent::enable):
1888         (WebCore::PageRuntimeAgent::didClearWindowObject):
1889         * inspector/PageRuntimeAgent.h:
1890         (PageRuntimeAgent):
1891         * inspector/WorkerRuntimeAgent.cpp:
1892         (WebCore::WorkerRuntimeAgent::WorkerRuntimeAgent):
1893         (WebCore::WorkerRuntimeAgent::~WorkerRuntimeAgent):
1894         * inspector/WorkerRuntimeAgent.h:
1895         (WorkerRuntimeAgent):
1896
1897 2012-10-31  Kihong Kwon  <kihong.kwon@samsung.com>
1898
1899         Add DeviceController base-class to remove duplication of DeviceXXXControler
1900         https://bugs.webkit.org/show_bug.cgi?id=96894
1901
1902         Reviewed by Hajime Morita.
1903
1904         Add DeviceController which is extracted from DeviceOrientationController to remove duplication.
1905         And soon-to-be-added DeviceMotionController and ProximityController.
1906
1907         Covered by existing tests.
1908
1909         * CMakeLists.txt:
1910         * GNUmakefile.list.am:
1911         * Target.pri:
1912         * WebCore.gypi:
1913         * WebCore.vcproj/WebCore.vcproj:
1914         * WebCore.xcodeproj/project.pbxproj:
1915         * dom/DeviceOrientationClient.h:
1916         * dom/DeviceOrientationController.cpp:
1917         Remove member functions to move to DeviceController.
1918         - addListener(), removeListener(), removeAllListeners(), isActive()
1919         (WebCore::DeviceOrientationController::DeviceOrientationController):
1920         (WebCore::DeviceOrientationController::didChangeDeviceOrientation):
1921         (WebCore::DeviceOrientationController::client):
1922         (WebCore::DeviceOrientationController::hasLastData):
1923         (WebCore::DeviceOrientationController::getLastEvent):
1924         (WebCore::DeviceOrientationController::from):
1925         (WebCore):
1926         * dom/DeviceOrientationController.h:
1927         (WebCore):
1928         (WebCore::DeviceOrientationController::~DeviceOrientationController):
1929         (DeviceOrientationController):
1930         * dom/Document.cpp:
1931         Remove suspendEventsForAllListeners() and resumeEventsForAllListeners() function calls.
1932         These calls can be made by checking activeDOMObjectsAreSuspended() and activeDOMObjectsAreStopped() before dispatchEvent.
1933         (WebCore::Document::suspendActiveDOMObjects):
1934         (WebCore::Document::resumeActiveDOMObjects):
1935         * loader/EmptyClients.h:
1936         (EmptyDeviceClient):
1937         (WebCore::EmptyDeviceClient::startUpdating):
1938         (WebCore::EmptyDeviceClient::stopUpdating):
1939         (WebCore):
1940         * page/DOMWindow.cpp:
1941         (WebCore::DOMWindow::addEventListener):
1942         (WebCore::DOMWindow::removeEventListener):
1943         (WebCore::DOMWindow::removeAllEventListeners):
1944         * page/DeviceClient.h: Added.
1945         (WebCore):
1946         (DeviceClient):
1947         (WebCore::DeviceClient::~DeviceClient):
1948         * page/DeviceController.cpp: Added.
1949         DeviceController has extracted functions from DeviceOrientationController and DeviceMotionController.
1950         - addDeviceEventListener(), removeDeviceEventlistener(), removeAllDeviceEventListeners(), dispatchDeviceEvent()
1951         All kind of device event controller which has DeviceClient can be inherited from DeviceController.
1952         (WebCore):
1953         (WebCore::DeviceController::DeviceController):
1954         (WebCore::DeviceController::addDeviceEventListener):
1955         (WebCore::DeviceController::removeDeviceEventListener):
1956         (WebCore::DeviceController::removeAllDeviceEventListeners):
1957         (WebCore::DeviceController::dispatchDeviceEvent):
1958         (WebCore::DeviceController::fireDeviceEvent):
1959         * page/DeviceController.h: Added.
1960         (WebCore):
1961         (DeviceController):
1962         (WebCore::DeviceController::~DeviceController):
1963         (WebCore::DeviceController::isActive):
1964         (WebCore::DeviceController::client):
1965         (WebCore::DeviceController::hasLastData):
1966         (WebCore::DeviceController::getLastEvent):
1967
1968 2012-10-31  Pavel Feldman  <pfeldman@chromium.org>
1969
1970         Web Inspector: frame chooser does not work on subsequent inspector open.
1971         https://bugs.webkit.org/show_bug.cgi?id=100771
1972
1973         Reviewed by Yury Semikhatsky.
1974
1975         - Make WorkerRuntimeAgent and PageRuntimeAgent register themselves in the instrumenting agents independently
1976         - Move pause / run worker handling from InspectorRuntimeAgent into WorkerRuntimeAgent
1977         - Remove remains of the front-end reused signal from InspectorAgent
1978         - Send execution contexts post clear window object instead of post commit load.
1979
1980         * inspector/InspectorAgent.cpp:
1981         (WebCore::InspectorAgent::InspectorAgent):
1982         (WebCore::InspectorAgent::clearFrontend):
1983         (WebCore::InspectorAgent::didCommitLoad):
1984         * inspector/InspectorAgent.h:
1985         (InspectorAgent):
1986         * inspector/InspectorInstrumentation.cpp:
1987         (WebCore):
1988         (WebCore::InspectorInstrumentation::didClearWindowObjectInWorldImpl):
1989         (WebCore::InspectorInstrumentation::willEvaluateWorkerScript):
1990         * inspector/InspectorInstrumentation.h:
1991         (InspectorInstrumentation):
1992         * inspector/InspectorPageAgent.cpp:
1993         (WebCore::InspectorPageAgent::restore):
1994         * inspector/InspectorRuntimeAgent.cpp:
1995         (WebCore::InspectorRuntimeAgent::InspectorRuntimeAgent):
1996         (WebCore::InspectorRuntimeAgent::~InspectorRuntimeAgent):
1997         (WebCore::InspectorRuntimeAgent::run):
1998         (WebCore::InspectorRuntimeAgent::setScriptDebugServer):
1999         * inspector/InspectorRuntimeAgent.h:
2000         (InspectorRuntimeAgent):
2001         * inspector/InstrumentingAgents.h:
2002         (WebCore):
2003         (WebCore::InstrumentingAgents::InstrumentingAgents):
2004         (WebCore::InstrumentingAgents::workerRuntimeAgent):
2005         (WebCore::InstrumentingAgents::setWorkerRuntimeAgent):
2006         (InstrumentingAgents):
2007         * inspector/PageRuntimeAgent.cpp:
2008         (WebCore::PageRuntimeAgent::PageRuntimeAgent):
2009         (WebCore::PageRuntimeAgent::~PageRuntimeAgent):
2010         (WebCore::PageRuntimeAgent::setFrontend):
2011         (WebCore::PageRuntimeAgent::clearFrontend):
2012         (WebCore::PageRuntimeAgent::enable):
2013         (WebCore::PageRuntimeAgent::didCreateMainWorldContext):
2014         * inspector/PageRuntimeAgent.h:
2015         (PageRuntimeAgent):
2016         * inspector/WorkerRuntimeAgent.cpp:
2017         (WebCore::WorkerRuntimeAgent::WorkerRuntimeAgent):
2018         (WebCore::WorkerRuntimeAgent::~WorkerRuntimeAgent):
2019         (WebCore::WorkerRuntimeAgent::run):
2020         (WebCore):
2021         (WebCore::WorkerRuntimeAgent::pauseWorkerContext):
2022         * inspector/WorkerRuntimeAgent.h:
2023         (WorkerRuntimeAgent):
2024
2025 2012-10-31  Keishi Hattori  <keishi@webkit.org>
2026
2027         Calendar picker can flicker when opened from the suggestion picker
2028         https://bugs.webkit.org/show_bug.cgi?id=100816
2029
2030         Reviewed by Kent Tamura.
2031
2032         Calendar picker was opening before the hiding completed.
2033
2034         No new tests. Added test to date-suggestion-picker-key-operations.html.
2035
2036         * Resources/pagepopups/pickerCommon.js: Added didHide event.
2037         * Resources/pagepopups/suggestionPicker.js:
2038         (SuggestionPicker.prototype.selectEntry): Use didHide event so we don't open the calendar picker prematurely.
2039         (SuggestionPicker._handleWindowDidHide): When the window finished hiding, open the calendar picker.
2040
2041 2012-10-31  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2042
2043         Reset binding test result after r132973
2044         https://bugs.webkit.org/show_bug.cgi?id=99178
2045
2046         Unreviewed gardening.
2047
2048         * bindings/scripts/test/JS/JSFloat64Array.cpp:
2049         (WebCore::getJSFloat64ArrayConstructorTable):
2050         (WebCore::JSFloat64ArrayConstructor::getOwnPropertySlot):
2051         (WebCore::JSFloat64ArrayConstructor::getOwnPropertyDescriptor):
2052
2053 2012-10-31  Mike West  <mkwst@chromium.org>
2054
2055         Script run from an isolated world should bypass a page's CSP.
2056         https://bugs.webkit.org/show_bug.cgi?id=97398
2057
2058         Reviewed by Adam Barth.
2059
2060         A page's Content Security Policy currently applies to all resources
2061         loaded, regardless of their source. That generally makes sense, but
2062         proves problematic when considering script run from an isolated
2063         world (Chrome extensions, for instance). These scripts should be allowed
2064         to inject resources into a page's DOM without eiher being restricted by
2065         the page's active CSP, or generating violation reports that spam the
2066         page owner.
2067
2068         Ideally, the isolated world could define its own Content Security Policy
2069         which should be applied to resources it loads. For the moment, this
2070         patch accepts a String that we can parse later on, but only uses it in
2071         a binary way. If a non-empty policy String is provided, we bypass the
2072         main world's CSP checks. If an empty String is provided, the main
2073         world's CSP checks remain active.
2074
2075         Test: http/tests/security/isolatedWorld/bypass-main-world-csp.html
2076
2077         (WebCore::isolatedWorldContentSecurityPolicies):
2078         (WebCore::DOMWrapperWorld::isolatedWorldHasContentSecurityPolicy):
2079         (WebCore::DOMWrapperWorld::setIsolatedWorldContentSecurityPolicy):
2080         (WebCore::DOMWrapperWorld::clearIsolatedWorldContentSecurityPolicy):
2081         * bindings/v8/DOMWrapperWorld.h:
2082         (DOMWrapperWorld):
2083             Mechanisms for setting and clearing Content Security Policies from
2084             isolated worlds; implemented in the same HashMappy way as
2085             SecurityOrigin.
2086         * bindings/v8/ScriptController.cpp:
2087         (WebCore::ScriptController::shouldBypassMainWorldContentSecurityPolicy):
2088         (WebCore):
2089         * bindings/v8/ScriptController.h:
2090         (ScriptController):
2091             Adding a method to ScriptController to query the state of the
2092             current world's Content Security Policy. We'll drop this once we can
2093             apply a policy more directly, but for the moment it's necessary for
2094             the next bit.
2095         * loader/cache/CachedResourceLoader.cpp:
2096         (WebCore::CachedResourceLoader::canRequest):
2097             Check the new ScriptController method, and only perform CSP checks
2098             when loading resources if we're executing code from the main world,
2099             or an isolated world with no Content Security Policy set.
2100
2101 2012-10-31  Tim Horton  <timothy_horton@apple.com>
2102
2103         Unreviewed, attempt to fix the release build by not exporting symbols that aren't defined there.
2104
2105         * WebCore.exp.in:
2106
2107 2012-10-31  Yury Semikhatsky  <yurys@chromium.org>
2108
2109         Memory instrumentation: do not report memory occupied by objects referenced using client interfaces
2110         https://bugs.webkit.org/show_bug.cgi?id=100824
2111
2112         Reviewed by Alexander Pavlov.
2113
2114         In many classes we have pointer to a client object. These references should be
2115         reported as weak pointers and the client's memory usage should be reported when
2116         the client is reached from its instrumented owner where we know exact type of
2117         the client. Otherwise we would need to add reportMemoryUsage to all client
2118         interfaces which places additional burden on the client implementers and blurs
2119         the instrumentation boundaries.
2120
2121         * inspector/InspectorController.cpp:
2122         (WebCore::InspectorController::reportMemoryUsage):
2123         * inspector/InspectorDebuggerAgent.cpp:
2124         (WebCore::InspectorDebuggerAgent::reportMemoryUsage):
2125         * inspector/InspectorMemoryAgent.cpp:
2126         (WebCore::InspectorMemoryAgent::reportMemoryUsage):
2127         * inspector/InspectorOverlay.cpp:
2128         (WebCore::InspectorOverlay::reportMemoryUsage):
2129         * inspector/InspectorResourceAgent.cpp:
2130         (WebCore::InspectorResourceAgent::reportMemoryUsage):
2131         * page/Page.cpp:
2132         (WebCore::Page::reportMemoryUsage):
2133
2134 2012-10-31  Tim Horton  <timothy_horton@apple.com>
2135
2136         Unreviewed, attempt to fix the build by exporting NoExceptionAssertionChecker symbols.
2137
2138         * WebCore.exp.in:
2139
2140 2012-10-31  Eric Seidel  <eric@webkit.org>
2141
2142         Add non-virtual firstChild/lastChild overrides to RenderBlock and RenderTableCol for a > 30% speedup on table from bug 100304
2143         https://bugs.webkit.org/show_bug.cgi?id=100306
2144
2145         Reviewed by Abhishek Arya.
2146
2147         Presumably this is a speedup for other rendering tests as well.  We use firstChild() all over
2148         the rendering code w/o considering that it makes a virtual function call.
2149         Originally I just fixed the one callsite which was showing up on the sample to
2150         use children()->firstChild() directly.  However after further thought, this
2151         broader solution seemed the better way to go.  The first patch was a 15% win for
2152         this large table, this broader solution was a 30%!? win.
2153
2154         The elephant in the room for this table is that we're walking the whole table
2155         for many nextColumn calls.  But that I will solve in a later bug.
2156
2157         * rendering/RenderBlock.h:
2158         (WebCore::RenderBlock::firstChild):
2159         (WebCore::RenderBlock::lastChild):
2160         (RenderBlock):
2161         * rendering/RenderObject.h:
2162         (RenderObject):
2163         * rendering/RenderTableCol.h:
2164         (WebCore::RenderTableCol::firstChild):
2165         (WebCore::RenderTableCol::lastChild):
2166         (RenderTableCol):
2167
2168 2012-10-31  Philippe Normand  <pnormand@igalia.com>
2169
2170         Spatialized panning renders incorrectly with USE_CONCATENATED_IMPULSE_RESPONSES
2171         https://bugs.webkit.org/show_bug.cgi?id=98294
2172
2173         Reviewed by Chris Rogers.
2174
2175         Regenerated the concatenated impulse responses file with
2176         elevations in increasing order per azimuth. In the previous
2177         version of this file the elevations for 315, 330 and 345 were
2178         concatenated at the wrong indexes.
2179
2180         * platform/audio/resources/Composite.wav:
2181
2182 2012-10-31  Tim Horton  <timothy_horton@apple.com>
2183
2184         Full-page PDFPlugin should support inline form editing
2185         https://bugs.webkit.org/show_bug.cgi?id=100155
2186
2187         Reviewed by Dan Bernstein.
2188
2189         Add form controls corresponding to Text and Choice PDF annotations,
2190         allowing for single- and multi-line text input, and <option>-like input.
2191
2192         Currently, forms are only implemented for full-page PDF documents.
2193
2194         * WebCore.exp.in: Expose a variety of additional WebCore functionality to WebKit2.
2195         * WebCore.xcodeproj/project.pbxproj: Expose some more WebCore headers as private headers for use in WebKit2.
2196
2197 2012-10-30  Eric Seidel  <eric@webkit.org>
2198
2199         RoboHornetPro spends ~25% of total test time in WebCore::Region::Shape methods
2200         https://bugs.webkit.org/show_bug.cgi?id=98800
2201
2202         Reviewed by Sam Weinig.
2203
2204         This patch brings our total RoboHornetPro time from 8.2 seconds to 5.3 seconds!
2205
2206         OverlapMap previously used Regions to track Layer bounds rects. 
2207         Unfortunately unioning a list of Regions is O(N^2)
2208         where N is the number of Shapes (in this case rects).
2209         This is because Shapes are immutable, so to union two shapes, we copy
2210         both Shapes' segment/span vectors into a single new Shape.
2211         Thus if we union a set of M Regions, each with 1 Shape, we'll end up copying
2212         the segments of the first Shape N times before we have the final Region/Shape
2213         and the second shape N-1 times. The sum of 1 to N is (N*(N-1))/2 aka order N^2.
2214         Fixing the N^2 algorithm covered by https://bugs.webkit.org/show_bug.cgi?id=100814.
2215
2216         For now we just avoid this O(N^2) by moving away from Region, since OverlapMap
2217         doesn't need it. We just collect a vector of the layer rects and hit-test that directly.
2218         Hit-testing the rect list is O(N), just like hit-testing the same information in a Region would be.
2219
2220         Even better for us is that the OverlapMap is never even used in RoboHornetPro.
2221         We just collect these rects to end up doing nothing with them. :)
2222
2223         * rendering/RenderLayerCompositor.cpp:
2224         (WebCore::RenderLayerCompositor::OverlapMap::add):
2225         (WebCore::RenderLayerCompositor::OverlapMap::overlapsLayers):
2226         (WebCore::RenderLayerCompositor::OverlapMap::pushCompositingContainer):
2227         (WebCore::RenderLayerCompositor::OverlapMap::popCompositingContainer):
2228         (RenderLayerCompositor::OverlapMap):
2229
2230 2012-10-30  Beth Dakin  <bdakin@apple.com>
2231
2232         https://bugs.webkit.org/show_bug.cgi?id=100813
2233         ScrollingCoordinatorMac::stateNodeForID() should return a 
2234         ScrollingStateNode* instead of a ScrollingStateScrollingNode*
2235
2236         Reviewed by Sam Weinig.
2237
2238         ScrollingCoordinatorMac::stateNodeForID() should return a 
2239         ScrollingStateNode* instead of a ScrollingStateScrollingNode* so that 
2240         it can be used for other types of nodes once we add them.
2241         * page/scrolling/mac/ScrollingCoordinatorMac.h:
2242         (ScrollingCoordinatorMac):
2243         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
2244         (WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated):
2245         (WebCore::ScrollingCoordinatorMac::recomputeWheelEventHandlerCountForFrameView):
2246         (WebCore::ScrollingCoordinatorMac::requestScrollPositionUpdate):
2247         (WebCore::ScrollingCoordinatorMac::stateNodeForID):
2248
2249 2012-10-30  Keishi Hattori  <keishi@webkit.org>
2250
2251         F4 inside <input type=time> should not open calendar picker
2252         https://bugs.webkit.org/show_bug.cgi?id=100730
2253
2254         Reviewed by Kent Tamura.
2255
2256         We lacked the check to see if the picker indicator is visible.
2257
2258         Test: fast/forms/time-multiple-fields/time-multiple-fields-open-picker-key-bindings.html
2259
2260         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
2261         (WebCore::BaseMultipleFieldsDateAndTimeInputType::handleKeydownEvent): Check if picker indicator is visible.
2262
2263 2012-10-30  Kent Tamura  <tkent@chromium.org>
2264
2265         Delaying 'change' and 'input' event dispatching during HTMLInputElement::setValue
2266         https://bugs.webkit.org/show_bug.cgi?id=100772
2267
2268         Reviewed by Abhishek Arya.
2269
2270         'change' and 'input' events are asynchronous and not
2271         cancelable. We can use ScopedEvent.
2272
2273         Test: fast/forms/range/range-type-change-onchange.html
2274
2275         * dom/Node.cpp:
2276         (WebCore::Node::dispatchChangeEvent): Use dispatchScopedEvent.
2277         (WebCore::Node::dispatchInputEvent): Ditto.
2278         * html/HTMLInputElement.cpp:
2279         (WebCore::HTMLInputElement::setValue):
2280         Make a scope to delay event dispatching.
2281         * html/RangeInputType.cpp:
2282         (WebCore::RangeInputType::handleKeydownEvent): Ditto.
2283
2284 2012-10-30  Simon Fraser  <simon.fraser@apple.com>
2285
2286         Fix issues with filters and reflections
2287         https://bugs.webkit.org/show_bug.cgi?id=100308
2288
2289         Reviewed by Dirk Schulze.
2290
2291         Composited filters were being applied to the wrong CALayer. The code used
2292         primaryLayer(), which may be a CATransformLayer (which filters cannot apply
2293         to; doing so causes console spew), or a CALayer that is used for reflection
2294         flattening, which again is the wrong layer.
2295
2296         Test: css3/filters/composited-reflected.html
2297
2298         * platform/graphics/ca/GraphicsLayerCA.cpp:
2299         (WebCore::GraphicsLayerCA::updateContentsVisibility): Replace .get()-> with ->
2300         (WebCore::GraphicsLayerCA::updateContentsOpaque): Ditto.
2301         (WebCore::GraphicsLayerCA::updateFilters): Apply filters to m_layer, not primaryLayer(),
2302         and use m_layerClones, not primaryLayerClones().
2303         (WebCore::GraphicsLayerCA::cloneLayer): When cloning a layer for reflections, copy filters
2304         from the source layer.
2305         * platform/graphics/ca/PlatformCALayer.h:
2306         (PlatformCALayer): Add a member function to copy filters from a supplied layer.
2307         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2308         (PlatformCALayer::setFilters): Remove blank line.
2309         (PlatformCALayer::copyFiltersFrom): Copy CAFIlters from the given layer.
2310         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
2311         (PlatformCALayer::copyFiltersFrom): Stub; no filters on Windows.
2312
2313 2012-10-30  Beth Dakin  <bdakin@apple.com>
2314
2315         https://bugs.webkit.org/show_bug.cgi?id=100809
2316         ScrollingCoordinator::attachToStateTree() should take an enum 
2317         indicating what type of node to create
2318
2319         Reviewed by Simon Fraser.
2320
2321         New enum ScrollingNodeType will soon have other values, such as 
2322         FixedNode.
2323         * page/scrolling/ScrollingCoordinator.h:
2324         (WebCore::ScrollingCoordinator::attachToStateTree):
2325         * page/scrolling/mac/ScrollingCoordinatorMac.h:
2326         (ScrollingCoordinatorMac):
2327
2328         This patch generalizes this function so that it can be used to create 
2329         different types of nodes and so that it is actually ready to create 
2330         child nodes. 
2331         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
2332         (WebCore::ScrollingCoordinatorMac::attachToStateTree):
2333
2334         The rootStateNode is always a ScrollingNode.
2335         (WebCore::ScrollingCoordinatorMac::ensureRootStateNodeForFrameView):
2336
2337         For the time being, always create a ScrollingNode.
2338         * rendering/RenderLayerBacking.cpp:
2339         (WebCore::RenderLayerBacking::attachToScrollingCoordinator):
2340
2341 2012-10-30  Gregg Tavares  <gman@google.com>
2342
2343         Set the initial scissor box for WebGL
2344         https://bugs.webkit.org/show_bug.cgi?id=100804
2345
2346         Reviewed by Kenneth Russell.
2347
2348         The initial scissor box needs to be set for WebGL
2349
2350         No new tests as no new functionality.
2351
2352         * html/canvas/WebGLRenderingContext.cpp:
2353         (WebCore):
2354         (WebCore::WebGLRenderingContext::initializeNewContext):
2355
2356 2012-10-30  Charles Wei  <charles.wei@torchmobile.com.cn>
2357
2358         [BlackBerry] PurgeCredential should also purge the persisted credential store
2359         https://bugs.webkit.org/show_bug.cgi?id=100744
2360
2361         Reviewed by George Staikos.
2362
2363         When challenged by the server, we will check the credential in-memory and from the persistent storage.
2364         So the invalid credentials should also be purged from the persistent credential storage; Otherwise,
2365         it will be sent to the server next time been challenged, instead of prompting the user.
2366
2367         * platform/network/blackberry/NetworkJob.cpp:
2368         (WebCore::NetworkJob::purgeCredentials):
2369
2370 2012-10-30  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2371
2372         DOM URL is flaky when workers are used
2373         https://bugs.webkit.org/show_bug.cgi?id=99178
2374
2375         Reviewed by Geoffrey Garen.
2376
2377         Extend JSNoStaticTables to also avoid direct access of static tables in constructor objects.
2378
2379         Test: fast/workers/worker-domurl.html
2380
2381         * bindings/scripts/CodeGeneratorJS.pm:
2382         (constructorHashTableAccessor):
2383         (GenerateConstructorDefinition):
2384
2385 2012-10-30  Jae Hyun Park  <jae.park@company100.net>
2386
2387         Coordinated Graphics: Remove unused methods
2388         https://bugs.webkit.org/show_bug.cgi?id=100799
2389
2390         Reviewed by Noam Rosenthal.
2391
2392         Currently, there are several unused methods regarding Coordinated
2393         Graphics. This patch removes those unused methods.
2394
2395         No new tests (No change in behavior).
2396
2397         * platform/graphics/texmap/TextureMapperGL.cpp:
2398
2399 2012-10-30  Hans Muller  <hmuller@adobe.com>
2400
2401         [CSS Exclusions] Multiple segment polygon layout does not get all segments
2402         https://bugs.webkit.org/show_bug.cgi?id=100039
2403
2404         Reviewed by Dirk Schulze.
2405
2406         Corrected the algorithm for computing included polygon intervals for rectilinear polygons,
2407         and polygons with horizontal edges in general.
2408
2409         Tests: fast/exclusions/shape-inside/shape-inside-rectilinear-polygon-001.html
2410                fast/exclusions/shape-inside/shape-inside-rectilinear-polygon-002.html
2411
2412         * rendering/ExclusionPolygon.cpp: Removed some internal dead code related to the no-longer-used sortedEdgesMinY Vector.
2413         (WebCore::ExclusionPolygon::ExclusionPolygon): Initialize new ExclusionPolygonEdge edgeIndex field.
2414         (WebCore::getVertexIntersectionVertices): Return the previous, next, and target vertex indices for a vertex intersection.
2415         (WebCore::ExclusionPolygon::computeXIntersections): Refactored the core of this method to improve handling of horizontal edges.
2416         (WebCore::ExclusionPolygon::computeEdgeIntersections): Ignore zero-width edges.
2417         * rendering/ExclusionPolygon.h: Removed the rightVertexY() method, since it's no longer used.
2418         (WebCore::ExclusionPolygon::edgeAt): New method.
2419         (WebCore::ExclusionPolygon::numberOfEdges): New method.
2420         (ExclusionPolygon): Added support for retrieving edges.
2421         (WebCore::ExclusionPolygonEdge::vertex1): Use vertex1Index.
2422         (WebCore::ExclusionPolygonEdge::vertex2): Use vertex2Index.
2423         (ExclusionPolygonEdge): Renamed index1, index2 fields to vertex1Index, vertex2Index.
2424         (WebCore::ExclusionPolygonEdge::previousEdge): New method.
2425         (WebCore::ExclusionPolygonEdge::nextEdge): New method.
2426
2427 2012-10-30  Chris Evans  <cevans@google.com>
2428
2429         Improve performance of MaskPtr.
2430         https://bugs.webkit.org/show_bug.cgi?id=100790
2431
2432         Reviewed by Eric Seidel.
2433
2434         Calculate the mask once, and store it as a fast-access member variable.
2435         Also avoid unneccessary integer width expansion in index calculation.
2436         Parser/tiny-innerHTML.html has a high stddev.
2437         Best result I've seen pre-patch is 5.70 runs/s.
2438         Best result I've seen post-patch is 5.72 runs/s, but this is not statistically significant.
2439         MaskPtr is still showing as ~2% in the profile, so we're not sure we trust the profile symbolization at this time.
2440         MaskPtr is now reduced to a single inline instruction (was: 4) so this seems like a strict improvement worth landing.
2441
2442         * rendering/RenderArena.cpp:
2443         (MaskPtr): Use a passed-in mask for the mask operation.
2444         (WebCore::RenderArena::RenderArena): Calculate the mask and store it.
2445         (WebCore::RenderArena::allocate):
2446         (WebCore::RenderArena::free): Use stored mask and avoid unneccessary casts.
2447         * rendering/RenderArena.h:
2448         (RenderArena): Store the freelist mask as a member variable.
2449
2450 2012-10-30  Kenichi Ishibashi  <bashi@chromium.org>
2451
2452         local(Helvetica) in src descriptor prevent fallback
2453         https://bugs.webkit.org/show_bug.cgi?id=100446
2454
2455         Reviewed by Dan Bernstein.
2456
2457         FontCache::getCachedFontData() has a mechanism that aliases a few pairs
2458         of font family names, so that if the family name specified in the font-family
2459         property is not available on the system, but the its alias is available,
2460         it will be used instead. This is appropriate for the font-family property,
2461         but not for font family names specified in the local() function of the src
2462         descriptor in a @font-face rule.
2463
2464         This patch disables the mechanism while checking src descriptor of @font-face.
2465
2466         No new tests. It's difficult to test the change because 'Helvetica' can
2467         be mapped any other font. For example, chromium DRT uses FontConfig to
2468         map Helvetica to Times New Roman. Other ports may map Helvetica to other
2469         fonts. We can't define the expected result.
2470
2471         * css/CSSFontFaceSource.cpp:
2472         (WebCore::CSSFontFaceSource::getFontData):
2473         Call fontCache()->getCachedFontData() with checkingAlternateName = true.
2474         This disables aliasing font family names in FontCache.
2475
2476 2012-10-30  Beth Dakin  <bdakin@apple.com>
2477
2478         https://bugs.webkit.org/show_bug.cgi?id=100796
2479         Should add FixedPositionViewportConstraints to ScrollingConstraints.h
2480
2481         Reviewed by Simon Fraser.
2482
2483         ScrollingConstraints.h currently contains an abstract class called 
2484         ViewportConstraints that is intended to encapsulate data and logic 
2485         required to reposition elements whose layout depends on the viewport 
2486         rect (positions fixed and sticky), when scrolling and zooming. 
2487         However, at this time there is only a subclass for sticky. We should 
2488         add a sub-class for fixed. This is required to get pages with fixed 
2489         position elements scrolling on the scrolling thread.
2490
2491         * page/scrolling/ScrollingConstraints.cpp:
2492         (WebCore::FixedPositionViewportConstraints::layerPositionForViewportRect):
2493         (WebCore):
2494         * page/scrolling/ScrollingConstraints.h:
2495         (WebCore::ViewportConstraints::ViewportConstraints):
2496         (ViewportConstraints):
2497         (WebCore::ViewportConstraints::setAnchorEdges):
2498         (FixedPositionViewportConstraints):
2499         (WebCore::FixedPositionViewportConstraints::FixedPositionViewportConstraints):
2500         (WebCore::FixedPositionViewportConstraints::viewportRectAtLastLayout):
2501         (WebCore::FixedPositionViewportConstraints::setViewportRectAtLastLayout):
2502         (WebCore::FixedPositionViewportConstraints::layerPositionAtLastLayout):
2503         (WebCore::FixedPositionViewportConstraints::setLayerPositionAtLastLayout):
2504         (WebCore):
2505
2506 2012-10-30  Tiancheng Jiang  <tijiang@rim.com>
2507
2508         [BlackBerry] update form theme for BB10.
2509         https://bugs.webkit.org/show_bug.cgi?id=100760
2510
2511         Reviewed by Rob Buis.
2512
2513         RIM PR:222126
2514         Introduce slide function to paint new theme for the form controls.
2515
2516         No new tests.
2517
2518         * css/themeBlackBerry.css:
2519         (select):
2520         * platform/blackberry/RenderThemeBlackBerry.cpp:
2521         (WebCore):
2522         (WebCore::drawControl): Added.
2523         (WebCore::drawThreeSlice): Added.
2524         (WebCore::drawNineSlice): Added.
2525         (WebCore::loadImage): Added.
2526         (WebCore::RenderThemeBlackBerry::systemFont): Modified.
2527         (WebCore::RenderThemeBlackBerry::paintTextFieldOrTextAreaOrSearchField): Modified.
2528         (WebCore::RenderThemeBlackBerry::paintCheckbox): Modified.
2529         (WebCore::RenderThemeBlackBerry::paintRadio): Modified.
2530         (WebCore::RenderThemeBlackBerry::paintButton): Modified.
2531         (WebCore::RenderThemeBlackBerry::paintMenuList): Modified.
2532         (WebCore::RenderThemeBlackBerry::paintMenuListButton): Modified.
2533         (WebCore::RenderThemeBlackBerry::paintSliderTrackRect): Modified.
2534         (WebCore::RenderThemeBlackBerry::paintSliderThumb): Modified.
2535         * platform/blackberry/RenderThemeBlackBerry.h:
2536         (RenderThemeBlackBerry):
2537
2538 2012-10-30  Rick Byers  <rbyers@chromium.org>
2539
2540         cssText for cursor property doesn't include hotspot
2541         https://bugs.webkit.org/show_bug.cgi?id=99530
2542
2543         Reviewed by Darin Adler.
2544
2545         Implement customCssText in CSSCursorImageValue to include the hotspot when present.
2546         Also explicitly track whether or not a hotspot was supplied in the parser,
2547         while still using the existing convention of (-1,-1) to denote no hotspot
2548         in the rest of the system.
2549
2550         Test: fast/css/cursor-parsing.html
2551
2552         * css/CSSCursorImageValue.cpp:
2553         (WebCore::CSSCursorImageValue::customCssText):
2554         * css/CSSCursorImageValue.h:
2555         (CSSCursorImageValue):
2556
2557 2012-10-30  Kenneth Russell  <kbr@google.com>
2558
2559         Temporarily restrict use of ImageBufferSkia::copyToPlatformTexture until bugs resolved
2560         https://bugs.webkit.org/show_bug.cgi?id=100714
2561
2562         Reviewed by Stephen White.
2563
2564         For the moment, only use ImageBuffer::copyToPlatformTexture when
2565         copying to RGBA/UNSIGNED_BYTE textures, and document restriction
2566         in header. Restriction will be lifted once the implementations
2567         (currently only Chromium has one) have been fixed; see bug 100715.
2568
2569         No new tests; manually ran WebGL conformance test
2570         tex-image-and-sub-image-2d-with-canvas-rgba5551.html on NVIDIA
2571         hardware on Mac OS.
2572
2573         * html/canvas/WebGLRenderingContext.cpp:
2574         (WebCore):
2575         (WebCore::WebGLRenderingContext::texImage2D):
2576         * platform/graphics/ImageBuffer.h:
2577         (ImageBuffer):
2578
2579 2012-10-30  Nico Weber  <thakis@chromium.org>
2580
2581         Fix potential overflow in jpeg exif reader. Found by aedla@google.com.
2582         https://bugs.webkit.org/show_bug.cgi?id=100320
2583
2584         Reviewed by Eric Seidel.
2585
2586         Adding more than 1 element past an array is undefined, so don't do it.
2587
2588         No test, since in practice ifd will just overflow and `end - ifd` will
2589         become much larget than 2 and the `if (end - ifd < 2)` a few lines
2590         down will catch that case.
2591
2592         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
2593         (WebCore::readImageOrientation):
2594
2595 2012-10-26  Alexandru Chiculita  <achicu@adobe.com>
2596
2597         [CSS Shaders] Add the ValidatedCustomFilterOperation class
2598         https://bugs.webkit.org/show_bug.cgi?id=100558
2599
2600         Reviewed by Dean Jackson.
2601
2602         Added the ValidatedCustomFilterOperation class. The file is now almost empty,
2603         but more is going to come in the following patches.
2604
2605         Added the a filter operation type VALIDATED_CUSTOM and updated the compositors to ignore
2606         such operations for now.
2607         
2608         No new tests, there is no new functionality yet.
2609
2610         * CMakeLists.txt:
2611         * GNUmakefile.list.am:
2612         * Target.pri:
2613         * WebCore.gypi:
2614         * WebCore.vcproj/WebCore.vcproj:
2615         * WebCore.xcodeproj/project.pbxproj:
2616         * css/CSSComputedStyleDeclaration.cpp:
2617         (WebCore::CSSComputedStyleDeclaration::valueForFilter):
2618         * css/StyleResolver.cpp:
2619         (WebCore::StyleResolver::createFilterOperations):
2620         * platform/graphics/blackberry/LayerWebKitThread.cpp:
2621         (WebCore::LayerWebKitThread::filtersCanBeComposited):
2622         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2623         (PlatformCALayer::filtersCanBeComposited):
2624         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
2625         (WebCore::copyWebCoreFilterOperationsToWebFilterOperations):
2626         * platform/graphics/filters/FilterOperation.h:
2627         * platform/graphics/filters/FilterOperations.cpp:
2628         (WebCore::FilterOperations::hasCustomFilter):
2629         (WebCore::FilterOperations::getOutsets):
2630         * platform/graphics/filters/ValidatedCustomFilterOperation.cpp: Added.
2631         (WebCore):
2632         (WebCore::ValidatedCustomFilterOperation::ValidatedCustomFilterOperation):
2633         (WebCore::ValidatedCustomFilterOperation::~ValidatedCustomFilterOperation):
2634         (WebCore::ValidatedCustomFilterOperation::blend):
2635         * platform/graphics/filters/ValidatedCustomFilterOperation.h: Added.
2636         (WebCore):
2637         (ValidatedCustomFilterOperation):
2638         (WebCore::ValidatedCustomFilterOperation::create):
2639         (WebCore::ValidatedCustomFilterOperation::affectsOpacity):
2640         (WebCore::ValidatedCustomFilterOperation::movesPixels):
2641         (WebCore::ValidatedCustomFilterOperation::blendingNeedsRendererSize):
2642         (WebCore::ValidatedCustomFilterOperation::operator==):
2643
2644 2012-10-30  Joseph Pecoraro  <pecoraro@apple.com>
2645
2646         [Mac] Sync up FeatureDefine Configuration Files
2647         https://bugs.webkit.org/show_bug.cgi?id=100171
2648
2649         Reviewed by David Kilzer.
2650
2651         Follow up to better coordinate with iOS feature defines. Make:
2652
2653           - ENABLE_FILTERS always on
2654           - ENABLE_INPUT_* iphonesimulator values point to the iphoneos values
2655
2656         * Configurations/FeatureDefines.xcconfig:
2657
2658 2012-10-30  Joseph Pecoraro  <pecoraro@apple.com>
2659
2660         [Mac] Sync up FeatureDefine Configuration Files
2661         https://bugs.webkit.org/show_bug.cgi?id=100171
2662
2663         Reviewed by David Kilzer.
2664
2665         Ensure an identical FeatureDefine files across all projects. Changes:
2666
2667           - ENABLE_CSS_BOX_DECORATION_BREAK should be in all
2668           - ENABLE_PDFKIT_PLUGIN should be in all
2669           - ENABLE_RESOLUTION_MEDIA_QUERY should be in all
2670           - ENABLE_ENCRYPTED_MEDIA should be in all
2671           - ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING with corrected value
2672           - Some alphabetical ordering cleanup
2673
2674         * Configurations/FeatureDefines.xcconfig:
2675
2676 2012-10-30  Andreas Kling  <kling@webkit.org>
2677
2678         StylePropertySet: Convert more logic to use PropertyReference.
2679         <http://webkit.org/b/100779>
2680
2681         Reviewed by Antti Koivisto.
2682
2683         Rewrite more of the StylePropertySet logic to use PropertyReference instead of CSSProperty.
2684         This is cleanup before changing the internal storage layout of immutable StylePropertySet.
2685
2686         * css/CSSComputedStyleDeclaration.cpp:
2687         (WebCore::CSSComputedStyleDeclaration::cssPropertyMatches):
2688         * css/CSSComputedStyleDeclaration.h:
2689         * css/CSSStyleDeclaration.h:
2690         * css/PropertySetCSSStyleDeclaration.cpp:
2691         (WebCore::PropertySetCSSStyleDeclaration::cssPropertyMatches):
2692         * css/PropertySetCSSStyleDeclaration.h:
2693         * css/StylePropertySet.cpp:
2694         (WebCore::StylePropertySet::appendFontLonghandValueIfExplicit):
2695         (WebCore::StylePropertySet::fontValue):
2696         (WebCore::StylePropertySet::get4Values):
2697         (WebCore::StylePropertySet::getPropertyCSSValue):
2698         (WebCore::StylePropertySet::removeProperty):
2699         (WebCore::StylePropertySet::propertyIsImportant):
2700         (WebCore::StylePropertySet::getPropertyShorthand):
2701         (WebCore::StylePropertySet::isPropertyImplicit):
2702         (WebCore::StylePropertySet::setProperty):
2703         (WebCore::StylePropertySet::mergeAndOverrideOnConflict):
2704         (WebCore::StylePropertySet::findPropertyIndex):
2705         (WebCore::StylePropertySet::findMutableCSSPropertyWithID):
2706         (WebCore::StylePropertySet::propertyMatches):
2707         (WebCore::StylePropertySet::removeEquivalentProperties):
2708         * css/StylePropertySet.h:
2709         (WebCore::StylePropertySet::PropertyReference::shorthandID):
2710         (WebCore::StylePropertySet::PropertyReference::isImplicit):
2711
2712 2012-10-30  Eric Seidel  <eric@webkit.org>
2713
2714         Teach RenderTable how to use Vector::insert and Vector::append instead of its own custom memmove code
2715         https://bugs.webkit.org/show_bug.cgi?id=100428
2716
2717         Reviewed by Julien Chaffraix.
2718
2719         RenderTable is now like all other clients of Vector instead of being
2720         needlessly different. :)
2721
2722         insert, append and grow all use the same expandCapacity logic under the covers
2723         and Vector::insert uses TypeOperations::moveOverlapping which should use memmove
2724         by default for unknown types.
2725
2726         * rendering/RenderTable.cpp:
2727         (WebCore::RenderTable::splitColumn):
2728         (WebCore::RenderTable::appendColumn):
2729         * rendering/RenderTable.h:
2730         (WebCore::RenderTable::ColumnStruct::ColumnStruct):
2731
2732 2012-10-30  Vincent Scheib  <scheib@chromium.org>
2733
2734         Unreviewed, rolling out r132927.
2735         http://trac.webkit.org/changeset/132927
2736         https://bugs.webkit.org/show_bug.cgi?id=100558
2737
2738         Compile error on Chromium builders
2739
2740         * CMakeLists.txt:
2741         * GNUmakefile.list.am:
2742         * Target.pri:
2743         * WebCore.gypi:
2744         * WebCore.vcproj/WebCore.vcproj:
2745         * WebCore.xcodeproj/project.pbxproj:
2746         * css/CSSComputedStyleDeclaration.cpp:
2747         (WebCore::CSSComputedStyleDeclaration::valueForFilter):
2748         * css/StyleResolver.cpp:
2749         (WebCore::StyleResolver::createFilterOperations):
2750         * platform/graphics/blackberry/LayerWebKitThread.cpp:
2751         (WebCore::LayerWebKitThread::filtersCanBeComposited):
2752         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2753         (PlatformCALayer::filtersCanBeComposited):
2754         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
2755         (WebCore::copyWebCoreFilterOperationsToWebFilterOperations):
2756         * platform/graphics/filters/FilterOperation.h:
2757         * platform/graphics/filters/FilterOperations.cpp:
2758         (WebCore::FilterOperations::hasCustomFilter):
2759         (WebCore::FilterOperations::getOutsets):
2760         * platform/graphics/filters/ValidatedCustomFilterOperation.cpp: Removed.
2761         * platform/graphics/filters/ValidatedCustomFilterOperation.h: Removed.
2762
2763 2012-10-30  W. James MacLean  <wjmaclean@chromium.org>
2764
2765         [chromium] Restrict link highlights to targets that display a hand-cursor
2766         https://bugs.webkit.org/show_bug.cgi?id=99862
2767
2768         Reviewed by James Robinson.
2769
2770         To avoid applying highlights to inappropriate targets, such as large divs with
2771         click handlers installed, test candidate targets and only highlight them if they
2772         would normally display a hand cursor on mouse over. This is a heuristic, but has
2773         been tested and found effective in practice.
2774
2775         This CL refactors EventHandler::selectCursor() to make the logic for determining
2776         if CURSOR_AUTO should resolve to CURSOR_POINTER available outside EventHandler.
2777
2778         Relies on existing cursor tests.
2779
2780         * page/EventHandler.cpp:
2781         (WebCore::EventHandler::useHandCursor):
2782         (WebCore):
2783         (WebCore::EventHandler::selectCursor):
2784         * page/EventHandler.h:
2785         (EventHandler):
2786
2787 2012-10-30  Rob Buis  <rbuis@rim.com>
2788
2789         [BlackBerry] Remove CookieDatabaseBackingStore::upgradeTableIfNeeded
2790         https://bugs.webkit.org/show_bug.cgi?id=100783
2791
2792         Reviewed by Yong Li.
2793
2794         PR 220513.
2795
2796         Remove CookieDatabaseBackingStore::upgradeTableIfNeeded, it was needed for backwards
2797         compatibility, but not needed anymore.
2798
2799         * platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.cpp:
2800         (WebCore::CookieDatabaseBackingStore::invokeOpen):
2801         * platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.h:
2802
2803 2012-10-30  Glenn Adams  <glenn@skynav.com>
2804
2805         [CSS] Expand -webkit-line-break value space
2806         https://bugs.webkit.org/show_bug.cgi?id=100739
2807
2808         Reviewed by Eric Seidel.
2809
2810         (1) expand -webkit-line-break to include new values defined by CSS3 Text [1], i.e., 'auto', 'strict', 'loose';
2811         (2) change default (initial) value for -webkit-line-break to 'auto' to match CSS3 Text;
2812         (3) rename enum EKHTMLLineBreak to LineBreak, renaming enum values appropriately;
2813
2814         New tests to be added when functionality of new values is added. No rendering behavior change at this time.
2815         Only externally visible change is default (initial) value returning 'auto' rather than 'normal', for which 3 existing
2816         tests that were sensitive to this value have been updated. Note that until the functionality for the new values is
2817         added, any actual use of the new values will be treated as the same as the pre-existing 'normal' value, i.e., the
2818         default semantics.
2819
2820         * css/CSSComputedStyleDeclaration.cpp:
2821         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2822         Update from kthmlLineBreak() to lineBreak().
2823
2824         * css/CSSParser.cpp:
2825         (WebCore::isValidKeywordPropertyAndValue):
2826         Update values supported for CSSPropertyWebkitLineBreak.
2827
2828         * css/CSSPrimitiveValueMappings.h:
2829         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2830         (WebCore::CSSPrimitiveValue::operator LineBreak):
2831         Update LineBreak enumeration values (previously EKHTMLLineBreak).
2832
2833         * css/CSSValueKeywords.in:
2834         Update keywords used for -webkit-line-break.
2835
2836         * css/StyleBuilder.cpp:
2837         (WebCore::StyleBuilder::StyleBuilder):
2838         Update names for line break style getter/setter.
2839
2840         * rendering/style/RenderStyle.cpp:
2841         (WebCore::RenderStyle::diff):
2842         Remove khtml prefix on line break related state.
2843
2844         * rendering/style/RenderStyle.h:
2845         Remove khtml prefix on line break related methods. Update to redefined LineBreak
2846         enumeration type.
2847
2848         * rendering/style/RenderStyleConstants.h:
2849         Rename EKHTMLLineBreak enumeration to LineBreak.
2850         Redefine LineBreak enumeration to include new CSS3 Text modes (auto, loose, strict) and
2851         use better names.
2852
2853         * rendering/style/StyleRareInheritedData.cpp:
2854         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
2855         (WebCore::StyleRareInheritedData::operator==):
2856         Remove khtml prefix on line break related state references.
2857
2858         * rendering/style/StyleRareInheritedData.h:
2859         (StyleRareInheritedData):
2860         Remove khtml prefix on line break related state. Widen field to 3 bits to support 8 values,
2861         of which 5 are now used.
2862
2863 2012-10-30  Antti Koivisto  <antti@apple.com>
2864
2865         Avoid unnecessary style recalcs on class attribute mutation
2866         https://bugs.webkit.org/show_bug.cgi?id=100776
2867
2868         Reviewed by Andreas Kling.
2869
2870         There is no need to invalidate element style on class attribute change if neither the added
2871         or removed classes featured in any active stylesheet.
2872
2873         * css/RuleFeature.cpp:
2874         (WebCore::RuleFeatureSet::add):
2875         (WebCore::RuleFeatureSet::clear):
2876         (WebCore::RuleFeatureSet::reportMemoryUsage):
2877         * css/RuleFeature.h:
2878         (RuleFeatureSet):
2879         * css/RuleSet.cpp:
2880         (WebCore::collectFeaturesFromSelector):
2881         
2882             Collect classes mentioned in CSS selectors the same way ids and attribute names are
2883             already collected.
2884
2885         * css/StyleResolver.cpp:
2886         (WebCore::StyleResolver::hasSelectorForClass):
2887         
2888             Add a method to test if a given class name is mentioned anywhere in stylehseets.
2889
2890         (WebCore):
2891         * css/StyleResolver.h:
2892         * css/StyleScopeResolver.h:
2893         (WebCore):
2894         * dom/Element.cpp:
2895         (WebCore::collectAddedAndRemovedClasses):
2896         (WebCore):
2897         (WebCore::Element::classAttributeChanged):
2898         
2899             Figure out which classes were added and removed. Test if they are present in any style
2900             rule and invalidate the style only if they are.
2901
2902         * dom/SpaceSplitString.cpp:
2903         (WebCore::SpaceSplitStringData::add):
2904         (WebCore::SpaceSplitStringData::remove):
2905         (WebCore::SpaceSplitString::add):
2906         (WebCore::SpaceSplitString::remove):
2907         
2908             Added bool return value to indicate if anything was actually removed. Reorganized 
2909             the code a bit to avoid unnecessary uniquing when nothing changes.
2910
2911         * dom/SpaceSplitString.h:
2912         (SpaceSplitStringData):
2913         (SpaceSplitString):
2914
2915 2012-10-30  Robert Hogan  <robert@webkit.org>
2916
2917         white-space: nowrap inline element beside a floated element wraps incorrectly without trailing textnode/newline
2918         https://bugs.webkit.org/show_bug.cgi?id=29648
2919
2920         Reviewed by Levi Weintraub.
2921
2922         A no-wrap child on a line inside an autowrap container should move to the next line if a float doesn't allow
2923         it to fit. This will happen if there is trailing space after the no-wrap child but not if it's the last renderer
2924         on the line. This is because nextLineBreak() is only interested in the white-space style of the current renderer 
2925         and the renderer's next sibling (if there is one) when deciding whether it needs to fit below any floats that
2926         push it beyond the edge of the container. There isn't any situation in which a no-wrap child shouldn't move 
2927         below a float on an auto-wrap line though, so this check always needs to respect the container's white-space style too.
2928
2929         Test: fast/text/whitespace/no-wrap-child-in-auto-wrap-container.html
2930
2931         * rendering/RenderBlockLineLayout.cpp:
2932         (WebCore::RenderBlock::LineBreaker::nextLineBreak):
2933
2934 2012-10-26  Alexandru Chiculita  <achicu@adobe.com>
2935
2936         [CSS Shaders] Add the ValidatedCustomFilterOperation class
2937         https://bugs.webkit.org/show_bug.cgi?id=100558
2938
2939         Reviewed by Dean Jackson.
2940
2941         Added the ValidatedCustomFilterOperation class. The file is now almost empty,
2942         but more is going to come in the following patches.
2943
2944         Added the a filter operation type VALIDATED_CUSTOM and updated the compositors to ignore
2945         such operations for now.
2946         
2947         No new tests, there is no new functionality yet.
2948
2949         * CMakeLists.txt:
2950         * GNUmakefile.list.am:
2951         * Target.pri:
2952         * WebCore.gypi:
2953         * WebCore.vcproj/WebCore.vcproj:
2954         * WebCore.xcodeproj/project.pbxproj:
2955         * css/CSSComputedStyleDeclaration.cpp:
2956         (WebCore::CSSComputedStyleDeclaration::valueForFilter):
2957         * css/StyleResolver.cpp:
2958         (WebCore::StyleResolver::createFilterOperations):
2959         * platform/graphics/blackberry/LayerWebKitThread.cpp:
2960         (WebCore::LayerWebKitThread::filtersCanBeComposited):
2961         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2962         (PlatformCALayer::filtersCanBeComposited):
2963         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
2964         (WebCore::copyWebCoreFilterOperationsToWebFilterOperations):
2965         * platform/graphics/filters/FilterOperation.h:
2966         * platform/graphics/filters/FilterOperations.cpp:
2967         (WebCore::FilterOperations::hasCustomFilter):
2968         (WebCore::FilterOperations::getOutsets):
2969         * platform/graphics/filters/ValidatedCustomFilterOperation.cpp: Added.
2970         (WebCore):
2971         (WebCore::ValidatedCustomFilterOperation::ValidatedCustomFilterOperation):
2972         (WebCore::ValidatedCustomFilterOperation::~ValidatedCustomFilterOperation):
2973         (WebCore::ValidatedCustomFilterOperation::blend):
2974         * platform/graphics/filters/ValidatedCustomFilterOperation.h: Added.
2975         (WebCore):
2976         (ValidatedCustomFilterOperation):
2977         (WebCore::ValidatedCustomFilterOperation::create):
2978         (WebCore::ValidatedCustomFilterOperation::affectsOpacity):
2979         (WebCore::ValidatedCustomFilterOperation::movesPixels):
2980         (WebCore::ValidatedCustomFilterOperation::blendingNeedsRendererSize):
2981         (WebCore::ValidatedCustomFilterOperation::operator==):
2982
2983 2012-10-29  Anders Carlsson  <andersca@apple.com>
2984
2985         Build WebKit as C++11 on Mac
2986         https://bugs.webkit.org/show_bug.cgi?id=100720
2987
2988         Reviewed by Daniel Bates.
2989
2990         * Configurations/Base.xcconfig:
2991         Add CLANG_CXX_LANGUAGE_STANDARD=gnu++0x.
2992
2993         * platform/graphics/FontPlatformData.h:
2994         (WebCore::FontPlatformData::hash):
2995         * platform/graphics/cg/GraphicsContextCG.cpp:
2996         (WebCore::GraphicsContext::drawLine):
2997         (WebCore::GraphicsContext::strokeArc):
2998         * platform/graphics/filters/CustomFilterProgramInfo.cpp:
2999         (WebCore::CustomFilterProgramInfo::hash):
3000         (WebCore::ProtectionSpaceHash::hash):
3001         * platform/network/cf/FormDataStreamCFNet.cpp:
3002         (WebCore::setHTTPBody):
3003         Add static_casts to prevent implicit type conversions in non-constant initializer lists.
3004         
3005         * platform/mac/ClipboardMac.mm:
3006         (WebCore::ClipboardMac::createDragImage):
3007         * platform/mac/CursorMac.mm:
3008         (WebCore::createNamedCursor):
3009         * platform/mac/ScrollViewMac.mm:
3010         (WebCore::ScrollView::platformSetContentsSize):
3011         Use NSMakePoint to prevent implicit type conversions in non-constant initializer lists.
3012
3013         * platform/mac/CookieJar.mm:
3014         (WebCore::cookiesEnabled):
3015         * platform/network/mac/ResourceHandleMac.mm:
3016         (WebCore::shouldRelaxThirdPartyCookiePolicy):
3017         Add explicit casts to NSHTTPCookieAcceptPolicy.
3018
3019         * platform/mac/WebCoreNSURLExtras.h:
3020         * platform/mac/WebCoreNSURLExtras.mm:
3021         (WebCore::URLByTruncatingOneCharacterBeforeComponent):
3022         (WebCore::dataForURLComponentType):
3023         * platform/network/ProtectionSpaceHash.h:
3024         Use CFIndex instead of CFURLComponentType, the enum can be mangled differently in some cases, and these
3025         functions are exported from WebCore.
3026
3027 2012-10-30  Dan Bernstein  <mitz@apple.com>
3028
3029         <rdar://problem/12395187> REGRESSION (r121299): OS X Text Replacement forces cursor out of text fields
3030         https://bugs.webkit.org/show_bug.cgi?id=100768
3031
3032         Reviewed by Anders Carlsson.
3033
3034         r121299 introduced code to restore the paragraph range by saving its length and start offset
3035         relative to the document. The latter was obtained by iterating over the range starting at
3036         the beginning of the document and ending at the beginning of the paragraph range. However,
3037         such a range could not be constructed if the paragraph range was contained in a shadow DOM,
3038         since a range must have both its endpoints within the same shadow tree (or not in a shadow
3039         tree).
3040
3041         Test: platform/mac/editing/spelling/autocorrection-in-textarea.html
3042
3043         * editing/Editor.cpp:
3044         (WebCore::Editor::markAndReplaceFor): Changed paragraphStartIndex to be relative to the
3045         root container of paragraphRange, using the same logic used by
3046         checkForDifferentRootContainer() in Range.cpp.
3047
3048 2012-10-30  Dan Carney  <dcarney@google.com>
3049
3050         Remove ensureAuxiliaryContext
3051         https://bugs.webkit.org/show_bug.cgi?id=99975
3052
3053         Reviewed by Adam Barth.
3054
3055         Removed auxilliaryContext as use if it is problematic in IDB.
3056
3057         No new tests. No change in functionality.
3058
3059         * Modules/indexeddb/IDBCursor.cpp:
3060         (WebCore::IDBCursor::update):
3061         (WebCore::IDBCursor::setValueReady):
3062         * Modules/indexeddb/IDBCursor.h:
3063         (IDBCursor):
3064         * Modules/indexeddb/IDBObjectStore.cpp:
3065         (WebCore::generateIndexKeysForValue):
3066         (WebCore::IDBObjectStore::put):
3067         (WebCore):
3068         * Modules/indexeddb/IDBRequest.cpp:
3069         (WebCore::IDBRequest::onSuccess):
3070         (WebCore::IDBRequest::dispatchEvent):
3071         * bindings/v8/IDBBindingUtilities.cpp:
3072         (WebCore::createIDBKeyFromScriptValueAndKeyPath):
3073         (WebCore::deserializeIDBValue):
3074         (WebCore::injectIDBKeyIntoScriptValue):
3075         * bindings/v8/IDBBindingUtilities.h:
3076         (WebCore):
3077         * bindings/v8/V8Binding.cpp:
3078         (WebCore::toV8Context):
3079         (WebCore):
3080         * bindings/v8/V8Binding.h:
3081         (WebCore):
3082         * bindings/v8/V8PerIsolateData.cpp:
3083         (WebCore):
3084         * bindings/v8/V8PerIsolateData.h:
3085
3086 2012-10-30  Huang Dongsung  <luxtella@company100.net>
3087
3088         [CSS Shaders] Add CustomFilterRenderer to reuse this class by Accelerated Compositing.
3089         https://bugs.webkit.org/show_bug.cgi?id=98989
3090
3091         Reviewed by Dean Jackson.
3092
3093         Extract CustomFilterRenderer class from the rendering part of FECustomFilter.
3094         FECustomFilter now plays a role in extending FilterEffect and delegates
3095         rendering CSS Shaders to CustomFilterRenderer.
3096
3097         CustomFilterRenderer does not know Filter and FilterEffect. We can
3098         create a CustomFilterRenderer instance with only GraphicsContext3D and
3099         CustomFilterValidatedProgram. It means that Accelerated Compositing can
3100         create the CustomFilterRenderer instance if Accelerated Compositing has
3101         GraphicsContext3D and CustomFilterOperation, and it is already possible.
3102
3103         This patch prepares to enable CSS Shaders on Accelerated Compositing.
3104
3105         No new tests. Covered by css3/filters/custom
3106
3107         * CMakeLists.txt:
3108         * GNUmakefile.list.am:
3109         * Target.pri:
3110         * WebCore.gypi:
3111         * WebCore.vcproj/WebCore.vcproj:
3112         * WebCore.xcodeproj/project.pbxproj:
3113         * platform/graphics/filters/CustomFilterRenderer.cpp: Added.
3114         (WebCore):
3115         (WebCore::orthogonalProjectionMatrix):
3116         (WebCore::CustomFilterRenderer::create):
3117         (WebCore::CustomFilterRenderer::CustomFilterRenderer):
3118         (WebCore::CustomFilterRenderer::~CustomFilterRenderer):
3119         (WebCore::CustomFilterRenderer::premultipliedAlpha):
3120         (WebCore::CustomFilterRenderer::programNeedsInputTexture):
3121         (WebCore::CustomFilterRenderer::draw):
3122         (WebCore::CustomFilterRenderer::prepareForDrawing):
3123         (WebCore::CustomFilterRenderer::initializeCompiledProgramIfNeeded):
3124         (WebCore::CustomFilterRenderer::initializeMeshIfNeeded):
3125         (WebCore::CustomFilterRenderer::bindVertexAttribute):
3126         (WebCore::CustomFilterRenderer::unbindVertexAttribute):
3127         (WebCore::CustomFilterRenderer::bindProgramArrayParameters):
3128         (WebCore::CustomFilterRenderer::bindProgramNumberParameters):
3129         (WebCore::CustomFilterRenderer::bindProgramTransformParameter):
3130         (WebCore::CustomFilterRenderer::bindProgramParameters):
3131         (WebCore::CustomFilterRenderer::bindProgramAndBuffers):
3132         (WebCore::CustomFilterRenderer::unbindVertexAttributes):
3133         * platform/graphics/filters/CustomFilterRenderer.h: Copied from Source/WebCore/platform/graphics/filters/FECustomFilter.h.
3134         (WebCore):
3135         (CustomFilterRenderer):
3136           CustomFilterRenderer renders custom filters in GPU using a
3137           GraphicsContext3D.
3138         * platform/graphics/filters/FECustomFilter.cpp:
3139         (WebCore::FECustomFilter::FECustomFilter):
3140         (WebCore::FECustomFilter::create):
3141         (WebCore::FECustomFilter::deleteRenderBuffers):
3142         (WebCore::FECustomFilter::drawFilterMesh):
3143         (WebCore::FECustomFilter::prepareForDrawing):
3144         (WebCore::FECustomFilter::applyShader):
3145         (WebCore::FECustomFilter::resolveMultisampleBuffer):
3146         (WebCore::FECustomFilter::resizeMultisampleBuffers):
3147         (WebCore::FECustomFilter::resizeContext):
3148         * platform/graphics/filters/FECustomFilter.h:
3149         (WebCore):
3150         (FECustomFilter):
3151         * rendering/FilterEffectRenderer.cpp:
3152         (WebCore::createCustomFilterEffect):
3153
3154 2012-10-30  Mike West  <mkwst@chromium.org>
3155
3156         Web Inspector: Associate console messages with the requests that caused them.
3157         https://bugs.webkit.org/show_bug.cgi?id=99941
3158
3159         Reviewed by Pavel Feldman.
3160
3161         The inspector currently supports the concept of a request's "initiator"
3162         in order to add context to console messages that are generated in
3163         response to a specific request. The initiator is used as the message's
3164         anchor link iff a requestID is present, and no stack trace is present.
3165
3166         Currently, this functionality is only exposed to three specific
3167         callsites: 'InspectorConsoleAgent::didFinishXHRLoading',
3168         'InspectorConsoleAgent::didReceiveResponse', and
3169         'InspectorConsoleAgent::didFailLoading'. This patch adds a generic
3170         mechanism to associate requests with console messages by passing the
3171         request's identifier through 'ScriptExecutionContext::addConsoleMessage'
3172         or 'Console::addMessage' when relevant.
3173
3174         This patch should have no visible changes. It just installs some new
3175         piping, and adjusts the three methods mentioned above to use it.
3176         Existing tests shouldn't break.
3177
3178         * dom/Document.cpp:
3179         (WebCore::Document::addMessage):
3180         * dom/Document.h:
3181         (Document):
3182             Add a 'requestIdentifier' parameter (defaulting to 0), and pipe it
3183             through to Console::addMessage.
3184         * dom/ScriptExecutionContext.cpp:
3185         (WebCore::ScriptExecutionContext::addConsoleMessage):
3186         * dom/ScriptExecutionContext.h:
3187         (ScriptExecutionContext):
3188             Add a 'requestIdentifier' parameter (defaulting to 0), and pipe it
3189             through to the subclass' addMessage method.
3190         * inspector/ConsoleMessage.cpp:
3191         (WebCore::ConsoleMessage::ConsoleMessage):
3192             Accept an unsigned long instead of a string, and move the conversion
3193             from WebCore request identifiers to Inspector request identifiers
3194             into ConsoleMessage.
3195         * inspector/ConsoleMessage.h:
3196         (ConsoleMessage):
3197             Add 'requestIdentifier' (defaulting to 0) to the
3198             ConsoleMessage constructor that accepts a ScriptCallStack (it was
3199             already part of the constructor that accepted a line number).
3200         * inspector/IdentifiersFactory.cpp:
3201         (WebCore::IdentifiersFactory::requestId):
3202             If the provided request identifier is 0, return an empty string.
3203             This simplifies the logic at the callsite.
3204         * inspector/InspectorConsoleAgent.cpp:
3205         (WebCore::InspectorConsoleAgent::addMessageToConsole):
3206             Add a 'requestIdentifier' parameter (defaulting to 0), and pipe it
3207             through to the 'ConsoleMessage' constructor after converting it to
3208             an internal identifier via 'IdentifiersFactor::requestId'.
3209         (WebCore::InspectorConsoleAgent::didFinishXHRLoading):
3210         (WebCore::InspectorConsoleAgent::didReceiveResponse):
3211         (WebCore::InspectorConsoleAgent::didFailLoading):
3212             Use the new 'requestIdentifier' parameter on addMessageToConsole
3213             rather than replicating the behavior in each of these three methods.
3214         * inspector/InspectorConsoleAgent.h:
3215         (InspectorConsoleAgent):
3216             Add a 'requestIdentifier' parameter (defaulting to 0).
3217         * inspector/InspectorConsoleInstrumentation.h:
3218         (WebCore::InspectorInstrumentation::addMessageToConsole):
3219         * inspector/InspectorInstrumentation.cpp:
3220         (WebCore):
3221         (WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
3222         * inspector/InspectorInstrumentation.h:
3223         (InspectorInstrumentation):
3224             Add a 'requestIdentifier' parameter (defaulting to 0), and pipe it
3225             through to lower levels of the stack.
3226         * page/Console.cpp:
3227         (WebCore::Console::addMessage):
3228         * page/Console.h:
3229         (Console):
3230             Add a 'requestIdentifier' parameter (defaulting to 0), and pipe it
3231             through to 'InspectorInstrumentation::addMessageToConsole'.
3232         * workers/WorkerContext.cpp:
3233         (WebCore::WorkerContext::addMessage):
3234         (WebCore::WorkerContext::addMessageToWorkerConsole):
3235         * workers/WorkerContext.h:
3236         (WorkerContext):
3237             Add a 'requestIdentifier' parameter (defaulting to 0), and pipe it
3238             through to 'InspectorInstrumentation::addMessageToConsole'.
3239
3240 2012-10-29  Anders Carlsson  <andersca@apple.com>
3241
3242         String::createCFString should return a RetainPtr
3243         https://bugs.webkit.org/show_bug.cgi?id=100419
3244
3245         Reviewed by Andreas Kling.
3246
3247         Update callers of String::createCFString.
3248
3249         * bridge/objc/objc_runtime.mm:
3250         (JSC::Bindings::callObjCFallbackObject):
3251         * html/HTMLMediaElement.cpp:
3252         (WebCore::createFileURLForApplicationCacheResource):
3253         * loader/archive/cf/LegacyWebArchive.cpp:
3254         (WebCore::LegacyWebArchive::createPropertyListRepresentation):
3255         * platform/LocalizedStrings.cpp:
3256         (WebCore::formatLocalizedString):
3257         (WebCore::contextMenuItemTagLookUpInDictionary):
3258         (WebCore::keygenKeychainItemName):
3259         (WebCore::imageTitle):
3260         * platform/RuntimeApplicationChecks.cpp:
3261         (WebCore::mainBundleIsEqualTo):
3262         * platform/cf/FileSystemCF.cpp:
3263         (WebCore::fileSystemRepresentation):
3264         (WebCore::pathAsURL):
3265         * platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
3266         (PlatformCAAnimation::PlatformCAAnimation):
3267         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
3268         (resubmitAllAnimations):
3269         (PlatformCALayer::addAnimationForKey):
3270         (PlatformCALayer::removeAnimationForKey):
3271         (PlatformCALayer::setName):
3272         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
3273         (PlatformCALayerWinInternal::updateTiles):
3274         * platform/graphics/cg/ImageBufferCG.cpp:
3275         (WebCore::utiFromMIMEType):
3276         * platform/graphics/cg/ImageSourceCGMac.mm:
3277         (WebCore::MIMETypeForImageSourceType):
3278         (WebCore::preferredExtensionForImageSourceType):
3279         * platform/mac/ClipboardMac.mm:
3280         (WebCore::cocoaTypeFromHTMLClipboardType):
3281         (WebCore::utiTypeFromCocoaType):
3282         * platform/mac/SSLKeyGeneratorMac.cpp:
3283         (WebCore::signedPublicKeyAndChallengeString):
3284         * platform/network/cf/AuthenticationCF.cpp:
3285         (WebCore::createCF):
3286         * platform/network/cf/CookieJarCFNet.cpp:
3287         (WebCore::setCookies):
3288         * platform/network/cf/DNSCFNet.cpp:
3289         (WebCore::DNSResolveQueue::platformResolve):
3290         * platform/network/cf/ResourceErrorCF.cpp:
3291         (WebCore::ResourceError::cfError):
3292         * platform/network/cf/ResourceHandleCFNet.cpp:
3293         (WebCore::setDefaultMIMEType):
3294         (WebCore::willSendRequest):
3295         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
3296         (WebCore::ResourceHandle::setPrivateBrowsingEnabled):
3297         * platform/network/cf/ResourceRequestCFNet.cpp:
3298         (WebCore::setHeaderFields):
3299         (WebCore::ResourceRequest::doUpdatePlatformRequest):
3300         * platform/network/cf/ResourceResponseCFNet.cpp:
3301         (WebCore::ResourceResponse::cfURLResponse):
3302         * platform/network/cf/SocketStreamHandleCFNet.cpp:
3303         (WebCore::SocketStreamHandle::createStreams):
3304         (WebCore::SocketStreamHandle::addCONNECTCredentials):
3305         (WebCore::SocketStreamHandle::copyCFStreamDescription):
3306         * platform/network/mac/ResourceRequestMac.mm:
3307         (WebCore::ResourceRequest::doUpdatePlatformRequest):
3308         * platform/network/mac/WebCoreURLResponse.mm:
3309         (WebCore::adjustMIMETypeIfNecessary):
3310         * platform/text/cf/HyphenationCF.cpp:
3311         (WebCore::::createValueForKey):
3312         * platform/text/cf/StringCF.cpp:
3313         (WTF::String::createCFString):
3314         * platform/text/cf/StringImplCF.cpp:
3315         (WTF::StringImpl::createCFString):
3316         * platform/text/mac/StringImplMac.mm:
3317         (WTF::StringImpl::operator NSString *):
3318         * platform/text/mac/TextCodecMac.cpp:
3319         (WebCore::TextCodecMac::encode):
3320         * platform/win/SearchPopupMenuWin.cpp:
3321         (WebCore::autosaveKey):
3322         (WebCore::SearchPopupMenuWin::saveRecentSearches):
3323
3324 2012-10-30  Chris Fleizach  <cfleizach@apple.com>
3325
3326         AX: Support embedded SVG objects in AX tree
3327         https://bugs.webkit.org/show_bug.cgi?id=97571
3328
3329         Reviewed by Tim Horton.
3330
3331         This patch allows an SVG image from another resource to be hooked into the AX
3332         hierarchy. This is done by creating an AX wrapper for the root SVG that holds onto
3333         its native parent image. The SVGChromeClient is then used to connect to this SVG resource.
3334
3335         Test: accessibility/svg-remote-element.html
3336
3337         * CMakeLists.txt:
3338         * GNUmakefile.list.am:
3339         * WebCore.gypi:
3340         * WebCore.vcproj/WebCore.vcproj:
3341         * WebCore.xcodeproj/project.pbxproj:
3342         * accessibility/AXObjectCache.cpp:
3343         (WebCore::createFromRenderer):
3344         * accessibility/AccessibilityAllInOne.cpp:
3345         * accessibility/AccessibilityObject.h:
3346         (WebCore::AccessibilityObject::isAccessibilitySVGRoot):
3347         (AccessibilityObject):
3348         * accessibility/AccessibilityRenderObject.cpp:
3349         (WebCore::AccessibilityRenderObject::detach):
3350         (WebCore::AccessibilityRenderObject::offsetBoundingBoxForRemoteSVGElement):
3351         (WebCore::AccessibilityRenderObject::boundingBoxRect):
3352         (WebCore::AccessibilityRenderObject::remoteSVGElementHitTest):
3353         (WebCore::AccessibilityRenderObject::elementAccessibilityHitTest):
3354         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
3355         (WebCore::AccessibilityRenderObject::isSVGImage):
3356         (WebCore::AccessibilityRenderObject::detachRemoteSVGRoot):
3357         (WebCore::AccessibilityRenderObject::remoteSVGRootElement):
3358         (WebCore::AccessibilityRenderObject::addRemoteSVGChildren):
3359         (WebCore::AccessibilityRenderObject::addChildren):
3360         * accessibility/AccessibilityRenderObject.h:
3361         (AccessibilityRenderObject):
3362         * accessibility/AccessibilitySVGRoot.cpp: Added.
3363         (WebCore::AccessibilitySVGRoot::AccessibilitySVGRoot):
3364         (WebCore::AccessibilitySVGRoot::~AccessibilitySVGRoot):
3365         (WebCore::AccessibilitySVGRoot::create):
3366         (WebCore::AccessibilitySVGRoot::parentObject):
3367         * accessibility/AccessibilitySVGRoot.h: Added.
3368         (AccessibilitySVGRoot): Class provides ability to wrap the SVG root of a remote accessibility element.
3369         (WebCore::AccessibilitySVGRoot::setParent):
3370         (WebCore::AccessibilitySVGRoot::isAccessibilitySVGRoot):
3371         (WebCore::toAccessibilitySVGRoot):
3372         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
3373         (-[WebAccessibilityObjectWrapper position]): The position of AX elements within a remote SVG element needs to be handled 
3374         in a special manner.
3375         (createAccessibilityRoleMap):
3376         * loader/EmptyClients.h:
3377         (EmptyChromeClient): Expose isEmptyChromeClient() so Accessibility will know when to apply different policies for finding
3378         the accessibility bounding rect of elements.
3379         (WebCore::EmptyChromeClient::isEmptyChromeClient):
3380         * page/ChromeClient.h:
3381         (WebCore::ChromeClient::isEmptyChromeClient):
3382         (ChromeClient):
3383         * svg/graphics/SVGImage.cpp:
3384         * svg/graphics/SVGImageChromeClient.h: Added.
3385         (SVGImageChromeClient): Expose the SVGImageChromeClient so that Accessibility can reference its image.
3386         (WebCore::SVGImageChromeClient::SVGImageChromeClient):
3387         (WebCore::SVGImageChromeClient::isSVGImageChromeClient):
3388         (WebCore::SVGImageChromeClient::image):
3389         (WebCore::SVGImageChromeClient::chromeDestroyed):
3390         (WebCore::SVGImageChromeClient::invalidateContentsAndRootView):
3391         (WebCore::toSVGImageChromeClient):
3392
3393 2012-10-30  Dan Carney  <dcarney@google.com>
3394
3395         add 7 bit strings capabilities to the v8 binding layer
3396         https://bugs.webkit.org/show_bug.cgi?id=91850
3397
3398         Reviewed by Adam Barth.
3399
3400         This change enables the v8 binding layer to make use of webkit's
3401         8 bit string capabilities. Using 8 bit strings leads to certain
3402         benchmark performance improvemnts as can be seen in
3403         https://bug-91850-attachments.webkit.org/attachment.cgi?id=163334.
3404
3405         No new tests. Test coverage already extensive.
3406
3407         * bindings/v8/V8PerIsolateData.cpp:
3408         (WebCore::V8PerIsolateData::visitExternalStrings):
3409         * bindings/v8/V8StringResource.cpp:
3410         (StringTraits):
3411         (WebCore::false):
3412         (WebCore):
3413         (WebCore::true):
3414         (WebCore::v8StringToWebCoreString):
3415         * bindings/v8/V8ValueCache.cpp:
3416         (WebCore::makeExternalString):
3417         (WebCore::WebCoreStringResourceBase::visitStrings):
3418         * bindings/v8/V8ValueCache.h:
3419         (WebCore::WebCoreStringResourceBase::WebCoreStringResourceBase):