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