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