d3de75d1aedb2316b3d11c17b6ef03016af585cc
[WebKit.git] / Source / WebCore / ChangeLog
1 2012-09-04  Joshua Bell  <jsbell@chromium.org>
2
3         IndexedDB: IDBRequest leaks if IDBCursor closes and no further events fired
4         https://bugs.webkit.org/show_bug.cgi?id=95777
5
6         Reviewed by Tony Chang.
7
8         IDBRequests are kept alive as long as they may fire events, which includes
9         if the associated IDBCursor object can be advanced. When the transaction
10         is finished the IDBCursor is notified which in turn tells the IDBRequest
11         that the cursor won't be the source of more events. However, if this occurs
12         and no further events fire the IDBRequest doesn't clear it's "has pending
13         activity flag". Clear the flag on the notification if the request is
14         otherwise complete.
15
16         No new tests - ActiveDOMObjects and leaks are persnickety.
17
18         * Modules/indexeddb/IDBRequest.cpp:
19         (WebCore::IDBRequest::finishCursor):
20
21 2012-09-04  Max Vujovic  <mvujovic@adobe.com>
22
23         [CSS Shaders] Implement multiply, screen, darken, lighten, difference, exclusion blend modes.
24         https://bugs.webkit.org/show_bug.cgi?id=93870
25
26         Reviewed by Dirk Schulze.
27
28         Add expressions for the aforementioned blend modes. The expressions are lifted directly
29         from the CSS Compositing and Blending spec [1]. WebKit adds these blending expressions to
30         the author's shader.
31
32         [1]: https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#blendingnormal
33
34         Test: css3/filters/custom/custom-filter-blend-modes.html
35
36         * platform/graphics/filters/CustomFilterValidatedProgram.cpp:
37         (WebCore::CustomFilterValidatedProgram::blendFunctionString):
38
39 2012-09-04  Nikhil Bhargava  <nbhargava@google.com>
40
41         Fix style for Event.h
42         https://bugs.webkit.org/show_bug.cgi?id=95779
43
44         Reviewed by Eric Seidel.
45
46         Changes indenting for Event.h to match style guidelines for namespaces
47
48         * dom/Event.h:
49
50 2012-09-04  Jeffrey Pfau  <jpfau@apple.com>
51
52         Make plugins respect third-party storage blocking setting
53         https://bugs.webkit.org/show_bug.cgi?id=94888
54
55         Reviewed by Brady Eidson.
56
57         Added functions for discerning if a plugin should be able to access its storage in its current origin.
58
59         Tests: http/tests/security/cross-origin-plugin-allowed.html
60                http/tests/security/cross-origin-plugin.html
61
62         * WebCore.exp.in: Export FrameTree::top and SecurityOrigin::canAccessStorage
63         * page/SecurityOrigin.h: Added canAccessPluginStorage
64         (WebCore::SecurityOrigin::canAccessPluginStorage):
65
66 2012-09-04  Robert Hogan  <robert@webkit.org>
67
68         Regression(r127163): Heap-use-after-free in WebCore::RenderBoxModelObject::hasSelfPaintingLayer
69         https://bugs.webkit.org/show_bug.cgi?id=95632
70
71         Reviewed by Abhishek Arya.
72
73         Don't add floats to the floating object set of blocks that avoid floats. There's no point in doing that
74         and they will never get cleared out during relayout.
75
76         Tests: fast/css/intruding-floats-crash.html
77
78         * rendering/RenderBlock.cpp:
79         (WebCore::RenderBlock::clearFloatsIfNeeded):
80
81 2012-09-04  Michael Saboff  <msaboff@apple.com>
82
83         equal() in CSSParser.cpp should check the length of characters
84         https://bugs.webkit.org/show_bug.cgi?id=95706
85
86         Reviewed by Abhishek Arya.
87
88         Pass the length of string literals to CSSParser static functions equal() and 
89         equalIgnoringCase() so that checks won't access out of bounds memory.
90
91         Added test fast/css/crash-comparing-equal.html.
92
93         * css/CSSParser.cpp:
94         (WebCore::equal): Use template to retrieve the length of string literal.
95         (WebCore::equalIgnoringCase): Ditto.
96         (WebCore::CSSParser::parseDashboardRegions): Use const char[] instead of const char*
97
98 2012-09-04  Antonio Gomes  <agomes@rim.com>
99
100         [BlackBerry] Use child/ScrollableContent layer's position instead of parent/ScrollLayer's boundsOrigin
101         https://bugs.webkit.org/show_bug.cgi?id=95778
102         PR #202252
103
104         Reviewed by Rob Buis.
105         Internally reviewed by Arvid Nilsson.
106
107         Upstream has switch away from using the parent scroll layer's bounds origin
108         in order to translate contents of all its child layers. Instead now, it directly
109         sets the scroll position of the child scrollable contents layer.
110
111         No new tests, since it is a catch-up with upstreaming code.
112
113         Source/WebCore:
114         * platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp:
115         (WebCore):
116         * platform/graphics/blackberry/GraphicsLayerBlackBerry.h:
117         (GraphicsLayerBlackBerry):
118         * platform/graphics/blackberry/LayerCompositingThread.cpp:
119         (WebCore::LayerCompositingThread::updateAnimations):
120         * platform/graphics/blackberry/LayerCompositingThread.h:
121         (WebCore::LayerOverride::LayerOverride):
122         (LayerOverride):
123         * platform/graphics/blackberry/LayerData.h:
124         (LayerData):
125         * platform/graphics/blackberry/LayerRenderer.cpp:
126         (WebCore::LayerRenderer::updateLayersRecursive):
127         * platform/graphics/blackberry/LayerWebKitThread.h:
128         * rendering/RenderLayerBacking.cpp:
129         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
130
131 2012-09-04  Tommy Widenflycht  <tommyw@google.com>
132
133         MediaStream API: Add the async createOffer functionality to RTCPeerConnection
134         https://bugs.webkit.org/show_bug.cgi?id=95734
135
136         Reviewed by Adam Barth.
137
138         createOffer sends a request to the platform implementer requesting it to gather up all candidates.
139         This can take some time, therefore the request is async.
140
141         Test: fast/mediastream/RTCPeerConnection-createOffer.html
142
143         * CMakeLists.txt:
144         * GNUmakefile.list.am:
145         * Modules/mediastream/RTCErrorCallback.h: Copied from Source/WebCore/platform/mediastream/RTCSessionDescriptionDescriptor.h.
146         (WebCore):
147         (RTCErrorCallback):
148         (WebCore::RTCErrorCallback::~RTCErrorCallback):
149         * Modules/mediastream/RTCErrorCallback.idl: Copied from Source/WebCore/platform/mediastream/RTCSessionDescriptionDescriptor.h.
150         * Modules/mediastream/RTCPeerConnection.cpp:
151         (WebCore::RTCPeerConnection::createOffer):
152         (WebCore):
153         * Modules/mediastream/RTCPeerConnection.h:
154         (WebCore):
155         (RTCPeerConnection):
156         * Modules/mediastream/RTCPeerConnection.idl:
157         * Modules/mediastream/RTCSessionDescriptionCallback.h: Copied from Source/WebCore/platform/mediastream/RTCSessionDescriptionDescriptor.h.
158         (WebCore):
159         (RTCSessionDescriptionCallback):
160         (WebCore::RTCSessionDescriptionCallback::~RTCSessionDescriptionCallback):
161         * Modules/mediastream/RTCSessionDescriptionCallback.idl: Copied from Source/WebCore/platform/mediastream/RTCSessionDescriptionDescriptor.h.
162         * Modules/mediastream/RTCSessionDescriptionRequestImpl.cpp: Added.
163         (WebCore):
164         (WebCore::RTCSessionDescriptionRequestImpl::create):
165         (WebCore::RTCSessionDescriptionRequestImpl::RTCSessionDescriptionRequestImpl):
166         (WebCore::RTCSessionDescriptionRequestImpl::~RTCSessionDescriptionRequestImpl):
167         (WebCore::RTCSessionDescriptionRequestImpl::requestSucceeded):
168         (WebCore::RTCSessionDescriptionRequestImpl::requestFailed):
169         (WebCore::RTCSessionDescriptionRequestImpl::stop):
170         (WebCore::RTCSessionDescriptionRequestImpl::clear):
171         * Modules/mediastream/RTCSessionDescriptionRequestImpl.h: Copied from Source/WebCore/platform/mediastream/RTCSessionDescriptionDescriptor.h.
172         (WebCore):
173         (RTCSessionDescriptionRequestImpl):
174         * WebCore.gypi:
175         * platform/chromium/support/WebRTCSessionDescriptionDescriptor.cpp: Copied from Tools/DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.h.
176         (WebKit):
177         (WebKit::WebRTCSessionDescriptionDescriptor::WebRTCSessionDescriptionDescriptor):
178         (WebKit::WebRTCSessionDescriptionDescriptor::assign):
179         (WebKit::WebRTCSessionDescriptionDescriptor::reset):
180         (WebKit::WebRTCSessionDescriptionDescriptor::operator WTF::PassRefPtr<WebCore::RTCSessionDescriptionDescriptor>):
181         (WebKit::WebRTCSessionDescriptionDescriptor::initialize):
182         (WebKit::WebRTCSessionDescriptionDescriptor::type):
183         (WebKit::WebRTCSessionDescriptionDescriptor::setType):
184         (WebKit::WebRTCSessionDescriptionDescriptor::sdp):
185         (WebKit::WebRTCSessionDescriptionDescriptor::setSDP):
186         * platform/chromium/support/WebRTCSessionDescriptionRequest.cpp: Added.
187         (WebKit):
188         (WebKit::WebRTCSessionDescriptionRequest::WebRTCSessionDescriptionRequest):
189         (WebKit::WebRTCSessionDescriptionRequest::assign):
190         (WebKit::WebRTCSessionDescriptionRequest::reset):
191         (WebKit::WebRTCSessionDescriptionRequest::requestSucceeded):
192         (WebKit::WebRTCSessionDescriptionRequest::requestFailed):
193         (ExtraDataContainer):
194         (WebKit::ExtraDataContainer::ExtraDataContainer):
195         (WebKit::ExtraDataContainer::extraData):
196         (WebKit::WebRTCSessionDescriptionRequest::extraData):
197         (WebKit::WebRTCSessionDescriptionRequest::setExtraData):
198         * platform/mediastream/RTCPeerConnectionHandler.cpp:
199         (RTCPeerConnectionHandlerDummy):
200         (WebCore::RTCPeerConnectionHandlerDummy::createOffer):
201         (WebCore):
202         * platform/mediastream/RTCPeerConnectionHandler.h:
203         (WebCore):
204         (RTCPeerConnectionHandler):
205         * platform/mediastream/RTCSessionDescriptionDescriptor.h:
206         (WebCore::RTCSessionDescriptionDescriptor::type):
207         (WebCore::RTCSessionDescriptionDescriptor::sdp):
208         * platform/mediastream/RTCSessionDescriptionRequest.h: Copied from Source/WebCore/platform/mediastream/RTCSessionDescriptionDescriptor.h.
209         (WebCore):
210         (RTCSessionDescriptionRequest):
211         (ExtraData):
212         (WebCore::RTCSessionDescriptionRequest::ExtraData::~ExtraData):
213         (WebCore::RTCSessionDescriptionRequest::~RTCSessionDescriptionRequest):
214         (WebCore::RTCSessionDescriptionRequest::extraData):
215         (WebCore::RTCSessionDescriptionRequest::setExtraData):
216         (WebCore::RTCSessionDescriptionRequest::RTCSessionDescriptionRequest):
217         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
218         (WebCore::RTCPeerConnectionHandlerChromium::createOffer):
219         (WebCore):
220         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h:
221         (RTCPeerConnectionHandlerChromium):
222
223 2012-09-04  Dan Bernstein  <mitz@apple.com>
224
225         Reverted r127468 (the fix for <http://webkit.org/b/93443>) because the test it included caused
226         an assertion failure in Document::updateStyleIfNeeded().
227
228         * dom/NamedFlowCollection.cpp:
229         (WebCore::NamedFlowCollection::ensureFlowWithName):
230         (WebCore::NamedFlowCollection::discardNamedFlow):
231         * inspector/Inspector.json:
232         * inspector/InspectorCSSAgent.cpp:
233         (WebCore::InspectorCSSAgent::didCreateNamedFlow):
234         (WebCore::InspectorCSSAgent::didRemoveNamedFlow):
235         (WebCore::InspectorCSSAgent::getNamedFlowCollection):
236         (WebCore::InspectorCSSAgent::getFlowByName):
237         (WebCore):
238         * inspector/InspectorCSSAgent.h:
239         (InspectorCSSAgent):
240         * inspector/InspectorInstrumentation.cpp:
241         (WebCore):
242         (WebCore::InspectorInstrumentation::didCreateNamedFlowImpl):
243         (WebCore::InspectorInstrumentation::didRemoveNamedFlowImpl):
244         * inspector/InspectorInstrumentation.h:
245         (InspectorInstrumentation):
246         (WebCore::InspectorInstrumentation::didCreateNamedFlow):
247         (WebCore::InspectorInstrumentation::didRemoveNamedFlow):
248         * inspector/front-end/CSSStyleModel.js:
249         (WebInspector.CSSStyleModel):
250         (WebInspector.CSSStyleModel.prototype.getNamedFlowCollectionAsync):
251         (WebInspector.CSSStyleModel.prototype.getFlowByNameAsync):
252         (WebInspector.CSSStyleModel.prototype._namedFlowCreated.callback):
253         (WebInspector.CSSStyleModel.prototype._namedFlowCreated):
254         (WebInspector.CSSStyleModel.prototype._namedFlowRemoved.callback):
255         (WebInspector.CSSStyleModel.prototype._namedFlowRemoved):
256         (WebInspector.CSSDispatcher.prototype.namedFlowCreated):
257         (WebInspector.CSSDispatcher.prototype.namedFlowRemoved):
258         (WebInspector.NamedFlow):
259         (WebInspector.NamedFlow.parsePayloadArray):
260         * rendering/RenderNamedFlowThread.cpp:
261         (WebCore::RenderNamedFlowThread::dispatchRegionLayoutUpdateEvent):
262
263 2012-09-04  Simon Fraser  <simon.fraser@apple.com>
264
265         Regression: Heap-use-after-free in WebCore::FrameView::scrollContentsFastPath
266         https://bugs.webkit.org/show_bug.cgi?id=95754
267
268         Reviewed by Dave Hyatt.
269
270         It's possible to have a renderer with position:fixed or sticky style,
271         but no layer, for example a RenderScrollBarPart. Don't register such
272         renderers with the FrameView.
273         
274         Moved the code that registers/unregisters with the FrameView from
275         styleWillChange() to styleDidChange(), since in the latter case
276         we can check if we have a RenderLayer. Only register renderers with layers.
277         We always unregister, which required removing an assertion in
278         FrameView::removeFixedObject(), and replacing it with a null check of m_fixedObjects.
279
280         Test: fast/css/remove-fixed-resizer-crash.html
281
282         * page/FrameView.cpp:
283         (WebCore::FrameView::removeFixedObject):
284         * rendering/RenderBoxModelObject.cpp:
285         (WebCore::RenderBoxModelObject::styleWillChange):
286         (WebCore::RenderBoxModelObject::styleDidChange):
287
288 2012-09-04  Dominik Röttsches  <dominik.rottsches@intel.com>
289
290         ResourceErrorBase needs to identify timeouts
291         https://bugs.webkit.org/show_bug.cgi?id=95755
292
293         Reviewed by Alexey Proskuryakov.
294
295         Adding a property to check whether this ResourceError was raised due to a timeout.
296         This is preparatory work for bug 74802. In order to implement XHR2 timeout functionality,
297         I need to identify some layers up whether the original network problem has been a timeout.
298
299         No new tests, no change in behavior yet.
300
301         * platform/network/ResourceErrorBase.cpp:
302         (WebCore::ResourceErrorBase::copy): Copying new member.
303         (WebCore::ResourceErrorBase::compare): Comparing new member.
304         * platform/network/ResourceErrorBase.h:
305         (WebCore::ResourceErrorBase::setIsTimeout): New setter.
306         (WebCore::ResourceErrorBase::isTimeout): New getter.
307         (ResourceErrorBase),
308         (WebCore::ResourceErrorBase::ResourceErrorBase): Adding m_isTimeout member.
309
310 2012-09-04  Tommy Widenflycht  <tommyw@google.com>
311
312         MediaStream API: Change the MediaStreamTrackList track added/removed signaling
313         https://bugs.webkit.org/show_bug.cgi?id=95721
314
315         Reviewed by Adam Barth.
316
317         This allows the platform implementor to throw an NOT_SUPPORTED_ERR exception if it doesn support these methods.
318
319         Patch covered by expanded existing test.
320
321         * Modules/mediastream/MediaStreamTrackList.cpp:
322         (WebCore::MediaStreamTrackList::add):
323         (WebCore::MediaStreamTrackList::remove):
324         * platform/mediastream/MediaStreamCenter.h:
325         (MediaStreamCenter):
326         * platform/mediastream/blackberry/MediaStreamCenterBlackBerry.cpp:
327         (WebCore::MediaStreamCenterBlackBerry::didAddMediaStreamTrack):
328         (WebCore):
329         (WebCore::MediaStreamCenterBlackBerry::didRemoveMediaStreamTrack):
330         * platform/mediastream/blackberry/MediaStreamCenterBlackBerry.h:
331         (MediaStreamCenterBlackBerry):
332         * platform/mediastream/chromium/MediaStreamCenterChromium.cpp:
333         (WebCore::MediaStreamCenterChromium::didAddMediaStreamTrack):
334         (WebCore::MediaStreamCenterChromium::didRemoveMediaStreamTrack):
335         * platform/mediastream/chromium/MediaStreamCenterChromium.h:
336         (MediaStreamCenterChromium):
337         * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp:
338         (WebCore::MediaStreamCenterGStreamer::didAddMediaStreamTrack):
339         (WebCore::MediaStreamCenterGStreamer::didRemoveMediaStreamTrack):
340         * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.h:
341         (MediaStreamCenterGStreamer):
342
343 2012-09-04  Joanmarie Diggs  <jdiggs@igalia.com>
344
345         [GTK] Crash in AccessibilityObject::accessibilityPlatformIncludesObject()
346         https://bugs.webkit.org/show_bug.cgi?id=95740
347
348         Reviewed by Martin Robinson.
349
350         Added sanity check to be sure we have a render object prior to seeing if
351         said object is an anonymous block.
352
353         Testing via unit test because a non-flaky layout test crasher could not
354         be found.
355
356         * accessibility/gtk/AccessibilityObjectAtk.cpp:
357         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
358         Sanity check for render object added.
359
360 2012-09-04  Christophe Dumez  <christophe.dumez@intel.com>
361
362         Automatic features should work in sandboxed iframes if "allow-scripts" flag is set
363         https://bugs.webkit.org/show_bug.cgi?id=93961
364
365         Reviewed by Adam Barth.
366
367         Allow automatic features (video autoplay and form control
368         autofocus) in a sandboxed iframe that has "allow-scripts"
369         flag set. This behavior is according to the latest
370         specification at:
371         http://dev.w3.org/html5/spec/browsers.html#attr-iframe-sandbox-allow-same-origin
372
373         This sandboxed automatic features browsing context flag is
374         relaxed by the same keyword as scripts, because when
375         scripts are enabled these features are trivially possible
376         anyway, and it would be unfortunate to force authors to
377         use script to do them when sandboxed rather than allowing
378         them to use the declarative features.
379
380         Tests: fast/forms/autofocus-in-sandbox-with-allow-scripts.html
381                media/auto-play-in-sandbox-with-allow-scripts.html
382
383         * dom/SecurityContext.cpp:
384         (WebCore::SecurityContext::parseSandboxPolicy):
385
386 2012-09-04  Sami Kyostila  <skyostil@google.com>
387
388         Register scrolling layers with ScrollingCoordinator
389         https://bugs.webkit.org/show_bug.cgi?id=78862
390
391         Reviewed by James Robinson.
392
393         In order to allow scrollable child layers to be scrolled off the main
394         thread, register them with the ScrollingCoordinator. These layers are
395         also removed from the non-fast scrollable region.
396
397         Whenever the scroll offset or other scroll geometry related attribute of
398         a compositor scrolled layer changes, the ScrollingCoordinator is
399         informed to allow it to update its internal representation of the
400         scrollable layer.
401
402         No tests because the ScrollingCoordinator is currently not testable.
403
404         * page/scrolling/ScrollingCoordinator.cpp:
405         (WebCore::computeNonFastScrollableRegion): Composited scrolling layers
406         can be scrolled off the main thread.
407         (WebCore):
408         (WebCore::ScrollingCoordinator::scrollableAreaScrollLayerDidChange):
409         Callback to ScrollingCoordinator about changes the composited scrolling layers.
410         * page/scrolling/ScrollingCoordinator.h:
411         (WebCore):
412         (ScrollingCoordinator):
413         * page/scrolling/ScrollingCoordinatorNone.cpp:
414         (WebCore):
415         (WebCore::ScrollingCoordinator::scrollableAreaScrollLayerDidChange):
416         * platform/ScrollableArea.h:
417         (WebCore::ScrollableArea::usesCompositedScrolling):
418         * rendering/RenderLayer.cpp:
419         (WebCore):
420         (WebCore::RenderLayer::usesCompositedScrolling):
421         * rendering/RenderLayer.h:
422         (RenderLayer):
423         (WebCore::RenderLayer::usesCompositedScrolling):
424         * rendering/RenderLayerBacking.cpp:
425         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
426         (WebCore::RenderLayerBacking::updateScrollingLayers):
427         * rendering/RenderLayerCompositor.cpp:
428         (WebCore::RenderLayerCompositor::scrollingLayerDidChange):
429         (WebCore):
430         * rendering/RenderLayerCompositor.h:
431         (RenderLayerCompositor):
432
433 2012-09-04  Brian Anderson  <brianderson@chromium.org>
434
435         [chromium] Do not allow infinite pending frames in CCFrameRateController
436         https://bugs.webkit.org/show_bug.cgi?id=94254
437
438         Reviewed by James Robinson.
439
440         Removes support for infinite pending frames in CCFrameRateController
441         if swap acks are available.        
442
443         Functionality covered by existing tests.
444
445         * platform/graphics/chromium/cc/CCFrameRateController.cpp:
446         (WebCore::CCFrameRateController::CCFrameRateController):
447         (WebCore::CCFrameRateController::setMaxFramesPending):
448         (WebCore::CCFrameRateController::setSwapBuffersCompleteSupported):
449         (WebCore):
450         (WebCore::CCFrameRateController::onTimerTick):
451         (WebCore::CCFrameRateController::didBeginFrame):
452         (WebCore::CCFrameRateController::didFinishFrame):
453         * platform/graphics/chromium/cc/CCFrameRateController.h:
454         (CCFrameRateController):
455         * platform/graphics/chromium/cc/CCScheduler.cpp:
456         (WebCore::CCScheduler::setSwapBuffersCompleteSupported):
457         (WebCore):
458         * platform/graphics/chromium/cc/CCScheduler.h:
459         (CCScheduler):
460         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
461         (WebCore::CCThreadProxy::initializeRendererOnImplThread):
462
463 2012-09-04  Tim Horton  <timothy_horton@apple.com>
464
465         ASSERTion failure when SVG element is removed from document and readded
466         https://bugs.webkit.org/show_bug.cgi?id=95517
467         <rdar://problem/12175583>
468
469         Reviewed by Brady Eidson.
470
471         Previously, SVG animations would cease to animate when their parent
472         <svg> element was removed and re-added to the document.
473
474         Instead, to match Firefox and Opera, we should continue the animation
475         with the same beginTime (i.e. the animation continues as if it had never
476         been removed from the document).
477
478         Test: svg/animations/reinserting-svg-into-document.html
479
480         * svg/SVGSVGElement.cpp:
481         (WebCore::SVGSVGElement::insertedInto): Don't call begin() on an already-started SMILTimeContainer().
482         * svg/animation/SMILTimeContainer.cpp: 
483         (WebCore::SMILTimeContainer::isStarted): Added.
484         * svg/animation/SMILTimeContainer.h: Add isStarted().
485         * svg/animation/SVGSMILElement.cpp:
486         (WebCore::SVGSMILElement::insertedInto): Always reschedule SVGSMILElements with
487         their parent SMILTimeContainer when they are inserted into the document, otherwise
488         they are lost (and never again update) when their subtree is removed and then
489         readded to the document.
490
491 2012-09-04  Andrei Bucur  <abucur@adobe.com>
492
493         [CSS Regions] Destroying a render named flow thread without unregistering left-over content nodes triggered an assertion.
494         https://bugs.webkit.org/show_bug.cgi?id=95645
495
496         Reviewed by Abhishek Arya.
497
498         This patch cleans up the render named flow thread before destruction by unregistering left-over content nodes.
499
500         Tests: fast/regions/moved-content-node-crash.html
501
502         * rendering/RenderNamedFlowThread.cpp:
503         (WebCore::RenderNamedFlowThread::~RenderNamedFlowThread):
504
505 2012-09-04  Koji Ishii  <kojiishi@gmail.com>
506
507         [chromium] OpenTypeVerticalData.cpp in both webcore_remaining and webcore_platform seems to break incremental linking on Windows Chromium
508         https://bugs.webkit.org/show_bug.cgi?id=95744
509
510         Patch by Koji Ishii <kojiishi@gmail.com> on 2012-09-04
511         Unreviewed build fix, verified by Scott Graham.
512
513         The addition of 'platform/graphics/opentype/*' to webcore_platform in WebCore.gyp was redundant
514         because '/opentype/' was already included to webcore_remaining.
515         It was not only redundant but also breaks incremental linking.
516
517         No new tests are required because no behavior changes.
518
519         * WebCore.gyp/WebCore.gyp: Removed platform/graphics/opentype/* from webcore_platform.
520
521 2012-09-04  Otto Derek Cheung  <otcheung@rim.com>
522
523         [BlackBerry] Browser is not sending secured Cookie back to server over HTTPS connection
524         https://bugs.webkit.org/show_bug.cgi?id=95747
525
526         PR199729
527
528         Reviewed by Rob Buis.
529         Internally Reviewed by Joe Mason.
530
531         If the browser has never saved a secure protocol cookie in its mapping before,
532         and it tries to set and retreive a secure cookie over a non-secure
533         protocol, it will not show up because the link between the secure and
534         non-secure mapping isn't created until a cookie (sent through secure) is set.
535
536         The fix is to also check for the linkage in getRawCookies. Note that we cannot
537         map the secure CookieMap to the non-secure one because getRawCookies is a const
538         function.
539
540         Manually tested using our Browser Test suite.
541
542         * platform/blackberry/CookieManager.cpp:
543         (WebCore::CookieManager::getRawCookies):
544
545 2012-09-04  Philippe Normand  <pnormand@igalia.com>
546
547         [GStreamer] 0.11 build breaks due to rename of gst_message_new_duration
548         https://bugs.webkit.org/show_bug.cgi?id=95751
549
550         Reviewed by Martin Robinson.
551
552         In gstreamer commit f712a9596c2bc1863edf9b816d9854eefca9ba45
553         gst_message_new_duration was renamed to
554         gst_message_new_duration_changed.
555
556         However the only place where we used this is in the HTTP source
557         element and only if appsrc < 0.10.27 is used at runtime. In the
558         case of GStreamer 1.0 this condition will be always false so we
559         can disable this code at build time.
560
561         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
562         (StreamingClient::didReceiveResponse):
563
564 2012-09-04  Andrei Poenaru  <poenaru@adobe.com>
565
566         Web Inspector: Protocol Extension: Add "regionLayoutUpdate" event
567         https://bugs.webkit.org/show_bug.cgi?id=93443
568
569         Reviewed by Pavel Feldman.
570
571         Added "regionLayoutUpdate" event to the protocol.
572
573         Removed "getFlowByName" from protocol.
574
575         The front-end keeps in sync the requested Named Flow Collections.
576
577         Modified existing test: inspector/styles/protocol-css-regions-commands.html
578
579         * dom/NamedFlowCollection.cpp:
580         (WebCore::NamedFlowCollection::ensureFlowWithName):
581         (WebCore::NamedFlowCollection::discardNamedFlow):
582         * inspector/Inspector.json:
583         * inspector/InspectorCSSAgent.cpp:
584         (WebCore::InspectorCSSAgent::didCreateNamedFlow):
585         (WebCore::InspectorCSSAgent::willRemoveNamedFlow):
586         (WebCore):
587         (WebCore::InspectorCSSAgent::didUpdateRegionLayout):
588         (WebCore::InspectorCSSAgent::getNamedFlowCollection):
589         (WebCore::InspectorCSSAgent::documentNodeWithRequestedFlowsId):
590         * inspector/InspectorCSSAgent.h:
591         (InspectorCSSAgent):
592         * inspector/InspectorInstrumentation.cpp:
593         (WebCore):
594         (WebCore::InspectorInstrumentation::didCreateNamedFlowImpl):
595         (WebCore::InspectorInstrumentation::willRemoveNamedFlowImpl):
596         (WebCore::InspectorInstrumentation::didUpdateRegionLayoutImpl):
597         * inspector/InspectorInstrumentation.h:
598         (InspectorInstrumentation):
599         (WebCore::InspectorInstrumentation::didCreateNamedFlow):
600         (WebCore::InspectorInstrumentation::willRemoveNamedFlow):
601         (WebCore):
602         (WebCore::InspectorInstrumentation::didUpdateRegionLayout):
603         * inspector/front-end/CSSStyleModel.js:
604         (WebInspector.CSSStyleModel):
605         (WebInspector.CSSStyleModel.prototype.getNamedFlowCollectionAsync.callback):
606         (WebInspector.CSSStyleModel.prototype.getNamedFlowCollectionAsync):
607         (WebInspector.CSSStyleModel.prototype.getFlowByNameAsync.callback):
608         (WebInspector.CSSStyleModel.prototype.getFlowByNameAsync):
609         (WebInspector.CSSStyleModel.prototype._namedFlowCreated):
610         (WebInspector.CSSStyleModel.prototype._namedFlowRemoved):
611         (WebInspector.CSSStyleModel.prototype._regionLayoutUpdated):
612         (WebInspector.CSSStyleModel.prototype._resetNamedFlowCollections):
613         (WebInspector.CSSDispatcher.prototype.namedFlowCreated):
614         (WebInspector.CSSDispatcher.prototype.namedFlowRemoved):
615         (WebInspector.CSSDispatcher.prototype.regionLayoutUpdated):
616         (WebInspector.NamedFlow):
617         (WebInspector.NamedFlowCollection):
618         (WebInspector.NamedFlowCollection.prototype.appendNamedFlow):
619         (WebInspector.NamedFlowCollection.prototype.removeNamedFlow):
620         (WebInspector.NamedFlowCollection.prototype.flowByName):
621         * rendering/RenderNamedFlowThread.cpp:
622         (WebCore::RenderNamedFlowThread::dispatchRegionLayoutUpdateEvent):
623
624 2012-09-04  Jonathan Liu  <net147@gmail.com>
625
626         Fix IDL dependency generation correctly
627         https://bugs.webkit.org/show_bug.cgi?id=95730
628
629         Reviewed by Csaba Osztrogonác.
630
631         IDL dependency generation is still not working after
632         https://bugs.webkit.org/show_bug.cgi?id=88304. This is because spaces
633         added after the filename in an echo command end up being added to the
634         file which isn't handled correctly by preprocess-idls.pl. The problem
635         is fixed by removing the space after the filename.
636
637         * DerivedSources.pri:
638
639 2012-09-04  Mario Sanchez Prada  <msanchez@igalia.com>
640
641         [Stable] [GTK] Crash in WebCore::HTMLSelectElement::selectedIndex
642         https://bugs.webkit.org/show_bug.cgi?id=95618
643
644         Reviewed by Martin Robinson.
645
646         Make sure we only emit the the signal for menu lists and list
647         boxes rendered from actual HTML select elements.
648
649         * accessibility/gtk/AXObjectCacheAtk.cpp:
650         (WebCore::notifyChildrenSelectionChange): We support accessibility
651         ListBoxes and MenuLists only here, assuming they represent HTML
652         select elements, which might be not always true (e.g. ARIA). Thus,
653         check if that condition is true, early returning in other case.
654
655 2012-09-04  Martin Robinson  <mrobinson@igalia.com>
656
657         [Cairo] [TextureMapper] Assertion failure in TextureMapperGL
658         https://bugs.webkit.org/show_bug.cgi?id=95713
659
660         Reviewed by Noam Rosenthal.
661
662         Fix an assertion failure by returning a valid context always for GraphicsContext3D::platformContext.
663         This is important because TextureMapperGL uses the platform context to perform hashing.
664
665         No new tests. This is covered by existing accelerated compositing tests.
666
667         * platform/graphics/cairo/GraphicsContext3DPrivate.cpp:
668         (WebCore::GraphicsContext3DPrivate::platformContext): Return the current GLContext
669         when getting the platform context for private GraphicsContext3DPrivates that render
670         to the currently active context.
671
672 2012-09-04  Alexander Shalamov  <alexander.shalamov@intel.com>
673
674         [EFL] Check if ecore_x is initialised before calling ecore_x_bell to avoid crash
675         https://bugs.webkit.org/show_bug.cgi?id=86961
676
677         Reviewed by Kenneth Rohde Christiansen.
678
679         Add ecore_x initialisation check before calling ecore_x_bell
680         to avoid crashes when X server is not running.
681
682         * platform/efl/SoundEfl.cpp:
683         (WebCore::systemBeep):
684
685 2012-09-04  Alexander Shalamov  <alexander.shalamov@intel.com>
686
687         [EFL] Check if ecore_x is initialised before calling ecore_x_bell to avoid crash
688         https://bugs.webkit.org/show_bug.cgi?id=86961
689
690         Reviewed by Kenneth Rohde Christiansen.
691
692         Add ecore_x initialisation check before calling ecore_x_bell
693         to avoid crashes when X server is not running.
694
695         * platform/efl/SoundEfl.cpp:
696         (WebCore::systemBeep):
697
698 2012-09-04  Alexander Shalamov  <alexander.shalamov@intel.com>
699
700         [EFL][WK2] CSS3 Media Queries functionality is broken
701         https://bugs.webkit.org/show_bug.cgi?id=95680
702
703         Reviewed by Kenneth Rohde Christiansen.
704
705         In WK2, WebProcess doesn't have access to ewk_view evas object.
706         Methods that get screen rect or screen depth either return incorrect value or crash.
707         This patch removes dependency to ewk_view evas object and relies on ecore_x_* functions
708         to get screen rectangle or color depth of the screen.
709
710         * platform/efl/EflScreenUtilities.cpp: removed unused getPixelDepth method definition
711         * platform/efl/EflScreenUtilities.h: removed unsused getPixelDepth method declaration
712         (WebCore):
713         * platform/efl/PlatformScreenEfl.cpp:
714         (WebCore):
715         (WebCore::screenHorizontalDPI):
716         (WebCore::screenVerticalDPI):
717         (WebCore::screenDepth):
718         (WebCore::screenDepthPerComponent):
719         (WebCore::screenIsMonochrome):
720         (WebCore::screenRect):
721
722 2012-09-04  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
723
724         [EFL] Context menu restore.
725         https://bugs.webkit.org/show_bug.cgi?id=74179
726
727         Reviewed by Gyuyoung Kim.
728
729         Adds context menu support for EFL port using non-CROSS_PLATFORM_CONTEXT_MENUS
730         approach, the same as used in WebKit2.
731
732         * PlatformEfl.cmake: Removed -DWTF_USE_CROSS_PLATFORM_CONTEXT_MENUS=1
733
734 2012-09-04  Andrey Adaikin  <aandrey@chromium.org>
735
736         Web Inspector: [WebGL] Bugfix: wrong texture binding target in replay for 3D textures
737         https://bugs.webkit.org/show_bug.cgi?id=95687
738
739         Reviewed by Vsevolod Vlasov.
740
741         gl.bindTexture accepts either TEXTURE_2D or TEXTURE_CUBE_MAP targets, but we tried to replay with TEXTURE_CUBE_MAP_POSITIVE_X and others for 3D textures.
742
743         * inspector/InjectedScriptWebGLModuleSource.js:
744         (.):
745
746 2012-09-04  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
747
748         Allow child-frame content in hit-tests.
749         https://bugs.webkit.org/show_bug.cgi?id=95204
750
751         Reviewed by Antonio Gomes.
752
753         Refactors how EventHandler::hitTestResultAtPoint handles child-frame content,
754         it is now handled by the hit test itself controlled by the AllowChildFrameContent
755         flag in HitTestRequest.
756
757         Tests: fast/dom/nodesFromRect/nodesFromRect-child-frame-content.html
758                touchadjustment/iframe-boundary.html
759
760         * WebCore.exp.in:
761         * WebCore.order:
762         * dom/Document.cpp:
763         (WebCore::Document::nodesFromRect):
764         * dom/Document.h:
765         (Document):
766         * page/EventHandler.cpp:
767         (WebCore::EventHandler::hitTestResultAtPoint):
768         * rendering/HitTestRequest.h:
769         (WebCore::HitTestRequest::allowChildFrameContent):
770         (WebCore::HitTestRequest::childFrameHitTest):
771         (WebCore::HitTestRequest::testChildFrameScrollBars):
772         * rendering/RenderFrameBase.cpp:
773         (WebCore::RenderFrameBase::nodeAtPoint):
774         (WebCore):
775         * rendering/RenderFrameBase.h:
776         (RenderFrameBase):
777         * rendering/RenderLayer.cpp:
778         (WebCore::RenderLayer::hitTest):
779         * testing/Internals.cpp:
780         (WebCore::Internals::nodesFromRect):
781         * testing/Internals.h:
782         (Internals):
783         * testing/Internals.idl:
784
785 2012-09-04  Christophe Dumez  <christophe.dumez@intel.com>
786
787         [EFL] Fix build error in NetworkStateNotifierEfl.cpp
788         https://bugs.webkit.org/show_bug.cgi?id=95724
789
790         Unreviewed EFL build fix.
791
792         Make sure <sys/socket.h> is included before
793         <linux/netlink.h> to fix build errors on some
794         systems (e.g. Ubuntu 11.10).
795
796         No new tests, no behavior change.
797
798         * platform/network/efl/NetworkStateNotifierEfl.cpp:
799
800 2012-09-04  Vsevolod Vlasov  <vsevik@chromium.org>
801
802         Web Inspector: Create JavaScriptSources based on network resources.
803         https://bugs.webkit.org/show_bug.cgi?id=95352
804
805         Reviewed by Pavel Feldman.
806
807         Introduced NetworkUISourceCodeProvider that is listening for ResourceTreeModel and creates UISourceCodes for them.
808         RawSourceCode does not create uiSourceCodes based on resource anymore (this is done by NetworkUISourceCodeProvider instead).
809         Moved script <-> uiSourceCode binding logic from RawSourceCode to ResourceScriptMapping.
810         Removed rawSourceCode as it was not needed anymore.
811
812         Tests: inspector/debugger/network-uisourcecode-provider.html
813                inspector/debugger/resource-script-mapping.html
814
815         * WebCore.gypi:
816         * WebCore.vcproj/WebCore.vcproj:
817         * inspector/compile-front-end.py:
818         * inspector/front-end/CompilerScriptMapping.js:
819         * inspector/front-end/DebuggerModel.js:
820         (WebInspector.DebuggerDispatcher.prototype.scriptFailedToParse):
821         * inspector/front-end/JavaScriptSource.js:
822         (WebInspector.JavaScriptSource):
823         * inspector/front-end/NetworkUISourceCodeProvider.js: Renamed from Source/WebCore/inspector/front-end/StylesUISourceCodeProvider.js.
824         (WebInspector.NetworkUISourceCodeProvider):
825         (WebInspector.NetworkUISourceCodeProvider.prototype._populate):
826         (WebInspector.NetworkUISourceCodeProvider.prototype._styleResourceAdded):
827         (WebInspector.NetworkUISourceCodeProvider.prototype._scriptResourceAdded.resourceFinished):
828         (WebInspector.NetworkUISourceCodeProvider.prototype._scriptResourceAdded):
829         (WebInspector.NetworkUISourceCodeProvider.prototype._addJavaScriptSource):
830         (WebInspector.NetworkUISourceCodeProvider.prototype._addUISourceCode):
831         (WebInspector.NetworkUISourceCodeProvider.prototype._resourceAdded):
832         (WebInspector.NetworkUISourceCodeProvider.prototype._reset):
833         * inspector/front-end/RawSourceCode.js:
834         * inspector/front-end/ResourceScriptMapping.js:
835         (WebInspector.ResourceScriptMapping):
836         (WebInspector.ResourceScriptMapping.prototype.rawLocationToUILocation):
837         (WebInspector.ResourceScriptMapping.prototype._bindUISourceCodeToScripts):
838         (WebInspector.ResourceScriptMapping.prototype._scriptsForSourceURL):
839         (WebInspector.ResourceScriptMapping.prototype._addOrReplaceTemporaryUISourceCode.get var):
840         (WebInspector.ResourceScriptMapping.prototype._addOrReplaceTemporaryUISourceCode):
841         (WebInspector.ResourceScriptMapping.prototype.get _uiSourceCodeReplaced):
842         (WebInspector.ResourceScriptMapping.prototype._reset):
843         * inspector/front-end/ScriptSnippetModel.js:
844         (WebInspector.ScriptSnippetModel.prototype._addScriptSnippet):
845         (WebInspector.ScriptSnippetModel.prototype._createUISourceCodeForScript):
846         (WebInspector.SnippetJavaScriptSource):
847         * inspector/front-end/UISourceCode.js:
848         (WebInspector.UISourceCode):
849         (WebInspector.UISourceCode.prototype.uiLocationToRawLocation):
850         (WebInspector.UISourceCode.prototype.setSourceMapping):
851         * inspector/front-end/WebKit.qrc:
852         * inspector/front-end/Workspace.js: Drive-by: fixed duplicating uiSourceCodes in workspace.
853         * inspector/front-end/inspector.html:
854         * inspector/front-end/inspector.js:
855
856 2012-09-04  Andrey Adaikin  <aandrey@chromium.org>
857
858         Web Inspector: [WebGL] Save gl.getError() status before taking a WebGL state snapshot and restore it afterwards
859         https://bugs.webkit.org/show_bug.cgi?id=95443
860
861         Reviewed by Vsevolod Vlasov.
862
863         Save gl.getError() status before taking the GL snapshot and restore it afterwards.
864
865         * inspector/InjectedScriptWebGLModuleSource.js:
866         (.):
867
868 2012-09-04  Alexander Pavlov  <apavlov@chromium.org>
869
870         Web Inspector: More directional control characters for debugging in inspector
871         https://bugs.webkit.org/show_bug.cgi?id=95696
872
873         Reviewed by Vsevolod Vlasov.
874
875         Entities for text directionality-related characters added (LRE, RLE, LRO, RLO, PDF).
876
877         * inspector/front-end/ElementsTreeOutline.js:
878
879 2012-09-04  Yury Semikhatsky  <yurys@chromium.org>
880
881         Web Inspector: new CPU Profiles are not shown after reattach
882         https://bugs.webkit.org/show_bug.cgi?id=95686
883
884         Reviewed by Vsevolod Vlasov.
885
886         * inspector/InspectorProfilerAgent.cpp:
887         (WebCore::InspectorProfilerAgent::restore): set m_headersRequested flags
888         to true and clear all profiles on the front-end since there are no
889         collected profiles yet immediately after render process sitching.
890
891 2012-09-04  Ilya Tikhonovsky  <loislo@chromium.org>
892
893         Web Inspector: NMI: cosmetic change, rename m_domMemoryUsage to m_memoryInstrumentation.
894         https://bugs.webkit.org/show_bug.cgi?id=95716
895
896         Also m_memoryInstrumentation became a reference to external object because it has other life time than domNodeVisitor.
897
898         Reviewed by Yury Semikhatsky.
899
900         * inspector/InspectorMemoryAgent.cpp:
901         (WebCore):
902         (WebCore::collectDomTreeInfo):
903
904 2012-08-31  Simon Hausmann  <simon.hausmann@nokia.com>
905
906         [Qt] Port the Qt pixmap JS bindings to use the JSC C API
907         https://bugs.webkit.org/show_bug.cgi?id=94702
908
909         Reviewed by Kenneth Rohde Christiansen.
910
911         Based on patch by Noam Rosenthal.
912
913         The conversion uses a simple JSClassRef based binding and only a few
914         uses of private JSC API for the HTML element DOM bindings remain.
915
916         This is essentially used for wrapping QPixmap and QImage types in
917         JavaScript and the other way around, for retrieving the image data
918         out of a HTML image element when converting from JS/DOM to Qt.
919
920         * bridge/qt/qt_pixmapruntime.cpp:
921         (JSC::Bindings::copyPixels):
922         (JSC::Bindings::toPixmap):
923         (JSC::Bindings::toImage):
924         (JSC::Bindings::imageSizeForVariant):
925         (JSC::Bindings::getPixmapWidth):
926         (JSC::Bindings::getPixmapHeight):
927         (JSC::Bindings::assignToHTMLImageElement):
928         (JSC::Bindings::pixmapToImageData):
929         (JSC::Bindings::pixmapToDataUrl):
930         (JSC::Bindings::pixmapToString):
931         (JSC::Bindings::QtPixmapRuntime::toJS):
932         (JSC::Bindings::QtPixmapRuntime::toQt):
933         (JSC::Bindings::QtPixmapRuntime::canHandle):
934         (JSC::Bindings::QtPixmapRuntime::getClassRef):
935         * bridge/qt/qt_pixmapruntime.h:
936         (QtPixmapRuntime):
937         * bridge/qt/qt_runtime.cpp:
938         (JSC::Bindings::convertValueToQVariant):
939         (JSC::Bindings::convertQVariantToValue):
940
941 2012-09-03  Andreas Kling  <kling@webkit.org>
942
943         Share immutable ElementAttributeData between elements with identical attributes.
944         <http://webkit.org/b/94990>
945
946         Reviewed by Antti Koivisto.
947
948         Keep a cache of ElementAttributeData objects for a given set of attributes and reuse
949         them in elements with identical attribute maps. ElementAttributeData is made ref-counted
950         to facilitate this. A copy-on-write mechanism is already in place, since mutating call
951         sites have to go via Element::mutableAttributeData().
952
953         The cache is held by Document and cleared in Document::finishedParsing() since the vast
954         majority of immutable ElementAttributeData will be constructed during parsing.
955
956         On the HTML5 spec at <http://whatwg.org/c/>, we get a cache hit rate of nearly 80%,
957         translating into a 3.5MB reduction in memory use.
958
959         * dom/Document.cpp:
960         (WebCore::Document::finishedParsing):
961         (ImmutableAttributeDataCacheKey):
962         (WebCore::ImmutableAttributeDataCacheKey::ImmutableAttributeDataCacheKey):
963         (WebCore::ImmutableAttributeDataCacheKey::operator!=):
964         (WebCore::ImmutableAttributeDataCacheKey::hash):
965         (ImmutableAttributeDataCacheEntry):
966         (WebCore::Document::cachedImmutableAttributeData):
967         * dom/Document.h:
968         * dom/Element.cpp:
969         (WebCore::Element::parserSetAttributes):
970         * dom/Element.h:
971         * dom/ElementAttributeData.cpp:
972         (WebCore::ElementAttributeData::createImmutable):
973         (WebCore::ElementAttributeData::ElementAttributeData):
974         * dom/ElementAttributeData.h:
975         (WebCore::ElementAttributeData::create):
976         (ElementAttributeData):
977         (WebCore::ElementAttributeData::makeMutable):
978
979 2012-09-03  Peter Wang  <peter.wang@torchmobile.com.cn>
980
981         Web Inspector: the URL of worker inspector window sometimes is invalid
982         https://bugs.webkit.org/show_bug.cgi?id=95334
983
984         Reviewed by Pavel Feldman.
985
986         In "_openInspectorWindow", before "&dedicatedWorkerId=" should have a '?' to make the whole URL valid.
987
988         No new tests case for this bug.
989
990         * inspector/front-end/WorkerManager.js:
991         (WebInspector.WorkerManager.prototype._openInspectorWindow):
992
993 2012-09-03  Jinwoo Song  <jinwoo7.song@samsung.com>
994
995         [EFL] Fix e_dbus_shutdown() error when exiting the Minibrowser
996         https://bugs.webkit.org/show_bug.cgi?id=95636
997
998         Reviewed by Gyuyoung Kim.
999
1000         Check if the m_timer is active in stopUpdating()
1001         to know the BatteryProvider is updating or not.
1002         By checking the timer, stopUpdating() will be called 
1003         only BatteryProviderEfl is updating.
1004
1005         * platform/efl/BatteryProviderEfl.cpp:
1006         (WebCore::BatteryProviderEfl::stopUpdating):
1007
1008 2012-09-03  Sheriff Bot  <webkit.review.bot@gmail.com>
1009
1010         Unreviewed, rolling out r127427.
1011         http://trac.webkit.org/changeset/127427
1012         https://bugs.webkit.org/show_bug.cgi?id=95695
1013
1014         Breaks some inspector/debugger tests on JSC (Requested by
1015         vsevik on #webkit).
1016
1017         * WebCore.gypi:
1018         * WebCore.vcproj/WebCore.vcproj:
1019         * inspector/compile-front-end.py:
1020         * inspector/front-end/CompilerScriptMapping.js:
1021         * inspector/front-end/JavaScriptSource.js:
1022         (WebInspector.JavaScriptSource):
1023         * inspector/front-end/NetworkUISourceCodeProvider.js: Removed.
1024         * inspector/front-end/RawSourceCode.js:
1025         (WebInspector.RawSourceCode):
1026         (WebInspector.RawSourceCode.prototype.addScript):
1027         (WebInspector.RawSourceCode.prototype.rawLocationToUILocation):
1028         (WebInspector.RawSourceCode.prototype._createUISourceCode):
1029         (WebInspector.RawSourceCode.prototype.uiLocationToRawLocation):
1030         (WebInspector.RawSourceCode.prototype.uiSourceCode):
1031         (WebInspector.RawSourceCode.prototype._finishedLoading):
1032         * inspector/front-end/ResourceScriptMapping.js:
1033         (WebInspector.ResourceScriptMapping):
1034         (WebInspector.ResourceScriptMapping.prototype.rawLocationToUILocation):
1035         (WebInspector.ResourceScriptMapping.prototype.addScript):
1036         (WebInspector.ResourceScriptMapping.prototype._shouldBindScriptToContentProvider):
1037         (WebInspector.ResourceScriptMapping.prototype._handleUISourceCodeChanged):
1038         (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeAdded):
1039         (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeReplaced):
1040         (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeRemoved):
1041         (WebInspector.ResourceScriptMapping.prototype._bindScriptToRawSourceCode):
1042         (WebInspector.ResourceScriptMapping.prototype._reset):
1043         * inspector/front-end/ScriptSnippetModel.js:
1044         (WebInspector.ScriptSnippetModel.prototype._addScriptSnippet):
1045         (WebInspector.ScriptSnippetModel.prototype._createUISourceCodeForScript):
1046         (WebInspector.SnippetJavaScriptSource):
1047         * inspector/front-end/StylesUISourceCodeProvider.js: Added.
1048         (WebInspector.StylesUISourceCodeProvider):
1049         (WebInspector.StylesUISourceCodeProvider.prototype._populate):
1050         (WebInspector.StylesUISourceCodeProvider.prototype._resourceAdded):
1051         (WebInspector.StylesUISourceCodeProvider.prototype._reset):
1052         * inspector/front-end/UISourceCode.js:
1053         (WebInspector.UISourceCode):
1054         (WebInspector.UISourceCode.prototype.uiLocationToRawLocation):
1055         * inspector/front-end/WebKit.qrc:
1056         * inspector/front-end/inspector.html:
1057         * inspector/front-end/inspector.js:
1058
1059 2012-09-03  Vsevolod Vlasov  <vsevik@chromium.org>
1060
1061         Web Inspector: Create JavaScriptSources based on network resources.
1062         https://bugs.webkit.org/show_bug.cgi?id=95352
1063
1064         Reviewed by Pavel Feldman.
1065
1066         Introduced NetworkUISourceCodeProvider that is listening for ResourceTreeModel and creates UISourceCodes for them.
1067         RawSourceCode does not create uiSourceCodes based on resource anymore (this is done by NetworkUISourceCodeProvider instead).
1068         Moved script <-> uiSourceCode binding logic from RawSourceCode to ResourceScriptMapping.
1069         Removed rawSourceCode as it was not needed anymore.
1070
1071         Tests: inspector/debugger/network-uisourcecode-provider.html
1072                inspector/debugger/resource-script-mapping.html
1073
1074         * WebCore.gypi:
1075         * WebCore.vcproj/WebCore.vcproj:
1076         * inspector/compile-front-end.py:
1077         * inspector/front-end/CompilerScriptMapping.js:
1078         * inspector/front-end/JavaScriptSource.js:
1079         (WebInspector.JavaScriptSource):
1080         * inspector/front-end/NetworkUISourceCodeProvider.js: Renamed from Source/WebCore/inspector/front-end/StylesUISourceCodeProvider.js.
1081         (WebInspector.NetworkUISourceCodeProvider):
1082         (WebInspector.NetworkUISourceCodeProvider.prototype._populate):
1083         (WebInspector.NetworkUISourceCodeProvider.prototype._styleResourceAdded):
1084         (WebInspector.NetworkUISourceCodeProvider.prototype._scriptResourceAdded.resourceFinished):
1085         (WebInspector.NetworkUISourceCodeProvider.prototype._scriptResourceAdded):
1086         (WebInspector.NetworkUISourceCodeProvider.prototype._addJavaScriptSource):
1087         (WebInspector.NetworkUISourceCodeProvider.prototype._addUISourceCode):
1088         (WebInspector.NetworkUISourceCodeProvider.prototype._resourceAdded):
1089         (WebInspector.NetworkUISourceCodeProvider.prototype._reset):
1090         * inspector/front-end/RawSourceCode.js:
1091         * inspector/front-end/ResourceScriptMapping.js:
1092         (WebInspector.ResourceScriptMapping):
1093         (WebInspector.ResourceScriptMapping.prototype.rawLocationToUILocation):
1094         (WebInspector.ResourceScriptMapping.prototype._bindUISourceCodeToScripts):
1095         (WebInspector.ResourceScriptMapping.prototype._scriptsForSourceURL):
1096         (WebInspector.ResourceScriptMapping.prototype._addOrReplaceTemporaryUISourceCode.get var):
1097         (WebInspector.ResourceScriptMapping.prototype._addOrReplaceTemporaryUISourceCode):
1098         (WebInspector.ResourceScriptMapping.prototype.get _uiSourceCodeReplaced):
1099         (WebInspector.ResourceScriptMapping.prototype._reset):
1100         * inspector/front-end/ScriptSnippetModel.js:
1101         (WebInspector.ScriptSnippetModel.prototype._addScriptSnippet):
1102         (WebInspector.ScriptSnippetModel.prototype._createUISourceCodeForScript):
1103         (WebInspector.SnippetJavaScriptSource):
1104         * inspector/front-end/UISourceCode.js:
1105         (WebInspector.UISourceCode):
1106         (WebInspector.UISourceCode.prototype.uiLocationToRawLocation):
1107         (WebInspector.UISourceCode.prototype.setSourceMapping):
1108         * inspector/front-end/WebKit.qrc:
1109         * inspector/front-end/inspector.html:
1110         * inspector/front-end/inspector.js:
1111
1112 2012-09-03  Andrey Adaikin  <aandrey@chromium.org>
1113
1114         Web Inspector: [WebGL] Make the injected __resourceObject property non-enumerable
1115         https://bugs.webkit.org/show_bug.cgi?id=95682
1116
1117         Reviewed by Pavel Feldman.
1118
1119         Make the injected auxiliary property __resourceObject non-enumerable to hide it from for..in iterations.
1120         Ideally this property should be completely hidden from the user's code.
1121         Drive-by: Fix couple of small FIXME's.
1122
1123         * inspector/InjectedScriptWebGLModuleSource.js:
1124         (.):
1125
1126 2012-09-03  Tommy Widenflycht  <tommyw@google.com>
1127
1128         MediaStream API: Add Ice-related functionality to RTCPeerConnection
1129         https://bugs.webkit.org/show_bug.cgi?id=95565
1130
1131         Reviewed by Adam Barth.
1132
1133         Adds all Ice-related functionality to RTCPeerConnection, including
1134         events, callbacks and methods.
1135
1136         Test: fast/mediastream/RTCPeerConnection-ice.html
1137
1138         * CMakeLists.txt:
1139         * GNUmakefile.list.am:
1140         * Modules/mediastream/RTCIceCandidateEvent.cpp: Added.
1141         (WebCore):
1142         (WebCore::RTCIceCandidateEvent::create):
1143         (WebCore::RTCIceCandidateEvent::RTCIceCandidateEvent):
1144         (WebCore::RTCIceCandidateEvent::~RTCIceCandidateEvent):
1145         (WebCore::RTCIceCandidateEvent::candidate):
1146         (WebCore::RTCIceCandidateEvent::interfaceName):
1147         * Modules/mediastream/RTCIceCandidateEvent.h: Added.
1148         (WebCore):
1149         (RTCIceCandidateEvent):
1150         * Modules/mediastream/RTCIceCandidateEvent.idl: Added.
1151         * Modules/mediastream/RTCPeerConnection.cpp:
1152         (WebCore::RTCPeerConnection::RTCPeerConnection):
1153         (WebCore::RTCPeerConnection::updateIce):
1154         (WebCore):
1155         (WebCore::RTCPeerConnection::addIceCandidate):
1156         (WebCore::RTCPeerConnection::iceState):
1157         (WebCore::RTCPeerConnection::close):
1158         (WebCore::RTCPeerConnection::didGenerateIceCandidate):
1159         (WebCore::RTCPeerConnection::didChangeIceState):
1160         (WebCore::RTCPeerConnection::stop):
1161         (WebCore::RTCPeerConnection::changeIceState):
1162         * Modules/mediastream/RTCPeerConnection.h:
1163         (RTCPeerConnection):
1164         * Modules/mediastream/RTCPeerConnection.idl:
1165         * WebCore.gypi:
1166         * dom/EventNames.h:
1167         (WebCore):
1168         * dom/EventNames.in:
1169         * platform/chromium/support/WebRTCICECandidateDescriptor.cpp: Copied from Source/WebCore/platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp.
1170         (WebKit):
1171         (WebKit::WebRTCICECandidateDescriptor::WebRTCICECandidateDescriptor):
1172         (WebKit::WebRTCICECandidateDescriptor::assign):
1173         (WebKit::WebRTCICECandidateDescriptor::reset):
1174         (WebKit::WebRTCICECandidateDescriptor::initialize):
1175         (WebKit::WebRTCICECandidateDescriptor::operator PassRefPtr<WebCore::RTCIceCandidateDescriptor>):
1176         (WebKit::WebRTCICECandidateDescriptor::candidate):
1177         (WebKit::WebRTCICECandidateDescriptor::sdpMid):
1178         (WebKit::WebRTCICECandidateDescriptor::sdpMLineIndex):
1179         * platform/mediastream/RTCIceCandidateDescriptor.h:
1180         (WebCore::RTCIceCandidateDescriptor::candidate):
1181         (WebCore::RTCIceCandidateDescriptor::sdpMid):
1182         (WebCore::RTCIceCandidateDescriptor::sdpMLineIndex):
1183         * platform/mediastream/RTCPeerConnectionHandler.h:
1184         (WebCore):
1185         (RTCPeerConnectionHandler):
1186         * platform/mediastream/RTCPeerConnectionHandlerClient.h:
1187         (WebCore):
1188         (RTCPeerConnectionHandlerClient):
1189         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
1190         (WebCore::RTCPeerConnectionHandlerChromium::updateIce):
1191         (WebCore):
1192         (WebCore::RTCPeerConnectionHandlerChromium::addIceCandidate):
1193         (WebCore::RTCPeerConnectionHandlerChromium::didGenerateICECandidate):
1194         (WebCore::RTCPeerConnectionHandlerChromium::didChangeICEState):
1195         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h:
1196         (WebKit):
1197         (RTCPeerConnectionHandlerChromium):
1198
1199 2012-09-03  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1200
1201         Unreviewed build fix after r127421
1202
1203         * rendering/HitTestResult.cpp:
1204         (WebCore::HitTestLocation::HitTestLocation):
1205
1206 2012-09-03  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1207
1208         Move AllowShadowContent flag to HitTestRequest 
1209         https://bugs.webkit.org/show_bug.cgi?id=95685
1210
1211         Reviewed by Antonio Gomes.
1212
1213         Moves the flag and updates the interface for HitTestResult::addNodeToRectBasedTestResult so that
1214         it can read the flag from HitTestRequest instead of from HitTestResult.
1215
1216         No change in functionality. No new tests.
1217
1218         * dom/Document.cpp:
1219         (WebCore::Document::nodesFromRect):
1220         * page/EventHandler.cpp:
1221         (WebCore::EventHandler::hitTestResultAtPoint):
1222         * rendering/HitTestRequest.h:
1223         * rendering/HitTestResult.cpp:
1224         (WebCore::HitTestLocation::HitTestLocation):
1225         (WebCore::HitTestResult::HitTestResult):
1226         (WebCore::HitTestResult::operator=):
1227         (WebCore::HitTestResult::addNodeToRectBasedTestResult):
1228         * rendering/HitTestResult.h:
1229         (HitTestLocation):
1230         (HitTestResult):
1231         * rendering/InlineFlowBox.cpp:
1232         (WebCore::InlineFlowBox::nodeAtPoint):
1233         * rendering/InlineTextBox.cpp:
1234         (WebCore::InlineTextBox::nodeAtPoint):
1235         * rendering/RenderBlock.cpp:
1236         (WebCore::RenderBlock::nodeAtPoint):
1237         * rendering/RenderBox.cpp:
1238         (WebCore::RenderBox::nodeAtPoint):
1239         * rendering/RenderImage.cpp:
1240         (WebCore::RenderImage::nodeAtPoint):
1241         * rendering/RenderLayer.cpp:
1242         (WebCore::RenderLayer::hitTestLayer):
1243         (WebCore::RenderLayer::hitTestList):
1244         * rendering/RenderMultiColumnSet.cpp:
1245         (WebCore::RenderMultiColumnSet::nodeAtPoint):
1246         * rendering/RenderRegion.cpp:
1247         (WebCore::RenderRegion::nodeAtPoint):
1248         * rendering/RenderTable.cpp:
1249         (WebCore::RenderTable::nodeAtPoint):
1250         * rendering/svg/RenderSVGRoot.cpp:
1251         (WebCore::RenderSVGRoot::nodeAtPoint):
1252         * rendering/svg/SVGInlineTextBox.cpp:
1253         (WebCore::SVGInlineTextBox::nodeAtPoint):
1254
1255 2012-09-03  Alexander Pavlov  <apavlov@chromium.org>
1256
1257         Web Inspector: Unhide hidden characters
1258         https://bugs.webkit.org/show_bug.cgi?id=93888
1259
1260         Reviewed by Pavel Feldman.
1261
1262         Certain invisible characters will be rendered as HTML entity references in the DOM tree to make them visible to the user.
1263
1264         * inspector/front-end/ElementsTreeOutline.js:
1265         (WebInspector.ElementsTreeElement.prototype._startEditingTextNode):
1266
1267 2012-09-03  Pavel Feldman  <pfeldman@chromium.org>
1268
1269         Web Inspector: rename JavaScriptContextManager to RuntimeModel for consistency.
1270         https://bugs.webkit.org/show_bug.cgi?id=95677
1271
1272         Reviewed by Yury Semikhatsky.
1273
1274         - renamed the file and the usages
1275         - renamed isolatedContextCreated to executionContextCreated for consistency.
1276
1277         * WebCore.gypi:
1278         * WebCore.vcproj/WebCore.vcproj:
1279         * inspector/Inspector.json:
1280         * inspector/PageRuntimeAgent.cpp:
1281         (WebCore::PageRuntimeAgent::notifyContextCreated):
1282         * inspector/compile-front-end.py:
1283         * inspector/front-end/RuntimeModel.js: Renamed from Source/WebCore/inspector/front-end/JavaScriptContextManager.js.
1284         (WebInspector.RuntimeModel):
1285         (WebInspector.RuntimeModel.prototype._frameAdded):
1286         (WebInspector.RuntimeModel.prototype._frameDetached):
1287         (WebInspector.RuntimeModel.prototype._executionContextCreated):
1288         (WebInspector.RuntimeDispatcher):
1289         (WebInspector.RuntimeDispatcher.prototype.executionContextCreated):
1290         * inspector/front-end/WebKit.qrc:
1291         * inspector/front-end/inspector.html:
1292
1293 2012-09-03  Andrey Kosyakov  <caseq@chromium.org>
1294
1295         Web Inspector: use linkifyResourceAsNode, not linkifyLocation when linkifying resources in Timeline
1296         https://bugs.webkit.org/show_bug.cgi?id=95540
1297
1298         Reviewed by Pavel Feldman.
1299
1300         Linkify recource details using WebInspector.linkifyResourceAsNode(), so these bypass linkifier. Also
1301         fix closure compiler warning.
1302
1303         * inspector/front-end/TimelinePresentationModel.js:
1304         (WebInspector.TimelinePresentationModel.Record.prototype._generatePopupContentWithImagePreview):
1305         (WebInspector.TimelinePresentationModel.Record.prototype._linkifyLocation):
1306
1307 2012-09-03  'Pavel Feldman'  <pfeldman@chromium.org>
1308
1309         Web Inspector: fixed front-end compilation warnings.
1310         Not reviewed.
1311
1312         * inspector/front-end/FilteredItemSelectionDialog.js:
1313         * inspector/front-end/HeapSnapshotView.js:
1314
1315 2012-09-03  Pavel Feldman  <pfeldman@chromium.org>
1316
1317         Web Inspector: paint grid on top of box highlight.
1318         https://bugs.webkit.org/show_bug.cgi?id=95676
1319
1320         Reviewed by Alexander Pavlov.
1321
1322         Otherwise, ruler numbers are not visible when selecting body.
1323
1324         * inspector/InspectorOverlayPage.html:
1325
1326 2012-08-31  Pavel Feldman  <pfeldman@chromium.org>
1327
1328         Web Inspector: get rid of context execution id fallback.
1329         https://bugs.webkit.org/show_bug.cgi?id=95567
1330
1331         Reviewed by Yury Semikhatsky.
1332
1333         We now assign execution context id upon changes in the UI.
1334
1335         * inspector/front-end/ConsoleView.js:
1336         (WebInspector.ConsoleView.prototype.get statusBarItems):
1337         (WebInspector.ConsoleView.prototype._contextAdded):
1338         (WebInspector.ConsoleView.prototype._addContextList):
1339         (WebInspector.ConsoleView.prototype._contextListRemoved):
1340         (WebInspector.ConsoleView.prototype._updateExecutionContextSelector):
1341         (WebInspector.ConsoleView.prototype._appendExecutionContextOption):
1342         (WebInspector.ConsoleView.prototype._executionContextChanged):
1343         (WebInspector.ConsoleView.prototype._contextListUpdated):
1344         (WebInspector.ConsoleView.prototype._addedExecutionContext):
1345         (WebInspector.ConsoleView.prototype.evalInInspectedWindow.evalCallback):
1346         (WebInspector.ConsoleView.prototype.evalInInspectedWindow):
1347         (WebInspector.ConsoleView.prototype._enterKeyPressed):
1348         * inspector/front-end/JavaScriptContextManager.js:
1349         (WebInspector.JavaScriptContextManager):
1350         (WebInspector.JavaScriptContextManager.prototype.contextLists):
1351         (WebInspector.JavaScriptContextManager.prototype.contextByFrameAndSecurityOrigin):
1352         (WebInspector.JavaScriptContextManager.prototype._frameAdded):
1353         (WebInspector.JavaScriptContextManager.prototype._frameNavigated):
1354         (WebInspector.JavaScriptContextManager.prototype._frameDetached):
1355         (WebInspector.JavaScriptContextManager.prototype.isolatedContextCreated):
1356         (WebInspector.FrameExecutionContextList):
1357         (WebInspector.FrameExecutionContextList.prototype._frameNavigated):
1358         (WebInspector.FrameExecutionContextList.prototype._addExecutionContext):
1359         (WebInspector.FrameExecutionContextList.prototype.executionContexts):
1360         (WebInspector.FrameExecutionContextList.prototype.contextBySecurityOrigin):
1361
1362 2012-09-03  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
1363
1364         [GTK][EFL] 'dictIter' iterator is not initialized for an inner loop
1365         https://bugs.webkit.org/show_bug.cgi?id=95436
1366
1367         Reviewed by Gustavo Noronha Silva.
1368
1369         The 'checkSpellingOfString' method assumes that the given string is concatenation of words.
1370         To properly handle spellchecking of each word we need to iterate over the all available
1371         dictionaries ('dictIter').
1372
1373         To allow spellchecking for multiple words, 'dictIter' should be initialized at the beginning
1374         of vector while spellchecking of the word. This ensures performing of spelling for word based on
1375         at least one dictionary.
1376
1377         * platform/text/enchant/TextCheckerEnchant.cpp:
1378         (TextCheckerEnchant::checkSpellingOfString): Moved initialization of 'dictIter' to an inner loop.
1379
1380 2012-09-02  Yoshifumi Inoue  <yosin@chromium.org>
1381
1382         [Forms] Empty visible value of AM/PM field of multiple fields time input UI should display variable number of "-" based on maximum number of labels
1383         https://bugs.webkit.org/show_bug.cgi?id=95660
1384
1385         Reviewed by Kent Tamura.
1386
1387         This patch changes visible empty value of AM/PM field in multiple
1388         fields time input UI to "-", "--", "---", and so on based on maximum
1389         length of AM/PM labels. In current implementation, it is always "--"
1390         regardless locale, although on Arabic, AM/PM are represented in one
1391         character.
1392
1393         This patch affects ports which enable both ENABLE_INPUT_TYPE_TIME and
1394         ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS.
1395
1396         No new tests. Once multiple field time input UI uses "lang" HTML
1397         attribute to take time format, we can write a test for this patch.
1398
1399         * html/shadow/DateTimeSymbolicFieldElement.cpp:
1400         (makeVisibleEmptyValue): Build visible empty value from maximum length
1401         of labels.
1402         (WebCore::DateTimeSymbolicFieldElement::visibleEmptyValue): Changed to
1403         use m_visibleEmptyValue.
1404         * html/shadow/DateTimeSymbolicFieldElement.h:
1405         (WebCore::DateTimeSymbolicFieldElement): Added new member variable
1406         m_visibleEmptyValue to hold visible empty value.
1407
1408 2012-09-02  Yoshifumi Inoue  <yosin@chromium.org>
1409
1410         [Forms] AM/PM field of multiple fields time input UI should be fixed width
1411         https://bugs.webkit.org/show_bug.cgi?id=95542
1412
1413         Reviewed by Kent Tamura.
1414
1415         This patch changes width of AM/PM field of multiple field time input
1416         UI fixed as maximum width of labels or "--".
1417
1418         This patch affects ports which enable both ENABLE_INPUT_TYPE_TIME and
1419         ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS.
1420
1421         No new tests. Once multiple field time input UI uses "lang" HTML
1422         attribute to take time format, we can write a test for this patch.
1423
1424         * css/html.css:
1425         (input::-webkit-datetime-edit-ampm-field): Added "display" property to "inline-block" for setting width.
1426         Added "text-align" property to "center".
1427         * html/shadow/DateTimeSymbolicFieldElement.cpp:
1428         (WebCore::DateTimeSymbolicFieldElement::DateTimeSymbolicFieldElement): Changed to call setHasCustomCallback().
1429         (WebCore::DateTimeSymbolicFieldElement::customStyleForRenderer): Added for setting field with from maximum width of labels.
1430         * html/shadow/DateTimeSymbolicFieldElement.h:
1431         (WebCore::DateTimeSymbolicFieldElement::visibleEmptyValue): Added for using visible empty value in customStyleForRenderer() and visibleValue().
1432         (WebCore::DateTimeSymbolicFieldElement::visibleValue): Changed to call visibleEmptyValue() instead of using literal "--".
1433         (DateTimeSymbolicFieldElement): Added a declaration of customStyleForRenderer().
1434
1435 2012-09-02  Benjamin Poulain  <bpoulain@apple.com>
1436
1437         Improve the way we use convertedSpaceString() in convertHTMLTextToInterchangeFormat()
1438         https://bugs.webkit.org/show_bug.cgi?id=95301
1439
1440         Reviewed by Darin Adler.
1441
1442         The static string convertedSpaceString() had a couple of annoying side effects:
1443         -The string was 16bits due to noBreakSpace, which forced any input to be converted to 16bits.
1444         -The string was kept in the heap for no particular reason.
1445
1446         This patch redefines convertedSpaceString as a constant literal so that we can use it efficiently.
1447
1448         The patch also make the binary a tiny bit smaller (700 bytes).
1449
1450         * editing/HTMLInterchange.cpp:
1451         (WebCore::convertHTMLTextToInterchangeFormat):
1452
1453 2012-09-02  Mike West  <mkwst@chromium.org>
1454
1455         Build is broken when SVG is disabled.
1456         https://bugs.webkit.org/show_bug.cgi?id=95653
1457
1458         Reviewed by Dirk Schulze.
1459
1460         Adding CSSPropertyWebkitClipPath to the massive switch statement in StyleResolver.
1461
1462         * css/StyleResolver.cpp:
1463         (WebCore::StyleResolver::collectMatchingRulesForList):
1464
1465 2012-08-31  Antti Koivisto  <antti@apple.com>
1466
1467         Repaints should not be deferred after initial page load is complete
1468         https://bugs.webkit.org/show_bug.cgi?id=95480
1469
1470         Reviewed by Simon Fraser
1471
1472         Any dynamically triggered resource loading currently sends us back to deferred paint mode, making animation choppy. 
1473         This is not the intention of this code.
1474
1475         This patch adds an additional condition that prevents page from re-entering deferred repaint mode after the initial
1476         load has completed. It also cleans up the code slightly.
1477
1478         * loader/FrameLoader.cpp:
1479         (WebCore::FrameLoader::checkCompleted):
1480         
1481             Add additional call to checkStopDelayingDeferredRepaints() after a frame load completes as the
1482             new condition in shouldUseLoadTimeDeferredRepaintDelay() looks for this change too.
1483
1484         * page/FrameView.cpp:
1485         (WebCore):
1486         
1487             Reduced the normal delay from 25ms to 16ms to not interfere with full framerate animation.
1488
1489         (WebCore::FrameView::syncCompositingStateForThisFrame):
1490         (WebCore::FrameView::checkFlushDeferredRepaintsAfterLoadComplete):
1491         
1492             Ensure the repaint delay is reset after load completes even if we don't currently need a repaint.
1493
1494         (WebCore::FrameView::flushDeferredRepaints):
1495         
1496             We had to identical functions, flushDeferredRepaints() and stopDelayingDeferredRepaints(). Remove
1497             the latter.
1498
1499         (WebCore::FrameView::shouldUseLoadTimeDeferredRepaintDelay):
1500         
1501             Factor the test for using load time repaint timings to a functions. The test for
1502             initial page load having completed is new.
1503
1504         (WebCore::FrameView::updateDeferredRepaintDelay):
1505         (WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive):
1506         (WebCore::FrameView::setRepaintThrottlingDeferredRepaintDelay):
1507         * page/FrameView.h:
1508         (FrameView):
1509
1510 2012-09-02  Filip Pizlo  <fpizlo@apple.com>
1511
1512         Don't create access error strings if there is no access error
1513         https://bugs.webkit.org/show_bug.cgi?id=95652
1514
1515         Reviewed by Adam Barth.
1516         
1517         This undoes the 50% performance regression in pdfjs caused by
1518         http://trac.webkit.org/changeset/126165
1519
1520         No new tests because behavior is unchanged.
1521
1522         * bindings/js/JSDOMBinding.cpp:
1523         (WebCore::shouldAllowAccessToFrame):
1524         (WebCore::shouldAllowAccessToDOMWindow):
1525
1526 2012-08-31  Dirk Schulze  <krit@webkit.org>
1527
1528         Use -webkit-clip-path shapes to clip SVG elements
1529         https://bugs.webkit.org/show_bug.cgi?id=95620
1530
1531         Reviewed by Rob Buis.
1532
1533         This patch adds a path segment for a BasicShape to a given Path object. This
1534         path and it's wind rule are used to clip the context of the SVG element.
1535
1536         Tests: svg/clip-path/clip-path-shape-circle-1-expected.svg
1537                svg/clip-path/clip-path-shape-circle-1.svg
1538                svg/clip-path/clip-path-shape-circle-2-expected.svg
1539                svg/clip-path/clip-path-shape-circle-2.svg
1540                svg/clip-path/clip-path-shape-ellipse-1-expected.svg
1541                svg/clip-path/clip-path-shape-ellipse-1.svg
1542                svg/clip-path/clip-path-shape-ellipse-2-expected.svg
1543                svg/clip-path/clip-path-shape-ellipse-2.svg
1544                svg/clip-path/clip-path-shape-polygon-1-expected.svg
1545                svg/clip-path/clip-path-shape-polygon-1.svg
1546                svg/clip-path/clip-path-shape-polygon-2-expected.svg
1547                svg/clip-path/clip-path-shape-polygon-2.svg
1548                svg/clip-path/clip-path-shape-polygon-3-expected.svg
1549                svg/clip-path/clip-path-shape-polygon-3.svg
1550                svg/clip-path/clip-path-shape-rounded-rect-1-expected.svg
1551                svg/clip-path/clip-path-shape-rounded-rect-1.svg
1552                svg/clip-path/clip-path-shape-rounded-rect-2-expected.svg
1553                svg/clip-path/clip-path-shape-rounded-rect-2.svg
1554
1555         * rendering/style/BasicShapes.cpp: Added helper functions that apply path segments to a given path.
1556         (WebCore::BasicShapeRectangle::path):
1557         (WebCore::BasicShapeCircle::path):
1558         (WebCore::BasicShapeEllipse::path):
1559         (WebCore::BasicShapePolygon::path):
1560         * rendering/style/BasicShapes.h: Make BasicShape virtualized again, since new virtual functions were added.
1561         (WebCore::BasicShape::~BasicShape):
1562         (BasicShape):
1563         (WebCore::BasicShape::windRule): Will return the wind rule of the shape - nonzero by default.
1564         (WebCore::BasicShape::BasicShape):
1565         (BasicShapeRectangle):
1566         (WebCore::BasicShapeRectangle::type): Removed member variable and return type per inheriting class directly.
1567         (WebCore::BasicShapeRectangle::BasicShapeRectangle):
1568         (BasicShapeCircle):
1569         (WebCore::BasicShapeCircle::type): Ditto.
1570         (WebCore::BasicShapeCircle::BasicShapeCircle):
1571         (BasicShapeEllipse):
1572         (WebCore::BasicShapeEllipse::type): Ditto.
1573         (WebCore::BasicShapeEllipse::BasicShapeEllipse):
1574         (BasicShapePolygon):
1575         (WebCore::BasicShapePolygon::windRule):
1576         (WebCore::BasicShapePolygon::type): Ditto.
1577         (WebCore::BasicShapePolygon::BasicShapePolygon):
1578         * rendering/svg/SVGRenderingContext.cpp: If -webkit-clip-path was defined, clip the context to the shape.
1579         Right now -webkit-clip-path overrides clip-path, so that people don't use both at the same time. Current
1580         clip-path property will be replaced, once -webkit-clip-path gets unprefixed.
1581         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
1582
1583 2012-09-01  Ned Holbrook  <nholbrook@apple.com>
1584
1585         Regression(r126763): Heap-use-after-free in WebCore::nextBreakablePosition
1586         https://bugs.webkit.org/show_bug.cgi?id=95229
1587
1588         Reviewed by Dan Bernstein.
1589
1590         TextLayout and LazyLineBreakIterator cache a RenderText's string during line breaking but RenderCounter
1591         and RenderQuote can replace that string during preferred width calculation. This patch adds a non-virtual member
1592         function to RenderText named updateTextIfNeeded() that triggers immediate string replacement by calling
1593         the new virtual updateText() if necessary, which in turn calls computePreferredLogicalWidths(). In this way
1594         RenderBlock::LineBreaker::nextLineBreak() can ensure a RenderText's string is current before caching it.
1595
1596         Test: fast/css/content/content-quotes-crash.html
1597
1598         * rendering/RenderBlockLineLayout.cpp:
1599         (WebCore::dirtyLineBoxesForRenderer): Drive-by: replace existing code with the equivalent updateTextIfNeeded().
1600         (WebCore::RenderBlock::LineBreaker::nextLineBreak): Use updateTextIfNeeded() prior to caching RenderText string.
1601         * rendering/RenderCounter.cpp:
1602         (WebCore::RenderCounter::updateText): Call computePreferredLogicalWidths().
1603         (WebCore):
1604         * rendering/RenderCounter.h:
1605         (RenderCounter):
1606         * rendering/RenderQuote.cpp:
1607         (WebCore::RenderQuote::updateText): Call computePreferredLogicalWidths().
1608         (WebCore):
1609         * rendering/RenderQuote.h:
1610         (RenderQuote):
1611         * rendering/RenderText.h:
1612         (WebCore::RenderText::updateTextIfNeeded): Only call virtual updateText() if necessary.
1613         (RenderText):
1614         (WebCore::RenderText::updateText): Add no-op default implementation for new virtual member function.
1615
1616 2012-09-01  Li Yin  <li.yin@intel.com>
1617
1618         fast/events/message-port-clone.html hits ASSERT in Debug (usually in later tests)
1619         https://bugs.webkit.org/show_bug.cgi?id=85811
1620
1621         Reviewed by Kenneth Rohde Christiansen.
1622
1623         When MessagePort invoked close function, the close status is needed to set,
1624         regardless of whether the port is cloned or not.
1625
1626         Tests: fast/events/message-port-clone.html
1627                fast/events/message-port-close.html
1628
1629         * dom/MessagePort.cpp:
1630         (WebCore::MessagePort::close): Must set m_closed to be true.
1631
1632 2012-09-01  Andreas Kling  <kling@webkit.org>
1633
1634         Share inline style between cloned Nodes (copy on write.)
1635         <http://webkit.org/b/95451>
1636
1637         Reviewed by Antti Koivisto.
1638
1639         When cloning a Node, use an immutable StylePropertySet for the new Node's inline style.
1640         If the old Node already had an immutable inline style, we now reuse that, avoiding a copy.
1641         Copying is deferred until mutation (either via CSSOM or setting of the style attribute.)
1642
1643         * dom/ElementAttributeData.cpp:
1644         (WebCore::ElementAttributeData::cloneDataFrom):
1645         * css/StylePropertySet.h:
1646         * css/StylePropertySet.cpp:
1647         (WebCore::StylePropertySet::immutableCopyIfNeeded):
1648
1649             Added. Simply returns 'this' if the object is already immutable, otherwise creates a new one.
1650
1651 2012-09-01  Dirk Schulze  <krit@webkit.org>
1652
1653         [Qt] Fix the --minimal build after r127327
1654         https://bugs.webkit.org/show_bug.cgi?id=95639
1655
1656         Unreviewed attempt to fix Qt minimal build.
1657
1658         * css/StyleBuilder.cpp:
1659
1660 2012-09-01  Joanmarie Diggs  <jdiggs@igalia.com>
1661
1662         [Gtk] No accessible caret-moved events found in certain content
1663         https://bugs.webkit.org/show_bug.cgi?id=72811
1664
1665         Part of the bug was due to expected accessible objects of DivRole
1666         and ParagraphRole being ignored, in favor of including child blocks.
1667
1668         Reviewed by Chris Fleizach.
1669
1670         Test: platform/gtk/accessibility/spans-paragraphs-and-divs.html
1671
1672         * accessibility/AccessibilityObject.cpp:
1673         (WebCore::AccessibilityObject::firstAnonymousBlockChild):
1674         (WebCore):
1675         * accessibility/AccessibilityObject.h:
1676         (AccessibilityObject):
1677         New method to return the first child which is an anonymous block.
1678         * accessibility/gtk/AccessibilityObjectAtk.cpp:
1679         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
1680         Include paragraphs and divs which contain a non-nested anonymous block.
1681
1682 2012-09-01  Joanmarie Diggs  <jdiggs@igalia.com>
1683
1684         [Gtk] No accessible caret-moved events found in certain content
1685         https://bugs.webkit.org/show_bug.cgi?id=72811
1686
1687         Part of the bug was due to extraneous accessible objects resulting
1688         from unignored inline and block spans.
1689
1690         Reviewed by Chris Fleizach.
1691
1692         Test: platform/gtk/accessibility/spans.html
1693
1694         * accessibility/AccessibilityRenderObject.cpp:
1695         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored): Ignore objects that have spanTag tag name.
1696         * accessibility/gtk/AccessibilityObjectAtk.cpp:
1697         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject): Ignore most anonymous blocks.
1698         * accessibility/gtk/WebKitAccessibleWrapperAtk.cpp:
1699         (roleIsTextType): Add ListItem to the roles which should implement AtkText.
1700
1701 2012-09-01  Joanmarie Diggs  <jdiggs@igalia.com>
1702
1703         [Gtk] Incorrect/unexpected characters in the text of certain accessibles
1704         https://bugs.webkit.org/show_bug.cgi?id=95180
1705
1706         Reviewed by Chris Fleizach.
1707
1708         The bug was caused by failing to properly handle anonymous block text
1709         which had object replacement characters (multibyte) in it. Calculating
1710         the string length based on the UTF-8 string meant that we were returning
1711         more characters than were there and in danger of splitting a multibyte
1712         character.
1713
1714         Tests: platform/gtk/accessibility/entry-and-password.html
1715                platform/gtk/accessibility/replaced-objects-in-anonymous-blocks.html
1716
1717         * accessibility/gtk/WebKitAccessibleInterfaceText.cpp:
1718         (webkitAccessibleTextGetText): Convert the text returned by textForObject()
1719         to Unicode before calculating its length.
1720
1721 2012-09-01  Adam Barth  <abarth@webkit.org>
1722
1723         Remove all-but-one use of WTF::String::operator+= from WebCore
1724         https://bugs.webkit.org/show_bug.cgi?id=95508
1725
1726         Reviewed by Benjamin Poulain.
1727
1728         This patch removes all the uses of WTF::String::operator+= from
1729         WebCore, except those in WorkerScriptLoader (which need a more delicate
1730         patch). There were actually a handful of legitimate use cases for += in
1731         this group. I've replaced them with calls to String::append rather than
1732         += so that we can remove += and encourage most contributors to use
1733         more efficient string idioms.
1734
1735         (There are likely some more uses in WebCore hiding in port-specific
1736         code---this patch covers only those call sites found when compiling the
1737         chromium-mac port.)
1738
1739         * inspector/InspectorStyleTextEditor.cpp:
1740         (WebCore::InspectorStyleTextEditor::insertProperty):
1741             - This complicated function looks really inefficient, but I didn't
1742               have the heart to rewrite it.
1743         * inspector/NetworkResourcesData.cpp:
1744         (WebCore::NetworkResourcesData::ResourceData::decodeDataToContent):
1745         * loader/cache/CachedCSSStyleSheet.cpp:
1746         (WebCore::CachedCSSStyleSheet::sheetText):
1747         (WebCore::CachedCSSStyleSheet::data):
1748         * loader/cache/CachedFont.cpp:
1749         (WebCore::CachedFont::ensureSVGFontData):
1750         * loader/cache/CachedScript.cpp:
1751         (WebCore::CachedScript::script):
1752         * loader/cache/CachedXSLStyleSheet.cpp:
1753         (WebCore::CachedXSLStyleSheet::data):
1754             - This decoder/flush pattern can probably be improved by combining
1755               the decode and flush operations, but I didn't do that in this
1756               patch.
1757         * page/FrameTree.cpp:
1758         (WebCore::FrameTree::uniqueChildName):
1759             - I found this code very amusing. It's worried enough about
1760               efficiency to give a big speech about why snprintf is safe, but
1761               then it implicitly performs a large number of mallocs and memcpy
1762               operations.
1763         * page/Page.cpp:
1764         (WebCore::Page::userStyleSheet):
1765         * platform/chromium/support/WebHTTPLoadInfo.cpp:
1766         (WebKit::addHeader):
1767         * platform/chromium/support/WebURLResponse.cpp:
1768         (WebKit::WebURLResponse::addHTTPHeaderField):
1769             - This header-appending idiom looks like a reasonable use case for
1770               String::append.
1771         * xml/XMLHttpRequest.cpp:
1772         (WebCore::XMLHttpRequest::send):
1773         (WebCore::XMLHttpRequest::setRequestHeaderInternal):
1774         * xml/XPathFunctions.cpp:
1775         (WebCore::XPath::FunTranslate::evaluate):
1776             - Fixes 6 year old FIXME.
1777         * xml/parser/XMLDocumentParser.cpp:
1778         (WebCore::XMLDocumentParser::append):
1779         * xml/parser/XMLDocumentParser.h:
1780         (XMLDocumentParser):
1781         * xml/parser/XMLDocumentParserLibxml2.cpp:
1782         (WebCore::XMLDocumentParser::doEnd):
1783         * xml/parser/XMLDocumentParserQt.cpp:
1784         (WebCore::XMLDocumentParser::doEnd):
1785             - Changed m_originalSourceForTransform to a SegmentedString so that
1786               we don't need to malloc and copy the entire document every time
1787               we get more data from the network.
1788
1789 2012-09-01  Tommy Widenflycht  <tommyw@google.com>
1790
1791         MediaStream API: Add MediaStream management to RTCPeerConnection
1792         https://bugs.webkit.org/show_bug.cgi?id=95543
1793
1794         Reviewed by Adam Barth.
1795
1796         This includes addStream/removeStream to RTCPeerConnection,
1797         as well as didAddRemoteStream/didRemoveRemoteStream to RTCPeerConnectionHandlerClient.
1798
1799         Test: fast/mediastream/RTCPeerConnection-AddRemoveStream.html
1800
1801         * Modules/mediastream/RTCPeerConnection.cpp:
1802         (WebCore::RTCPeerConnection::parseConfiguration):
1803         (WebCore::RTCPeerConnection::RTCPeerConnection):
1804         (WebCore::RTCPeerConnection::addStream):
1805         (WebCore):
1806         (WebCore::RTCPeerConnection::removeStream):
1807         (WebCore::RTCPeerConnection::localStreams):
1808         (WebCore::RTCPeerConnection::remoteStreams):
1809         (WebCore::RTCPeerConnection::didAddRemoteStream):
1810         (WebCore::RTCPeerConnection::didRemoveRemoteStream):
1811         * Modules/mediastream/RTCPeerConnection.h:
1812         (RTCPeerConnection):
1813         * Modules/mediastream/RTCPeerConnection.idl:
1814         * bindings/js/Dictionary.cpp:
1815         (WebCore::Dictionary::getOwnPropertiesAsStringHashMap):
1816         (WebCore::Dictionary::getOwnPropertyNames):
1817         * bindings/v8/Dictionary.cpp:
1818         (WebCore::Dictionary::getOwnPropertiesAsStringHashMap):
1819         (WebCore::Dictionary::getOwnPropertyNames):
1820         * bindings/v8/Dictionary.h:
1821         (Dictionary):
1822         * platform/mediastream/RTCPeerConnectionHandler.cpp:
1823         (RTCPeerConnectionHandlerDummy):
1824         (WebCore::RTCPeerConnectionHandlerDummy::addStream):
1825         (WebCore):
1826         (WebCore::RTCPeerConnectionHandlerDummy::removeStream):
1827         * platform/mediastream/RTCPeerConnectionHandler.h:
1828         (RTCPeerConnectionHandler):
1829         * platform/mediastream/RTCPeerConnectionHandlerClient.h:
1830         (WebCore):
1831         (RTCPeerConnectionHandlerClient):
1832         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
1833         (WebCore::RTCPeerConnectionHandlerChromium::addStream):
1834         (WebCore):
1835         (WebCore::RTCPeerConnectionHandlerChromium::removeStream):
1836         (WebCore::RTCPeerConnectionHandlerChromium::didAddRemoteStream):
1837         (WebCore::RTCPeerConnectionHandlerChromium::didRemoveRemoteStream):
1838         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h:
1839         (WebKit):
1840         (RTCPeerConnectionHandlerChromium):
1841
1842 2012-09-01  Kent Tamura  <tkent@chromium.org>
1843
1844         Touch a file so that Chromium-win bots correctly re-build for OPENTYPE_VERTICAL
1845         https://bugs.webkit.org/show_bug.cgi?id=51450
1846
1847         * platform/graphics/opentype/OpenTypeVerticalData.cpp:
1848
1849 2012-08-31  Kent Tamura  <tkent@chromium.org>
1850
1851         Touch some files so that Chromium-win bots correctly re-build
1852         files for OPENTYPE_VERTICAL.
1853         https://bugs.webkit.org/show_bug.cgi?id=51450
1854
1855         * platform/graphics/FontCache.h:
1856         * platform/graphics/SimpleFontData.h:
1857         * platform/graphics/opentype/OpenTypeTypes.h:
1858
1859 2012-08-31  Chris Hutten-Czapski  <chutten@rim.com>
1860
1861         -webkit-flex: 0 in inspector.css is confusing
1862         https://bugs.webkit.org/show_bug.cgi?id=95568
1863
1864         Reviewed by Tony Chang.
1865
1866         The initial value of -webkit-flex results in the same layout as
1867         -webkit-flex: 0; but does not depend on the new initial value of auto
1868         for min-width.
1869
1870         This increases the support for the new Web Inspector style to renderers
1871         built before rev 122264 but after 117385.
1872
1873         No new tests (has no effect except to out-of-date renderers)
1874
1875         * inspector/front-end/inspector.css:
1876         (.status-bar-item):
1877
1878 2012-08-31  Filip Pizlo  <fpizlo@apple.com>
1879
1880         JSArray::putDirectIndex should by default behave like JSObject::putDirect
1881         https://bugs.webkit.org/show_bug.cgi?id=95630
1882
1883         Reviewed by Gavin Barraclough.
1884
1885         No new tests because no change in behavior.
1886
1887         * bindings/js/SerializedScriptValue.cpp:
1888         (WebCore::CloneDeserializer::putProperty):
1889
1890 2012-08-31  Nate Chapin  <japhet@chromium.org>
1891
1892         fast/loader/document-destruction-within-unload.html causes assertion failures on mac and qt.
1893         https://bugs.webkit.org/show_bug.cgi?id=66783
1894
1895         Reviewed by Darin Adler.
1896
1897         This was a not-quite-regression from trac.webkit.org/changeset/93521, in that we hit asserts
1898         in a case where we previously were use-after-freeing. Tweak how we handle cases where a Document
1899         is cleared from within an unload handler.
1900
1901         No new tests, fixing fast/loader/document-destruction-within-unload.html on mac and qt.
1902
1903         * loader/FrameLoader.cpp:
1904         (WebCore::FrameLoader::setDocumentLoader): Instead of trying to reattach a partially removed
1905             DocumentLoader if it is detached before being fully added, leave the old one in place, completed.
1906         (WebCore::FrameLoader::transitionToCommitted):
1907
1908 2012-08-31  Tony Chang  <tony@chromium.org>
1909
1910         Make computeBlockDirectionMargins const
1911         https://bugs.webkit.org/show_bug.cgi?id=95595
1912
1913         Reviewed by Ojan Vafai.
1914
1915         This is a step in making computeLogicalHeight const.
1916         Refactor RenderBox::computeBlockDirectionMargins and make it const.
1917         Add a helper method computeAndSetBlockDirectionMargins for the callers outside of
1918         computeLogicalHeight that are calling this.
1919
1920         No new tests, this is already covered by tests in fast/writing-mode and fast/multicol.
1921
1922         * rendering/RenderBlock.cpp:
1923         (WebCore::RenderBlock::marginBeforeEstimateForChild): Switch to computeAndSetBlockDirectionMargins
1924         (WebCore::RenderBlock::layoutBlockChild): Switch to computeAndSetBlockDirectionMargins
1925         (WebCore::RenderBlock::insertFloatingObject): Switch to computeAndSetBlockDirectionMargins
1926         * rendering/RenderBox.cpp:
1927         (WebCore::RenderBox::computeLogicalHeight): Use const version and fill in a MarginValues struct (to be merged in the next patch).
1928         (WebCore::RenderBox::computeBlockDirectionMargins): Pass in out params.
1929         (WebCore):
1930         (WebCore::RenderBox::computeAndSetBlockDirectionMargins): Does the same as the old computeBlockDirectionMargins.
1931         * rendering/RenderBox.h:
1932         (RenderBox):
1933         * rendering/RenderDeprecatedFlexibleBox.cpp:
1934         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox): Switch to computeAndSetBlockDirectionMargins
1935         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox): Switch to computeAndSetBlockDirectionMargins
1936         * rendering/RenderTableRow.cpp:
1937         (WebCore::RenderTableRow::layout): Switch to computeAndSetBlockDirectionMargins
1938
1939 2012-08-30  Dirk Schulze  <krit@webkit.org>
1940
1941         Introduce new CSS property for clip-path
1942         https://bugs.webkit.org/show_bug.cgi?id=95474
1943
1944         Reviewed by Tim Horton.
1945
1946         This path introduces the new, prefixed CSS property 'clip-path' from the
1947         CSS Masking specification. In a first step the property just accepts
1948         'none' and the the basic shapes from CSS Exclusion. Later it will also be
1949         possible to reference SVG 'clipPath' elements - like Firefox already does.
1950         To enable the parsing of the shapes, the exclusion compiler flags
1951         around the shape parser were removed.
1952
1953         http://dvcs.w3.org/hg/FXTF/raw-file/tip/masking/index.html
1954
1955         Test: fast/masking/parsing-clip-path-shape.html
1956
1957         * css/CSSComputedStyleDeclaration.cpp:
1958         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Return CSSValue for CSSPropertyWebkitClipPath.
1959         * css/CSSParser.cpp: 
1960         (WebCore::CSSParser::parseValue): Add CSSPropertyWebkitClipPath.
1961         (WebCore::CSSParser::parseBasicShape): Modify parser function to accept CSSPropertyWebkitClipPath as well.
1962         * css/CSSParser.h:
1963         * css/CSSProperty.cpp:
1964         (WebCore::CSSProperty::isInheritedProperty):
1965         * css/CSSPropertyNames.in: Added property name -webkit-clip-path.
1966         * css/StyleBuilder.cpp:
1967         (ApplyPropertyClipPath): New property applier just for -webkit-clip-path.
1968         (WebCore::ApplyPropertyClipPath::setValue):
1969         (WebCore::ApplyPropertyClipPath::applyValue):
1970         (WebCore::ApplyPropertyClipPath::createHandler):
1971         (WebCore::StyleBuilder::StyleBuilder):
1972         * rendering/style/RenderStyle.cpp: Repaint if there is a difference between two BasicShapes.
1973         (WebCore::RenderStyle::diff):
1974         * rendering/style/RenderStyle.h:
1975         * rendering/style/StyleRareNonInheritedData.cpp: 
1976         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
1977         (WebCore::StyleRareNonInheritedData::operator==):
1978         (WebCore::StyleRareNonInheritedData::reportMemoryUsage):
1979         * rendering/style/StyleRareNonInheritedData.h: Add new member variable for clip shape.
1980         (StyleRareNonInheritedData):
1981
1982 2012-08-31  Joshua Netterfield  <jnetterfield@rim.com>
1983
1984         [BlackBerry] Eliminate WebGL IT policy
1985         https://bugs.webkit.org/show_bug.cgi?id=95604
1986         Internal RIM PR #198764
1987
1988         Reviewed by Rob Buis.
1989
1990         This is no longer a requirement for the BlackBerry port.
1991
1992         No new tests, because this introduces no new functionality.
1993
1994         * html/canvas/WebGLRenderingContext.cpp:
1995         (WebCore):
1996         (WebCore::WebGLRenderingContext::create):
1997
1998 2012-08-31  Jon Lee  <jonlee@apple.com>
1999
2000         ondisplay event handlers are not called
2001         https://bugs.webkit.org/show_bug.cgi?id=95263
2002         <rdar://problem/12193359>
2003
2004         Reviewed by Alexey Proskuryakov.
2005
2006         To support the legacy API, we conflate ondisplay and onshow.
2007
2008         * Modules/notifications/Notification.h:
2009         (WebCore::Notification::ondisplay): Use display event as an alias for the show event.
2010         (WebCore::Notification::setOndisplay):
2011
2012 2012-08-31  Tony Chang  <tony@chromium.org>
2013
2014         Remove ENABLE_CSS3_FLEXBOX compile time flag
2015         https://bugs.webkit.org/show_bug.cgi?id=95382
2016
2017         Reviewed by Ojan Vafai.
2018
2019         Everyone is already enabling this by default and the spec has stablized.
2020
2021         No new tests, shouldn't change anything.
2022
2023         * Configurations/FeatureDefines.xcconfig:
2024         * GNUmakefile.am:
2025         * GNUmakefile.features.am:
2026         * css/CSSComputedStyleDeclaration.cpp:
2027         (WebCore):
2028         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2029         * css/CSSParser.cpp:
2030         (WebCore::isValidKeywordPropertyAndValue): Expand check range to include flex and inline-flex.
2031         (WebCore::isKeywordPropertyID):
2032         (WebCore::CSSParser::parseValue):
2033         * css/CSSPrimitiveValueMappings.h:
2034         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2035         * css/CSSProperty.cpp:
2036         (WebCore::CSSProperty::isInheritedProperty):
2037         * css/CSSPropertyNames.in:
2038         * css/CSSValueKeywords.in:
2039         * css/StyleBuilder.cpp:
2040         (WebCore::StyleBuilder::StyleBuilder):
2041         * css/StylePropertySet.cpp:
2042         (WebCore::StylePropertySet::getPropertyValue):
2043         (WebCore::StylePropertySet::asText):
2044         * css/StylePropertyShorthand.cpp:
2045         (WebCore::webkitFlexShorthand):
2046         (WebCore::shorthandForProperty):
2047         * css/StylePropertyShorthand.h:
2048         (WebCore):
2049         * css/StyleResolver.cpp:
2050         (WebCore::StyleResolver::collectMatchingRulesForList):
2051         * page/animation/CSSPropertyAnimation.cpp:
2052         (WebCore::CSSPropertyAnimation::ensurePropertyMap):
2053         * rendering/RenderObject.cpp:
2054         (WebCore::RenderObject::createObject):
2055         * rendering/style/RenderStyle.h:
2056         * rendering/style/RenderStyleConstants.h:
2057
2058 2012-08-31  Christopher Cameron  <ccameron@chromium.org>
2059
2060         [chromium] Add main versus impl thread asserts
2061         https://bugs.webkit.org/show_bug.cgi?id=95596
2062
2063         Reviewed by James Robinson.
2064
2065         Add asserts to prioritized texture manager that specify that a
2066         function be called on the main or impl thread.
2067
2068         Add debug signs that the main thread is blocked to the threaded
2069         proxy.
2070
2071         Add a mechanism to simultaneously set the thread to the impl thread
2072         and indicate that the main thread is blocked.
2073
2074         Update tests that hit asserts in the prioritized texture manager to
2075         set their impl thread and main thread blocked state correctly.
2076
2077         * platform/graphics/chromium/cc/CCPrioritizedTextureManager.cpp:
2078         (WebCore::CCPrioritizedTextureManager::prioritizeTextures):
2079         (WebCore::CCPrioritizedTextureManager::clearPriorities):
2080         (WebCore::CCPrioritizedTextureManager::requestLate):
2081         (WebCore::CCPrioritizedTextureManager::acquireBackingTextureIfNeeded):
2082         (WebCore::CCPrioritizedTextureManager::reduceMemory):
2083         (WebCore::CCPrioritizedTextureManager::registerTexture):
2084         (WebCore::CCPrioritizedTextureManager::unregisterTexture):
2085         (WebCore::CCPrioritizedTextureManager::returnBackingTexture):
2086         (WebCore::CCPrioritizedTextureManager::createBacking):
2087         (WebCore::CCPrioritizedTextureManager::assertInvariants):
2088         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
2089         (WebCore):
2090         (DebugScopedSetImplThreadAndMainThreadBlocked):
2091         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
2092         (WebCore::CCThreadProxy::compositeAndReadback):
2093         (WebCore::CCThreadProxy::finishAllRendering):
2094         (WebCore::CCThreadProxy::setVisible):
2095         (WebCore::CCThreadProxy::initializeRenderer):
2096         (WebCore::CCThreadProxy::recreateContext):
2097         (WebCore::CCThreadProxy::implSideRenderingStats):
2098         (WebCore::CCThreadProxy::start):
2099         (WebCore::CCThreadProxy::forceSerializeOnSwapBuffers):
2100         (WebCore::CCThreadProxy::acquireLayerTextures):
2101
2102 2012-08-30  James Robinson  <jamesr@chromium.org>
2103
2104         [chromium] Put compositor client interfaces in separate headers, normalize naming
2105         https://bugs.webkit.org/show_bug.cgi?id=95522
2106
2107         Reviewed by Adam Barth.
2108
2109         Client interfaces should be in their own headers so code implementing these interfaces do not have to
2110         transitively #include all of the compositor internals.
2111
2112         We call things 'clients' not 'delegates' in the compositor.
2113
2114         * WebCore.gypi:
2115         * platform/graphics/chromium/ContentLayerChromium.cpp:
2116         (WebCore::ContentLayerPainter::ContentLayerPainter):
2117         (WebCore::ContentLayerPainter::create):
2118         (WebCore::ContentLayerPainter::paint):
2119         (WebCore::ContentLayerChromium::create):
2120         (WebCore::ContentLayerChromium::ContentLayerChromium):
2121         (WebCore::ContentLayerChromium::drawsContent):
2122         (WebCore::ContentLayerChromium::createTextureUpdaterIfNeeded):
2123         * platform/graphics/chromium/ContentLayerChromium.h:
2124         (WebCore):
2125         (ContentLayerPainter):
2126         (ContentLayerChromium):
2127         (WebCore::ContentLayerChromium::clearClient):
2128         * platform/graphics/chromium/TextureLayerChromium.cpp:
2129         * platform/graphics/chromium/TextureLayerChromium.h:
2130         (WebCore):
2131         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2132         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
2133         (WebCore):
2134
2135 2012-08-31  Benjamin Poulain  <bpoulain@apple.com>
2136
2137         Fix the Debug builds after r127277
2138
2139         Unreviewed.
2140
2141         One assertion was not updated in r127277. The encapsulation of CSSParserString's length
2142         has changed and now use an accessor.
2143
2144         * css/CSSParser.cpp:
2145         (WebCore::CSSParser::storeVariableDeclaration):
2146
2147 2012-08-31  Simon Fraser  <simon.fraser@apple.com>
2148
2149         (Regression: r126774): Fix crash when scrolling after removing inline sticky element
2150         https://bugs.webkit.org/show_bug.cgi?id=95584
2151
2152         Reviewed by Dave Hyatt.
2153
2154         Move fixed/sticky registration and unregistration with the FrameView from
2155         RenderBox and RenderInline into RenderBoxModelObject, which also
2156         fixes the issue that inlines didn't unregister themselves on destruction.
2157
2158         Test: fast/css/sticky/remove-inline-sticky-crash.html
2159
2160         * rendering/RenderBox.cpp:
2161         (WebCore::RenderBox::willBeDestroyed): Code moved to RenderBoxModelObject. No need
2162         to null-check style.
2163         (WebCore::RenderBox::styleWillChange): Code moved to RenderBoxModelObject.
2164         * rendering/RenderBoxModelObject.cpp:
2165         (WebCore::RenderBoxModelObject::willBeDestroyed): Remove fixed objects. Check
2166         isPositioned() to avoid this work for most non-positioned renderers.
2167         (WebCore::RenderBoxModelObject::styleWillChange): Register and unregister fixed
2168         and sticky objects with the FrameView.
2169         * rendering/RenderInline.cpp: styleWillChange() is no longer needed.
2170         * rendering/RenderInline.h: Ditto.
2171
2172 2012-08-31  Nikhil Bhargava  <nbhargava@google.com>
2173
2174         Remove extraneous includes (Node.h, Document.h, Element.h, RenderObject.h)
2175         https://bugs.webkit.org/show_bug.cgi?id=95259
2176
2177         Reviewed by Sam Weinig.
2178
2179         Node.h, Document.h, Element.h, and RenderObject.h are four of the most
2180         expensive headers to include. This patch removes them from many of the
2181         places they are not needed. There is a minor compile-time performance
2182         boost.
2183
2184         * dom/ElementShadow.h:
2185         * dom/Range.h:
2186         (WebCore):
2187         * dom/TreeScopeAdopter.h:
2188         (WebCore):
2189         * editing/VisiblePosition.h:
2190         (WebCore):
2191         * html/HTMLCollection.h:
2192         (WebCore):
2193         * html/parser/HTMLElementStack.h:
2194         * html/parser/HTMLTreeBuilder.h:
2195         (WebCore):
2196         * html/track/WebVTTParser.h:
2197         (WebCore):
2198         * inspector/InspectorCSSAgent.h:
2199         (WebCore):
2200         * inspector/InspectorInstrumentation.h:
2201         (WebCore):
2202         * inspector/InspectorOverlay.h:
2203         * loader/ImageLoader.h:
2204         * loader/TextTrackLoader.h:
2205         (WebCore):
2206         * platform/chromium/PopupListBox.cpp:
2207         * platform/chromium/PopupListBox.h:
2208         (WebCore):
2209         * platform/graphics/MediaPlayer.h:
2210         (WebCore):
2211         * rendering/FilterEffectRenderer.h:
2212         * rendering/InlineFlowBox.cpp:
2213         * rendering/RenderCounter.cpp:
2214         * rendering/RenderGeometryMap.h:
2215         (WebCore):
2216         * rendering/RenderInputSpeech.h:
2217         (WebCore):
2218         * rendering/RenderMediaControls.h:
2219         (WebCore):
2220         * rendering/RenderMediaControlsChromium.h:
2221         (WebCore):
2222         * rendering/RenderQuote.cpp:
2223         * rendering/RenderQuote.h:
2224         (WebCore):
2225         * rendering/RenderScrollbar.h:
2226         (WebCore):
2227         * rendering/RenderText.h:
2228         (WebCore):
2229         * rendering/RenderTheme.h:
2230         (WebCore):
2231         * rendering/RenderThemeChromiumSkia.h:
2232         (WebCore):
2233         * rendering/svg/RenderSVGResourceMarker.h:
2234         (WebCore):
2235         * svg/graphics/filters/SVGFilterBuilder.h:
2236         (WebCore):
2237         * xml/NativeXPathNSResolver.h:
2238         (WebCore):
2239         (NativeXPathNSResolver):
2240         (WebCore::NativeXPathNSResolver::create):
2241         * xml/XPathStep.h:
2242         (WebCore):
2243         (XPath):
2244         (Step):
2245         (NodeTest):
2246         (WebCore::XPath::Step::NodeTest::NodeTest):
2247         (WebCore::XPath::Step::NodeTest::kind):
2248         (WebCore::XPath::Step::NodeTest::data):
2249         (WebCore::XPath::Step::NodeTest::namespaceURI):
2250         (WebCore::XPath::Step::NodeTest::mergedPredicates):
2251         (WebCore::XPath::Step::axis):
2252         (WebCore::XPath::Step::nodeTest):
2253         * xml/parser/NewXMLDocumentParser.cpp:
2254         * xml/parser/NewXMLDocumentParser.h:
2255         (WebCore):
2256         * xml/parser/XMLToken.h:
2257         * xml/parser/XMLTreeBuilder.cpp:
2258         * xml/parser/XMLTreeBuilder.h:
2259         (WebCore):
2260
2261 2012-08-31  David Hyatt  <hyatt@apple.com>
2262
2263         [New Multicolumn] Implement column repainting.
2264         https://bugs.webkit.org/show_bug.cgi?id=95593
2265
2266         Reviewed by Dan Bernstein.
2267         
2268         Make the new columns repaint properly. Note this code is a significant improvement over the
2269         old multicolumn code in that repaints are properly issued per-column, i.e., no more fuzzy
2270         uniting of rects.
2271
2272         * rendering/RenderMultiColumnSet.cpp:
2273         (WebCore::RenderMultiColumnSet::columnIndexAtOffset):
2274         (WebCore):
2275         (WebCore::RenderMultiColumnSet::repaintFlowThreadContent):
2276         * rendering/RenderMultiColumnSet.h:
2277
2278 2012-08-31  Alok Priyadarshi  <alokp@chromium.org>
2279
2280         [chromium] Layout tests svg-filters.html and alpha.html are crashing intermittently
2281         https://bugs.webkit.org/show_bug.cgi?id=92660
2282
2283         Reviewed by James Robinson.
2284
2285         We use two GL contexts to create and upload tile textures.
2286         One context creates the texture, while another uploads it.
2287         Even though the texture is shared by the two contexts, it is not
2288         available to the uploading context immediately after creation,
2289         unless the creating context is flushed. 
2290
2291         * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp:
2292         (WebCore::createAcceleratedCanvas):
2293         (WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::updateTextureRect):
2294
2295 2012-08-31  David Hyatt  <hyatt@apple.com>
2296
2297         [New Multicolumn] Refactor flow thread repainting.
2298         https://bugs.webkit.org/show_bug.cgi?id=95586
2299
2300         Reviewed by Simon Fraser.
2301
2302         Refactor flow thread repainting in regions to delegate the work to the region. This allows subclasses
2303         to customize how the repainting happens so that individual repaints can be issued for columns and pages
2304         inside sets.
2305         
2306         repaintFlowThreadContent is the new virtual function that can be subclassed by sets to customize
2307         the repaint process.
2308         
2309         repaintFlowThreadContentRectangle is a parameterized helper that will be called for each individual
2310         column and page in a set.
2311
2312         * WebCore.exp.in:
2313         Change repaintRectangle's signature to be const.
2314
2315         * rendering/RenderFlowThread.cpp:
2316         (WebCore::RenderFlowThread::repaintRectangleInRegions):
2317         Now delegates the work for each region to RenderRegion::repaintFlowThreadContent.
2318
2319         * rendering/RenderObject.cpp:
2320         (WebCore::RenderObject::repaintUsingContainer):
2321         (WebCore::RenderObject::repaint):
2322         (WebCore::RenderObject::repaintRectangle):
2323         (WebCore::RenderObject::isRooted):
2324         * rendering/RenderObject.h:
2325         Change a bunch of functions to be const.
2326
2327         * rendering/RenderRegion.cpp:
2328         (WebCore::RenderRegion::repaintFlowThreadContent):
2329         (WebCore):
2330         (WebCore::RenderRegion::repaintFlowThreadContentRectangle):
2331         * rendering/RenderRegion.h:
2332         (RenderRegion):
2333         Add the two new functions (the virtual repaintFlowThreadContent and the helper it
2334         uses, repaintFlowThreadContentRectangle).
2335
2336 2012-08-31  Yong Li  <yoli@rim.com>
2337
2338         [BlackBerry] Disable GCController timer for PLATFORM(BLACKBERRY)
2339         https://bugs.webkit.org/show_bug.cgi?id=93007
2340
2341         Reviewed by Rob Buis.
2342
2343         Disable GCController timer.
2344
2345         * bindings/js/GCController.cpp:
2346         (WebCore::GCController::GCController):
2347         (WebCore::GCController::garbageCollectSoon):
2348         (WebCore):
2349         * bindings/js/GCController.h:
2350         (GCController):
2351
2352 2012-08-31  Michael Saboff  <msaboff@apple.com>
2353
2354         CSS Parser should directly parse 8 bit source strings
2355         https://bugs.webkit.org/show_bug.cgi?id=95207
2356
2357         Reviewed by Geoffrey Garen.
2358
2359         Changed CSSParser to handle 8 bit strings directly. Templatized most private parsing methods
2360         and helper methods by character type. Introduced several templatized helper methods for
2361         parsing methods. Some of these helper methods have independent source and destination template
2362         types to handle that an 8 bit source string when parsed produces a 16 bit result. This is due
2363         to unicode escapes. Renamed the lex method "realLex" and made it a templated method. The lex
2364         method that is called by cssyylex(), which is now inlined, invokes the correct instance of realLex
2365         via a member function pointer.
2366
2367         Split out the encoding part of parseEscape() into a new templated UnicodeToChars() method.
2368
2369         Added 8/16 bit switching to CSSParserString as well as added initialization, setters and getters.
2370         Note that CSSParserString must have a default constructor as it is part of the YYLVAL union.
2371         Therefore created init() methods instead of constructors. Many of the parser function now directly
2372         modify the instance in yylval. Made supporting changes in other webcore classes that are used
2373         directly by CSSParser.
2374
2375         Test: fast/css/unicode-escape-in-8bit-string.html
2376
2377         * css/CSSGrammar.y: Removed cssyylex() and changed manipulation of CSSParserString objects to
2378         use newly written methods instead of direct manipulation of attributes.
2379
2380         * css/CSSParser.cpp:
2381         Templatized new or existing helper methods
2382         (WebCore::makeLower):
2383         (WebCore::isCSSLetter):
2384         (WebCore::isCSSEscape):
2385         (WebCore::isURILetter):
2386         (WebCore::isIdentifierStartAfterDash):
2387         (WebCore::isEqualToCSSIdentifier):
2388         (WebCore::checkAndSkipEscape):
2389         (WebCore::checkForValidDouble):
2390         (WebCore::parseDouble):
2391         (WebCore::parseColorIntOrPercentage):
2392         (WebCore::isTenthAlpha):
2393         (WebCore::parseAlphaValue):
2394         (WebCore::mightBeRGBA):
2395         (WebCore::mightBeRGB):
2396         (WebCore::fastParseColorInternal):
2397         (WebCore::CSSParser::fastParseColor):
2398         (WebCore::CSSParser::parseImageSet):
2399         (WebCore::skipWhiteSpace):
2400         (WebCore::CSSParser::currentCharacter16):
2401         (WebCore::CSSParser::isIdentifierStart):
2402         (WebCore::CSSParser::checkAndSkipString):
2403         (WebCore::CSSParser::parseUnicodeRange):
2404         (WebCore::CSSParser::parseNthChild):
2405         (WebCore::CSSParser::parseNthChildExtra):
2406         (WebCore::CSSParser::detectFunctionTypeToken):
2407         (WebCore::CSSParser::detectMediaQueryToken):
2408         (WebCore::CSSParser::detectNumberToken):
2409         (WebCore::CSSParser::detectDashToken):
2410         (WebCore::CSSParser::detectAtToken):
2411         (WebCore::CSSParser::setRuleHeaderEnd):
2412         (WebCore::cssPropertyID):
2413         (WebCore::isCSSTokenizerIdentifier):
2414         (WebCore::isCSSTokenizerURL):
2415
2416         (WebCore::CSSParser::CSSParser): Updated constructor for initializing new attributes.
2417
2418         (WebCore::CSSParserString::lower): Calls new makeLower() template helper.
2419
2420         (WebCore::CSSParser::setupParser): Added 8 bit path and set up parser appropriate to
2421         string type.
2422
2423         (WebCore::equal): Updated to use CSSParserString getters and StringImpl::equal
2424         (WebCore::equalIgnoringCase): Updated to use CSSParserString getters and
2425         StringImpl::equalIgnoringCase
2426         (WebCore::parseColorValue): Updated to use new CSSParserString::init()
2427         (WebCore::parseSimpleLength):
2428         (WebCore::parseKeywordValue): Updated to use new CSSParserString::init()
2429         (WebCore::parseTransformArguments):
2430         (WebCore::CSSParser::parseSystemColor): Updated to use new CSSParserString::init()
2431         (WebCore::CSSParser::storeVariableDeclaration): Create right character sized AtomicString.
2432         (WebCore::FontFamilyValueBuilder::add):
2433         (WebCore::TransformOperationInfo::TransformOperationInfo):
2434         (WebCore::CSSParser::parseFontFeatureTag):
2435
2436         (WebCore::CSSParser::parseEscape): Now only parses an escape and returns the resulting
2437         Unicode value as an unsigned.
2438         (WebCore::CSSParser::UnicodeToChars): New method to write out unicode character(s)
2439         based on character type.
2440         (WebCore::CSSParser::parseIdentifierInternal): Templated helper.
2441         (WebCore::CSSParser::parseIdentifier): Parses identifiers, possibly upconverting
2442         the result when a unicode escape is found in an 8 bit source.
2443         (WebCore::CSSParser::parseStringInternal): Templated helper.
2444         (WebCore::CSSParser::parseString): Parses strings, possibly upconverting
2445         the result when a unicode escape is found in an 8 bit source.
2446         (WebCore::CSSParser::parseURIInternal): Templated helper.
2447         (WebCore::CSSParser::parseURI): Templated and split logic out to parseURIInternal.
2448         Reparses a parsed identifier to see if it is a URI.  This method doesn't need to up
2449         convert from 8 to 16 bits since that would have been done in parseIdentfier().
2450         (WebCore::CSSParser::realLex): Lot of template related changes.  Removed yylval->string
2451         ASSERT checks at the end, since they are too naive to handle upconverted identifier,
2452         string and URIs.  They compared source pointers (m_tokenStart) with resulting strings.
2453         (WebCore::fixUnparsedProperties):
2454         (WebCore::CSSParser::fixUnparsedPropertyRanges): Added new template helper with same name.
2455         (WebCore::CSSParser::markRuleHeaderStart):
2456         (WebCore::CSSParser::markRuleHeaderEnd):
2457         (WebCore::CSSParser::markRuleBodyStart):
2458         (WebCore::CSSParser::markRuleBodyEnd):
2459         (WebCore::CSSParser::markPropertyStart):
2460         (WebCore::CSSParser::markPropertyEnd):
2461         (WebCore::cssValueKeywordID):
2462
2463         * css/CSSParser.h:
2464         (CSSParser):
2465         (WebCore::CSSParser::lex): Made this inline helper that calls correct realLex().
2466         (WebCore::CSSParser::is8BitSource):
2467         (WebCore::CSSParser::tokenStartOffset): Templated method returning offset in source
2468         of the current token start.
2469         (WebCore::CSSParser::tokenStartChar): Templated access to m_tokenStart.
2470         (WebCore::cssyylex): Made this inline to avoid call.
2471         * css/CSSParserValues.h:
2472         (WebCore::CSSParserString::init): Added three new initialization methods.
2473
2474         New setters, getters and helper methods.
2475         (WebCore::CSSParserString::clear):
2476         (WebCore::CSSParserString::is8Bit):
2477         (WebCore::CSSParserString::characters8):
2478         (WebCore::CSSParserString::characters16):
2479         (WebCore::CSSParserString::length):
2480         (WebCore::CSSParserString::setLength):
2481         (WebCore::CSSParserString::operator[]):
2482         (WebCore::CSSParserString::equalIgnoringCase):
2483         (WebCore::CSSParserString::operator String):
2484         (WebCore::CSSParserString::operator AtomicString):
2485
2486         Other methods templatized to support changes in CSSParser.
2487         * platform/graphics/Color.cpp:
2488         (WebCore::parseHexColorInternal):
2489         (WebCore::Color::parseHexColor): New LChar flavor
2490         (WebCore::Color::Color):
2491         * platform/graphics/Color.h:
2492         (Color):
2493         * platform/text/TextEncoding.cpp:
2494         (WebCore::TextEncoding::TextEncoding):
2495         * platform/text/TextEncodingRegistry.cpp:
2496         (WebCore::atomicCanonicalTextEncodingName):
2497         * platform/text/TextEncodingRegistry.h:
2498         * svg/SVGParserUtilities.cpp:
2499         (WebCore::genericParseNumber):
2500         (WebCore::parseSVGNumber):
2501         * svg/SVGParserUtilities.h:
2502         (WebCore::isSVGSpace):
2503         (WebCore::skipOptionalSVGSpaces):
2504         (WebCore::skipOptionalSVGSpacesOrDelimiter):
2505
2506 2012-08-31  David Hyatt  <hyatt@apple.com>
2507
2508         [New Multicolumn] Make RenderFlowThreads into selection roots.
2509         https://bugs.webkit.org/show_bug.cgi?id=95580
2510
2511         Reviewed by Dan Bernstein.
2512
2513         Make RenderFlowThreads selection roots so that they paint their own selection gaps.
2514         This fixes multicolumn selection rendering so that the gaps paint correctly and stop
2515         at the edge of the flow thread instead of going out to the edges of enclosing blocks.
2516
2517         * rendering/RenderBlock.cpp:
2518         (WebCore::RenderBlock::isSelectionRoot):
2519
2520 2012-08-31  Andrei Bucur  <abucur@adobe.com>
2521
2522         [CSS Regions] It should be possible to specify ::BEFORE/AFTER as regions
2523         https://bugs.webkit.org/show_bug.cgi?id=90079
2524
2525         Reviewed by David Hyatt.
2526
2527         The calls for RenderRegion::node() have been replaced with RenderRegion::generatingNode() to allow pseudo-elements to have RenderRegion renderers.
2528         The compare function that establishes the region order was adapted to take into account pseudo-regions.
2529         A renderer for the pseudo-element is now generated if it's a region even though there's no content property specified.
2530
2531         Test: fast/regions/content-flowed-into-pseudo-regions.html
2532
2533         * rendering/RenderFlowThread.cpp:
2534         (WebCore::RenderFlowThread::computeOverflowStateForRegions):
2535         * rendering/RenderNamedFlowThread.cpp:
2536         (WebCore::compareRenderRegions):
2537         * rendering/RenderObjectChildList.cpp:
2538         (WebCore::ensureBeforeAfterContainer):
2539         (WebCore):
2540         (WebCore::RenderObjectChildList::updateBeforeAfterContent):
2541         * rendering/RenderRegion.cpp:
2542         (WebCore::RenderRegion::nodeAtPoint):
2543         (WebCore::RenderRegion::checkRegionStyle):
2544         (WebCore::RenderRegion::computeStyleInRegion):
2545         * rendering/RenderTreeAsText.cpp:
2546         (WebCore::writeRenderNamedFlowThreads):
2547
2548 2012-08-30  David Hyatt  <hyatt@apple.com>
2549
2550         [New Multicolumn] Implement unforced breaking in the new column layout.
2551         https://bugs.webkit.org/show_bug.cgi?id=95498
2552
2553         Reviewed by Dan Bernstein.
2554
2555         This patch implements unforced breaking for lines and objects inside columns. Forced breaks are
2556         not yet handled properly and will be covered in a separate patch.
2557
2558         * rendering/LayoutState.cpp:
2559         (WebCore::LayoutState::LayoutState):
2560         Eliminate the flow thread constructor for LayoutState. Flow threads were doing a double push of
2561         layout states, once in RenderFlowThread::layout() and then again in RenderBlock::layout(). This
2562         double push was unnecessary, so I refactored the code to ensure the RenderBlock push does the
2563         right thing for RenderFlowThreads.
2564
2565         (WebCore):
2566         * rendering/LayoutState.h:
2567         (LayoutState):
2568         Eliminate the flow thread constructor for LayoutState.
2569
2570         * rendering/RenderBlock.cpp:
2571         (WebCore::RenderBlock::checkForPaginationLogicalHeightChange):
2572         This function now handles RenderFlowThreads and properly sets a non-zero page height as well
2573         as querying the flow thread to ask if the pagination logical height has changed. The flow thread
2574         has a new member that it sets in layout() so that it can answer this question.
2575
2576         (WebCore::RenderBlock::hasNextPage):
2577         Make sure RenderRegionSets always claim to have a next page when they are the last region, since
2578         we know columns/pages can always generate additional boxes as needed.
2579
2580         * rendering/RenderFlowThread.cpp:
2581         (WebCore::RenderFlowThread::RenderFlowThread):
2582         Add the m_pageLogicalHeightChanged member variable for tracking whether regions changed dimensions,
2583         thus forcing us to repaginate everything.
2584
2585         (WebCore::RenderFlowThread::layout):
2586         Remove the redundant push of layout state now that RenderBlock's covers it.
2587
2588         (WebCore::RenderFlowThread::regionAtBlockOffset):
2589         Always return the last region if it's a set, regardless of the extendLastRegion boolean.
2590         This reflects the fact that the last region set can always generate new page/column boxes.
2591
2592         (WebCore::RenderFlowThread::pageLogicalTopForOffset):
2593         Refactored to call into the region it finds for a given offset, so that the region itself
2594         can answer the question of where the top of the page is. This enables sets to return the top of
2595         specific columns/pages within the set.
2596
2597         (WebCore::RenderFlowThread::pageRemainingLogicalHeightForOffset):
2598         Changed to be written in terms of pageLogicalTop and pageLogicalHeight so that it correctly uses
2599         only the current column/page when determining remaining height.
2600
2601         * rendering/RenderFlowThread.h:
2602         Added pageLogicalHeightChanged() so that RenderBlock can ask the flow thread if its regions changed
2603         dimensions.
2604
2605         * rendering/RenderMultiColumnBlock.cpp:
2606         (WebCore::RenderMultiColumnBlock::checkForPaginationLogicalHeightChange):
2607         Tweaked to no longer turn on pagination, since the RenderMultiColumnFlowThread does that and we
2608         want to avoid a double push of paginated states. Instead it now just sets the column height ahead
2609         of time so that the RenderMultiColumnSets know how big their columns are.
2610
2611         * rendering/RenderMultiColumnSet.cpp:
2612         (WebCore::RenderMultiColumnSet::pageLogicalTopForOffset):
2613         Subclassed to return the top of a specific column.
2614
2615         (WebCore):
2616         * rendering/RenderMultiColumnSet.h:
2617         Add the subclassed method for pageLogicalTopForOffset.
2618         
2619         * rendering/RenderRegion.cpp:
2620         (WebCore::RenderRegion::pageLogicalTopForOffset):
2621         The code from RenderFlow::pageLogicalTopForOffset moved here. Just returns the top of the flow
2622         thread portion rect in the region (same as before).
2623
2624         (WebCore::RenderRegion::layout):
2625         Changed to check only the page logical width and height, since we only consider a region as
2626         invalidating how you break if there is an actual page height change.
2627
2628         * rendering/RenderRegion.h:
2629         (WebCore::RenderRegion::isRenderRegionSet):
2630         Added an isRenderRegionSet() virtual function so that we can test for sets.
2631
2632         * rendering/RenderRegionSet.h:
2633         (WebCore::RenderRegionSet::isRenderRegionSet):
2634         Subclassed isRenderRegionSet() to return true.
2635
2636         * rendering/RenderView.cpp:
2637         * rendering/RenderView.h:
2638         (LayoutStateMaintainer):
2639         (WebCore::LayoutStateMaintainer::push):
2640         Remove the pushes of LayoutState that were specific to RenderFlowThreads.
2641
2642 2012-08-31  Pavel Feldman  <pfeldman@chromium.org>
2643
2644         Web Inspector: Update $ to alias to querySelector rather than getElementById
2645         https://bugs.webkit.org/show_bug.cgi?id=92648
2646
2647         Reviewed by Yury Semikhatsky.
2648
2649         Completed implementation started by Addy Osmani. Updates $ to alias to querySelector
2650         with more flexible handling of selectors. Also adds a warning about the change (as per Firebug).
2651
2652         * inspector/InjectedScriptSource.js:
2653         (.):
2654
2655 2012-08-31  Andrey Kosyakov  <caseq@chromium.org>
2656
2657         Web Inspector: disable popover on click outside of popover anchor
2658         https://bugs.webkit.org/show_bug.cgi?id=95564
2659
2660         Reviewed by Yury Semikhatsky.
2661
2662         Immediately hide popover when receiving a click outside of popover anchor.
2663
2664         * inspector/front-end/Popover.js:
2665         (WebInspector.PopoverHelper.prototype._mouseDown):
2666
2667 2012-08-31  Christophe Dumez  <christophe.dumez@intel.com>
2668
2669         [EFL] Add proper support for navigator.onLine and associated events
2670         https://bugs.webkit.org/show_bug.cgi?id=95532
2671
2672         Reviewed by Kenneth Rohde Christiansen.
2673
2674         Add support for detecting online state in EFL port and
2675         monitor state changes. The EFL port now has proper
2676         support for navigator.onLine and associated events.
2677
2678         The implementation is based on Eeze library for
2679         detecting network interfaces and their configuration.
2680         Detection of online state changes relies on rtnetlink.
2681
2682         No new tests, no behavior change for layout tests.
2683
2684         * PlatformEfl.cmake: Link unconditionally against Eeze
2685         library now.
2686         * platform/network/NetworkStateNotifier.cpp:
2687         (WebCore):
2688         * platform/network/NetworkStateNotifier.h:
2689         (NetworkStateNotifier):
2690         (WebCore):
2691         * platform/network/efl/NetworkStateNotifierEfl.cpp: Added.
2692         (WebCore):
2693         (WebCore::NetworkStateNotifier::updateState):
2694         (WebCore::NetworkStateNotifier::networkInterfaceChanged):
2695         (WebCore::readSocketCallback):
2696         (WebCore::NetworkStateNotifier::~NetworkStateNotifier):
2697         (WebCore::NetworkStateNotifier::NetworkStateNotifier):
2698
2699 2012-08-31  Milian Wolff  <milian.wolff@kdab.com>
2700
2701         [Qt] QNX build fails due to missing OpenGL ES defines
2702         https://bugs.webkit.org/show_bug.cgi?id=95554
2703
2704         Reviewed by Simon Hausmann.
2705
2706         Apply the fix of bug 91030 to all platforms running on QNX.
2707
2708         * platform/graphics/opengl/Extensions3DOpenGLES.h:
2709
2710 2012-08-31  Thiago Marcos P. Santos  <thiago.santos@intel.com>
2711
2712         [CMake] Changes on the bindings generator does not trigger generation of the bindings
2713         https://bugs.webkit.org/show_bug.cgi?id=95552
2714
2715         Reviewed by Kenneth Rohde Christiansen.
2716
2717         Added the engine especific part of the generator to the dependency
2718         list.
2719
2720         * UseJSC.cmake:
2721         * UseV8.cmake:
2722
2723 2012-08-31  Andrey Adaikin  <aandrey@chromium.org>
2724
2725         Web Inspector: [WebGL] Link WebGL calls to the source code where it was made
2726         https://bugs.webkit.org/show_bug.cgi?id=95426
2727
2728         Reviewed by Vsevolod Vlasov.
2729
2730         Save a stack trace for every call we capture and report to the frontend sourceURL,lineNumber,columnNumber were the call was made from.
2731         Right now, this will work only with V8.
2732
2733         * inspector/InjectedScriptExterns.js:
2734         (CallSite.prototype.getFileName):
2735         (CallSite.prototype.getLineNumber):
2736         (CallSite.prototype.getColumnNumber):
2737         * inspector/InjectedScriptWebGLModuleSource.js:
2738         (.):
2739         * inspector/Inspector.json:
2740         * inspector/front-end/WebGLProfileView.js:
2741         (WebInspector.WebGLProfileView):
2742         (WebInspector.WebGLProfileView.prototype._showTraceLog):
2743
2744 2012-08-31  Patrick Dubroy  <dubroy@chromium.org>
2745
2746         Web Inspector: Add high-DPI images for status bar glyphs
2747         https://bugs.webkit.org/show_bug.cgi?id=95471
2748
2749         Reviewed by Pavel Feldman.
2750
2751         Add the new 2x resolution image for the status bar glyphs, and add
2752         media queries to use the images on high-DPI devices.
2753
2754         * inspector/front-end/Images/statusbarButtonGlyphs2x.png: Added.
2755         * inspector/front-end/WebKit.qrc:
2756         * inspector/front-end/inspector.css:
2757         (.long-click-glyph):
2758         (@media (-webkit-min-device-pixel-ratio: 1.5)):
2759         (.status-bar-item > .glyph):
2760         * inspector/front-end/scriptsPanel.css:
2761         (.toggle-breakpoints .glyph):
2762         (@media (-webkit-min-device-pixel-ratio: 1.5)):
2763         (.status-bar-item.scripts-navigator-show-hide-button > .glyph):
2764         (.status-bar-item.scripts-debugger-show-hide-button > .glyph):
2765         * WebCore.gypi
2766         * inspector/front-end/timelinePanel.css:
2767         (#timeline-overview-sidebar .icon):
2768         (@media (-webkit-min-device-pixel-ratio: 1.5)):
2769
2770 2012-08-30  Pavel Feldman  <pfeldman@chromium.org>
2771
2772         Web Inspector: render box model elements and grid on inspector overlay
2773         https://bugs.webkit.org/show_bug.cgi?id=95456
2774
2775         Reviewed by Vsevolod Vlasov.
2776
2777         This change migrates native rendering for box model to the InspectorOverlay.
2778
2779         * inspector/InspectorInstrumentation.cpp:
2780         (WebCore):
2781         (WebCore::InspectorInstrumentation::didScrollImpl):
2782         * inspector/InspectorInstrumentation.h:
2783         (InspectorInstrumentation):
2784         (WebCore::InspectorInstrumentation::didScroll):
2785         (WebCore):
2786         * inspector/InspectorOverlay.cpp:
2787         (WebCore::InspectorOverlay::drawNodeHighlight):
2788         (WebCore::InspectorOverlay::drawRectHighlight):
2789         (WebCore::InspectorOverlay::overlayPage):
2790         (WebCore::InspectorOverlay::evaluateInOverlay):
2791         * inspector/InspectorOverlay.h:
2792         (WebCore::Highlight::setColors):
2793         (Highlight):
2794         (InspectorOverlay):
2795         * inspector/InspectorOverlayPage.html:
2796         * inspector/InspectorPageAgent.cpp:
2797         (WebCore::InspectorPageAgent::didLayout):
2798         (WebCore):
2799         (WebCore::InspectorPageAgent::didScroll):
2800         * inspector/InspectorPageAgent.h:
2801         * page/Chrome.cpp:
2802         (WebCore::Chrome::scroll):
2803
2804 2012-08-31  Andrey Adaikin  <aandrey@chromium.org>
2805
2806         Web Inspector: [WebGL] Make wrap functions initialization lazy
2807         https://bugs.webkit.org/show_bug.cgi?id=95533
2808
2809         Reviewed by Vsevolod Vlasov.
2810
2811         WebGL wrap functions initialization is not always needed to be executed: for example, when we will instrument a 2D canvas.
2812         Drive-by: fixed variable namings, moved duplicated code into a small auxiliary function.
2813
2814         * inspector/InjectedScriptWebGLModuleSource.js:
2815         (.):
2816
2817 2012-08-31  Simon Hausmann  <simon.hausmann@nokia.com>
2818
2819         [Qt] Port convertValueToQVariant to use the JSC C API
2820         https://bugs.webkit.org/show_bug.cgi?id=94695
2821
2822         Reviewed by Kenneth Rohde Christiansen.
2823
2824         Most of the code is portable to the C API, with a few exceptions for internal
2825         types such as byte arrays, dates or when unboxing primitive types.
2826
2827         * bridge/qt/qt_instance.cpp:
2828         (JSC::Bindings::QtField::setValueToInstance):
2829         * bridge/qt/qt_runtime.cpp:
2830         (JSC::Bindings::operator<<):
2831         (JSC::Bindings::isJSUint8ClampedArray):
2832         (JSC::Bindings::isJSArray):
2833         (Bindings):
2834         (JSC::Bindings::isJSDate):
2835         (JSC::Bindings::isQtObject):
2836         (JSC::Bindings::valueRealType):
2837         (JSC::Bindings::toString):
2838         (JSC::Bindings::unwrapBoxedPrimitive):
2839         (JSC::Bindings::convertValueToQVariantMap):
2840         (JSC::Bindings::convertToList):
2841         (JSC::Bindings::toQString):
2842         (JSC::Bindings::getGregorianDateTimeUTC):
2843         (JSC::Bindings::toQDateTimeUTC):
2844         (JSC::Bindings::convertValueToQVariant):
2845         (JSC::Bindings::findMethodIndex):
2846         (JSC::Bindings::QtConnectionObject::execute):
2847         * bridge/qt/qt_runtime.h:
2848         (Bindings):
2849
2850 2012-08-31  Pavel Feldman  <pfeldman@chromium.org>
2851
2852         Web Inspector: render path to file and line number as subtitles in selector dialog.
2853         https://bugs.webkit.org/show_bug.cgi?id=95481
2854
2855         Reviewed by Vsevolod Vlasov.
2856
2857         In case several files have matching names, we should render the path next to it.
2858         Using the same subtitle field, we now also render line number for JS and Style outlines.
2859
2860         * inspector/front-end/FilteredItemSelectionDialog.js:
2861         (WebInspector.FilteredItemSelectionDialog.prototype.get _itemsLoaded):
2862         (WebInspector.FilteredItemSelectionDialog.prototype._createItemElement):
2863         (WebInspector.FilteredItemSelectionDialog.prototype._filterItems):
2864         (WebInspector.SelectionDialogContentProvider.prototype.itemSuffixAt):
2865         (WebInspector.JavaScriptOutlineDialog.prototype.itemSuffixAt):
2866         (WebInspector.JavaScriptOutlineDialog.prototype.itemSubtitleAt):
2867         (WebInspector.OpenResourceDialog.prototype.itemSuffixAt):
2868         (WebInspector.OpenResourceDialog.prototype.itemSubtitleAt):
2869         * inspector/front-end/StyleSheetOutlineDialog.js:
2870         (WebInspector.StyleSheetOutlineDialog.prototype.itemSuffixAt):
2871         (WebInspector.StyleSheetOutlineDialog.prototype.itemSubtitleAt):
2872         * inspector/front-end/filteredItemSelectionDialog.css:
2873         (.js-outline-dialog > .container > div.item):
2874         (.js-outline-dialog span.subtitle):
2875
2876 2012-08-31  Yoshifumi Inoue  <yosin@chromium.org>
2877
2878         [Forms] Left/Right keys in multiple fields time input UI should move focus physical left/right instead of logical left/right regardless text direction.
2879         https://bugs.webkit.org/show_bug.cgi?id=95434
2880
2881         Reviewed by Kent Tamura.
2882
2883         This patch also changes handling of Left/Right keys to aware text
2884         direction ("dir" attribute"). Left/Right keys should move focus
2885         physical right/left instead of logical right/left.
2886
2887         This patch affects ports which enable both ENABLE_INPUT_TYPE_TIME and
2888         ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS.
2889
2890         No new tests. This patch adds a test case into fast/forms/time-multiple-fields/time-multiple-fields-keyboard-events.html
2891
2892         * html/shadow/DateTimeFieldElement.cpp:
2893         (WebCore::DateTimeFieldElement::defaultKeyboardEventHandler): Changed to check isRTL() for Left/Right keys then we call
2894         appropriate focus motion function.
2895         (WebCore::DateTimeFieldElement::isRTL): Added for checking text direction is right-to-left or not.
2896         * html/shadow/DateTimeFieldElement.h:
2897         (DateTimeFieldElement): Added declaration of isRTL().
2898
2899 2012-08-30  Yoshifumi Inoue  <yosin@chromium.org>
2900
2901         [Forms] Blur from field should reset typeahead buffer in multiple fields time input UI
2902         https://bugs.webkit.org/show_bug.cgi?id=95525
2903
2904         Reviewed by Kent Tamura.
2905
2906         This patch changes to reset typeahead timer used in DateTimeNumericFieldElement
2907         on blur from field. It is intuitive that not merging keyboard inputs
2908         with interleaving focus motion, e.g. sequence type "1", type Tab, type
2909         Shift+Tab, type "2" should set field to "2" instead of "12".
2910
2911         This patch affects ports which enable both ENABLE_INPUT_TYPE_TIME and
2912         ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS.
2913
2914         No new tests. This patch adds a test case into fast/forms/time-multiple-fields/time-multiple-fields-keyboard-events.html
2915
2916         * html/shadow/DateTimeNumericFieldElement.cpp:
2917         (WebCore::DateTimeNumericFieldElement::didBlur): Added to reset typeahead timer, m_lastDigitCharTime.
2918         * html/shadow/DateTimeNumericFieldElement.h:
2919         (DateTimeNumericFieldElement): Added a declaration of didBlur().
2920
2921 2012-08-30 MORITA Hajime  <morrita@google.com>
2922
2923         Unreviewed, followup build fix against r127228.
2924
2925         * dom/Notation.cpp:
2926         (WebCore::Notation::cloneNode):
2927         * dom/Notation.h:
2928         (Notation):
2929
2930 2012-08-30  MORITA Hajime  <morrita@google.com>
2931
2932         Unreviewed, rolling out r126127.
2933         http://trac.webkit.org/changeset/126127
2934
2935         This breaks gobject bindings.
2936
2937         * dom/Attr.cpp:
2938         (WebCore::Attr::cloneNode):
2939         * dom/Attr.h:
2940         * dom/CDATASection.cpp:
2941         (WebCore::CDATASection::cloneNode):
2942         * dom/CDATASection.h:
2943         (CDATASection):
2944         * dom/Comment.cpp:
2945         (WebCore::Comment::cloneNode):
2946         * dom/Comment.h:
2947         (Comment):
2948         * dom/Document.cpp:
2949         (WebCore::Document::cloneNode):
2950         * dom/Document.h:
2951         (Document):
2952         * dom/DocumentFragment.cpp:
2953         (WebCore::DocumentFragment::cloneNode):
2954         * dom/DocumentFragment.h:
2955         (DocumentFragment):
2956         * dom/DocumentType.cpp:
2957         (WebCore::DocumentType::cloneNode):
2958         * dom/DocumentType.h:
2959         (DocumentType):
2960         * dom/Element.cpp:
2961         (WebCore::Element::cloneNode):
2962         * dom/Element.h:
2963         (Element):
2964         * dom/EntityReference.cpp:
2965         (WebCore::EntityReference::cloneNode):
2966         * dom/EntityReference.h:
2967         (EntityReference):
2968         * dom/Node.h:
2969         (Node):
2970         * dom/Node.idl:
2971         * dom/ProcessingInstruction.cpp:
2972         (WebCore::ProcessingInstruction::cloneNode):
2973         * dom/ProcessingInstruction.h:
2974         (ProcessingInstruction):
2975         * dom/ShadowRoot.cpp:
2976         (WebCore::ShadowRoot::cloneNode):
2977         * dom/ShadowRoot.h:
2978         (ShadowRoot):
2979         * dom/Text.cpp:
2980         (WebCore::Text::cloneNode):
2981         * dom/Text.h:
2982         (Text):
2983
2984 2012-08-30  Adam Barth  <abarth@webkit.org>
2985
2986         Loading a worker script should not be O(n^2)
2987         https://bugs.webkit.org/show_bug.cgi?id=95518
2988
2989         Reviewed by Benjamin Poulain.
2990
2991         Previously, we would malloc a new buffer and memcpy the entire worker
2992         script every time we got another packet of data from the network. This
2993         patch uses StringBuilder to accumulate the buffer more efficiently.
2994
2995         * workers/WorkerScriptLoader.cpp:
2996         (WebCore::WorkerScriptLoader::WorkerScriptLoader):
2997         (WebCore::WorkerScriptLoader::didReceiveData):
2998         (WebCore::WorkerScriptLoader::didFinishLoading):
2999         (WebCore):
3000         (WebCore::WorkerScriptLoader::script):
3001         * workers/WorkerScriptLoader.h:
3002         (WorkerScriptLoader):
3003
3004 2012-08-30  Yoshifumi Inoue  <yosin@chromium.org>
3005
3006         [Forms] Shift+Tab should focus the last field of multiple fields time input UI
3007         https://bugs.webkit.org/show_bug.cgi?id=95168
3008
3009         Reviewed by Kent Tamura.
3010
3011         This patch changes focus handling in DateTimeEditElement class for
3012         multiple fields time input UI.
3013
3014         Current implementation controls focus in fields by DateTimeEditElement
3015         and a focus field is tracked m_focusFieldIndex member variable. In
3016         current implementation, it is hard to set focus to the last field when
3017         it gets focus by Shift+Tab, because we don't know how DateTimeEditElement
3018         gets focus.
3019
3020         In this new implementation, DateTimeEditElement doesn't control focus
3021         rather FocusController class controls focus:
3022          - We set focus to DateTimeFieldElement instead of HTMLInputElement
3023            which is shadow host of DateTimeEditElement for controlling focus
3024            by FocusController.
3025          - Focus/blur events in DateTimeFieldElement are routed to HTMLInputElement
3026            by shadow DOM mechanism.
3027          - TimeInputType class overrides HTMLINputElement::blur() and focus()
3028            functions for delegating blur/focus behavior to DateTimeEditElement
3029            by calling DateTimeEditElement::blurByOwner()/focusByOwner().
3030
3031         This patch affects only ports which enable both ENABLE_INPUT_TYPE_TIME
3032         and ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS.
3033
3034         Tests: fast/forms/time-multiple-fields/time-multiple-fields-blur-and-focus-events.html
3035         This patch also adds a new test case for Shift+Tab into fast/forms/time-multiple-fields/time-multiple-fields-keyboard-events.html.
3036
3037         * html/TimeInputType.cpp:
3038         (WebCore::TimeInputType::DateTimeEditControlOwnerImpl::didFieldBlur): Added for the input element not to be matched "focus" pseudo class for removing focus ring.
3039         (WebCore::TimeInputType::DateTimeEditControlOwnerImpl::didFieldFocus):  Added for the input element to be matched "focus" pseudo class for adding focus ring.
3040         (WebCore::TimeInputType::DateTimeEditControlOwnerImpl::editControlMouseFocus): Removed. DateTimeEditElement no longer set focus to HTMLInputElement.
3041         (WebCore::TimeInputType::DateTimeEditControlOwnerImpl::focusAndSelectEditControlOwner): Removed. In this patch, settting focus to field is handled by DateTimeEditElement. We don't need to call HTMLInputElement::select() which has no effect for "time" input type.
3042         (WebCore::TimeInputType::DateTimeEditControlOwnerImpl::isEditControlOwnerFocused): Revmoed. FocusController manages focus navigation in fields rather than DateTimeEditElement.
3043         (WebCore::TimeInputType::blur): Added for delegating blur() action to DateTimeEditElement.
3044         (WebCore::TimeInputType::focus): Added for delegating focus() action to DateTimeEditElement.
3045         (WebCore::TimeInputType::handleDOMActivateEvent): Removed. HTMLInputElement for "time" input type no longer get focus.
3046         (WebCore::TimeInputType::hasCustomFocusLogic): Added for asking FocusController to walk into shadow DOM tree on input type "time".
3047         (WebCore::TimeInputType::isKeyboardFocusable): Changed for "input" element not to have focus.
3048         (WebCore::TimeInputType::isMouseFocusable):  Changed for "input" element not to have focus.
3049         * html/TimeInputType.h:
3050         (DateTimeEditControlOwnerImpl): Changed for new definition of DateTimeEditControlOwner.
3051         (TimeInputType): Changed for new definition of DateTimeEditElement.
3052         * html/shadow/DateTimeEditElement.cpp:
3053         (WebCore::DateTimeEditElement::DateTimeEditElement): Removed dropped member variable m_focusFieldIndex.
3054         (WebCore::DateTimeEditElement::blurByOwner): Added for blur() action asekd by owner.
3055         (WebCore::DateTimeEditElement::didBlurFromField): Added for calling DateTimeEditControlOwner::didBlurFromControl().
3056         (WebCore::DateTimeEditElement::didFocusOnField): Added for calling DateTimeEditControlOwner::didFocusOnControl().
3057         (WebCore::DateTimeEditElement::fieldIndexOf): Added for mapping DateTimeFieldElement to field index.
3058         (WebCore::DateTimeEditElement::focusByOwner): Added for focus() action asekd by owner.
3059         (WebCore::DateTimeEditElement::focusFieldAt):  Removed.
3060         (WebCore::DateTimeEditElement::focusedFieldIndex): Added as helper function.
3061         (WebCore::DateTimeEditElement::focusedField): Added.
3062         (WebCore::DateTimeEditElement::focusOnNextField): Changed to pass a field to focusOnNext().
3063         (WebCore::DateTimeEditElement::focusOnPreviousField): ditto.
3064         (WebCore::DateTimeEditElement::focusAndSelectSpinButtonOwner): Changed for setting focus to the first field.
3065         (WebCore::DateTimeEditElement::handleKeyboardEvent): Removed. Moved handling of Left/Right keys to DateTimeFieldElement. Removed Tab-key handling.
3066         (WebCore::DateTimeEditElement::handleMouseEvent): Removed. DateTimeEdit doesn't handle mouse click since this patch.
3067         (WebCore::DateTimeEditElement::layout): Changed to use focusFieldIndex() and DateTimeFieldElement::focus().
3068         (WebCore::DateTimeEditElement::nextFieldIndex): Removed. focusOnNextField does samething and sets focus.
3069         (WebCore::DateTimeEditElement::previousFieldIndex): Removed. focusOnPreviousField does samething and sets focus.
3070         (WebCore::DateTimeEditElement::resetLayout): Changed to remove m_focusFieldIndex variable reference.
3071         (WebCore::DateTimeEditElement::defaultEventHandler): Changed to remove focus navigation related events, blue/focus/mouse, handling.
3072         (WebCore::DateTimeEditElement::shouldSpinButtonRespondToWheelEvents): Changed to check focus field instead of asking owner.
3073         (WebCore::DateTimeEditElement::spinButtonStepDown): Changed to use focusField() instead of m_focusFieldIndex.
3074         (WebCore::DateTimeEditElement::spinButtonStepUp): ditto.
3075         (WebCore::DateTimeEditElement::updateUIState): ditto.
3076         * html/shadow/DateTimeEditElement.h:
3077         (EditControlOwner): Added didBlurFromField() and didFocusOnField() function declarations. Removed focusAndSelectEditControlOwner, it was used for set focus to HTMLInputElement, and isEditControlOwnerFocused.
3078         (DateTimeEditElement):
3079         * html/shadow/DateTimeFieldElement.cpp:
3080         (WebCore::DateTimeFieldElement::defaultEventHandler): Changed to handle blur and focus events.
3081         (WebCore::DateTimeFieldElement::defaultKeyboardEventHandler): Changed to handle Left/Right keys.
3082         (WebCore::DateTimeFieldElement::didBlur): Added to call FieldOwner::didBlurFromField() to remove focus ring from owner element.
3083         (WebCore::DateTimeFieldElement::didFocus): Added to call FieldOwner::didFocusOnField()  to add focus ring to owner element.
3084         (WebCore::DateTimeFieldElement::focusOnNextField): Added for moving focus to next field for DateTimeNumbericFieldElment
3085         (WebCore::DateTimeFieldElement::isFocusable): Added to make DateTimeFieldElement focusable.
3086         (WebCore::DateTimeFieldElement::supportsFocus):  Added to make DateTimeFieldElement focusable.
3087         * html/shadow/DateTimeFieldElement.h:
3088         (FieldOwner): Added declarations for focusable handling.
3089         (DateTimeFieldElement): ditto.
3090
3091 2012-08-30  James Robinson  <jamesr@chromium.org>
3092
3093         [chromium] Revert WebCompositorSupport to raw ptrs, make dtor protected
3094         https://bugs.webkit.org/show_bug.cgi?id=95520
3095
3096         Reviewed by Darin Fisher.
3097
3098         Adopt the return value of WebCompositorSupport explicitly.
3099
3100         * platform/graphics/chromium/AnimationTranslationUtil.cpp:
3101         (WebCore::createWebAnimation):
3102         * platform/graphics/chromium/Canvas2DLayerBridge.cpp:
3103         (WebCore::Canvas2DLayerBridge::Canvas2DLayerBridge):
3104         * platform/graphics/chromium/DrawingBufferChromium.cpp:
3105         (WebCore::DrawingBufferPrivate::DrawingBufferPrivate):
3106         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
3107         (WebCore::GraphicsLayerChromium::GraphicsLayerChromium):
3108         (WebCore::GraphicsLayerChromium::setContentsToImage):
3109         (WebCore::GraphicsLayerChromium::updateLayerPreserves3D):
3110
3111 2012-08-30  Adam Barth  <abarth@webkit.org>
3112
3113         Replace more instances of += with StringBuilder
3114         https://bugs.webkit.org/show_bug.cgi?id=95502
3115
3116         Reviewed by Darin Adler.
3117
3118         This patch removes many uses of WTF::String::operator+= in WebCore.
3119         Many of these uses are inefficient because they cause us to allocate
3120         and memcpy strings more times than necessary. In most cases, I've
3121         replaced these inefficient patterns with StringBuilder.
3122
3123         This patch makes progress towards removing WTF::String::operator+= from
3124         the project.
3125
3126         We can make cssText() more efficient by passing a single StringBuilder
3127         instance along to the recursive calls, but I've left that for a later
3128         patch.
3129
3130         * css/CSSBorderImageSliceValue.cpp:
3131         (WebCore::CSSBorderImageSliceValue::customCssText):
3132         * css/CSSFontFaceSrcValue.cpp:
3133         (WebCore::CSSFontFaceSrcValue::customCssText):
3134         * css/CSSFunctionValue.cpp:
3135         (WebCore::CSSFunctionValue::customCssText):
3136         * css/CSSGradientValue.cpp:
3137         (WebCore::CSSLinearGradientValue::customCssText):
3138         (WebCore::CSSRadialGradientValue::customCssText):
3139         * css/CSSParser.cpp:
3140         (WebCore::CSSParser::createKeyframe):
3141         * css/CSSPrimitiveValue.cpp:
3142         (WebCore::CSSPrimitiveValue::customCssText):
3143         * css/CSSReflectValue.cpp:
3144         (WebCore::CSSReflectValue::customCssText):
3145         * css/CSSTimingFunctionValue.cpp:
3146         (WebCore::CSSCubicBezierTimingFunctionValue::customCssText):
3147         (WebCore::CSSStepsTimingFunctionValue::customCssText):
3148         * css/StylePropertySet.cpp:
3149         (WebCore::StylePropertySet::get4Values):
3150         (WebCore::StylePropertySet::getLayeredShorthandValue):
3151         (WebCore::StylePropertySet::getShorthandValue):
3152         * fileapi/BlobURL.cpp:
3153         (WebCore::BlobURL::createBlobURL):
3154         * inspector/InspectorCSSAgent.cpp:
3155         (WebCore::InspectorCSSAgent::SetPropertyTextAction::redo):
3156         * inspector/InspectorClient.cpp:
3157         (WebCore::InspectorClient::doDispatchMessageOnFrontendPage):
3158         * inspector/InspectorConsoleAgent.cpp:
3159         (WebCore::InspectorConsoleAgent::didFailLoading):
3160         * inspector/InspectorFileSystemAgent.cpp:
3161         (WebCore):
3162         * inspector/InspectorPageAgent.cpp:
3163         (WebCore::InspectorPageAgent::cachedResourceContent):
3164         (WebCore::InspectorPageAgent::getCookies):
3165         * inspector/InspectorStyleSheet.cpp:
3166         (WebCore::InspectorStyleSheet::addRule):
3167
3168 2012-08-30  Luke Macpherson   <macpherson@chromium.org>
3169
3170         Make it possible to use CSS Variables inside Calc expressions.
3171         https://bugs.webkit.org/show_bug.cgi?id=95284
3172
3173         Reviewed by Tony Chang.
3174
3175         Allows calc expressions to contain unevaluated variables, which are then resolved in StyleResolver.cpp when building the RenderStyle tree.
3176
3177         Tests:
3178         fast/css/variables/calc.html
3179
3180         * css/CSSCalculationValue.cpp:
3181         (WebCore::unitCategory):
3182         (WebCore):
3183         (WebCore::CSSCalcValue::customSerializeResolvingVariables):
3184         Generates a CSS expression with variables resolved into their corresponding values.
3185         (WebCore::CSSCalcValue::hasVariableReference):
3186         Returns true if the calculation's expression tree refers to a variable (that needs to be resolved).
3187         (CSSCalcPrimitiveValue):
3188         (WebCore::CSSCalcPrimitiveValue::serializeResolvingVariables):
3189         Resolves the variable using the underlying CSSPrimitiveValue's serializeResolvingVariables function.
3190         (WebCore::CSSCalcPrimitiveValue::hasVariableReference):
3191         (WebCore::CSSCalcPrimitiveValue::toCalcValue):
3192         (WebCore::CSSCalcPrimitiveValue::doubleValue):
3193         (WebCore::CSSCalcPrimitiveValue::computeLengthPx):
3194         (WebCore::CSSCalcBinaryOperation::create):
3195         (CSSCalcBinaryOperation):
3196         (WebCore::CSSCalcBinaryOperation::serializeResolvingVariables):
3197         Builds a CSS expression for contained subtrees.
3198         (WebCore::CSSCalcBinaryOperation::hasVariableReference):
3199         Returns true if either subtree contains a variable.
3200         * css/CSSCalculationValue.h:
3201         (CSSCalcExpressionNode):
3202         (CSSCalcValue):
3203         * css/CSSGrammar.y:
3204         * css/CSSParser.cpp:
3205         (WebCore::CSSParser::validCalculationUnit):
3206         * css/CSSPrimitiveValue.cpp:
3207         (WebCore::CSSPrimitiveValue::primitiveType):
3208         (WebCore::CSSPrimitiveValue::customSerializeResolvingVariables):
3209         * css/StyleResolver.cpp:
3210         (WebCore::StyleResolver::collectMatchingRulesForList):
3211
3212 2012-08-30  Max Vujovic  <mvujovic@adobe.com>
3213
3214         [CSS Shaders] Implement normal blend mode and source-atop compositing mode
3215         https://bugs.webkit.org/show_bug.cgi?id=93869
3216
3217         Reviewed by Dean Jackson.
3218
3219         Instead of allowing direct texture access in an author's shader via u_texture, CSS
3220         Shaders blends special symbols in the author's shader (css_MixColor and
3221         css_ColorMatrix) with the DOM element texture.
3222
3223         The author specifies the blend mode and composite operator via the CSS mix
3224         function like this:
3225         -webkit-filter: custom(none mix(shader.fs normal source-atop));
3226
3227         This patch implements the normal blend mode and the source-atop composite
3228         operator. The other blend modes and composite operators will come in later
3229         patches.
3230
3231         This patch introduces a new class, CustomFilterValidatedProgram, which validates
3232         the shader using ANGLE. If the shader uses blending and compositing,
3233         CustomFilterValidatedProgram uses ANGLE's SH_CSS_SHADERS_SPEC flag. This allows
3234         the author's shader to compile successfully with special symbols like
3235         "css_MixColor". ANGLE also reserves the "css_" prefix. If the shader doesn't use
3236         blending and compositing, CustomFilterValidatedProgram validates the shader using
3237         ANGLE's SH_WEBGL_SPEC flag.
3238
3239         After validation, CustomFilterValidatedProgram adds blending, compositing, and
3240         texture access shader code to the author's original shaders. The definitions for
3241         css_MixColor and css_ColorMatrix are added before the author's fragment shader
3242         code so that the author code can access them. The blending, compositing, and
3243         texture access code is added after the author code and is thus inaccessible to the
3244         author code. Since ANGLE reserves the "css_" prefix during the validation phase,
3245         no collisions are possible between the author's code and the code that WebKit adds.
3246
3247         The CustomFilterGlobalContext now caches CustomFilterValidatedProgram instead
3248         of CustomFilterCompiledProgram. CustomFilterValidatedProgram owns a
3249         CustomFilterCompiledProgram. This way, we can use the platform-independent
3250         CustomFilterValidatedProgram to validate and rewrite the shaders, regardless of
3251         the platform representation of the program (e.g. CustomFilterCompiledProgram).
3252
3253         Tests: css3/filters/custom/custom-filter-color-matrix.html
3254                css3/filters/custom/custom-filter-composite-source-atop.html
3255
3256         * GNUmakefile.list.am:
3257         * Target.pri:
3258         * WebCore.gyp/WebCore.gyp:
3259         * WebCore.gypi:
3260         * WebCore.vcproj/WebCore.vcproj:
3261         * WebCore.xcodeproj/project.pbxproj:
3262         * platform/graphics/ANGLEWebKitBridge.cpp:
3263         (WebCore::ANGLEWebKitBridge::ANGLEWebKitBridge):
3264             Add a shader spec parameter, since sometimes we want to validate the shader
3265             against the CSS Shaders spec and other times we want to validate the shader
3266             against the WebGL spec. Note that the CSS Shaders spec is treated as a subset
3267             of the WebGL spec in ANGLE.
3268         (WebCore::ANGLEWebKitBridge::validateShaderSource):
3269         * platform/graphics/ANGLEWebKitBridge.h:
3270         (ANGLEWebKitBridge):
3271         * platform/graphics/filters/CustomFilterCompiledProgram.cpp:
3272         (WebCore::CustomFilterCompiledProgram::CustomFilterCompiledProgram):
3273         (WebCore::CustomFilterCompiledProgram::compileShader):
3274         (WebCore::CustomFilterCompiledProgram::initializeParameterLocations):
3275         (WebCore::CustomFilterCompiledProgram::~CustomFilterCompiledProgram):
3276         * platform/graphics/filters/CustomFilterCompiledProgram.h:
3277         (WebCore):
3278         * platform/graphics/filters/CustomFilterGlobalContext.cpp:
3279         (WebCore::CustomFilterGlobalContext::~CustomFilterGlobalContext):
3280         (WebCore::CustomFilterGlobalContext::webglShaderValidator):
3281         (WebCore):
3282         (WebCore::CustomFilterGlobalContext::mixShaderValidator):
3283         (WebCore::CustomFilterGlobalContext::createShaderValidator):
3284         (WebCore::CustomFilterGlobalContext::getValidatedProgram):
3285         (WebCore::CustomFilterGlobalContext::removeValidatedProgram):
3286         * platform/graphics/filters/CustomFilterGlobalContext.h:
3287         (WebCore):
3288         (CustomFilterGlobalContext):
3289         * platform/graphics/filters/CustomFilterProgramInfo.h:
3290         (WebCore::CustomFilterProgramInfo::mixSettings):
3291         * platform/graphics/filters/CustomFilterValidatedProgram.cpp: Added.
3292         (WebCore):
3293         (WebCore::CustomFilterValidatedProgram::defaultVertexShaderString):
3294         (WebCore::CustomFilterValidatedProgram::defaultFragmentShaderString):
3295         (WebCore::CustomFilterValidatedProgram::CustomFilterValidatedProgram):
3296         (WebCore::CustomFilterValidatedProgram::compiledProgram):
3297         (WebCore::CustomFilterValidatedProgram::rewriteMixVertexShader):
3298         (WebCore::CustomFilterValidatedProgram::rewriteMixFragmentShader):
3299         (WebCore::CustomFilterValidatedProgram::blendFunctionString):
3300         (WebCore::CustomFilterValidatedProgram::compositeFunctionString):
3301         (WebCore::CustomFilterValidatedProgram::~CustomFilterValidatedProgram):
3302         * platform/graphics/filters/CustomFilterValidatedProgram.h: Added.
3303         (WebCore):
3304         (CustomFilterValidatedProgram):
3305         (WebCore::CustomFilterValidatedProgram::create):
3306         (WebCore::CustomFilterValidatedProgram::programInfo):
3307         (WebCore::CustomFilterValidatedProgram::isInitialized):
3308         (WebCore::CustomFilterValidatedProgram::detachFromGlobalContext):
3309         * platform/graphics/filters/FECustomFilter.cpp:
3310         (WebCore::FECustomFilter::FECustomFilter):
3311             Accept a CustomFilterValidatedProgram instead of CustomFilterProgram.
3312         (WebCore::FECustomFilter::create):
3313         (WebCore::FECustomFilter::initializeContext):
3314         (WebCore::FECustomFilter::bindVertexAttribute):
3315         (WebCore::FECustomFilter::bindProgramAndBuffers):
3316         * platform/graphics/filters/FECustomFilter.h:
3317         (WebCore):
3318         (FECustomFilter):
3319         * rendering/FilterEffectRenderer.cpp:
3320         (WebCore):
3321         (WebCore::createCustomFilterEffect):
3322         (WebCore::FilterEffectRenderer::build):
3323             Only create an FECustomFilter if the program validates.
3324         * rendering/FilterEffectRenderer.h:
3325         (WebCore):
3326         (FilterEffectRenderer):
3327
3328 2012-08-30  Julien Chaffraix  <jchaffraix@webkit.org>
3329
3330         Crash in RenderTable::calcBorderEnd
3331         https://bugs.webkit.org/show_bug.cgi?id=95487
3332
3333         Reviewed by Abhishek Arya.
3334
3335         r126590 opened the window for a race condition in RenderObjectChildList::removeChildNode.
3336         This is caused because willBeRemovedFromTree should be strictly following by the actual removal
3337         and wasn't.
3338
3339         This race condition was caused by clearSelection() being called just after willBeRemovedFromTree,
3340         which forced a section's cells recalc and would re-add the soon-to-be-removed child, causing the
3341         crash.
3342
3343         Test: fast/table/crash-clearSelection-collapsed-borders.html
3344
3345         * rendering/RenderObjectChildList.cpp:
3346         (WebCore::RenderObjectChildList::removeChildNode):
3347         Moved the clearSeletion call before willBeRemovedFromTree. Added a warning about running code
3348         after willBeRemovedFromTree and before removing the child from the tree.
3349
3350 2012-08-30  Geoffrey Garen  <ggaren@apple.com>
3351
3352         Use one object instead of two for closures, eliminating ScopeChainNode
3353         https://bugs.webkit.org/show_bug.cgi?id=95501
3354
3355         Reviewed by Filip Pizlo.
3356
3357         Mechanical changes to update for JSC interface changes.
3358
3359 2012-08-30  Pratik Solanki  <psolanki@apple.com>
3360
3361         objc_msgSend and IMP should be cast appropriately before using
3362         https://bugs.webkit.org/show_bug.cgi?id=95242
3363
3364         Reviewed by Benjamin Poulain.
3365
3366         Use wtfObjcMsgSend and wtfCallIMP templates which do appropriate casts
3367         to a function pointer with right types when calling objc_msgSend and an
3368         IMP method directly.
3369
3370         No new tests because no functional changes.
3371
3372         * page/mac/EventHandlerMac.mm:
3373         (WebCore::selfRetainingNSScrollViewScrollWheel):
3374         * platform/mac/WebCoreObjCExtras.mm:
3375         (deallocCallback):
3376
3377 2012-08-30  Benjamin Poulain  <bpoulain@apple.com>
3378
3379         Replace JSC::UString by WTF::String
3380         https://bugs.webkit.org/show_bug.cgi?id=95271
3381
3382         Reviewed by Geoffrey Garen.
3383
3384         Update the code to use String instead of UString.
3385
3386         On x86_64, this reduces the binary size by 22kb.
3387
3388         Since it is no longer possible to differenciate JSC::jsString() and WebCore::jsString() by the input
3389         types, WebCore::jsString() is renated to WebCore::jsStringWithCache().
3390
3391         Since the cache is using a PtrHash, JSC::jsString() is used in place of the old WebCore::jsString() when
3392         the string is generated locally. This is because the cache can never match in those cases.
3393
3394 2012-08-30  Rob Buis  <rbuis@rim.com>
3395
3396         [CMake] Suppress ANGLE compilation warnings
3397         https://bugs.webkit.org/show_bug.cgi?id=95377
3398
3399         Reviewed by Antonio Gomes.
3400
3401         Compile ANGLE sources in a static library, and make sure the compile flags suppress warnings.
3402
3403         * CMakeLists.txt:
3404
3405 2012-08-30  Victor Carbune  <victor@rosedu.org>
3406
3407         [Chromium] Layout Test media/track/track-cue-rendering-snap-to-lines-not-set.html is flaky
3408         https://bugs.webkit.org/show_bug.cgi?id=89167
3409
3410         Reviewed by Eric Carlson.
3411
3412         Fix for rendering tracks when snap-to-lines not set.
3413
3414         No new tests. Removed from TestExpectations existing test.
3415
3416         * html/track/TextTrackCue.cpp:
3417         (WebCore::TextTrackCue::TextTrackCue):
3418         (WebCore::TextTrackCue::calculateDisplayParameters): Updated the place
3419         where m_computedLinePosition is determined.
3420
3421 2012-08-27  James Robinson  <jamesr@chromium.org>
3422
3423         [chromium] Add CompositorSupport interface for constructing compositor classes
3424         https://bugs.webkit.org/show_bug.cgi?id=95040
3425
3426         Reviewed by Darin Fisher.
3427
3428         Uses WebCompositorSupport interfaces where appropriate to construct compositor types.
3429
3430         * platform/graphics/chromium/AnimationTranslationUtil.cpp:
3431         (WebCore::createWebAnimation):
3432         * platform/graphics/chromium/Canvas2DLayerBridge.cpp:
3433         (WebCore::Canvas2DLayerBridge::Canvas2DLayerBridge):
3434         * platform/graphics/chromium/DrawingBufferChromium.cpp:
3435         (WebCore::DrawingBufferPrivate::DrawingBufferPrivate):
3436         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
3437         (WebCore::GraphicsLayerChromium::GraphicsLayerChromium):
3438         (WebCore::GraphicsLayerChromium::setContentsToImage):
3439         (WebCore::GraphicsLayerChromium::setContentsTo):
3440         (WebCore::GraphicsLayerChromium::addAnimation):
3441         (WebCore::GraphicsLayerChromium::updateLayerPreserves3D):
3442
3443 2012-08-30  Dan Bernstein  <mitz@apple.com>
3444
3445         [CG] ImageCG.cpp contains a mix of Image and BitmapImage functions
3446         https://bugs.webkit.org/show_bug.cgi?id=95470
3447
3448         Reviewed by Darin Adler.
3449
3450         * WebCore.gypi: Added BitmapImageCG.cpp.
3451         * WebCore.vcproj/WebCore.vcproj: Ditto.
3452         * WebCore.xcodeproj/project.pbxproj: Ditto.
3453         * platform/graphics/cg/BitmapImageCG.cpp: Copied from Source/WebCore/platform/graphics/cg/ImageCG.cpp
3454         then deleted Image function implementations.
3455         * platform/graphics/cg/ImageCG.cpp: Deleted BitmapImage and FrameData function implementations.
3456
3457 2012-08-30  Victor Carbune  <victor@rosedu.org>
3458
3459         [Chromium] The CC button is not painted
3460         https://bugs.webkit.org/show_bug.cgi?id=95395
3461
3462         Reviewed by Eric Carlson.
3463
3464         The actual Chromium resource for the CC button was not used by the Chromium theme.
3465
3466         Existing track rendering tests will be rebaselined and contain the new CC button.
3467
3468         * rendering/RenderMediaControlsChromium.cpp:
3469         (WebCore::paintMediaClosedCaptionsButton): Added for proper painting of the resource.
3470         (WebCore):
3471         (WebCore::RenderMediaControlsChromium::paintMediaControlsPart):
3472         Changed to call paintMediaClosedCaptionsButton when the control is the CC button.
3473         * rendering/RenderThemeChromiumSkia.cpp:
3474         (WebCore::RenderThemeChromiumSkia::paintMediaToggleClosedCaptionsButton):
3475         Implemented proper behaviour.
3476         (WebCore):
3477         * rendering/RenderThemeChromiumSkia.h:
3478         (RenderThemeChromiumSkia):
3479
3480 2012-08-30  Tommy Widenflycht  <tommyw@google.com>
3481
3482         MediaStream API: Introduce MediaConstraints
3483         https://bugs.webkit.org/show_bug.cgi?id=95198
3484
3485         Reviewed by Adam Barth.
3486
3487         This introduces MediaConstraints together with relevant infrastructure, a chromium mock and LayoutTests.
3488
3489         Patch covered by expanded existing tests.
3490
3491         * CMakeLists.txt:
3492         * GNUmakefile.list.am:
3493         * Modules/mediastream/MediaConstraintsImpl.cpp: Added.
3494         (WebCore):
3495         (WebCore::MediaConstraintsImpl::create):
3496         (WebCore::MediaConstraintsImpl::initialize):
3497         (WebCore::MediaConstraintsImpl::~MediaConstraintsImpl):
3498         (WebCore::MediaConstraintsImpl::getMandatoryConstraintNames):
3499         (WebCore::MediaConstraintsImpl::getOptionalConstraintNames):
3500         (WebCore::MediaConstraintsImpl::getMandatoryConstraintValue):
3501         (WebCore::MediaConstraintsImpl::getOptionalConstraintValue):