fast/forms/range/input-appearance-range-rtl.html off by one pixel
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-10-17  Tony Chang  <tony@chromium.org>
2
3         fast/forms/range/input-appearance-range-rtl.html off by one pixel
4         https://bugs.webkit.org/show_bug.cgi?id=99625
5
6         Reviewed by Ojan Vafai.
7
8         Previously, we would assume that a vertical slider in RTL would render identically to
9         a vertical slider in LTR. Due to differing thumb sizes, there is an off by one.
10
11         This worked in deprecated flexbox because it doesn't adjust for RTL when applying
12         box-align: center.
13
14         Tests: fast/forms/range/input-appearance-range-rtl.html
15
16         * html/shadow/SliderThumbElement.cpp:
17         (WebCore::RenderSliderContainer::layout): Force LTR for flexbox layout when vertical. We have to restore the old value
18         just in case the user switches from vertical to horizontal.
19
20 2012-10-17  Michael Saboff  <msaboff@apple.com>
21
22         Creating a String from an NSString should check for all 8 bit strings
23         https://bugs.webkit.org/show_bug.cgi?id=99392
24
25         Reviewed by Geoffrey Garen.
26
27         Use CFStringGetBytes() to try to get Latin1 data to create an 8 bit string.
28
29         No functional change, change covered by existing tests.
30
31         * platform/text/mac/StringMac.mm:
32         (WTF::String::String):
33
34 2012-10-17  Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
35
36         [EFL] Remove redundant OpenGL library addition from the build system.
37         https://bugs.webkit.org/show_bug.cgi?id=99629
38
39         Reviewed by Rob Buis.
40
41         * PlatformEfl.cmake: Do not add OPENGL_gl_LIBRARY to
42         WebCore_LIBRARIES, this is already done in CMakeLists.txt these
43         days.
44
45 2012-10-17  Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
46
47         [CMake] Set WebCore_LIBRARIES earlier.
48         https://bugs.webkit.org/show_bug.cgi?id=99630
49
50         Reviewed by Rob Buis.
51
52         * CMakeLists.txt: Follow the style we use in other CMakeList.txt
53         files and set the Foo_LIBRARIES variables before we start checking
54         for optional features, as they might append other libraries to the
55         list (it already happens with WTF_USE_3D_GRAPHICS, for example).
56
57 2012-10-17  Philip Rogers  <pdr@google.com>
58
59         Allow lazy initialization of SVG XML animated properties.
60         https://bugs.webkit.org/show_bug.cgi?id=84657
61
62         Reviewed by Tim Horton.
63
64         When animating a property in the shadow tree, instance properties and tearoffs are created
65         but they simply reference the animated element's animating properties.
66
67         When starting an animation for the first time (see SVGAnimateElement::resetAnimatedType),
68         we initialize the root property and instance properties using startAnimValAnimation(...).
69         If an instance property is added while the root property is animating, this initialization
70         will not occur and we crash.
71
72         This patch updates the resetAnimValToBaseVal codepath to start (and initialize) an animated
73         property if it is not already animating. After this patch, instance properties can be added
74         in the middle of animation and they will be properly started/initialized.
75
76         Test: svg/animations/use-while-animating-crash.html
77
78         * svg/SVGAnimatedTypeAnimator.h:
79         (WebCore::SVGAnimatedTypeAnimator::resetFromBaseValue):
80         (WebCore::SVGAnimatedTypeAnimator::resetFromBaseValues):
81         (WebCore::SVGAnimatedTypeAnimator::executeAction):
82
83 2012-10-17  Dan Carney  <dcarney@google.com>
84
85         Bind isolatedWorldSecurityOrigin to world
86         https://bugs.webkit.org/show_bug.cgi?id=99582
87
88         Reviewed by Adam Barth.
89
90         Security origin of isolated worlds was not previously set at the world
91         level, although it could have been. 
92
93         No new tests. No change in functionality.
94
95         * bindings/v8/DOMWrapperWorld.cpp:
96         (WebCore::DOMWrapperWorld::deallocate):
97         (WebCore):
98         (WebCore::isolatedWorldSecurityOrigins):
99         (WebCore::DOMWrapperWorld::isolatedWorldSecurityOrigin):
100         (WebCore::DOMWrapperWorld::setIsolatedWorldSecurityOrigin):
101         (WebCore::DOMWrapperWorld::clearIsolatedWorldSecurityOrigin):
102         * bindings/v8/DOMWrapperWorld.h:
103         (DOMWrapperWorld):
104         (WebCore::DOMWrapperWorld::isIsolatedWorldId):
105         (WebCore::DOMWrapperWorld::isIsolatedWorld):
106         * bindings/v8/ScriptController.cpp:
107         (WebCore::ScriptController::resetIsolatedWorlds):
108         (WebCore::ScriptController::evaluateInIsolatedWorld):
109         (WebCore::ScriptController::collectIsolatedContexts):
110         * bindings/v8/ScriptController.h:
111         (ScriptController):
112         (WebCore::ScriptController::setIsolatedWorldSecurityOrigin):
113         * bindings/v8/V8DOMWindowShell.cpp:
114         (WebCore::V8DOMWindowShell::initializeIfNeeded):
115         * bindings/v8/V8DOMWindowShell.h:
116         (V8DOMWindowShell):
117         * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
118         (WebCore::V8XMLHttpRequest::constructorCallback):
119
120 2012-10-17  Simon Fraser  <simon.fraser@apple.com>
121
122         GraphicsLayer visible rect computation needs to use the current animating transform
123         https://bugs.webkit.org/show_bug.cgi?id=99529
124
125         Reviewed by Dean Jackson.
126
127         If we're running an accelerated animation of transform
128         on a GraphicsLayerCA, the current value of the transform won't
129         be reflected in the GraphicsLayer's m_transform. However,
130         we need the current value of the transform in order to correctly
131         compute the visible rect of this layer and descendants.
132         
133         Add a function to GraphicsLayerClient to retrieve the current
134         value of the transform from the client.
135         
136         RenderLayer's currentTransform() used to return a transform
137         with transform-origin baked in; GraphicsLayerClient needs one
138         that excludes transform-origin, so enhance RenderLayer::currentTransform()
139         to be able to produce either.
140
141         Tests: compositing/visible-rect/animated-from-none.html
142                compositing/visible-rect/animated.html
143
144         * platform/graphics/GraphicsLayerClient.h:
145         (WebCore):
146         (GraphicsLayerClient):
147         (WebCore::GraphicsLayerClient::getCurrentTransform):
148         * platform/graphics/ca/GraphicsLayerCA.cpp:
149         (WebCore::GraphicsLayerCA::computeVisibleRect):
150         * rendering/RenderLayer.cpp:
151         (WebCore::RenderLayer::currentTransform):
152         * rendering/RenderLayer.h:
153         * rendering/RenderLayerBacking.cpp:
154         (WebCore::RenderLayerBacking::currentTransform):
155         * rendering/RenderLayerBacking.h:
156         (RenderLayerBacking):
157
158 2012-10-17  Sadrul Habib Chowdhury  <sadrul@chromium.org>
159
160         plugins: Allow a plugin to dictate whether it can receive drag events or not.
161         https://bugs.webkit.org/show_bug.cgi?id=99355
162
163         Reviewed by Tony Chang.
164
165         When doing a drag over a plugin, ask the plugin whether it can accept
166         drag/drop to decide whether drag/drop is possible or not. At present,
167         plugins do not receive drag events through WebCore (i.e. various
168         implementations of PluginView::handleMouseEvent ignores the
169         drop-events). This change makes it possible for the ports to ask the
170         plugin first to decide whether it can (or wants to) accept drag events.
171         The default implementation remains the same, i.e. plugins do not receive
172         drag events. For chromium, the overridden implementation uses the
173         WebPlugin interface to check whether the plugin can accept drag events.
174
175         * html/HTMLPlugInElement.cpp:
176         (WebCore::HTMLPlugInElement::canProcessDrag):
177         (WebCore):
178         * html/HTMLPlugInElement.h:
179         (WebCore):
180         (HTMLPlugInElement):
181         * page/DragController.cpp:
182         (WebCore::DragController::canProcessDrag):
183         * plugins/PluginViewBase.h:
184         (WebCore):
185         (WebCore::PluginViewBase::canProcessDrag):
186
187 2012-10-17  Andreas Kling  <kling@webkit.org>
188
189         Shrink EventTargetData by making firingEventListeners vector optional.
190         <http://webkit.org/b/99532>
191         <rdar://problem/12515099>
192
193         Reviewed by Anders Carlsson.
194
195         The majority of event listeners never actually fire, and EventTargetData::firingEventListeners
196         is just sitting there taking up space. Make it an OwnPtr instead, shrinking EventTargetData
197         by 48 bytes and progressing Membuster3 by 395kB.
198
199         * dom/EventTarget.cpp:
200         (WebCore::EventTarget::removeEventListener):
201         (WebCore::EventTarget::fireEventListeners):
202         (WebCore::EventTarget::removeAllEventListeners):
203         * dom/EventTarget.h:
204         (WebCore::EventTarget::isFiringEventListeners):
205
206 2012-10-17  Christophe Dumez  <christophe.dumez@intel.com>
207
208         xss-DENIED-xsl-document-securityOrigin.xml crashes with icon assertion
209         https://bugs.webkit.org/show_bug.cgi?id=99571
210
211         Reviewed by Kenneth Rohde Christiansen.
212
213         Check that the iconURL is not empty in IconController::continueLoadWithDecision()
214         to avoid hitting assertions later when trying to commit this empty URL to the
215         database. IconController::url() may indeed return an empty URL but there was
216         no check for it.
217
218         No new tests, already covered by http/tests/security/xss-DENIED-xsl-document-securityOrigin.xml.
219
220         * loader/icon/IconController.cpp:
221         (WebCore::IconController::continueLoadWithDecision):
222
223 2012-10-17  Byungwoo Lee  <bw80.lee@samsung.com>
224
225         Fix build warnings : -Wunused-parameter, -Wunused-variable
226         https://bugs.webkit.org/show_bug.cgi?id=99539
227
228         Reviewed by Kentaro Hara.
229
230         Fix build warnings about unused parameter or unused variable when
231         WTF_USE_TILED_BACKING_STORE option is enabled.
232
233         * html/shadow/HTMLContentElement.cpp:
234         (WebCore::contentTagName):
235         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
236         (WebCore::GraphicsContext3D::getImageData):
237         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
238         (WebCore::GraphicsContext3DPrivate::createSurface):
239         (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
240         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
241         (WebCore::Extensions3DOpenGL::bindVertexArrayOES):
242         * platform/graphics/texmap/TextureMapper.h:
243         (WebCore::BitmapTexture::canReuseWith):
244         (WebCore::TextureMapper::beginPainting):
245         * platform/graphics/texmap/TextureMapperGL.cpp:
246         (WebCore::TextureMapperGL::drawRepaintCounter):
247         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
248         (WebCore::BitmapTextureImageBuffer::updateContents):
249         * platform/graphics/texmap/TextureMapperImageBuffer.h:
250         * platform/graphics/texmap/TextureMapperLayer.cpp:
251         (WebCore::TextureMapperLayer::sortByZOrder):
252         (WebCore::TextureMapperLayer::flushCompositingStateSelf):
253         * rendering/RenderLayerCompositor.cpp:
254         (WebCore::RenderLayerCompositor::allowsIndependentlyCompositedFrames):
255
256 2012-10-17  Shinya Kawanaka  <shinyak@chromium.org>
257
258         Dynamically added elements do not get re-projected.
259         https://bugs.webkit.org/show_bug.cgi?id=99227
260
261         Reviewed by Dimitri Glazkov.
262
263         When distribution happens, we have to invalidate its host shadow's distribution, since the children of the host
264         is changed.
265
266         Test: fast/dom/shadow/content-reprojection-dynamic.html
267
268         * html/shadow/ContentDistributor.cpp:
269         (WebCore::ContentDistributor::distribute):
270
271 2012-10-17  Yury Semikhatsky  <yurys@chromium.org>
272
273         Web Inspector: no "delete watch expression" context menu item when clicking on the expression value
274         https://bugs.webkit.org/show_bug.cgi?id=99602
275
276         Reviewed by Pavel Feldman.
277
278         Add delete items to the watch expression's value's context menu.
279
280         * inspector/front-end/ObjectPropertiesSection.js:
281         (WebInspector.ObjectPropertyTreeElement.prototype._contextMenuFired):
282         (WebInspector.ObjectPropertyTreeElement.prototype.populateContextMenu):
283         * inspector/front-end/WatchExpressionsSidebarPane.js:
284         (WebInspector.WatchExpressionTreeElement.prototype.populateContextMenu):
285         (WebInspector.WatchExpressionTreeElement.prototype._contextMenu):
286
287 2012-10-17  Vsevolod Vlasov  <vsevik@chromium.org>
288
289         Web Inspector: [Regression] Undoing script changes does not restore breakpoints.
290         https://bugs.webkit.org/show_bug.cgi?id=99598
291
292         Reviewed by Pavel Feldman.
293
294         workingCopyChanged now dispatches did/willMergeToVM instead of did/willDivergeFromVM
295         when change returns uiSourceCode to non dirty state.
296         Added wasDirty parameter to workingCopyChanged event.
297
298         Test: inspector/debugger/live-edit-breakpoints.html
299
300         * inspector/front-end/ResourceScriptMapping.js:
301         (WebInspector.ResourceScriptFile.prototype._workingCopyCommitted):
302         (WebInspector.ResourceScriptFile.prototype._workingCopyChanged):
303         * inspector/front-end/UISourceCode.js:
304         (WebInspector.UISourceCode.prototype.setWorkingCopy):
305
306 2012-10-17  Simon Hausmann  <simon.hausmann@digia.com>
307
308         [Qt] Avoid re-creating CSSGrammar.cpp with each (incremental) build
309
310         Reviewed by Tor Arne Vestbø.
311
312         The expected output is CSSGrammar.cpp and the input file used to be CSSGrammar.y,
313         so ${QMAKE_FILE_BASE}.cpp did the correct transformation. Recently the input has
314         changed to CSSGrammar.y.in, in which case the ${QMAKE_FILE_BASE} is CSSGrammar.y
315         unfortunately. The resulting target CSSGrammar.y.cpp will never be created and
316         therefore the target will always run.
317
318         * DerivedSources.pri:
319
320 2012-10-17  Ilya Tikhonovsky  <loislo@chromium.org>
321
322         Unreviewed fix for ImageSourceCG.
323
324         * platform/graphics/cg/ImageSourceCG.cpp:
325         (WebCore::ImageSource::reportMemoryUsage):
326
327 2012-10-17  Ilya Tikhonovsky  <loislo@chromium.org>
328
329         Unreviewed fix for compilation on CG bots.
330
331         * platform/graphics/cg/ImageSourceCG.cpp:
332
333 2012-10-16  Ilya Tikhonovsky  <loislo@chromium.org>
334
335         Web Inspector: NMI instrument ImageDecoder. It owns a buffer that could be quite big.
336         https://bugs.webkit.org/show_bug.cgi?id=99540
337
338         Reviewed by Yury Semikhatsky.
339
340         * platform/graphics/ImageSource.cpp:
341         (WebCore::ImageSource::reportMemoryUsage):
342         (WebCore):
343         * platform/graphics/ImageSource.h:
344         (ImageSource):
345         * platform/image-decoders/ImageDecoder.cpp:
346         (WebCore::ImageFrame::reportMemoryUsage):
347         (WebCore):
348         (WebCore::ImageDecoder::reportMemoryUsage):
349         * platform/image-decoders/ImageDecoder.h:
350         (ImageFrame):
351         (ImageDecoder):
352         * platform/image-decoders/skia/ImageDecoderSkia.cpp:
353         (WebCore::ImageFrame::reportMemoryUsage):
354         (WebCore):
355
356 2012-10-17  Zeno Albisser  <zeno@webkit.org>
357
358         [Qt] Fix build on Mac OSX 10.6 and earlier.
359         https://bugs.webkit.org/show_bug.cgi?id=99595
360
361         Reviewed by Simon Hausmann.
362
363         * Target.pri:
364
365 2012-10-17  Pavel Feldman  <pfeldman@chromium.org>
366
367         Web Inspector: display "disconnected" message when remote debugging terminates
368         https://bugs.webkit.org/show_bug.cgi?id=99316
369
370         Reviewed by Yury Semikhatsky.
371
372         Otherwise, it is not clear that the front-end is no longer functional.
373
374         * inspector/front-end/InspectorFrontendHostStub.js:
375         (WebInspector.RemoteDebuggingTerminatedScreen):
376         * inspector/front-end/inspector.js:
377         (WebInspector.loaded.WebInspector.socket.onclose):
378         (WebInspector.loaded):
379
380 2012-10-17  Yury Semikhatsky  <yurys@chromium.org>
381
382         Web Inspector: delete watch expression button overlaps with the expression value
383         https://bugs.webkit.org/show_bug.cgi?id=99569
384
385         Reviewed by Vsevolod Vlasov.
386
387         Delete watch expression button now doesn't overlap with the watch expression.
388
389         * inspector/front-end/inspector.css:
390         (.properties-tree.watch-expressions > li > .value):
391
392 2012-10-17  Luke Macpherson   <macpherson@chromium.org>
393
394         Move handling of CSSPropertyPointerEvents from StyleResolver into StyleBuilder.
395         https://bugs.webkit.org/show_bug.cgi?id=99536
396
397         Reviewed by Alexis Menard.
398
399         One small step towards removing the giant switch statement in StyleResolver,
400         this patch moves pointer event property into StyleBuilder.
401
402         Covered by fast/events/pointer-events.html and fast/events/pointer-events-2.html.
403
404         * css/StyleBuilder.cpp:
405         (WebCore::StyleBuilder::StyleBuilder):
406         * css/StyleResolver.cpp:
407         (WebCore::StyleResolver::applyProperty):
408
409 2012-10-17  Keishi Hattori  <keishi@webkit.org>
410
411         Localized date should be based on LDML
412         https://bugs.webkit.org/show_bug.cgi?id=99570
413
414         Reviewed by Kent Tamura.
415
416         Localized date should be based on LDML to match the format inside DateTimeEditElement.
417
418         No new tests. Covered by LocaleMacTest.formatDate and LocaleWinTest.formatDate.
419
420         * platform/text/LocaleICU.cpp: Removed formatDateTime.
421         * platform/text/LocaleICU.h:
422         (LocaleICU):
423         * platform/text/LocaleNone.cpp: Removed formatDateTime.
424         (LocaleNone):
425         * platform/text/LocaleWin.cpp: Removed formatDateTime and formatDate.
426         (WebCore):
427         * platform/text/LocaleWin.h:
428         (LocaleWin):
429         * platform/text/Localizer.cpp:
430         (WebCore::DateTimeStringBuilder::visitField): Added support for year/month/day.
431         (WebCore::Localizer::formatDateTime): Creates the formatted string based on the format from dateFormat().
432         * platform/text/Localizer.h:
433         * platform/text/mac/LocaleMac.h:
434         (LocaleMac):
435         * platform/text/mac/LocaleMac.mm: Removed formatDateTime.
436
437 2012-10-17  Harald Alvestrand  <hta@google.com>
438
439         Implement the Selector argument to RTCPeerConnection.getStats
440         https://bugs.webkit.org/show_bug.cgi?id=99460
441
442         Reviewed by Adam Barth.
443
444         The change adds two new parameters to the RTCStatsRequest object:
445         stream and component. Together these are enough to identify a
446         MediaStreamTrack.
447
448         Test: fast/mediastream/RTCPeerConnection-statsSelector.html
449
450         * Modules/mediastream/MediaStreamTrack.cpp:
451         (WebCore::MediaStreamTrack::streamDescriptor):
452         (WebCore):
453         * Modules/mediastream/MediaStreamTrack.h:
454         * Modules/mediastream/RTCPeerConnection.cpp:
455         (WebCore::RTCPeerConnection::getStats):
456         * Modules/mediastream/RTCStatsRequestImpl.cpp:
457         (WebCore::RTCStatsRequestImpl::create):
458         (WebCore::RTCStatsRequestImpl::RTCStatsRequestImpl):
459         (WebCore::RTCStatsRequestImpl::hasSelector):
460         (WebCore):
461         (WebCore::RTCStatsRequestImpl::stream):
462         (WebCore::RTCStatsRequestImpl::component):
463         * Modules/mediastream/RTCStatsRequestImpl.h:
464         (RTCStatsRequestImpl):
465         * platform/chromium/support/WebRTCStatsRequest.cpp:
466         (WebKit):
467         (WebKit::WebRTCStatsRequest::hasSelector):
468         (WebKit::WebRTCStatsRequest::stream):
469         (WebKit::WebRTCStatsRequest::component):
470         * platform/mediastream/RTCStatsRequest.h:
471         (WebCore):
472         (RTCStatsRequest):
473
474 2012-10-17  Simon Hausmann  <simon.hausmann@digia.com>
475
476         [Qt] Enable use of more AllInOne files
477         https://bugs.webkit.org/show_bug.cgi?id=99579
478
479         Reviewed by Tor Arne Vestbø.
480
481         The AllInOne files reduce pressure during final link time because the object files contain less duplicated
482         symbols.
483
484         * Target.pri: Add HTMLElementsAllInOne, EditingAllInOne and RenderingAllInOne to the build
485         * editing/EditingAllInOne.cpp: Place a #if USE(CF) around the inclusion of SmartReplaceCF.cpp
486         * html/HTMLElementsAllInOne.cpp: Move HTMLPlugInElement.cpp to the top to fix builds on X11 based platforms
487         where the X headers get confused by the "Region" type that's also declared in WebCore.
488         * rendering/RenderingAllInOne.cpp: Fix build on case-sensitive file systems (Plugin -> PlugIn) and added a
489         #if PLATFORM(WIN) around the inclusion of RenderThemeWin.cpp.
490
491 2012-10-17  Kent Tamura  <tkent@chromium.org>
492
493         REGRESSION(r131421): Text baseline becomes incorrect after re-layout of input[type=time]
494         https://bugs.webkit.org/show_bug.cgi?id=99572
495
496         Reviewed by Kentaro Hara.
497
498         We use flexible box since r131421, and it seems text baseline becomes
499         incorrect if there are text nodes in a flex container.
500
501         Test: fast/forms/time-multiple-fields/time-multiple-fields-static-relayout.html
502
503         * css/html.css:
504         (input::-webkit-datetime-edit-text): Added.
505         * html/shadow/DateTimeEditElement.cpp:
506         (WebCore::DateTimeEditBuilder::visitLiteral):
507         Wrap text with an element with ::-webkit-datetime-edit-text.
508
509 2012-10-17  Grzegorz Czajkowski  <g.czajkowski@samsung.com>, Michal Roj <m.roj@samsung.com>
510
511         [WK2][EFL] Implementation of spellchecking feature.
512         https://bugs.webkit.org/show_bug.cgi?id=91854
513
514         Reviewed by Gyuyoung Kim.
515
516         * PlatformEfl.cmake:
517         Add enchant-related compiler flags: header paths and the library flag.
518
519 2012-10-17  Alexander Pavlov  <apavlov@chromium.org>
520
521         Web Inspector: Avoid style updates when retrieving the inline stylesheet text
522         https://bugs.webkit.org/show_bug.cgi?id=99576
523
524         Reviewed by Vsevolod Vlasov.
525
526         Avoid using innerText() to retrieve inline stylesheet text, which may result in style and layout updates.
527
528         * inspector/InspectorStyleSheet.cpp:
529         (WebCore::InspectorStyleSheet::inlineStyleSheetText):
530
531 2012-10-17  Patrick Gansterer  <paroga@webkit.org>
532
533         Build fix for WinCE after r131365.
534
535         * platform/graphics/GlyphBuffer.h:
536         (WebCore::GlyphBufferAdvance::width):
537         * platform/graphics/wince/FontWinCE.cpp:
538         (WebCore::cursorToX):
539         * platform/graphics/wince/GraphicsContextWinCE.cpp:
540         (WebCore::GraphicsContext::drawText):
541
542 2012-10-17  Mike West  <mkwst@chromium.org>
543
544         V8 should throw a more descriptive exception when blocking 'eval' via CSP.
545         https://bugs.webkit.org/show_bug.cgi?id=94332
546
547         Reviewed by Adam Barth.
548
549         Following up on https://bugs.webkit.org/show_bug.cgi?id=94331, this
550         patch wires up the new error message mechanism to V8, and updates the
551         Chromium test expectations accordingly.
552
553         * bindings/v8/ScriptController.cpp:
554         (WebCore::ScriptController::disableEval):
555             Pass 'errorMessage' through to V8.
556         * bindings/v8/V8DOMWindowShell.cpp:
557         (WebCore::V8DOMWindowShell::initializeIfNeeded):
558             Grab the error message from ContentSecurityPolicy, and pass it
559             through to V8.
560         * bindings/v8/WorkerContextExecutionProxy.cpp:
561         (WebCore::WorkerContextExecutionProxy::WorkerContextExecutionProxy):
562         (WebCore::WorkerContextExecutionProxy::evaluate):
563         (WebCore::WorkerContextExecutionProxy::setEvalAllowed):
564         * bindings/v8/WorkerContextExecutionProxy.h:
565         (WorkerContextExecutionProxy):
566             Convert 'm_disableEvalPending' to a string to store the current
567             error message, and use it to set the eval state.
568         * bindings/v8/WorkerScriptController.cpp:
569         (WebCore::WorkerScriptController::disableEval):
570             Pass 'errorMessage' through to V8.
571
572 2012-10-17  MORITA Hajime  <morrita@google.com>
573
574         Assertion failed on HTMLFormControlElement.cpp: updateFromElementCallback()
575         https://bugs.webkit.org/show_bug.cgi?id=99566
576
577         Reviewed by Kent Tamura.
578
579         It had a too optimistic assertion. This change removes it.
580
581         Test: fast/forms/textarea/textarea-autofocus-removal-while-focusing.html
582
583         * html/HTMLFormControlElement.cpp:
584         (WebCore::updateFromElementCallback):
585
586 2012-10-17  Vsevolod Vlasov  <vsevik@chromium.org>
587
588         Web Inspector: When dirty uiSourceCode is saved to disk from scripts navigator context menu working copy is not committed.
589         https://bugs.webkit.org/show_bug.cgi?id=99555
590
591         Reviewed by Yury Semikhatsky.
592
593         Save As context menu handler now commits working copy for dirty UISourceCodes.
594
595         * inspector/front-end/HandlerRegistry.js:
596
597 2012-10-17  Vsevolod Vlasov  <vsevik@chromium.org>
598
599         Web Inspector: Stylesheets saved with FileManager are not saved to disk when edited from Elements panel.
600         https://bugs.webkit.org/show_bug.cgi?id=99554
601
602         Reviewed by Yury Semikhatsky.
603
604         Moved saving to disk from SourceFrame to UISourceCode.
605
606         * inspector/front-end/SourceFrame.js:
607         (WebInspector.SourceFrame.prototype._commitEditing):
608         * inspector/front-end/UISourceCode.js:
609         (WebInspector.UISourceCode.prototype._commitContent):
610
611 2012-10-17  Vsevolod Vlasov  <vsevik@chromium.org>
612
613         Web Inspector: [Regression] SASS sources are not saved to disk.
614         https://bugs.webkit.org/show_bug.cgi?id=99551
615
616         Reviewed by Yury Semikhatsky.
617
618         Added resource null checks.
619
620         * inspector/front-end/StylesSourceMapping.js:
621         (WebInspector.StylesSourceMapping.prototype._uiSourceCodeAddedToWorkspace):
622
623 2012-10-17  Elliott Sprehn  <esprehn@chromium.org>
624
625         Clean up ContentData operator overloads
626         https://bugs.webkit.org/show_bug.cgi?id=99556
627
628         Reviewed by Eric Seidel.
629
630         Use virtual dispatch for checking ContentData equality instead
631         of a switch over the type. This the first step in getting rid
632         of the StyleContentType enum and all the switch statements over
633         the type().
634
635         No tests needed, this is just a refactor.        
636
637         * rendering/style/ContentData.cpp:
638         * rendering/style/ContentData.h:
639         (ContentData):
640         (WebCore::operator==):
641         (WebCore):
642         (WebCore::operator!=):
643
644 2012-10-17  Gabor Rapcsanyi  <rgabor@webkit.org>
645
646         NEON intrinsics Gauss filter does not work properly
647         https://bugs.webkit.org/show_bug.cgi?id=98875
648
649         Reviewed by Zoltan Herczeg.
650
651         Fixing the NEON intrinsics Gauss filter. The stride parameter
652         was missing from the intrinsics algorithm. Tested with pixel
653         checks, now it's working properly.
654
655         * platform/graphics/filters/arm/FEGaussianBlurNEON.h:
656         (WebCore::boxBlurNEON):
657
658 2012-10-17  MORITA Hajime  <morrita@google.com>
659
660         Crash on Frame::inScope() part 2
661         https://bugs.webkit.org/show_bug.cgi?id=99543
662
663         Reviewed by Kent Tamura.
664
665         FrameTree::scopedChildCount() can be called even when the one of child frames
666         is in orphan state. This change added a guard for that case.
667
668         No new tests. A hard-to-test timing issue.
669
670         * page/Frame.cpp:
671         (WebCore::Frame::inScope):
672
673 2012-10-17  Shinya Kawanaka  <shinyak@chromium.org>
674
675         Remove shadowAncestorNode() from VisibleSelection
676         https://bugs.webkit.org/show_bug.cgi?id=99544
677
678         Reviewed by Hajime Morita.
679
680         An effort to replace shadowAncestorNode() with shadowHost(), since shadowAncestorNode() is now deprecated.
681
682         No new tests, no change in behavior.
683
684         * editing/VisibleSelection.cpp:
685         (WebCore::VisibleSelection::adjustSelectionToAvoidCrossingEditingBoundaries): Since shadowHost() returns 0 if
686         an element is not in shadowRoot, it's ok to compare shadowAncestor to 0.
687
688 2012-10-17  Douglas Stockwell  <dstockwell@chromium.org>
689
690         Content of replaced elements should be trimmed to the content edge curve.
691         https://bugs.webkit.org/show_bug.cgi?id=63899
692
693         Reviewed by Simon Fraser.
694
695         When a border-radius is specified the content of replaced elements needs to be clipped to avoid
696         being painted over the padding or border in the corners. Previously the clip that was applied
697         was set to the border-edge curve, this patch contracts the clip by the size of the border and
698         padding (the content-edge curve) to match the css3 spec.
699         Spec: http://www.w3.org/TR/css3-background/#corner-clipping
700
701         Test: fast/replaced/border-radius-clip-content-edge.html
702
703         * rendering/RenderBoxModelObject.h:
704         (RenderBoxModelObject):
705         * rendering/RenderReplaced.cpp:
706         (WebCore::RenderReplaced::paint):
707         * rendering/RenderWidget.cpp:
708         (WebCore::RenderWidget::paint):
709
710 2012-10-17  Kunihiko Sakamoto  <ksakamoto@chromium.org>
711
712         The HTML5 formtarget/formaction/formenctyp/formmethod/formnovalidate attributes don't work in button tags with nested elements
713         https://bugs.webkit.org/show_bug.cgi?id=90539
714
715         Reviewed by Kent Tamura.
716
717         Fix a bug where form(action|enctype|method|target) attributes of <button> are not
718         honored if the target of the click event is an element nested within the button.
719
720         Test: fast/forms/formaction-attribute.html
721
722         * loader/FormSubmission.cpp:
723         (WebCore::FormSubmission::create): Looks for the attributes for form submission
724         from the nearest FormControlElement ancestor of the event target.
725
726 2012-10-16  MORITA Hajime  <morrita@google.com>
727
728         [Shadow DOM][V8] WebCore::V8DOMWindow::installPerContextProperties() is slow when shadowDOMEnabled flag is on.
729         https://bugs.webkit.org/show_bug.cgi?id=99428
730
731         Reviewed by Adam Barth.
732
733         A benchmark unveiled that installPerContextProperties() could have made DOMWindow setup slower when
734         - Some properties are added per-context basis by turnin the flag on and
735         - There are bunch of DOMWindow object in the page (that is, there are many iframes.)
736
737         This change eliminates Shadow DOM related per-context properties from DOMWindow for getting rid of that slowness.
738
739         * dom/ContextFeatures.cpp:
740         * dom/ContextFeatures.h: Removed shadowDOMEnabled() method and related enum entry.
741         * dom/Position.cpp:
742         (WebCore::Position::Position):
743         (WebCore::Position::findParent):
744         * dom/TreeScope.cpp:
745         (WebCore::TreeScope::getSelection):
746         * dom/make_names.pl: Re-introduced "runtimeConditional" directive.
747         (defaultTagPropertyHash):
748         (printConstructorInterior):
749         (printFactoryCppFile):
750         (printWrapperFunctions):
751         (printWrapperFactoryCppFile):
752         * html/HTMLTagNames.in:
753         * html/shadow/HTMLContentElement.cpp:
754         (WebCore::contentTagName):
755         * page/DOMWindow.idl:
756
757 2012-10-16  Julien Chaffraix  <jchaffraix@webkit.org>
758
759         Make RenderObject destruction during detach a top-down operation
760         https://bugs.webkit.org/show_bug.cgi?id=98336
761
762         Reviewed by Eric Seidel.
763
764         detach() is a DOM-driven operation that destroys the renderers bottom-up.
765         While this is correct, it causes extra-work to be done (tree cleaning, ...)
766         as it doesn't know about the render tree's structure.
767
768         The render tree on the other side already supports top-down operations
769         but it was overriden by the DOM side of detach.
770
771         This change only makes ContainerNode::detach do a top-down render tree
772         destruction. This is a required step towards doing smarter destruction.
773
774         Refactoring covered by existing tests.
775
776         * dom/ContainerNode.cpp:
777         (WebCore::ContainerNode::detach):
778         Changed the method to do a top-down destruction.
779
780         * dom/Node.cpp:
781         (WebCore::Node::detach):
782         Added this ASSERT that ensures that we have properly cleaned up the
783         whole DOM subtree. The only exception is child content belonging to a
784         flow-thread as the code will shuffle the renderers under the flow-thread.
785
786         * rendering/RenderObject.cpp:
787         (WebCore::RenderObject::willBeDestroyed):
788         As we don't update the node's renderer on the DOM side, do it here.
789         The upside is that it ensures that we don't left any stray renderer
790         in the tree.
791
792         * rendering/RenderObjectChildList.cpp:
793         (WebCore::RenderObjectChildList::destroyLeftoverChildren):
794         Removed the calls to setRenderer as they are redundant with what we do
795         in willBeDestroyed.
796
797         * rendering/RenderTextFragment.cpp:
798         (WebCore::RenderTextFragment::setText):
799         Removed some now unneeded code, replaced by an ASSERT. This is because
800         destroying m_firstLetter would automatically reset the node's renderer
801         in destroyLeftoverChildren.
802
803 2012-10-16  Joseph Pecoraro  <pecoraro@apple.com>
804
805         HTMLSelectElement::optionSelectedByUser confuses listIndex and optionIndex
806         https://bugs.webkit.org/show_bug.cgi?id=99523
807
808         Reviewed by Simon Fraser.
809
810         There was a call site where the optionIndex was being passed to a
811         function that expected the listIndex. Convert appropriately.
812
813         Extends Test: platform/mac/fast/objc/dom-html-select-activate.html
814
815         * html/HTMLSelectElement.cpp:
816         (WebCore::HTMLSelectElement::optionSelectedByUser):
817
818 2012-10-16  Jian Li  <jianli@chromium.org>
819
820         Rename feature define ENABLE_WIDGET_REGION to ENABLE_DRAGGBALE_REGION
821         https://bugs.webkit.org/show_bug.cgi?id=98975
822
823         Reviewed by Adam Barth.
824
825         Renaming is needed to better match with the draggable region code.
826
827         No new tests due to no functional change.
828
829         * Configurations/FeatureDefines.xcconfig:
830         * DerivedSources.make:
831         * WebCore.exp.in:
832         * css/CSSComputedStyleDeclaration.cpp:
833         (WebCore):
834         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
835         * css/CSSParser.cpp:
836         (WebCore::CSSParser::parseValue):
837         * css/CSSProperty.cpp:
838         (WebCore::CSSProperty::isInheritedProperty):
839         * css/CSSPropertyNames.in:
840         * css/CSSValueKeywords.in:
841         * css/StyleResolver.cpp:
842         (WebCore::StyleResolver::applyProperty):
843         * dom/Document.cpp:
844         (WebCore::Document::Document):
845         (WebCore):
846         (WebCore::Document::reportMemoryUsage):
847         * dom/Document.h:
848         (WebCore):
849         (Document):
850         * page/Chrome.cpp:
851         (WebCore):
852         * page/ChromeClient.h:
853         (ChromeClient):
854         * page/FrameView.cpp:
855         (WebCore::FrameView::layout):
856         (WebCore):
857         (WebCore::FrameView::paintContents):
858         * page/FrameView.h:
859         (FrameView):
860         * rendering/RenderInline.cpp:
861         (WebCore):
862         (WebCore::RenderInline::addAnnotatedRegions):
863         * rendering/RenderInline.h:
864         (RenderInline):
865         * rendering/RenderLayer.cpp:
866         (WebCore::RenderLayer::scrollTo):
867         (WebCore::RenderLayer::setHasHorizontalScrollbar):
868         (WebCore::RenderLayer::setHasVerticalScrollbar):
869         (WebCore::RenderLayer::updateScrollbarsAfterLayout):
870         * rendering/RenderListBox.cpp:
871         (WebCore::RenderListBox::setHasVerticalScrollbar):
872         * rendering/RenderObject.cpp:
873         (WebCore::RenderObject::styleWillChange):
874         (WebCore):
875         (WebCore::RenderObject::addAnnotatedRegions):
876         * rendering/RenderObject.h:
877         (WebCore::AnnotatedRegionValue::operator==):
878         (AnnotatedRegionValue):
879         (RenderObject):
880         * rendering/style/RenderStyle.h:
881         * rendering/style/RenderStyleConstants.h:
882         * rendering/style/StyleRareNonInheritedData.cpp:
883         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
884         (WebCore::StyleRareNonInheritedData::operator==):
885         * rendering/style/StyleRareNonInheritedData.h:
886         (StyleRareNonInheritedData):
887
888 2012-10-16  James Simonsen  <simonjam@chromium.org>
889
890         [Page Visibility API] View-less documents should report as hidden
891         https://bugs.webkit.org/show_bug.cgi?id=99410
892
893         Reviewed by Tony Gentilcore.
894
895         Test: fast/events/page-visibility-null-view.html
896
897         * dom/Document.cpp:
898         (WebCore::Document::visibilityState):
899
900 2012-10-16  Michael Saboff  <msaboff@apple.com>
901
902         Change WTF_USE_8BIT_TEXTRUN to ENABLE_8BIT_TEXTRUN
903         https://bugs.webkit.org/show_bug.cgi?id=99484
904
905         Reviewed by Eric Seidel.
906
907         Changed macro name to align with it's purpose, therefore changed USE(8BIT_TEXTRUN) to ENABLE(8BIT_TEXTRUN).
908
909         No new tests.  Changed macro name, no functional change.
910
911         * platform/graphics/TextRun.h:
912         (WebCore::TextRun::TextRun):
913         (WebCore::TextRun::subRun):
914         * rendering/RenderBlock.cpp:
915         (WebCore::RenderBlock::constructTextRun):
916         * rendering/RenderBlock.h:
917         (RenderBlock):
918
919 2012-10-16  Noam Rosenthal  <noam.rosenthal@nokia.com>
920
921         [Qt] REGRESSION(r131485): It broke the build
922         https://bugs.webkit.org/show_bug.cgi?id=99499
923
924         Unreviewed build (warning) fix.
925
926         * platform/graphics/texmap/TextureMapperShaderManager.cpp:
927         (WebCore::TextureMapperShaderProgram::getLocation):
928
929 2012-10-16  David Grogan  <dgrogan@chromium.org>
930
931         Inspector: Don't fire assert when inspecting an empty db
932         https://bugs.webkit.org/show_bug.cgi?id=99370
933
934         Reviewed by Vsevolod Vlasov.
935
936         * inspector/InspectorIndexedDBAgent.cpp:
937         (WebCore):
938
939 2012-10-16  Tony Chang  <tony@chromium.org>
940
941         Unreviewed, try to fix the Apple Win build by forcing a rebuild of RenderingAllInOne.cpp.
942
943         * rendering/RenderingAllInOne.cpp:
944
945 2012-10-16  Andrew Scherkus  <scherkus@chromium.org>
946
947         Fix crash in WebCore::MediaControlPanelElement::makeTransparent()
948         https://bugs.webkit.org/show_bug.cgi?id=97951
949
950         Reviewed by Simon Fraser.
951
952         No new tests as it's a speculative fix based on crash dump analysis.
953      
954         Despite MediaControlPanelElement checking for document()->page() nullity in other places, it forgot one check in makeTransparent().
955
956         * html/shadow/MediaControlElements.cpp:
957         (WebCore::MediaControlPanelElement::makeTransparent):
958
959 2012-10-16  Emil A Eklund  <eae@chromium.org>
960
961         Remove special-case flooring of baselinePosition for replaced elements in InlineFlowBox::placeBoxesInBlockDirection
962         https://bugs.webkit.org/show_bug.cgi?id=99376
963
964         Reviewed by Levi Weintraub.
965
966         In r122769 (bug 91410) we added a special-case handling for
967         replaced elements in InlineFlowBox::placeBoxesInBlockDirection
968         to work around positioning issues in a couple of svg tests.
969         This was needed to compensate for a workaround in the table
970         painting code that was fixed in r131358 (bug 99364). As such the
971         special-case handling for replaced elements is no longer needed
972         in InlineFlowBox::placeBoxesInBlockDirection.
973
974         Furthermore this caused problems with caret repainting leaving
975         residual pixels which motivated this change.
976
977         No new tests, have not been able to write a repaint test to
978         demonstrate the caret repaint issue.
979
980         * rendering/InlineFlowBox.cpp:
981         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
982
983 2012-10-16  Simon Fraser  <simon.fraser@apple.com>
984
985         Some #include hygiene
986         https://bugs.webkit.org/show_bug.cgi?id=99500
987
988         Reviewed by Tony Chang.
989
990         Clean up some #includes, mostly related to GraphicsLayer.h. In many
991         cases this can be replaced by PlatformLayer.h.
992         
993         Remove an #include of PluginViewBase.h from Page.h, which was a source
994         of #include fan-out.
995
996         * html/canvas/CanvasRenderingContext2D.h:
997         * page/Page.h:
998         * page/scrolling/ScrollingCoordinator.h:
999         * page/scrolling/ScrollingStateNode.h:
1000         * page/scrolling/mac/ScrollingStateNodeMac.mm:
1001         * platform/graphics/GraphicsContext3D.h:
1002         * platform/graphics/MediaPlayer.h:
1003         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1004         * platform/graphics/gpu/DrawingBuffer.h:
1005         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1006         * plugins/PluginViewBase.h:
1007
1008 2012-10-16  Adam Barth  <abarth@webkit.org>
1009
1010         Document::adoptNode shouldn't special-case <iframe>
1011         https://bugs.webkit.org/show_bug.cgi?id=99247
1012
1013         Reviewed by Ryosuke Niwa.
1014
1015         The special case was added in http://trac.webkit.org/changeset/75293 to
1016         fix a bug with magic iframes. Originally, I planned to remove this
1017         special case, but further investigation reveals that other browsers
1018         throw exceptions for other frame owner elements as well. Now we treat
1019         all frame owner elements the same way.
1020
1021         Test: fast/frames/adopt-object-into-itself.html
1022
1023         * dom/Document.cpp:
1024         (WebCore::Document::adoptNode):
1025
1026 2012-10-16  Dominik Röttsches  <dominik.rottsches@intel.com>
1027
1028         Init timeout flag in ResourceErrorMac
1029         https://bugs.webkit.org/show_bug.cgi?id=99478
1030
1031         Reviewed by Alexey Proskuryakov.
1032
1033         On construction from platform error types, initialize the timeout flag 
1034         to true if the error results from a timeout.
1035
1036         No new tests, covered by tests that will be added in bug 74802.
1037
1038         * platform/network/mac/ResourceErrorMac.mm:
1039         (WebCore::ResourceError::platformLazyInit): Initializing timeout flag if the error was a timeout.
1040
1041 2012-10-16  Tony Chang  <tony@chromium.org>
1042
1043         input[type=range] as a flex item renders thumb at wrong position
1044         https://bugs.webkit.org/show_bug.cgi?id=98666
1045
1046         Reviewed by Ojan Vafai.
1047
1048         Replace RenderSlider implementation with new flexbox and clean up the shadow DOM.
1049         The previous code was trying to set the height to 100% and had a bunch of hacks in
1050         the renderer code to set an explicit height. Using the new flexbox allows us to
1051         remove these renderer hacks.
1052
1053         Test: css3/flexbox/flexitem-stretch-range.html
1054
1055         * css/html.css:
1056         (input[type="range"]::-webkit-slider-container, input[type="range"]::-webkit-media-slider-container): Use new flexbox.
1057         (input[type="range"]::-webkit-slider-runnable-track): Use new flexbox.
1058         (input[type="range"]::-webkit-slider-thumb, input[type="range"]::-webkit-media-slider-thumb): Remove relative positioning since we're
1059         no longer setting top/left in the layout code.
1060         * css/mediaControlsChromium.css: Remove redundant styles and bottom: 1px hack.
1061         * css/mediaControlsChromiumAndroid.css: Remove redundant styles and bottom: 1px hack.
1062         * html/RangeInputType.cpp:
1063         (WebCore::RangeInputType::listAttributeTargetChanged): We need to force a layout
1064         since the height of the control should change when adding/removing a datalist.
1065         * html/shadow/SliderThumbElement.cpp:
1066         (WebCore::RenderSliderContainer::RenderSliderContainer): Use new flexbox.
1067         (WebCore::RenderSliderContainer::computeLogicalHeight): Rather than setting style()->height() in layout, just compute the correct
1068         height when asked.  If we have a datalist, we increase the height (same code as before).  If we're vertical,
1069         we use the intrinsic size.
1070         (WebCore::RenderSliderContainer::layout): Remove extra layout code, but handle the position of the thumb.
1071         This used to be handled in the thumb's layout method, but I deleted that.
1072         * html/shadow/SliderThumbElement.h:
1073         * rendering/RenderSlider.cpp:
1074         (WebCore::RenderSlider::RenderSlider): Use new flexbox.
1075         (WebCore::RenderSlider::layout): Set the limiter size to the size of the thumb. This is necessary
1076         for fast/css/unknown-pseudo-element-matching.html which tries to set the height of the thumb to 1px
1077         and expects the input to also have a height of 1px.  It worked before because the height of the input
1078         didn't depend on the height of its children.
1079         * rendering/RenderSlider.h: Fix indentation.
1080         (RenderSlider): Use new flexible box.
1081
1082 2012-10-16  Dima Gorbik  <dgorbik@apple.com>
1083
1084         Remove Platform.h include from the header files.
1085         https://bugs.webkit.org/show_bug.cgi?id=98665
1086
1087         Reviewed by Eric Seidel.
1088
1089         We don't want other clients that include WebKit headers to know about Platform.h.
1090
1091         No new tests.
1092
1093         * platform/MemoryPressureHandler.h:
1094         * platform/graphics/filters/arm/FECompositeArithmeticNEON.h:
1095         * platform/graphics/filters/arm/FEGaussianBlurNEON.h:
1096         * platform/graphics/filters/arm/FELightingNEON.h:
1097
1098 2012-10-16  Xianzhu Wang  <wangxianzhu@chromium.org>
1099
1100         [Chromium] Android: Need a way to get appropriate font for some specific characters.
1101         https://bugs.webkit.org/show_bug.cgi?id=67587
1102
1103         Reviewed by Adam Barth.
1104
1105         Use the new Skia API SkGetFallbackFamilyNameForChar() to get the family name for individual characters.
1106
1107         No new tests. The following existing tests pass with the change:
1108         fast/writing-mode/vertical-subst-font-vert-no-dflt.html
1109         fast/dynamic/text-combine.html
1110         fast/writing-mode/japanese-rl-text.html
1111         fast/writing-mode/japanese-rl-selection.html
1112         fast/writing-mode/japanese-lr-text.html
1113         fast/repaint/japanese-rl-selection-repaint.html
1114         fast/writing-mode/border-vertical-lr.html
1115
1116         * platform/graphics/chromium/FontCacheAndroid.cpp:
1117         (WebCore::FontCache::getFontDataForCharacters):
1118
1119 2012-10-16  Tommy Widenflycht  <tommyw@google.com>
1120
1121         MediaStream API: Add the chromium API for RTCDataChannel
1122         https://bugs.webkit.org/show_bug.cgi?id=99435
1123
1124         Reviewed by Adam Barth.
1125
1126         Adding WebRTCDataChannel.
1127
1128         Test: fast/mediastream/RTCPeerConnection-datachannel.html
1129
1130         * WebCore.gypi:
1131         * platform/chromium/support/WebRTCDataChannel.cpp: Added.
1132         (WebKit):
1133         (ExtraDataContainer):
1134         (WebKit::ExtraDataContainer::ExtraDataContainer):
1135         (WebKit::ExtraDataContainer::extraData):
1136         (WebKit::WebRTCDataChannel::WebRTCDataChannel):
1137         (WebKit::WebRTCDataChannel::initialize):
1138         (WebKit::WebRTCDataChannel::assign):
1139         (WebKit::WebRTCDataChannel::reset):
1140         (WebKit::WebRTCDataChannel::operator PassRefPtr<WebCore::RTCDataChannelDescriptor>):
1141         (WebKit::WebRTCDataChannel::operator WebCore::RTCDataChannelDescriptor*):
1142         (WebKit::WebRTCDataChannel::extraData):
1143         (WebKit::WebRTCDataChannel::setExtraData):
1144         (WebKit::WebRTCDataChannel::label):
1145         (WebKit::WebRTCDataChannel::reliable):
1146         (WebKit::WebRTCDataChannel::setBufferedAmount):
1147         (WebKit::WebRTCDataChannel::readyStateChanged):
1148         (WebKit::WebRTCDataChannel::dataArrived):
1149         (WebKit::WebRTCDataChannel::error):
1150         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
1151         (WebCore::RTCPeerConnectionHandlerChromium::negotiationNeeded):
1152         (WebCore::RTCPeerConnectionHandlerChromium::didGenerateICECandidate):
1153         (WebCore):
1154         (WebCore::RTCPeerConnectionHandlerChromium::didChangeReadyState):
1155         (WebCore::RTCPeerConnectionHandlerChromium::didChangeICEState):
1156         (WebCore::RTCPeerConnectionHandlerChromium::didRemoveRemoteStream):
1157
1158 2012-10-16  Brady Eidson  <beidson@apple.com>
1159
1160         Update indentation in *ResourceLoader headers to match modern WebKit style
1161         https://bugs.webkit.org/show_bug.cgi?id=99487
1162
1163         Reviewed by Beth Dakin.
1164
1165         I'm going to be working on these classes and the indentation is driving me crazy.
1166
1167         * loader/MainResourceLoader.h:
1168         (WebCore):
1169         (MainResourceLoader):
1170         (WebCore::MainResourceLoader::isLoadingMultipartContent):
1171
1172         * loader/NetscapePlugInStreamLoader.h:
1173         (WebCore):
1174         (NetscapePlugInStreamLoaderClient):
1175         (WebCore::NetscapePlugInStreamLoaderClient::didFinishLoading):
1176         (WebCore::NetscapePlugInStreamLoaderClient::wantsAllStreams):
1177         (WebCore::NetscapePlugInStreamLoaderClient::~NetscapePlugInStreamLoaderClient):
1178         (NetscapePlugInStreamLoader):
1179
1180         * loader/ResourceLoader.h:
1181         (WebCore):
1182         (ResourceLoader):
1183         (WebCore::ResourceLoader::documentLoader):
1184         (WebCore::ResourceLoader::originalRequest):
1185         (WebCore::ResourceLoader::identifier):
1186         (WebCore::ResourceLoader::didReceiveCachedMetadata):
1187         (WebCore::ResourceLoader::willStopBufferingData):
1188         (WebCore::ResourceLoader::shouldUseCredentialStorage):
1189         (WebCore::ResourceLoader::didReceiveAuthenticationChallenge):
1190         (WebCore::ResourceLoader::didCancelAuthenticationChallenge):
1191         (WebCore::ResourceLoader::canAuthenticateAgainstProtectionSpace):
1192         (WebCore::ResourceLoader::receivedCancellation):
1193         (WebCore::ResourceLoader::url):
1194         (WebCore::ResourceLoader::handle):
1195         (WebCore::ResourceLoader::sendResourceLoadCallbacks):
1196         (WebCore::ResourceLoader::reachedTerminalState):
1197         (WebCore::ResourceLoader::request):
1198         (WebCore::ResourceLoader::cancelled):
1199         (WebCore::ResourceLoader::defersLoading):
1200
1201 2012-10-16  Beth Dakin  <bdakin@apple.com>
1202
1203         https://bugs.webkit.org/show_bug.cgi?id=99254
1204         Make ScrollingTree an actual tree of nodes, and have it reflect the 
1205         ScrollingStateTree
1206
1207         Reviewed by Simon Fraser.
1208
1209         This patch finally makes the ScrollingTree over on the 
1210         ScrollingThread aware of the changes that we have been making to the 
1211         ScrollingStateTree.
1212
1213         First, it makes ScrollingTreeNode a much more generic class, similar 
1214         to ScrollingStateNode. It is an abstract class and we will add other 
1215         types of nodes such as ScrollingTreeFixedNodes that will inherit from 
1216         this class. 
1217
1218         All of the scrolling functionality that was in ScrollingTreeNode has 
1219         been moved to ScrollingTreeScrollingNode. And likewise, 
1220         ScrollingTreeNodeMac has been re-named to 
1221         ScrollingTreeScrollingNodeMac. 
1222
1223         And finally, instead of just updating and creating the root node, 
1224         ScrollingTree now recurses through the whole ScrollingStateTree to 
1225         create and update a full tree of nodes.
1226
1227         New files and moves files.
1228         * WebCore.xcodeproj/project.pbxproj:
1229
1230         Add a getter for the children vector since we need to recurse it in 
1231         ScrollingTree.
1232         * page/scrolling/ScrollingStateNode.h:
1233         (WebCore::ScrollingStateNode::children):
1234         (ScrollingStateNode):
1235
1236         m_rootNode is now a ScrollingTreeScrollingNode.
1237         * page/scrolling/ScrollingTree.cpp:
1238         (WebCore::ScrollingTree::ScrollingTree):
1239
1240         Instead of just updating the root node, call two new functions that 
1241         will take care of updating the whole tree.
1242         (WebCore::ScrollingTree::commitNewTreeState):
1243
1244         This function ecurses through the ScrollingStateTree and updates the 
1245         corresponding ScrollingTreeNodes.
1246         (WebCore::ScrollingTree::updateNodesFromStateNode):
1247
1248         This function takes the ScrollingStateTree's list of removed nodes 
1249         and removes the corresponding nodes from the ScrollingTree. It will 
1250         destroy the nodes after removing it as long as it's not the root 
1251         node. I think it's the safest choice for now to never remove the root 
1252         node. 
1253         (WebCore::ScrollingTree::removeDestroyedNodes):
1254
1255         ScrollingTree now keeps a HashMap mapping ScrollingNodeIDs to 
1256         ScrollingTreeNodes.
1257         * page/scrolling/ScrollingTree.h:
1258
1259         All of the scrolling-related functionality has been moved from this 
1260         class to new class ScrollingTreeScrollingNode. And some basic tree 
1261         traversal functionality has been added.
1262         * page/scrolling/ScrollingTreeNode.cpp:
1263         (WebCore::ScrollingTreeNode::ScrollingTreeNode):
1264         (WebCore::ScrollingTreeNode::appendChild):
1265         (WebCore::ScrollingTreeNode::removeChild):
1266         * page/scrolling/ScrollingTreeNode.h:
1267         (WebCore):
1268         (ScrollingTreeNode):
1269         (WebCore::ScrollingTreeNode::scrollingNodeID):
1270         (WebCore::ScrollingTreeNode::setScrollingNodeID):
1271         (WebCore::ScrollingTreeNode::parent):
1272         (WebCore::ScrollingTreeNode::setParent):
1273         (WebCore::ScrollingTreeNode::scrollingTree):
1274
1275         This class contains all of the scrolling-related work that used to be 
1276         done in ScrollingTreeNode.
1277         * page/scrolling/ScrollingTreeScrollingNode.cpp: Added.
1278         (WebCore):
1279         (WebCore::ScrollingTreeScrollingNode::ScrollingTreeScrollingNode):
1280         (WebCore::ScrollingTreeScrollingNode::~ScrollingTreeScrollingNode):
1281         (WebCore::ScrollingTreeScrollingNode::update):
1282         * page/scrolling/ScrollingTreeScrollingNode.h: Added.
1283         (WebCore):
1284         (ScrollingTreeScrollingNode):
1285         (WebCore::ScrollingTreeScrollingNode::shouldUpdateScrollLayerPositionOnMainThread):
1286         (WebCore::ScrollingTreeScrollingNode::viewportRect):
1287         (WebCore::ScrollingTreeScrollingNode::contentsSize):
1288         (WebCore::ScrollingTreeScrollingNode::horizontalScrollElasticity):
1289         (WebCore::ScrollingTreeScrollingNode::verticalScrollElasticity):
1290         (WebCore::ScrollingTreeScrollingNode::hasEnabledHorizontalScrollbar):
1291         (WebCore::ScrollingTreeScrollingNode::hasEnabledVerticalScrollbar):
1292         (WebCore::ScrollingTreeScrollingNode::canHaveScrollbars):
1293         (WebCore::ScrollingTreeScrollingNode::scrollOrigin):
1294
1295         I noticed this whitespace error and had to fix it.
1296         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
1297         (WebCore::ScrollingCoordinatorMac::detachFromStateTree):
1298
1299         Include ScrollingTreeScrollingNodeMac.h instead of 
1300         ScrollingTreeNodeMac.h
1301         * page/scrolling/mac/ScrollingTreeMac.mm:
1302
1303         This class was just re-named.
1304         * page/scrolling/mac/ScrollingTreeNodeMac.h: Removed.
1305         * page/scrolling/mac/ScrollingTreeNodeMac.mm: Removed.
1306         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h: Copied from page/scrolling/mac/ScrollingTreeNodeMac.h.
1307         (ScrollingTreeScrollingNodeMac):
1308         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm: Copied from page/scrolling/mac/ScrollingTreeNodeMac.mm.
1309         (WebCore::ScrollingTreeScrollingNode::create):
1310         (WebCore::ScrollingTreeScrollingNodeMac::ScrollingTreeScrollingNodeMac):
1311         (WebCore::ScrollingTreeScrollingNodeMac::~ScrollingTreeScrollingNodeMac):
1312         (WebCore::ScrollingTreeScrollingNodeMac::update):
1313         (WebCore::ScrollingTreeScrollingNodeMac::handleWheelEvent):
1314         (WebCore::ScrollingTreeScrollingNodeMac::allowsHorizontalStretching):
1315         (WebCore::ScrollingTreeScrollingNodeMac::allowsVerticalStretching):
1316         (WebCore::ScrollingTreeScrollingNodeMac::stretchAmount):
1317         (WebCore::ScrollingTreeScrollingNodeMac::pinnedInDirection):
1318         (WebCore::ScrollingTreeScrollingNodeMac::canScrollHorizontally):
1319         (WebCore::ScrollingTreeScrollingNodeMac::canScrollVertically):
1320         (WebCore::ScrollingTreeScrollingNodeMac::shouldRubberBandInDirection):
1321         (WebCore::ScrollingTreeScrollingNodeMac::absoluteScrollPosition):
1322         (WebCore::ScrollingTreeScrollingNodeMac::immediateScrollBy):
1323         (WebCore::ScrollingTreeScrollingNodeMac::immediateScrollByWithoutContentEdgeConstraints):
1324         (WebCore::ScrollingTreeScrollingNodeMac::startSnapRubberbandTimer):
1325         (WebCore::ScrollingTreeScrollingNodeMac::stopSnapRubberbandTimer):
1326         (WebCore::ScrollingTreeScrollingNodeMac::scrollPosition):
1327         (WebCore::ScrollingTreeScrollingNodeMac::setScrollPosition):
1328         (WebCore::ScrollingTreeScrollingNodeMac::setScrollPositionWithoutContentEdgeConstraints):
1329         (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
1330         (WebCore::ScrollingTreeScrollingNodeMac::minimumScrollPosition):
1331         (WebCore::ScrollingTreeScrollingNodeMac::maximumScrollPosition):
1332         (WebCore::ScrollingTreeScrollingNodeMac::scrollBy):
1333         (WebCore::ScrollingTreeScrollingNodeMac::scrollByWithoutContentEdgeConstraints):
1334         (WebCore::ScrollingTreeScrollingNodeMac::updateMainFramePinState):
1335         (WebCore::ScrollingTreeScrollingNodeMac::logExposedUnfilledArea):
1336
1337 2012-10-16  Simon Fraser  <simon.fraser@apple.com>
1338
1339         Add a new layer type for the page tiled cache layer
1340         https://bugs.webkit.org/show_bug.cgi?id=99491
1341
1342         Reviewed by Dean Jackson.
1343
1344         In preparation for using tile cache layers in place of CATiledLayer,
1345         add a new PlatformCALayer layer type LayerTypePageTileCacheLayer,
1346         since the page tile cache will have some different behavior from
1347         other tile cache layers.
1348         
1349         Generalize code that was looking at LayerTypeTileCacheLayer to use
1350         usesTileCacheLayer() if it applies to both types of tile caches.
1351
1352         * platform/graphics/ca/GraphicsLayerCA.cpp:
1353         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
1354         (WebCore::GraphicsLayerCA::recursiveCommitChanges): Show the tile
1355         wash for tiled layers as well as layers with transforms (the tile
1356         wash is just for debugging).
1357         (WebCore::GraphicsLayerCA::platformCALayerDidCreateTiles):
1358         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
1359         * platform/graphics/ca/PlatformCALayer.h:
1360         (WebCore::PlatformCALayer::usesTileCacheLayer):
1361         (PlatformCALayer):
1362         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1363         (PlatformCALayer::PlatformCALayer):
1364         (PlatformCALayer::~PlatformCALayer):
1365         (PlatformCALayer::tiledBacking):
1366         * platform/graphics/mac/WebLayer.mm:
1367         (drawLayerContents): Avoid double-drawing the repaint counter in tile cache layers.
1368
1369 2012-10-16  Stephen Chenney  <schenney@chromium.org> 
1370         An feImage that tries to render itself should be stopped
1371         https://bugs.webkit.org/show_bug.cgi?id=94652
1372
1373         Reviewed by Eric Seidel.
1374
1375         An SVG feImage filter element will accept, as the src to render, an
1376         SVG document that makes use of the feImage itself. This causes the
1377         feImage to try to draw itself while already in the process of drawing
1378         itself. Various problems arise from this. The invariant we wish to
1379         maintain is that no element in the src tree of an feImage element
1380         refers to that feImage.
1381
1382         This patch adds a flag to all FilterData objects that tracks whether or
1383         not the filter is currently applying itself, and avoids applying the
1384         filter recursively.
1385
1386         While it may seem better to catch this problem when the src is set, or
1387         when the filter is built, that turns out to be challenging and
1388         inefficient. Say we choose to test when the src atttribute is set. To
1389         do so would require looking through all of the DOM nodes that will be
1390         rendered for the src, finding all resources used, and checking if any
1391         of them make use fo the feImage element that we are setting the source
1392         for. The infrastructure is not in place to do that, and it would
1393         involve walking a potentially very large portion of the DOM in order
1394         to detect a very rare situation. Note that it is not enough just to
1395         walk the DOM directly under the src; we also need to recursively follow any
1396         resource links to see if they use the feImage (e.g. patterns or
1397         masks or use or ...).
1398
1399         If we instead try to use the renderer node to find self referencing,
1400         we need to recursively walk a potentially very large render tree,
1401         tracing all resources in search of the feImage. This would need to be
1402         done every time the filter is built, which is again a significant
1403         overhead for a situation that is very unlikely to occur. And we do not
1404         have methods that make it easy to find feImage filter effect nodes; they are
1405         hidden behind filter resource nodes.
1406
1407         Hence the runtime check to catch the problem. The check must be in
1408         FilterData and RenderSVGResourceFilter code because we must prevent
1409         the destruction of the feImage when we encounter it recursively.
1410
1411         This patch also renames FilterData::builded to FilterData::isBuilt.
1412
1413         Test: svg/filters/feImage-self-referencing.html
1414
1415         * rendering/svg/RenderSVGResourceFilter.cpp:
1416         (WebCore::ApplyingFilterEffectGuard): Guard to ensure that, in the future, we always
1417         clear the isApplying flag even if the postApplyResource method returns early.
1418         (WebCore::RenderSVGResourceFilter::applyResource): Do not apply a resource that is already applying and
1419         rename builded to isBuilt.
1420         (WebCore::RenderSVGResourceFilter::postApplyResource): Mark a resource as applying and clear after
1421         it is done. Abort if a resource is already applying when the method begins. Rename builded to isBuilt.
1422         (WebCore::RenderSVGResourceFilter::primitiveAttributeChanged): Rename builded to isBuilt.
1423         * rendering/svg/RenderSVGResourceFilter.h:
1424         (WebCore::FilterData::FilterData):
1425         (FilterData): Add isApplying and rename builded to isBuilt.
1426
1427 2012-10-16  Nate Chapin  <japhet@chromium.org>
1428
1429         sendResourceLoadCallbacks() is poorly named
1430         https://bugs.webkit.org/show_bug.cgi?id=99482
1431
1432         Reviewed by Alexey Proskuryakov.
1433
1434         In both CachedResource and ResourceLoader, rename sendResourceLoadCallbacks()
1435         to shouldSendResourceLoadCallbacks() to better indicate that it is a simple getter.
1436
1437         No new tests, simple renaming.
1438
1439         * loader/FrameLoader.cpp:
1440         (WebCore::FrameLoader::loadedResourceFromMemoryCache):
1441         * loader/ResourceLoader.h:
1442         (WebCore::ResourceLoader::shouldSendResourceLoadCallbacks):
1443         * loader/cache/CachedResource.h:
1444         (WebCore::CachedResource::shouldSendResourceLoadCallbacks):
1445
1446 2012-10-16  Chris Rogers  <crogers@google.com>
1447
1448         Rename some AudioNodes
1449         https://bugs.webkit.org/show_bug.cgi?id=99358
1450
1451         Reviewed by Daniel Bates.
1452
1453         Here's a list of the node names, showing the changing ones:
1454             AudioBufferSourceNode
1455             MediaElementAudioSourceNode
1456             MediaStreamAudioSourceNode
1457             JavaScriptAudioNode ------------> ScriptProcessorNode
1458             RealtimeAnalyserNode ------------> AnalyserNode
1459             AudioGainNode ------------> GainNode
1460             DelayNode
1461             BiquadFilterNode
1462             AudioPannerNode ------------> PannerNode
1463             ConvolverNode
1464             AudioChannelSplitter ------------> ChannelSplitterNode
1465             AudioChannelMerger ------------> ChannelMergerNode
1466             DynamicsCompressorNode
1467             Oscillator ------------> OscillatorNode
1468
1469         * CMakeLists.txt:
1470         * DerivedSources.make:
1471         * DerivedSources.pri:
1472         * GNUmakefile.list.am:
1473         * Modules/webaudio/AnalyserNode.cpp: Renamed from Source/WebCore/Modules/webaudio/RealtimeAnalyserNode.cpp.
1474         * Modules/webaudio/AnalyserNode.idl: Renamed from Source/WebCore/Modules/webaudio/RealtimeAnalyserNode.idl.
1475         * Modules/webaudio/AudioBufferSourceNode.cpp:
1476         (WebCore::AudioBufferSourceNode::setPannerNode):
1477         * Modules/webaudio/AudioBufferSourceNode.h:
1478         (AudioBufferSourceNode):
1479         * Modules/webaudio/AudioContext.cpp:
1480         (WebCore::AudioContext::createJavaScriptNode):
1481         (WebCore::AudioContext::createPanner):
1482         (WebCore::AudioContext::createAnalyser):
1483         (WebCore::AudioContext::createGainNode):
1484         (WebCore::AudioContext::createChannelSplitter):
1485         (WebCore::AudioContext::createChannelMerger):
1486         (WebCore::AudioContext::createOscillator):
1487         * Modules/webaudio/AudioContext.h:
1488         (WebCore):
1489         (AudioContext):
1490         * Modules/webaudio/AudioContext.idl:
1491         * Modules/webaudio/ChannelMergerNode.cpp: Renamed from Source/WebCore/Modules/webaudio/AudioChannelMerger.cpp.
1492         * Modules/webaudio/ChannelMergerNode.h: Renamed from Source/WebCore/Modules/webaudio/AudioChannelMerger.h.
1493         (WebCore):
1494         (ChannelMergerNode):
1495         * Modules/webaudio/ChannelMergerNode.idl: Renamed from Source/WebCore/Modules/webaudio/AudioChannelMerger.idl.
1496         * Modules/webaudio/ChannelSplitterNode.cpp: Renamed from Source/WebCore/Modules/webaudio/AudioChannelSplitter.cpp.
1497         * Modules/webaudio/ChannelSplitterNode.h: Renamed from Source/WebCore/Modules/webaudio/AudioChannelSplitter.h.
1498         (WebCore):
1499         (ChannelSplitterNode):
1500         * Modules/webaudio/ChannelSplitterNode.idl: Renamed from Source/WebCore/Modules/webaudio/AudioChannelSplitter.idl.
1501         * Modules/webaudio/DOMWindowWebAudio.idl:
1502         * Modules/webaudio/GainNode.cpp: Renamed from Source/WebCore/Modules/webaudio/AudioGainNode.cpp.
1503         * Modules/webaudio/GainNode.h: Renamed from Source/WebCore/Modules/webaudio/AudioGainNode.h.
1504         * Modules/webaudio/GainNode.idl: Renamed from Source/WebCore/Modules/webaudio/AudioGainNode.idl.
1505         * Modules/webaudio/OscillatorNode.cpp: Renamed from Source/WebCore/Modules/webaudio/Oscillator.cpp.
1506         * Modules/webaudio/OscillatorNode.h: Renamed from Source/WebCore/Modules/webaudio/Oscillator.h.
1507         * Modules/webaudio/OscillatorNode.idl: Renamed from Source/WebCore/Modules/webaudio/Oscillator.idl.
1508         * Modules/webaudio/PannerNode.cpp: Renamed from Source/WebCore/Modules/webaudio/AudioPannerNode.cpp.
1509         * Modules/webaudio/PannerNode.h: Renamed from Source/WebCore/Modules/webaudio/AudioPannerNode.h.
1510         (WebCore):
1511         * Modules/webaudio/PannerNode.idl: Renamed from Source/WebCore/Modules/webaudio/AudioPannerNode.idl.
1512         * Modules/webaudio/ScriptProcessorNode.cpp: Renamed from Source/WebCore/Modules/webaudio/JavaScriptAudioNode.cpp.
1513         * Modules/webaudio/ScriptProcessorNode.h: Renamed from Source/WebCore/Modules/webaudio/JavaScriptAudioNode.h.
1514         (WebCore):
1515         * Modules/webaudio/ScriptProcessorNode.idl: Renamed from Source/WebCore/Modules/webaudio/JavaScriptAudioNode.idl.
1516         * Modules/webaudio/WaveTable.cpp:
1517         (WebCore::WaveTable::createSine):
1518         (WebCore::WaveTable::createSquare):
1519         (WebCore::WaveTable::createSawtooth):
1520         (WebCore::WaveTable::createTriangle):
1521         (WebCore::WaveTable::generateBasicWaveform):
1522         * Target.pri:
1523         * UseJSC.cmake:
1524         * WebCore.gypi:
1525         * WebCore.xcodeproj/project.pbxproj:
1526         * bindings/js/JSScriptProcessorNodeCustom.cpp: Renamed from Source/WebCore/bindings/js/JSJavaScriptAudioNodeCustom.cpp.
1527         (WebCore):
1528         (WebCore::JSScriptProcessorNode::visitChildren):
1529         * dom/EventTarget.h:
1530         (WebCore):
1531         * dom/EventTargetFactory.in:
1532
1533 2012-10-16  Noam Rosenthal  <noam.rosenthal@nokia.com>
1534
1535         [Texmap] Refactor TextureMapperShaderManager to be clearer
1536         https://bugs.webkit.org/show_bug.cgi?id=86048
1537
1538         Reviewed by Martin Robinson.
1539
1540         Previous implementation of TextureMapperShaderManager was very verbose, calling for too
1541         many casts and ambiguous ownership.
1542         This refactor does the following:
1543         1. TextureMapperShaderProgram is one class without subclasses.
1544         2. Uniform/Attribute accessors are generated by special macros (TEXMAP_DECLARE_...) that
1545            generate both the C++ access function, as well as the GLSL name of the variable. This
1546            allows adding/removing variables from a shader without adding broiler-plate code like
1547            before.
1548
1549         After this change TextureMapperShaderManager has only one responsibility - dealing with
1550         TextureMapperGL's built-in shaders and their lifecycle. Preparing filters etc. is done
1551         in TextureMapperGL.
1552
1553         This is a refactor without new functionality. It has been verified to not break any existing
1554         relevant test.
1555
1556         * platform/graphics/texmap/TextureMapperGL.cpp:
1557         (WebCore::TextureMapperGL::drawBorder):
1558         (WebCore::TextureMapperGL::drawQuad):
1559         (WebCore::TextureMapperGL::drawTextureRectangleARB):
1560         (WebCore::TextureMapperGL::drawTexture):
1561         (WebCore::TextureMapperGL::drawTextureWithAntialiasing):
1562         (WebCore::TextureMapperGL::drawTexturedQuadWithProgram):
1563         (WebCore::TextureMapperGL::beginClip):
1564             Use the MACRO-generated uniform accessors.
1565
1566         (WebCore):
1567         (WebCore::keyForFilterType):
1568         (WebCore::getPassesRequiredForFilter):
1569         (WebCore::gauss):
1570         (WebCore::gaussianKernel):
1571         (WebCore::prepareFilterProgram):
1572         (WebCore::TextureMapperGL::drawFiltered):
1573         (WebCore::BitmapTextureGL::applyFilters):
1574             Move the filter logic to TextureMapperGL
1575
1576         * platform/graphics/texmap/TextureMapperShaderManager.cpp:
1577         (WebCore::TextureMapperShaderProgram::TextureMapperShaderProgram):
1578         (WebCore::TextureMapperShaderProgram::getLocation):
1579         (ShaderSpec):
1580         (WebCore::ShaderSpec::ShaderSpec):
1581         (WebCore::getShaderSpec):
1582         (WebCore::TextureMapperShaderManager::TextureMapperShaderManager):
1583         (WebCore::TextureMapperShaderManager::~TextureMapperShaderManager):
1584         (WebCore::TextureMapperShaderManager::getShaderProgram):
1585         * platform/graphics/texmap/TextureMapperShaderManager.h:
1586         (WebCore):
1587         (WebCore::TextureMapperShaderProgram::programID):
1588         (WebCore::TextureMapperShaderProgram::context):
1589         (WebCore::TextureMapperShaderProgram::create):
1590         (TextureMapperShaderProgram):
1591         (TextureMapperShaderManager):
1592             See description.
1593
1594 2012-10-16  Nico Weber  <thakis@chromium.org>
1595
1596         [chromium/mac] Make spelling indicator HighDPI
1597         https://bugs.webkit.org/show_bug.cgi?id=99417
1598
1599         Reviewed by Stephen White.
1600
1601         This is the mac version of http://trac.webkit.org/changeset/130940
1602         Since the mac and non-mac code are very similar again, merge the two
1603         code paths again.
1604
1605         Covered by editing/spelling/(inline-spelling|grammar)-markers-hidpi.html
1606
1607         * platform/graphics/skia/GraphicsContextSkia.cpp:
1608         (WebCore::GraphicsContext::drawLineForDocumentMarker):
1609
1610 2012-10-16  Tony Chang  <tony@chromium.org>
1611
1612         in a column flexbox, input overflows the box when stretched
1613         https://bugs.webkit.org/show_bug.cgi?id=99273
1614
1615         Reviewed by Ojan Vafai.
1616
1617         Fix a bug where we didn't properly subtract padding and border when overriding the child size.
1618         We didn't see this because of a performance optimization in RenderBox where we stretch children.
1619         Also apply this performance optimization in new flexbox for form controls.
1620
1621         Test: css3/flexbox/stretch-input-in-column.html
1622
1623         * rendering/RenderBox.cpp:
1624         (WebCore::flexboxChildHasStretchAlignment):
1625         (WebCore::isStretchingVerticalFlexboxChild):
1626         (WebCore::RenderBox::sizesLogicalWidthToFitContent): Apply performance optimization to form controls in new flexbox.
1627         * rendering/RenderFlexibleBox.cpp:
1628         (WebCore::RenderFlexibleBox::applyStretchAlignmentToChild): Properly subtract border and padding.
1629
1630 2012-10-16  Simon Fraser  <simon.fraser@apple.com>
1631
1632         REGRESSION (r128787): Fixed position div causes other elements to not update correctly
1633         https://bugs.webkit.org/show_bug.cgi?id=98579
1634
1635         Reviewed by Beth Dakin.
1636
1637         RenderLayers cache repaint rects which are computed relative to the repaint container.
1638         Repaint containers depend on whether a RenderLayerBacking has its own backing store,
1639         so if that changes, we need to recompute repaint rects for all descendants.
1640         
1641         Test: compositing/repaint/requires-backing-repaint.html
1642
1643         * rendering/RenderLayerBacking.cpp:
1644         (WebCore::RenderLayerBacking::setRequiresOwnBackingStore):
1645
1646 2012-10-16  Zan Dobersek  <zandobersek@gmail.com>
1647
1648         [GStreamer] GstBuffer ref race in WebKitWebAudioSrcLoop
1649         https://bugs.webkit.org/show_bug.cgi?id=95833
1650
1651         Reviewed by Philippe Normand.
1652
1653         The render bus used in GStreamer's implementation of AudioDestination no longer
1654         allocates memory for each of its channels. Rather than that, when looping, the
1655         data is rendered into a channel-specific GstBuffer. Each buffer is then chained
1656         to the appropriate GstPad, as has been the case before.
1657
1658         No new tests - there are tests covering this change but they are not yet working
1659         on the GTK port or any other GStreamer implementation of Web Audio.
1660
1661         * platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
1662         (WebCore::AudioDestinationGStreamer::AudioDestinationGStreamer):
1663         * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
1664         (_WebKitWebAudioSourcePrivate): Remove an unused member variable.
1665         (webkit_web_audio_src_init): Remove an unnecessary line.
1666         (webKitWebAudioSrcConstructed): Ditto.
1667         (webKitWebAudioSrcLoop):
1668
1669 2012-10-16  Pablo Flouret  <pablof@motorola.com>
1670
1671         Pre-process CSSGrammar.y before running through bison.
1672         https://bugs.webkit.org/show_bug.cgi?id=94290
1673
1674         Reviewed by Tony Chang.
1675
1676         Running CSSGrammar.y through a preprocessor allows the use of feature
1677         defines in all places of the yacc file (i.e. not just in C blocks).
1678         Mostly useful to be able to keep every part of a feature under feature
1679         flags for self-documenting purposes.
1680
1681         No new tests, CSSGrammar.y should be generated correctly and everything
1682         should keep working as before.
1683
1684         * CMakeLists.txt:
1685         * DerivedSources.make:
1686         * DerivedSources.pri:
1687         * GNUmakefile.am:
1688             Modify build systems to use makegrammar.pl to generate the .y files
1689             and run those through bison.
1690
1691         * WebCore.gyp/WebCore.gyp:
1692             Add a new action to preprocess the CSSGrammar.y.in file before the
1693             bison rule is run.
1694
1695         * WebCore.vcproj/WebCore.vcproj:
1696         * WebCore.xcodeproj/project.pbxproj:
1697             Add the new .y.in / .y.includes files.
1698
1699         * css/CSSGrammar.y.in: Renamed from Source/WebCore/css/CSSGrammar.y.
1700             Also moved the top declarations section that has includes, defines,
1701             etc. to its own file. These shouldn't be touched by the first
1702             pass of the preprocessor. And changed the existing ENABLE(FEATURE)
1703             ifdefs to ENABLE_FEATURE since the ENABLE() macro is not available
1704             yet.
1705         * css/CSSGrammar.y.includes: Added.
1706             The aforementioned declarations header section. After the .y.in file
1707             is processed it will be concatenated with this one to make the
1708             CSSGrammar.y file.
1709
1710         * css/makegrammar.pl:
1711             Modify the script to handle .y.in files.
1712
1713 2012-10-16  Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
1714
1715         Implement testRunner.dumpSelectionRect() in WebKitTestRunner
1716         https://bugs.webkit.org/show_bug.cgi?id=69545
1717
1718         Reviewed by Simon Fraser.
1719
1720         * WebCore.exp.in:
1721
1722 2012-10-16  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1723
1724         [Qt] Implement fastBoundingPath/boundingPath distinction.
1725         https://bugs.webkit.org/show_bug.cgi?id=99471
1726
1727         Reviewed by Noam Rosenthal.
1728
1729         Tested by existing test: svg/custom/getBBox-path.svg
1730
1731         * platform/graphics/Path.cpp:
1732         * platform/graphics/qt/PathQt.cpp:
1733         (WebCore::Path::fastBoundingRect):
1734         (WebCore::Path::boundingRect):
1735
1736 2012-10-16  Rob Buis  <rbuis@rim.com>
1737
1738         [BlackBerry] replace BlackBerry::Platform::log() with BBLOG()
1739         https://bugs.webkit.org/show_bug.cgi?id=99302
1740
1741         Reviewed by Yong Li.
1742
1743         Fix a warning introduced by r131335. Since in release BBLOG is empty, only enable this block in debug builds.
1744
1745         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1746         (WebCore::GraphicsContext3D::compileShader):
1747
1748 2012-10-16  Antoine Quint  <graouts@apple.com>
1749
1750         Inspector should allow reading the compositing debug settings
1751         https://bugs.webkit.org/show_bug.cgi?id=99458
1752
1753         Reviewed by Timothy Hatcher.
1754
1755         * inspector/Inspector.json:
1756         * inspector/InspectorPageAgent.cpp:
1757         (WebCore::InspectorPageAgent::getCompositingBordersVisible):
1758         * inspector/InspectorPageAgent.h:
1759
1760 2012-10-16  Dan Bernstein  <mitz@apple.com>
1761
1762         Code to reverse a GlyphBuffer range is repeated in several places
1763         https://bugs.webkit.org/show_bug.cgi?id=99424
1764
1765         Reviewed by Adele Peterson.
1766
1767         * platform/graphics/FontFastPath.cpp:
1768         (WebCore::Font::getGlyphsAndAdvancesForSimpleText): Replaced for loop with a call to
1769         GlyphBuffer::reverse.
1770         * platform/graphics/GlyphBuffer.h:
1771         (WebCore::GlyphBuffer::reverse): Added. Reverses the given range.
1772         (WebCore::GlyphBuffer::swap): Made private.
1773         * platform/graphics/WidthIterator.cpp:
1774         (WebCore::applyFontTransforms): Replaced for loops with calls to GlyphBuffer::reverse and
1775         corrected their bounds.
1776         * platform/graphics/mac/FontComplexTextMac.cpp:
1777         (WebCore::Font::getGlyphsAndAdvancesForComplexText): Replaced for loop with a call to
1778         GlyphBuffer::range.
1779
1780 2012-10-16  Nate Chapin  <japhet@chromium.org>
1781
1782         Re-order CachedRawResource::data() to set m_data earlier
1783         https://bugs.webkit.org/show_bug.cgi?id=99361
1784
1785         Reviewed by Adam Barth.
1786
1787         Currently, we calculate the diff between the data parameter and m_data, call
1788         dataReceived(), then set m_data to data. If something inside dataReceived()
1789         tries to access m_data via CachedResource::resourceBuffer(), it will see the
1790         old data instead of the new data, which seems inconsistent.
1791
1792         No new tests, as no one appears to try to access m_data within dataReceived() currently.
1793
1794         * loader/cache/CachedRawResource.cpp:
1795         (WebCore::CachedRawResource::data):
1796
1797 2012-10-16  Julien Chaffraix  <jchaffraix@webkit.org>
1798
1799         Fold setCellLogicalWidths logic into RenderTableSection layout
1800         https://bugs.webkit.org/show_bug.cgi?id=99382
1801
1802         Reviewed by Eric Seidel.
1803
1804         setCellLogicalWidths was implemented as a pre-phase to laying out
1805         the table's sections. This split was artificial as any change in
1806         the columns' logical width should trigger a sections' relayout, which
1807         could propagate and mark the cells / rows as needed.
1808
1809         Merging setCellLogicalWidths into RenderTableSection::layout removes
1810         an unneeded cells walking and some clunkiness from our implementation.
1811
1812         Refactoring covered by the existing tests.
1813
1814         * rendering/RenderTable.cpp:
1815         (WebCore::RenderTable::RenderTable): Initialize our new boolean.
1816         (WebCore::RenderTable::layout):
1817         If m_columnLogicalWidthChanged, we force a relayout on our sections so that the cells and rows
1818         are marked for layout if there is the logical width change.
1819
1820         * rendering/RenderTable.h:
1821         (WebCore::RenderTable):
1822         Added a new boolean to track if a column logical width changed (m_columnLogicalWidthChanged).
1823
1824         (WebCore::RenderTable::setColumnPosition):
1825         If a column position changed, register that our column logical widths changed. This is not
1826         totally true, so added a comment about when it will be wrong.
1827
1828         * rendering/RenderTableCell.h:
1829         * rendering/RenderTableCell.cpp:
1830         (WebCore::RenderTableCell::setCellLogicalWidth):
1831         Updated the function to mark the cell and the row for layout. Also changed the argument to
1832         be an 'int' as this was what was passed in.
1833
1834         * rendering/RenderTableSection.cpp:
1835         (WebCore::RenderTableSection::layout):
1836         * rendering/RenderTableSection.h:
1837         Removed setCellLogicalWidths and merged the logic into RenderTableSection::layout. We propagate
1838         the table layout's logical widths first so that rows are marked as needing layout as appropriate.
1839
1840 2012-10-16  Takashi Sakamoto  <tasak@google.com>
1841
1842         [Meta] [Shadow] contenteditable attribute for distributed nodes.
1843         https://bugs.webkit.org/show_bug.cgi?id=90017
1844
1845         Reviewed by Dimitri Glazkov.
1846
1847         If an element is distributed to an insertion point, the element's
1848         webkit-user-modify is inherited from its shadow host.
1849
1850         No new tests, because the existing test: user-modify-inheritance.html
1851         covers this change.
1852
1853         * css/StyleResolver.cpp:
1854         (WebCore::StyleResolver::styleForElement):
1855         After an element inherits a style from its parent, override user-modify
1856         by using the shadow host's style if the element is distributed.
1857
1858 2012-10-16  Vsevolod Vlasov  <vsevik@chromium.org>
1859
1860         Web Inspector: Get rid of (now empty) JavaScriptSource and StyleSource, rename all usages to UISourceCode.
1861         https://bugs.webkit.org/show_bug.cgi?id=99469
1862
1863         Reviewed by Pavel Feldman.
1864
1865         * WebCore.gypi:
1866         * WebCore.vcproj/WebCore.vcproj:
1867         * inspector/compile-front-end.py:
1868         * inspector/front-end/BreakpointManager.js:
1869         (WebInspector.BreakpointManager.prototype._uiSourceCodeAdded):
1870         (WebInspector.BreakpointManager.prototype._uiSourceCodeRemoved):
1871         * inspector/front-end/CompilerScriptMapping.js:
1872         * inspector/front-end/JavaScriptSource.js: Removed.
1873         * inspector/front-end/JavaScriptSourceFrame.js:
1874         (WebInspector.JavaScriptSourceFrame):
1875         (WebInspector.JavaScriptSourceFrame.prototype.canEditSource):
1876         (WebInspector.JavaScriptSourceFrame.prototype._onWorkingCopyChanged):
1877         (WebInspector.JavaScriptSourceFrame.prototype._onWorkingCopyCommitted):
1878         (WebInspector.JavaScriptSourceFrame.prototype._innerSetContent):
1879         (WebInspector.JavaScriptSourceFrame.prototype.populateLineGutterContextMenu):
1880         (WebInspector.JavaScriptSourceFrame.prototype.populateTextAreaContextMenu):
1881         (WebInspector.JavaScriptSourceFrame.prototype.onTextChanged):
1882         (WebInspector.JavaScriptSourceFrame.prototype._supportsEnabledBreakpointsWhileEditing):
1883         (WebInspector.JavaScriptSourceFrame.prototype._restoreBreakpointsAfterEditing):
1884         (WebInspector.JavaScriptSourceFrame.prototype._breakpointAdded):
1885         (WebInspector.JavaScriptSourceFrame.prototype._breakpointRemoved):
1886         (WebInspector.JavaScriptSourceFrame.prototype.onTextEditorContentLoaded):
1887         (WebInspector.JavaScriptSourceFrame.prototype._handleGutterClick):
1888         (WebInspector.JavaScriptSourceFrame.prototype._toggleBreakpoint):
1889         (WebInspector.JavaScriptSourceFrame.prototype._setBreakpoint):
1890         (WebInspector.JavaScriptSourceFrame.prototype._continueToLine):
1891         * inspector/front-end/NetworkUISourceCodeProvider.js:
1892         (WebInspector.NetworkUISourceCodeProvider.prototype._parsedScriptSource):
1893         (WebInspector.NetworkUISourceCodeProvider.prototype._resourceAdded):
1894         * inspector/front-end/ResourceScriptMapping.js:
1895         (WebInspector.ResourceScriptMapping.prototype._getOrCreateTemporaryUISourceCode):
1896         * inspector/front-end/ScriptSnippetModel.js:
1897         (WebInspector.ScriptSnippetModel):
1898         (WebInspector.ScriptSnippetModel.prototype._addScriptSnippet):
1899         (WebInspector.ScriptSnippetModel.prototype.evaluateScriptSnippet.get var):
1900         (WebInspector.ScriptSnippetModel.prototype.evaluateScriptSnippet.compileCallback):
1901         (WebInspector.ScriptSnippetModel.prototype.evaluateScriptSnippet):
1902         (WebInspector.ScriptSnippetModel.prototype._createUISourceCodeForScript):
1903         (WebInspector.ScriptSnippetModel.prototype._removeBreakpoints):
1904         (WebInspector.ScriptSnippetModel.prototype._projectWillReset):
1905         (WebInspector.SnippetScriptFile):
1906         (WebInspector.SnippetScriptFile.prototype._workingCopyCommitted):
1907         (WebInspector.SnippetScriptFile.prototype._workingCopyChanged):
1908         * inspector/front-end/ScriptsNavigator.js:
1909         (WebInspector.SnippetsNavigatorView.prototype._handleEvaluateSnippet):
1910         (WebInspector.SnippetsNavigatorView.prototype._handleRemoveSnippet):
1911         * inspector/front-end/ScriptsPanel.js:
1912         (WebInspector.ScriptsPanel.prototype._createSourceFrame):
1913         (WebInspector.ScriptsPanel.prototype._uiSourceCodeFormatted):
1914         (WebInspector.ScriptsPanel.prototype._showOutlineDialog):
1915         (WebInspector.ScriptsPanel.prototype.set _fileRenamed):
1916         (WebInspector.ScriptsPanel.prototype._snippetCreationRequested.callback):
1917         (WebInspector.ScriptsPanel.prototype._snippetCreationRequested):
1918         * inspector/front-end/SnippetJavaScriptSourceFrame.js:
1919         (WebInspector.SnippetJavaScriptSourceFrame):
1920         (WebInspector.SnippetJavaScriptSourceFrame.prototype._runButtonClicked):
1921         * inspector/front-end/StyleSheetOutlineDialog.js:
1922         (WebInspector.StyleSheetOutlineDialog):
1923         (WebInspector.StyleSheetOutlineDialog.show):
1924         (WebInspector.StyleSheetOutlineDialog.prototype.requestItems):
1925         * inspector/front-end/StyleSource.js: Removed.
1926         * inspector/front-end/WebKit.qrc:
1927         * inspector/front-end/inspector.html:
1928
1929 2012-10-15  Jer Noble  <jer.noble@apple.com>
1930
1931         WebAudio: limit output level to 0db
1932         https://bugs.webkit.org/show_bug.cgi?id=95792
1933         <rdar://problem/11966135>
1934
1935         Reviewed by Chris Rogers.
1936
1937         Clamp the output buffer data to the range of [-1,1], which limits
1938         output volume to 0db. This ensures that malicious or poorly-written
1939         pages will not be able to blow through the system volume limit by
1940         creating >0db buffers and effects.
1941
1942         No new tests; added ManualTests/webaudio/limit-level-0db.html.
1943
1944         Clamp the output vector to values of [-1,1]:
1945         * platform/audio/mac/AudioDestinationMac.cpp:
1946         (WebCore::AudioDestinationMac::render):
1947
1948         Add a VectorMath wrapper for vDSP_clip to provide accelerated vector threshold operations:
1949         * platform/audio/VectorMath.h:
1950         * platform/audio/VectorMath.cpp:
1951         (VectorMath):
1952         (WebCore::VectorMath::vclip):
1953
1954 2012-10-15  Vsevolod Vlasov  <vsevik@chromium.org>
1955
1956         Web Inspector: Extract domain specific editing handling logic from UISourceCode (step 2).
1957         https://bugs.webkit.org/show_bug.cgi?id=99301
1958
1959         Reviewed by Pavel Feldman.
1960
1961         StyleFile and ScriptFile now listen for the UISourceCode WorkingCopyChanged/Committed events and process
1962         them instead of being called explicitly.
1963
1964         * inspector/front-end/JavaScriptSourceFrame.js:
1965         (WebInspector.JavaScriptSourceFrame):
1966         (WebInspector.JavaScriptSourceFrame.prototype.onTextChanged):
1967         (WebInspector.JavaScriptSourceFrame.prototype._willMergeToVM):
1968         (WebInspector.JavaScriptSourceFrame.prototype._didMergeToVM):
1969         (WebInspector.JavaScriptSourceFrame.prototype._willDivergeFromVM):
1970         (WebInspector.JavaScriptSourceFrame.prototype._didDivergeFromVM):
1971         (WebInspector.JavaScriptSourceFrame.prototype._muteBreakpointsWhileEditing):
1972         (WebInspector.JavaScriptSourceFrame.prototype._restoreBreakpointsAfterEditing):
1973         * inspector/front-end/ResourceScriptMapping.js:
1974         (WebInspector.ResourceScriptMapping.prototype._hasMergedToVM):
1975         (WebInspector.ResourceScriptMapping.prototype._hasDivergedFromVM):
1976         (WebInspector.ResourceScriptMapping.prototype._bindUISourceCodeToScripts):
1977         (WebInspector.ResourceScriptFile):
1978         (WebInspector.ResourceScriptFile.prototype._workingCopyCommitted):
1979         (WebInspector.ResourceScriptFile.prototype._workingCopyChanged):
1980         * inspector/front-end/ScriptSnippetModel.js:
1981         (WebInspector.SnippetScriptFile):
1982         (WebInspector.SnippetScriptFile.prototype._workingCopyCommitted):
1983         (WebInspector.SnippetScriptFile.prototype._workingCopyChanged):
1984         * inspector/front-end/StylesSourceMapping.js:
1985         (WebInspector.StyleFile):
1986         (WebInspector.StyleFile.prototype._workingCopyCommitted):
1987         (WebInspector.StyleFile.prototype._workingCopyChanged):
1988         (WebInspector.StyleFile.prototype._commitIncrementalEdit):
1989         (WebInspector.StyleFile.prototype._clearIncrementalUpdateTimer):
1990         (WebInspector.StyleFile.prototype.addRevision):
1991         (WebInspector.StyleContentBinding.prototype._innerStyleSheetChanged):
1992         * inspector/front-end/UISourceCode.js:
1993         (WebInspector.UISourceCode.prototype.setWorkingCopy):
1994         (WebInspector.UISourceCode.prototype.commitWorkingCopy):
1995
1996 2012-10-16  Alexander Pavlov  <apavlov@chromium.org>
1997
1998         Web Inspector: [Elements] Double-click to live edit style tags changes text to 'undefined' in some situations
1999         https://bugs.webkit.org/show_bug.cgi?id=99336
2000
2001         Reviewed by Vsevolod Vlasov.
2002
2003         Before editing text nodes, set their textContent to the nodeValue() of the corresponding WebInspector.DOMNode in the UI.
2004         Drive-by: fix text node editing artifact in the DOM tree.
2005
2006         * inspector/front-end/ElementsTreeOutline.js:
2007         (WebInspector.ElementsTreeElement.prototype._startEditingTextNode):
2008         (WebInspector.ElementsTreeElement.prototype._tagNameEditingCommitted):
2009
2010 2012-10-16  Mike West  <mkwst@chromium.org>
2011
2012         Web Inspector: Whitelist safe styles for 'console.log('%c...', ...)'.
2013         https://bugs.webkit.org/show_bug.cgi?id=98945
2014
2015         Reviewed by Pavel Feldman.
2016
2017         Support for styling console messages via '%c' landed without any
2018         parsing of the style information provided. This means that it's fairly
2019         simple to accidentally or maliciously break the console with cleverly
2020         styled messages. To mitigate this risk, whitelisting a safe subset of
2021         CSS seems appropriate.
2022
2023         As a first pass at a reasonable whitelist, this patch allows
2024         'background[-*]', 'border[-*]', 'color[-*]', 'font[-*]',
2025         'margin[-*]', 'padding[-*]', 'text[-*]', '-webkit-background[-*]',
2026         '-webkit-border[-*]', '-webkit-font[-*]', '-webkit-margin[-*]',
2027         '-webkit-padding[-*]', and '-webkit-text[-*]'.
2028
2029         Test: inspector/console/console-format-style-whitelist.html
2030
2031         * inspector/front-end/ConsoleMessage.js:
2032         (WebInspector.ConsoleMessageImpl.prototype._formatWithSubstitutionString.styleFormatter):
2033             Create a buffer element onto which the user-provided styles are
2034             applied. Whitelisted styles are transfered from the buffer onto
2035             the actual console message.
2036         (WebInspector.ConsoleMessageImpl.prototype._formatWithSubstitutionString.isWhitelistedProperty):
2037              Returns true if the specific style is whitelisted. Expects styles
2038              in the hyphenated form (that is, '-webkit-padding-start' rather than
2039              CSSOM's 'webkitPaddingStart').
2040
2041 2012-10-16  Luke Macpherson   <macpherson@chromium.org>
2042
2043         Handle CSSPropertyOpacity in StyleBuilder.
2044         https://bugs.webkit.org/show_bug.cgi?id=99418
2045
2046         Reviewed by Alexis Menard.
2047
2048         One small step in moving from the huge switch in StyleResolver::applyProperty() to the StyleBuilder approach.
2049
2050         Covered by many existing tests, for example fast/text/complex-text-opacity.html.
2051
2052         * css/StyleBuilder.cpp:
2053         (WebCore::StyleBuilder::StyleBuilder):
2054         * css/StyleResolver.cpp:
2055         (WebCore::StyleResolver::applyProperty):
2056
2057 2012-10-16  Kent Tamura  <tkent@chromium.org>
2058
2059         Fix some appearance glitches of multiple fields input elements
2060         https://bugs.webkit.org/show_bug.cgi?id=99412
2061
2062         A follow-up change for r131421.
2063
2064         * css/themeWin.css:
2065         (input[type="text"]): Don't reset paddings for date/time types.
2066
2067 2012-10-16  Kenichi Ishibashi  <bashi@chromium.org>
2068
2069         hb_face_t instances should not depend on FontPlatformData
2070         https://bugs.webkit.org/show_bug.cgi?id=99430
2071
2072         Reviewed by Kent Tamura.
2073
2074         Use platform specific font data (e.g. SkTypeface) to get
2075         font tables for harfbuzz-ng.
2076
2077         No new tests. No changes in behavior.
2078
2079         * platform/graphics/harfbuzz/ng/HarfBuzzNGFaceCairo.cpp:
2080         (WebCore::harfbuzzCairoGetTable): Takes cairo_scaled_font_t* as userData.
2081         (WebCore::HarfBuzzNGFace::createFace):
2082         * platform/graphics/harfbuzz/ng/HarfBuzzNGFaceCoreText.cpp:
2083         (WebCore::harfbuzzCoreTextGetTable): Takes CGFontRef as userData.
2084         (WebCore::HarfBuzzNGFace::createFace):
2085         * platform/graphics/harfbuzz/ng/HarfBuzzNGFaceSkia.cpp:
2086         (WebCore::harfbuzzSkiaGetTable): Takes SkFontID as userData.
2087         (WebCore::HarfBuzzNGFace::createFace):
2088
2089 2012-10-16  Sheriff Bot  <webkit.review.bot@gmail.com>
2090
2091         Unreviewed, rolling out r131418.
2092         http://trac.webkit.org/changeset/131418
2093         https://bugs.webkit.org/show_bug.cgi?id=99431
2094
2095         since 131403 seems innocent (Requested by shinyak|_ on
2096         #webkit).
2097
2098         * dom/Document.cpp:
2099         (WebCore::isValidNameNonASCII):
2100         (WebCore):
2101         (WebCore::Document::isValidName):
2102
2103 2012-10-16  Ilya Tikhonovsky  <loislo@chromium.org>
2104
2105         Web Inspector: NMI Instrument InspectorOverlay. It costs us ~9Mb because it creates page size canvas.
2106         https://bugs.webkit.org/show_bug.cgi?id=99426
2107
2108         Reviewed by Yury Semikhatsky.
2109
2110         New object type InspectorOverlay was added. InspectorOverlay was instrumented.
2111         The instrumentation code automatically visits all the objects that can be reached via m_overlayPage.
2112
2113         * dom/WebCoreMemoryInstrumentation.cpp:
2114         (WebCore):
2115         * dom/WebCoreMemoryInstrumentation.h:
2116         (WebCoreMemoryTypes):
2117         * inspector/InspectorOverlay.cpp:
2118         (WebCore::InspectorOverlay::reportMemoryUsage):
2119         (WebCore):
2120         * inspector/InspectorOverlay.h:
2121         (InspectorOverlay):
2122
2123 2012-10-16  Kent Tamura  <tkent@chromium.org>
2124
2125         Remove unused functions in Locale* classes
2126         https://bugs.webkit.org/show_bug.cgi?id=99425
2127
2128         Reviewed by Yuta Kitamura.
2129
2130         Locale*::currentLocale has been unused since LocalizedDate* and
2131         LocalizedNumber* were removed.
2132
2133         No new tests. This shouldn't change any behavior.
2134
2135         * platform/text/LocaleICU.cpp: Remove createForCurrentLocale and currentLocale.
2136         * platform/text/LocaleICU.h: Ditto.
2137         * platform/text/LocaleWin.cpp: Remove currentLocale.
2138         * platform/text/LocaleWin.h: Ditto.
2139         * platform/text/mac/LocaleMac.h: Remove currentLocale.
2140         * platform/text/mac/LocaleMac.mm: Ditto.
2141
2142 2012-10-15  Kent Tamura  <tkent@chromium.org>
2143
2144         Fix some appearance glitches of multiple fields input elements
2145         https://bugs.webkit.org/show_bug.cgi?id=99412
2146
2147         Reviewed by Kentaro Hara.
2148
2149         1. If CSS-specified width is wider than the intrinsic width of an input,
2150         the spin button and the picker indicator triangle should be put at the
2151         right side of the content area.
2152
2153         2. Remove top, right, and bottom paddings to match input[type=number]
2154         appearance as possible.
2155
2156         3. Remove unnecessary position:relative for spin buttons.
2157
2158         4. Center content vertically if the height is taller than the intrinsic height.
2159
2160         Tests: Update all of rendering tests for input element with multiple fields UI.
2161
2162         * css/html.css:
2163         (input[type="date"]):
2164         - Specify display:-webkit-inline-flex and -webkit-align-items:stretch to center contents.
2165         - Remove top/right/bottom paddings.
2166         (input[type="datetime"]): Ditto.
2167         (input[type="datetime-local"]): Ditto.
2168         (input[type="month"]): Ditto.
2169         (input[type="time"]): Ditto.
2170         (input[type="week"]): Ditto.
2171         (input::-webkit-datetime-edit):
2172         - Switch to the starndard flexible box from the legacy one.
2173         - Add white-space:pre to avoid to collapse white spaces.
2174         (input::-webkit-datetime-edit-gap):
2175         Added. This element is added to push a spin button to the right side.
2176         (input::-webkit-date-and-time-container):
2177         Add -webkit-flex:1 for the input flexible box.
2178         Sort properties.
2179         (input[type="week"]::-webkit-inner-spin-button):
2180         - Use this in date, datetime, datetime-local, and week types.
2181         - Add display:inline-block because other elements in -webkit-datetime-edit is inilne.
2182         - Add position:static to cancel position:relative below.
2183
2184         * html/shadow/DateTimeEditElement.cpp:
2185         (WebCore::DateTimeEditElement::layout):
2186         Add an element with -webkit-datetime-edit-gap before a spin button.
2187
2188 2012-10-15  Yury Semikhatsky  <yurys@chromium.org>
2189
2190         Web Inspector: can't click delete button if watch expression is very long
2191         https://bugs.webkit.org/show_bug.cgi?id=99414
2192
2193         Reviewed by Vsevolod Vlasov.
2194
2195         Minus button in watch expression section doesn't overlap with the
2196         expression/value anymore.
2197
2198         * inspector/front-end/inspector.css:
2199         (.properties-tree.watch-expressions > li.hovered):
2200
2201 2012-10-15  Sheriff Bot  <webkit.review.bot@gmail.com>
2202
2203         Unreviewed, rolling out r131403.
2204         http://trac.webkit.org/changeset/131403
2205         https://bugs.webkit.org/show_bug.cgi?id=99420
2206
2207         Suspicious to cause Performance test failing (Requested by
2208         shinyak|gardenin on #webkit).
2209
2210         * dom/Document.cpp:
2211         (WebCore::Document::isValidName):
2212
2213 2012-10-15  Yury Semikhatsky  <yurys@chromium.org>
2214
2215         Web Inspector: restore watch expression expansion state
2216         https://bugs.webkit.org/show_bug.cgi?id=99304
2217
2218         Reviewed by Pavel Feldman.
2219
2220         Expand watch expression value and its properties if they were expanded
2221         before update.
2222
2223         Test: inspector/debugger/watch-expressions-preserve-expansion.html
2224
2225         * inspector/front-end/WatchExpressionsSidebarPane.js:
2226         (WebInspector.WatchExpressionTreeElement.prototype.onexpand):
2227         (WebInspector.WatchExpressionTreeElement.prototype.oncollapse):
2228         (WebInspector.WatchExpressionTreeElement.prototype.onattach):
2229         (WebInspector.WatchExpressionTreeElement.prototype._expression):
2230         (WebInspector.WatchedPropertyTreeElement):
2231         (WebInspector.WatchedPropertyTreeElement.prototype.onattach):
2232         (WebInspector.WatchedPropertyTreeElement.prototype.onexpand):
2233         (WebInspector.WatchedPropertyTreeElement.prototype.oncollapse):
2234         (WebInspector.WatchedPropertyTreeElement.prototype._propertyPath):
2235
2236 2012-10-15  Mike West  <mkwst@chromium.org>
2237
2238         Warn when CSP headers don't separate directives with ';'.
2239         https://bugs.webkit.org/show_bug.cgi?id=99274
2240
2241         Reviewed by Adam Barth.
2242
2243         A recent bug report exhibited confusion as to what role, exactly,
2244         semicolons play in Content Security Policy definitions. This patch
2245         adjusts the parser to warn web authors if a directive name is
2246         encountered while parsing a source list, which would almost certainly
2247         point to a missing semicolon. For example, something like:
2248
2249             script-src 'self' object-src 'self' style-src *
2250
2251         would throw two warnings, noting that 'object-src' and 'style-src' are
2252         probably meant as directives, and not as source expressions in the
2253         'script-src' source list.
2254
2255         Test: http/tests/security/contentSecurityPolicy/source-list-parsing-no-semicolon.html
2256
2257         * page/ContentSecurityPolicy.cpp:
2258         (WebCore::CSPSourceList::parse):
2259             Throw the new warning onto the console if the hostname of a source
2260             expression matches a CSP directive name.
2261         (WebCore::CSPDirectiveList::addDirective):
2262             Use the exciting new static variables so that the names of various
2263             directives are available outside of CSPDirectiveList::addDirective.
2264             These were previously defined as local static ASCIILiterals. Now
2265             they're static const char[] in an anonymous namespace.
2266         (WebCore::ContentSecurityPolicy::isDirectiveName):
2267             Static method that compares a string to all the known directive
2268             names, returning true if there's a (case-insensitive) match.
2269         (WebCore):
2270         (WebCore::ContentSecurityPolicy::reportDirectiveAsSourceExpression):
2271             A new warning message which should be printed when a directive name
2272             is encountered as a source expression. Matching the directive name
2273             is done via a new 'isDirectiveName' function which lives in an
2274             anonymous namespace along with the other CSP helper functions.
2275         * page/ContentSecurityPolicy.h:
2276             Added 'reportDirectiveAsSourceExpression' signature.
2277
2278 2012-10-15  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2279
2280         Unreviewed, rolling out r131349.
2281         http://trac.webkit.org/changeset/131349
2282         https://bugs.webkit.org/show_bug.cgi?id=97173
2283
2284         Revert r131349 because API test is broken by this commit.
2285
2286         * platform/efl/RunLoopEfl.cpp:
2287         (WebCore::RunLoop::RunLoop):
2288         (WebCore::RunLoop::~RunLoop):
2289
2290 2012-10-15  Nate Chapin  <japhet@chromium.org>
2291
2292         ResourceLoader::sendResourceLoadCallbacks() is backwards
2293         https://bugs.webkit.org/show_bug.cgi?id=99366
2294
2295         Reviewed by Daniel Bates.
2296
2297         No new tests, this function is uncalled but will be used
2298         in a later patch.
2299
2300         * loader/ResourceLoader.h:
2301         (WebCore::ResourceLoader::sendResourceLoadCallbacks):
2302
2303 2012-10-15  Dan Bernstein  <mitz@apple.com>
2304
2305         REGRESSION (r131365): WidthIterator::advance() is needlessly passed a GlyphBuffer in many cases
2306         https://bugs.webkit.org/show_bug.cgi?id=99413
2307
2308         Reviewed by Adele Peterson.
2309
2310         r131365 made Font::width() always pass a GlyphBuffer pointer to floatWidthForSimpleText and
2311         from there down to WidthIterator::advance(). However, when measuring the width of a run, a
2312         GlyphBuffer is only needed if font transforms (kerning and ligatures) need to be applied.
2313
2314         No new test, because there is no change in behavior.
2315
2316         * platform/graphics/Font.cpp:
2317         (WebCore::Font::width): Removed the local GlyphBuffer that was passed down to
2318         floatWidthForSimpleText().
2319         * platform/graphics/Font.h: Removed the GlyphBuffer* parameter to floatWidthForSimpleText.
2320         All but the above caller were passing 0.
2321         * platform/graphics/FontFastPath.cpp:
2322         (WebCore::Font::floatWidthForSimpleText): Removed the GlyphBuffer* parameter and added a
2323         local GlyphBuffer, which is passed by reference to WidthIterator::advance() only if
2324         typesetting features require it.
2325         (WebCore::Font::offsetForPositionForSimpleText): Updated for change to
2326         floatWidthForSimpleText.
2327         * platform/graphics/pango/FontPango.cpp:
2328         (WebCore::Font::floatWidthForComplexText): Ditto.
2329
2330 2012-10-15  Pablo Flouret  <pablof@motorola.com>
2331
2332         Add force parameter to DOMTokenList.toggle
2333         https://bugs.webkit.org/show_bug.cgi?id=99375
2334
2335         Reviewed by Darin Adler.
2336
2337         See http://dom.spec.whatwg.org/#dom-domtokenlist-toggle and
2338         https://www.w3.org/Bugs/Public/show_bug.cgi?id=18463
2339
2340         Essentially, the optional boolean force parameter, if present, makes
2341         toggle always add or remove a class.
2342
2343         No new tests, modified fast/dom/HTMLElement/script-tests/class-list.js
2344
2345         * html/DOMTokenList.cpp:
2346         (WebCore::DOMTokenList::toggle):
2347         (WebCore):
2348         * html/DOMTokenList.h:
2349         (DOMTokenList):
2350         * html/DOMTokenList.idl:
2351             New toggle() overload that takes a force parameter and calls
2352             addInternal() or removeInternal() based on it.
2353
2354 2012-10-15  Dan Bernstein  <mitz@apple.com>
2355
2356         Layout Test fast/text/justify-ideograph-leading-expansion.html is failing an assertion chromium mac
2357         https://bugs.webkit.org/show_bug.cgi?id=99406
2358
2359         Reviewed by Darin Adler.
2360
2361         * platform/graphics/WidthIterator.cpp:
2362         * platform/graphics/WidthIterator.h:
2363         (WebCore::WidthIterator::shouldApplyFontTransforms): Changed to return false if the run is
2364         shorter than 2 characters. 1-character runs are invariant under font transforms, and therefore
2365         Font::codePath() sends them through WidthIterator even on platforms where WidthIterator
2366         does not support kerning and ligatures.
2367
2368 2012-10-15  Michael Saboff  <msaboff@apple.com>
2369
2370         Add 8 bit patch to Document::isValidName() for the non ASCII case
2371         https://bugs.webkit.org/show_bug.cgi?id=99402
2372
2373         Reviewed by Darin Adler.
2374
2375         Added 8 bit path to complete the processing of an 8 bit names without up-converting.
2376
2377         * dom/Document.cpp:
2378         (WebCore::isValidNameNonASCII):
2379         (WebCore::Document::isValidName):
2380
2381 2012-10-15  Vlad Grecescu  <igrecesc@adobe.com>, Douglas Stockwell  <dstockwell@chromium.org>
2382
2383         Support for background-clip:content-box and padding-box with border-radius
2384         https://bugs.webkit.org/show_bug.cgi?id=23166
2385
2386         Reviewed by Simon Fraser.
2387
2388         Test: fast/css/background-clip-radius-values.html
2389
2390         * rendering/RenderBoxModelObject.cpp:
2391         (WebCore::RenderBoxModelObject::clipRoundedInnerRect):
2392         (WebCore):
2393         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2394         * rendering/RenderBoxModelObject.h:
2395
2396 2012-10-15  Byungwoo Lee  <bw80.lee@samsung.com>
2397
2398         Fix unused parameter build warning.
2399         https://bugs.webkit.org/show_bug.cgi?id=99400
2400
2401         Reviewed by Gyuyoung Kim.
2402
2403         Remove the name of unused parameters to fix the build warning (-Wunused-parameter).
2404
2405         * platform/network/soup/ResourceErrorSoup.cpp:
2406         (WebCore::ResourceError::tlsError):
2407
2408 2012-10-15  Kenichi Ishibashi  <bashi@chromium.org>
2409
2410         [WebSocket] WebSocketInflater should handle BFINAL = 1 blocks
2411         https://bugs.webkit.org/show_bug.cgi?id=99282
2412
2413         Reviewed by Yuta Kitamura.
2414
2415         Reset decompression state if WebSocketInflater decompress a block with
2416         BFINAL set to 1.
2417
2418         Test: http/tests/websocket/tests/hybi/deflate-frame-set-bfinal.html
2419
2420         * Modules/websockets/WebSocketDeflater.cpp:
2421         (WebCore::WebSocketInflater::addBytes):
2422         Reset decompression state if inflate() returns Z_STREAM_END, which means the BFINAL
2423         of the current block was set to 1.
2424         (WebCore::WebSocketInflater::finish): Add an assertion.
2425
2426 2012-10-15  Simon Fraser  <simon.fraser@apple.com>
2427
2428         Fix GraphicsLayer visible rect computation when scrolling in WebKit1
2429         https://bugs.webkit.org/show_bug.cgi?id=99385
2430
2431         Reviewed by Dean Jackson, Tim Horton.
2432
2433         RenderLayerCompositor always used frameView->frameRect() as the visible
2434         rect on the root used for GraphicsLayer visibleRect computation. This
2435         was wrong for subframes, which require a rect with an origin of (0,0)
2436         and size of the contentsSize().
2437         
2438         It was also wrong when the scrolling is not represented in the GraphicsLayer
2439         tree. When scrolling is done elsewhere, we need to use the ScrollView's
2440         visibleContentRect().
2441
2442         Tests: compositing/visible-rect/scrolled.html
2443                compositing/visible-rect/iframe-and-layers.html
2444                compositing/visible-rect/iframe-no-layers.html
2445
2446         * rendering/RenderLayerCompositor.cpp:
2447         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
2448
2449 2012-10-15  Julien Chaffraix  <jchaffraix@webkit.org>
2450
2451         Remove page visibility hidden histograms
2452         https://bugs.webkit.org/show_bug.cgi?id=99360
2453
2454         Reviewed by Ojan Vafai.
2455
2456         The 2 page visibility hidden histograms were added in http://webkit.org/b/85537 to
2457         investigate a potential optimization where we would destroy the render tree when
2458         a tab was hidden. The optimization was abandoned but the histograms were never
2459         removed. They are too narrow to be reused so this change removes them.
2460
2461         * page/Page.cpp:
2462         (WebCore::Page::setVisibilityState):
2463
2464 2012-10-15  Ryuan Choi  <ryuan.choi@samsung.com>
2465
2466         REGRESSION: Build break after r131373 when ACCELERATED_COMPOSITING disabled
2467         https://bugs.webkit.org/show_bug.cgi?id=99397
2468
2469         Unreviewed, build fix.
2470
2471         * page/scrolling/ScrollingCoordinator.cpp:
2472         (WebCore::ScrollingCoordinator::updateMainFrameScrollPosition):
2473
2474 2012-10-14  Kent Tamura  <tkent@chromium.org>
2475
2476         Input elements with multiple fields UI should set appropriate direction for browser locale automatically
2477         https://bugs.webkit.org/show_bug.cgi?id=99291
2478
2479         Reviewed by Hajime Morita.
2480
2481         Input elemnts with multiple fields UI ignores HTML dir attribute or CSS
2482         direction property, and their direction should be decided by the browser
2483         locale. If the browser locale is a RTL language, date/time input fields
2484         show formats/digits for the RTL language. The layout should be always
2485         RTL regardless of the direction in such case.
2486
2487         Test: fast/forms/date-multiple-fields/date-multiple-fields-appearance-l10n.html
2488
2489         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
2490         (WebCore::BaseMultipleFieldsDateAndTimeInputType::updateInnerTextValue):
2491         Set approriate dir attribute value to the child element of the UA shadow root.
2492
2493 2012-10-15  Andreas Kling  <kling@webkit.org>
2494
2495         StyleResolver: Garbage collect the matched properties cache on a timer.
2496         <http://webkit.org/b/98625>
2497
2498         Reviewed by Eric Seidel.
2499
2500         Sweeping the matched properties cache once every 100 additions ended up choking RoboHornet's
2501         svgresize.html benchmark. Move it to a single-shot timer that's refreshed every 100 additions
2502         and defers the actual sweep for 60 seconds.
2503
2504         * css/StyleResolver.cpp:
2505         (WebCore::StyleResolver::StyleResolver):
2506         (WebCore::StyleResolver::sweepMatchedPropertiesCache):
2507         (WebCore::StyleResolver::addToMatchedPropertiesCache):
2508         * css/StyleResolver.h:
2509         (StyleResolver):
2510
2511 2012-10-15  Arnaud Renevier  <a.renevier@sisa.samsung.com>
2512
2513         [GStreamer] GstCaps are leaked when building with gstreamer-1.0
2514         https://bugs.webkit.org/show_bug.cgi?id=99362
2515
2516         Reviewed by Martin Robinson.
2517
2518         Implement GRefPtr<GstCaps> adoptGRef(GstCaps*).
2519
2520         Change webkitGstGetPadCaps signature to return a GRefPtr<GstCaps>, and
2521         use GRefPtr<GstCaps> also in webkitVideoSinkRender to simply GstCaps
2522         refeference count.
2523
2524         Covered by existing tests.
2525
2526         * platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
2527         (WTF::adoptGRef):
2528         (WTF):
2529         * platform/graphics/gstreamer/GRefPtrGStreamer.h:
2530         (WTF):
2531         * platform/graphics/gstreamer/GStreamerVersioning.cpp:
2532         (webkitGstGetPadCaps):
2533         * platform/graphics/gstreamer/GStreamerVersioning.h:
2534         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2535         (WebCore::MediaPlayerPrivateGStreamer::naturalSize):
2536         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
2537         (webkitVideoSinkRender):
2538
2539 2012-10-15  Tony Chang  <tony@chromium.org>
2540
2541         Unreviewed, rolling out r131367.
2542         http://trac.webkit.org/changeset/131367
2543         https://bugs.webkit.org/show_bug.cgi?id=98666
2544
2545         crashes on Apple Mac
2546
2547         * css/html.css:
2548         (input[type="range"]::-webkit-slider-container, input[type="range"]::-webkit-media-slider-container):
2549         (input[type="range"]::-webkit-slider-runnable-track):
2550         (input[type="range"]::-webkit-slider-thumb, input[type="range"]::-webkit-media-slider-thumb):
2551         * css/mediaControlsChromium.css:
2552         (input[type="range"]::-webkit-media-slider-thumb):
2553         * css/mediaControlsChromiumAndroid.css:
2554         (input[type="range"]::-webkit-media-slider-thumb):
2555         * html/RangeInputType.cpp:
2556         (WebCore::RangeInputType::listAttributeTargetChanged):
2557         * html/shadow/SliderThumbElement.cpp:
2558         (WebCore::RenderSliderThumb::layout):
2559         (WebCore):
2560         (WebCore::RenderSliderContainer::RenderSliderContainer):
2561         (RenderSliderContainer):
2562         (WebCore::RenderSliderContainer::layout):
2563         * html/shadow/SliderThumbElement.h:
2564         (RenderSliderThumb):
2565         * rendering/RenderSlider.cpp:
2566         (WebCore):
2567         (WebCore::RenderSlider::RenderSlider):
2568         (WebCore::RenderSlider::layout):
2569         * rendering/RenderSlider.h:
2570         (WebCore):
2571         (RenderSlider):
2572         (WebCore::RenderSlider::renderName):
2573         (WebCore::RenderSlider::isSlider):
2574         (WebCore::RenderSlider::requiresForcedStyleRecalcPropagation):
2575         (WebCore::toRenderSlider):
2576
2577 2012-10-15  Dan Bernstein  <mitz@apple.com>
2578
2579         Try to fix the build again after r131375.
2580
2581         * platform/graphics/WidthIterator.h:
2582         (WebCore::WidthIterator::shouldApplyFontTransforms): Removed the length check from here.
2583
2584 2012-10-15  Dan Bernstein  <mitz@apple.com>
2585
2586         Try to fix assertion failures on ports that do not support kerning and ligatures on the fast
2587         code path after r131365.
2588
2589         * platform/graphics/WidthIterator.cpp:
2590         (WebCore::applyFontTransforms): Changed the early return condition to not bother with 1-glyph
2591         sequences.
2592         * platform/graphics/WidthIterator.h:
2593         (WebCore::WidthIterator::shouldApplyFontTransforms): Changed to return false if the run is
2594         shorter than 2 characters.
2595
2596 2012-10-15  Dan Bernstein  <mitz@apple.com>
2597
2598         Try to fix the Chromium Mac build after r131365.
2599
2600         * platform/graphics/GlyphBuffer.h:
2601         (WebCore::GlyphBufferAdvance::height): Added.
2602         * platform/graphics/skia/FontSkia.cpp:
2603         (WebCore::Font::drawGlyphs): Changed to use accessors for the GlyphBufferAdvance’s width and height.
2604
2605 2012-10-15  Simon Fraser  <simon.fraser@apple.com>
2606
2607         Ensure that GraphicsLayer positions are updated while doing threaded scrolling
2608         https://bugs.webkit.org/show_bug.cgi?id=99372
2609
2610         Reviewed by Anders Carlsson.
2611
2612         When doing threaded scrolling, the scrolling thread updates the positions of CALayers,
2613         but doesn't update GraphicsLayers. This means that code that relies on GraphicsLayer positions
2614         works incorrectly.
2615         
2616         Threaded scrolling is not testabled in layout tests.
2617
2618         * page/scrolling/ScrollingCoordinator.cpp:
2619         (WebCore::ScrollingCoordinator::updateMainFrameScrollPosition):
2620         * platform/graphics/GraphicsLayer.h:
2621         (GraphicsLayer):
2622         (WebCore::GraphicsLayer::syncPosition):
2623
2624 2012-10-15  Tommy Widenflycht  <tommyw@google.com>
2625
2626         MediaStream API: Implement RTCDataChannel
2627         https://bugs.webkit.org/show_bug.cgi?id=99080
2628
2629         Reviewed by Adam Barth.
2630
2631         This patch introduces RTCDataChannel which is a pipe for sending data between two RTCPeerConnections.
2632         Since the data channel belongs to a peer connection object I have reused part of its infrastructure.
2633
2634         Not currently testable. My next patch will add the chromium WebKit functionality, together with mocks and tests.
2635
2636         * CMakeLists.txt:
2637         * GNUmakefile.list.am:
2638         * Modules/mediastream/RTCDataChannel.cpp: Added.
2639         (WebCore):
2640         (WebCore::RTCDataChannel::create):
2641         (WebCore::RTCDataChannel::RTCDataChannel):
2642         (WebCore::RTCDataChannel::~RTCDataChannel):
2643         (WebCore::RTCDataChannel::label):
2644         (WebCore::RTCDataChannel::reliable):
2645         (WebCore::RTCDataChannel::readyState):
2646         (WebCore::RTCDataChannel::bufferedAmount):
2647         (WebCore::RTCDataChannel::binaryType):
2648         (WebCore::RTCDataChannel::setBinaryType):
2649         (WebCore::RTCDataChannel::send):
2650         (WebCore::RTCDataChannel::close):
2651         (WebCore::RTCDataChannel::readyStateChanged):
2652         (WebCore::RTCDataChannel::dataArrived):
2653         (WebCore::RTCDataChannel::error):
2654         (WebCore::RTCDataChannel::descriptor):
2655         (WebCore::RTCDataChannel::interfaceName):
2656         (WebCore::RTCDataChannel::scriptExecutionContext):
2657         (WebCore::RTCDataChannel::stop):
2658         (WebCore::RTCDataChannel::eventTargetData):
2659         (WebCore::RTCDataChannel::ensureEventTargetData):
2660         * Modules/mediastream/RTCDataChannel.h: Added.
2661         (WebCore):
2662         (RTCDataChannel):
2663         (WebCore::RTCDataChannel::refEventTarget):
2664         (WebCore::RTCDataChannel::derefEventTarget):
2665         * Modules/mediastream/RTCDataChannel.idl: Added.
2666         * Modules/mediastream/RTCDataChannelEvent.cpp: Added.
2667         (WebCore):
2668         (WebCore::RTCDataChannelEvent::create):
2669         (WebCore::RTCDataChannelEvent::RTCDataChannelEvent):
2670         (WebCore::RTCDataChannelEvent::~RTCDataChannelEvent):
2671         (WebCore::RTCDataChannelEvent::channel):
2672         (WebCore::RTCDataChannelEvent::interfaceName):
2673         * Modules/mediastream/RTCDataChannelEvent.h: Added.
2674         (WebCore):
2675         (RTCDataChannelEvent):
2676         * Modules/mediastream/RTCDataChannelEvent.idl: Added.
2677         * Modules/mediastream/RTCPeerConnection.cpp:
2678         (WebCore::RTCPeerConnection::createDataChannel):
2679         (WebCore):
2680         (WebCore::RTCPeerConnection::close):
2681         (WebCore::RTCPeerConnection::didAddRemoteDataChannel):
2682         (WebCore::RTCPeerConnection::stop):
2683         * Modules/mediastream/RTCPeerConnection.h:
2684         (WebCore):
2685         (RTCPeerConnection):
2686         * Modules/mediastream/RTCPeerConnection.idl:
2687         * WebCore.gypi:
2688         * dom/EventNames.h:
2689         (WebCore):
2690         * dom/EventNames.in:
2691         * dom/EventTargetFactory.in:
2692         * platform/mediastream/RTCDataChannelDescriptor.cpp: Added.
2693         (WebCore):
2694         (WebCore::RTCDataChannelDescriptor::create):
2695         (WebCore::RTCDataChannelDescriptor::RTCDataChannelDescriptor):
2696         (WebCore::RTCDataChannelDescriptor::~RTCDataChannelDescriptor):
2697         (WebCore::RTCDataChannelDescriptor::readyStateChanged):
2698         (WebCore::RTCDataChannelDescriptor::dataArrived):
2699         (WebCore::RTCDataChannelDescriptor::error):
2700         * platform/mediastream/RTCDataChannelDescriptor.h: Added.
2701         (WebCore):
2702         (RTCDataChannelDescriptorClient):
2703         (WebCore::RTCDataChannelDescriptorClient::~RTCDataChannelDescriptorClient):
2704         (RTCDataChannelDescriptor):
2705         (ExtraData):
2706         (WebCore::RTCDataChannelDescriptor::ExtraData::~ExtraData):
2707         (WebCore::RTCDataChannelDescriptor::client):
2708         (WebCore::RTCDataChannelDescriptor::setClient):
2709         (WebCore::RTCDataChannelDescriptor::label):
2710         (WebCore::RTCDataChannelDescriptor::reliable):
2711         (WebCore::RTCDataChannelDescriptor::readyState):
2712         (WebCore::RTCDataChannelDescriptor::bufferedAmount):
2713         (WebCore::RTCDataChannelDescriptor::setBufferedAmount):
2714         (WebCore::RTCDataChannelDescriptor::extraData):
2715         (WebCore::RTCDataChannelDescriptor::setExtraData):
2716         * platform/mediastream/RTCPeerConnectionHandler.cpp:
2717         (RTCPeerConnectionHandlerDummy):
2718         (WebCore::RTCPeerConnectionHandlerDummy::openDataChannel):
2719         (WebCore):
2720         (WebCore::RTCPeerConnectionHandlerDummy::sendStringData):
2721         (WebCore::RTCPeerConnectionHandlerDummy::sendRawData):
2722         (WebCore::RTCPeerConnectionHandlerDummy::closeDataChannel):
2723         * platform/mediastream/RTCPeerConnectionHandler.h:
2724         (WebCore):
2725         (RTCPeerConnectionHandler):
2726         * platform/mediastream/RTCPeerConnectionHandlerClient.h:
2727         (WebCore):
2728         (RTCPeerConnectionHandlerClient):
2729         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
2730         (WebCore::RTCPeerConnectionHandlerChromium::openDataChannel):
2731         (WebCore):
2732         (WebCore::RTCPeerConnectionHandlerChromium::sendStringData):
2733         (WebCore::RTCPeerConnectionHandlerChromium::sendRawData):
2734         (WebCore::RTCPeerConnectionHandlerChromium::closeDataChannel):
2735         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h:
2736         (RTCPeerConnectionHandlerChromium):
2737
2738 2012-10-15  Joshua Bell  <jsbell@chromium.org>
2739
2740         IndexedDB: Pass type of error causing abort to IDBTransaction::onAbort
2741         https://bugs.webkit.org/show_bug.cgi?id=99097
2742
2743         Reviewed by Tony Chang.
2744
2745         Include the error causing the abort in the callback from back end to
2746         front end so it can be exposed on the IDBTransaction.error property.
2747
2748         Test: lazy-index-population.html
2749
2750         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
2751         (WebCore::IDBDatabaseBackendImpl::setVersionInternal):
2752         (WebCore::IDBDatabaseBackendImpl::setIntVersionInternal):
2753         * Modules/indexeddb/IDBDatabaseCallbacks.h:
2754         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
2755         (WebCore::IDBObjectStoreBackendImpl::setIndexKeys):
2756         (WebCore::IDBObjectStoreBackendImpl::putInternal):
2757         * Modules/indexeddb/IDBTransaction.cpp:
2758         (WebCore::IDBTransaction::onAbort):
2759         * Modules/indexeddb/IDBTransaction.h:
2760         (IDBTransaction):
2761         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
2762         (WebCore::IDBTransactionBackendImpl::abort):
2763         (WebCore):
2764         (WebCore::IDBTransactionBackendImpl::commit):
2765         * Modules/indexeddb/IDBTransactionBackendImpl.h:
2766         (IDBTransactionBackendImpl):
2767         * Modules/indexeddb/IDBTransactionCallbacks.h:
2768         (IDBTransactionCallbacks):
2769         * inspector/InspectorIndexedDBAgent.cpp:
2770         (WebCore):
2771
2772 2012-10-15  Mike Reed  <reed@google.com>
2773
2774         In Skia's ImageFrame, only set the isOpaque flag when the frame is complete
2775         https://bugs.webkit.org/show_bug.cgi?id=99326
2776
2777         Reviewed by Stephen White.
2778
2779         No new tests -- existing layouttests exercise this, esp. 
2780           png-partial-load-no-alpha.html
2781           webp-partial-load.html
2782         These two fail if skia is told that these are opaque, which it is w/o this CL.
2783
2784         At the moment, Skia has a hack to ignore the opaque-setting, so that these tests will pass as is.
2785         This change is to first, correct webkit to only set isOpaque when the frame is complete, so that
2786         in a later change, Skia can remove the hack, and re-enable its opaqueness optimization.
2787
2788         * platform/image-decoders/skia/ImageDecoderSkia.cpp:
2789         (WebCore::ImageFrame::ImageFrame):
2790         (WebCore::ImageFrame::operator=):
2791         (WebCore::ImageFrame::zeroFillPixelData):
2792         (WebCore::ImageFrame::hasAlpha):
2793         (WebCore::ImageFrame::setHasAlpha):
2794         (WebCore::ImageFrame::setStatus):
2795
2796 2012-10-12  Tony Chang  <tony@chromium.org>
2797
2798         input[type=range] as a flex item renders thumb at wrong position
2799         https://bugs.webkit.org/show_bug.cgi?id=98666
2800
2801         Reviewed by Ojan Vafai.
2802
2803         Replace RenderSlider implementation with new flexbox and clean up the shadow DOM.
2804         The previous code was trying to set the height to 100% and had a bunch of hacks in
2805         the renderer code to set an explicit height. Using the new flexbox allows us to
2806         remove these renderer hacks.
2807
2808         Test: css3/flexbox/flexitem-stretch-range.html
2809
2810         * css/html.css:
2811         (input[type="range"]::-webkit-slider-container, input[type="range"]::-webkit-media-slider-container): Use new flexbox.
2812         (input[type="range"]::-webkit-slider-runnable-track): Use new flexbox.
2813         (input[type="range"]::-webkit-slider-thumb, input[type="range"]::-webkit-media-slider-thumb): Remove relative positioning since we're
2814         no longer setting top/left in the layout code.
2815         * css/mediaControlsChromium.css: Remove redundant styles and bottom: 1px hack.
2816         * css/mediaControlsChromiumAndroid.css: Remove redundant styles and bottom: 1px hack.
2817         * html/RangeInputType.cpp:
2818         (WebCore::RangeInputType::listAttributeTargetChanged): We need to force a layout
2819         since the height of the control should change when adding/removing a datalist.
2820         * html/shadow/SliderThumbElement.cpp:
2821         (WebCore::RenderSliderContainer::RenderSliderContainer): Use new flexbox.
2822         (WebCore::RenderSliderContainer::computeLogicalHeight): Rather than setting style()->height() in layout, just compute the correct
2823         height when asked.  If we have a datalist, we increase the height (same code as before).  If we're vertical,
2824         we use the intrinsic size.
2825         (WebCore::RenderSliderContainer::layout): Remove extra layout code, but handle the position of the thumb.
2826         This used to be handled in the thumb's layout method, but I deleted that.
2827         * html/shadow/SliderThumbElement.h:
2828         * rendering/RenderSlider.cpp:
2829         (WebCore::RenderSlider::RenderSlider): Use new flexbox.
2830         (WebCore::RenderSlider::layout): Set the limiter size to the size of the thumb. This is necessary
2831         for fast/css/unknown-pseudo-element-matching.html which tries to set the height of the thumb to 1px
2832         and expects the input to also have a height of 1px.  It worked before because the height of the input
2833         didn't depend on the height of its children.
2834         * rendering/RenderSlider.h: Fix indentation.
2835         (RenderSlider): Use new flexible box.
2836
2837 2012-10-15  Julien Chaffraix  <jchaffraix@webkit.org>
2838
2839         Make RenderTable columns() and columnPositions() return a const reference
2840         https://bugs.webkit.org/show_bug.cgi?id=99339
2841
2842         Reviewed by Abhishek Arya.
2843
2844         The 2 getters were returning a non-const reference. This means that callers
2845         could have modified the Vector's where only FixedTableLayout and AutoTableLayout
2846         were expected to (for columnPositions(), no one should modify columns()).
2847
2848         Refactoring covered by existing tests.
2849
2850         * rendering/AutoTableLayout.cpp:
2851         (WebCore::AutoTableLayout::layout):
2852         * rendering/FixedTableLayout.cpp:
2853         (WebCore::FixedTableLayout::layout):
2854         Updated those functions to use the new setter.
2855
2856         * rendering/RenderTable.h:
2857         (WebCore::RenderTable::columns):
2858         (WebCore::RenderTable::columnPositions):
2859         Made the 2 functions return a const reference. They are also const now!
2860
2861         (WebCore::RenderTable::setColumnPosition):
2862         Added this setter.
2863
2864         * rendering/RenderTableSection.cpp:
2865         (WebCore::RenderTableSection::addCell):
2866         (WebCore::RenderTableSection::setCellLogicalWidths):
2867         (WebCore::RenderTableSection::dirtiedColumns):
2868         Updated to use a const reference.
2869
2870 2012-10-15  Dan Bernstein  <mitz@apple.com>
2871
2872         WebCore part of <rdar://problem/12470680> Font’s fast code path doesn’t support kerning and ligatures
2873         https://bugs.webkit.org/show_bug.cgi?id=99113
2874
2875         Reviewed by Tim Horton.
2876
2877         * WebCore.exp.in: Exported wkCTFontTransformGlyphs.
2878         * platform/graphics/Font.cpp:
2879         (WebCore::Font::width): Added a local GlyphBuffer to pass to floatWidthForSimpleText().
2880         (WebCore::Font::codePath): Rather than always use the complex code path when any typesetting
2881         features are enabled, changed to do so only if WidthIterator doesn’t support this Font’s
2882         typesetting features.
2883         * platform/graphics/FontFastPath.cpp:
2884         (WebCore::Font::getGlyphsAndAdvancesForSimpleText): Added a local GlyphBuffer to pass to
2885         WidthIterator::advance() when advancing to or from the range of interest. Added a FIXME
2886         about how this is not entirely correct when kerning or ligatures are enabled.
2887         (WebCore::Font::selectionRectForSimpleText): Added a local GlyphBuffer to pass to
2888         WidthIterator::advance() when advancing to or from the range of interest.
2889         (WebCore::Font::offsetForPositionForSimpleText): Updated for the change to
2890         WidthIterator::advanceOneCharacter().
2891         * platform/graphics/SimpleFontData.h:
2892         (WebCore::SimpleFontData::applyTransforms): Added. Calls wkCTFontTransformGlyphs() where
2893         available.
2894         * platform/graphics/WidthIterator.cpp:
2895         (WebCore::WidthIterator::WidthIterator): Added initializer for the new m_typesettingFeatures
2896         data member.
2897         (OriginalAdvancesForCharacterTreatedAsSpace): Added this data type, used to track spaces and
2898         characters treated as spaces.
2899         (WebCore::applyFontTransforms): Added. Applies shaping and positioning transforms, as
2900         required by the typesetting features, to the glyphs recently added to a GlyphBuffer, while
2901         maintaining the advances of characters that are treated as spaces and the characters
2902         preceding them, if necessary.
2903         (WebCore::WidthIterator::advanceInternal): Added calls to applyFontTransforms() at the end
2904         of each contiguous run of glyphs from the same font. Also added code to maintain a vector
2905         of spaces and characters treated as space.
2906         (WebCore::WidthIterator::advanceOneCharacter): Changed the parameter type from a pointer to
2907         a reference.
2908         * platform/graphics/WidthIterator.h:
2909         (WebCore::WidthIterator::supportsTypesettingFeatures): Added. Returns whether WidthIterator
2910         instances support the typesetting features of the given font. Returns true if the font is
2911         not a screen font and its typesetting features are kerning, ligatures or both.
2912         (WebCore::WidthIterator::shouldApplyFontTransforms): Added. Returns true if the typesetting
2913         features include kerning or ligatures.
2914         * platform/mac/WebCoreSystemInterface.h: Defined wkCTFontTransformOptions and declared
2915         wkCTFontTransformGlyphs.
2916         * platform/mac/WebCoreSystemInterface.mm: Defined wkCTFontTransformGlyphs.
2917         * rendering/svg/SVGTextMetricsBuilder.cpp:
2918         (WebCore::SVGTextMetricsBuilder::advanceSimpleText): Added a local GlyphBuffer to pass to
2919         WidthIterator::advance().
2920         * rendering/svg/SVGTextRunRenderingContext.cpp:
2921         (WebCore::SVGTextRunRenderingContext::floatWidthUsingSVGFont): Ditto.
2922
2923 2012-10-15  Mark Lam  <mark.lam@apple.com>
2924
2925         Fix build broken by r131348.
2926         https://bugs.webkit.org/show_bug.cgi?id=97533.
2927
2928         Not reviewed.
2929
2930         * rendering/RenderView.cpp:
2931         (WebCore::RenderView::layoutContent):
2932
2933 2012-10-15  Andreas Kling  <kling@webkit.org>
2934
2935         Remove WTF::fastDeleteAllValues().
2936         <http://webkit.org/b/99345>
2937
2938         Reviewed by Eric Seidel.
2939
2940         It was only used to fastDelete() a class that was already overriding operator delete
2941         by way of WTF_MAKE_FAST_ALLOCATED anyway.
2942
2943         * css/CSSParser.cpp:
2944         (WebCore::CSSParser::~CSSParser):
2945
2946 2012-10-15  Levi Weintraub  <leviw@chromium.org>
2947
2948         Regression r130057: incorrect block pref width for alternating InlineFlow and inline Replaced
2949         https://bugs.webkit.org/show_bug.cgi?id=99194
2950
2951         Reviewed by Eric Seidel.
2952
2953         Correctly breaking lines after inline replaced elements that follow inline flows. Previously, alternating
2954         these two types of elements would cause us to increase our preferred width forever.
2955
2956         Test: fast/block/block-with-inline-replaced-children-in-inline-flows.html
2957
2958         * rendering/RenderBlock.cpp:
2959         (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
2960
2961 2012-10-15  Emil A Eklund  <eae@chromium.org>
2962
2963         Revert rounding change in RenderTable::paintObject
2964         https://bugs.webkit.org/show_bug.cgi?id=99364
2965
2966         Reviewed by Levi Weintraub.
2967
2968         Bug 91410 changed RenderTable::paintObject to round the offset
2969         in order to avoid table-background bleed through. The root cause
2970         for that has since been fixed and the rounding workaround is no
2971         longer needed. This change reverts the code change from bug
2972         91410 while preserving the test added as a part of that change
2973         as it now passes without the workaround.
2974
2975         No new tests, covered by fast/sub-pixel/table-rows-no-gaps-expected.html
2976
2977         * rendering/RenderTable.cpp:
2978         (WebCore::RenderTable::paintObject):
2979         Remove unnecessary rounding.
2980
2981 2012-10-15  Michelangelo De Simone  <michelangelo@webkit.org>
2982
2983         [CSS Shaders] Add CustomFilterProgramType to CustomFilterProgramInfo
2984         https://bugs.webkit.org/show_bug.cgi?id=96448
2985
2986         Reviewed by Kenneth Rohde Christiansen.
2987
2988         CustomFilterProgramInfo has been refactored to decouple the CustomFilterProgramType from
2989         the CustomFilterProgramMixSetting: m_mixSettings.enabled was redundant in light of the fact
2990         that m_programType encoded the very same information. Dependencies have been updated to reflect
2991         this change.
2992
2993         Current tests already cover this code.
2994
2995         * css/CSSComputedStyleDeclaration.cpp: 
2996         (WebCore::CSSComputedStyleDeclaration::valueForFilter): The check for mixSettings.enabled has been replaced
2997         by an explicit check for PROGRAM_TYPE_BLENDS_ELEMENT_TEXTURE program type.
2998         * css/StyleResolver.cpp:
2999         (WebCore::StyleResolver::createCustomFilterOperation): Setting the program type explicitly while creating a
3000         new filter program.
3001         * platform/graphics/filters/CustomFilterProgram.cpp:
3002         (WebCore::CustomFilterProgram::CustomFilterProgram): CustomFilterProgram's constructor has been updated to
3003         reflect the need of setting the program type explicitly.
3004         (WebCore::CustomFilterProgram::programInfo): Updated to create new CustomFilterProgramInfo setting the program
3005         type explicitly.
3006         * platform/graphics/filters/CustomFilterProgram.h:
3007         * platform/graphics/filters/CustomFilterProgramInfo.cpp:
3008         (WebCore::CustomFilterProgramInfo::CustomFilterProgramInfo): Added m_programType and udpated the related getter.
3009         (WebCore::CustomFilterProgramInfo::hash): ditto
3010         (WebCore::CustomFilterProgramInfo::operator==): MixSettings' equality check is being performed only whether
3011         the CustomFilterProgramInfo's program type is PROGRAM_TYPE_BLENDS_ELEMENT_TEXTURE.
3012         * platform/graphics/filters/CustomFilterProgramInfo.h:
3013         (WebCore::CustomFilterProgramMixSettings::CustomFilterProgramMixSettings): Got rid of the redundant enabled flag.
3014         (WebCore::CustomFilterProgramMixSettings::operator==): ditto
3015         (CustomFilterProgramInfo):
3016         (WebCore::CustomFilterProgramInfo::programType):
3017         * platform/graphics/filters/CustomFilterValidatedProgram.cpp: The right shader validator is now being
3018         created according to the program type.
3019         (WebCore::CustomFilterValidatedProgram::CustomFilterValidatedProgram):
3020         (WebCore::CustomFilterValidatedProgram::rewriteMixVertexShader): The reference to MixSettings' enabled flag
3021         has been replaced with a check for the program type.
3022         (WebCore::CustomFilterValidatedProgram::rewriteMixFragmentShader): ditto
3023         * rendering/style/StyleCustomFilterProgram.h:
3024         (WebCore::StyleCustomFilterProgram::create): Updated to be aware of the program type.
3025         (WebCore::StyleCustomFilterProgram::StyleCustomFilterProgram): ditto
3026
3027 2012-10-15  Joshua Bell  <jsbell@chromium.org>
3028
3029         IndexedDB: Key paths should support non-ASCII identifiers
3030         https://bugs.webkit.org/show_bug.cgi?id=98814
3031
3032         Reviewed by Kentaro Hara.
3033
3034         Update the parser for key paths to use the unicode classes from
3035         the IdentifierName production in ECMA-262.
3036
3037         Test: storage/indexeddb/keypath-basics.html
3038
3039         * Modules/indexeddb/IDBKeyPath.cpp:
3040         (WebCore):
3041         (WebCore::IDBKeyPathLexer::lexIdentifier):
3042
3043 2012-10-15  Yael Aharon  <yael.aharon@intel.com>
3044
3045         [EFL][WK2][Texmap] Set gl context in GraphicsContext3DPrivate
3046         https://bugs.webkit.org/show_bug.cgi?id=99325
3047
3048         Reviewed by Kenneth Rohde Christiansen.
3049
3050         Based on a patch from Regina Chung.
3051         This piece of code was lost in the final patch of https://bugs.webkit.org/show_bug.cgi?id=96627.
3052         The gl context is used as key in a hash map and cannot be NULL.
3053
3054         No new tests. Accelerated compositing is not yet enabled in the EFL port.
3055
3056         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
3057         (WebCore::GraphicsContext3D::GraphicsContext3D):
3058
3059 2012-10-15  Mike West  <mkwst@chromium.org>
3060
3061         Console messages containing long URLs should cut at some reasonable length.
3062         https://bugs.webkit.org/show_bug.cgi?id=97980
3063
3064         Reviewed by Pavel Feldman.
3065
3066         This patch lightly modifies the current styling of linkified URLs inside
3067         console messages in order to cut them down to some reasonable size for
3068         viewing. The middle of the URL is snipped out such that the whole
3069         thing fits into 150 characters. This only effects the displayed text;
3070         the link's href isn't changed; the link remains available via the
3071         context menu, accessible via the title attribute, and clicking it still
3072         takes the user directly to the resource in question.
3073
3074         Test: inspector/console/console-trim-long-urls.html
3075
3076         * inspector/front-end/ResourceUtils.js:
3077         (WebInspector.linkifyURLAsNode):
3078             Trim the middle of the URL to bring the whole string down to  down
3079             to 150 characters, and set the link's title to the full URL.
3080
3081 2012-10-15  Tony Chang  <tony@chromium.org>
3082
3083         Add computeLogicalHeight override methods to RenderView and RenderMultiColumnSet
3084         https://bugs.webkit.org/show_bug.cgi?id=99348
3085
3086         Reviewed by Ojan Vafai.
3087
3088         Add computeLogicalHeight to the last 2 RenderBoxes that override the method.
3089         I'm unable to remove RenderMultiColumnSet::updateLogicalHeight and make the method
3090         non-virtual since it sets ComputedColumnHeight.  I'd like to remove this
3091         eventually.
3092
3093         No new tests, this is just a code refactor.
3094
3095         * rendering/RenderMultiColumnSet.cpp:
3096         (WebCore::RenderMultiColumnSet::updateLogicalHeight): Set computedColumnHeight.
3097         (WebCore::RenderMultiColumnSet::computeLogicalHeight):
3098         (WebCore):
3099         * rendering/RenderMultiColumnSet.h:
3100         (RenderMultiColumnSet):
3101         * rendering/RenderView.cpp:
3102         (WebCore::RenderView::computeLogicalHeight):
3103         * rendering/RenderView.h:
3104
3105 2012-10-15  Eunmi Lee  <eunmi15.lee@samsung.com>
3106
3107         [EFL][WK2] Refactoring initialization and shutdown codes of EFL libraries.
3108         https://bugs.webkit.org/show_bug.cgi?id=97173
3109
3110         Reviewed by Gyuyoung Kim.
3111
3112         Remove codes to initialize and shutdown the EFL libraries from
3113         RunLoopEfl.cpp. Initialization and shutdown will be done in the
3114         ewk_main.cpp for ui process and WebProcessMainEfl.cpp for web
3115         process.
3116
3117         No new tests. This patch doesn't change behavior.
3118
3119         * platform/efl/RunLoopEfl.cpp:
3120         (WebCore::RunLoop::RunLoop):
3121         (WebCore::RunLoop::~RunLoop):
3122
3123 2012-10-15  Mihnea Ovidenie  <mihnea@adobe.com>
3124
3125         [CSSRegions]Add support for auto-height regions (without region-breaks)
3126         https://bugs.webkit.org/show_bug.cgi?id=97533
3127
3128         Reviewed by Julien Chaffraix.
3129
3130         Implement the 2pass layout algorithm for computing the height of regions with auto logical height, without taking region breaks into account.
3131         The algorithm is described in the CSSRegions spec: http://dev.w3.org/csswg/css3-regions/#regions-visual-formatting-steps
3132
3133         When the flow thread contains regions with auto logical height, a 2pass layout algorithm is needed to determine the height of auto logical height regions.
3134         In each step of the layout, the regions are laid out before the flow thread is laid out.
3135
3136         In the first pass of layout (normal layout phase), the content of the flow thread is laid out unconstrained in the regions. The region marked as having auto logical height
3137         displays all the corresponding content from the flow thread (taking min-height and max-height into account), and the height of the content displayed
3138         determines the overridden logical content height. Thus, after the first pass of layout, each auto logical height region will store the logical height
3139         value for the second pass in its overridden logical content height property.
3140
3141         In the second pass of layout (constrained flow threads layout phase), when the content of the flow thread is laid out constrained in the regions, the regions are laid out again and they are using
3142         the overridden logical content height from the first pass to update their logical height. Then, the flow thread content is laid out in the associated region chain,
3143         for which the auto logical height regions have proper logical height.
3144
3145         A future patch will properly take region breaks into account for the first pass of layout.
3146
3147         Tests: fast/regions/autoheight-abspos-region.html
3148                fast/regions/autoheight-floatright-region.html
3149                fast/regions/autoheight-horizontal-bt.html
3150                fast/regions/autoheight-inlineblock-normalflow-region.html
3151                fast/regions/autoheight-maxheight-region.html
3152                fast/regions/autoheight-minheight-region.html
3153                fast/regions/autoheight-normalflow-region.html
3154                fast/regions/autoheight-vertical-lr.html
3155                fast/regions/autoheight-vertical-rl.html
3156
3157         * rendering/FlowThreadController.cpp:
3158         (WebCore::FlowThreadController::resetRegionsOverrideLogicalContentHeight):
3159         For all the auto logical height regions, resets their associated overrideLogicalContentHeight.
3160         Those regions are marked as needing layout (along with their ancestors).
3161         (WebCore::FlowThreadController::markAutoLogicalHeightRegionsForLayout):
3162         Mark all the auto logical height regions and their associated flow thread as needing layout (along with their ancestors).
3163         * rendering/FlowThreadController.h:
3164         * rendering/RenderBox.cpp:
3165         Add helper functions to clear out individual logical content width/height.
3166         (WebCore::RenderBox::clearOverrideLogicalContentHeight):
3167         (WebCore::RenderBox::clearOverrideLogicalContentWidth):
3168         (WebCore::RenderBox::clearOverrideSize):
3169         * rendering/RenderBox.h:
3170         * rendering/RenderFlowThread.cpp:
3171         (WebCore::RenderFlowThread::layout):
3172         (WebCore::RenderFlowThread::computeLogicalHeight):
3173         If the flow thread has an auto logical height region for which we did not yet compute the overrideLogicalContentHeight value,
3174         bail out early since we cannot compute the flow thread logical height.
3175         (WebCore::RenderFlowThread::regionAtBlockOffset):
3176         If the offset is inside an auto logical height region for which we did not compute the overrideLogicalContentHeight, then we consider this region tall enough to accommodate all
3177         the content and we return this region. Otherwise, for an auto logical height region, we use either the overrideLogicalContentHeight (if we are in the first layout phase) or
3178         the logicalHeight if we are in the second layout phase (because the overriderLogicalContentHeight was already transferred into region logical height).
3179         (WebCore::RenderFlowThread::pageLogicalHeightForOffset):
3180         (WebCore::RenderFlowThread::pageRemainingLogicalHeightForOffset):
3181         (WebCore::RenderFlowThread::computeOverflowStateForRegions):
3182         (WebCore::RenderFlowThread::resetRegionsOverrideLogicalContentHeight):
3183         (WebCore::RenderFlowThread::markAutoLogicalHeightRegionsForLayout):
3184         (WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
3185         (WebCore::RenderFlowThread::addForcedRegionBreak):
3186         Simulate a region break at the specified offset. It will be extended to properly process the region breaks. At this moment, only one auto height region for a thread
3187         can have its height properly computed.
3188         * rendering/RenderFlowThread.h:
3189         * rendering/RenderNamedFlowThread.cpp:
3190         (WebCore::boxIntersectsRegion):
3191         * rendering/RenderRegion.cpp:
3192         (WebCore::RenderRegion::updateLogicalHeight):
3193         If the auto logical height region has an overrideLogicalContentHeight and we are in the second pass of layout,
3194         we use the overrideLogicalContentHeight to update the region logical height.
3195         (WebCore::RenderRegion::needsOverrideLogicalContentHeightComputation):
3196         * rendering/RenderRegion.h:
3197         * rendering/RenderView.cpp:
3198         (WebCore::RenderView::RenderView):
3199         (WebCore::RenderView::layoutContent):
3200         Added a new function to contain the RenderView block layout and flow threads layout.
3201         (WebCore::RenderView::checkLayoutState):
3202         Helper function keeping the original asserts from RenderView, used in more than one place.
3203         (WebCore::RenderView::layout):
3204         * rendering/RenderView.h:
3205         (WebCore::RenderView::normalLayoutPhase):
3206         (WebCore::RenderView::constrainedFlowThreadsLayoutPhase):
3207
3208 2012-10-15  Eugene Klyuchnikov  <eustas.bug@gmail.com>
3209
3210         Web Inspector: Fix memory leak in TreeOutline
3211         https://bugs.webkit.org/show_bug.cgi?id=99307
3212
3213         Reviewed by Alexander Pavlov.
3214
3215         Added cleanup of empty buckets in elements cache.
3216
3217         * inspector/front-end/treeoutline.js:
3218
3219 2012-10-15  Eugene Klyuchnikov  <eustas.bug@gmail.com>
3220
3221         Web Inspector: Hide useless controls in remote-debugging mode.
3222         https://bugs.webkit.org/show_bug.cgi?id=99300
3223
3224         Reviewed by Vsevolod Vlasov.
3225
3226         "Close inspector" and "change docking mode" buttons seem to be rather
3227         useless in remote debugging mode.
3228
3229         * inspector/front-end/inspector.css:
3230         (body.remote .toolbar-item.close-left, body.remote .toolbar-item.close-right):
3231         (body.remote .dock-status-bar-item):
3232
3233 2012-10-15  Christophe Dumez  <christophe.dumez@intel.com>
3234
3235         [EFL][WK2] Implement Favicons API
3236         https://bugs.webkit.org/show_bug.cgi?id=99087
3237
3238         Reviewed by Kenneth Rohde Christiansen.
3239
3240         Moved ewk_util from WebKit to WebCore and rename it
3241         to CairoUtilityEfl so that the code can be shared
3242         between WebKit1 and WebKit2. Some related utility
3243         code was also moved from RenderThemeEfl to
3244         CairoUtilityEfl.
3245
3246         No new tests, no behavior change.
3247
3248         * PlatformEfl.cmake:
3249         * platform/efl/RenderThemeEfl.cpp:
3250         * platform/graphics/efl/CairoUtilitiesEfl.cpp: Renamed from Source/WebKit/efl/ewk/ewk_util.cpp.
3251         (WebCore):
3252         (WebCore::evasObjectFromCairoImageSurface):
3253         (WebCore::createSurfaceForBackingStore):
3254         * platform/graphics/efl/CairoUtilitiesEfl.h: Renamed from Source/WebKit/efl/ewk/ewk_util_private.h.
3255         (WebCore):
3256
3257 2012-10-15  Beth Dakin  <bdakin@apple.com>
3258
3259         https://bugs.webkit.org/show_bug.cgi?id=99350
3260         REGRESSION (r131238): Repro crash in 
3261        WebCore::ScrollingStateTree::removeNode(WebCore::ScrollingStateNode*) 
3262         opening pdf page
3263         -and corresponding-
3264         <rdar://problem/12499839>
3265
3266         Reviewed by Simon Fraser.
3267
3268         We have to null-check node here. It won't be found if  
3269         clearStateTree() was recently called.
3270         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
3271         (WebCore::ScrollingCoordinatorMac::detachFromStateTree):
3272
3273 2012-10-15  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
3274
3275         [BlackBerry] replace BlackBerry::Platform::log() with BBLOG()
3276         https://bugs.webkit.org/show_bug.cgi?id=99302
3277
3278         Reviewed by Rob Buis.
3279
3280         RIM PR: 210884
3281         The marco BBLOG() is defined as a no-op in release mode which will
3282         save a function call in the release build.
3283         Internally reviewed by Charles Wei.
3284
3285         No new tests since there's no functional change.
3286
3287         * platform/blackberry/PlatformKeyboardEventBlackBerry.cpp:
3288         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
3289         * platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp:
3290         (WebCore::GraphicsContext3D::logFrameBufferStatus):
3291         * platform/graphics/blackberry/LayerCompositingThread.cpp:
3292         (WebCore::LayerCompositingThread::getTransformedHolePunchRect):
3293         * platform/graphics/blackberry/VideoLayerWebKitThread.cpp:
3294         (WebCore::VideoLayerWebKitThread::setHolePunchRect):
3295         (WebCore::VideoLayerWebKitThread::boundsChanged):
3296         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
3297         (WebCore::GraphicsContext3D::compileShader):
3298
3299 2012-10-15  Christophe Dumez  <christophe.dumez@intel.com>
3300
3301         [EFL] Provide logging for OnlineState detection code
3302         https://bugs.webkit.org/show_bug.cgi?id=99299
3303
3304         Reviewed by Kenneth Rohde Christiansen.
3305
3306         Add logging to NetworkStateNotifierEfl.cpp to facilitate
3307         debugging of this functionality.
3308
3309         No new tests, no behavior change.
3310
3311         * platform/network/efl/NetworkStateNotifierEfl.cpp:
3312         (WebCore::NetworkStateNotifier::updateState):
3313
3314 2012-10-15  MORITA Hajime  <morrita@google.com>
3315
3316         [Regression r131167] run-webkit-tests fails
3317         https://bugs.webkit.org/show_bug.cgi?id=99279
3318
3319         Reviewed by Kentaro Hara.
3320
3321         CodeGeneratorV8.pm assumed that there are only two objects which have constructor getters and
3322         overlooked TestObj. This fix relaxes that assumption to accept it.
3323
3324         No new tests. Fixing an existing test.
3325
3326         * bindings/scripts/CodeGeneratorV8.pm:
3327         (GenerateConstructorGetter):
3328         * bindings/scripts/test/V8/V8TestObj.cpp:
3329         (WebCore::TestObjV8Internal::TestObjConstructorGetter):
3330
3331 2012-10-15  Joe Mason  <jmason@rim.com>
3332
3333         [BlackBerry] Fix WebSockets which was disabled by recent string changes
3334         https://bugs.webkit.org/show_bug.cgi?id=99248
3335
3336         Reviewed by George Staikos.
3337
3338         PR 223681: The signature of FilterStream::notifyStatusReceived changed to take a
3339         BlackBerry::Platform::String instead of a char *. But SocketStreamHandleBlackBerry was not
3340         updated to the new signature, so the status message is not getting passed on because it is
3341         not calling the correct override.
3342
3343         No new tests because this is fixing a regression.
3344
3345         * platform/network/blackberry/SocketStreamHandle.h:
3346         (SocketStreamHandle):
3347         * platform/network/blackberry/SocketStreamHandleBlackBerry.cpp:
3348         (WebCore::SocketStreamHandle::notifyStatusReceived):
3349
3350 2012-10-15  Rob Buis  <rbuis@rim.com>
3351
3352         Remove RenderTextControl::isSelectableElement
3353         https://bugs.webkit.org/show_bug.cgi?id=99334
3354
3355         Reviewed by Andreas Kling.
3356
3357         It seems this method is not used anymore.
3358
3359         * WebCore.order:
3360         * rendering/RenderTextControl.h:
3361
3362 2012-10-15  Mike West  <mkwst@chromium.org>
3363
3364         CSP source expressions should support paths at file-level granularity.
3365         https://bugs.webkit.org/show_bug.cgi?id=99250
3366
3367         Reviewed by Adam Barth.
3368
3369         After a bit of discussion on public-webappsec[1], path support for CSP
3370         source expressions has been tuned to support file-level granularity. In
3371         particular, this means that:
3372
3373         - 'example.com/js' matches a file named 'js'
3374         - 'example.com/js/' matches all files under a directory named 'js'
3375           (note the trailing slash)
3376         - 'example.com/js/file.js' matches only a file named 'file.js'
3377           inside a directory named 'js'
3378
3379         Though this is part of the CSP 1.1 spec, it continues to be exposed
3380         outside the CSP_NEXT flag for back-compatibility.
3381
3382         Test cases have been added to the existing
3383         http/tests/security/contentSecurityPolicy/source-list-parsing-paths-*
3384         in order ensure that the new functionality works correctly.
3385
3386         * page/ContentSecurityPolicy.cpp:
3387         (WebCore::CSPSource::pathMatches):
3388             If the path ends with '/', do a prefix check. If not, check for an
3389             exact match.
3390         (WebCore::CSPSourceList::parsePath):
3391             Don't automatically append a '/' to paths.
3392
3393 2012-10-15  George Staikos  <staikos@webkit.org>
3394
3395         [BlackBerry] Adapt to Platform API changes in string handling
3396         https://bugs.webkit.org/show_bug.cgi?id=99248
3397
3398         Reviewed by Yong Li.
3399
3400         Convert usage of WebString, char* and std::string to BlackBerry::Platform::String.
3401
3402         * html/track/TextTrack.cpp:
3403         (WebCore::TextTrack::TextTrack): Fix the build for BlackBerry.
3404         * page/blackberry/SettingsBlackBerry.cpp:
3405         (WebCore):
3406         (WebCore::Settings::initializeDefaultFontFamilies):
3407         * platform/blackberry/LocalizedStringsBlackBerry.cpp:
3408         * platform/blackberry/MIMETypeRegistryBlackBerry.cpp:
3409         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
3410         (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
3411         * platform/blackberry/PasteboardBlackBerry.cpp:
3412         (WebCore::Pasteboard::writeSelection):
3413         (WebCore::Pasteboard::writeURL):
3414         (WebCore::Pasteboard::writePlainText):
3415         (WebCore::Pasteboard::plainText):
3416         (WebCore::Pasteboard::documentFragment):
3417         * platform/blackberry/ReadOnlyLatin1String.h: Removed.
3418         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
3419         (WebCore::MediaPlayerPrivate::getSupportedTypes):
3420         (WebCore::MediaPlayerPrivate::supportsType):
3421         (WebCore::MediaPlayerPrivate::setCertificatePath):
3422         (WebCore::MediaPlayerPrivate::load):
3423         (WebCore::generateProtectionSpaceFromMMRAuthChallenge):
3424         (WebCore::MediaPlayerPrivate::onAuthenticationNeeded):
3425         (WebCore::MediaPlayerPrivate::onAuthenticationAccepted):
3426         (WebCore::MediaPlayerPrivate::lookupMediaStream):
3427         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
3428         (MediaPlayerPrivate):
3429         (WebCore::MediaPlayerPrivate::engineDescription):
3430         * platform/network/blackberry/DNSBlackBerry.cpp:
3431         (WebCore::prefetchDNS):
3432         * platform/network/blackberry/NetworkJob.cpp:
3433         (WebCore::NetworkJob::initialize):
3434         (WebCore::NetworkJob::notifyStatusReceived):
3435         (WebCore::NetworkJob::notifyHeadersReceived):
3436         (WebCore::NetworkJob::handleNotifyClose):
3437         (WebCore::NetworkJob::sendRequestWithCredentials):
3438         * platform/network/blackberry/NetworkJob.h:
3439         (NetworkJob):
3440         * platform/network/blackberry/NetworkManager.cpp: