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