Source/WebCore: Crash in DeleteSelectionCommand::handleGeneralDelete when attempting...
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-01-31  Ryosuke Niwa  <rniwa@webkit.org>
2
3         Crash in DeleteSelectionCommand::handleGeneralDelete when attempting to delete the start block
4         https://bugs.webkit.org/show_bug.cgi?id=77077
5
6         Reviewed by Enrica Casucci.
7
8         The crash was caused by a missing null check after removing the position out of the start block.
9         Fixed the bug by adding an early return.
10
11         Tests: editing/deleting/delete-start-block.html
12                editing/selection/move-into-empty-root-inline-box.html
13
14         * editing/DeleteSelectionCommand.cpp:
15         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
16
17 2012-01-31  Rafael Brandao  <rafael.lobo@openbossa.org>
18
19         HTMLIsIndexElement should not expose HTMLInputElement properties
20         https://bugs.webkit.org/show_bug.cgi?id=76095
21
22         Reviewed by Eric Seidel.
23
24         This is a buildfix for r106373.
25
26         * DerivedSources.pri: Removed reference to HTMLIsIndexElement.idl
27
28 2012-01-31  Yongsheng Zhu  <yongsheng.zhu@intel.com>
29
30         WebGL must allocate smaller drawing buffer when the allocation fails. 
31         https://bugs.webkit.org/show_bug.cgi?id=76654
32
33         Reviewed by Kenneth Russell.
34
35         Test: fast/canvas/webgl/drawingbuffer-test.html
36
37         * platform/graphics/gpu/DrawingBuffer.cpp:
38         (WebCore):
39         (WebCore::DrawingBuffer::create):
40         (WebCore::DrawingBuffer::reset):
41
42 2012-01-25  Eric Seidel  <eric@webkit.org>
43
44         HTMLIsIndexElement should not expose HTMLInputElement properties
45         https://bugs.webkit.org/show_bug.cgi?id=76095
46
47         Reviewed by Adam Barth.
48
49         document.createElement("isindex") should produce an HTMLUnknownElement
50         per the HTML5 spec.  The parser automagically translates <isindex> into
51         a whole dom tree roughly representing what <isindex> used to do 15 years ago. :)
52
53         This patch just removes our support for HTMLIsIndexElement.  The parser
54         support was already in.  Having support for HTMLIsIndexElement was causing
55         one of the IE TestCenter tests to fail.
56
57         Test: fast/dom/HTMLIsIndexElement/prototype-chain.html
58
59         * DerivedSources.cpp:
60         * DerivedSources.make:
61         * DerivedSources.pri:
62         * GNUmakefile.list.am:
63         * Target.pri:
64         * WebCore.exp.in:
65         * WebCore.gypi:
66         * WebCore.order:
67         * WebCore.vcproj/WebCore.vcproj:
68         * WebCore.xcodeproj/project.pbxproj:
69         * bindings/gobject/GNUmakefile.am:
70         * bindings/gobject/WebKitHTMLElementWrapperFactory.cpp:
71         (WebKit::createHTMLElementWrapper):
72         * bindings/objc/DOM.mm:
73         (WebCore::createElementClassMap):
74         * bindings/objc/DOMHTML.h:
75         * bindings/objc/PublicDOMInterfaces.h:
76         * html/HTMLElementsAllInOne.cpp:
77         * html/HTMLIsIndexElement.cpp: Removed.
78         * html/HTMLIsIndexElement.h: Removed.
79         * html/HTMLIsIndexElement.idl: Removed.
80         * html/HTMLTagNames.in:
81         * page/DOMWindow.idl:
82
83 2012-01-31  Alexis Menard  <alexis.menard@openbossa.org>
84
85         Unreviewed include cleanup.
86
87         Tested locally on Qt and Chromium port.
88
89         * dom/Node.cpp:
90
91 2012-01-31  Arko Saha  <arko@motorola.com>
92
93         The spec renamed addTrack() to addTextTrack().
94         https://bugs.webkit.org/show_bug.cgi?id=77381
95
96         Reviewed by Eric Carlson.
97
98         Renamed addTrack() to addTextTrack().
99         Spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#media-elements
100
101         * html/HTMLMediaElement.cpp:
102         (WebCore::HTMLMediaElement::addTextTrack):
103         * html/HTMLMediaElement.h:
104         (WebCore::HTMLMediaElement::addTextTrack):
105         * html/HTMLMediaElement.idl:
106
107 2012-01-31  Peter Rybin  <peter.rybin@gmail.com>
108
109         Web Inspector: CodeGeneratorInspector.py: reimplement generated array types
110         https://bugs.webkit.org/show_bug.cgi?id=77289
111
112         Reviewed by Vsevolod Vlasov.
113
114         Arrays are now rendered as a single template class. Its type-specific
115         details are provided by an additional ArrayItemHelper class that is
116         defined using C++ specialization technique.
117
118         * inspector/CodeGeneratorInspector.py:
119         (RawTypes.String):
120         (RawTypes.String.get_array_item_raw_c_type_text):
121         (RawTypes.Int):
122         (RawTypes.Int.get_array_item_raw_c_type_text):
123         (RawTypes.Number):
124         (RawTypes.Number.get_array_item_raw_c_type_text):
125         (RawTypes.Bool):
126         (RawTypes.Bool.get_array_item_raw_c_type_text):
127         (RawTypes.Object):
128         (RawTypes.Object.get_array_item_raw_c_type_text):
129         (RawTypes.Any):
130         (RawTypes.Any.get_array_item_raw_c_type_text):
131         (RawTypes.Array):
132         (RawTypes.Array.get_array_item_raw_c_type_text):
133         (RawTypes):
134         (TypeBindings.create_type_declaration_.EnumBinding):
135         (TypeBindings.create_type_declaration_.EnumBinding.get_array_item_c_type_text):
136         (TypeBindings.create_type_declaration_.PlainString):
137         (TypeBindings.create_type_declaration_.PlainString.get_array_item_c_type_text):
138         (TypeBindings.create_type_declaration_.TypedefString):
139         (TypeBindings.create_type_declaration_.TypedefString.get_array_item_c_type_text):
140         (StructItemTraits):
141         (get_array_item_c_type_text):
142         (PlainObjectBinding):
143         (PlainObjectBinding.get_array_item_c_type_text):
144         (AdHocTypeContext):
145         (AdHocTypeContext.get_type_name_fix):
146         (AdHocTypeContext.add_type):
147         (ArrayBinding):
148         (ArrayBinding.resolve_inner):
149         (ArrayBinding.resolve_inner.ResolveData):
150         (ArrayBinding.request_user_runtime_cast):
151         (ArrayBinding.request_internal_runtime_cast):
152         (ArrayBinding.get_code_generator):
153         (ArrayBinding.get_code_generator.CodeGenerator):
154         (ArrayBinding.get_code_generator.CodeGenerator.generate_type_builder):
155         (ArrayBinding.get_code_generator.CodeGenerator.generate_forward_declaration):
156         (ArrayBinding.get_code_generator.CodeGenerator.register_use):
157         (ArrayBinding.get_code_generator.CodeGenerator.get_generate_pass_id):
158         (ArrayBinding.get_validator_call_text):
159         (ArrayBinding.get_in_c_type_text):
160         (ArrayBinding.get_array_item_c_type_text):
161         (ArrayBinding.get_setter_value_expression_pattern):
162         (ArrayBinding.reduce_to_raw_type):
163         (RawTypeBinding.get_array_item_c_type_text):
164         (ArrayItemHelper):
165         (typename):
166         (ArrayOf):
167         (Traits):
168
169 2012-01-31  Antti Koivisto  <antti@apple.com>
170
171         Parent SVGFontFaceElements style declaration to the rule
172         https://bugs.webkit.org/show_bug.cgi?id=77421
173
174         Reviewed by Adam Roben.
175
176         For some reason the declaration is parented to the element which adds a bunch of unnecessary special case code.
177         The invalidation on mutation is done explicitly by SVGFontFaceElement so that is not affected. The declaration
178         is not exposed so the change is not observable with a test.
179
180         * css/CSSFontFaceRule.cpp:
181         (WebCore::CSSFontFaceRule::~CSSFontFaceRule):
182         * css/CSSMutableStyleDeclaration.h:
183         (WebCore::CSSMutableStyleDeclaration::createInline):
184         * svg/SVGFontFaceElement.cpp:
185         (WebCore::SVGFontFaceElement::SVGFontFaceElement):
186         (WebCore::SVGFontFaceElement::parseMappedAttribute):
187         (WebCore::SVGFontFaceElement::fontFamily):
188         (WebCore::SVGFontFaceElement::rebuildFontFace):
189         * svg/SVGFontFaceElement.h:
190         
191             Remove the unnecessary m_styleDeclaration field, access through m_fontFaceRule instead.
192
193 2012-01-31  Kenneth Rohde Christiansen  <kenneth@webkit.org>
194
195         Tap highlighting: Support better outlines for multiline inlines
196         https://bugs.webkit.org/show_bug.cgi?id=77428
197
198         Reviewed by Simon Hausmann.
199
200         Covered by manual tests.
201
202         Do not use the linesBoundingBox anymore but draw a custom path
203         with rounded corners. Inlines are drawn as max 3 rects, first
204         line rect, joined middle rect and the rect for the last line.
205
206         * page/GestureTapHighlighter.cpp:
207         * platform/graphics/Path.h: Make addBeziersForRoundedRect public.
208
209 2012-01-31  Alexei Filippov  <alexeif@chromium.org>
210
211         Web Inspector: show sizes in bytes instead of KB, MB in heap profiler.
212         https://bugs.webkit.org/show_bug.cgi?id=77199
213
214         Reviewed by Pavel Feldman.
215
216         * inspector/front-end/DetailedHeapshotGridNodes.js:
217         (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data):
218         (WebInspector.HeapSnapshotInstanceNode.prototype._enhanceData):
219         (WebInspector.HeapSnapshotConstructorNode.prototype.get data):
220         (WebInspector.HeapSnapshotDiffNode.prototype.get data):
221         * inspector/front-end/UIUtils.js:
222         (Number.withThousandsSeparator):
223
224 2012-01-26  Hans Wennborg  <hans@chromium.org>
225
226         Speech Input: move MockSpeechInputClient into Chromium DumpRenderTree implementation
227         https://bugs.webkit.org/show_bug.cgi?id=77083
228
229         Reviewed by Darin Fisher.
230
231         Remove SpeechInputClientMock. The mock is moving to the DumpRenderTree
232         implementation.
233
234         No new tests, just refactoring.
235
236         * GNUmakefile.list.am:
237         * Target.pri:
238         * WebCore.gypi:
239         * WebCore.vcproj/WebCore.vcproj:
240         * WebCore.xcodeproj/project.pbxproj:
241         * platform/mock/SpeechInputClientMock.cpp: Removed.
242         * platform/mock/SpeechInputClientMock.h: Removed.
243
244 2012-01-31  Pavel Feldman  <pfeldman@google.com>
245
246         Web Inspector: boost protocol version to 1.0
247         https://bugs.webkit.org/show_bug.cgi?id=77408
248
249         Reviewed by Yury Semikhatsky.
250
251         * inspector/Inspector-1.0.json: Copied from Source/WebCore/inspector/Inspector.json.
252         * inspector/Inspector.json:
253
254 2012-01-31  Roland Steiner  <rolandsteiner@chromium.org>
255
256         <style scoped>: Improve shortcut code for cases where <style scoped> isn't used
257         https://bugs.webkit.org/show_bug.cgi?id=77410
258
259         Move shortcut from setupScopingElementStack(), do it at the calling sites instead
260         (where a larger chunk of work can be skipped).
261
262         Reviewed by Antti Koivisto.
263
264         No new tests. (refactoring)
265
266         * css/CSSStyleSelector.cpp:
267         (WebCore::CSSStyleSelector::setupScopingElementStack): remove shortcut code
268         (WebCore::CSSStyleSelector::pushParent): add shortcut code
269         (WebCore::CSSStyleSelector::matchScopedAuthorRules): factor matching scoped rules out from matchAuthorRules
270         (WebCore::CSSStyleSelector::matchAuthorRules): add shortcut code
271         * css/CSSStyleSelector.h:
272         (CSSStyleSelector): add matchScopedAuthorRules
273
274 2012-01-31  Pavel Feldman  <pfeldman@google.com>
275
276         Web Inspector: DOMDebugger.setEventListenerBreakpoint should accept regular DOM event names.
277         https://bugs.webkit.org/show_bug.cgi?id=77409
278
279         Reviewed by Yury Semikhatsky.
280
281         * inspector/Inspector.json:
282         * inspector/InspectorDOMDebuggerAgent.cpp:
283         (WebCore::InspectorDOMDebuggerAgent::setEventListenerBreakpoint):
284         (WebCore):
285         (WebCore::InspectorDOMDebuggerAgent::setInstrumentationBreakpoint):
286         (WebCore::InspectorDOMDebuggerAgent::setBreakpoint):
287         (WebCore::InspectorDOMDebuggerAgent::removeEventListenerBreakpoint):
288         (WebCore::InspectorDOMDebuggerAgent::removeInstrumentationBreakpoint):
289         (WebCore::InspectorDOMDebuggerAgent::removeBreakpoint):
290         (WebCore::InspectorDOMDebuggerAgent::pauseOnNativeEventIfNeeded):
291         * inspector/InspectorDOMDebuggerAgent.h:
292         (InspectorDOMDebuggerAgent):
293         * inspector/InspectorInstrumentation.cpp:
294         (WebCore::InspectorInstrumentation::didInstallTimerImpl):
295         (WebCore::InspectorInstrumentation::didRemoveTimerImpl):
296         (WebCore::InspectorInstrumentation::willHandleEventImpl):
297         (WebCore::InspectorInstrumentation::willFireTimerImpl):
298         (WebCore::InspectorInstrumentation::pauseOnNativeEventIfNeeded):
299         * inspector/InspectorInstrumentation.h:
300         (InspectorInstrumentation):
301         * inspector/front-end/BreakpointsSidebarPane.js:
302         (WebInspector.EventListenerBreakpointsSidebarPane.prototype._setBreakpoint):
303         (WebInspector.EventListenerBreakpointsSidebarPane.prototype._removeBreakpoint):
304
305 2012-01-31  Pablo Flouret  <pablof@motorola.com>
306
307         Fix compilation errors on build-webkit --debug --no-workers on mac.
308         https://bugs.webkit.org/show_bug.cgi?id=75869
309
310         Reviewed by Adam Barth.
311
312         * WebCore.exp.in:
313
314 2012-01-30  Konrad Piascik  <kpiascik@rim.com>
315
316         Web Inspector: [BlackBerry] Add BlackBerry UA Strings to the Inspector's UA switcher
317         https://bugs.webkit.org/show_bug.cgi?id=77343
318
319         Reviewed by Yury Semikhatsky.
320
321         * inspector/front-end/SettingsScreen.js:
322         (WebInspector.SettingsScreen.prototype._createUserAgentSelectRowElement.get const):
323
324 2012-01-30  Yury Semikhatsky  <yurys@chromium.org>
325
326         Web Inspector: should be possible to step through all event listeners when event listener breakpoint is hit
327         https://bugs.webkit.org/show_bug.cgi?id=77331
328
329         Inspector instrumentation is called before and after each event handler invokation.
330         In case inspector front-end is closed it is no-op, otherwise it may stop execution
331         on an event listener breakpoint.
332
333         Reviewed by Pavel Feldman.
334
335         Test: inspector/debugger/step-through-event-listeners.html
336
337         * dom/EventTarget.cpp:
338         (WebCore::EventTarget::fireEventListeners):
339         * inspector/InspectorInstrumentation.cpp:
340         (WebCore::InspectorInstrumentation::willDispatchEventImpl):
341         (WebCore::InspectorInstrumentation::willHandleEventImpl):
342         (WebCore):
343         (WebCore::InspectorInstrumentation::didHandleEventImpl):
344         (WebCore::InspectorInstrumentation::didDispatchEventImpl):
345         (WebCore::InspectorInstrumentation::willDispatchEventOnWindowImpl):
346         (WebCore::InspectorInstrumentation::didDispatchEventOnWindowImpl):
347         * inspector/InspectorInstrumentation.h:
348         (InspectorInstrumentation):
349         (WebCore::InspectorInstrumentation::willHandleEvent):
350         (WebCore):
351         (WebCore::InspectorInstrumentation::didHandleEvent):
352
353 2011-01-30  Hayato Ito  <hayato@chromium.org>
354
355         Attach light children after removing a shadow root.
356         https://bugs.webkit.org/show_bug.cgi?id=74267
357
358         Reviewed by Ryosuke Niwa.
359
360         Tests: fast/dom/shadow/dynamically-created-shadow-root-expected.html
361                fast/dom/shadow/dynamically-created-shadow-root.html:
362
363         * dom/Element.cpp:
364         (WebCore::Element::removeShadowRoot):
365
366 2012-01-30  Sheriff Bot  <webkit.review.bot@gmail.com>
367
368         Unreviewed, rolling out r106324.
369         http://trac.webkit.org/changeset/106324
370         https://bugs.webkit.org/show_bug.cgi?id=77406
371
372         Broke CCLayerTreeHostTestLayerOcclusion.runMultiThread and
373         runSingleThread (Requested by yuzo1 on #webkit).
374
375         * platform/graphics/FloatRect.cpp:
376         * platform/graphics/FloatRect.h:
377         (WebCore):
378         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
379         (WebCore::Canvas2DLayerChromium::paintContentsIfDirty):
380         * platform/graphics/chromium/Canvas2DLayerChromium.h:
381         (WebCore):
382         (Canvas2DLayerChromium):
383         * platform/graphics/chromium/ContentLayerChromium.cpp:
384         (WebCore::ContentLayerChromium::paintContentsIfDirty):
385         * platform/graphics/chromium/ContentLayerChromium.h:
386         (WebCore):
387         (ContentLayerChromium):
388         * platform/graphics/chromium/ImageLayerChromium.cpp:
389         (WebCore::ImageLayerChromium::paintContentsIfDirty):
390         * platform/graphics/chromium/ImageLayerChromium.h:
391         (WebCore):
392         (ImageLayerChromium):
393         * platform/graphics/chromium/LayerChromium.cpp:
394         * platform/graphics/chromium/LayerChromium.h:
395         (WebCore):
396         (WebCore::LayerChromium::paintContentsIfDirty):
397         (LayerChromium):
398         * platform/graphics/chromium/RenderSurfaceChromium.h:
399         * platform/graphics/chromium/TiledLayerChromium.cpp:
400         * platform/graphics/chromium/TiledLayerChromium.h:
401         (WebCore):
402         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
403         (WebCore::CCLayerTreeHost::paintContentsIfDirty):
404         (WebCore::CCLayerTreeHost::paintMaskAndReplicaForRenderSurface):
405         (WebCore::CCLayerTreeHost::paintLayerContents):
406         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
407         (WebCore):
408         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
409         (WebCore::enclosedIntRect):
410         (WebCore):
411
412 2012-01-30  Raymond Liu  <raymond.liu@intel.com>
413
414         Fix ASSERT fail within AudioBus::processWithGainFrom()
415         https://bugs.webkit.org/show_bug.cgi?id=76685
416
417         Reviewed by Daniel Bates.
418
419         Test: webaudio/audionode-connect-order.html
420
421         * webaudio/AudioBasicProcessorNode.cpp:
422         (WebCore::AudioBasicProcessorNode::AudioBasicProcessorNode):
423
424 2012-01-30  Roland Steiner  <rolandsteiner@chromium.org>
425
426         <style scoped>: Implement scoped stylesheets and basic application
427         https://bugs.webkit.org/show_bug.cgi?id=73190
428
429         Implementing support for <style scoped>:
430         Add a vector stack to CSSStyleSelector that keeps track of encountered scoping elements. This is
431         used for O(1) access to all relevant style sheets for a given element.
432         Adapt matching of author style sheets to also consult appropriate scoped sheets.
433         Finally, prevent style sharing from crossing into/out of scoped style boundaries.
434
435         Reviewed by Antti Koivisto.
436
437         Tests: fast/css/style-scoped/style-scoped-attach.html
438                fast/css/style-scoped/style-scoped-basic.html
439                fast/css/style-scoped/style-scoped-detach.html
440                fast/css/style-scoped/style-scoped-remove-scoped.html
441                fast/css/style-scoped/style-scoped-set-scoped.html
442
443         * css/CSSStyleSelector.cpp:
444         (RuleSet):
445         (WebCore::CSSStyleSelector::CSSStyleSelector): add code for scoped style sheets
446         (WebCore::CSSStyleSelector::collectFeatures): ditto
447         (WebCore):
448         (WebCore::CSSStyleSelector::determineScopingElement): determine whether an author sheet is scoped (and to which scope), or global
449         (WebCore::CSSStyleSelector::scopedRuleSetForElement): returns the RuleSet for the <style scoped> contained by the passed-in element (if any), or 0
450         (WebCore::CSSStyleSelector::appendAuthorStylesheets): add code for scoped style sheets
451         (WebCore::CSSStyleSelector::setupScopingElementStack): determine scoping element ancestors of the given element
452         (WebCore::CSSStyleSelector::pushParent): simplify and refactor SelectorChecker::pushParent, as code in CSStyleSelector needs partial access
453         (WebCore::CSSStyleSelector::popParent): ditto
454         (WebCore::CSSStyleSelector::sortAndTransferMatchedRules): helper function
455         (WebCore::CSSStyleSelector::matchAuthorRules): use AuthorRuleSetIterator to iterate over all relevant RuleSets
456         (WebCore::CSSStyleSelector::matchRules): adapt for scoped style rules
457         (WebCore::CSSStyleSelector::matchAllRules): ditto
458         (WebCore::CSSStyleSelector::locateCousinList): prevent style sharing across scope boundaries
459         (WebCore::CSSStyleSelector::canShareStyleWithElement): ditto
460         (WebCore::CSSStyleSelector::locateSharedStyle): ditto
461         (WebCore::CSSStyleSelector::pseudoStyleForElement): changed call to matchAuthorRules
462         (WebCore::CSSStyleSelector::styleForPage): add comment
463         (WebCore::CSSStyleSelector::checkRegionStyle): add global scope parameter
464         (WebCore::CSSStyleSelector::pseudoStyleRulesForElement): changed call to matchAuthorRules
465         (WebCore::RuleSet::addRulesFromSheet): adapt for scoped style rules
466         * css/CSSStyleSelector.h:
467         (CSSStyleSelector):
468         (WebCore::CSSStyleSelector::ScopeStackFrame::ScopeStackFrame): struct holding an Element pointer and a RuleSet pointer, to be used in a Vector
469         (WebCore::CSSStyleSelector::scopingElementStackIsConsistent): returns if the last seen parent matches the passed-in element
470         * css/SelectorChecker.cpp:
471         (WebCore::SelectorChecker::setupParentStack): set up the parent stack (refactoring)
472         (WebCore::SelectorChecker::pushParent): simplify and refactor
473         * css/SelectorChecker.h:
474         (WebCore::SelectorChecker::popParent): ditto
475         (WebCore::SelectorChecker::parentStackIsEmpty): ditto
476         (WebCore::SelectorChecker::parentStackIsConsistent): make parameter const
477
478 2012-01-30  Dana Jansens  <danakj@chromium.org>
479
480         [chromium] Compute occlusion during paint loop
481         https://bugs.webkit.org/show_bug.cgi?id=76858
482
483         Reviewed by James Robinson.
484
485         New unit tests in TiledLayerChromiumTest.cpp, CCLayerTreeHostCommonTest.cpp, CCLayerTreeHostTest.cpp
486
487         * platform/graphics/FloatRect.cpp:
488         (WebCore::enclosedIntRect):
489         (WebCore):
490         * platform/graphics/FloatRect.h:
491         (WebCore):
492         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
493         (WebCore::Canvas2DLayerChromium::paintContentsIfDirty):
494         * platform/graphics/chromium/Canvas2DLayerChromium.h:
495         (Canvas2DLayerChromium):
496         * platform/graphics/chromium/ContentLayerChromium.cpp:
497         (WebCore::ContentLayerChromium::paintContentsIfDirty):
498         * platform/graphics/chromium/ContentLayerChromium.h:
499         (ContentLayerChromium):
500         * platform/graphics/chromium/ImageLayerChromium.cpp:
501         (WebCore::ImageLayerChromium::paintContentsIfDirty):
502         * platform/graphics/chromium/ImageLayerChromium.h:
503         (ImageLayerChromium):
504         * platform/graphics/chromium/LayerChromium.cpp:
505         (WebCore::LayerChromium::contentToScreenSpaceTransform):
506         (WebCore):
507         (WebCore::LayerChromium::addSelfToOccludedScreenSpace):
508         (WebCore::LayerChromium::isPaintedAxisAlignedInScreen):
509         * platform/graphics/chromium/LayerChromium.h:
510         (WebCore):
511         (WebCore::LayerChromium::paintContentsIfDirty):
512         (LayerChromium):
513         * platform/graphics/chromium/RenderSurfaceChromium.h:
514         (RenderSurfaceChromium):
515         * platform/graphics/chromium/TiledLayerChromium.cpp:
516         (WebCore::TiledLayerChromium::addSelfToOccludedScreenSpace):
517         * platform/graphics/chromium/TiledLayerChromium.h:
518         (WebCore):
519         ():
520         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
521         (WebCore::CCLayerTreeHost::paintContentsIfDirty):
522         (WebCore::CCLayerTreeHost::paintMaskAndReplicaForRenderSurface):
523         (RenderSurfaceRegion):
524         (WebCore):
525         (WebCore::pushTargetRenderSurfaceRegion):
526         (WebCore::popAndPushTargetRenderSurfaceRegion):
527         (WebCore::CCLayerTreeHost::paintLayerContents):
528         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
529         (WebCore):
530         ():
531         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
532
533 2012-01-30  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
534
535         Add ElementAttributeData class to replace internal uses of NamedNodeMap
536         https://bugs.webkit.org/show_bug.cgi?id=77233
537
538         Reviewed by Andreas Kling.
539
540         Move part of non-DOM functionality of NamedNodeMap into a separate class. This is
541         the first step toward the goal of separating NamedNodeMap from internal attribute
542         storage, as described in https://bugs.webkit.org/show_bug.cgi?id=75069.
543
544         The internal attribute storage is exposed as attributeData() in Element, and when
545         necessary (because it has no back pointer to Element) via methods in Element.
546
547         No new tests. Except from setClass() change this is just moving the code, no new
548         feature was added.
549
550         * CMakeLists.txt:
551         * GNUmakefile.list.am:
552         * Target.pri:
553         * WebCore.gypi:
554         * WebCore.xcodeproj/project.pbxproj:
555         * dom/DOMAllInOne.cpp:
556         * dom/Element.cpp:
557         (WebCore::Element::idAttributeChanged):
558         * dom/Element.h:
559         (WebCore::Element::attributeData):
560         (WebCore::Element::ensureAttributeData):
561         (Element):
562         (WebCore::Element::idForStyleResolution):
563         * dom/ElementAttributeData.cpp: Added.
564         (WebCore):
565         (WebCore::ElementAttributeData::setClass): the only caller of this function
566         already deal with the case when the element has no class, so don't do it here.
567         * dom/ElementAttributeData.h: Added.
568         (WebCore):
569         (ElementAttributeData):
570         (WebCore::ElementAttributeData::clearClass):
571         (WebCore::ElementAttributeData::classNames):
572         (WebCore::ElementAttributeData::idForStyleResolution):
573         (WebCore::ElementAttributeData::setIdForStyleResolution):
574         (WebCore::ElementAttributeData::ElementAttributeData):
575         * dom/NamedNodeMap.cpp:
576         (WebCore::NamedNodeMap::clearAttributes):
577         * dom/NamedNodeMap.h:
578         (WebCore::NamedNodeMap::attributeData):
579         (NamedNodeMap):
580         * dom/StyledElement.cpp:
581         (WebCore::StyledElement::classAttributeChanged):
582         * dom/StyledElement.h:
583         (WebCore::StyledElement::classNames):
584         * html/ClassList.cpp:
585         (WebCore::ClassList::classNames):
586
587 2012-01-30  Gregg Tavares  <gman@chromium.org>
588
589         Add Plumming to get graphics error messages to JS Console
590         https://bugs.webkit.org/show_bug.cgi?id=77238
591
592         Reviewed by Kenneth Russell.
593
594         No new tests. No change in behavior.
595
596         * html/canvas/WebGLRenderingContext.cpp:
597         (WebGLRenderingContextErrorMessageCallback):
598         (WebCore::WebGLRenderingContextErrorMessageCallback::WebGLRenderingContextErrorMessageCallback):
599         (WebCore::WebGLRenderingContextErrorMessageCallback::onErrorMessage):
600         (WebCore::WebGLRenderingContextErrorMessageCallback::~WebGLRenderingContextErrorMessageCallback):
601         (WebCore):
602         (WebCore::WebGLRenderingContext::create):
603         (WebCore::WebGLRenderingContext::initializeNewContext):
604         (WebCore::WebGLRenderingContext::~WebGLRenderingContext):
605         * html/canvas/WebGLRenderingContext.h:
606         (WebGLRenderingContext):
607         * platform/graphics/GraphicsContext3D.h:
608         (ErrorMessageCallback):
609         (WebCore::GraphicsContext3D::ErrorMessageCallback::~ErrorMessageCallback):
610         (GraphicsContext3D):
611         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
612         (WebCore::GraphicsContext3D::setErrorMessageCallback):
613         (WebCore):
614         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
615         (WebCore::GraphicsContext3D::setErrorMessageCallback):
616         (WebCore):
617         * platform/graphics/qt/GraphicsContext3DQt.cpp:
618         (WebCore::GraphicsContext3D::setErrorMessageCallback):
619         (WebCore):
620
621 2012-01-30  Anders Carlsson  <andersca@apple.com>
622
623         Simplify RenderLayerCompositor::frameViewDidScroll
624         https://bugs.webkit.org/show_bug.cgi?id=77398
625
626         Reviewed by Sam Weinig.
627
628         Remove the scrollPosition parameter from RenderLayerCompositor::frameViewDidScroll; we can just get it
629         from the associated FrameView object.
630
631         * page/FrameView.cpp:
632         (WebCore::FrameView::scrollPositionChanged):
633         * rendering/RenderLayerCompositor.cpp:
634         (WebCore::RenderLayerCompositor::frameViewDidChangeSize):
635         Call frameViewDidScroll() here instead of setting the scroll layer position explicitly.
636
637         (WebCore::RenderLayerCompositor::frameViewDidScroll):
638         (WebCore::RenderLayerCompositor::ensureRootLayer):
639         * rendering/RenderLayerCompositor.h:
640         (RenderLayerCompositor):
641
642 2012-01-30  Pablo Flouret  <pablof@motorola.com>
643
644         Don't select the next selectable index when deselecting an option in select elements with size set to a value greater than one.
645         https://bugs.webkit.org/show_bug.cgi?id=76389
646
647         Reviewed by Kent Tamura.
648
649         This behavior matches the rest of the browsers.
650
651         Test: fast/forms/select/option-selecting.html
652
653         * html/HTMLSelectElement.cpp:
654         (WebCore::HTMLSelectElement::optionSelectionStateChanged):
655
656 2012-01-30  Anders Carlsson  <andersca@apple.com>
657
658         Scrollbars don't show when scrolling on the scrolling thread
659         https://bugs.webkit.org/show_bug.cgi?id=77396
660         <rdar://problem/10710736>
661
662         Reviewed by Sam Weinig.
663
664         Use ScrollAnimator::scrollToOffsetWithoutAnimation when updating the frame view scroll offset,
665         since that function will end up invalidating the scrollbars correctly.
666
667         * page/ScrollingCoordinator.cpp:
668         (WebCore::ScrollingCoordinator::didUpdateMainFrameScrollPosition):
669
670 2012-01-30  Anders Carlsson  <andersca@apple.com>
671
672         Show repaint counters in individual tiles
673         https://bugs.webkit.org/show_bug.cgi?id=77390
674         <rdar://problem/10767967>
675
676         Reviewed by Darin Adler.
677
678         * platform/graphics/ca/mac/TileCache.h:
679         * platform/graphics/ca/mac/TileCache.mm:
680         (WebCore::TileCache::setNeedsDisplayInRect):
681         Make sure to invalidate the repaint counter rect if necessary.
682
683         (WebCore::TileCache::drawLayer):
684         Draw the repaint counter.
685
686         (WebCore::TileCache::showRepaintCounter):
687         New function that determines whether we should show repaint counters for the given tile cache.
688
689         * platform/graphics/ca/mac/WebTileLayer.h:
690         * platform/graphics/ca/mac/WebTileLayer.mm:
691         (-[WebTileLayer incrementRepaintCount]):
692         Add method for getting the repaint count.
693
694 2012-01-30  Dan Bernstein  <mitz@apple.com>
695
696         <rdar://problem/10778045> REGRESSION (r91935): text-combine fails
697         https://bugs.webkit.org/show_bug.cgi?id=77373
698
699         Reviewed by Darin Adler.
700
701         Removed tests that were failing because of this bug from the Lion skipped
702         list.
703
704         * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
705         (WebCore::GlyphPage::fill): Changed to use CTFontGetGlyphsForCharacters,
706         rather than wkGetVerticalGlyphsForCharacters, for non-fullwidth fonts.
707
708 2012-01-30  Christopher Hutten-Czapski  <chutten@rim.com>
709
710         BlackBerry - Support Proxy-Authenticate headers when a proxy is configured
711         https://bugs.webkit.org/show_bug.cgi?id=77361
712
713         Though we have a proxy configured, we might not have the auth
714         credentials it requires. Support Proxy-Authenticate for that case.
715
716         Reviewed by George Staikos.
717
718         * platform/network/blackberry/NetworkJob.cpp:
719         (WebCore::NetworkJob::handleNotifyHeaderReceived):
720         (WebCore::NetworkJob::handleAuthHeader):
721         (WebCore::NetworkJob::sendRequestWithCredentials):
722         * platform/network/blackberry/NetworkJob.h:
723         * platform/network/blackberry/NetworkManager.cpp:
724         (WebCore::NetworkManager::startJob):
725
726 2012-01-27  James Robinson  <jamesr@chromium.org>
727
728         [chromium] Remove unnecessary retry logic in LayerRendererChromium initialization for accelerated painting
729         https://bugs.webkit.org/show_bug.cgi?id=77247
730
731         Reviewed by Kenneth Russell.
732
733         The accelerate painting setting is done differently from other capability-dependent settings for no good reason,
734         requiring that we retry initialization with different settings. For all other settings we set the capabilities
735         bit to true if the setting is requested and if the required capabilities exist on the underlying context.
736
737         * platform/graphics/chromium/LayerRendererChromium.cpp:
738         (WebCore::LayerRendererChromium::create):
739         (WebCore::LayerRendererChromium::initialize):
740         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
741         (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer):
742
743 2012-01-30  Brady Eidson  <beidson@apple.com>
744
745         <rdar://problem/10707072>
746         Crashes in WebProcess at WebCore::Node::rendererIsNeeded
747
748         Reviewed by Darin Adler.
749
750         In specific circumstances a plugin element can be without a render style at the point in time where
751         the page navigated and enters the page cache.
752
753         When this is the cash, the element should not enter into the "custom style for renderer" mode and should
754         instead use the default render style machinery.
755
756         Test: plugins/crash-restoring-pluging-page-from-page-cache.html
757
758         * html/HTMLPlugInImageElement.cpp:
759         (WebCore::HTMLPlugInImageElement::documentWillSuspendForPageCache): Only setHasCustomStyleForRenderer and 
760           forceRecalc if there actually is a custom style to be used.
761         (WebCore::HTMLPlugInImageElement::documentDidResumeFromPageCache): Only clearHasCustomStyleForRenderer if there
762           actually was a custom style to be cleared.
763         (WebCore::HTMLPlugInImageElement::customStyleForRenderer): This should only be called if there actually is a 
764           custom style to be used. Otherwise the element would have to fallback to the "normal" RenderStyle which might
765           not exist.
766
767 2012-01-30  Anders Carlsson  <andersca@apple.com>
768
769         Show debug borders for individual tile cache tiles
770         https://bugs.webkit.org/show_bug.cgi?id=77388
771
772         Reviewed by Sam Weinig.
773
774         * platform/graphics/GraphicsLayer.cpp:
775         (WebCore::GraphicsLayer::updateDebugIndicators):
776         Give tile cache tiles a thin dark blue border.
777
778         * platform/graphics/ca/mac/TileCache.h:
779         (WebCore::TileCache::tileDebugBorderWidth):
780         (WebCore::TileCache::tileDebugBorderColor):
781         Add getters and member variables for the tile debug border width and color.
782
783         * platform/graphics/ca/mac/TileCache.mm:
784         (WebCore::TileCache::TileCache):
785         Initialize m_tileDebugBorderWidth.
786
787         (WebCore::TileCache::setTileDebugBorderWidth):
788         Update the border width of each tile layer.
789
790         (WebCore::TileCache::setTileDebugBorderColor):
791         Update the border color of each tile layer.
792
793         (WebCore::TileCache::createTileLayer):
794         Set the border color and border width.
795
796         * platform/graphics/ca/mac/WebTileCacheLayer.h:
797         * platform/graphics/ca/mac/WebTileCacheLayer.mm:
798         (-[WebTileCacheLayer borderColor]):
799         (-[WebTileCacheLayer setBorderColor:]):
800         (-[WebTileCacheLayer borderWidth]):
801         (-[WebTileCacheLayer setBorderWidth:]):
802         Call through to the TileCache.
803
804         * platform/graphics/mac/WebLayer.mm:
805         (drawLayerContents):
806         Don't draw the repaint counter for tile cache layers, each tile will maintain its own repaint counter.
807
808 2012-01-30  Rakesh KN  <rakesh.kn@motorola.com>
809
810         single-file input elements should refuse multi-file drags
811         https://bugs.webkit.org/show_bug.cgi?id=25913
812
813         Reviewed by Eric Seidel.
814
815         Refuse the multiple file drags onto a single file input element.
816
817         No new tests: Covered by existing tests, updated the expected results.
818
819         * page/DragController.cpp:
820         (WebCore::DragController::tryDocumentDrag):
821         Setting the dragSession.numberOfItemsToBeAccepted to 0 so that drag operation is none if the
822         file input element under mouse is single input type and number of files dragged onto that
823         input element are more than 1.
824
825 2012-01-30  Dana Jansens  <danakj@chromium.org>
826
827         [chromium] Use region reported painted opaque for draw culling
828         https://bugs.webkit.org/show_bug.cgi?id=76015
829
830         Reviewed by James Robinson.
831
832         New unit tests in CCTiledLayerImplTest.cpp, CCQuadCullerTest.cpp, CCLayerTreeHostImplTest.cpp
833
834         * platform/graphics/chromium/LayerChromium.cpp:
835         (WebCore::LayerChromium::setOpaque):
836         * platform/graphics/chromium/TiledLayerChromium.cpp:
837         (UpdatableTile):
838         (WebCore::TiledLayerChromium::pushPropertiesTo):
839         (WebCore::TiledLayerChromium::prepareToUpdateTiles):
840         * platform/graphics/chromium/cc/CCDrawQuad.cpp:
841         (WebCore::CCDrawQuad::opaqueRect):
842         (WebCore):
843         * platform/graphics/chromium/cc/CCDrawQuad.h:
844         (CCDrawQuad):
845         (WebCore::CCDrawQuad::needsBlending):
846         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
847         (WebCore::CCQuadCuller::cullOccludedQuads):
848         * platform/graphics/chromium/cc/CCSolidColorDrawQuad.cpp:
849         (WebCore::CCSolidColorDrawQuad::CCSolidColorDrawQuad):
850         * platform/graphics/chromium/cc/CCTileDrawQuad.cpp:
851         (WebCore::CCTileDrawQuad::create):
852         (WebCore::CCTileDrawQuad::CCTileDrawQuad):
853         * platform/graphics/chromium/cc/CCTileDrawQuad.h:
854         (CCTileDrawQuad):
855         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
856         (DrawableTile):
857         (WebCore::DrawableTile::opaqueRect):
858         (WebCore::DrawableTile::setOpaqueRect):
859         (WebCore::CCTiledLayerImpl::appendQuads):
860         (WebCore::CCTiledLayerImpl::pushTileProperties):
861         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
862         (CCTiledLayerImpl):
863
864 2012-01-30  Ryosuke Niwa  <rniwa@webkit.org>
865
866         Crash in previousLinePosition when moving into a root inline box without leaves
867         https://bugs.webkit.org/show_bug.cgi?id=76812
868
869         Reviewed by Enrica Casucci.
870
871         The crash was caused by us assuming that every root inline box has at least one leaf,
872         which isn't true when we create inline boxes for an empty text run with margin, border, etc...
873
874         Test: editing/selection/move-into-empty-root-inline-box.html
875
876         * editing/visible_units.cpp:
877         (WebCore::previousLinePosition):
878         (WebCore::nextLinePosition):
879
880 2012-01-30  Levi Weintraub  <leviw@chromium.org>
881
882         !m_insideRegionPaint assertion in RenderRegion.cpp is invalid
883         https://bugs.webkit.org/show_bug.cgi?id=77372
884
885         Reviewed by David Hyatt.
886
887         Removing the !m_insideRegionPaint assertion that's in three functions in
888         RenderRegion. It's triggering in numerous layout tests and isn't valid.
889
890         No new tests as this just removes assertions.
891
892         * rendering/RenderRegion.cpp:
893         (WebCore::RenderRegion::setRenderBoxRegionInfo):
894         (WebCore::RenderRegion::takeRenderBoxRegionInfo):
895         (WebCore::RenderRegion::removeRenderBoxRegionInfo):
896
897 2012-01-30  Adrienne Walker  <enne@google.com>
898
899         [chromium] Always pre-reserve scrollbar and scroll corner textures
900         https://bugs.webkit.org/show_bug.cgi?id=77251
901
902         Reviewed by James Robinson.
903
904         Add a flag to LayerChromium that says that a layer's textures should
905         always be reserved. Prior to painting layers, find all layers marked
906         as such and reserve their textures. This will prevent texture memory
907         limits from being hit before the root layer's scrollbars are reserved
908         and painted.
909
910         * platform/graphics/chromium/LayerChromium.cpp:
911         (WebCore::LayerChromium::LayerChromium):
912         * platform/graphics/chromium/LayerChromium.h:
913         (LayerChromium):
914         (WebCore::LayerChromium::reserveTextures):
915         (WebCore::LayerChromium::setAlwaysReserveTextures):
916         (WebCore::LayerChromium::alwaysReserveTextures):
917         * platform/graphics/chromium/TiledLayerChromium.cpp:
918         (WebCore::TiledLayerChromium::reserveTextures):
919         * platform/graphics/chromium/TiledLayerChromium.h:
920         ():
921         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
922         (WebCore::CCLayerTreeHost::updateLayers):
923         (WebCore::CCLayerTreeHost::reserveTextures):
924         (WebCore):
925         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
926         ():
927
928 2012-01-30  Beth Dakin  <bdakin@apple.com>
929
930         Speculative 32-bit build-fix.
931
932         * WebCore.exp.in:
933
934 2012-01-30  Mihnea Ovidenie  <mihnea@adobe.com>
935
936         [CSSRegions]Add support for background-color in region styling
937         https://bugs.webkit.org/show_bug.cgi?id=71488
938
939         Reviewed by David Hyatt.
940
941         Based on work by Alexandru Chiculita (achicu@adobe.com).
942         Previous patches for region styling were touching RenderObject::style() method. After several attempts to avoid regressions
943         (including caching of RenderObject::style() pointer in most used methods), we decided to attempt a different approach:
944         Step1: before each region is repainted, we compute the style for each box that falls into the region
945         Step2: before paint, we store the box original style
946         Step3: paint the region contents using the style in region
947         Step4: after paint is finished, we restore the box original style (and store the box style in region for future region paint)
948
949         Tests for region styling are also enabled with this patch.
950
951         * WebCore.exp.in:
952         * rendering/RenderFlowThread.cpp:
953         (WebCore::RenderFlowThread::clearRenderBoxCustomStyle):
954         (WebCore::RenderFlowThread::setRegionRangeForBox):
955         * rendering/RenderFlowThread.h:
956         ():
957         * rendering/RenderLayer.cpp:
958         (WebCore::RenderLayer::paint):
959         (WebCore::RenderLayer::hitTest):
960         * rendering/RenderObject.cpp:
961         * rendering/RenderObject.h:
962         (WebCore::RenderObject::style):
963         (RenderObject):
964         * rendering/RenderObjectChildList.cpp:
965         (WebCore::RenderObjectChildList::removeChildNode):
966         * rendering/RenderRegion.cpp:
967         (WebCore::RenderRegion::RenderRegion):
968         (WebCore::RenderRegion::setRegionBoxesRegionStyle):
969         (WebCore):
970         (WebCore::RenderRegion::restoreRegionBoxesOriginalStyle):
971         (WebCore::RenderRegion::paintReplaced):
972         (WebCore::RenderRegion::setRenderBoxRegionInfo):
973         (WebCore::RenderRegion::takeRenderBoxRegionInfo):
974         (WebCore::RenderRegion::removeRenderBoxRegionInfo):
975         (WebCore::RenderRegion::renderBoxRegionStyle):
976         (WebCore::RenderRegion::computeStyleInRegion):
977         (WebCore::RenderRegion::clearBoxStyleInRegion):
978         * rendering/RenderRegion.h:
979         (RenderRegion):
980         * rendering/RenderView.cpp:
981         (WebCore::RenderView::RenderView):
982         * rendering/RenderView.h:
983         (WebCore):
984         (RenderView):
985
986 2012-01-30  Jessie Berlin  <jberlin@apple.com>
987
988         WebCore build exceeds address space on 32-bit Windows builders (again).
989         https://bugs.webkit.org/show_bug.cgi?id=77357
990
991         Reviewed by Adam Roben.
992
993         Add an Inspector All-In-One file, but only use it in Release and Production builds.
994         This differs from our other All-In-One files, but it is a better approach because it makes
995         debugging possible in the Debug configuration (the symbols will be in the correct .obj file
996         for the original .cpp files).
997
998         * WebCore.vcproj/WebCore.vcproj:
999         Also, let VS have its way with the vcproj file.
1000         * inspector/InspectorAllInOne.cpp: Added.
1001
1002 2012-01-28  Matthew Delaney  <mdelaney@apple.com>
1003
1004         Limit periodic flushing inside ImageBufferCG to just Lion
1005         https://bugs.webkit.org/show_bug.cgi?id=77353
1006         <rdar://problem/10328309>
1007
1008         Reviewed by Chris Marrin.
1009
1010         * platform/graphics/cg/ImageBufferCG.cpp:
1011         * platform/graphics/cg/ImageBufferDataCG.h:
1012
1013 2012-01-30  Tommy Widenflycht  <tommyw@google.com>
1014
1015         Memory leak caused by PeerConnection add a NULL media stream
1016         https://bugs.webkit.org/show_bug.cgi?id=76150
1017
1018         It was my missunderstanding that the IDL keyword [StrictTypeChecking] also protects against
1019         null or undefined arguments, it doesn't. Added checks for null pointers.
1020
1021         Reviewed by Adam Barth.
1022
1023         Test: fast/mediastream/peerconnection-addstream.html
1024
1025         * mediastream/PeerConnection.cpp:
1026         (WebCore::PeerConnection::addStream):
1027         (WebCore::PeerConnection::removeStream):
1028
1029 2012-01-26  Andy Estes  <aestes@apple.com>
1030
1031         [Windows] Optionally invert colors when drawing to a WebView's backing store.
1032         https://bugs.webkit.org/show_bug.cgi?id=77168
1033
1034         Reviewed by Sam Weinig.
1035
1036         * css/CSSPrimitiveValueMappings.h: Assert that CompositeDifference is
1037         not converted to a CSS value. Exposing a new compositing operation to
1038         CSS is outside the scope of this patch.
1039         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1040         * platform/graphics/GraphicsTypes.h: Add CompositeDifference as a
1041         CompositeOperator. Also, remove an outdated comment.
1042         * platform/graphics/cg/GraphicsContextCG.cpp:
1043         (WebCore::GraphicsContext::setPlatformCompositeOperation): Map
1044         CompositeDifference to kCGBlendModeDifference.
1045
1046 2012-01-28  Matthew Delaney  <mdelaney@apple.com>
1047
1048         Limit the shadow offset CG hack to just SL and Lion
1049         https://bugs.webkit.org/show_bug.cgi?id=77348
1050         <rdar://problem/10158016>
1051
1052         Reviewed by Chris Marrin.
1053
1054         No new tests, current tests cover this.
1055
1056         * platform/graphics/cg/GraphicsContextCG.cpp:
1057         (WebCore::GraphicsContext::setPlatformShadow):
1058
1059 2012-01-30  Beth Dakin  <bdakin@apple.com>
1060
1061         https://bugs.webkit.org/show_bug.cgi?id=77263
1062         PlatformScreenMac should not rely on NSWindow for important bits of data
1063
1064         Reviewed by Geoff Garen.
1065
1066         The main problem is that we cannot rely on the NSWindow for information about 
1067         the deviceScaleFactor because we cannot access an NSWindow from within 
1068         WebCore for WebKit2 windows. Instead, we can fetch it from 
1069         WebCore::deviceScaleFactor(), but we need a Frame to call that. So 
1070         screenAvailableRect and screenRect both now take a FrameView* instead of a 
1071         Widget*. All existing call sites actually sent a FrameView in anyway, so this 
1072         is not a big change, but it does require touching a lot of platforms.
1073         * WebCore.exp.in:
1074         * platform/PlatformScreen.h:
1075         (WebCore):
1076         * platform/blackberry/PlatformScreenBlackBerry.cpp:
1077         (WebCore::screenAvailableRect):
1078         (WebCore::screenRect):
1079         * platform/chromium/PlatformScreenChromium.cpp:
1080         (WebCore::screenRect):
1081         (WebCore::screenAvailableRect):
1082         * platform/chromium/PlatformSupport.h:
1083         (WebCore):
1084         (PlatformSupport):
1085         ():
1086         * platform/efl/PlatformScreenEfl.cpp:
1087         (WebCore::screenRect):
1088         (WebCore::screenAvailableRect):
1089         * platform/gtk/PlatformScreenGtk.cpp:
1090         (WebCore::screenRect):
1091         (WebCore::screenAvailableRect):
1092         * platform/qt/PlatformScreenQt.cpp:
1093         (WebCore::screenRect):
1094         (WebCore::screenAvailableRect):
1095         * platform/win/PlatformScreenWin.cpp:
1096         (WebCore::screenRect):
1097         (WebCore::screenAvailableRect):
1098         * platform/wx/ScreenWx.cpp:
1099         (WebCore::screenRect):
1100         (WebCore::screenAvailableRect):
1101
1102         The Mac-only functions toUserSpace() and toDeviceSpace() were also updated to 
1103         take a parameter for the deviceScaleFactor.
1104         * platform/mac/PlatformScreenMac.mm:
1105         (WebCore::screenRect):
1106         (WebCore::screenAvailableRect):
1107         (WebCore::toUserSpace):
1108         (WebCore::toDeviceSpace):
1109
1110 2012-01-30  Antti Koivisto  <antti@apple.com>
1111
1112         Kill CSSMutableStyleDeclarationConstIterator
1113         https://bugs.webkit.org/show_bug.cgi?id=77342
1114
1115         Reviewed by Sam Weinig.
1116
1117         CSSMutableStyleDeclaration is an array and should be iterated using an index. This simplifies the code.
1118
1119         * css/CSSMutableStyleDeclaration.cpp:
1120         (WebCore::CSSMutableStyleDeclaration::copyPropertiesFrom):
1121         (WebCore::CSSMutableStyleDeclaration::removeProperty):
1122         (WebCore::CSSMutableStyleDeclaration::setProperty):
1123         (WebCore::CSSMutableStyleDeclaration::setPropertyInternal):
1124         (WebCore::CSSMutableStyleDeclaration::parseDeclaration):
1125         (WebCore::CSSMutableStyleDeclaration::addParsedProperties):
1126         (WebCore::CSSMutableStyleDeclaration::addParsedProperty):
1127         (WebCore::CSSMutableStyleDeclaration::merge):
1128         (WebCore::CSSMutableStyleDeclaration::removePropertiesInSet):
1129         * css/CSSMutableStyleDeclaration.h:
1130         (WebCore):
1131         (WebCore::CSSMutableStyleDeclaration::createForSVGFontFaceElement):
1132         (CSSMutableStyleDeclaration):
1133         * css/CSSStyleDeclaration.cpp:
1134         (WebCore::CSSStyleDeclaration::CSSStyleDeclaration):
1135         * css/CSSStyleDeclaration.h:
1136         (CSSStyleDeclaration):
1137         ():
1138         * css/CSSStyleSelector.cpp:
1139         (WebCore::CSSStyleSelector::styleForKeyframe):
1140         (WebCore::CSSStyleSelector::applyDeclaration):
1141         * editing/EditingStyle.cpp:
1142
1143 2012-01-30  Michael Saboff  <msaboff@apple.com>
1144
1145         Dromaeo tests call parseSimpleLengthValue() on 8 bit strings
1146         https://bugs.webkit.org/show_bug.cgi?id=76649
1147
1148         Reviewed by Geoffrey Garen.
1149
1150         No functionality change, therefore no new tests.
1151
1152         Added 8 bit patch for parseSimpleLengthValue().
1153
1154         * css/CSSParser.cpp:
1155         (WebCore::parseSimpleLengthValue):
1156
1157 2012-01-30  Michael Saboff  <msaboff@apple.com>
1158
1159         WebCore decodeEscapeSequences unnecessarily converts 8 bit strings to 16 bit when decoding.
1160         https://bugs.webkit.org/show_bug.cgi?id=76648
1161
1162         Reviewed by Geoffrey Garen.
1163
1164         Using new overloaded append(String&, offset, length)  member to build result string.
1165         The new member properly handles 8/16 bit-ness of strings.
1166
1167         Functionality not changed, therefore no new tests.
1168
1169         * platform/text/DecodeEscapeSequences.h:
1170         (WebCore::decodeEscapeSequences):
1171
1172 2012-01-30  Pavel Feldman  <pfeldman@google.com>
1173
1174         Not reviewed: follow up to r105625, use proper event categoty in inspector frontend.
1175
1176         * inspector/front-end/BreakpointsSidebarPane.js:
1177         (WebInspector.EventListenerBreakpointsSidebarPane):
1178
1179 2012-01-30  Parag Radke  <nrqv63@motorola.com>
1180
1181         REGRESSION (r82580): Reproducible crash in CSSPrimitiveValue::computeLengthDouble
1182         https://bugs.webkit.org/show_bug.cgi?id=61989
1183
1184         Reviewed by Simon Fraser.
1185
1186         According to css3 specs when font-size is specified in 'rems' for an element implies the font-size
1187         of the root element. In this case as HTML element has a property 'display:none' and hence renderer 
1188         is NULL causes this crash.
1189
1190         Test: fast/css/fontsize-unit-rems-crash.html
1191
1192         * css/CSSPrimitiveValue.cpp:
1193         (WebCore::CSSPrimitiveValue::computeLengthDouble):
1194         Added a null check for the root element's RenderStyle as it can be null in case of html has a property
1195         hidden or display:none.
1196
1197 2012-01-26  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1198
1199         [Qt] WKTR: Use a software rendering pipiline when running tests.
1200         https://bugs.webkit.org/show_bug.cgi?id=76708
1201
1202         Reviewed by Kenneth Rohde Christiansen.
1203
1204         * platform/graphics/qt/TextureMapperQt.cpp: Allow setting the context to null.
1205         (WebCore::TextureMapperQt::setGraphicsContext):
1206         * platform/graphics/qt/TextureMapperQt.h:
1207         (WebCore::TextureMapperQt::initialize):
1208
1209 2012-01-27  Enrica Casucci  <enrica@apple.com>
1210
1211         Remove all references to NSPasteboard objects from the Pasteboard
1212         class interface on Mac.
1213         https://bugs.webkit.org/show_bug.cgi?id=77261
1214         
1215         This is cleanup work needed as first step in the direction of
1216         removing access to NSPasteboard from the WebProcess.
1217         This way all access to the NSPasteboard object are internal to
1218         the class.
1219         Removed static methods taking NSPasteboard as paramenter and changed
1220         the constructor of the class to take the pasteboard name instead of
1221         the NSPasteboard object.
1222
1223         Reviewed by Alexey Proskuryakov.
1224
1225         No new tests. There is no change in behavior.
1226
1227         * editing/Editor.cpp: Removed ununsed private method writeSelectionToPasteboard.
1228         (WebCore):
1229         * editing/Editor.h: Ditto.
1230         (Editor):
1231         ():
1232         * editing/mac/EditorMac.mm:
1233         (WebCore::Editor::writeSelectionToPasteboard):
1234         (WebCore::Editor::readSelectionFromPasteboard):
1235         * platform/Pasteboard.h:
1236         (Pasteboard):
1237         * platform/mac/ClipboardMac.mm:
1238         (WebCore::ClipboardMac::writeRange):
1239         (WebCore::ClipboardMac::writePlainText):
1240         (WebCore::ClipboardMac::writeURL):
1241         * platform/mac/DragDataMac.mm:
1242         (WebCore::DragData::asPlainText):
1243         (WebCore::DragData::asURL):
1244         (WebCore::DragData::asFragment):
1245         * platform/mac/PasteboardMac.mm:
1246         (WebCore::Pasteboard::generalPasteboard):
1247         (WebCore::Pasteboard::Pasteboard):
1248         (WebCore::Pasteboard::writeSelectionForTypes): Added.
1249         (WebCore::Pasteboard::writePlainText):
1250         (WebCore::Pasteboard::writeSelection):
1251         (WebCore::Pasteboard::writeURLForTypes): Added.
1252         (WebCore::Pasteboard::writeURL):
1253         (WebCore::Pasteboard::writeImage):
1254
1255 2012-01-29  Antti Koivisto  <antti@apple.com>
1256
1257         Reduce non-CSSOM API of CSSStyleDeclaration
1258         https://bugs.webkit.org/show_bug.cgi?id=77299
1259
1260         Reviewed by Andreas Kling.
1261
1262         CSSStyleDeclaration should expose the CSSOM API only. Subclasses should expose the internal API only. 
1263         This will move us closer to being able to split the CSSOM API from the internal implementation.
1264         
1265         - Make CSSStyleDeclaration CSSOM functions virtual, internal functions non-virtual.
1266         - Move implementations to subclasses (CSSComputedStyleDeclaration, CSSMutableStyleDeclaration).
1267         - Make CSSOM functions in the subclasses private (making it harder to invoke them internally).
1268         - Switch a bunch of places to use internal API instead of CSSOM.
1269
1270         * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
1271         (WebCore::V8CSSStyleDeclaration::namedPropertyGetter):
1272         (WebCore::V8CSSStyleDeclaration::namedPropertySetter):
1273         
1274             Switch to *Internal versions of the CSSOM functions.
1275         
1276         * css/CSSComputedStyleDeclaration.cpp:
1277         (WebCore):
1278         (WebCore::CSSComputedStyleDeclaration::length):
1279         (WebCore::CSSComputedStyleDeclaration::cssPropertyMatches):
1280         (WebCore::CSSComputedStyleDeclaration::copyPropertiesInSet):
1281         
1282             Move copyPropertiesInSet to subclasses, devirtualize.
1283             
1284         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1285         (WebCore::CSSComputedStyleDeclaration::getPropertyValue):
1286         (WebCore::CSSComputedStyleDeclaration::getPropertyPriority):
1287         (WebCore::CSSComputedStyleDeclaration::getPropertyShorthand):
1288         (WebCore::CSSComputedStyleDeclaration::isPropertyImplicit):
1289         (WebCore::CSSComputedStyleDeclaration::setProperty):
1290         (WebCore::CSSComputedStyleDeclaration::removeProperty):
1291         * css/CSSComputedStyleDeclaration.h:
1292         (CSSComputedStyleDeclaration):
1293         * css/CSSFontFaceRule.cpp:
1294         (WebCore::CSSFontFaceRule::cssText):
1295         * css/CSSMutableStyleDeclaration.cpp:
1296         (WebCore::CSSMutableStyleDeclaration::length):
1297         (WebCore::CSSMutableStyleDeclaration::asText):
1298         (WebCore::CSSMutableStyleDeclaration::cssText):
1299         (WebCore):
1300         (WebCore::CSSMutableStyleDeclaration::getPropertyCSSValue):
1301         (WebCore::CSSMutableStyleDeclaration::getPropertyValue):
1302         (WebCore::CSSMutableStyleDeclaration::getPropertyPriority):
1303         (WebCore::CSSMutableStyleDeclaration::getPropertyShorthand):
1304         (WebCore::CSSMutableStyleDeclaration::isPropertyImplicit):
1305         (WebCore::CSSMutableStyleDeclaration::setProperty):
1306         (WebCore::CSSMutableStyleDeclaration::removeProperty):
1307         (WebCore::CSSMutableStyleDeclaration::copyPropertiesInSet):
1308         
1309             Move copyPropertiesInSet to subclasses, devirtualize.
1310         
1311         (WebCore::CSSMutableStyleDeclaration::cssPropertyMatches):
1312         (WebCore::CSSMutableStyleDeclaration::removeEquivalentProperties):
1313         
1314             Move diff() to CSSMutableStyleDeclaration, rename to removeEquivalentProperties, switch to mutate
1315             this object instead of the argument object.
1316     
1317         * css/CSSMutableStyleDeclaration.h:
1318         (CSSMutableStyleDeclaration):
1319         (WebCore::CSSMutableStyleDeclaration::propertyCount):
1320         (WebCore::CSSMutableStyleDeclaration::isEmpty):
1321         (WebCore::CSSMutableStyleDeclaration::propertyAt):
1322         
1323             Expose properties and property count internally (iterator should be removed in favor of these).
1324         
1325         * css/CSSStyleDeclaration.cpp:
1326         (WebCore):
1327         * css/CSSStyleDeclaration.h:
1328         (CSSStyleDeclaration):
1329         (WebCore::CSSStyleDeclaration::getPropertyCSSValueInternal):
1330         (WebCore::CSSStyleDeclaration::getPropertyValueInternal):
1331         (WebCore::CSSStyleDeclaration::setPropertyInternal):
1332         
1333             Add *Internal versions of some CSSOM APIs to support some editing and bindings uses.
1334             These take propertyIDs instead of strings names.
1335
1336         * css/CSSStyleRule.cpp:
1337         (WebCore::CSSStyleRule::cssText):
1338         * css/CSSStyleSelector.cpp:
1339         (WebCore::leftToRightDeclaration):
1340         (WebCore::rightToLeftDeclaration):
1341         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
1342         (WebCore::CSSStyleSelector::matchPageRulesForList):
1343         * css/WebKitCSSKeyframeRule.cpp:
1344         (WebCore::WebKitCSSKeyframeRule::cssText):
1345         * dom/StyledElement.cpp:
1346         (WebCore::StyledElement::updateStyleAttribute):
1347         * editing/ApplyStyleCommand.cpp:
1348         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
1349         (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
1350         (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
1351         (WebCore::ApplyStyleCommand::applyInlineStyleToPushDown):
1352         (WebCore::ApplyStyleCommand::addBlockStyle):
1353         (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded):
1354         * editing/EditingStyle.cpp:
1355         ():
1356         (WebCore::copyEditingProperties):
1357         (WebCore):
1358         (WebCore::propertyCSSValue):
1359         (WebCore::getRGBAFontColor):
1360         (WebCore::EditingStyle::overrideWithStyle):
1361         (WebCore::EditingStyle::removeStyleAddedByNode):
1362         (WebCore::EditingStyle::removeStyleConflictingWithStyleOfNode):
1363         (WebCore::EditingStyle::triStateOfStyle):
1364         (WebCore::EditingStyle::styleIsPresentInComputedStyleOfNode):
1365         (WebCore::EditingStyle::prepareToApplyAt):
1366         (WebCore::removePropertiesInStyle):
1367         (WebCore::EditingStyle::removeStyleFromRulesAndContext):
1368         (WebCore::EditingStyle::removePropertiesInElementDefaultStyle):
1369         (WebCore::StyleChange::StyleChange):
1370         (WebCore::fontWeightIsBold):
1371         (WebCore::getPropertiesNotIn):
1372         (WebCore::getIdentifierValue):
1373         (WebCore::hasTransparentBackgroundColor):
1374         * editing/EditingStyle.h:
1375         
1376             Adapt to changes.
1377     
1378         (WebCore):
1379         * editing/ReplaceSelectionCommand.cpp:
1380         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
1381         (WebCore::handleStyleSpansBeforeInsertion):
1382         (WebCore::ReplaceSelectionCommand::handleStyleSpans):
1383         * editing/mac/EditorMac.mm:
1384         (WebCore::styleForSelectionStart):
1385         * editing/markup.cpp:
1386         (WebCore::StyledMarkupAccumulator::appendStyleNodeOpenTag):
1387         (WebCore::StyledMarkupAccumulator::appendElement):
1388         * html/ImageDocument.cpp:
1389         (WebCore::ImageDocument::resizeImageToFit):
1390         (WebCore::ImageDocument::restoreImageSize):
1391         (WebCore::ImageDocument::windowSizeChanged):
1392         * html/canvas/CanvasRenderingContext2D.cpp:
1393         (WebCore::CanvasRenderingContext2D::setFont):
1394         * html/canvas/CanvasStyle.cpp:
1395         (WebCore::currentColor):
1396         * inspector/InspectorStyleSheet.cpp:
1397         (WebCore::InspectorStyleSheet::revalidateStyle):
1398         * page/PageSerializer.cpp:
1399         (WebCore::PageSerializer::retrieveResourcesForCSSDeclaration):
1400         * rendering/RenderTreeAsText.cpp:
1401         (WebCore::isEmptyOrUnstyledAppleStyleSpan):
1402         * svg/SVGStyledElement.cpp:
1403         (WebCore::SVGStyledElement::getPresentationAttribute):
1404
1405 2012-01-30  Pavel Feldman  <pfeldman@google.com>
1406
1407         Web Inspector: protocol validator should fail if one of response fields turns optional
1408         https://bugs.webkit.org/show_bug.cgi?id=76452
1409
1410         Reviewed by Yury Semikhatsky.
1411
1412         * inspector/Inspector-0.1.json:
1413         * inspector/Inspector.json:
1414         * inspector/generate-inspector-protocol-version:
1415         (compare_commands):
1416         (compare_events):
1417         (compare_params_list):
1418         (compare_types):
1419         (self_test):
1420
1421 2012-01-30  Yury Semikhatsky  <yurys@chromium.org>
1422
1423         Web Inspector: keyboard navigation through comparison view in heap profiler should update retainers view
1424         https://bugs.webkit.org/show_bug.cgi?id=77326
1425
1426         Keyboard navigation in the detailed heap snapshot view now updates retainers view.
1427
1428         Reviewed by Pavel Feldman.
1429
1430         * inspector/front-end/DataGrid.js: Added SelectedNode/DeselectedNode events to DataGrid.
1431         (WebInspector.DataGridNode.prototype.select):
1432         (WebInspector.DataGridNode.prototype.deselect):
1433         * inspector/front-end/DetailedHeapshotView.js:
1434         (WebInspector.DetailedHeapshotView.prototype._selectionChanged):
1435         (WebInspector.DetailedHeapshotView.prototype._setRetainmentDataGridSource):
1436
1437 2012-01-30  Yury Semikhatsky  <yurys@chromium.org>
1438
1439         Unreviewed. Fix inspector front-end compilation.
1440
1441         * inspector/front-end/RemoteObject.js:
1442         (WebInspector.RemoteObject):
1443         (WebInspector.RemoteObject.fromPayload):
1444
1445 2012-01-30  Roland Steiner  <rolandsteiner@chromium.org>
1446
1447         Node::parentOrHostElement(): Node::shadowHost() already returns an Element*
1448         https://bugs.webkit.org/show_bug.cgi?id=77332
1449
1450         Reviewed by Kent Tamura.
1451
1452         No new tests. (simple refactoring)
1453
1454         * dom/Node.cpp:
1455         (WebCore::Node::parentOrHostElement):
1456
1457 2012-01-30  Carlos Garcia Campos  <cgarcia@igalia.com>
1458
1459         Unreviewed. Fix make distcheck.
1460
1461         * GNUmakefile.am: Add idl files in Source/WebCore/html/shadow/ to
1462         EXTRA_DIST.
1463         * GNUmakefile.list.am: Add missing files.
1464
1465 2012-01-27  Vsevolod Vlasov  <vsevik@chromium.org>
1466
1467         Web Inspector: TabbedEditorContainer should save open tabs.
1468         https://bugs.webkit.org/show_bug.cgi?id=76912
1469
1470         Reviewed by Pavel Feldman.
1471
1472         Test: inspector/tabbed-editors-history.html
1473
1474         * inspector/front-end/ScriptsPanel.js:
1475         (WebInspector.ScriptsPanel.prototype._uiSourceCodeAdded):
1476         (WebInspector.ScriptsPanel.prototype._reset):
1477         (WebInspector.ScriptsPanel.prototype._showFile):
1478         (WebInspector.ScriptsPanel.prototype._updateExecutionLine):
1479         (WebInspector.ScriptsPanel.prototype._editorSelected):
1480         (WebInspector.EditorContainer.prototype.uiSourceCodeAdded):
1481         (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.showFile):
1482         (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.reset):
1483         * inspector/front-end/TabbedEditorContainer.js:
1484         (WebInspector.TabbedEditorContainer):
1485         (WebInspector.TabbedEditorContainer.prototype.showFile):
1486         (WebInspector.TabbedEditorContainer.prototype._editorClosedByUserAction):
1487         (WebInspector.TabbedEditorContainer.prototype._editorSelectedByUserAction):
1488         (WebInspector.TabbedEditorContainer.prototype._updateHistory.tabIdToURL):
1489         (WebInspector.TabbedEditorContainer.prototype._updateHistory):
1490         (WebInspector.TabbedEditorContainer.prototype._appendFileTab):
1491         (WebInspector.TabbedEditorContainer.prototype._tabClosed):
1492         (WebInspector.TabbedEditorContainer.prototype._tabSelected):
1493         (WebInspector.TabbedEditorContainer.prototype.reset):
1494         (WebInspector.TabbedEditorContainer.History):
1495         (WebInspector.TabbedEditorContainer.History.prototype.index):
1496         (WebInspector.TabbedEditorContainer.History.prototype.update):
1497         (WebInspector.TabbedEditorContainer.History.prototype.remove):
1498         (WebInspector.TabbedEditorContainer.History.prototype.save):
1499         * inspector/front-end/TabbedPane.js:
1500         (WebInspector.TabbedPane.prototype.appendTab):
1501         (WebInspector.TabbedPane.prototype.closeTab):
1502         (WebInspector.TabbedPane.prototype._innerCloseTab):
1503         (WebInspector.TabbedPane.prototype.closeAllTabs):
1504         (WebInspector.TabbedPane.prototype.lastOpenedTabIds):
1505         (WebInspector.TabbedPane.prototype._tabsSelectChanged):
1506
1507 2012-01-30  Alexander Pavlov  <apavlov@chromium.org>
1508
1509         Web Inspector: [Styles] Unable to paste and subsequently edit multiple properties in the Styles pane
1510         https://bugs.webkit.org/show_bug.cgi?id=77209
1511
1512         Reviewed by Pavel Feldman.
1513
1514         Check if the property value contains a ";" before kicking the freeflow text update.
1515
1516         * inspector/front-end/StylesSidebarPane.js:
1517         (WebInspector.StylePropertyTreeElement.prototype):
1518
1519 2012-01-30  Vsevolod Vlasov  <vsevik@chromium.org>
1520
1521         Web Inspector: Change Open Resource and Go To function shortcuts in scripts panel.
1522         https://bugs.webkit.org/show_bug.cgi?id=77321
1523
1524         Reviewed by Pavel Feldman.
1525
1526         * inspector/front-end/FilteredItemSelectionDialog.js:
1527         (WebInspector.JavaScriptOutlineDialog.createShortcut):
1528         (WebInspector.OpenResourceDialog.createShortcut):
1529         * inspector/front-end/ScriptsPanel.js:
1530
1531 2012-01-30  Yury Semikhatsky  <yurys@chromium.org>
1532
1533         Web Inspector: hide function popover in heap snapshot view before navigating to the function definition
1534         https://bugs.webkit.org/show_bug.cgi?id=77330
1535
1536         Reviewed by Pavel Feldman.
1537
1538         * inspector/front-end/DetailedHeapshotView.js:
1539         (WebInspector.DetailedHeapshotView.prototype.willHide):
1540
1541 2012-01-30  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
1542
1543         [BlackBerry] Credential backing store implementation
1544         https://bugs.webkit.org/show_bug.cgi?id=76761
1545
1546         Reviewed by Antonio Gomes.
1547
1548         Implemented credential backing store database and related
1549         operations in class CredentialBackingStore.
1550
1551         * platform/network/blackberry/CredentialBackingStore.cpp:
1552         (WebCore::CredentialBackingStore::~CredentialBackingStore):
1553         (WebCore::CredentialBackingStore::open):
1554         (WebCore::CredentialBackingStore::close):
1555         (WebCore::CredentialBackingStore::addLogin):
1556         (WebCore::CredentialBackingStore::updateLogin):
1557         (WebCore::CredentialBackingStore::hasLogin):
1558         (WebCore::CredentialBackingStore::getLogin):
1559         (WebCore::CredentialBackingStore::removeLogin):
1560         (WebCore::CredentialBackingStore::clear):
1561
1562 2012-01-30  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1563
1564         Only send resize events when layout size changes.
1565         https://bugs.webkit.org/show_bug.cgi?id=77212
1566
1567         When using fixed layout the widget size is the size of content, therefore
1568         resize checks must check against layoutsize and not widget size.
1569
1570         Reviewed by Kenneth Rohde Christiansen.
1571
1572         Needs to be manual tests because the test framework does not currently
1573         support testing fixed layout.
1574
1575         Tests: ManualTests/resize-events.html
1576
1577         * page/FrameView.cpp:
1578         (WebCore::FrameView::layout):
1579         (WebCore::FrameView::performPostLayoutTasks):
1580
1581 2012-01-30  Pavel Feldman  <pfeldman@google.com>
1582
1583         Web Inspector: TimelinePanel does not respect InspectorFrontendHost.canSaveAs
1584         https://bugs.webkit.org/show_bug.cgi?id=77301
1585
1586         Reviewed by Vsevolod Vlasov.
1587
1588         * inspector/front-end/TimelinePanel.js:
1589         (WebInspector.TimelinePanel.prototype._registerShortcuts):
1590
1591 2012-01-30  Nikolas Zimmermann  <nzimmermann@rim.com>
1592
1593         Not reviewed. Fix Clang build for real after r106218.
1594
1595         * inspector/CodeGeneratorInspector.py:
1596         (Generator.go): Add virtual destructor to the ABCs.
1597
1598 2012-01-30  Shinya Kawanaka  <shinyak@google.com>
1599
1600         No need to keep anonymous RenderBlock in DETAILS.
1601         https://bugs.webkit.org/show_bug.cgi?id=77322
1602
1603         Reviewed by Hajime Morita.
1604
1605         Anonymous RenderBlock of DETAILS element was not squashed when detaching them.
1606         However, it should be removed.
1607
1608         No new tests. Should be covered by existing tests.
1609
1610         * rendering/RenderBlock.cpp:
1611         (WebCore::canMergeContiguousAnonymousBlocks):
1612
1613 2012-01-30  Zoltan Herczeg  <zherczeg@webkit.org>
1614
1615         Custom written CSS lexer
1616         https://bugs.webkit.org/show_bug.cgi?id=70107
1617
1618         Rubber Stamped by Csaba Osztrogonác.
1619
1620         Do not advance pointer at the end of input, just
1621         keep returning with END_TOKEN.
1622
1623         * css/CSSParser.cpp:
1624         (WebCore::CSSParser::lex):
1625
1626 2012-01-30  Shinya Kawanaka  <shinyak@google.com>
1627
1628         The query selector for HTMLContentElement should follow the shadow dom spec.
1629         https://bugs.webkit.org/show_bug.cgi?id=75946
1630
1631         Reviewed by Hajime Morita.
1632
1633         Checks the query selector of HTMLContentElement is valid.
1634         If not valid, the selector won't match anything, and shows fallback element.
1635
1636         Test: fast/dom/shadow/content-selector-query.html
1637
1638         * html/shadow/ContentSelectorQuery.cpp:
1639         (WebCore::ContentSelectorQuery::ContentSelectorQuery):
1640         (WebCore::ContentSelectorQuery::isValidSelector):
1641         (WebCore::ContentSelectorQuery::matches):
1642           When a select query is not valid, any element won't be matched.
1643         (WebCore::validateSubSelector):
1644         (WebCore::validateSelector):
1645         (WebCore::ContentSelectorQuery::validateSelectorList):
1646           Validate selectors.
1647         * html/shadow/ContentSelectorQuery.h:
1648         * html/shadow/HTMLContentElement.cpp:
1649         (WebCore::HTMLContentElement::isSelectValid):
1650           Returns true if select attribute is valid.
1651         * html/shadow/HTMLContentElement.h:
1652         * testing/Internals.cpp:
1653         (WebCore::Internals::isValidContentSelect):
1654         * testing/Internals.h:
1655         * testing/Internals.idl:
1656
1657 2012-01-30  Hans Wennborg  <hans@chromium.org>
1658
1659         Unreviewed, rolling out r106219.
1660         http://trac.webkit.org/changeset/106219
1661         https://bugs.webkit.org/show_bug.cgi?id=77083
1662
1663         This broke Chromium's test_shell.
1664
1665         * GNUmakefile.list.am:
1666         * Target.pri:
1667         * WebCore.gypi:
1668         * WebCore.vcproj/WebCore.vcproj:
1669         * WebCore.xcodeproj/project.pbxproj:
1670         * platform/mock/SpeechInputClientMock.cpp: Added.
1671         (WebCore):
1672         (WebCore::SpeechInputClientMock::SpeechInputClientMock):
1673         (WebCore::SpeechInputClientMock::setListener):
1674         (WebCore::SpeechInputClientMock::startRecognition):
1675         (WebCore::SpeechInputClientMock::stopRecording):
1676         (WebCore::SpeechInputClientMock::cancelRecognition):
1677         (WebCore::SpeechInputClientMock::addRecognitionResult):
1678         (WebCore::SpeechInputClientMock::clearResults):
1679         (WebCore::SpeechInputClientMock::timerFired):
1680         * platform/mock/SpeechInputClientMock.h: Added.
1681         (WebCore):
1682         (SpeechInputClientMock):
1683
1684 2012-01-30  Yury Semikhatsky  <yurys@chromium.org>
1685
1686         Unreviewed. Clang build fix after r106218
1687
1688         * inspector/CodeGeneratorInspector.py:
1689
1690 2012-01-30  ChangSeok Oh  <shivamidow@gmail.com>
1691
1692         Make GraphicsContext3DPrivate of GTK port shareable.
1693         https://bugs.webkit.org/show_bug.cgi?id=77296
1694
1695         Reviewed by Eric Seidel.
1696
1697         GraphicsContext3DPrivate.cpp/h of GTK port look shareable with another port
1698         using glx backend for WebGL. For example, EFL port.
1699         Moved GraphicsContext3DPrivate.cpp and its header into Source/WebCore/platform/graphics/glx.
1700
1701         No new tests required, because of no new feature.
1702
1703         * GNUmakefile.am:
1704         * GNUmakefile.list.am:
1705         * platform/graphics/glx/GraphicsContext3DPrivate.cpp: Renamed from Source/WebCore/platform/graphics/gtk/GraphicsContext3DPrivate.cpp.
1706         (sharedDisplay):
1707         (WebCore):
1708         (WebCore::activeGraphicsContexts):
1709         (WebCore::GraphicsContext3DPrivate::addActiveGraphicsContext):
1710         (WebCore::GraphicsContext3DPrivate::removeActiveGraphicsContext):
1711         (WebCore::GraphicsContext3DPrivate::cleanupActiveContextsAtExit):
1712         (WebCore::GraphicsContext3DPrivate::create):
1713         (WebCore::GraphicsContext3DPrivate::createPbufferContext):
1714         (WebCore::GraphicsContext3DPrivate::createPixmapContext):
1715         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
1716         (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate):
1717         (WebCore::GraphicsContext3DPrivate::makeContextCurrent):
1718         * platform/graphics/glx/GraphicsContext3DPrivate.h: Renamed from Source/WebCore/platform/graphics/gtk/GraphicsContext3DPrivate.h.
1719         (WebCore):
1720         (GraphicsContext3DPrivate):
1721
1722 2012-01-26  Hans Wennborg  <hans@chromium.org>
1723
1724         Speech Input: move MockSpeechInputClient into Chromium DumpRenderTree implementation
1725         https://bugs.webkit.org/show_bug.cgi?id=77083
1726
1727         Reviewed by Darin Fisher.
1728
1729         Remove SpeechInputClientMock. The mock is moving to the DumpRenderTree
1730         implementation.
1731
1732         No new tests, just refactoring.
1733
1734         * GNUmakefile.list.am:
1735         * Target.pri:
1736         * WebCore.gypi:
1737         * WebCore.vcproj/WebCore.vcproj:
1738         * WebCore.xcodeproj/project.pbxproj:
1739         * platform/mock/SpeechInputClientMock.cpp: Removed.
1740         * platform/mock/SpeechInputClientMock.h: Removed.
1741
1742 2012-01-30  Peter Rybin  <peter.rybin@gmail.com>
1743
1744         Web Inspector: CodeGeneratorInspector.py: clean InspectorBackendDispatcher.h
1745         https://bugs.webkit.org/show_bug.cgi?id=77062
1746
1747         Reviewed by Yury Semikhatsky.
1748
1749         Code generator is changed. Now it generates InspectorBackendDispatcher
1750         as an abstract class so that implementation details could be fully
1751         hidden in .cpp file in a separate 'impl' class. This should make .h
1752         file more clear.
1753         Also new formal interfaces to domain agents are generated. This is an
1754         improvement over the current case when interfaces to agents are
1755         definen implicitly at calling sites.
1756
1757         * inspector/CodeGeneratorInspector.py:
1758         (RawTypes):
1759         (RawTypes.OutputPassModel):
1760         (RawTypes.OutputPassModel.ByPointer):
1761         (RawTypes.OutputPassModel.ByPointer.get_argument_prefix):
1762         (RawTypes.OutputPassModel.ByPointer.get_parameter_type_suffix):
1763         (RawTypes.OutputPassModel.ByReference):
1764         (RawTypes.OutputPassModel.ByReference.get_argument_prefix):
1765         (RawTypes.OutputPassModel.ByReference.get_parameter_type_suffix):
1766         (RawTypes.BaseType.is_event_param_check_optional):
1767         (RawTypes.String):
1768         (RawTypes.String.get_output_pass_model):
1769         (RawTypes.String.is_heavy_value):
1770         (RawTypes.Int):
1771         (RawTypes.Int.get_output_pass_model):
1772         (RawTypes.Int.is_heavy_value):
1773         (RawTypes.Number):
1774         (RawTypes.Number.get_output_pass_model):
1775         (RawTypes.Number.is_heavy_value):
1776         (RawTypes.Bool.get_c_param_type):
1777         (RawTypes.Bool):
1778         (RawTypes.Bool.get_output_pass_model):
1779         (RawTypes.Bool.is_heavy_value):
1780         (RawTypes.Object):
1781         (RawTypes.Object.get_output_pass_model):
1782         (RawTypes.Object.is_heavy_value):
1783         (RawTypes.Any.get_c_initializer):
1784         (RawTypes.Any):
1785         (RawTypes.Any.get_output_pass_model):
1786         (RawTypes.Any.is_heavy_value):
1787         (RawTypes.Array):
1788         (RawTypes.Array.get_output_pass_model):
1789         (RawTypes.Array.is_heavy_value):
1790         (InspectorBackendDispatcherImpl):
1791         (void):
1792         (Generator):
1793         (Generator.go):
1794         (Generator.process_command):
1795         * inspector/InspectorController.cpp:
1796         (WebCore::InspectorController::connectFrontend):
1797         * inspector/WorkerInspectorController.cpp:
1798         (WebCore::WorkerInspectorController::connectFrontend):
1799
1800 2012-01-29  Zoltan Herczeg  <zherczeg@webkit.org>
1801
1802         Custom written CSS lexer
1803         https://bugs.webkit.org/show_bug.cgi?id=70107
1804
1805         Reviewed by Antti Koivisto and Oliver Hunt.
1806
1807         This patch replaces the flex based CSS lexer to a
1808         new, custom written one. The new code is more
1809         than 2 times faster according to oprofile and CPU
1810         cycle counters.
1811
1812         The code structure is quite straightforward: it choose
1813         the possible token group based on the first character
1814         and employ utility functions to parse the longer than
1815         one character long ones. Most of the utilities are inline
1816         to make the lexer fast.
1817
1818         All build systems updated. Including removing the flex support.
1819
1820         Existing tests cover this feature.
1821
1822         * CMakeLists.txt:
1823         * DerivedSources.make:
1824         * DerivedSources.pri:
1825         * GNUmakefile.am:
1826         * GNUmakefile.list.am:
1827         * WebCore.gyp/WebCore.gyp:
1828         * WebCore.gyp/scripts/action_maketokenizer.py: Removed.
1829         * WebCore.gypi:
1830         * WebCore.vcproj/WebCore.vcproj:
1831         * WebCore.xcodeproj/project.pbxproj:
1832         * css/CSSParser.cpp:
1833         (WebCore::CSSParser::CSSParser):
1834         (WebCore::CSSParser::setupParser):
1835         (WebCore::parseSimpleLengthValue):
1836         (WebCore::mightBeRGBA):
1837         (WebCore::mightBeRGB):
1838         ():
1839         (WebCore::isCSSLetter):
1840         (WebCore):
1841         (WebCore::isCSSEscape):
1842         (WebCore::isURILetter):
1843         (WebCore::isIdentifierStartAfterDash):
1844         (WebCore::isEqualToCSSIdentifier):
1845         (WebCore::checkAndSkipEscape):
1846         (WebCore::skipWhiteSpace):
1847         (WebCore::CSSParser::isIdentifierStart):
1848         (WebCore::CSSParser::checkAndSkipString):
1849         (WebCore::CSSParser::parseEscape):
1850         (WebCore::CSSParser::parseIdentifier):
1851         (WebCore::CSSParser::parseString):
1852         (WebCore::CSSParser::parseURI):
1853         (WebCore::CSSParser::parseUnicodeRange):
1854         (WebCore::CSSParser::parseNthChild):
1855         (WebCore::CSSParser::parseNthChildExtra):
1856         (WebCore::CSSParser::detectFunctionTypeToken):
1857         (WebCore::CSSParser::detectMediaQueryToken):
1858         (WebCore::CSSParser::detectNumberToken):
1859         (WebCore::CSSParser::detectDashToken):
1860         (WebCore::CSSParser::detectAtToken):
1861         (WebCore::CSSParser::lex):
1862         (WebCore::CSSParser::markSelectorListStart):
1863         (WebCore::CSSParser::markSelectorListEnd):
1864         (WebCore::CSSParser::markRuleBodyStart):
1865         (WebCore::CSSParser::markRuleBodyEnd):
1866         (WebCore::CSSParser::markPropertyStart):
1867         (WebCore::CSSParser::markPropertyEnd):
1868         * css/CSSParser.h:
1869         (WebCore::CSSParser::token):
1870         (CSSParser):
1871         ():
1872         * css/tokenizer.flex: Removed.
1873
1874 2012-01-29  Dale Curtis  <dalecurtis@chromium.org>
1875
1876         Prepare WebCore.gyp for ffmpeg source transition.
1877         https://bugs.webkit.org/show_bug.cgi?id=77254
1878
1879         We're migrating our ffmpeg repo from a set of patches living on top of
1880         a tarball to an actual git fork of upstream.  The paths have changed
1881         slightly.
1882
1883         In order to not break the current build, we'll keep both paths around
1884         until the transition is complete.  Afterward the 'patched-ffmpeg' path
1885         will be removed.
1886
1887         Reviewed by Tony Chang.
1888
1889         No new tests. GYP change, if it doesn't work, nothing will compile.
1890
1891         * WebCore.gyp/WebCore.gyp:
1892
1893 2012-01-29  Hayato Ito  <hayato@chromium.org>
1894
1895         Add a ShadowRoot constructor as 'WebKitShadowRootConstructor', enabled by SHADOW_DOM flag.
1896         https://bugs.webkit.org/show_bug.cgi?id=76354
1897
1898         Reviewed by Hajime Morita.
1899
1900         We use vendor-prefixed name, 'WebKitShadowRoot', instead of 'ShadowRoot'
1901         since this is a feature under development.
1902
1903         * dom/ShadowRoot.cpp:
1904         (WebCore::ShadowRoot::create):
1905         (WebCore):
1906         * dom/ShadowRoot.h:
1907         (WebCore):
1908         (ShadowRoot):
1909         * dom/ShadowRoot.idl:
1910         * page/DOMWindow.idl:
1911
1912 2012-01-29  Noel Gordon  <noel.gordon@gmail.com>
1913
1914         [chromium] Use decoding swizzle only on libjpeg-turbo 1.1.90+
1915         https://bugs.webkit.org/show_bug.cgi?id=74286
1916
1917         Reviewed by Kenneth Russell.
1918
1919         No new tests. Covered by many existing tests: in particular 
1920             fast/images/*, fast/canvas/*,
1921             tables/mozilla/bugs/bug29314.html
1922             tables/mozilla/bugs/bug13169.html
1923             tables/mozilla/bugs/bug10565.html
1924             tables/mozilla/bugs/bug11026.html
1925             fast/repaint/backgroundSizeRepaint.html
1926             fast/repaint/block-layout-inline-children-replaced.html
1927             fast/repaint/clipped-relative.html
1928             fast/repaint/selected-replaced.html
1929             tables/mozilla/bugs/bug12908-1.html
1930
1931         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
1932         (rgbOutputColorSpace): Swizzle decode iff libjpeg-turbo is r732 or above.
1933
1934 2012-01-29  Sheriff Bot  <webkit.review.bot@gmail.com>
1935
1936         Unreviewed, rolling out r105999.
1937         http://trac.webkit.org/changeset/105999
1938         https://bugs.webkit.org/show_bug.cgi?id=77304
1939
1940         Validating that this caused a performance regression in page
1941         load tests. (Requested by leviw on #webkit).
1942
1943         * dom/NamedNodeMap.cpp:
1944         * dom/NamedNodeMap.h:
1945         (NamedNodeMap):
1946         * dom/StyledElement.cpp:
1947         (WebCore::StyledElement::updateStyleAttribute):
1948         (WebCore::StyledElement::createInlineStyleDecl):
1949         (WebCore):
1950         (WebCore::StyledElement::destroyInlineStyleDecl):
1951         (WebCore::StyledElement::ensureInlineStyleDecl):
1952         (WebCore::StyledElement::style):
1953         (WebCore::StyledElement::addSubresourceAttributeURLs):
1954         * dom/StyledElement.h:
1955         (WebCore::StyledElement::inlineStyleDecl):
1956         (StyledElement):
1957
1958 2012-01-29  Sheriff Bot  <webkit.review.bot@gmail.com>
1959
1960         Unreviewed, rolling out r106109.
1961         http://trac.webkit.org/changeset/106109
1962         https://bugs.webkit.org/show_bug.cgi?id=77302
1963
1964         It made tests crash (Requested by Ossy_weekend on #webkit).
1965
1966         * platform/graphics/qt/TextureMapperQt.cpp:
1967         (WebCore::TextureMapperQt::setGraphicsContext):
1968         * platform/graphics/qt/TextureMapperQt.h:
1969         (WebCore::TextureMapperQt::initialize):
1970
1971 2012-01-28  Alexander Færøy  <ahf@0x90.dk>
1972
1973         [Qt] Remove references to CSSBorderImageValue.h in Target.pri
1974         https://bugs.webkit.org/show_bug.cgi?id=77277
1975
1976         Reviewed by Antonio Gomes.
1977
1978         CSSBorderImageValue.h was removed in r105502.
1979
1980         * Target.pri:
1981
1982 2012-01-28  Julien Chaffraix  <jchaffraix@webkit.org>
1983
1984         REGRESSION (r94016): Element with visibility:hidden but visible descendant may not be properly repainted
1985         https://bugs.webkit.org/show_bug.cgi?id=76126
1986
1987         Reviewed by Simon Fraser.
1988
1989         Tests: fast/layers/scroll-no-visible-content-but-visible-descendant-expected.html
1990                fast/layers/scroll-no-visible-content-but-visible-descendant.html
1991
1992         The optimization missed out that if the current layer does not have some visible content
1993         (m_hasVisibleContent is false), a descendant could totally be visible and would need to
1994         have its repaint rectangles recomputed.
1995
1996         * rendering/RenderLayer.cpp:
1997         (WebCore::RenderLayer::updateLayerPositionsAfterScroll):
1998         Bail out only if the layer doesn't have visible content AND no visible descendants.
1999
2000 2012-01-27  Chris Marrin  <cmarrin@apple.com>
2001
2002         Get rid of TransformOperationList
2003         https://bugs.webkit.org/show_bug.cgi?id=77249
2004
2005         Reviewed by Dan Bernstein.
2006
2007         Changed fetchTransformOperationList to validateTransformOperations and got rid of separately generated list
2008         of transform operations. These are not needed, they are already available in the keyframe lists and they
2009         make it more difficult to add support for hardware animated filters. No behavior changes.
2010
2011
2012         * platform/graphics/GraphicsLayer.cpp:
2013         (WebCore::GraphicsLayer::validateTransformOperations):
2014         * platform/graphics/GraphicsLayer.h:
2015         (GraphicsLayer):
2016         * platform/graphics/ca/GraphicsLayerCA.cpp:
2017         (WebCore::GraphicsLayerCA::appendToUncommittedAnimations):
2018         (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
2019         * platform/graphics/ca/GraphicsLayerCA.h:
2020         ():
2021         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2022         (WebCore::GraphicsLayerTextureMapper::addAnimation):
2023         * platform/graphics/texmap/TextureMapperAnimation.cpp:
2024         (WebCore::applyTransformAnimation):
2025         (WebCore::TextureMapperAnimation::TextureMapperAnimation):
2026         (WebCore::TextureMapperAnimation::applyInternal):
2027         * platform/graphics/texmap/TextureMapperAnimation.h:
2028         (TextureMapperAnimation):
2029
2030 2012-01-27  Raymond Toy  <rtoy@google.com>
2031
2032         AudioPannerNode::setPanningModel() does not update m_panningModel properly
2033         https://bugs.webkit.org/show_bug.cgi?id=66830
2034
2035         Reviewed by Kenneth Russell.
2036
2037         Test: webaudio/panner-set-model.html
2038
2039         * webaudio/AudioPannerNode.cpp:
2040         (WebCore::AudioPannerNode::setPanningModel):  Update
2041         m_panningModel appropriately.  Also silently do nothing if the
2042         model is invalid.
2043
2044 2012-01-27  Chris Rogers  <crogers@google.com>
2045
2046         HRTFPanner could have high-quality mode for smoother transitions
2047         https://bugs.webkit.org/show_bug.cgi?id=76470
2048
2049         Reviewed by Kenneth Russell.
2050
2051         * platform/audio/HRTFPanner.cpp:
2052         (WebCore):
2053         (WebCore::HRTFPanner::HRTFPanner):
2054         (WebCore::HRTFPanner::reset):
2055         (WebCore::HRTFPanner::calculateDesiredAzimuthIndexAndBlend):
2056         (WebCore::HRTFPanner::pan):
2057         * platform/audio/HRTFPanner.h:
2058         (HRTFPanner):
2059         ():
2060
2061 2012-01-27  Mike Lawther  <mikelawther@chromium.org>
2062
2063         CSS calc parsing stage
2064         https://bugs.webkit.org/show_bug.cgi?id=57082
2065
2066         This is the parsing stage of calc. The expressions are evaluated and 
2067         expression trees are generated. CSS values are not created yet - that
2068         will happen in a subsequent commit. 
2069
2070         Reviewed by David Hyatt.
2071
2072         No functional change - covered by existing tests in LayoutTests/css3/calc.
2073
2074         * CMakeLists.txt:
2075         * GNUmakefile.list.am:
2076         * Target.pri:
2077         * WebCore.gypi:
2078         * WebCore.vcproj/WebCore.vcproj:
2079         * WebCore.xcodeproj/project.pbxproj:
2080         * css/CSSCalculationValue.cpp: Added.
2081         (WebCore):
2082         (WebCore::unitCategory):
2083         (WebCore::CSSCalcValue::customCssText):
2084         (WebCore::CSSCalcExpressionNode::~CSSCalcExpressionNode):
2085         (CSSCalcPrimitiveValue):
2086         (WebCore::CSSCalcPrimitiveValue::create):
2087         (WebCore::CSSCalcPrimitiveValue::cssText):
2088         (WebCore::CSSCalcPrimitiveValue::CSSCalcPrimitiveValue):
2089         ():
2090         (CSSCalcBinaryOperation):
2091         (WebCore::CSSCalcBinaryOperation::create):
2092         (WebCore::CSSCalcBinaryOperation::CSSCalcBinaryOperation):
2093         (WebCore::checkDepthAndIndex):
2094         (CSSCalcExpressionNodeParser):
2095         (WebCore::CSSCalcExpressionNodeParser::parseCalc):
2096         (Value):
2097         (WebCore::CSSCalcExpressionNodeParser::operatorValue):
2098         (WebCore::CSSCalcExpressionNodeParser::parseValue):
2099         (WebCore::CSSCalcExpressionNodeParser::parseValueTerm):
2100         (WebCore::CSSCalcExpressionNodeParser::parseValueMultiplicativeExpression):
2101         (WebCore::CSSCalcExpressionNodeParser::parseAdditiveValueExpression):
2102         (WebCore::CSSCalcExpressionNodeParser::parseValueExpression):
2103         (WebCore::CSSCalcValue::create):
2104         * css/CSSCalculationValue.h: Added.
2105         (WebCore):
2106         ():
2107         (CSSCalcExpressionNode):
2108         (WebCore::CSSCalcExpressionNode::category):
2109         (WebCore::CSSCalcExpressionNode::isInt):
2110         (WebCore::CSSCalcExpressionNode::isZero):
2111         (WebCore::CSSCalcExpressionNode::CSSCalcExpressionNode):
2112         (CSSCalcValue):
2113         (WebCore::CSSCalcValue::category):
2114         (WebCore::CSSCalcValue::isInt):
2115         (WebCore::CSSCalcValue::CSSCalcValue):
2116         * css/CSSParser.cpp:
2117         (WebCore::CSSParser::validCalculationUnit):
2118         (WebCore):
2119         (WebCore::CSSParser::validUnit):
2120         (WebCore::CSSParser::createPrimitiveNumericValue):
2121         (WebCore::CSSParser::parseValidPrimitive):
2122         (WebCore::CSSParser::parseValue):
2123         (WebCore::CSSParser::parseFillPositionComponent):
2124         (WebCore::CSSParser::parsedDouble):
2125         (WebCore::CSSParser::isCalculation):
2126         (WebCore::CSSParser::colorIntFromValue):
2127         (WebCore::CSSParser::parseColorParameters):
2128         (WebCore::CSSParser::parseHSLParameters):
2129         (WebCore::ShadowParseContext::ShadowParseContext):
2130         (WebCore::ShadowParseContext::commitLength):
2131         (WebCore::ShadowParseContext::commitStyle):
2132         (ShadowParseContext):
2133         (WebCore::CSSParser::parseShadow):
2134         (WebCore::BorderImageSliceParseContext::BorderImageSliceParseContext):
2135         (WebCore::BorderImageSliceParseContext::commitNumber):
2136         (WebCore::BorderImageSliceParseContext::commitBorderImageSlice):
2137         (BorderImageSliceParseContext):
2138         (WebCore::CSSParser::parseBorderImageSlice):
2139         (WebCore::BorderImageQuadParseContext::BorderImageQuadParseContext):
2140         (WebCore::BorderImageQuadParseContext::commitNumber):
2141         (WebCore::BorderImageQuadParseContext::commitBorderImageQuad):
2142         (BorderImageQuadParseContext):
2143         (WebCore::CSSParser::parseBorderImageQuad):
2144         (WebCore::CSSParser::parseCalculation):
2145         * css/CSSParser.h:
2146         ():
2147         (CSSParser):
2148         * css/CSSValue.cpp:
2149         (WebCore::CSSValue::cssText):
2150         (WebCore::CSSValue::destroy):
2151         * css/CSSValue.h:
2152         (WebCore::CSSValue::isCalculationValue):
2153         ():
2154         * css/SVGCSSParser.cpp:
2155         (WebCore::CSSParser::parseSVGValue):
2156         * platform/CalculationValue.cpp: Added.
2157         (WebCore):
2158         * platform/CalculationValue.h: Added.
2159         (WebCore):
2160         ():
2161
2162 2012-01-27  Anders Carlsson  <andersca@apple.com>
2163
2164         WebTileLayers should honor the acceleratesDrawing flag
2165         https://bugs.webkit.org/show_bug.cgi?id=77242
2166         <rdar://problem/10622128>
2167
2168         Reviewed by Dan Bernstein.
2169
2170         * platform/graphics/ca/mac/TileCache.h:
2171         (WebCore::TileCache::acceleratesDrawing):
2172         Add getter.
2173
2174         * platform/graphics/ca/mac/TileCache.mm:
2175         (WebCore::TileCache::TileCache):
2176         Initialize m_acceleratesDrawing.
2177
2178         (WebCore::TileCache::setAcceleratesDrawing):
2179         Set m_acceleratesDrawing and go through all tile layers and update the flag.
2180
2181         (WebCore::TileCache::createTileLayer):
2182         Call -[CALayer setAcceleratesDrawing:] on the newly created layer.
2183
2184         * platform/graphics/ca/mac/WebTileCacheLayer.mm:
2185         (-[WebTileCacheLayer setAcceleratesDrawing:]):
2186         (-[WebTileCacheLayer acceleratesDrawing]):
2187         Call through to the TileCache object.
2188
2189 2012-01-27  Raymond Toy  <rtoy@google.com>
2190
2191         Round time to sample frame
2192         https://bugs.webkit.org/show_bug.cgi?id=76659
2193
2194         Three major changes:
2195
2196         1. Modify timeToSampleFrame to round the time to the sample frame
2197         and add support for Visual Studio to round the time in the same
2198         way as on gcc. (The issue is that Visual Studio uses x87
2199         instructions with 80-bit floats.)  This makes Visual Studio more
2200         consistent with the results with gcc.
2201
2202         2. Change the current time variable from keeping time in seconds
2203         to keeping time in sample frames.  This minimizes rounding except
2204         when needed for the Javascript API.
2205
2206         3. Update AudioBufferSourceNode::process to use samples (instead
2207         of time) as much as possible to reduce round-off effects.
2208
2209         Reviewed by Kenneth Russell.
2210
2211         Tests: Added note-grain-on test to exercise precise
2212         timing. Existing tests (gain and audiobuffersource-playbackrate)
2213         also cover some of these changes, and the equalpower panner test is
2214         modified to enable the tests for the offset of the impulses.
2215
2216         * platform/audio/AudioUtilities.cpp:
2217         (WebCore::AudioUtilities::timeToSampleFrame): Moved from
2218         AudioParamTimeLine and slightly modified, and updated to round
2219         operations consistently.  Add special flags for Visual Studio to
2220         generate code with rounding that is consistent with gcc.
2221         * platform/audio/AudioUtilities.h: Declare new function.
2222         * webaudio/AudioBufferSourceNode.cpp:
2223         (WebCore::AudioBufferSourceNode::process): Use new functions to
2224         convert time to sample frame.  Update code to use integer
2225         arithmetic as much as possible.
2226         (WebCore::AudioBufferSourceNode::renderFromBuffer): Use
2227         timeToSampleFrame to convert time to sample frame.
2228         * webaudio/AudioContext.h: Define new currentSample method to get
2229         the current sample.
2230         * webaudio/AudioDestinationNode.cpp:
2231         (WebCore::AudioDestinationNode::provideInput): Use new function to
2232         convert sample frame to time.  Update
2233         * webaudio/AudioDestiationNode.h: Rename m_currentTime to
2234         m_currentSample, add method to return current Sample.  Update
2235         currentTime() method to compute time from the current sample.
2236         * webaudio/AudioParamTimeline.cpp:
2237         (WebCore::AudioParamTimeline::valuesForTimeRangeImpl): Remove
2238         timeToSampleFrame and use new function in AudioUtilities to
2239         convert time to sample frame.
2240
2241 2012-01-27  Adrienne Walker  <enne@google.com>
2242
2243         [chromium] Don't ever skip drawing the non-composited content layer
2244         https://bugs.webkit.org/show_bug.cgi?id=77236
2245
2246         Reviewed by James Robinson.
2247
2248         Since the root layer has its textures potentially reserved last in a
2249         front-to-back iteration, don't ever skip drawing it if we can't
2250         reserve its textures. Instead, checkerboard and draw background color
2251         quads instead to fill the viewport. This behavior is tied to the
2252         backgroundFillsViewport setting.
2253
2254         * platform/graphics/chromium/TiledLayerChromium.cpp:
2255         (WebCore::TiledLayerChromium::prepareToUpdateTiles):
2256         * platform/graphics/chromium/cc/CCLayerTilingData.cpp:
2257         (WebCore::CCLayerTilingData::reset):
2258         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
2259         (WebCore::CCTiledLayerImpl::appendQuads):
2260
2261 2012-01-27  Martin Robinson  <mrobinson@igalia.com>
2262
2263         Fix a warning in the GTK+ build.
2264
2265         Reviewed by Gustavo Noronha Silva.
2266
2267         No new tests. This should not change behavior.
2268
2269         * plugins/gtk/PluginViewGtk.cpp:
2270         (WebCore::PluginView::platformStart): Use reinterpet_cast to convert X11 Windows into void pointers.
2271
2272 2012-01-27  Tien-Ren Chen  <trchen@chromium.org>
2273
2274         [chromium] CCLayerTreeHostImpl minor code cleanup
2275         https://bugs.webkit.org/show_bug.cgi?id=77181
2276
2277         Fix a typo in comments and group functions properly.
2278         Replace duplicated content size code with function.
2279
2280         Reviewed by James Robinson.
2281
2282         No new tests. No change in behavior.
2283
2284         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2285         (WebCore::CCLayerTreeHostImpl::startPageScaleAnimation):
2286         (WebCore::CCLayerTreeHostImpl::contentSize):
2287         (WebCore):
2288         (WebCore::CCLayerTreeHostImpl::updateMaxScrollPosition):
2289         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
2290         (CCLayerTreeHostImpl):
2291
2292 2012-01-27  Kevin Ollivier  <kevino@theolliviers.com>
2293
2294         [wx] Unreviewed. Build fix, add missing header.
2295
2296         * rendering/svg/SVGImageBufferTools.h:
2297
2298 2012-01-27  Victor Carbune  <victor@rosedu.org>
2299
2300         Added the GenericEventQueue class in order to generalize asynchronous
2301         event dispatching in HTMLMediaElement.
2302
2303         In order to support asynchronous events dispatched by HTMLTrackElement
2304         there is a need for a generalized implementation of an event queue to
2305         be used for both HTMLMediaElement and Text Tracks.
2306
2307         https://bugs.webkit.org/show_bug.cgi?id=76110
2308
2309         Reviewed by Eric Carlson.
2310
2311         No new tests. No new functionality, only refactoring.
2312
2313         * CMakeLists.txt:
2314         * GNUmakefile.list.am:
2315         * Target.pri:
2316         * WebCore.gypi:
2317         * WebCore.vcproj/WebCore.vcproj:
2318         * WebCore.xcodeproj/project.pbxproj:
2319
2320         * dom/GenericEventQueue.cpp: Added. Implements the abstract class EventQueue.
2321         (WebCore::GenericEventQueue::GenericEventQueue):
2322         (WebCore::GenericEventQueue::~GenericEventQueue):
2323         (WebCore::GenericEventQueue::enqueueEvent): Append an event to the current
2324         pending event list.
2325         (WebCore::GenericEventQueue::cancelEvent): Removes an event from the current
2326         pending event list.
2327         (WebCore::GenericEventQueue::timerFired): Callback method when the timer fires.
2328         Dispatches all events that are currently pending.
2329         (WebCore::GenericEventQueue::close): Closes the event queue such that it cannot
2330         be used anymore.
2331         (WebCore::GenericEventQueue::cancelAllEvents): Removes all pending events.
2332         (WebCore::GenericEventQueue::hasPendingEvents): True if there are pending events.
2333         * dom/GenericEventQueue.h: Added.
2334
2335         * html/HTMLMediaElement.cpp:
2336         (WebCore::HTMLMediaElement::HTMLMediaElement):
2337         (WebCore::HTMLMediaElement::scheduleEvent): Refactored method to enqueue
2338         the scheduled event on the GenericEventQueue instance.
2339         (WebCore::HTMLMediaElement::cancelPendingEventsAndCallbacks): Ditto.
2340         (WebCore::HTMLMediaElement::hasPendingActivity): Ditto.
2341         (WebCore::HTMLMediaElement::dispatchEvent): This method is overriden
2342         to keep an evidence when a canPlay event is fired.
2343         * html/HTMLMediaElement.h:
2344
2345 2012-01-27  Martin Robinson  <mrobinson@igalia.com>
2346
2347         Fix a warning in the GTK+ build.
2348
2349         Reviewed by Gustavo Noronha Silva.
2350
2351         No new tests. This should not change behavior.
2352
2353         * plugins/gtk/PluginViewGtk.cpp:
2354         (WebCore::PluginView::platformStart): Use reinterpet_cast to convert X11 Windows into void pointers.
2355
2356 2012-01-27  Benjamin Poulain  <bpoulain@apple.com>
2357
2358         Speed up the prefix matching of cssPropertyName()
2359         https://bugs.webkit.org/show_bug.cgi?id=77158
2360
2361         Reviewed by Geoffrey Garen.
2362
2363         This patch improves the performance by:
2364         -not checking the PropertyName with all 7 prefix
2365          (now, in the worse case, 2 prefixes are checked)
2366         -avoiding the conversion 8bits->16bits by using String::operator[]
2367          instead of ::characters()
2368
2369         To avoid checking every prefix, the code branch based on the first
2370         characters of the propertyName.
2371         The remaining of the prefix is checked character by characters like before.
2372
2373         When accessing CSS property, this gives a 13% improvement when there is no prefix.
2374         There is no performance regression for the matching of prefix, including for the first one
2375         of the previous matching code ("css").
2376
2377         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
2378         ():
2379         (WebCore::matchesCSSPropertyNamePrefix):
2380         (WebCore):
2381         (WebCore::getCSSPropertyNamePrefix):
2382         (WebCore::cssPropertyName):
2383
2384 2012-01-27  Ken Buchanan  <kenrb@chromium.org>
2385
2386         Crash in updateFirstLetter() from unnecessary anonymous block
2387         https://bugs.webkit.org/show_bug.cgi?id=72675
2388
2389         Reviewed by David Hyatt.
2390
2391         There was a problem with anonymous blocks not getting removed when
2392         their only block flow siblings are removed if they also have non-block
2393         flow first-letter siblings (i.e. floats). This patch modifies
2394         RenderBlock::removeChild() to look for this situation and strip out
2395         unnecessary anonymous container blocks if it occurs.
2396
2397         * rendering/RenderBlock.cpp:
2398         (WebCore::RenderBlock::removeChild):
2399         (WebCore::RenderBlock::collapseAnonymousBoxChild): Added
2400         * rendering/RenderBlock.h:
2401         (WebCore::RenderBlock::collapseAnonymousBoxChild): Added
2402
2403 2012-01-27  Fady Samuel  <fsamuel@chromium.org>
2404
2405         Rename shouldLayoutFixedElementsRelativeToFrame and make it a setting
2406         https://bugs.webkit.org/show_bug.cgi?id=76459
2407
2408         Reviewed by Darin Fisher.
2409
2410         This should be a setting because it is independent of a particular frame and
2411         should be preserved even if the mainframe changes.
2412
2413         Renamed (set)ShouldLayoutFixedElementsRelativeToFrame to 
2414         (set)FixedElementsLayoutRelativeToFrame due to the connotation
2415         the word "should" may have in this context: If set, 
2416         position:fixed elements will ALWAYS be laid out relative to the frame.
2417
2418
2419         * WebCore.exp.in:
2420         * page/FrameView.cpp:
2421         (WebCore::FrameView::reset):
2422         (WebCore::FrameView::scrollXForFixedPosition):
2423         (WebCore::FrameView::scrollYForFixedPosition):
2424         (WebCore::FrameView::fixedElementsLayoutRelativeToFrame):
2425         (WebCore):
2426         * page/FrameView.h:
2427         (FrameView):
2428         * page/Settings.cpp:
2429         (WebCore::Settings::Settings):
2430         (WebCore::Settings::setFixedElementsLayoutRelativeToFrame):
2431         (WebCore):
2432         * page/Settings.h:
2433         (Settings):
2434         (WebCore::Settings::fixedElementsLayoutRelativeToFrame):
2435         * rendering/RenderBox.cpp:
2436         (WebCore::RenderBox::fixedElementLaysOutRelativeToFrame):
2437         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
2438         (WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
2439         * rendering/RenderBox.h:
2440         (RenderBox):
2441         * testing/InternalSettings.cpp:
2442         (WebCore::InternalSettings::setFixedElementsLayoutRelativeToFrame):
2443         * testing/InternalSettings.h:
2444         (InternalSettings):
2445         * testing/InternalSettings.idl:
2446
2447 2012-01-27  Kentaro Hara  <haraken@chromium.org>
2448
2449         Support the [Supplemental] IDL for constants
2450         https://bugs.webkit.org/show_bug.cgi?id=77228
2451
2452         Reviewed by Adam Barth.
2453
2454         We have supported the [Supplemental] IDL for attributes and methods.
2455         This patch supports it for constants.
2456
2457         Test: bindings/scripts/test/TestSupplemental.idl
2458
2459         * bindings/scripts/generate-bindings.pl:
2460         Supported [Supplemental] constants.
2461         Updated some comments.
2462
2463         * bindings/scripts/test/TestSupplemental.idl:
2464         Added test cases for [Supplemental] constants.
2465
2466         * bindings/scripts/test/CPP/WebDOMTestInterface.h: Updated the test results.
2467         * bindings/scripts/test/JS/JSTestInterface.cpp: Ditto.
2468         (WebCore::JSTestInterfacePrototype::getOwnPropertySlot):
2469         (WebCore::JSTestInterfacePrototype::getOwnPropertyDescriptor):
2470         (WebCore):
2471         (WebCore::jsTestInterfaceSUPPLEMENTAL_CONSTANT1):
2472         (WebCore::jsTestInterfaceSUPPLEMENTAL_CONSTANT2):
2473         * bindings/scripts/test/JS/JSTestInterface.h: Ditto.
2474         (WebCore):
2475         * bindings/scripts/test/ObjC/DOMTestInterface.h: Ditto.
2476         * bindings/scripts/test/V8/V8TestInterface.cpp: Ditto.
2477         (WebCore::ConfigureV8TestInterfaceTemplate):
2478
2479 2012-01-27  Anders Carlsson  <andersca@apple.com>
2480
2481         When threaded scrolling is enabled for a FrameView, always put scrollbars in layers
2482         https://bugs.webkit.org/show_bug.cgi?id=77232
2483         <rdar://problem/10766708>
2484
2485         Reviewed by Beth Dakin.
2486
2487         * page/ScrollingCoordinator.cpp:
2488         (WebCore::ScrollingCoordinator::coordinatesScrollingForFrameView):
2489         * page/ScrollingCoordinator.h:
2490         Add a new helper function.
2491
2492         * rendering/RenderLayerCompositor.cpp:
2493         (WebCore::shouldCompositeOverflowControls):
2494         Make this take a FrameView, check with the scrolling coordinator if the overflow controls should be composited.
2495
2496         (WebCore::RenderLayerCompositor::requiresHorizontalScrollbarLayer):
2497         (WebCore::RenderLayerCompositor::requiresVerticalScrollbarLayer):
2498         (WebCore::RenderLayerCompositor::requiresScrollCornerLayer):
2499         Update for the change to make shouldCompositeOverflowControls take a FrameView.
2500
2501 2012-01-24  Vincent Scheib  <scheib@chromium.org>
2502
2503         Pointer Lock: Implement pointer interface
2504         https://bugs.webkit.org/show_bug.cgi?id=75762
2505
2506         Reviewed by Julien Chaffraix.
2507
2508         Implement the navigator.pointer interface via a new
2509         PointerLockController class, as per
2510         http://dvcs.w3.org/hg/webevents/raw-file/default/mouse-lock.html.
2511
2512         The implementation is being made in steps, the feature is still behind
2513         compile-time and run-time flags, 'webkit' prefixed, and not yet enabled
2514         in any browser. (Chromium has a developer flag required.) Follow-up
2515         work will include handling DOM elements being removed, making all
2516         callbacks asynchronous, iframe permissions (similar to Full Screen),
2517         etc.
2518
2519         PointerLockController maintains state of which Element is the current
2520         lock target and the success and failure callbacks. ChromeClient has
2521         methods added to expose the required state change requests.
2522
2523         Tests: pointer-lock/lock-already-locked.html
2524                pointer-lock/lock-fail-responses.html
2525                pointer-lock/mouse-event-delivery.html
2526                pointer-lock/pointerlocklost-event.html
2527
2528         * WebCore.gypi:
2529         * dom/EventNames.h:
2530         * page/ChromeClient.h:
2531         (WebCore::ChromeClient::requestPointerLock):
2532         (WebCore::ChromeClient::requestPointerUnlock):
2533         (WebCore::ChromeClient::isPointerLocked):
2534         * page/Navigator.cpp:
2535         (WebCore::Navigator::webkitPointer):
2536         * page/Page.cpp:
2537         (WebCore::Page::Page):
2538         * page/Page.h:
2539         (WebCore::Page::pointerLockController):
2540         * page/PointerLock.cpp:
2541         (WebCore::PointerLock::PointerLock):
2542         (WebCore::PointerLock::create):
2543         (WebCore::PointerLock::lock):
2544         (WebCore::PointerLock::unlock):
2545         (WebCore::PointerLock::isLocked):
2546         * page/PointerLock.h:
2547         (WebCore::PointerLock::create):
2548         * page/PointerLockController.cpp: Added.
2549         (WebCore::PointerLockController::PointerLockController):
2550         (WebCore::PointerLockController::requestPointerLock):
2551         (WebCore::PointerLockController::requestPointerUnlock):
2552         (WebCore::PointerLockController::isLocked):
2553         (WebCore::PointerLockController::didAcquirePointerLock):
2554         (WebCore::PointerLockController::didNotAcquirePointerLock):
2555         (WebCore::PointerLockController::didLosePointerLock):
2556         (WebCore::PointerLockController::dispatchLockedMouseEvent):
2557         * page/PointerLockController.h: Copied from Source/WebCore/page/PointerLock.h.
2558
2559 2012-01-27  Abhishek Arya  <inferno@chromium.org>
2560
2561         Crash in DocumentLoader::detachFromFrame.
2562         https://bugs.webkit.org/show_bug.cgi?id=62764
2563
2564         Reviewed by Brady Eidson.
2565
2566         r105556 didn't fix the crash because canceling the
2567         main resource loader blows away both the current
2568         document loader and frame underneath. Both protectors
2569         are also used in stopLoading() when m_mainResourceLoader->cancel()
2570         is called. Also, tested the fix under ASAN.
2571
2572         * loader/DocumentLoader.cpp:
2573         (WebCore::DocumentLoader::detachFromFrame):
2574
2575 2012-01-27  Tony Chang  <tony@chromium.org>
2576
2577         flexbox scrollbars don't take flex-direction into account
2578         https://bugs.webkit.org/show_bug.cgi?id=70772
2579
2580         Reviewed by Darin Adler.
2581
2582         This fixes a bug where we always used the logicalScrollbarHeight.
2583         For column flow, this was incorrect.
2584
2585         Also fix a bug where we didn't include the trailing border+padding+scrollbar when computing the
2586         height of a column flow.
2587
2588         Tests: css3/flexbox/cross-axis-scrollbar-expected.html
2589                css3/flexbox/cross-axis-scrollbar.html
2590
2591         * rendering/RenderFlexibleBox.cpp:
2592         (WebCore::RenderFlexibleBox::crossAxisScrollbarExtent): Add a direction aware method for getting the scrollbar size.
2593         (WebCore):
2594         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Use crossAxisScrollbarExtent.
2595         * rendering/RenderFlexibleBox.h:
2596         (RenderFlexibleBox):
2597
2598 2012-01-27  Kentaro Hara  <haraken@chromium.org>
2599
2600         Unreviewed. Rebasedlined run-bindings-tests results.
2601
2602         * bindings/scripts/test/CPP/WebDOMTestInterface.cpp:
2603         (WebDOMTestInterface::supplementalMethod1):
2604         (WebDOMTestInterface::supplementalMethod2):
2605
2606 2012-01-27  No'am Rosenthal  <noam.rosenthal@nokia.com>
2607
2608         [Qt][WK2] Child layers appear in wrong position when scrolling
2609         https://bugs.webkit.org/show_bug.cgi?id=77063
2610
2611         Reviewed by Simon Fraser.
2612
2613         When using the delegatesScrolling mode in FrameView, the compositor doesn't need
2614         to control the special clip/scroll layers. Also, when we change that mode, we need to let
2615         the compositor reset its backing-stores and rebuild them without scrolling/clipping.
2616
2617         This is tested by compositing tests, when run with Qt in touch mode.
2618
2619         * page/FrameView.cpp:
2620         (WebCore::FrameView::delegatesScrollingDidChange):
2621         (WebCore):
2622         * page/FrameView.h:
2623         (FrameView):
2624         * platform/ScrollView.cpp:
2625         (WebCore::ScrollView::setDelegatesScrolling):
2626         * platform/ScrollView.h:
2627         (WebCore::ScrollView::delegatesScrollingDidChange):
2628         * rendering/RenderLayerCompositor.cpp:
2629         (WebCore::RenderLayerCompositor::requiresScrollLayer):
2630
2631 2012-01-27  Thiago Marcos P. Santos  <tmpsantos@gmail.com>
2632
2633         Removed unused method from CSSStyleSelector
2634         https://bugs.webkit.org/show_bug.cgi?id=77190
2635
2636         Reviewed by Andreas Kling.
2637
2638         * css/CSSStyleSelector.h:
2639         (CSSStyleSelector):
2640
2641 2012-01-27  Zeno Albisser  <zeno@webkit.org>
2642
2643         [Qt][Mac] Build fails after adding ICU support (r105997).
2644         https://bugs.webkit.org/show_bug.cgi?id=77118
2645
2646         Use SmareReplaceCF.cpp code path if platform Mac.
2647
2648         Reviewed by Tor Arne Vestbø.
2649
2650         * Target.pri:
2651
2652 2012-01-27  Ilya Tikhonovsky  <loislo@chromium.org>
2653
2654         Web Inspector: detailed heap snapshot: Replace (Native objects) root element
2655         with '(Detached DOM trees)' and '(Document DOM trees)'
2656         https://bugs.webkit.org/show_bug.cgi?id=77201
2657
2658         I think it'd be nice to replace one group containing all native objects with
2659         separate groups for different types of native objects.
2660
2661         Reviewed by Yury Semikhatsky.
2662
2663         * bindings/v8/RetainedDOMInfo.cpp:
2664         (WebCore::RetainedDOMInfo::GetGroupLabel):
2665         (WebCore):
2666         * bindings/v8/RetainedDOMInfo.h:
2667         (RetainedDOMInfo):
2668
2669 2012-01-27  Nikolas Zimmermann  <nzimmermann@rim.com>
2670
2671         <feImage> doesn't work with local references when using primitiveUnits="objectBoundingBox"
2672         https://bugs.webkit.org/show_bug.cgi?id=77205
2673
2674         Reviewed by Antti Koivisto.
2675
2676         Consider following testcase:
2677         <svg width="1000" height="500">
2678         <defs>
2679             <circle id="c" cx="50%" cy="50%" r="10%"/>
2680             <filter id="f" filterUnits="userSpaceOnUse" x="0" y="0" width="100" height="100" primitiveUnits="objectBoundingBox">
2681                 <feImage xlink:href="#c"/>
2682             </filter>
2683         </defs>
2684         <rect width="100" height="100" filter="url(#f)"/>
2685         </svg>
2686
2687         The <svg> has a viewport of 1000x50. The <circle> in the <defs> element is resolved as <circle cx="500" cy="250" r="79"/>,
2688         as the context for this element (looking at it isolated!) is the viewport of the <svg>. We then setup a 0x0 - 100x100 rect
2689         in user space, which gets filtered, by a filter, also defined in user space (for simplicity), but with primitiveUnits="objectBoundingBox".
2690
2691         That means that the default subregion of the filter effect <feImage/> which has no inputs, is defined in the SVG 1.1 spec to be equal to
2692         the filter region, which is 0x0-100x100 in user space. This <feImage/> is supposed to produce a 100x100 image, containing a circle in the
2693         middle (aka. <circle cx="50" cy="50".../>), but it doesn't, as the <circle> it's trying to paint, is laid out at 500x250, and thus outside
2694         the 100x100 sized image buffer.
2695
2696         So how to resolve this?
2697         The RenderSVGShape thats owned by the <circle> generates its Path value by calling cx().value(lengthContext) and the SVGLengthContext here
2698         resolves to the <svg>. That happens on _layout_. If we would want to change the SVGLengthContext in this case (what I originally planned!)
2699         to carry a custom 100x100 viewport, we'd need to relayout. Unfortunately this is not an option, as this would mean that
2700         SVGImageBufferTools::renderSubtreeToImageBuffer, would need to relayout its children first, but we produce the filter images when painting.
2701         This is very dangerous and has just recently been fixed so that SVGImageBufferTools can ASSERT(!item->needsLayout()) when painting the
2702         subtree to an image buffer.
2703
2704         The only sane solution I see, that does not require relayouts, is to make a map between the <circle> bounding box in user space (500x250
2705         center point) to the filter primitive subregion space (here: 100x100 center point), and concat that transformation before painting the
2706         subtree to the image buffer. Of course this approach only works if all values of the <circle> are relative. If someone uses
2707         <circle id="c" cx="50%" cy="666"> the transformation that I'm looking for is undefined. We'd really need to create a new Path here, to
2708         resolve only cx against the new viewport, and not cy.
2709
2710         Though in practice it turns out this is not a problem. All use cases of feImage + primitiveUnits="objectBoundingBox" link to elements
2711         that are completely defined in percentual values, as this is really the only thing which makes sense - otherwise you can always switch
2712         back to primtiveUnits="userSpaceOnUse". Anyhow, I'm going to fix all known wild-life test cases by my approach, and say we don't support
2713         using mixed length units when referencing those elements from feImages with primitiveUnits="objectBoundingBox".
2714
2715         Adding lots of new testcases, trying all the different feImage modes.
2716
2717         Tests: svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-objectBoundingBox.svg
2718                svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-userSpaceOnUse.svg
2719                svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-objectBoundingBox.svg
2720                svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-userSpaceOnUse.svg
2721                svg/filters/feImage-position.svg
2722                svg/filters/feImage-subregions-preseveAspectRatio-none-with-viewBox.svg
2723                svg/filters/feImage-subregions-preseveAspectRatio-none.svg
2724                svg/filters/feImage-subregions.svg
2725
2726         * rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
2727         (WebCore::RenderSVGResourceFilterPrimitive::determineFilterPrimitiveSubregion): Reverse logic, simplifying the code a bit. Remove FEImage special cases (absoluteSubregion).
2728         * svg/SVGLengthContext.h: Make determineViewport() public, for use in FEImage.
2729         * svg/graphics/filters/SVGFEImage.cpp:
2730         (WebCore::FEImage::determineAbsolutePaintRect): Don't apply preserveAspectRatio transformation for local elements, it's not defined and breaks content.
2731         (WebCore::FEImage::platformApplySoftware): Figure out the absolute subregion by utilizing filterPrimitiveSubregion() as FETurbulence does.
2732                                                    Map between filter primitive subregion and target object space for primitiveUnits="objectBoundingBox" support on SVG element references.
2733         * svg/graphics/filters/SVGFEImage.h: Remove absoluteSubregion member & setter, it's no longer needed.
2734
2735 2012-01-26  Vsevolod Vlasov  <vsevik@chromium.org>
2736
2737         Web Inspector: Scripts panel: fix event dispatching between FileSelector and EditorContainer.
2738         https://bugs.webkit.org/show_bug.cgi?id=77126
2739
2740         Reviewed by Pavel Feldman.
2741
2742         * inspector/front-end/ScriptsPanel.js:
2743         (WebInspector.ScriptsPanel.prototype._uiSourceCodeAdded.get if):
2744         (WebInspector.ScriptsPanel.prototype._reset):
2745         (WebInspector.ScriptsPanel.prototype._showSourceLine):
2746         (WebInspector.ScriptsPanel.prototype._updateExecutionLine):
2747         (WebInspector.ScriptsPanel.prototype._editorClosed):
2748         (WebInspector.ScriptsPanel.prototype._editorSelected):
2749         (WebInspector.ScriptsPanel.FileSelector.prototype.revealUISourceCode):
2750         (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype.revealUISourceCode):
2751         (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._innerRevealUISourceCode):
2752         (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._addOptionToFilesSelect.insertOrdered):
2753         (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._addOptionToFilesSelect):
2754         (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._goBack):
2755         (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._goForward):
2756         (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._filesSelectChanged):
2757         * inspector/front-end/TabbedEditorContainer.js:
2758         (WebInspector.TabbedEditorContainer):
2759         (WebInspector.TabbedEditorContainer.prototype._tabClosed):
2760         (WebInspector.TabbedEditorContainer.prototype._tabSelected):
2761         (WebInspector.TabbedEditorContainer.prototype.reset):
2762
2763 2012-01-27  Nikolas Zimmermann  <nzimmermann@rim.com>
2764
2765         <feImage> DOM mutation problems
2766         https://bugs.webkit.org/show_bug.cgi?id=77198
2767
2768         Reviewed by Antti Koivisto.
2769
2770         Consider <feImage xlink:href="#rect"/>, where <rect> gets dynamically added to the tree.
2771         Currently <feImage> doesn't notice this, as it doesn't register itself pending on "#rect".
2772
2773         Integrate <feImage> properly within the pending resources concept, fixing the bug.
2774
2775         Tests: svg/filters/feImage-target-add-to-document.svg
2776                svg/filters/feImage-target-changes-id.svg
2777                svg/filters/feImage-target-id-change.svg
2778                svg/filters/feImage-target-reappend-to-document.svg
2779                svg/filters/feImage-target-remove-from-document.svg
2780
2781         * svg/SVGFEImageElement.cpp: Rename invalidateImageResource to clearResourceReferences.
2782         (WebCore::SVGFEImageElement::~SVGFEImageElement): Call clearResourceReferences.
2783         (WebCore::SVGFEImageElement::clearResourceReferences): Remove any occurence of m_targetImage, it's no longer used.
2784         (WebCore::SVGFEImageElement::requestImageResource): requestImageResource is now called by buildPendingResource.
2785         (WebCore::SVGFEImageElement::buildPendingResource): Called whenever any element that we depend on gets resolved - now invalidates the <filter>.
2786         (WebCore::SVGFEImageElement::parseMappedAttribute): Don't start loading from parseMappedAttribute.
2787         (WebCore::SVGFEImageElement::svgAttributeChanged): Start loading from here, for consistency with SVGImageElement.
2788         (WebCore::SVGFEImageElement::insertedIntoDocument): Invoke buildPendingResource(), if we enter the tree.
2789         (WebCore::SVGFEImageElement::removedFromDocument): Clear m_cachedImage as soon as we get removed from the tree.
2790         (WebCore::SVGFEImageElement::build): Clean up this function, m_targetImage is no longer exist.
2791         * svg/SVGFEImageElement.h: Remove OwnPtr<ImageBuffer> m_targetImage, which is no longer used.
2792
2793 2012-01-26  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2794
2795         [Qt] WKTR: Use a software rendering pipiline when running tests.
2796         https://bugs.webkit.org/show_bug.cgi?id=76708
2797
2798         Reviewed by Kenneth Rohde Christiansen.
2799
2800         * platform/graphics/qt/TextureMapperQt.cpp: Allow setting the context to null.
2801         (WebCore::TextureMapperQt::setGraphicsContext):
2802         * platform/graphics/qt/TextureMapperQt.h:
2803         (WebCore::TextureMapperQt::initialize):
2804
2805 2012-01-27  Branimir Lambov  <blambov@google.com>
2806
2807         SVG filters incorrectly move elements
2808         https://bugs.webkit.org/show_bug.cgi?id=73643
2809
2810         Reviewed by Nikolas Zimmermann.
2811
2812         Fixes SVG image buffer creation to use the enclosing integer rect
2813         instead of unstable rounded coordinates with scaling which was causing
2814         animated images to jump around under filters. The image buffer was not 
2815         aligned on a pixel boundary, and thus the positions and sizes of anything
2816         drawn under that filter changed by 1-2 pixels compared to the same
2817         elements drawn without an intermediate buffer, or drawn with a buffer
2818         with a different target rectangle. 
2819         
2820         The change improves the positioning of clip paths, masks and filters.
2821
2822         Tests: svg/clip-path/clip-in-clip.svg
2823                svg/clip-path/clipper-placement-issue.svg
2824                svg/filters/filter-placement-issue.svg
2825
2826         * platform/graphics/filters/FETile.cpp:
2827         (WebCore::FETile::platformApplySoftware):
2828         * rendering/svg/RenderSVGResourceClipper.cpp:
2829         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
2830         * rendering/svg/RenderSVGResourceFilter.cpp:
2831         (WebCore::RenderSVGResourceFilter::applyResource):
2832         * rendering/svg/RenderSVGResourceGradient.cpp:
2833         (WebCore::createMaskAndSwapContextForTextGradient):
2834         (WebCore::clipToTextMask):
2835         * rendering/svg/RenderSVGResourceMasker.cpp:
2836         (WebCore::RenderSVGResourceMasker::applyResource):
2837         (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
2838         * rendering/svg/RenderSVGResourcePattern.cpp:
2839         (WebCore::RenderSVGResourcePattern::createTileImage):
2840         * rendering/svg/SVGImageBufferTools.cpp:
2841         (WebCore::SVGImageBufferTools::createImageBuffer):
2842         (WebCore::SVGImageBufferTools::createImageBufferForPattern):
2843         (WebCore::SVGImageBufferTools::clipToImageBuffer):
2844         (WebCore::SVGImageBufferTools::clampedAbsoluteTargetRect):
2845         (WebCore::SVGImageBufferTools::clampedAbsoluteSize):
2846         * rendering/svg/SVGImageBufferTools.h:
2847         (WebCore::SVGImageBufferTools::calcImageBufferRect):
2848
2849 2012-01-25  Yury Semikhatsky  <yurys@chromium.org>
2850
2851         Web Inspector: should be possible to open function declaration from script popover
2852         https://bugs.webkit.org/show_bug.cgi?id=76913
2853
2854         Added inferred/display function name and source location to the popover in scripts panel.
2855         Now when a function is hovered user can navigate to its definition.
2856
2857         Reviewed by Pavel Feldman.
2858
2859         Test: inspector/debugger/function-details.html
2860
2861         * bindings/js/JSInjectedScriptHostCustom.cpp:
2862         (WebCore::JSInjectedScriptHost::functionDetails):
2863         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
2864         (WebCore::V8InjectedScriptHost::functionDetailsCallback):
2865         * inspector/InjectedScript.cpp:
2866         (WebCore::InjectedScript::getFunctionDetails):
2867         * inspector/InjectedScript.h:
2868         (InjectedScript):
2869         * inspector/InjectedScriptHost.idl:
2870         * inspector/InjectedScriptSource.js:
2871         (.):
2872         * inspector/Inspector.json:
2873         * inspector/InspectorDebuggerAgent.cpp:
2874         (WebCore::InspectorDebuggerAgent::getFunctionDetails):
2875         * inspector/InspectorDebuggerAgent.h:
2876         (InspectorDebuggerAgent):
2877         * inspector/front-end/DebuggerPresentationModel.js:
2878         (WebInspector.DebuggerPresentationModel.Linkifier.prototype.linkifyFunctionLocation):
2879         * inspector/front-end/ObjectPopoverHelper.js:
2880         (WebInspector.ObjectPopoverHelper):
2881         (WebInspector.ObjectPopoverHelper.prototype._showObjectPopover.showObjectPopover.):
2882         (WebInspector.ObjectPopoverHelper.prototype._showObjectPopover):
2883         (WebInspector.ObjectPopoverHelper.prototype._onHideObjectPopover):
2884         * inspector/front-end/ObjectPropertiesSection.js:
2885         (WebInspector.ObjectPropertyTreeElement.prototype._functionContextMenuEventFired):
2886         (WebInspector.ObjectPropertyTreeElement.prototype._functionContextMenuEventFired.revealFunction):
2887         * inspector/front-end/RemoteObject.js:
2888         (WebInspector.RemoteObject):
2889         (WebInspector.RemoteObject.fromPayload):
2890         (WebInspector.RemoteObject.prototype.get functionName):
2891         * inspector/front-end/scriptsPanel.css:
2892         (.function-location-link):
2893         (.function-popover-title):
2894         (.function-popover-title .function-name):
2895
2896 2012-01-26  Noel Gordon  <noel.gordon@gmail.com>
2897
2898         Remove FIXME: ColorProfile encapsulation as a Vector<char> works well 
2899         https://bugs.webkit.org/show_bug.cgi?id=77176
2900
2901         Reviewed by Adam Barth.
2902
2903         No new tests. No change in behavior.
2904
2905         * platform/image-decoders/ImageDecoder.h:
2906
2907 2012-01-26  Matthew Delaney  <mdelaney@apple.com>
2908
2909         ImageBuffer::draw should deep copy if drawing to an accelerated context
2910         https://bugs.webkit.org/show_bug.cgi?id=77185
2911
2912         Reviewed by Simon Fraser.
2913
2914         No new tests since any test for this issue would be flaky at best.
2915
2916         * platform/graphics/cg/ImageBufferCG.cpp: Deep copy when drawing ourself into
2917             an accelerated context for both draw and drawPattern.
2918         (WebCore::ImageBuffer::draw):
2919         (WebCore::ImageBuffer::drawPattern):
2920
2921 2012-01-26  Kevin Ollivier  <kevino@theolliviers.com>
2922
2923         [wx] Unreviewed. Build fixes.
2924         - Remove some constructors not generated by CPP bindings
2925           from being added to CPP binding headers
2926         - Keyboard event fixes after modifier changes
2927         - Add stubs for Language and RunLoop platform methods
2928
2929         * bindings/scripts/CodeGeneratorCPP.pm:
2930         (GetNamespaceForClass):
2931         (GenerateImplementation):
2932         * platform/mac/WebCoreSystemInterface.h:
2933         * platform/wx/KeyboardEventWx.cpp:
2934         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2935         * platform/wx/LanguageWx.cpp: Added.
2936         (WebCore):
2937         (WebCore::platformLanguage):
2938         (WebCore::platformUserPreferredLanguages):
2939         * platform/wx/RunLoopWx.cpp: Added.
2940         (WebCore):
2941         (WebCore::RunLoop::run):
2942         (WebCore::RunLoop::stop):
2943         (WebCore::RunLoop::RunLoop):
2944         (WebCore::RunLoop::~RunLoop):
2945         (WebCore::RunLoop::wakeUp):
2946         * storage/DOMWindowSQLDatabase.idl:
2947         * webaudio/DOMWindowWebAudio.idl:
2948         * websockets/DOMWindowWebSocket.idl:
2949
2950 2012-01-26  Sheriff Bot  <webkit.review.bot@gmail.com>
2951
2952         Unreviewed, rolling out r105486.
2953         http://trac.webkit.org/changeset/105486
2954         https://bugs.webkit.org/show_bug.cgi?id=77182
2955
2956         This patch doesn't take web workers into account. (Requested
2957         by dave_levin on #webkit).
2958
2959         * html/DOMURL.cpp:
2960         (WebCore::DOMURL::DOMURL):
2961         (WebCore::DOMURL::~DOMURL):
2962         (WebCore::DOMURL::contextDestroyed):
2963         (WebCore):
2964         (WebCore::DOMURL::createObjectURL):
2965         (WebCore::DOMURL::revokeObjectURL):
2966         * html/DOMURL.h:
2967         (WebCore::DOMURL::create):
2968         (DOMURL):
2969         * html/DOMURL.idl:
2970         * page/DOMWindow.cpp:
2971         (WebCore):
2972         (WebCore::DOMWindow::webkitURL):
2973         * page/DOMWindow.h:
2974         (DOMWindow):
2975         ():
2976         * page/DOMWindow.idl:
2977         * workers/WorkerContext.cpp:
2978         (WebCore):
2979         (WebCore::WorkerContext::webkitURL):
2980         (WebCore::WorkerContext::webkitRequestFileSystem):
2981         * workers/WorkerContext.h:
2982         (WorkerContext):
2983         ():
2984         * workers/WorkerContext.idl:
2985
2986 2012-01-26  Noel Gordon  <noel.gordon@gmail.com>
2987
2988         Cleanup JPEGImageDecoder includes
2989         https://bugs.webkit.org/show_bug.cgi?id=77171
2990
2991         Reviewed by Adam Barth.
2992
2993         No new tests. Refactoring cleanup only.
2994
2995         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
2996
2997 2012-01-26  Tim Horton  <hortont424@gmail.com>
2998
2999         3D transformed elements hide when showing the print dialog
3000         https://bugs.webkit.org/show_bug.cgi?id=45894
3001         <rdar://problem/7441593>
3002
3003         Reviewed by Andy Estes.
3004
3005         Suspend updates of the compositing layer tree while printing is taking place,
3006         preventing on-screen layers from moving to their print-mode positions.
3007
3008         No new tests, as WebKitTestRunner doesn't support putting the document
3009         into printing mode.
3010
3011         * page/FrameView.cpp:
3012         (WebCore::FrameView::syncCompositingStateForThisFrame):
3013         (WebCore::FrameView::paintContents):
3014         * platform/graphics/ca/LayerFlushScheduler.h:
3015         (WebCore::LayerFlushScheduler::isSuspended): Added.
3016
3017 2012-01-26  Pablo Flouret  <pablof@motorola.com>
3018
3019         Fix bad code generated by the JSC idl code generator for [CachedAttribute] attributes
3020         https://bugs.webkit.org/show_bug.cgi?id=77165
3021
3022         Reviewed by Oliver Hunt.
3023
3024         Missing parameter in a call to deserialize() and using 'this' in the
3025         attribute accessor functions (which are static).
3026
3027         * bindings/scripts/CodeGeneratorJS.pm:
3028         (GenerateImplementation):
3029         (NativeToJSValue):
3030         * bindings/scripts/test/JS/JSTestObj.cpp:
3031         (WebCore::jsTestObjCachedAttribute1):
3032         (WebCore::jsTestObjCachedAttribute2):
3033         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3034         (WebCore::jsTestSerializedScriptValueInterfaceValue):
3035
3036 2012-01-26  W. James MacLean  <wjmaclean@chromium.org>
3037
3038         [chromium] Allow modification of size of partially occluded quads during culling to reduce pixel overdraw.
3039         https://bugs.webkit.org/show_bug.cgi?id=76349
3040
3041         Reviewed by James Robinson.
3042
3043         Prior to this patch, draw culling either rejects a DrawQuad because it is completely
3044         occluded, or draws the entire quad (even if it is largely occluded). This patch
3045         attempts to reduce the number of pixels drawn by determining if a partially
3046         occluded DrawQuad can be resized to a smaller quad, based on what portion of the
3047         DrawQuad is actually visible, and performing that resizing where possible.
3048
3049         Added cases to existing unit tests.
3050
3051         * platform/graphics/chromium/LayerRendererChromium.cpp:
3052         (WebCore::LayerRendererChromium::drawTileQuad):
3053         * platform/graphics/chromium/cc/CCDrawQuad.cpp:
3054         (WebCore::CCDrawQuad::CCDrawQuad):
3055         * platform/graphics/chromium/cc/CCDrawQuad.h:
3056         (WebCore::CCDrawQuad::setQuadVisibleRect):
3057         (WebCore::CCDrawQuad::quadVisibleRect):
3058         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
3059         (WebCore::rectSubtractRegion):
3060         (WebCore::CCQuadCuller::cullOccludedQuads):
3061
3062 2012-01-26  Anders Carlsson  <andersca@apple.com>
3063
3064         Scrollbars disappear when switching from legacy to overlay scrollbars
3065         https://bugs.webkit.org/show_bug.cgi?id=77166
3066
3067         Reviewed by Dan Bernstein.
3068
3069         * platform/ScrollView.cpp:
3070         (WebCore::ScrollView::scrollbarStyleChanged):
3071         Call positionScrollbarLayers to make sure that the new scrollbar layers are positioned correctly.
3072
3073         * platform/mac/ScrollAnimatorMac.mm:
3074         (WebCore::ScrollAnimatorMac::updateScrollerStyle):
3075         Call ScrollbarThemeMac::setNewPainterForScrollbar after making the call to the scrollbar painter controller
3076         to set the horizontal or vertical imp, since setting the imp will reset the knob style.
3077
3078 2012-01-26  Adam Barth  <abarth@webkit.org>
3079
3080         NULL ptr in WebCore::ContainerNode::parserAddChild
3081         https://bugs.webkit.org/show_bug.cgi?id=76258
3082
3083         Reviewed by Eric Seidel.
3084
3085         Test: fast/parser/nested-fragment-parser-crash.html
3086
3087         We always need a parent element to attach to.  In crazy cases, we can
3088         have elements in the stack of open elements that are already detached
3089         from the DOM.  In those cases, they don't have a parent, so we aren't
3090         able to enforce the maximum DOM depth.  (Fortunately, they're not
3091         attached to the DOM anymore so we don't need to enforce the maximum DOM
3092         depth!)
3093
3094         * html/parser/HTMLConstructionSite.cpp:
3095         (WebCore::HTMLConstructionSite::attachLater):
3096         (WebCore::HTMLConstructionSite::fosterParent):
3097
3098 2012-01-26  Cris Neckar  <cdn@chromium.org>
3099
3100         The registration of schemes is currently racey as they are not registered from the main thread. 
3101         Getting rid of the assert that ensures that we are registering from the main thread until we can fix this.
3102
3103         Thank you ap@webkit for helping us identify this.
3104
3105         https://bugs.webkit.org/show_bug.cgi?id=77160
3106
3107         Reviewed by Adam Barth.
3108
3109         * platform/SchemeRegistry.cpp:
3110         (WebCore::CORSEnabledSchemes):
3111
3112 2012-01-26  Anders Carlsson  <andersca@apple.com>
3113
3114         We don't need to always repaint overlay scrollbars if they're in layers
3115         https://bugs.webkit.org/show_bug.cgi?id=77159
3116
3117         Reviewed by Beth Dakin.
3118
3119         If a scrollable area has overlay scrollbars we'll always invalidate both scrollbars, regardless of
3120         whether both scroll offsets actually change since they're translucent and we want to draw the new page
3121         contents underneath.
3122         
3123         However, if the scrollbars are painted into GraphicsLayers they'll be composited by the GPU, and so we don't
3124         need to repaint them unless the corresponding scroll offset actually changes (which is handled in Scrollbar::updateThumb).
3125
3126         * platform/ScrollableArea.cpp:
3127         (WebCore::ScrollableArea::setScrollOffsetFromAnimation):
3128
3129 2012-01-26  Joshua Bell  <jsbell@chromium.org>
3130
3131         IndexedDB: WebCore::IDBKey objects are leaked
3132         https://bugs.webkit.org/show_bug.cgi?id=77114
3133
3134         Reviewed by Tony Chang.
3135
3136         Fixing memory leaks, no new tests.
3137
3138         * storage/IDBKey.h:
3139         (WebCore::IDBKey::createInvalid):
3140         (WebCore::IDBKey::createNumber):
3141         (WebCore::IDBKey::createString):
3142         (WebCore::IDBKey::createDate):
3143         (WebCore::IDBKey::createArray):
3144
3145 2012-01-25  Cris Neckar  <cdn@chromium.org>
3146
3147         Add a scheme registry for CORS requests. Allow simple CORS requests to be made to registered schemes.
3148         https://bugs.webkit.org/show_bug.cgi?id=77041
3149
3150         Reviewed by Alexey Proskuryakov.
3151
3152         * loader/DocumentThreadableLoader.cpp:
3153         (WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest):
3154         * platform/SchemeRegistry.cpp:
3155         (WebCore::CORSEnabledSchemes):
3156         (WebCore):
3157         (WebCore::SchemeRegistry::registerCORSEnabledScheme):
3158         (WebCore::SchemeRegistry::isCORSEnabledScheme):
3159         * platform/SchemeRegistry.h:
3160         (SchemeRegistry):
3161
3162 2012-01-26  Noel Gordon  <noel.gordon@gmail.com>
3163
3164         File extension for webp files is .webp
3165         https://bugs.webkit.org/show_bug.cgi?id=76982
3166
3167         Reviewed by Adam Barth.
3168
3169         No new tests. No change in behavior.
3170
3171         * platform/image-decoders/webp/WEBPImageDecoder.h:
3172         (WebCore::WEBPImageDecoder::filenameExtension):
3173
3174 2012-01-26  Alok Priyadarshi  <alokp@chromium.org>
3175
3176         [chromium] Remove dead and unnecessary code related to LayerChromium::cleanupResources
3177         https://bugs.webkit.org/show_bug.cgi?id=77137
3178
3179         Reviewed by James Robinson.
3180
3181         No new test needed. Only removing dead code.
3182
3183         * platform/graphics/chromium/LayerChromium.cpp:
3184         * platform/graphics/chromium/LayerChromium.h:
3185         (WebCore::LayerChromium::layerTreeHost):
3186         * platform/graphics/chromium/TiledLayerChromium.cpp:
3187         (WebCore::TiledLayerChromium::setLayerTreeHost):
3188
3189 2012-01-26  Anders Carlsson  <andersca@apple.com>
3190
3191         Move horizontal rubber-band checks to ScrollElasticityController::handleWheelEvent
3192         https://bugs.webkit.org/show_bug.cgi?id=77147
3193
3194         Reviewed by Adam Roben.
3195
3196         * platform/mac/ScrollAnimatorMac.h:
3197         (ScrollAnimatorMac):
3198         * platform/mac/ScrollAnimatorMac.mm:
3199         (WebCore::ScrollAnimatorMac::handleWheelEvent):
3200         Always call ScrollElasticityController::handleWheelEvent, and only call didBeginScrollGesture and
3201         didEndScrollGesture if the event was actually handled.
3202
3203         (WebCore::ScrollAnimatorMac::shouldRubberBandInDirection):
3204         Implement this.
3205
3206         * platform/mac/ScrollElasticityController.h:
3207         * platform/mac/ScrollElasticityController.mm:
3208         (WebCore::ScrollElasticityController::handleWheelEvent):
3209         Check if we should rubber-band and return false if we shouldn't.
3210
3211         (WebCore::ScrollElasticityController::shouldRubberBandInHorizontalDirection):
3212         Ask the client if we should rubber-band.
3213
3214 2012-01-19  James Robinson  <jamesr@chromium.org>
3215
3216         [chromium] Remove setLayerTreeHost nonsense on lost context
3217         https://bugs.webkit.org/show_bug.cgi?id=76675
3218
3219         Reviewed by Kenneth Russell.
3220
3221         This code isn't needed any more. On a lost context event, we drop all TextureManager-managed textures through
3222         the proxy and no layer types need special lost context handling.
3223
3224         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3225         (WebCore::CCLayerTreeHost::didRecreateGraphicsContext):
3226
3227 2012-01-26  Anders Carlsson  <andersca@apple.com>
3228
3229         Simplify checking of whether we should rubberband horizontally
3230         https://bugs.webkit.org/show_bug.cgi?id=77141
3231
3232         Reviewed by Adam Roben.
3233
3234         Have a single check for horizontal rubber-banding in both directions. This is in preparation
3235         for moving this code into ScrollElasticityController.
3236
3237         * platform/mac/ScrollAnimatorMac.mm:
3238         (WebCore::shouldRubberBandInHorizontalDirection):
3239         (WebCore::ScrollAnimatorMac::handleWheelEvent):
3240
3241 2012-01-26  Scott Graham  <scottmg@chomium.org>
3242
3243         Fix include path in gyp file for V8InternalSettings.h
3244         https://bugs.webkit.org/show_bug.cgi?id=77128
3245
3246         Reviewed by Kent Tamura.
3247
3248         * WebCore.gyp/WebCore.gyp:
3249
3250 2012-01-26  James Robinson  <jamesr@chromium.org>
3251
3252         We shouldn't synchronously update styles on all documents after running script
3253         https://bugs.webkit.org/show_bug.cgi?id=46761
3254
3255         Reviewed by Simon Fraser.
3256
3257         Currently we call Document::updateStyleForAllDocuments() after invoking any event or timeout handler. This is
3258         slow since it iterates over the entire document tree and defeats our recalcStyle timer batching. It is
3259         unnecessary as any code that depends on styles or the render tree being up to date must call
3260         updateStyleIfNeeded() on the document it is accessing.
3261
3262         The first reference I can find to this code is in r798 in the file WebCore/khtml/xml/domnode_impl.cpp. It's been
3263         cargo culted forward ever since.
3264
3265         * bindings/ScriptControllerBase.cpp:
3266         (WebCore::ScriptController::executeScript):
3267         * bindings/js/ScheduledAction.cpp:
3268         (WebCore::ScheduledAction::execute):
3269         * bindings/js/ScriptController.cpp:
3270         (WebCore::ScriptController::ScriptController):
3271         (WebCore::ScriptController::executeScriptInWorld):
3272         * bindings/js/ScriptController.h:
3273         * bindings/v8/ScheduledAction.cpp:
3274         (WebCore::ScheduledAction::execute):
3275         * bindings/v8/ScriptController.cpp:
3276         (WebCore::ScriptController::ScriptController):
3277         * bindings/v8/ScriptController.h:
3278         * dom/ScriptElement.cpp:
3279         (WebCore::ScriptElement::executeScript):
3280         * inspector/InspectorClient.cpp:
3281         (WebCore::InspectorClient::doDispatchMessageOnFrontendPage):
3282
3283 2012-01-26  Anders Carlsson  <andersca@apple.com>
3284
3285         Get rid of ScrollElasticityController::beginScrollGesture()
3286         https://bugs.webkit.org/show_bug.cgi?id=77138
3287
3288         Reviewed by Adam Roben.
3289
3290         ScrollElasticityController::handleWheelEvent now checks if the wheel event phase is
3291         PlatformWheelEventPhaseBegan and sets up the gesture state if it is.
3292
3293         * platform/mac/ScrollAnimatorMac.mm:
3294         (WebCore::ScrollAnimatorMac::handleWheelEvent):
3295         * platform/mac/ScrollElasticityController.h:
3296         (ScrollElasticityController):
3297         * platform/mac/ScrollElasticityController.mm:
3298         (WebCore::ScrollElasticityController::handleWheelEvent):
3299
3300 2012-01-26  Anders Carlsson  <andersca@apple.com>
3301
3302         Get rid of ScrollElasticityController::endScrollGesture()
3303         https://bugs.webkit.org/show_bug.cgi?id=77134
3304
3305         Reviewed by Adam Roben.
3306
3307         Just make ScrollElasticityController::handleWheelEvent call snapRubberBand if the wheel
3308         event phase is PlatformWheelEventPhaseEnded.
3309
3310         * platform/mac/ScrollAnimatorMac.mm:
3311         (WebCore::ScrollAnimatorMac::handleWheelEvent):
3312         * platform/mac/ScrollElasticityController.h:
3313         (ScrollElasticityController):
3314         * platform/mac/ScrollElasticityController.mm:
3315         (WebCore::ScrollElasticityController::handleWheelEvent):
3316
3317 2012-01-26  Abhishek Arya  <inferno@chromium.org>
3318
3319         Crash in SVGSVGElement::currentViewBoxRect.
3320         https://bugs.webkit.org/show_bug.cgi?id=77121
3321
3322         Reviewed by Nikolas Zimmermann.
3323
3324         Symbols shouldn't be rendered. Revert the ASSERT
3325         from r105513 into a hard check.
3326
3327         Test: svg/custom/symbol-viewport-element-crash.svg
3328
3329         * svg/SVGLengthContext.cpp:
3330         (WebCore::SVGLengthContext::determineViewport):
3331
3332 2012-01-26  Anders Carlsson  <andersca@apple.com>
3333
3334         Inline beginScrollGesture/endScrollGesture in handleWheelEvent
3335         https://bugs.webkit.org/show_bug.cgi?id=77133
3336
3337         Reviewed by Andreas Kling.
3338
3339         * platform/mac/ScrollAnimatorMac.h:
3340         (ScrollAnimatorMac):
3341         * platform/mac/ScrollAnimatorMac.mm:
3342         (WebCore::ScrollAnimatorMac::handleWheelEvent):
3343
3344 2012-01-26  Anders Carlsson  <andersca@apple.com>
3345
3346         No need to set m_haveScrolledSincePageLoad in beginScrollGesture
3347         https://bugs.webkit.org/show_bug.cgi?id=77132
3348
3349         Reviewed by Andreas Kling.
3350
3351         m_haveScrolledSincePageLoad is already set to true in handleWheelEvent so we don't need
3352         to set it to true again.
3353
3354         * platform/mac/ScrollAnimatorMac.mm:
3355         (WebCore::ScrollAnimatorMac::beginScrollGesture):
3356
3357 2012-01-26  Anders Carlsson  <andersca@apple.com>
3358
3359         Simplify checking for whether we should rubberband or not when at the edge
3360         https://bugs.webkit.org/show_bug.cgi?id=77131
3361
3362         Reviewed by Beth Dakin.
3363
3364         We only need to check once if we're pinned at either edge whether we should rubber-band
3365         or not. Do this when the wheel event phase is PlatformWheelEventPhaseBegan. This lets us
3366         remove a bunch of code that would keep track of the current horizontal scroll direction.
3367
3368         * platform/mac/ScrollAnimatorMac.h:
3369         (ScrollAnimatorMac):
3370         * platform/mac/ScrollAnimatorMac.mm:
3371         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
3372         (WebCore::ScrollAnimatorMac::handleWheelEvent):
3373         (WebCore::ScrollAnimatorMac::beginScrollGesture):
3374
3375 2012-01-26  Eli Fidler  <efidler@rim.com>
3376
3377         [JSC] Inspector instrumentation for JavaScript calls.
3378         https://bugs.webkit.org/show_bug.cgi?id=40119
3379
3380         Reviewed by Geoffrey Garen.
3381
3382         Covered by existing Chromium inspector tests
3383
3384         * bindings/js/JSCallbackData.cpp:
3385         (WebCore::JSCallbackData::invokeCallback):
3386         * bindings/js/JSEventListener.cpp:
3387         (WebCore::JSEventListener::handleEvent):
3388         * bindings/js/JSMainThreadExecState.h:
3389         (WebCore::JSMainThreadExecState::instrumentedCall):
3390         * inspector/InspectorInstrumentation.cpp:
3391         (WebCore::InspectorInstrumentation::willCallFunctionImpl):
3392
3393 2012-01-26  Mike Reed  <reed@google.com>
3394
3395         Signal to skia to force A8 text from LCD output, but only when we have to disable LCD because we're in a layer
3396         https://bugs.webkit.org/show_bug.cgi?id=76547
3397
3398         Reviewed by Stephen White.
3399
3400         Existing tests should confirm nothing is broken. Antialiased text
3401         is disabled in layouttests, so they should be unaffected by the
3402         difference in antialiasing quality.
3403
3404         * platform/graphics/skia/SkiaFontWin.cpp:
3405         (WebCore::setupPaintForFont):
3406
3407
3408 2012-01-26  Anders Carlsson  <andersca@apple.com>
3409
3410         Use PlatformWheelEvent::phase() to determine if a scroll gesture begins or ends
3411         https://bugs.webkit.org/show_bug.cgi?id=77127
3412
3413         Reviewed by Beth Dakin.
3414
3415         * platform/mac/ScrollAnimatorMac.h:
3416         (ScrollAnimatorMac):
3417         Remove handleGestureEvent.
3418
3419         * platform/mac/ScrollAnimatorMac.mm:
3420         (WebCore::ScrollAnimatorMac::handleWheelEvent):
3421         Look at the event phase to determine when to call didBeginGesture and didEndGesture.
3422
3423 2012-01-26  Benjamin Poulain  <benjamin@webkit.org>
3424
3425         Using strncmp() for comparing scheme and port numbers is inefficient
3426         https://bugs.webkit.org/show_bug.cgi?id=75821
3427
3428         Reviewed by Darin Adler.
3429
3430         Replace the equal() function comparing 2 arbitrary strings by a template
3431         comparing the string to an array, character by character.
3432
3433         This is only used for small strings: the schemes and the ports.
3434
3435         * platform/KURL.cpp:
3436         (WebCore::equal):
3437         (WebCore::isDefaultPortForScheme):
3438         (WebCore::isNonFileHierarchicalScheme):
3439         (WebCore::isCanonicalHostnameLowercaseForScheme):
3440
3441 2012-01-26  Anders Carlsson  <andersca@apple.com>
3442
3443         WebWheelEvent::Phase and PlatformWheelEvent::Phase declarations should match AppKit
3444         https://bugs.webkit.org/show_bug.cgi?id=77123
3445
3446         Reviewed by Beth Dakin.
3447
3448         * platform/PlatformWheelEvent.h:
3449         ():
3450         * platform/mac/PlatformEventFactoryMac.mm:
3451         (WebCore::phaseForEvent):
3452
3453 2012-01-26  Daniel Cheng  <dcheng@chromium.org>
3454
3455         Revert code changes from r105800
3456         https://bugs.webkit.org/show_bug.cgi?id=77071
3457
3458         The strings are already lowercased in EventHandler.cpp:findDropZone() so there's
3459         no need to call lower() again.
3460
3461         Reviewed by Tony Chang.
3462
3463         Covered by existing tests.
3464
3465         * dom/Clipboard.cpp:
3466         (WebCore::Clipboard::hasDropZoneType):
3467
3468 2012-01-26  Stephen Chenney  <schenney@chromium.org>
3469
3470         REGRESSION (r91125): Polyline tool in google docs is broken
3471         https://bugs.webkit.org/show_bug.cgi?id=65796
3472
3473         Reviewed by Nikolas Zimmermann.
3474
3475         It turns out that the CG problem is a design decision. The bounding code
3476         returns CGRectNull for cases where a bound is ill-defined, rather than the
3477         empty bound as expected.
3478
3479         I'm also removing the workaround for isEmpty to get correct zero length paths.
3480         It is no longer necessary.
3481
3482         Tested by existing layout tests.
3483
3484         * platform/graphics/cg/PathCG.cpp: Removed path empty and path bound testing classes.
3485         (WebCore::Path::boundingRect): Added check for CGRectNull
3486         (WebCore::Path::fastBoundingRect): Added check for CGRectNull
3487         (WebCore::Path::strokeBoundingRect): Added check for CGRectNull
3488         (WebCore::Path::isEmpty): Reverted to former behavior, just using CGPathIsEmpty.
3489         (WebCore::Path::hasCurrentPoint): Reverted to former behavior, using isEmpty.
3490         (WebCore::Path::transform): Reverted to former behavior, using isEmpty.
3491
3492 2012-01-26  Andreas Kling  <awesomekling@apple.com>
3493
3494         Refactor application of additional style attributes for table elements.
3495         <http://webkit.org/b/77095>
3496