AX: AX needs to stop using WebCoreViewFactory
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-02-10  Chris Fleizach  <cfleizach@apple.com>
2
3         Reviewed by Anders Carlsson.
4
5         AX: AX needs to stop using WebCoreViewFactory
6         https://bugs.webkit.org/show_bug.cgi?id=54153
7
8         WebKit2 no longer uses WebCoreViewFactory, which means that accessibility code needs
9         to get off of it and use WebCoreSystemInterface, like other clients.
10
11         * WebCore.exp.in:
12         * accessibility/AXObjectCache.h:
13         * accessibility/mac/AXObjectCacheMac.mm:
14         (WebCore::AXObjectCache::handleFocusedUIElementChanged):
15         * accessibility/mac/AccessibilityObjectWrapper.h:
16         * accessibility/mac/AccessibilityObjectWrapper.mm:
17         (-[AccessibilityObjectWrapper unregisterUniqueIdForUIElement]):
18         (CFAutoreleaseHelper):
19         (AXObjectIsTextMarker):
20         (AXObjectIsTextMarkerRange):
21         (AXTextMarkerRange):
22         (AXTextMarkerRangeStart):
23         (AXTextMarkerRangeEnd):
24         (textMarkerForVisiblePosition):
25         (-[AccessibilityObjectWrapper textMarkerForVisiblePosition:]):
26         (visiblePositionForTextMarker):
27         (-[AccessibilityObjectWrapper visiblePositionForTextMarker:]):
28         (visiblePositionForStartOfTextMarkerRange):
29         (visiblePositionForEndOfTextMarkerRange):
30         (textMarkerRangeFromMarkers):
31         (AXAttributeStringSetElement):
32         (-[AccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:]):
33         (textMarkerRangeFromVisiblePositions):
34         (-[AccessibilityObjectWrapper textMarkerRangeFromVisiblePositions:endPosition:]):
35         (-[AccessibilityObjectWrapper visiblePositionRangeForTextMarkerRange:]):
36         (-[AccessibilityObjectWrapper textMarkerRangeForSelection]):
37         (-[AccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
38         (-[AccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
39         * editing/mac/SelectionControllerMac.mm:
40         (WebCore::accessibilityConvertScreenRect):
41         (WebCore::SelectionController::notifyAccessibilityForSelectionChange):
42         * platform/mac/WebCoreSystemInterface.h:
43         * platform/mac/WebCoreSystemInterface.mm:
44
45 2011-02-10  Alexis Menard  <alexis.menard@nokia.com>
46
47         Reviewed by Andreas Kling.
48
49         [Qt] In trunk with Qt Multimedia the full screen mode doesn't work.
50         https://bugs.webkit.org/show_bug.cgi?id=54201
51
52         Add files for the fullscreen video playback handling. It also fix
53         a missing header.
54
55         * WebCore.pro:
56
57 2011-02-09  Pavel Feldman  <pfeldman@chromium.org>
58
59         Reviewed by Yury Semikhatsky.
60
61         Web Inspector: Remove FileSystem support from the inspector.
62         https://bugs.webkit.org/show_bug.cgi?id=50695
63
64         * CMakeLists.txt:
65         * GNUmakefile.am:
66         * WebCore.gypi:
67         * WebCore.pro:
68         * WebCore.vcproj/WebCore.vcproj:
69         * WebCore.xcodeproj/project.pbxproj:
70         * inspector/Inspector.idl:
71         * inspector/InspectorApplicationCacheAgent.cpp:
72         (WebCore::InspectorApplicationCacheAgent::InspectorApplicationCacheAgent):
73         (WebCore::InspectorApplicationCacheAgent::getApplicationCaches):
74         * inspector/InspectorApplicationCacheAgent.h:
75         * inspector/InspectorFileSystemAgent.cpp: Removed.
76         * inspector/InspectorFileSystemAgent.h: Removed.
77         * inspector/InspectorInstrumentation.cpp:
78         (WebCore::InspectorInstrumentation::identifierForInitialRequestImpl):
79         (WebCore::InspectorInstrumentation::willSendRequestImpl):
80         (WebCore::InspectorInstrumentation::markResourceAsCachedImpl):
81         (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl):
82         (WebCore::InspectorInstrumentation::didReceiveResourceResponseImpl):
83         (WebCore::InspectorInstrumentation::didReceiveContentLengthImpl):
84         (WebCore::InspectorInstrumentation::didFinishLoadingImpl):
85         (WebCore::InspectorInstrumentation::didFailLoadingImpl):
86         (WebCore::InspectorInstrumentation::resourceRetrievedByXMLHttpRequestImpl):
87         (WebCore::InspectorInstrumentation::scriptImportedImpl):
88         (WebCore::InspectorInstrumentation::networkStateChangedImpl):
89         (WebCore::InspectorInstrumentation::updateApplicationCacheStatusImpl):
90         (WebCore::InspectorInstrumentation::retrieveResourceAgent):
91         * inspector/front-end/FileSystemView.js: Removed.
92         * inspector/front-end/WebKit.qrc:
93         * inspector/front-end/inspector.html:
94
95 2011-02-10  Sheriff Bot  <webkit.review.bot@gmail.com>
96
97         Unreviewed, rolling out r78219.
98         http://trac.webkit.org/changeset/78219
99         https://bugs.webkit.org/show_bug.cgi?id=54215
100
101         breaks editing/style/iframe-onload-crash.html on GTK 64-bit
102         Debug (Requested by philn-tp on #webkit).
103
104         * dom/Document.h:
105         * dom/DocumentFragment.h:
106         * dom/Element.h:
107         * dom/Node.h:
108         * dom/Text.h:
109         * editing/htmlediting.cpp:
110         (WebCore::editingIgnoresContent):
111         (WebCore::canHaveChildrenForEditing):
112         * editing/htmlediting.h:
113         * html/HTMLBRElement.h:
114         * html/HTMLButtonElement.h:
115         * html/HTMLDataGridElement.h:
116         * html/HTMLFormControlElement.h:
117         * html/HTMLFrameElementBase.h:
118         * html/HTMLHRElement.h:
119         * html/HTMLImageElement.h:
120         * html/HTMLMeterElement.h:
121         * html/HTMLOutputElement.h:
122         * html/HTMLPlugInElement.h:
123         * html/HTMLProgressElement.h:
124         * wml/WMLBRElement.h:
125         * wml/WMLDoElement.h:
126         * wml/WMLImageElement.h:
127         * wml/WMLInputElement.h:
128         * wml/WMLSelectElement.h:
129
130 2011-02-10  Andras Becsi  <abecsi@webkit.org>
131
132         Rubber-stamped by Csaba Osztrogonác.
133
134         [Qt][V8] Fix the build.
135
136         No new tests needed.
137
138         * bindings/v8/WorkerContextExecutionProxy.cpp: add missing CString header.
139         * loader/cache/CachedScript.h: do not use extra qualification for base class enum.
140
141 2011-02-10  Alexander Pavlov  <apavlov@chromium.org>
142
143         Reviewed by Yury Semikhatsky.
144
145         Web Inspector: [STYLES] Suggest CSS property values once Up/Down is pressed with an empty input
146         https://bugs.webkit.org/show_bug.cgi?id=54205
147
148         * inspector/front-end/CSSCompletions.js:
149         (WebInspector.CSSCompletions):
150         (WebInspector.CSSCompletions.prototype._firstIndexOfPrefix):
151         * inspector/front-end/CSSKeywordCompletions.js:
152         (WebInspector.CSSKeywordCompletions.forProperty):
153         * inspector/front-end/StylesSidebarPane.js:
154         ():
155         * inspector/front-end/TextPrompt.js:
156         (WebInspector.TextPrompt.prototype.complete):
157
158 2011-02-10  Renata Hodovan  <reni@webkit.org>
159
160         Reviewed by Dirk Schulze.
161
162         SVGFESpecularLightingElement doesn't support dynamic invalidation, when attributes change.
163         https://bugs.webkit.org/show_bug.cgi?id=54186
164
165         The dynamic changes are captured by the svgAttributeChange function, and invalidate the filter primitive if necessary.
166
167         Tests: svg/dynamic-updates/SVGFESpecularLightingElement-dom-in-attr.html
168                svg/dynamic-updates/SVGFESpecularLightingElement-dom-specularConstant-attr.html
169                svg/dynamic-updates/SVGFESpecularLightingElement-dom-specularExponent-attr.html
170                svg/dynamic-updates/SVGFESpecularLightingElement-dom-suraceScale-attr.html
171                svg/dynamic-updates/SVGFESpecularLightingElement-svgdom-in-prop.html
172                svg/dynamic-updates/SVGFESpecularLightingElement-svgdom-specularConstant-prop.html
173                svg/dynamic-updates/SVGFESpecularLightingElement-svgdom-specularExponent-prop.html
174                svg/dynamic-updates/SVGFESpecularLightingElement-svgdom-suraceScale-prop.html
175
176         * svg/SVGFESpecularLightingElement.cpp:
177         (WebCore::SVGFESpecularLightingElement::svgAttributeChanged):
178         * svg/SVGFESpecularLightingElement.h:
179
180 2011-02-10  Andrey Adaikin  <aandrey@google.com>
181
182         Reviewed by Pavel Feldman.
183
184         Web Inspector: Error messages are not displayed for the last line in a script
185         https://bugs.webkit.org/show_bug.cgi?id=54204
186
187         * inspector/front-end/SourceFrame.js:
188         (WebInspector.SourceFrame.prototype.addMessage):
189         (WebInspector.SourceFrame.prototype._addMessageToSource):
190         (WebInspector.SourceFrame.prototype._createConditionElement):
191
192 2011-02-10  Ryosuke Niwa  <rniwa@webkit.org>
193
194         Reviewed by Eric Seidel.
195
196         Make canHaveChildrenForEditing more efficient
197         https://bugs.webkit.org/show_bug.cgi?id=53564
198
199         Improved the performance (1-2% in release and 20% in debug) by adding virtual member function
200         canContainRangeEndPoint to Node. It returns true whenever the associated node can have be a container
201         node for a position.
202
203         As of this revision, canContainRangeEndPoint returns true on Document, DocumentFragment, Text nodes
204         and any elements except:
205
206         HTML: applet, br, button, datagrid, embed, frame, frameset, hr, img, input,
207               meter, object, output, progress, and select.
208
209         WML: br, do, img, input, and select.
210
211         No new tests are added since this change cannot be tested directly.
212
213         * dom/Document.h:
214         (WebCore::Document::canContainRangeEndPoint): Added; returns false.
215         * dom/DocumentFragment.h:
216         (WebCore::DocumentFragment::canContainRangeEndPoint): Added; returns true.
217         * dom/Element.h:
218         (WebCore::Element::canContainRangeEndPoint): Ditto.
219         * dom/Node.h:
220         (WebCore::Node::canContainRangeEndPoint): Added; returns false.
221         * dom/Text.h:
222         (WebCore::Text::canContainRangeEndPoint): Added; returns true.
223         * editing/htmlediting.cpp: Removed editingIgnoresContent and canHaveChildrenForEditing.
224         * editing/htmlediting.h:
225         (WebCore::editingIgnoresContent): Moved from htmlediting.cpp; made it inline.
226         (WebCore::canHaveChildrenForEditing): Ditto.
227         * html/HTMLBRElement.h:
228         (WebCore::HTMLBRElement::canContainRangeEndPoint): Added; returns false.
229         * html/HTMLButtonElement.h:
230         (WebCore::HTMLButtonElement::canContainRangeEndPoint): Ditto.
231         * html/HTMLDataGridElement.h:
232         (WebCore::HTMLDataGridElement::canContainRangeEndPoint): Ditto.
233         * html/HTMLFormControlElement.h:
234         (WebCore::HTMLFormControlElementWithState::canContainRangeEndPoint): Ditto.
235         * html/HTMLFrameElementBase.h:
236         (WebCore::HTMLFrameElementBase::canContainRangeEndPoint): Ditto.
237         * html/HTMLHRElement.h:
238         (WebCore::HTMLHRElement::canContainRangeEndPoint): Ditto.
239         * html/HTMLImageElement.h:
240         (WebCore::HTMLImageElement::canContainRangeEndPoint): Ditto.
241         * html/HTMLMeterElement.h:
242         (WebCore::HTMLMeterElement::canContainRangeEndPoint): Ditto.
243         * html/HTMLOutputElement.h:
244         (WebCore::HTMLOutputElement::canContainRangeEndPoint): Ditto.
245         * html/HTMLPlugInElement.h:
246         (WebCore::HTMLPlugInElement::canContainRangeEndPoint): Ditto.
247         * html/HTMLProgressElement.h:
248         (WebCore::HTMLProgressElement::canContainRangeEndPoint): Ditto.
249         * wml/WMLBRElement.h:
250         (WebCore::WMLBRElement::canContainRangeEndPoint): Ditto.
251         * wml/WMLDoElement.h:
252         (WebCore::WMLDoElement::canContainRangeEndPoint): Ditto.
253         * wml/WMLImageElement.h:
254         (WebCore::WMLImageElement::canContainRangeEndPoint): Ditto.
255         * wml/WMLInputElement.h:
256         (WebCore::WMLInputElement::canContainRangeEndPoint): Ditto.
257         * wml/WMLSelectElement.h:
258         (WebCore::WMLSelectElement::canContainRangeEndPoint): Ditto.
259
260 2011-02-10  Pavel Feldman  <pfeldman@chromium.org>
261
262         Reviewed by Yury Semikhatsky.
263
264         Web Inspector: define interface per domain in Inspector.idl.
265         https://bugs.webkit.org/show_bug.cgi?id=54135
266
267         * inspector/CodeGeneratorInspector.pm:
268         * inspector/Inspector.idl:
269
270 2011-02-10  Andrey Adaikin  <aandrey@google.com>
271
272         Reviewed by Pavel Feldman.
273
274         Web Inspector: [regression] Fix syncing heights of the gutter and main panel lines, and add 2px padding-left
275         https://bugs.webkit.org/show_bug.cgi?id=54098
276
277         * inspector/front-end/TextViewer.js:
278         (WebInspector.TextViewer):
279         (WebInspector.TextViewer.prototype._updatePanelOffsets):
280         (WebInspector.TextViewer.prototype._syncScroll):
281         (WebInspector.TextViewer.prototype._syncDecorationsForLine):
282         (WebInspector.TextEditorChunkedPanel.prototype._totalHeight):
283         (WebInspector.TextEditorChunkedPanel.prototype.resize):
284         (WebInspector.TextEditorGutterPanel):
285         (WebInspector.TextEditorGutterChunk.prototype.set expanded):
286         (WebInspector.TextEditorGutterChunk.prototype.get height):
287         (WebInspector.TextEditorMainChunk.prototype.get height):
288         * inspector/front-end/textViewer.css:
289         (.webkit-line-content):
290
291 2011-02-10  takano takumi  <takano@apple.com>
292
293         Reviewed by Dan Bernstein.
294
295         A full-width character rotated leftward 90 degrees in text-combine
296         https://bugs.webkit.org/show_bug.cgi?id=54169
297
298         * rendering/RenderCombineText.cpp:
299         (WebCore::RenderCombineText::combineText):
300         - Fixed by resetting font's orientation to horizontal when we decided to make combined text.
301         Otherwise the text will be unexpectedly rotated in showGlyphsWithAdvances() in FontMac.mm.
302
303 2011-02-10  Alexey Proskuryakov  <ap@apple.com>
304
305         Reviewed by Darin Adler.
306
307         https://bugs.webkit.org/show_bug.cgi?id=50306
308         <rdar://problem/8976152> REGRESSION: WebChromeClient::shouldReplaceWithGeneratedFileForUpload()
309         uses an initialized result value (breaks form submission with clang-built WebKit)
310
311         No new test, because I can't reproduce the observable effect with my gcc build.
312
313         * platform/network/FormData.cpp: (WebCore::FormData::appendKeyValuePairItems): Restore an
314         empty path check - an empty path was causing an exception in Foundation.
315
316 2011-02-09  Andrey Kosyakov  <caseq@chromium.org>
317
318         Reviewed by Pavel Feldman.
319
320         Web Inspector: Network & Resource panels make multiple requests for images with no content
321         https://bugs.webkit.org/show_bug.cgi?id=54085
322
323         - Added success parameter to resourceContent
324         - NetworkManager.requestContent() now returns empty for zero-length resources, null for errors
325
326         * inspector/Inspector.idl:
327         * inspector/InspectorResourceAgent.cpp:
328         (WebCore::InspectorResourceAgent::resourceData):
329         (WebCore::InspectorResourceAgent::resourceContent):
330         * inspector/InspectorResourceAgent.h:
331         * inspector/front-end/NetworkManager.js:
332         (WebInspector.NetworkManager.prototype.requestContent):
333         * inspector/front-end/Resource.js:
334         (WebInspector.Resource.prototype.requestContent):
335         (WebInspector.Resource.prototype._contentURL):
336
337 2011-02-10  Renata Hodovan  <reni@webkit.org>
338
339         Reviewed by Dirk Schulze.
340
341         Move the light source implementations into their own files.
342         https://bugs.webkit.org/show_bug.cgi?id=53996
343
344         Splitting LightSource.cpp into 3 files.
345
346         No new tests are added since this is a refactoring.
347
348         * Android.mk:
349         * CMakeLists.txt:
350         * GNUmakefile.am:
351         * WebCore.gypi:
352         * WebCore.pro:
353         * WebCore.vcproj/WebCore.vcproj:
354         * WebCore.xcodeproj/project.pbxproj:
355         * platform/graphics/filters/DistantLightSource.cpp: Added.
356         (WebCore::DistantLightSource::initPaintingData):
357         (WebCore::DistantLightSource::updatePaintingData):
358         (WebCore::DistantLightSource::setAzimuth):
359         (WebCore::DistantLightSource::setElevation):
360         (WebCore::DistantLightSource::externalRepresentation):
361         * platform/graphics/filters/LightSource.cpp:
362         * platform/graphics/filters/PointLightSource.cpp: Added.
363         (WebCore::PointLightSource::initPaintingData):
364         (WebCore::PointLightSource::updatePaintingData):
365         (WebCore::PointLightSource::setX):
366         (WebCore::PointLightSource::setY):
367         (WebCore::PointLightSource::setZ):
368         (WebCore::operator<<):
369         (WebCore::PointLightSource::externalRepresentation):
370         * platform/graphics/filters/SpotLightSource.cpp: Added.
371         (WebCore::SpotLightSource::initPaintingData):
372         (WebCore::SpotLightSource::updatePaintingData):
373         (WebCore::SpotLightSource::setX):
374         (WebCore::SpotLightSource::setY):
375         (WebCore::SpotLightSource::setZ):
376         (WebCore::SpotLightSource::setPointsAtX):
377         (WebCore::SpotLightSource::setPointsAtY):
378         (WebCore::SpotLightSource::setPointsAtZ):
379         (WebCore::SpotLightSource::setSpecularExponent):
380         (WebCore::SpotLightSource::setLimitingConeAngle):
381         (WebCore::operator<<):
382         (WebCore::SpotLightSource::externalRepresentation):
383
384 2011-02-10  Avi Drissman  <avi@google.com>
385
386         Reviewed by Darin Fisher.
387
388         <option> should implement the dir attribute. Mac Chromium version, followup to r76983, r77654.
389         https://bugs.webkit.org/show_bug.cgi?id=50969
390
391         Use manual test Source/WebCore/manual-tests/pop-up-alignment-and-direction.html added in r76983.
392
393         * platform/chromium/PopupMenuChromium.cpp:
394         (WebCore::PopupListBox::updateFromElement):
395         * platform/chromium/PopupMenuChromium.h:
396
397 2011-02-10  Hans Wennborg  <hans@chromium.org>
398
399         Reviewed by Jeremy Orlow.
400
401         IndexedDB: Update the semantics of put()
402         https://bugs.webkit.org/show_bug.cgi?id=54102
403
404         Update the semantics of put: For object stores with auto increment,
405         it should be allowed to provide an explicit key, or an in-line key,
406         overriding the key generator mechanism.
407
408         This reflects the spec changes suggested here:
409         http://www.w3.org/Bugs/Public/show_bug.cgi?id=11976
410
411         Extracting key-selection logic into its own function
412         to make it a bit easier on the eyes.
413
414         * storage/IDBObjectStoreBackendImpl.cpp:
415         (WebCore::IDBObjectStoreBackendImpl::selectKeyForPut):
416         (WebCore::IDBObjectStoreBackendImpl::putInternal):
417         * storage/IDBObjectStoreBackendImpl.h:
418         (WebCore::IDBObjectStoreBackendImpl::resetAutoIncrementKeyCache):
419
420 2011-02-09  Antti Koivisto  <antti@apple.com>
421
422         Reviewed by Darin Adler.
423
424         https://bugs.webkit.org/show_bug.cgi?id=54103
425         Implement fast path for matching simple selectors
426         
427         Implement a fast path for single and descendant selectors consisting
428         of id, class and tag selectors only.
429         
430         Selectors like this are marked on style selector initialization. When 
431         encountered during style matching they are resolved using a fast path.
432         
433         Since selectors like this are very common this speeds up style matching
434         quite a bit (up to 50% on some sites according to Shark).
435
436         * css/CSSStyleSelector.cpp:
437         (WebCore::RuleData::hasFastCheckableSelector):
438         (WebCore::RuleData::hasMultipartSelector):
439         (WebCore::RuleData::hasTopSelectorMatchingHTMLBasedOnRuleHash):
440         (WebCore::CSSStyleSelector::matchRulesForList):
441         (WebCore::CSSStyleSelector::checkSelector):
442         (WebCore::selectorTagMatches):
443         (WebCore::isFastCheckableSelector):
444         (WebCore::CSSStyleSelector::SelectorChecker::fastCheckSelector):
445         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
446         (WebCore::isSelectorMatchingHTMLBasedOnRuleHash):
447         (WebCore::RuleData::RuleData):
448         * css/CSSStyleSelector.h:
449
450 2011-02-09  Simon Fraser  <simon.fraser@apple.com>
451
452         Reviewed by Dan Bernstein.
453
454         REGRESSION (r77101) box-shadow sometimes renders incorrectly
455         https://bugs.webkit.org/show_bug.cgi?id=54160
456         
457         Fix an issue when ShadowBlur had a cached image buffer
458         that was larger than that of the current shadow being drawn,
459         and the current shadow was partially clipped out.
460         
461         In that situation endShadowLayer() would clip to the image
462         buffer, using the size of the buffer (as it must), but failed
463         to take into account the fact that we'd only cleared and painted
464         into a smaller section of the buffer. So we need to additionally
465         constrain the clip to cover only the valid part of the buffer.
466
467         Test: fast/box-shadow/shadow-buffer-partial.html
468
469         * platform/graphics/ShadowBlur.cpp:
470         (WebCore::ShadowBlur::endShadowLayer):
471
472 2011-02-09  Beth Dakin  <bdakin@apple.com>
473
474         Reviewed by Maciej Stachowiak.
475
476         Fix for <rdar://problem/8977051> CrashTracer: 8 crashes 
477         in WebProcess at com.apple.WebCore: 
478         -[ScrollbarPartAnimation setCurrentProgress:] + 364
479
480         The ScrollbarPartAnimation must be sent by reference!
481         * platform/mac/ScrollAnimatorMac.mm:
482         (-[ScrollbarPainterDelegate setUpAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]):
483
484 2011-02-09  Ryosuke Niwa  <rniwa@webkit.org>
485
486         Reviewed by Darin Adler.
487
488         REGRESSION(r76107): Crash in VisibleSelection::toNormalizedRange
489         https://bugs.webkit.org/show_bug.cgi?id=54053
490
491         The bug was caused by RenderBlock::positionForPoint's improperly returning a shadow node inside
492         RenderFileUploadControl for hit testing and VisibleSelection::toNormalizedRange's always assuming
493         the position variable "s" is not null.
494
495         Fixed the bug by always returning a null position from RenderFileUploadControl::positionForPoint,
496         and also exiting early when either "s" or "e" is null in VisibleSelection::toNormalizedRange.
497
498         Test: fast/forms/file-input-hit-test.html
499
500         * editing/VisibleSelection.cpp:
501         (WebCore::VisibleSelection::toNormalizedRange):
502         * rendering/RenderFileUploadControl.cpp:
503         (WebCore::RenderFileUploadControl::positionForPoint):
504         * rendering/RenderFileUploadControl.h:
505
506 2011-02-09  Sam Weinig  <sam@webkit.org>
507
508         Reviewed by Beth Dakin.
509
510         Overlay scrollbars crash used with a RenderListBox.
511
512         * rendering/RenderListBox.cpp:
513         (WebCore::RenderListBox::layout):
514         (WebCore::RenderListBox::contentsSize):
515         (WebCore::RenderListBox::currentMousePosition):
516         (WebCore::RenderListBox::setHasVerticalScrollbar):
517         * rendering/RenderListBox.h:
518         Implement enough of the ScrollableArea interface to get things generally
519         working.
520
521 2011-02-09  Beth Dakin  <bdakin@apple.com>
522
523         Reviewed by Simon Fraser.
524
525         Fix for <rdar://problem/8966868> ScrollbarPainterDelegate 
526         must return a layer if layer-backed to avoid crashing
527
528         New virtual function scrollbarWillRenderIntoCompositingLayer()
529         on ScrollableArea.
530         * page/FrameView.h:
531         * platform/ScrollableArea.h:
532         (WebCore::ScrollableArea::scrollbarWillRenderIntoCompositingLayer):
533         * rendering/RenderLayer.h:
534         (WebCore::RenderLayer::scrollbarWillRenderIntoCompositingLayer):
535         * rendering/RenderListBox.cpp:
536         (WebCore::RenderListBox::scrollbarWillRenderIntoCompositingLayer):
537         * rendering/RenderListBox.h:
538
539         Clean up unnecessary method declarations and call 
540         scrollbarWillRenderIntoCompositingLayer() to deterine if 
541         we need to return a layer.
542         * platform/mac/ScrollAnimatorMac.mm:
543         (-[ScrollbarPainterDelegate layer]):
544
545 2011-02-09  Yael Aharon  <yael.aharon@nokia.com>
546
547         Reviewed by Darin Adler.
548
549         Replace static_cast<HTMLElement*> with toHTMLElement
550         https://bugs.webkit.org/show_bug.cgi?id=54117
551
552         No new tests since no new functionality was introduced.
553
554         * accessibility/AccessibilityListBox.cpp:
555         (WebCore::AccessibilityListBox::addChildren):
556         * accessibility/AccessibilityMenuListPopup.cpp:
557         (WebCore::AccessibilityMenuListPopup::addChildren):
558         * accessibility/AccessibilityRenderObject.cpp:
559         (WebCore::accessibleNameForNode):
560         (WebCore::AccessibilityRenderObject::accessibilityDescription):
561         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
562         (webkit_accessible_get_name):
563         (webkit_accessible_get_description):
564         * bindings/gobject/WebKitDOMBinding.cpp:
565         (WebKit::createWrapper):
566         (WebKit::kit):
567         * bindings/js/JSElementCustom.cpp:
568         (WebCore::toJSNewlyCreated):
569         * bindings/js/JSHTMLFrameSetElementCustom.cpp:
570         (WebCore::JSHTMLFrameSetElement::nameGetter):
571         * bindings/js/JSNodeCustom.cpp:
572         (WebCore::createWrapperInline):
573         * bindings/v8/custom/V8ElementCustom.cpp:
574         (WebCore::toV8):
575         * dom/Document.cpp:
576         (WebCore::Document::body):
577         * dom/Element.cpp:
578         (WebCore::Element::deprecatedCreateContextualFragment):
579         * dom/Range.cpp:
580         (WebCore::Range::createContextualFragment):
581         * editing/ApplyStyleCommand.cpp:
582         (WebCore::ApplyStyleCommand::applyBlockStyle):
583         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
584         (WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
585         (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
586         (WebCore::ApplyStyleCommand::removeStyleFromRunBeforeApplyingStyle):
587         (WebCore::ApplyStyleCommand::highestAncestorWithConflictingInlineStyle):
588         (WebCore::ApplyStyleCommand::applyInlineStyleToPushDown):
589         (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):
590         (WebCore::ApplyStyleCommand::removeInlineStyle):
591         (WebCore::ApplyStyleCommand::shouldSplitTextElement):
592         (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded):
593         * editing/DeleteButtonController.cpp:
594         (WebCore::enclosingDeletableElement):
595         (WebCore::DeleteButtonController::show):
596         * editing/Editor.cpp:
597         (WebCore::Editor::setBaseWritingDirection):
598         * editing/InsertListCommand.cpp:
599         (WebCore::InsertListCommand::mergeWithNeighboringLists):
600         * editing/ReplaceSelectionCommand.cpp:
601         (WebCore::ReplaceSelectionCommand::negateStyleRulesThatAffectAppearance):
602         (WebCore::ReplaceSelectionCommand::handleStyleSpans):
603         (WebCore::ReplaceSelectionCommand::copyStyleToChildren):
604         * editing/SelectionController.cpp:
605         (WebCore::scanForForm):
606         (WebCore::SelectionController::currentForm):
607         * editing/htmlediting.cpp:
608         (WebCore::enclosingList):
609         (WebCore::enclosingListChild):
610         (WebCore::embeddedSublist):
611         (WebCore::appendedSublist):
612         * editing/markup.cpp:
613         (WebCore::StyledMarkupAccumulator::appendElement):
614         * html/HTMLCollection.cpp:
615         (WebCore::HTMLCollection::checkForNameMatch):
616         (WebCore::HTMLCollection::updateNameCache):
617         * html/HTMLElement.cpp:
618         (WebCore::HTMLElement::setOuterHTML):
619         (WebCore::HTMLElement::shadowAncestorOwnerForm):
620         * html/HTMLFormElement.cpp:
621         (WebCore::HTMLFormElement::formElementIndex):
622         * html/HTMLSelectElement.cpp:
623         (WebCore::HTMLSelectElement::setOption):
624         (WebCore::HTMLSelectElement::setLength):
625         * inspector/InspectorDOMAgent.cpp:
626         (WebCore::InspectorDOMAgent::getOuterHTML):
627         (WebCore::InspectorDOMAgent::setOuterHTML):
628         * page/EventHandler.cpp:
629         (WebCore::EventHandler::handleMouseMoveEvent):
630         * rendering/RenderMeter.cpp:
631         (WebCore::RenderMeter::createPart):
632         * rendering/RenderTextControl.cpp:
633         (WebCore::RenderTextControl::createSubtreeIfNeeded):
634         * rendering/RenderTextControlSingleLine.cpp:
635         (WebCore::RenderTextControlSingleLine::createSubtreeIfNeeded):
636
637 2011-02-09  Mike Reed  <reed@google.com>
638
639         Reviewed by Kenneth Russell.
640
641         Use Skia's device->readPixels() when its bitmap claims to have no pixels, as this
642         handles the case when the device is backed by the GPU.
643         Patch developed by bsalomon@google.com
644
645         No new tests. Existing canvas tests suffice
646         e.g. LayoutTests/canvas/philip/... 
647
648         * platform/graphics/skia/ImageBufferSkia.cpp:
649         (WebCore::getImageData):
650         (WebCore::ImageBuffer::getUnmultipliedImageData):
651         (WebCore::ImageBuffer::getPremultipliedImageData):
652         (WebCore::putImageData):
653         (WebCore::ImageBuffer::putUnmultipliedImageData):
654         (WebCore::ImageBuffer::putPremultipliedImageData):
655
656 2011-02-09  Adam Barth  <abarth@webkit.org>
657
658         Reviewed by Eric Seidel.
659
660         document.close shouldn't affect non-script-created parsers
661         https://bugs.webkit.org/show_bug.cgi?id=53689
662
663         Tests: fast/frames/document-write-in-iframe-onload-3.html
664                fast/parser/iframe-onload-document-close-with-external-script-2.html
665                fast/parser/iframe-onload-document-close-with-external-script-3.html
666                fast/parser/iframe-onload-document-close-with-external-script.html
667                fast/parser/setTimeout-open.html
668
669         Move our implementation of document.close closer to the spec by
670         introducing the notion of a script-created parser.  This area of our
671         code is somewhat hairy.  It might take a few more iterations before we
672         fully come up to spec.
673
674         * dom/Document.cpp:
675         (WebCore::Document::setContent):
676         (WebCore::Document::open):
677         (WebCore::Document::cancelParsing):
678         (WebCore::Document::close):
679             - Over time, this method should converge to the spec.
680         (WebCore::Document::explicitClose):
681             - I'm not in love with this name.  Somehow we want to differentiate
682               between Document closing itself and the document.close DOM
683               method.
684         (WebCore::Document::removePendingSheet):
685         * dom/Document.h:
686         * dom/ScriptableDocumentParser.cpp:
687         (WebCore::ScriptableDocumentParser::ScriptableDocumentParser):
688         * dom/ScriptableDocumentParser.h:
689         (WebCore::ScriptableDocumentParser::setWasCreatedByScript):
690         (WebCore::ScriptableDocumentParser::wasCreatedByScript):
691             - General nonsense to keep track of whether the parser was created
692               by script.
693         * html/parser/HTMLDocumentParser.cpp:
694         (WebCore::HTMLDocumentParser::hasInsertionPoint):
695             - I'm not sure whether this part of the change is 100% correct.  I
696               think our notion of the EOF character might be subtly different
697               from the notion in the spec.
698         * html/parser/HTMLInputStream.h:
699         (WebCore::HTMLInputStream::hasInsertionPoint):
700             - Remove FIXME because we're fixing that!
701
702 2011-02-09  Abhishek Arya  <inferno@chromium.org>
703
704         Reviewed by James Robinson.
705
706         [Chromium] Issue 72387: Integer bounds crash in LayerTilerChromium::resizeLayer
707         https://bugs.webkit.org/show_bug.cgi?id=54132
708  
709         * platform/graphics/chromium/LayerTilerChromium.cpp:
710         (WebCore::LayerTilerChromium::resizeLayer):
711
712 2011-02-09  Xiyuan Xia  <xiyuan@chromium.org>
713
714         Reviewed by Tony Chang.
715
716         [Chromium] Use #f7f7f7 for select popup background on chromium/linux
717         https://bugs.webkit.org/show_bug.cgi?id=54115
718
719         No new tests since no behavior change.
720
721         * css/themeChromiumLinux.css:
722         (select[size="1"] option):
723
724 2011-02-09  Adam Barth  <abarth@webkit.org>
725
726         Reviewed by Eric Seidel.
727
728         REGRESSION(HTML 5): HTMLDocumentParser does not report html parse errors to the console
729         https://bugs.webkit.org/show_bug.cgi?id=41187
730
731         Wire up a basic HTML parse error message.  There's a lot of room for
732         improvement in this area, but this is a start.
733
734         No tests!  See https://bugs.webkit.org/show_bug.cgi?id=54134
735
736         * html/parser/HTMLDocumentParser.h:
737         * html/parser/HTMLTreeBuilder.cpp:
738         (WebCore::HTMLTreeBuilder::parseError):
739         * html/parser/HTMLTreeBuilder.h:
740
741 2011-02-09  Naoki Takano  <takano.naoki@gmail.com>
742
743         Reviewed by Kenneth Russell.
744
745         [Chromium] Issue 58536: Fix Layout Test canvas/philip/tests/2d.imageData.put.alpha.html with --accelerated-2d-canvas.
746         https://bugs.webkit.org/show_bug.cgi?id=53757
747
748           This fix is for 2d.imageData.put.alpha.html with --accelerated-2d-canvas. No new tests.
749
750         * platform/graphics/skia/ImageBufferSkia.cpp:
751         (WebCore::ImageBuffer::putUnmultipliedImageData): needs to call syncSoftwareCanvas() to sync between hardware and software.
752         (WebCore::ImageBuffer::putPremultipliedImageData): needs to call syncSoftwareCanvas() to sync between hardware and software.
753
754
755 2011-02-09  Chris Rogers  <crogers@google.com>
756
757         Reviewed by Kenneth Russell.
758
759         Fix scaling and thread safety of FFTFrameFFTW
760         https://bugs.webkit.org/show_bug.cgi?id=54045
761
762         No new tests since audio API is not yet implemented.
763
764         * platform/audio/FFTFrame.h:
765         * platform/audio/fftw/FFTFrameFFTW.cpp:
766         (WebCore::FFTFrame::FFTFrame):
767         (WebCore::FFTFrame::doFFT):
768         (WebCore::FFTFrame::doInverseFFT):
769         (WebCore::FFTFrame::initialize):
770         (WebCore::FFTFrame::cleanup):
771         (WebCore::FFTFrame::realData):
772         (WebCore::FFTFrame::imagData):
773         (WebCore::FFTFrame::fftwPlanForSize):
774         * platform/audio/mac/FFTFrameMac.cpp:
775         (WebCore::FFTFrame::initialize):
776         * platform/audio/mkl/FFTFrameMKL.cpp:
777         (WebCore::FFTFrame::initialize):
778         * webaudio/AudioContext.cpp:
779         (WebCore::AudioContext::AudioContext):
780
781 2011-02-09  Chris Fleizach  <cfleizach@apple.com>
782
783         Reviewed by Darin Adler.
784
785         AX: accessibilityShouldUseUniqueId doesn't need to be in the core AX object
786         https://bugs.webkit.org/show_bug.cgi?id=54126
787
788         This is a Mac-only accessibility API concept and doesn't belong in the core AX object.
789
790         * accessibility/AccessibilityObject.h:
791         (WebCore::AccessibilityObject::node):
792         * accessibility/mac/AccessibilityObjectWrapper.mm:
793         (-[AccessibilityObjectWrapper accessibilityShouldUseUniqueId]):
794
795 2011-02-09  Nebojsa Ciric  <cira@chromium.org>
796
797         Reviewed by Darin Fisher.
798
799         Implements Locale object of JavaScript internationalization API proposal, as an
800         v8 extension. Extension code is hosted in v8 project (src/extensions/experimental/i18n-extension.{cc,h})
801         and in this patch we just provide flags, tests and build rules for chromium port.
802         https://bugs.webkit.org/show_bug.cgi?id=49414
803
804         Test: fast/js/i18n-bindings-locale.html
805
806         * WebCore.gyp/WebCore.gyp:
807         * bindings/generic/RuntimeEnabledFeatures.cpp:
808         (WebCore::RuntimeEnabledFeatures::experimentalI18NAPIEnabled):
809         * bindings/generic/RuntimeEnabledFeatures.h:
810         (WebCore::RuntimeEnabledFeatures::setExperimentalI18NAPIEnabled):
811         * bindings/v8/V8DOMWindowShell.cpp:
812         (WebCore::V8DOMWindowShell::createNewContext):
813
814 2011-02-08  Dimitri Glazkov  <dglazkov@chromium.org>
815
816         Reviewed by Darin Adler.
817
818         REGRESSION(r71934): Shadow DOM nodes leak via relatedTarget
819         https://bugs.webkit.org/show_bug.cgi?id=52065
820
821         * dom/Node.cpp:
822         (WebCore::pullOutOfShadow): Added a helper to move a node to the outermost
823             boundary of shadow DOM.
824         (WebCore::Node::dispatchMouseEvent): Changed to use pullOutOfShadow.
825
826 2011-02-09  Yael Aharon  <yael.aharon@nokia.com>
827
828         Reviewed by Darin Adler.
829
830         Add convenience method toHTMLElement(Node*)
831         https://bugs.webkit.org/show_bug.cgi?id=54105
832
833         No new tests since no new functionality introduced.
834
835         * html/HTMLElement.h:
836         (WebCore::toHTMLElement):
837
838 2011-02-09  Sam Weinig  <sam@webkit.org>
839
840         Reviewed by Dan Bernstein.
841
842         Fixed positioned elements at very top or bottom of page remain fixed but clip during rubber-banding
843         <rdar://problem/7615997>
844         https://bugs.webkit.org/show_bug.cgi?id=54054
845
846         Take the overhang into account when calculating position for elements with position: fixed.
847
848         * platform/ScrollView.cpp:
849         (WebCore::ScrollView::scrollXForFixedPosition):
850         (WebCore::ScrollView::scrollYForFixedPosition):
851         (WebCore::ScrollView::scrollOffsetForFixedPosition):
852         * platform/ScrollView.h:
853         * rendering/RenderView.cpp:
854         (WebCore::RenderView::mapLocalToContainer):
855         (WebCore::RenderView::mapAbsoluteToLocalPoint):
856         (WebCore::RenderView::computeRectForRepaint):
857
858 2011-02-09  Simon Fraser  <simon.fraser@apple.com>
859
860         Reviewed by Dirk Schulze.
861
862         Enhance ShadowBlur to tile inset box shadows
863         https://bugs.webkit.org/show_bug.cgi?id=51567
864         
865         Add a tiling code path to ShadowBlur for rendering inset
866         box-shadows.
867
868         Test: fast/box-shadow/inset-box-shadows.html
869         
870         * platform/graphics/ShadowBlur.cpp:
871         (WebCore::computeSliceSizesFromRadii): Compute the slice sizes
872         for the eight-piece shadow template.
873         (WebCore::ShadowBlur::templateSize): Compute the size of the template,
874         given the slice sizes.
875         (WebCore::ShadowBlur::drawRectShadow): Bail early if layerRect is empty
876         (which probably means we're clipped out). Call templateSize() and use
877         the result to decide whether to tile.
878         (WebCore::ShadowBlur::drawInsetShadow): New method for inset shadows.
879         (WebCore::ShadowBlur::drawRectShadowWithoutTiling): Code moved.
880         (WebCore::ShadowBlur::drawInsetShadowWithoutTiling): The non-tiling code
881         path for inset shadows.
882         (WebCore::ShadowBlur::drawInsetShadowWithTiling): Fill the shadow template
883         buffer, paint the non-blurred area of the destination, and then call drawLayerPieces()
884         to paint the eight-piece template image.
885         (WebCore::ShadowBlur::drawRectShadowWithTiling): Refactored code, now
886         shares the blurring code via blurAndColorShadowBuffer(), and the tiled template
887         drawing via drawLayerPieces().
888         (WebCore::ShadowBlur::drawLayerPieces): Draw an eight-piece image from the
889         shadow template to the destination.
890         (WebCore::ShadowBlur::blurAndColorShadowBuffer): Blur the pixels in the image
891         buffer, and colorize them using the CompositeSourceIn operation.
892         * platform/graphics/ShadowBlur.h:
893
894 2011-02-09  Jochen Eisinger  <jochen@chromium.org>
895
896         Reviewed by Adam Barth.
897
898         Disable script elements when a CSP header is present
899         https://bugs.webkit.org/show_bug.cgi?id=53867
900
901         Tests: http/tests/security/contentSecurityPolicy/no-policy.html
902                http/tests/security/contentSecurityPolicy/script-src-in-iframe.html
903                http/tests/security/contentSecurityPolicy/script-src-none.html
904                http/tests/security/contentSecurityPolicy/script-src-redirect.html
905
906         * html/parser/HTMLDocumentParser.cpp:
907         (WebCore::HTMLDocumentParser::shouldLoadExternalScriptFromSrc):
908         * html/parser/HTMLScriptRunner.cpp:
909         (WebCore::HTMLScriptRunner::requestPendingScript):
910         * loader/FrameLoader.cpp:
911         (WebCore::FrameLoader::didBeginDocument):
912         * loader/MainResourceLoader.cpp:
913         (WebCore::MainResourceLoader::didReceiveResponse):
914         * page/ContentSecurityPolicy.cpp:
915         (WebCore::ContentSecurityPolicy::ContentSecurityPolicy):
916         (WebCore::ContentSecurityPolicy::didReceiveHeader):
917         (WebCore::ContentSecurityPolicy::canLoadExternalScriptFromSrc):
918         * page/ContentSecurityPolicy.h:
919
920 2011-02-09  Patrick Gansterer  <paroga@webkit.org>
921
922         Unreviewed WinCE build fix for r78047.
923
924         ContextMenu.cpp and ContextMenuItem.cpp have a USE(CROSS_PLATFORM_CONTEXT_MENUS),
925         so they shouldn't cause problems with correct preprocessor defines.
926
927         * CMakeLists.txt:
928
929 2011-02-09  Ilya Tikhonovsky  <loislo@chromium.org>
930
931         Reviewed by Pavel Feldman.
932
933         Web Inspector: InspectorAgent should know nothing about InspectorController instance.
934
935         https://bugs.webkit.org/show_bug.cgi?id=54100
936
937         * inspector/InspectorAgent.cpp:
938         (WebCore::InspectorAgent::InspectorAgent):
939         (WebCore::InspectorAgent::restoreInspectorStateFromCookie):
940         (WebCore::InspectorAgent::disconnectFrontend):
941         * inspector/InspectorAgent.h:
942         * inspector/InspectorController.cpp:
943         (WebCore::InspectorController::InspectorController):
944         (WebCore::InspectorController::disconnectFrontend):
945         (WebCore::InspectorController::restoreInspectorStateFromCookie):
946
947 2011-02-09  Pavel Podivilov  <podivilov@chromium.org>
948
949         Reviewed by Pavel Feldman.
950
951         Web Inspector: source frame scroll position is not restored.
952         https://bugs.webkit.org/show_bug.cgi?id=54101
953
954         * inspector/front-end/ScriptsPanel.js:
955         (WebInspector.ScriptsPanel.prototype._scriptSourceChanged):
956         * inspector/front-end/SourceFrame.js:
957         (WebInspector.SourceFrame.prototype.show):
958         (WebInspector.SourceFrame.prototype.hide):
959         (WebInspector.SourceFrame.prototype.get scrollTop):
960         (WebInspector.SourceFrame.prototype.set scrollTop):
961         * inspector/front-end/TextViewer.js:
962         (WebInspector.TextViewer.prototype.get scrollTop):
963         (WebInspector.TextViewer.prototype.set scrollTop):
964         (WebInspector.TextViewer.prototype.get scrollLeft):
965         (WebInspector.TextViewer.prototype.set scrollLeft):
966
967 2011-02-09  Pavel Feldman  <pfeldman@chromium.org>
968
969         Reviewed by Yury Semikhatsky.
970
971         Web Inspector: follow up on InspectorAgent split -
972         removing unnecessary methods from InspectorController.
973         https://bugs.webkit.org/show_bug.cgi?id=54093
974
975         * WebCore.exp.in:
976         * inspector/InspectorAgent.cpp:
977         (WebCore::InspectorAgent::stopUserInitiatedProfiling):
978         (WebCore::InspectorAgent::showAndEnableDebugger):
979         (WebCore::InspectorAgent::enabled):
980         (WebCore::InspectorAgent::showConsole):
981         * inspector/InspectorAgent.h:
982         * inspector/InspectorController.cpp:
983         (WebCore::InspectorController::InspectorController):
984         (WebCore::InspectorController::didClearWindowObjectInWorld):
985         (WebCore::InspectorController::showConsole):
986         (WebCore::InspectorController::enabled):
987         (WebCore::InspectorController::inspectedPage):
988         * inspector/InspectorController.h:
989         * inspector/InspectorFrontendClientLocal.cpp:
990
991 2011-02-07  Chris Marrin  <cmarrin@apple.com>
992
993         Reviewed by Simon Fraser.
994
995         LayoutTests/animations/play-state.html has wrong behavior with accelerated compositing
996         https://bugs.webkit.org/show_bug.cgi?id=53513
997
998         The PlatformCAAnimation::create() function which took a pointer to another
999         PlatformCAAnimation was supposed to make a copy of that passed object.
1000         But it was doing completely the wrong thing on Mac and was leaking an object
1001         to boot. And the notion of copying an object using a static creation function
1002         is wrong in the first place. So I changed it to a member copy() function
1003         which would create a new PlatformCAAnimation which was a copy of 'this' and
1004         return it. I changed the implementation on both Mac and Win to match.
1005
1006         This problem was not caught by DRT, even there is a specific test for it.
1007         That test just verifies that the higher level logic is working 
1008         properly, which it is. There's no practical way to find out if the
1009         layer is currently animating. There is no logic which probes that
1010         deeply into the layer mechanics.
1011         
1012         * platform/graphics/ca/GraphicsLayerCA.cpp:
1013         * platform/graphics/ca/PlatformCAAnimation.h:
1014         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
1015         * platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
1016
1017 2011-02-09  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
1018
1019         Unreviewed build fix.
1020
1021         [EFL] Remove double definition of ContextMenu.
1022         https://bugs.webkit.org/show_bug.cgi?id=50762
1023
1024         When building with SHARED_CORE enabled, the symbols of ContextMenu
1025         were both in webkit and webcore. This removes them from webcore and
1026         shall be put back once the CROSS_PLATFORM_CONTEXT_MENUS is implemented
1027         in EFL port.
1028
1029         No new tests because no new functionality.
1030
1031         * CMakeLists.txt:
1032
1033 2011-02-09  Adam Roben  <aroben@apple.com>
1034
1035         Windows Production build fix
1036
1037         * WebCore.vcproj/QTMovieWinCommon.vsprops: Link against
1038         WebKitSystemInterface$(WebKitConfigSuffix).lib, not just WebKitSystemInterface.lib, so we
1039         pick up the _debug variant when appropriate.
1040
1041 2011-02-09  Eric Seidel  <eric@webkit.org>
1042
1043         Reviewed by Adam Barth.
1044
1045         Hostnames should cannonicalize to lowercase (to match every other browser)
1046         https://bugs.webkit.org/show_bug.cgi?id=54084
1047
1048         * platform/KURL.cpp:
1049         (WebCore::KURL::parse):
1050
1051 2011-02-09  Peter Varga  <pvarga@webkit.org>
1052
1053
1054         Reviewed by Gavin Barraclough.
1055
1056         Replace PCRE with Yarr in WebCore
1057         https://bugs.webkit.org/show_bug.cgi?id=53496
1058
1059         No new tests needed.
1060
1061         * Android.jscbindings.mk:
1062         * CMakeLists.txt:
1063         * ForwardingHeaders/pcre/pcre.h: Removed.
1064         * ForwardingHeaders/yarr/Yarr.h: Added.
1065         * ForwardingHeaders/yarr/YarrInterpreter.h: Added.
1066         * ForwardingHeaders/yarr/YarrPattern.h: Added.
1067         * WebCore.gyp/WebCore.gyp:
1068         * WebCore.pro:
1069         * WebCore.vcproj/WebCore.vcproj:
1070         * WebCore.vcproj/copyForwardingHeaders.cmd:
1071         * platform/text/RegularExpression.cpp:
1072         (WebCore::RegularExpression::Private::create):
1073         (WebCore::RegularExpression::Private::Private):
1074         (WebCore::RegularExpression::Private::compile):
1075         (WebCore::RegularExpression::match):
1076
1077 2011-02-09  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1078
1079         Reviewed by Eric Seidel.
1080
1081         [EFL] Add dummy functions for HTML5 Video's control UI
1082         https://bugs.webkit.org/show_bug.cgi?id=53906
1083
1084         In WebKit EFL, there are no implementations for HTML5 control UI.
1085         First, dummy functions are added.
1086
1087         * platform/efl/RenderThemeEfl.cpp:
1088         (WebCore::RenderThemeEfl::extraMediaControlsStyleSheet):
1089         (WebCore::RenderThemeEfl::formatMediaControlsCurrentTime):
1090         (WebCore::RenderThemeEfl::paintMediaFullscreenButton):
1091         (WebCore::RenderThemeEfl::paintMediaMuteButton):
1092         (WebCore::RenderThemeEfl::paintMediaPlayButton):
1093         (WebCore::RenderThemeEfl::paintMediaSeekBackButton):
1094         (WebCore::RenderThemeEfl::paintMediaSeekForwardButton):
1095         (WebCore::RenderThemeEfl::paintMediaSliderTrack):
1096         (WebCore::RenderThemeEfl::paintMediaSliderThumb):
1097         (WebCore::RenderThemeEfl::paintMediaVolumeSliderContainer):
1098         (WebCore::RenderThemeEfl::paintMediaVolumeSliderTrack):
1099         (WebCore::RenderThemeEfl::paintMediaVolumeSliderThumb):
1100         (WebCore::RenderThemeEfl::paintMediaCurrentTime):
1101         * platform/efl/RenderThemeEfl.h:
1102
1103 2011-02-09  Eric Seidel  <eric@webkit.org>
1104
1105         Reviewed by Adam Barth.
1106
1107         Make WebKit's fragment cannonicalization match other browsers
1108         https://bugs.webkit.org/show_bug.cgi?id=53850
1109
1110         This doesn't make us match perfectly, but it brings us closer.
1111
1112         * platform/KURL.cpp:
1113         (WebCore::appendEscapingBadChars):
1114         (WebCore::escapeAndAppendFragment):
1115         (WebCore::KURL::parse):
1116
1117 2011-02-09  Hans Wennborg  <hans@chromium.org>
1118
1119         Reviewed by Jeremy Orlow.
1120
1121         IndexedDB: Cursors should skip deleted entries
1122         https://bugs.webkit.org/show_bug.cgi?id=53690
1123
1124         Add test to check that the cursor skips deleted entries.
1125
1126         Test: storage/indexeddb/cursor-skip-deleted.html
1127
1128         * storage/IDBCursorBackendImpl.cpp:
1129         (WebCore::IDBCursorBackendImpl::currentRowExists):
1130         (WebCore::IDBCursorBackendImpl::continueFunctionInternal):
1131         * storage/IDBCursorBackendImpl.h:
1132
1133 2011-02-08  Pavel Podivilov  <podivilov@chromium.org>
1134
1135         Reviewed by Yury Semikhatsky.
1136
1137         Web Inspector: script formatter should not create a worker for each script.
1138         https://bugs.webkit.org/show_bug.cgi?id=54010
1139
1140         * inspector/front-end/ScriptFormatter.js:
1141         (WebInspector.ScriptFormatter):
1142         (WebInspector.ScriptFormatter.prototype._formatScript):
1143         (WebInspector.ScriptFormatter.prototype._handleMessage):
1144         (WebInspector.ScriptFormatter.prototype._handleError):
1145
1146 2011-02-08  Pavel Podivilov  <podivilov@chromium.org>
1147
1148         Reviewed by Pavel Feldman.
1149
1150         Web Inspector: sync uglifyjs parser files.
1151         https://bugs.webkit.org/show_bug.cgi?id=54003
1152
1153         * inspector/front-end/UglifyJS/parse-js.js:
1154         * inspector/front-end/UglifyJS/process.js:
1155
1156 2011-02-08  Ryosuke Niwa  <rniwa@webkit.org>
1157
1158         Reviewed by Darin Adler.
1159
1160         REGRESSION(71556,68059): queryCommandValue screws up background color at collapsed cursor
1161         https://bugs.webkit.org/show_bug.cgi?id=53196
1162
1163         The bug was caused by Editor::selectionComputedStyle's modifying typing style without making a copy,
1164         and its removing non-inheritable properties from the typing style. Fixed the bug by making a copy
1165         before making the modification and not removing non-inheritable properties.
1166
1167         Also fixed a bug in selectionStartCSSPropertyValue that it doesn't handle xx-small to -webkit-xxx-large
1168         by extracting a function from StyleChange::extractTextStyles and calling it in both extractTextStyles
1169         and selectionStartCSSPropertyValue.
1170
1171         Test: editing/style/query-typing-style.html
1172
1173         * editing/ApplyStyleCommand.cpp:
1174         (WebCore::legacyFontSizeFromCSSValue): Extracted from StyleChange::extractTextStyles.
1175         (WebCore::StyleChange::extractTextStyles): Calls legacyFontSizeFromCSSValue; this fixes the bug that
1176         CSS values from xx-small through -webkit-xxx-large are not accounted.
1177         * editing/ApplyStyleCommand.h:
1178         * editing/Editor.cpp:
1179         (WebCore::Editor::selectionStartCSSPropertyValue): Calls legacyFontSizeFromCSSValue.
1180         (WebCore::Editor::selectionComputedStyle): Makes a copy before modifying typing style.
1181         No longer calls removeNonEditingProperties on the copied typing style so that background-color property
1182         is included when merged into the style.
1183
1184 2011-02-08  Sam Weinig  <sam@webkit.org>
1185
1186         Reviewed by Maciej Stachowiak.
1187
1188         REGRESSION (r76831): Subframes are printed blank
1189         <rdar://problem/8945867>
1190
1191         * page/FrameView.cpp:
1192         (WebCore::FrameView::paintOverhangAreas):
1193         Don't paint overhangs when printing.
1194
1195 2011-02-07  Jeremy Orlow  <jorlow@chromium.org>
1196
1197         Reviewed by Nate Chapin.
1198
1199         Events should propagate through IDBDatabase (for IDBRequest and IDBTransaction)
1200         https://bugs.webkit.org/show_bug.cgi?id=53975
1201
1202         The third change in the series of overhauling IndexedDB's event model to match
1203         the spec (at least the version in our heads and bugs).
1204
1205         Test: storage/indexeddb/transaction-event-propagation.html
1206
1207         * bindings/v8/V8DOMWrapper.cpp:
1208         (WebCore::V8DOMWrapper::convertEventTargetToV8Object):
1209         * dom/Event.cpp:
1210         (WebCore::Event::isIDBAbortEvent):
1211         (WebCore::Event::isIDBCompleteEvent):
1212         * dom/Event.h:
1213         * dom/EventTarget.cpp:
1214         (WebCore::EventTarget::toIDBDatabase):
1215         * dom/EventTarget.h:
1216         * storage/IDBDatabase.cpp:
1217         (WebCore::IDBDatabase::create):
1218         (WebCore::IDBDatabase::IDBDatabase):
1219         (WebCore::IDBDatabase::scriptExecutionContext):
1220         (WebCore::IDBDatabase::eventTargetData):
1221         (WebCore::IDBDatabase::ensureEventTargetData):
1222         * storage/IDBDatabase.h:
1223         (WebCore::IDBDatabase::toIDBDatabase):
1224         (WebCore::IDBDatabase::refEventTarget):
1225         (WebCore::IDBDatabase::derefEventTarget):
1226         * storage/IDBDatabase.idl:
1227         * storage/IDBRequest.cpp:
1228         (WebCore::IDBRequest::onSuccess):
1229         (WebCore::IDBRequest::dispatchEvent):
1230         * storage/IDBTransaction.cpp:
1231         (WebCore::IDBTransaction::backend):
1232         (WebCore::IDBTransaction::db):
1233         (WebCore::IDBTransaction::objectStore):
1234         (WebCore::IDBTransaction::scriptExecutionContext):
1235         (WebCore::IDBTransaction::dispatchEvent):
1236         (WebCore::IDBTransaction::enqueueEvent):
1237         * storage/IDBTransaction.h:
1238         (WebCore::IDBTransaction::dispatchEvent):
1239
1240 2011-02-08  Kenneth Russell  <kbr@google.com>
1241
1242         Reviewed by James Robinson.
1243
1244         Add cache for GPU-accelerated path processing results
1245         https://bugs.webkit.org/show_bug.cgi?id=45519
1246
1247         Adding a cache which holds the results of processing a path into
1248         interior and exterior triangle meshes, according to the path
1249         rendering algorithm from GPU Gems 3. No tests yet; will be tested
1250         in conjunction with later code.
1251
1252         * platform/graphics/gpu/LoopBlinnPathCache.cpp: Added.
1253         (WebCore::LoopBlinnPathCache::LoopBlinnPathCache):
1254         (WebCore::LoopBlinnPathCache::~LoopBlinnPathCache):
1255         (WebCore::LoopBlinnPathCache::addVertex):
1256         (WebCore::LoopBlinnPathCache::clear):
1257         (WebCore::LoopBlinnPathCache::addInteriorVertex):
1258         (WebCore::LoopBlinnPathCache::numberOfInteriorEdgeVertices):
1259         (WebCore::LoopBlinnPathCache::interiorEdgeVertices):
1260         (WebCore::LoopBlinnPathCache::addInteriorEdgeVertex):
1261         * platform/graphics/gpu/LoopBlinnPathCache.h: Added.
1262         (WebCore::LoopBlinnPathCache::numberOfVertices):
1263         (WebCore::LoopBlinnPathCache::vertices):
1264         (WebCore::LoopBlinnPathCache::texcoords):
1265         (WebCore::LoopBlinnPathCache::numberOfInteriorVertices):
1266         (WebCore::LoopBlinnPathCache::interiorVertices):
1267
1268 2011-02-08  Zhenyao Mo  <zmo@google.com>
1269
1270         Reviewed by Kenneth Russell.
1271
1272         Rename GraphicsContext3D::WebGLEnumType
1273         https://bugs.webkit.org/show_bug.cgi?id=45708
1274
1275         * html/canvas/WebGLProgram.cpp:
1276         (WebCore::WebGLProgram::getAttachedShader):
1277         * html/canvas/WebGLProgram.h:
1278         * platform/graphics/GraphicsContext3D.h:
1279
1280 2011-02-08  Sheriff Bot  <webkit.review.bot@gmail.com>
1281
1282         Unreviewed, rolling out r77980.
1283         http://trac.webkit.org/changeset/77980
1284         https://bugs.webkit.org/show_bug.cgi?id=54043
1285
1286         "Crashes on Windows and Linux..." (Requested by leviw on
1287         #webkit).
1288
1289         * WebCore.exp.in:
1290         * accessibility/AXObjectCache.cpp:
1291         (WebCore::AXObjectCache::visiblePositionForTextMarkerData):
1292         * accessibility/AccessibilityObject.cpp:
1293         (WebCore::startOfStyleRange):
1294         (WebCore::endOfStyleRange):
1295         * accessibility/AccessibilityRenderObject.cpp:
1296         (WebCore::AccessibilityRenderObject::visiblePositionForIndex):
1297         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
1298         (objectAndOffsetUnignored):
1299         * dom/Position.cpp:
1300         (WebCore::Position::upstream):
1301         (WebCore::Position::downstream):
1302         * dom/Range.cpp:
1303         (WebCore::Range::editingStartPosition):
1304         * editing/Editor.cpp:
1305         (WebCore::Editor::canDeleteRange):
1306         * editing/ReplaceSelectionCommand.cpp:
1307         (WebCore::ReplaceSelectionCommand::doApply):
1308         * editing/SelectionController.cpp:
1309         (WebCore::SelectionController::selectFrameElementInParentIfFullySelected):
1310         (WebCore::SelectionController::setSelectedRange):
1311         * editing/TextIterator.cpp:
1312         (WebCore::TextIterator::shouldRepresentNodeOffsetZero):
1313         * editing/TypingCommand.cpp:
1314         (WebCore::TypingCommand::deleteKeyPressed):
1315         * editing/VisiblePosition.cpp:
1316         (WebCore::VisiblePosition::VisiblePosition):
1317         (WebCore::VisiblePosition::leftVisuallyDistinctCandidate):
1318         (WebCore::VisiblePosition::rightVisuallyDistinctCandidate):
1319         (WebCore::VisiblePosition::canonicalPosition):
1320         (WebCore::VisiblePosition::characterAfter):
1321         (WebCore::VisiblePosition::localCaretRect):
1322         (WebCore::makeRange):
1323         (WebCore::startVisiblePosition):
1324         (WebCore::endVisiblePosition):
1325         (WebCore::setStart):
1326         (WebCore::setEnd):
1327         (WebCore::isFirstVisiblePositionInNode):
1328         (WebCore::isLastVisiblePositionInNode):
1329         * editing/VisiblePosition.h:
1330         * editing/htmlediting.cpp:
1331         (WebCore::firstInSpecialElement):
1332         (WebCore::lastInSpecialElement):
1333         (WebCore::visiblePositionBeforeNode):
1334         (WebCore::visiblePositionAfterNode):
1335         * editing/visible_units.cpp:
1336         (WebCore::startPositionForLine):
1337         (WebCore::endPositionForLine):
1338         (WebCore::previousLinePosition):
1339         (WebCore::nextLinePosition):
1340         (WebCore::startOfParagraph):
1341         (WebCore::endOfParagraph):
1342         (WebCore::endOfBlock):
1343         (WebCore::startOfDocument):
1344         (WebCore::endOfDocument):
1345         (WebCore::logicalStartPositionForLine):
1346         (WebCore::logicalEndPositionForLine):
1347         * page/DOMSelection.cpp:
1348         (WebCore::DOMSelection::collapse):
1349         (WebCore::DOMSelection::setBaseAndExtent):
1350         (WebCore::DOMSelection::setPosition):
1351         (WebCore::DOMSelection::extend):
1352         * page/EventHandler.cpp:
1353         (WebCore::EventHandler::handleMousePressEventSingleClick):
1354         * rendering/RenderObject.cpp:
1355         (WebCore::RenderObject::createVisiblePosition):
1356         * rendering/RenderTextControl.cpp:
1357         (WebCore::RenderTextControl::visiblePositionForIndex):
1358         * svg/SVGTextContentElement.cpp:
1359         (WebCore::SVGTextContentElement::selectSubString):
1360
1361 2011-02-08  Jia Pu  <jpu@apple.com>
1362
1363         Reviewed by Darin Adler.
1364
1365         VisibleSelection::setWithoutValidation() should allow caret selection.
1366         https://bugs.webkit.org/show_bug.cgi?id=53943
1367
1368         Test: editing/undo/undo-paste-when-caret-is-not-in-range.html
1369
1370         * editing/VisibleSelection.cpp:
1371         (WebCore::VisibleSelection::setWithoutValidation):
1372
1373 2011-02-08  Martin Robinson  <mrobinson@igalia.com>
1374
1375         Reviewed by Xan Lopez.
1376
1377         [GTK] Remove the last remnants of the Mozilla theme drawing code
1378         https://bugs.webkit.org/show_bug.cgi?id=54035
1379
1380         Remove all Mozilla theme drawing code.
1381
1382         No new tests. This change only removes dead code.
1383
1384         * GNUmakefile.am: Remove Mozilla files from the source list.
1385         * platform/gtk/RenderThemeGtk.h: Remove Mozilla-theme-drawing-related methods
1386         and add m_colormap to hold the current colormap of the widgets.
1387         * platform/gtk/RenderThemeGtk2.cpp: Remove Mozilla code.
1388         (WebCore::RenderThemeGtk::platformInit): Ditto.
1389         (WebCore::RenderThemeGtk::~RenderThemeGtk): Ditto.
1390         (WebCore::RenderThemeGtk::gtkContainer): Ditto.
1391         * platform/gtk/ScrollbarThemeGtk2.cpp: Ditto.
1392         * platform/gtk/WidgetRenderingContext.cpp: Ditto.
1393         (WebCore::WidgetRenderingContext::WidgetRenderingContext): Ditto.
1394         * platform/gtk/WidgetRenderingContext.h: Ditto.
1395         * platform/gtk/gtk2drawing.c: Removed.
1396         * platform/gtk/gtkdrawing.h: Removed.
1397
1398 2011-02-08  Yael Aharon  <yael.aharon@nokia.com>
1399
1400         Reviewed by Antti Koivisto.
1401
1402         Crash when logging into gmail.com with frame flattening turned on.
1403         https://bugs.webkit.org/show_bug.cgi?id=52449
1404
1405         Frame flattening algorithm requires that layout always starts from the main frame, since layout of
1406         subframes impacts the layout of their parents. 
1407         There are places in the code that call view->layout() not on the main frame.
1408         Instead of changing all the callsites, I changed FrameView::layout()
1409         to force layout from the main frame if frame flattening is enabled.
1410         In addition, postLayoutTasks can trigger relayout, so make it use the timer even more.
1411         Move the call to SelectionController::updateAppearance() to performPostLayoutTasks(), 
1412         because calling the from layout() leads to a crash in pages that have a selection in an iframe.
1413
1414         Tests: fast/frames/flattening/iframe-flattening-crash.html
1415                fast/frames/flattening/iframe-flattening-selection-crash.html
1416
1417         * page/FrameView.cpp:
1418         (WebCore::FrameView::layout):
1419         (WebCore::FrameView::performPostLayoutTasks):
1420
1421 2011-02-08  Andy Estes  <aestes@apple.com>
1422
1423         Reviewed by Darin Adler.
1424
1425         <rdar://problem/8913952> REGRESSION (r76301): 'plaintext-only' must be
1426         a supported contentEditable mode.
1427         https://bugs.webkit.org/show_bug.cgi?id=54041
1428
1429         * html/HTMLElement.cpp:
1430         (WebCore::HTMLElement::setContentEditable): Setting the contentEditable
1431         attribute to 'plaintext-only' should not throw an exception.
1432
1433 2011-02-08  Dan Bernstein  <mitz@apple.com>
1434
1435         Reviewed by Simon Fraser.
1436
1437         RenderRubyRun::m_beingDestroyed is redundant
1438         https://bugs.webkit.org/show_bug.cgi?id=54042
1439
1440         * rendering/RenderRubyRun.cpp:
1441         (WebCore::RenderRubyRun::RenderRubyRun): Removed intialization of m_beingDestroyed.
1442         (WebCore::RenderRubyRun::removeChild): Use the base class beingDestroyed(). 
1443         * rendering/RenderRubyRun.h:
1444
1445 2011-02-08  Levi Weintraub  <leviw@chromium.org>
1446
1447         Reviewed by Ryosuke Niwa.
1448
1449         Stop instantiating legacy editing Positions in VisiblePosition
1450         https://bugs.webkit.org/show_bug.cgi?id=52919
1451
1452         Changing VisiblePosition completely away from legacy positions.
1453
1454         No new tests since this is functionaly equivalent.
1455
1456         * WebCore.exp.in: Removing the legacy VisiblePosition constructor and
1457         adding the PositionIsOffsetInAnchor symbol. If we must create VisiblePositions
1458         outside of WebCore, they should be parent anchored.
1459         * accessibility/AXObjectCache.cpp:
1460         (WebCore::AXObjectCache::visiblePositionForTextMarkerData):
1461         * accessibility/AccessibilityObject.cpp:
1462         (WebCore::startOfStyleRange):
1463         (WebCore::endOfStyleRange):
1464         * accessibility/AccessibilityRenderObject.cpp:
1465         (WebCore::AccessibilityRenderObject::visiblePositionForIndex):
1466         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
1467         (objectAndOffsetUnignored):
1468         * dom/Position.cpp:
1469         (WebCore::Position::upstream): Fixed to correctly respect PositionIsAfterAnchor
1470         (WebCore::Position::downstream): ditto
1471         * dom/Range.cpp:
1472         (WebCore::Range::editingStartPosition):
1473         * editing/Editor.cpp:
1474         (WebCore::Editor::canDeleteRange):
1475         * editing/ReplaceSelectionCommand.cpp:
1476         (WebCore::ReplaceSelectionCommand::doApply):
1477         * editing/SelectionController.cpp:
1478         (WebCore::SelectionController::selectFrameElementInParentIfFullySelected):
1479         (WebCore::SelectionController::setSelectedRange):
1480         * editing/TextIterator.cpp:
1481         (WebCore::TextIterator::shouldRepresentNodeOffsetZero):
1482         * editing/TypingCommand.cpp:
1483         (WebCore::TypingCommand::deleteKeyPressed):
1484         * editing/VisiblePosition.cpp:
1485         (WebCore::VisiblePosition::leftVisuallyDistinctCandidate):
1486         (WebCore::VisiblePosition::rightVisuallyDistinctCandidate):
1487         (WebCore::VisiblePosition::canonicalPosition):
1488         (WebCore::VisiblePosition::characterAfter):
1489         (WebCore::VisiblePosition::localCaretRect):
1490         (WebCore::makeRange):
1491         (WebCore::startVisiblePosition):
1492         (WebCore::endVisiblePosition):
1493         (WebCore::setStart):
1494         (WebCore::setEnd):
1495         (WebCore::isFirstVisiblePositionInNode):
1496         (WebCore::isLastVisiblePositionInNode):
1497         * editing/VisiblePosition.h:
1498         (WebCore::VisiblePosition::VisiblePosition):
1499         * editing/htmlediting.cpp:
1500         (WebCore::firstInSpecialElement):
1501         (WebCore::lastInSpecialElement):
1502         (WebCore::visiblePositionBeforeNode):
1503         (WebCore::visiblePositionAfterNode):
1504         * editing/visible_units.cpp:
1505         (WebCore::startPositionForLine):
1506         (WebCore::endPositionForLine):
1507         (WebCore::previousLinePosition):
1508         (WebCore::nextLinePosition):
1509         (WebCore::startOfParagraph):
1510         (WebCore::endOfParagraph):
1511         (WebCore::endOfBlock):
1512         (WebCore::startOfDocument):
1513         (WebCore::endOfDocument):
1514         (WebCore::logicalStartPositionForLine):
1515         (WebCore::logicalEndPositionForLine):
1516         * page/DOMSelection.cpp:
1517         (WebCore::DOMSelection::collapse):
1518         (WebCore::DOMSelection::setBaseAndExtent):
1519         (WebCore::DOMSelection::setPosition):
1520         (WebCore::DOMSelection::extend):
1521         * page/EventHandler.cpp:
1522         (WebCore::EventHandler::handleMousePressEventSingleClick):
1523         * rendering/RenderObject.cpp:
1524         (WebCore::RenderObject::createVisiblePosition):
1525         * rendering/RenderTextControl.cpp:
1526         (WebCore::RenderTextControl::visiblePositionForIndex):
1527         * svg/SVGTextContentElement.cpp:
1528         (WebCore::SVGTextContentElement::selectSubString):
1529
1530 2011-02-08  Michael Saboff  <msaboff@apple.com>
1531
1532         JSC::Bindings m_rootObject->isValid() assert fails when running layout tests
1533         https://bugs.webkit.org/show_bug.cgi?id=53716
1534
1535         Changed ASSERT to be an if for the case where the RuntimeObject was
1536         GC'ed before RootObject::invalidate is called.  In that case there is 
1537         no need to remove the RuntimeObject from the RootObject.  The isValid()
1538         call will be false in this case, but the RuntimeObject has already
1539         been removed from the RootObject.  Added similar defensive code
1540         in RootObject::removeRuntimeObject().
1541
1542         * bridge/jsc/BridgeJSC.cpp:
1543         (JSC::Bindings::Instance::willDestroyRuntimeObject):
1544         * bridge/runtime_root.cpp:
1545         (JSC::Bindings::RootObject::removeRuntimeObject):
1546
1547 2011-02-08  Beth Dakin  <bdakin@apple.com>
1548
1549         Reviewed by Darin Adler.
1550
1551         Fix for <rdar://problem/8953365> CrashTracer: 14 
1552         crashes in WebProcess at com.apple.WebCore: 
1553         -[ScrollKnobAnimation setCurrentProgress:] + 258
1554
1555         This crash seems to happen when the animation is running
1556         and a window is closed. If the ScrollAnimator is destroyed,
1557         delegate calls for the animation can still run, so we have 
1558         to make sure we inform the delegates when the ScrollAnimator 
1559         is gone, and then we have to null-check it before we do 
1560         anything with it.
1561
1562         Remove scrollbarPainterDelegate() since it's not used anymore.
1563         * platform/mac/ScrollAnimatorMac.h:
1564         * platform/mac/ScrollAnimatorMac.mm:
1565         
1566         Add null-checks for _animator
1567         (-[ScrollbarPartAnimation setCurrentProgress:]):
1568         (-[ScrollbarPartAnimation scrollAnimatorDestroyed]):
1569         (-[ScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
1570         (-[ScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]):
1571         (-[ScrollbarPainterDelegate scrollerImp:overlayScrollerStateChangedTo:]):
1572         
1573         New function to inform the delegates that the ScrollAnimator
1574         is being destroyed.
1575         (-[ScrollbarPainterDelegate scrollAnimatorDestroyed]):
1576         (WebCore::ScrollAnimatorMac::~ScrollAnimatorMac):
1577
1578 2011-02-08  Adam Barth  <abarth@webkit.org>
1579
1580         Reviewed by Eric Seidel.
1581
1582         Remove orphan code from old parser
1583         https://bugs.webkit.org/show_bug.cgi?id=53984
1584
1585         This code appears to be unused.
1586
1587         * html/HTMLParserErrorCodes.cpp:
1588         * html/HTMLParserErrorCodes.h:
1589         * html/HTMLParserQuirks.h:
1590         * loader/EmptyClients.h:
1591         * page/ChromeClient.h:
1592
1593 2011-02-08  Martin Robinson  <mrobinson@igalia.com>
1594
1595         Reviewed by Gustavo Noronha Silva.
1596
1597         [GTK] Move scrollbar rendering out of gtk2drawing.c
1598         https://bugs.webkit.org/show_bug.cgi?id=52836
1599
1600         Replace gtk2drawing.c scrollbar rendering with our own version. This
1601         is the last use of the Mozilla theme drawing code.
1602
1603         No new tests. This should not change the rendering of the default
1604         theme.
1605
1606         * platform/gtk/GtkVersioning.h: Add some more backported allocation setters.
1607         * platform/gtk/RenderThemeGtk.h: Add a getter for the scrollbar widgets.
1608         * platform/gtk/RenderThemeGtk2.cpp:  Initialize and add getters for scrollbar widgets.
1609         (WebCore::RenderThemeGtk::platformInit): Ditto.
1610         (WebCore::RenderThemeGtk::gtkHScrollbar): Ditto.
1611         (WebCore::RenderThemeGtk::gtkVScrollbar): Ditto.
1612         * platform/gtk/ScrollbarThemeGtk.cpp: 
1613         (WebCore::ScrollbarThemeGtk::paint): We only repaint the scrolled
1614         window background if we are repainting a button or the thumb. In that
1615         case also repaint the track rect.
1616         * platform/gtk/ScrollbarThemeGtk2.cpp: Port to WidgetRenderingContext.
1617         (WebCore::ScrollbarThemeGtk::ScrollbarThemeGtk): Ditto.
1618         (WebCore::ScrollbarThemeGtk::updateThemeProperties): Ditto.
1619         (WebCore::getWidgetForScrollbar): Ditto.
1620         (WebCore::ScrollbarThemeGtk::paintTrackBackground): Ditto.
1621         (WebCore::ScrollbarThemeGtk::paintScrollbarBackground): Ditto.
1622         (WebCore::ScrollbarThemeGtk::paintThumb): Ditto.
1623         (WebCore::ScrollbarThemeGtk::paintButton): Ditto.
1624         * platform/gtk/WidgetRenderingContext.cpp: Ditto.
1625         (WebCore::WidgetRenderingContext::gtkPaintBox): Added an option which
1626         also adjusts a widget allocation according to the paint rect. This is
1627         necessary to properly draw scrollbar buttons.
1628         * platform/gtk/WidgetRenderingContext.h: Ditto.
1629
1630 2011-02-08  Simon Fraser  <simon.fraser@apple.com>
1631
1632         Reviewed by Dan Bernstein.
1633
1634         Inset shadow with large offset renders incorrectly
1635         https://bugs.webkit.org/show_bug.cgi?id=53882
1636         
1637         Fix an issue with inset shadows, when the shadow offset
1638         was larger than the box size. In this case we'd fail to
1639         fill the box with the shadow color.
1640
1641         Test: fast/box-shadow/inset-shadow-large-offset.html
1642
1643         * rendering/RenderBoxModelObject.cpp:
1644         (WebCore::areaCastingShadowInHole): Return a rect that covers the area
1645         which contributes to the inset shadow.
1646         
1647         (WebCore::RenderBoxModelObject::paintBoxShadow): Use areaCastingShadowInHole()
1648         to compute the outerRect.
1649
1650 2011-02-08  Zhenyao Mo  <zmo@google.com>
1651
1652         Reviewed by Kenneth Russell.
1653
1654         drawElements should check if a buffer is bound to ELEMENT_ARRAY_BUFFER
1655         https://bugs.webkit.org/show_bug.cgi?id=54017
1656
1657         * html/canvas/WebGLRenderingContext.cpp:
1658         (WebCore::WebGLRenderingContext::drawElements):
1659
1660 2011-01-28  Dimitri Glazkov  <dglazkov@chromium.org>
1661
1662         Reviewed by Darin Adler.
1663
1664         Change the rest of HTMLMediaElement shadow DOM parts to use shadowPseudoId.
1665         https://bugs.webkit.org/show_bug.cgi?id=53190
1666
1667         This is the second part of refactoring the HTMLMediaElement to use new
1668         shadow DOM. The changes are mainly mechanical, except for needing to
1669         add a new method to RenderTheme, which indicates whether or not status
1670         display is being used by it. Previously, we relied on existence of a cached
1671         pseudo style.
1672
1673         Refactoring, covered by existing tests.
1674
1675         * css/CSSSelector.cpp:
1676         (WebCore::CSSSelector::pseudoId): Removed now-unused enum values.
1677         (WebCore::nameToPseudoTypeMap): Ditto.
1678         (WebCore::CSSSelector::extractPseudoType): Ditto.
1679         * css/CSSSelector.h: Ditto.
1680         * html/shadow/MediaControls.cpp:
1681         (WebCore::MediaControls::createPanel): Changed to use the newly-added MediaControlPanelElement.
1682         (WebCore::MediaControls::createCurrentTimeDisplay): Changed to use the newly-added
1683             MediaControlCurrentTimeDisplayElement.
1684         (WebCore::MediaControls::createTimeRemainingDisplay): Changed to use the newly-added
1685                 MediaControlTimeRemainingDisplayElement.
1686         * rendering/MediaControlElements.cpp:
1687         (WebCore::MediaControlShadowRootElement::updateStyle): Changed to use the
1688             standard style resolution.
1689         (WebCore::MediaControlShadowRootElement::shadowPseudoId): Added.
1690         (WebCore::MediaControlElement::MediaControlElement): Removed the switch statement
1691             that is no longer necessary.
1692         (WebCore::MediaControlElement::styleForElement): Changed to use the standard
1693             style resolution.
1694         (WebCore::MediaControlPanelElement::MediaControlPanelElement): Added.
1695         (WebCore::MediaControlPanelElement::create): Added.
1696         (WebCore::MediaControlPanelElement::displayType): Added.
1697         (WebCore::MediaControlPanelElement::shadowPseudoId): Added.
1698         (WebCore::MediaControlTimelineContainerElement::MediaControlTimelineContainerElement):
1699             Removed PseudoId constructor arg.
1700         (WebCore::MediaControlTimelineContainerElement::rendererIsNeeded):
1701             Changed to use the newly-plumbed usesMediaControlStatusDisplay helper.
1702         (WebCore::MediaControlTimelineContainerElement::displayType): Added.
1703         (WebCore::MediaControlTimelineContainerElement::shadowPseudoId): Added.
1704         (WebCore::MediaControlVolumeSliderContainerElement::MediaControlVolumeSliderContainerElement):
1705             Removed PseudoId constructor arg.
1706         (WebCore::MediaControlVolumeSliderContainerElement::displayType): Added.
1707         (WebCore::MediaControlVolumeSliderContainerElement::shadowPseudoId): Added.
1708         (WebCore::MediaControlStatusDisplayElement::MediaControlStatusDisplayElement):
1709             Removed PseudoId constructor arg.
1710         (WebCore::MediaControlStatusDisplayElement::rendererIsNeeded): Changed to
1711             use the newly-plumbed usesMediaControlStatusDisplay helper.
1712         (WebCore::MediaControlStatusDisplayElement::displayType): Added.
1713         (WebCore::MediaControlStatusDisplayElement::shadowPseudoId): Added.
1714         (WebCore::MediaControlTimeDisplayElement::MediaControlTimeDisplayElement):
1715             Removed PseudoId constructor arg.
1716         (WebCore::MediaControlTimeRemainingDisplayElement::create): Added.
1717         (WebCore::MediaControlTimeRemainingDisplayElement::MediaControlTimeRemainingDisplayElement): Added.
1718         (WebCore::MediaControlTimeRemainingDisplayElement::displayType): Added.
1719         (WebCore::MediaControlTimeRemainingDisplayElement::shadowPseudoId): Added.
1720         (WebCore::MediaControlCurrentTimeDisplayElement::create): Added.
1721         (WebCore::MediaControlCurrentTimeDisplayElement::MediaControlCurrentTimeDisplayElement): Added.
1722         (WebCore::MediaControlCurrentTimeDisplayElement::displayType): Added.
1723         (WebCore::MediaControlCurrentTimeDisplayElement::shadowPseudoId): Added.
1724         * rendering/MediaControlElements.h: Added/changed defs accordingly.
1725         * rendering/RenderTheme.h:
1726         (WebCore::RenderTheme::usesMediaControlStatusDisplay): Added.
1727         * rendering/RenderThemeMac.h: Added def.
1728         * rendering/RenderThemeMac.mm:
1729         (WebCore::RenderThemeMac::usesMediaControlStatusDisplay): Added.
1730         * rendering/style/RenderStyleConstants.h: Removed now-unused enum values.
1731
1732 2011-02-08  Xiaomei Ji  <xji@chromium.org>
1733
1734         Reviewed by Dan Bernstein.
1735
1736         Fix pop-up button text not rendered correctly according to its direction
1737         in <option>.
1738         https://bugs.webkit.org/show_bug.cgi?id=53642
1739  
1740         In adjustInnerStyle(), if m_innerBlock's direction or unicode-bidi 
1741         changes, set it needs layout.
1742
1743         Test: fast/text/international/pop-up-button-text-alignment-and-direction.html
1744
1745         * rendering/RenderMenuList.cpp:
1746         (WebCore::RenderMenuList::adjustInnerStyle):
1747
1748 2011-02-08  Ilya Tikhonovsky  <loislo@chromium.org>
1749
1750         Unreviewed build fix for Qt-minimal.
1751
1752         * inspector/InspectorInstrumentation.h:
1753         (WebCore::InspectorInstrumentation::hasFrontend):
1754
1755 2011-02-02  Ilya Tikhonovsky  <loislo@chromium.org>
1756
1757         Reviewed by Yury Semikhatsky.
1758
1759         Web Inspector: move InspectorController's methods from InspectorAgent to InspectorController.
1760
1761         https://bugs.webkit.org/show_bug.cgi?id=53169
1762
1763         All the Inspector API for WebCore has two parts.
1764         The first one is InspectorInstrumentation for WebCore.
1765         The second is InspectorController for WebKit.
1766         InspectorAgent was produced by renaming original InspectorController.
1767         This patch extracts WebKit related methods from InspectorAgent to InspectorController.
1768
1769         * WebCore.exp.in:
1770         * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
1771         * html/HTMLDocument.cpp:
1772         (WebCore::HTMLDocument::createParser):
1773         * inspector/InspectorAgent.cpp:
1774         (WebCore::InspectorAgent::InspectorAgent):
1775         (WebCore::InspectorAgent::~InspectorAgent):
1776         (WebCore::InspectorAgent::restoreInspectorStateFromCookie):
1777         (WebCore::InspectorAgent::inspect):
1778         (WebCore::InspectorAgent::handleMousePress):
1779         (WebCore::InspectorAgent::didClearWindowObjectInWorld):
1780         (WebCore::InspectorAgent::setFrontend):
1781         (WebCore::InspectorAgent::disconnectFrontend):
1782         (WebCore::InspectorAgent::resourceAgent):
1783         (WebCore::InspectorAgent::createFrontendLifetimeAgents):
1784         (WebCore::InspectorAgent::releaseFrontendLifetimeAgents):
1785         (WebCore::InspectorAgent::populateScriptObjects):
1786         (WebCore::InspectorAgent::pushDataCollectedOffline):
1787         (WebCore::InspectorAgent::restoreProfiler):
1788         (WebCore::InspectorAgent::startTimelineProfiler):
1789         (WebCore::PostWorkerNotificationToFrontendTask::performTask):
1790         (WebCore::InspectorAgent::didOpenDatabase):
1791         (WebCore::InspectorAgent::didUseDOMStorage):
1792         (WebCore::InspectorAgent::showAndEnableDebugger):
1793         (WebCore::InspectorAgent::enableDebugger):
1794         (WebCore::InspectorAgent::enabled):
1795         * inspector/InspectorAgent.h:
1796         (WebCore::InspectorAgent::frontend):
1797         * inspector/InspectorController.cpp:
1798         (WebCore::InspectorController::InspectorController):
1799         (WebCore::InspectorController::~InspectorController):
1800         (WebCore::InspectorController::setInspectorFrontendClient):
1801         (WebCore::InspectorController::hasInspectorFrontendClient):
1802         (WebCore::InspectorController::didClearWindowObjectInWorld):
1803         (WebCore::InspectorController::startTimelineProfiler):
1804         (WebCore::InspectorController::stopTimelineProfiler):
1805         (WebCore::InspectorController::connectFrontend):
1806         (WebCore::InspectorController::disconnectFrontend):
1807         (WebCore::InspectorController::disconnectFrontendImpl):
1808         (WebCore::InspectorController::show):
1809         (WebCore::InspectorController::close):
1810         (WebCore::InspectorController::restoreInspectorStateFromCookie):
1811         (WebCore::InspectorController::evaluateForTestInFrontend):
1812         (WebCore::InspectorController::drawNodeHighlight):
1813         (WebCore::InspectorController::inspect):
1814         (WebCore::InspectorController::enabled):
1815         (WebCore::InspectorController::showPanel):
1816         (WebCore::InspectorController::frontendLoaded):
1817         (WebCore::InspectorController::timelineProfilerEnabled):
1818         (WebCore::InspectorController::enableProfiler):
1819         (WebCore::InspectorController::disableProfiler):
1820         (WebCore::InspectorController::profilerEnabled):
1821         (WebCore::InspectorController::debuggerEnabled):
1822         (WebCore::InspectorController::showAndEnableDebugger):
1823         (WebCore::InspectorController::disableDebugger):
1824         (WebCore::InspectorController::startUserInitiatedProfiling):
1825         (WebCore::InspectorController::stopUserInitiatedProfiling):
1826         (WebCore::InspectorController::isRecordingUserInitiatedProfile):
1827         (WebCore::InspectorController::setInspectorExtensionAPI):
1828         (WebCore::InspectorController::resume):
1829         (WebCore::InspectorController::hideHighlight):
1830         (WebCore::InspectorController::dispatchMessageFromFrontend):
1831         * inspector/InspectorController.h:
1832         (WebCore::InspectorController::inspectorClient):
1833         (WebCore::InspectorController::inspectedPage):
1834         (WebCore::InspectorController::hasFrontend):
1835         * inspector/InspectorFrontendClientLocal.cpp:
1836         (WebCore::InspectorFrontendClientLocal::sendMessageToBackend):
1837         * inspector/InspectorFrontendHost.cpp:
1838         (WebCore::InspectorFrontendHost::setExtensionAPI):
1839         * inspector/InspectorInstrumentation.cpp:
1840         (WebCore::InspectorInstrumentation::didClearWindowObjectInWorldImpl):
1841         (WebCore::InspectorInstrumentation::profilerEnabledImpl):
1842         * inspector/InspectorInstrumentation.h:
1843         (WebCore::InspectorInstrumentation::hasFrontend):
1844         * loader/FrameLoader.cpp:
1845         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
1846
1847 2011-02-08  George Wright  <gwright@rim.com>
1848
1849         Reviewed by Adam Barth.
1850
1851         https://bugs.webkit.org/show_bug.cgi?id=53949
1852
1853         Ensure that we pack the colour byte order correctly for Skia using
1854         Skia's SkPackARGB32 function.
1855
1856         * platform/image-decoders/ImageDecoder.h:
1857         (WebCore::ImageFrame::setRGBA):
1858
1859 2011-02-08  George Wright  <gwright@rim.com>
1860
1861         Reviewed by Darin Adler.
1862
1863         https://bugs.webkit.org/show_bug.cgi?id=53951
1864
1865         Ensure we do not pass (-1, -1) sized rects to ImageBuffer but instead
1866         pass the full image dimensions.
1867
1868         * platform/graphics/GraphicsContext.cpp:
1869         (WebCore::GraphicsContext::drawImageBuffer):
1870
1871 2011-02-08  Patrick Gansterer  <paroga@webkit.org>
1872
1873         Reviewed by Adam Roben.
1874
1875         [WIN] Add missing includes and forward declarations for DownloadBundle
1876         https://bugs.webkit.org/show_bug.cgi?id=53881
1877
1878         * platform/network/cf/DownloadBundle.h:
1879         * platform/network/win/DownloadBundleWin.cpp:
1880         (WebCore::DownloadBundle::appendResumeData):
1881
1882 2011-02-08  Patrick Gansterer  <paroga@webkit.org>
1883
1884         Reviewed by Adam Roben.
1885
1886         [WIN] Add missing include in WKCAImageQueue
1887         https://bugs.webkit.org/show_bug.cgi?id=53890
1888
1889         * platform/graphics/win/WKCAImageQueue.cpp:
1890
1891 2011-02-08  Patrick Gansterer  <paroga@webkit.org>
1892
1893         Reviewed by Adam Roben.
1894
1895         [WIN] Add missing includes and forward declarations for CFNetwork
1896         https://bugs.webkit.org/show_bug.cgi?id=53883
1897
1898         * platform/network/cf/DNSCFNet.cpp:
1899         * platform/network/cf/LoaderRunLoopCF.cpp:
1900         * platform/network/cf/LoaderRunLoopCF.h:
1901         * platform/network/cf/ProxyServerCFNet.cpp:
1902         * platform/network/cf/SocketStreamHandle.h:
1903         * platform/network/cf/SocketStreamHandleCFNet.cpp:
1904
1905 2011-02-08  Patrick Gansterer  <paroga@webkit.org>
1906
1907         Unreviewed WinCE build fix for r77870.
1908
1909         * platform/DragImage.cpp: Enable createDragImageForLink for WinCE.
1910
1911 2011-02-08  Pavel Feldman  <pfeldman@chromium.org>
1912
1913         Reviewed by Yury Semikhatsky.
1914
1915         Web Inspector: open network resource url in new tab upon double click.
1916         https://bugs.webkit.org/show_bug.cgi?id=53930
1917
1918         * inspector/front-end/NetworkPanel.js:
1919         (WebInspector.NetworkDataGridNode.prototype.createCells):
1920         (WebInspector.NetworkDataGridNode.prototype._openInNewTab):
1921
1922 2011-02-08  Yonathan Randolph  <yonathan@gmail.com>
1923
1924         Reviewed by Pavel Feldman.
1925
1926         Web Inspector: $x: any node should work in optional context parameter.
1927         https://bugs.webkit.org/show_bug.cgi?id=50138
1928
1929         * inspector/InjectedScriptSource.js:
1930
1931 2011-02-08  Patrick Gansterer  <paroga@webkit.org>
1932
1933         Unreviewed WinCE build fix for r77870.
1934
1935         Remove the global namespace prefix from GlobalLock/GlobalUnlock.
1936
1937         * platform/win/ClipboardUtilitiesWin.cpp:
1938
1939 2011-02-08  Pavel Feldman  <pfeldman@chromium.org>
1940
1941         Not reviewed: re-apply r77924.
1942
1943         Test: inspector/console-api-on-call-frame.html
1944
1945         * inspector/InjectedScriptSource.js:
1946         * inspector/front-end/ExtensionServer.js:
1947         (WebInspector.ExtensionServer.prototype._onEvaluateOnInspectedPage):
1948
1949 2011-02-08  Andreas Kling  <kling@webkit.org>
1950
1951         Reviewed by Tor Arne Vestbø.
1952
1953         REGRESSION(r77312): Unbreak TiledBackingStore.
1954
1955         Due to an off-by-one error, we were no longer rendering the
1956         rightmost column and bottom row of tiles.
1957
1958         Covered by tst_QGraphicsWebView::widgetsRenderingThroughCache().
1959
1960         * platform/graphics/TiledBackingStore.cpp:
1961         (WebCore::TiledBackingStore::invalidate):
1962         (WebCore::TiledBackingStore::updateTileBuffers):
1963         (WebCore::TiledBackingStore::paint):
1964         (WebCore::TiledBackingStore::createTiles):
1965
1966 2011-02-08  Sheriff Bot  <webkit.review.bot@gmail.com>
1967
1968         Unreviewed, rolling out r77924.
1969         http://trac.webkit.org/changeset/77924
1970         https://bugs.webkit.org/show_bug.cgi?id=53997
1971
1972         Breaks inspector tests. (Requested by pfeldman on #webkit).
1973
1974         * inspector/InjectedScriptSource.js:
1975         (.):
1976         ():
1977
1978 2011-02-08  Andrey Kosyakov  <caseq@chromium.org>
1979
1980         Reviewed by Pavel Feldman.
1981
1982         Web Inspector: [refacotring] merge InspectorAgent::willSendRequest() into InspectorResourceAgent
1983         https://bugs.webkit.org/show_bug.cgi?id=53789
1984          - perform UserAgent override via InspectorInstrumentation
1985          - move adding extra request headers to InspectorResourceAgent
1986          - simplified things in InspectorState
1987
1988         * inspector/Inspector.idl:
1989         * inspector/InspectorAgent.cpp:
1990         (WebCore::InspectorAgent::disconnectFrontend):
1991         (WebCore::InspectorAgent::applyUserAgentOverride):
1992         * inspector/InspectorAgent.h:
1993         * inspector/InspectorInstrumentation.cpp:
1994         (WebCore::InspectorInstrumentation::applyUserAgentOverrideImpl):
1995         (WebCore::InspectorInstrumentation::willSendRequestImpl):
1996         * inspector/InspectorInstrumentation.h:
1997         (WebCore::InspectorInstrumentation::applyUserAgentOverride):
1998         * inspector/InspectorResourceAgent.cpp:
1999         (WebCore::InspectorResourceAgent::setExtraHeaders):
2000         (WebCore::InspectorResourceAgent::willSendRequest):
2001         * inspector/InspectorResourceAgent.h:
2002         * inspector/InspectorState.cpp:
2003         (WebCore::InspectorState::InspectorState):
2004         (WebCore::InspectorState::restoreFromInspectorCookie):
2005         (WebCore::InspectorState::updateCookie):
2006         (WebCore::InspectorState::setValue):
2007         (WebCore::InspectorState::getBoolean):
2008         (WebCore::InspectorState::getString):
2009         (WebCore::InspectorState::getLong):
2010         (WebCore::InspectorState::getObject):
2011         * inspector/InspectorState.h:
2012         (WebCore::InspectorState::setObject):
2013         * loader/FrameLoader.cpp:
2014         (WebCore::FrameLoader::userAgent):
2015
2016 2011-02-08  Pavel Feldman  <pfeldman@chromium.org>
2017
2018         Reviewed by Yury Semikhatsky.
2019
2020         Web Inspector: do not hide scope variables with command line api.
2021         https://bugs.webkit.org/show_bug.cgi?id=53497
2022
2023         Test: inspector/console-api-on-call-frame.html
2024
2025         * inspector/InjectedScriptSource.js:
2026
2027 2011-02-08  Pavel Feldman  <pfeldman@chromium.org>
2028
2029         Reviewed by Yury Semikhatsky.
2030
2031         Web Inspector: ignore cache upon reload via Ctrl(Cmd)+Shift+R.
2032         https://bugs.webkit.org/show_bug.cgi?id=53914
2033
2034         * inspector/Inspector.idl:
2035         * inspector/InspectorAgent.cpp:
2036         (WebCore::InspectorAgent::reloadPage):
2037         * inspector/InspectorAgent.h:
2038         * inspector/front-end/AuditsPanel.js:
2039         (WebInspector.AuditsPanel.prototype._reloadResources):
2040         * inspector/front-end/ExtensionServer.js:
2041         (WebInspector.ExtensionServer.prototype._onReload):
2042         * inspector/front-end/inspector.js:
2043         (WebInspector.documentKeyDown):
2044
2045 2011-02-08  Antti Koivisto  <antti@apple.com>
2046
2047         Reviewed by Cameron Zwarich.
2048
2049         Skip over sibling selectors when collecting descendant selector hashes 
2050         https://bugs.webkit.org/show_bug.cgi?id=53987
2051         
2052         Skip instead of bailing out. This will allow optimizing some sibling selector cases.
2053
2054         * css/CSSStyleSelector.cpp:
2055         (WebCore::RuleData::RuleData):
2056         (WebCore::RuleData::collectIdentifierHashes):
2057         (WebCore::RuleData::collectDescendantSelectorIdentifierHashes):
2058         * css/CSSStyleSelector.h:
2059
2060 2011-02-07  Cris Neckar  <cdn@chromium.org>
2061
2062         Reviewed by Jian Li.
2063
2064         Fix null deref in DOMURL
2065         https://bugs.webkit.org/show_bug.cgi?id=53811
2066
2067         Test: fast/files/domurl-script-execution-context-crash.html
2068
2069         * html/DOMURL.cpp:
2070         (WebCore::DOMURL::DOMURL):
2071
2072 2011-02-07  Mark Rowe  <mrowe@apple.com>
2073
2074         Fix the 32-bit build.
2075
2076         * platform/mac/ScrollAnimatorMac.mm:
2077         (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar): Remove some extraneous characters.
2078         (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar): Ditto.
2079
2080 2011-02-07  Xiyuan Xia  <xiyuan@chromium.org>
2081
2082         Reviewed by Tony Chang.
2083
2084         [Chromium] Select popup box does not align with select button when appearance is not "menulist".
2085         https://bugs.webkit.org/show_bug.cgi?id=53942
2086
2087         Added manual test select_webkit_appearance_off_popup_alignment.html.
2088
2089         * manual-tests/select_webkit_appearance_off_popup_alignment.html: Added.
2090         * platform/chromium/PopupMenuChromium.cpp:
2091         (WebCore::PopupListBox::layout):
2092
2093 2011-02-07  Aparna Nandyal  <aparna.nand@wipro.com>
2094
2095         Reviewed by Andreas Kling.
2096
2097         [Qt] - Context menu needs "Copy" as well when the selected text is a link.
2098         https://bugs.webkit.org/show_bug.cgi?id=40983
2099
2100         Added copy option for Qt platform if selection is a link. 
2101         Added a test in tst_qwebpage.cpp. 
2102
2103         * page/ContextMenuController.cpp:
2104         (WebCore::ContextMenuController::populate):
2105
2106 2011-02-07  Mike Reed  <reed@google.com>
2107
2108         Reviewed by Kenneth Russell.
2109
2110         Add compile-time flag ENABLE(SKIA_GPU) to use Skia's gpu backend
2111         when drawing <canvas>. Disabled by default.
2112
2113         No new tests. existing canvas layouttests apply
2114
2115         * platform/graphics/chromium/DrawingBufferChromium.cpp:
2116         (WebCore::DrawingBuffer::publishToPlatformLayer):
2117         * platform/graphics/skia/PlatformContextSkia.cpp:
2118         (WebCore::GetGlobalGrContext):
2119         (WebCore::PlatformContextSkia::isPrinting):
2120         (WebCore::PlatformContextSkia::setSharedGraphicsContext3D):
2121         (WebCore::PlatformContextSkia::syncSoftwareCanvas):
2122
2123 2011-02-07  Jay Civelli  <jcivelli@chromium.org>
2124
2125         Reviewed by Darin Fisher.
2126
2127         Removing unused code from PopupMenuChromium.
2128         https://bugs.webkit.org/show_bug.cgi?id=53866
2129
2130        * platform/chromium/PopupMenuChromium.cpp:
2131         (WebCore::PopupListBox::layout):
2132         (WebCore::PopupMenuChromium::show):
2133         * platform/chromium/PopupMenuChromium.h:
2134
2135 2011-02-07  Kenichi Ishibashi  <bashi@chromium.org>
2136
2137         Reviewed by Andreas Kling.
2138
2139         HTMLOutputElement::childrenChanged() should call its base class childrenChanged()
2140         https://bugs.webkit.org/show_bug.cgi?id=53791
2141
2142         Calls HTMLFormControlElement::childrenChanged() in HTMLOutputElement::childrenChanged().
2143
2144         Test: fast/dom/HTMLOutputElement/htmloutputelement-children-removed.html
2145
2146         * html/HTMLOutputElement.cpp:
2147         (WebCore::HTMLOutputElement::childrenChanged): Calls super class's
2148         childrenChanged().
2149
2150 2011-02-07  Benjamin Poulain  <ikipou@gmail.com>
2151
2152         Reviewed by Kenneth Rohde Christiansen.
2153
2154         [Qt] cookiesEnabled could create the cookieJar on the wrong thread.
2155         https://bugs.webkit.org/show_bug.cgi?id=52289
2156
2157         Use the QtNAMThreadSafeProxy to make sure the cookie jar is created
2158         in the same thread as the QNetworkAccessManager.
2159
2160         * platform/network/qt/QtNAMThreadSafeProxy.cpp:
2161         (WebCore::QtNAMThreadSafeProxy::QtNAMThreadSafeProxy):
2162         (WebCore::QtNAMThreadSafeProxy::hasCookieJar):
2163         * platform/network/qt/QtNAMThreadSafeProxy.h:
2164         * platform/qt/CookieJarQt.cpp:
2165         (WebCore::cookiesEnabled):
2166
2167 2011-02-07  Alexey Marinichev  <amarinichev@chromium.org>
2168
2169         Reviewed by Kenneth Russell.
2170
2171         Hook up WebGraphicsContext3D::setContextLostCallback.
2172         https://bugs.webkit.org/show_bug.cgi?id=53722
2173
2174         Test: fast/canvas/webgl/context-lost.html, comment out the line with
2175         extension.loseContext() and kill the GPU process "Lose context"
2176         message shows up.
2177
2178         * html/canvas/WebGLRenderingContext.cpp:
2179         (WebCore::WebGLRenderingContextLostCallback::WebGLRenderingContextLostCallback):
2180         (WebCore::WebGLRenderingContextLostCallback::onContextLost):
2181         (WebCore::WebGLRenderingContextLostCallback::~WebGLRenderingContextLostCallback):
2182         (WebCore::WebGLRenderingContext::initializeNewContext):
2183         (WebCore::WebGLRenderingContext::~WebGLRenderingContext):
2184         * platform/graphics/GraphicsContext3D.h:
2185         (WebCore::GraphicsContext3D::ContextLostCallback::~ContextLostCallback):
2186         * platform/graphics/mac/GraphicsContext3DMac.mm:
2187         (WebCore::GraphicsContext3D::setContextLostCallback): stub
2188         * platform/graphics/qt/GraphicsContext3DQt.cpp:
2189         (WebCore::GraphicsContext3D::setContextLostCallback): stub
2190
2191 2011-02-07  Patrick Gansterer  <paroga@webkit.org>
2192
2193         Reviewed by Eric Seidel.
2194
2195         Add missing PaintInfo include in RenderThemeWin.cpp
2196         https://bugs.webkit.org/show_bug.cgi?id=53885
2197
2198         * rendering/RenderThemeWin.cpp:
2199
2200 2011-02-07  Qi Zhang  <qi.2.zhang@nokia.com>
2201
2202         Reviewed by Andreas Kling.
2203
2204         [Qt] enum QWebPage::WebAction doesn't have value QWebPage::CopyImageUrl
2205         https://bugs.webkit.org/show_bug.cgi?id=52974
2206
2207         Add ContextMenuItemTagCopyImageUrlToClipboard into standard action but Qt platform specific.
2208
2209         * page/ContextMenuController.cpp:
2210         (WebCore::ContextMenuController::contextMenuItemSelected):
2211         (WebCore::ContextMenuController::populate):
2212         (WebCore::ContextMenuController::checkOrEnableIfNeeded):
2213         * platform/ContextMenuItem.h:
2214         * platform/LocalizationStrategy.h:
2215         * platform/LocalizedStrings.cpp:
2216         (WebCore::contextMenuItemTagCopyImageUrlToClipboard):
2217         * platform/LocalizedStrings.h:
2218
2219 2011-02-07  Kenichi Ishibashi  <bashi@chromium.org>
2220
2221         Reviewed by Kent Tamura.
2222
2223         HTMLFormElement::formElementIndex() returns a bad index into a vector of form associated elements
2224         https://bugs.webkit.org/show_bug.cgi?id=53970
2225
2226         Adds HTMLObjectElement::virtualForm() to make HTMLObjectElement::form()
2227         return the right value.
2228
2229         Test: fast/dom/HTMLObjectElement/form/nested-form-element.html
2230
2231         * html/HTMLObjectElement.cpp:
2232         (WebCore::HTMLObjectElement::virtualForm): Added.
2233         * html/HTMLObjectElement.h: Added virtualForm().
2234
2235 2011-02-07  Ryosuke Niwa  <rniwa@webkit.org>
2236
2237         Unreviewed Leopard build fix.
2238
2239         * WebCore.xcodeproj/project.pbxproj: let XCode have developmentRegion.
2240         * platform/mac/DragImageMac.mm:
2241         (WebCore::webkit_CGCeiling): Cast the return value of ceil to CGFloat.
2242
2243 2011-02-07  Enrica Casucci  <enrica@apple.com>
2244
2245         Reviewed by Sam Weinig.
2246
2247         Fixing a build break on Mac caused by http://trac.webkit.org/changeset/77874
2248
2249         When moving code from WebKit to WebCore we needed to move some additional
2250         functions previously in NSStringExtras.
2251         
2252         * WebCore.xcodeproj/project.pbxproj:
2253         * platform/mac/DragImageMac.mm:
2254         (WebCore::fontFromNSFont):
2255         (WebCore::canUseFastRenderer):
2256         (WebCore::widthWithFont):
2257         (WebCore::webkit_CGCeiling):
2258         (WebCore::drawAtPoint):
2259         (WebCore::drawDoubledAtPoint):
2260         (WebCore::createDragImageForLink):
2261
2262 2011-02-07  Lucas Forschler  <lforschler@apple.com>
2263
2264         Reviewed by Geoff Garen.
2265
2266         Tr #2, Fix the Leopard 32bit debug build.
2267         
2268         No new tests required.
2269
2270         * WebCore.xcodeproj/project.pbxproj:
2271         * accessibility/AccessibilityAllInOne.cpp:
2272
2273 2011-02-07  Beth Dakin  <bdakin@apple.com>
2274
2275         Reviewed by Sam Weinig.
2276
2277         Fix for <rdar://problem/8946961> Fix repaint problems
2278         with WKScrollbarPainter scrollers while resizing the window
2279
2280         Remove setPainterForPainterController() and 
2281         removePainterFromPainterController() since they aren't
2282         used anymore.
2283         * platform/mac/ScrollAnimatorMac.h:
2284         
2285         Return early if they alpha hasn't changed.
2286         * platform/mac/ScrollAnimatorMac.mm:
2287         (-[ScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
2288         (-[ScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]):
2289         
2290         If we're in a live resize, restore alpha to 1.
2291         (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
2292         (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
2293
2294 2011-02-07  Beth Dakin  <bdakin@apple.com>
2295
2296         Reviewed by Eric Seidel.
2297
2298         Fix for https://bugs.webkit.org/show_bug.cgi?id=53950
2299         USE_WK_SCROLLBAR_PAINTER in ScrollbarThemeMac should be in
2300         Platform.h instead
2301
2302         Use hot new USE(WK_SCROLLBAR_PAINTER) from Platform.h rather
2303         than the silly, old in-file #define.
2304
2305         * platform/mac/ScrollbarThemeMac.mm:
2306         (+[ScrollbarPrefsObserver appearancePrefsChanged:]):
2307         (WebCore::updateArrowPlacement):
2308         (WebCore::ScrollbarThemeMac::registerScrollbar):
2309         (WebCore::ScrollbarThemeMac::scrollbarThickness):
2310         (WebCore::ScrollbarThemeMac::usesOverlayScrollbars):
2311         (WebCore::ScrollbarThemeMac::hasThumb):
2312         (WebCore::ScrollbarThemeMac::minimumThumbLength):
2313         (WebCore::ScrollbarThemeMac::paint):
2314
2315 2011-02-07  Enrica Casucci  <enrica@apple.com>
2316
2317         Reviewed Adam Roben and Darin Adler.
2318
2319         WebKit2: drag and drop support on Windows.
2320         https://bugs.webkit.org/show_bug.cgi?id=52775
2321         <rdar://problem/8514409>
2322
2323         * loader/EmptyClients.h: Removed createDragImageFromLink.
2324         * page/DragClient.h: Ditto.
2325         * page/DragController.cpp:
2326         (WebCore::DragController::startDrag): changed call to createDragImageFromLink.
2327         * platform/DragImage.h:
2328         * platform/mac/DragImageMac.mm:
2329         (WebCore::createDragImageForLink): Moved from DragClient.
2330         * platform/win/ClipboardUtilitiesWin.cpp: Added a series of functions
2331         to de-serialize the drag data from the map into an IDataObject.
2332         (WebCore::getWebLocData):
2333         (WebCore::texthtmlFormat):
2334         (WebCore::createGlobalData):
2335         (WebCore::getFullCFHTML):
2336         (WebCore::urlWFormat):
2337         (WebCore::urlFormat):
2338         (WebCore::filenameWFormat):
2339         (WebCore::filenameFormat):
2340         (WebCore::htmlFormat):
2341         (WebCore::smartPasteFormat):
2342         (WebCore::getURL):
2343         (WebCore::getPlainText):
2344         (WebCore::getTextHTML):
2345         (WebCore::ClipboardDataItem::ClipboardDataItem):
2346         (WebCore::getStringData):
2347         (WebCore::getUtf8Data):
2348         (WebCore::getCFData):
2349         (WebCore::setUCharData):
2350         (WebCore::setCharData):
2351         (WebCore::setCFData):
2352         (WebCore::getClipboardMap):
2353         (WebCore::getClipboardData):
2354         (WebCore::setClipboardData):
2355         * platform/win/ClipboardUtilitiesWin.h:
2356         * platform/win/DragImageWin.cpp: Moved createDragImageForLink from DragClient
2357         to a platform specific file in WebCore. It makes a lot more sense here, since
2358         the drag image is always created in WebCore for all the other content types
2359         except for links.
2360         (WebCore::dragLabelFont):
2361         (WebCore::createDragImageForLink):
2362         * platform/win/WCDataObject.cpp: Added new way to
2363         construct a WCDataObject from a DragDataMap.
2364         (WebCore::WCDataObject::createInstance):
2365         (WebCore::WCDataObject::clearData):
2366         * platform/win/WCDataObject.h:
2367
2368 2011-02-07  Sheriff Bot  <webkit.review.bot@gmail.com>
2369
2370         Unreviewed, rolling out r77848.
2371         http://trac.webkit.org/changeset/77848
2372         https://bugs.webkit.org/show_bug.cgi?id=53963
2373
2374         caused 6 test failures (Requested by othermaciej on #webkit).
2375
2376         * rendering/RenderBlockLineLayout.cpp:
2377         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine):
2378
2379 2011-02-04  Kenneth Russell  <kbr@google.com>
2380
2381         Reviewed by James Robinson.
2382
2383         Add shaders for GPU accelerated path rendering
2384         https://bugs.webkit.org/show_bug.cgi?id=45520
2385
2386         Refactored SolidFillShader and TexShader to call new
2387         generateVertex() and generateFragment() methods on base Shader
2388         class, and added support for the Loop/Blinn shaders. Refactored
2389         Loop/Blinn shader classes to derive from Shader.
2390
2391         Tested these changes with several of the IE9 Testdrive demos with
2392         accelerated 2D canvas enabled, as well as a full layout test run
2393         with --platform chromium-gpu.
2394
2395         * platform/graphics/gpu/LoopBlinnShader.cpp: Added.
2396         (WebCore::LoopBlinnShader::LoopBlinnShader):
2397         (WebCore::LoopBlinnShader::use):
2398         * platform/graphics/gpu/LoopBlinnShader.h: Added.
2399         * platform/graphics/gpu/LoopBlinnSolidFillShader.cpp: Added.
2400         (WebCore::LoopBlinnSolidFillShader::create):
2401         (WebCore::LoopBlinnSolidFillShader::LoopBlinnSolidFillShader):
2402         (WebCore::LoopBlinnSolidFillShader::use):
2403         * platform/graphics/gpu/LoopBlinnSolidFillShader.h: Added.
2404         * platform/graphics/gpu/Shader.cpp:
2405         (WebCore::Shader::affineTo4x4):
2406         (WebCore::Shader::loadShader):
2407         (WebCore::Shader::loadProgram):
2408         (WebCore::Shader::generateVertex):
2409         (WebCore::Shader::generateFragment):
2410         * platform/graphics/gpu/Shader.h:
2411         * platform/graphics/gpu/SolidFillShader.cpp:
2412         (WebCore::SolidFillShader::create):
2413         * platform/graphics/gpu/TexShader.cpp:
2414         (WebCore::TexShader::TexShader):
2415         (WebCore::TexShader::create):
2416
2417 2011-02-07  Dan Bernstein  <mitz@apple.com>
2418
2419         Reviewed by Oliver Hunt.
2420
2421         <rdar://problem/8946023> REGRESSION (r76674): SVG + BiDi text broken (text-intro-05-t.svg)
2422         https://bugs.webkit.org/show_bug.cgi?id=53480
2423
2424         * WebCore.xcodeproj/project.pbxproj:
2425         * platform/graphics/mac/ComplexTextController.cpp:
2426         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): m_indexEnd should be an
2427         offset into m_characters, not into the run’s characters.
2428         * platform/graphics/mac/ComplexTextControllerATSUI.cpp:
2429         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Ditto.
2430
2431 2011-02-07  Sam Weinig  <sam@webkit.org>
2432
2433         Reviewed by Anders Carlsson.
2434
2435         Add bundle API to get the background color of a frame
2436         <rdar://problem/8962670>
2437         https://bugs.webkit.org/show_bug.cgi?id=53952
2438
2439         * WebCore.exp.in: Add export.
2440
2441 2011-02-07  Geoffrey Garen  <ggaren@apple.com>
2442
2443         Reviewed by Darin Adler.
2444
2445         Assertion failure in ~JSGlobalObject when loading apple.com HTML5
2446         transitions demo page
2447         https://bugs.webkit.org/show_bug.cgi?id=53853
2448
2449         This was a long-standing bookkeeping bug uncovered by some heap refactoring.
2450
2451         * html/HTMLCanvasElement.cpp:
2452         (WebCore::HTMLCanvasElement::createImageBuffer):
2453         * html/HTMLImageLoader.cpp:
2454         (WebCore::HTMLImageLoader::notifyFinished):
2455         * xml/XMLHttpRequest.cpp:
2456         (WebCore::XMLHttpRequest::dropProtection): Take the JSLock before
2457         reporting extra cost to the JavaScriptCore heap, since all use of
2458         JavaScriptCore is supposed to be guarded by JSLock.
2459
2460 2011-02-07  Jian Li  <jianli@chromium.org>
2461
2462         Reviewed by David Levin.
2463
2464         Intermittent crash in fast/files/read-blob-async.html on the GTK+ debug
2465         bots
2466         https://bugs.webkit.org/show_bug.cgi?id=53104
2467
2468         Covered by the existing tests.
2469
2470         * fileapi/FileStreamProxy.cpp:
2471         (WebCore::FileStreamProxy::startOnFileThread):
2472         * platform/network/BlobRegistryImpl.cpp:
2473         (WebCore::BlobRegistryImpl::createResourceHandle):
2474         * platform/network/BlobResourceHandle.cpp:
2475         (WebCore::BlobResourceHandle::BlobResourceHandle):
2476         (WebCore::BlobResourceHandle::cancel):
2477         (WebCore::delayedStartBlobResourceHandle):
2478         (WebCore::BlobResourceHandle::start): Keep BlobResourceHandle alive
2479         till the delay function is called.
2480         (WebCore::BlobResourceHandle::doStart):
2481         (WebCore::doNotifyFinish):
2482         (WebCore::BlobResourceHandle::notifyFinish): Notify the client via the
2483         standalone function to prevent the handle from being disposed immediately
2484         by the client which will make the calls in the stack that're still bound
2485         to the handle suffer.
2486         * platform/network/BlobResourceHandle.h:
2487         * platform/network/ResourceHandle.h: Change cancel() to virtual so that
2488         BlobResourceHandle::cancel will be called when we abort a FileReader.
2489
2490 2011-02-07  Sheriff Bot  <webkit.review.bot@gmail.com>
2491
2492         Unreviewed, rolling out r77845.
2493         http://trac.webkit.org/changeset/77845
2494         https://bugs.webkit.org/show_bug.cgi?id=53946
2495
2496         build failure (Requested by lforschler_ on #webkit).
2497
2498         * WebCore.xcodeproj/project.pbxproj:
2499         * accessibility/AccessibilityAllInOne.cpp:
2500
2501 2011-02-07  Darin Adler  <darin@apple.com>
2502
2503         https://bugs.webkit.org/show_bug.cgi?id=53939
2504         fast/css/text-overflow-ellipsis.html failure after r77818/77819
2505
2506         * platform/text/TextCodecICU.cpp:
2507         (WebCore::TextCodecICU::registerExtendedEncodingNames):
2508         Add back the "utf8" synonym for "UTF-8".
2509
2510 2011-02-07  David Hyatt  <hyatt@apple.com>
2511
2512         Reviewed by Dan Bernstein.
2513
2514         Remove an unnecessary extra computeLogicalWidth() from line layout.
2515
2516         * rendering/RenderBlockLineLayout.cpp:
2517         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine):
2518
2519 2011-02-07  Lucas Forschler  <lforschler@apple.com>
2520
2521         Reviewed by Geoffrey Garen.
2522
2523         Fix Leopard Intel Debug Build.
2524         <rdar://problem/8953606> REGRESSION: Can't link WebCore on 32-bit Leopard (53681)
2525         This could potentially break windows, since I had to change #include <filename> to #include "filename"
2526         
2527         * WebCore.xcodeproj/project.pbxproj:
2528         * accessibility/AccessibilityAllInOne.cpp:
2529
2530 2011-02-07  Sam Weinig  <sam@webkit.org>
2531
2532         Fix build.
2533
2534         * platform/mac/ScrollAnimatorMac.mm:
2535         (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
2536         (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar):
2537         (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
2538         (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar):
2539
2540 2011-02-07  Sam Weinig  <sam@webkit.org>
2541
2542         Reviewed by Beth Dakin.
2543
2544         Add mechanism to inform the ScrollAnimator when Scrollbars are added 
2545         and removed.
2546
2547         * platform/ScrollAnimator.h:
2548         (WebCore::ScrollAnimator::didAddVerticalScrollbar):
2549         (WebCore::ScrollAnimator::willRemoveVerticalScrollbar):
2550         (WebCore::ScrollAnimator::didAddHorizontalScrollbar):
2551         (WebCore::ScrollAnimator::willRemoveHorizontalScrollbar):
2552         Make virtual to allow platform specific overrides.
2553
2554         * platform/ScrollView.cpp:
2555         (WebCore::ScrollView::setHasHorizontalScrollbar):
2556         (WebCore::ScrollView::setHasVerticalScrollbar):
2557         Call new ScrollableArea functions.
2558
2559         * platform/ScrollableArea.cpp:
2560         (WebCore::ScrollableArea::didAddVerticalScrollbar):
2561         (WebCore::ScrollableArea::willRemoveVerticalScrollbar):
2562         (WebCore::ScrollableArea::didAddHorizontalScrollbar):
2563         (WebCore::ScrollableArea::willRemoveHorizontalScrollbar):
2564         * platform/ScrollableArea.h:
2565         Pipe to ScrollAnimator.
2566
2567         * platform/mac/ScrollAnimatorMac.h:
2568         * platform/mac/ScrollAnimatorMac.mm:
2569         (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
2570         (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar):
2571         (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
2572         (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar):
2573         * platform/mac/ScrollbarThemeMac.h:
2574         * platform/mac/ScrollbarThemeMac.mm:
2575         (WebCore::ScrollbarThemeMac::registerScrollbar):
2576         (WebCore::ScrollbarThemeMac::unregisterScrollbar):
2577         (WebCore::ScrollbarThemeMac::painterForScrollbar):
2578         Move painter delegate registration to the new didAdd/willRemove functions.
2579
2580 2011-02-07  Anders Carlsson  <andersca@apple.com>
2581
2582         Reviewed by Dan Bernstein.
2583
2584         Missing text match markers with accelerated content
2585         https://bugs.webkit.org/show_bug.cgi?id=53934
2586
2587         When doing the fake paint that recomputes the text match rects, we need to
2588         flatten compositing layers, otherwise the rects won't be updated until the next paint call.
2589
2590         (This worked by accident in WebKit1 because Safari calls -[NSWindow displayIfNeeded] on the containing
2591         window before asking for the text match rects).
2592
2593         * editing/Editor.cpp:
2594         (WebCore::Editor::countMatchesForText):
2595
2596 2011-02-07  Antti Koivisto  <antti@apple.com>
2597
2598         Reviewed by Andreas Kling.
2599
2600         REGRESSION(r77740): CSSStyleSelector accessing deleted memory for svg/dom/use-transform.svg
2601         https://bugs.webkit.org/show_bug.cgi?id=53900
2602         
2603         Ignore link elements in shadow trees.
2604
2605         * dom/Element.cpp:
2606         (WebCore::StyleSelectorParentPusher::StyleSelectorParentPusher):
2607         (WebCore::StyleSelectorParentPusher::~StyleSelectorParentPusher):
2608                 
2609             Some asserts to catch cases like this.
2610
2611         (WebCore::Element::attach):
2612         (WebCore::Element::recalcStyle):
2613         * html/HTMLLinkElement.cpp:
2614         (WebCore::HTMLLinkElement::HTMLLinkElement):
2615         (WebCore::HTMLLinkElement::process):
2616         (WebCore::HTMLLinkElement::insertedIntoDocument):
2617         (WebCore::HTMLLinkElement::removedFromDocument):
2618         * html/HTMLLinkElement.h:
2619
2620 2011-02-07  Darin Adler  <darin@apple.com>
2621
2622         Turn UTF-8 decoder off for now so we can look into failing tests
2623         without leaving the tree red.
2624
2625         * platform/text/TextCodecICU.cpp:
2626         (WebCore::TextCodecICU::registerBaseEncodingNames): Reverting
2627         earlier change so this can handle UTF-8.
2628         (WebCore::TextCodecICU::registerBaseCodecs): Ditto.
2629         (WebCore::TextCodecICU::registerExtendedEncodingNames): Ditto.
2630         (WebCore::TextCodecICU::registerExtendedCodecs): Ditto.
2631         * platform/text/TextCodecICU.h: Ditto.
2632         * platform/text/TextEncodingRegistry.cpp:
2633         (WebCore::buildBaseTextCodecMaps): Ditto.
2634         (WebCore::extendTextCodecMaps): Ditto.
2635         * platform/text/brew/TextCodecBrew.cpp:
2636         (WebCore::TextCodecBrew::registerBaseEncodingNames): Ditto.
2637         (WebCore::TextCodecBrew::registerBaseCodecs): Ditto.
2638         (WebCore::TextCodecBrew::registerExtendedEncodingNames): Ditto.
2639         (WebCore::TextCodecBrew::registerExtendedCodecs): Ditto.
2640         * platform/text/brew/TextCodecBrew.h: Ditto.
2641         * platform/text/gtk/TextCodecGtk.cpp:
2642         (WebCore::TextCodecGtk::registerBaseEncodingNames): Ditto.
2643         (WebCore::TextCodecGtk::registerBaseCodecs): Ditto.
2644         * platform/text/wince/TextCodecWinCE.cpp:
2645         (WebCore::TextCodecWinCE::registerBaseEncodingNames): Ditto.
2646         (WebCore::TextCodecWinCE::registerBaseCodecs): Ditto.
2647         (WebCore::TextCodecWinCE::registerExtendedEncodingNames): Ditto.
2648         (WebCore::TextCodecWinCE::registerExtendedCodecs): Ditto.
2649         * platform/text/wince/TextCodecWinCE.h: Ditto.
2650
2651 2011-02-07  Anders Carlsson  <andersca@apple.com>
2652
2653         Reviewed by Maciej Stachowiak.
2654
2655         Don't exclude overlay scrollers from the page overlay bounds
2656         https://bugs.webkit.org/show_bug.cgi?id=53924
2657
2658         Export ScrollbarTheme::nativeTheme.
2659
2660         * WebCore.exp.in:
2661
2662 2011-02-07  Zhenyao Mo  <zmo@google.com>
2663
2664         Reviewed by Kenneth Russell.
2665
2666         Crash in glDrawArrays with NaCl crystal model
2667         https://bugs.webkit.org/show_bug.cgi?id=52831
2668
2669         * html/canvas/WebGLRenderingContext.cpp: Allocate large enough buffer for atttrib0 if it's enabled and not used.
2670         (WebCore::WebGLRenderingContext::initVertexAttrib0):
2671         (WebCore::WebGLRenderingContext::simulateVertexAttrib0):
2672         * html/canvas/WebGLRenderingContext.h:
2673
2674 2011-02-07  Chris Fleizach  <cfleizach@apple.com>
2675
2676         Reviewed by Darin Adler.
2677
2678         WAI-ARIA @aria-sort not exposed on rowheader and columnheader roles.
2679         https://bugs.webkit.org/show_bug.cgi?id=53842
2680
2681         Test: platform/mac/accessibility/aria-sort.html
2682
2683         * accessibility/AccessibilityObject.cpp:
2684         (WebCore::AccessibilityObject::sortDirection):
2685         * accessibility/AccessibilityObject.h:
2686         * accessibility/mac/AccessibilityObjectWrapper.mm:
2687         (-[AccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
2688         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
2689         * html/HTMLAttributeNames.in:
2690
2691 2011-02-07  Darin Adler  <darin@apple.com>
2692
2693         Reviewed by Antti Koivisto.
2694
2695         Add built-in decoder for UTF-8 for improved performance
2696         https://bugs.webkit.org/show_bug.cgi?id=53898
2697
2698         Correct behavior is covered by existing tests.
2699
2700         * Android.mk: Added TextCodecUTF8.
2701         * CMakeLists.txt: Ditto.
2702         * GNUmakefile.am: Ditto.
2703         * WebCore.gypi: Ditto.
2704         * WebCore.pro: Ditto.
2705         * WebCore.vcproj/WebCore.vcproj: Ditto.
2706         * WebCore.xcodeproj/project.pbxproj: Ditto.
2707
2708         * platform/text/TextCodecICU.cpp: Removed registration of UTF-8
2709         since that's now handled by the built-in UTF-8 codec.
2710         (WebCore::TextCodecICU::registerEncodingNames): Renamed to remove
2711         the word "extended" since all codecs from ICU are now extended.
2712         (WebCore::TextCodecICU::registerCodecs): Ditto.
2713         * platform/text/TextCodecICU.h: Ditto.
2714
2715         * platform/text/TextCodecUTF16.cpp:
2716         (WebCore::TextCodecUTF16::decode): Added a FIXME about missing
2717         error handling.
2718
2719         * platform/text/TextCodecUTF8.cpp: Added.
2720         * platform/text/TextCodecUTF8.h: Added.
2721
2722         * platform/text/TextEncodingRegistry.cpp:
2723         (WebCore::buildBaseTextCodecMaps): Added TextCodecUTF8, and
2724         removed TextCodecICU, TextCodecBrew, and TextCodecWinCE.
2725         (WebCore::extendTextCodecMaps): Updated names for
2726         TextCodecICU and TextCodecWinCE.
2727
2728         * platform/text/brew/TextCodecBrew.cpp:
2729         (WebCore::TextCodecBrew::registerEncodingNames): Renamed to remove
2730         the word "extended" since all codecs from Brew are now extended.
2731         (WebCore::TextCodecBrew::registerCodecs): Ditto.
2732         * platform/text/brew/TextCodecBrew.h: Ditto.
2733
2734         * platform/text/gtk/TextCodecGtk.cpp:
2735         (WebCore::TextCodecGtk::registerBaseEncodingNames): Removed
2736         registration of UTF-8. It's questionable whether the other codecs
2737         here are really basic. If we think they qualify, then we should
2738         register them on other platforms, not just GTK.
2739         (WebCore::TextCodecGtk::registerBaseCodecs): Ditto.
2740
2741         * platform/text/wince/TextCodecWinCE.cpp:
2742         (WebCore::getCodePage): Removed special case for UTF-8 since we
2743         no longer use this codec for UTF-8.
2744         (WebCore::TextCodecWinCE::registerEncodingNames): Renamed to remove
2745         the word "extended" since all codecs from WinCE are now extended.
2746         (WebCore::TextCodecWinCE::registerCodecs): Ditto.
2747         * platform/text/wince/TextCodecWinCE.h: Ditto.
2748
2749 2011-02-07  Mario Sanchez Prada  <msanchez@igalia.com>
2750
2751         Reviewed by Xan Lopez.
2752
2753         [Gtk] atk_text_get_caret_offset fails for list items
2754         https://bugs.webkit.org/show_bug.cgi?id=53436
2755
2756         Consider list item markers when calculating the offset.
2757
2758         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
2759         (webkit_accessible_text_get_caret_offset): Adjust the offset
2760         with the item marker's length for list items.
2761         (webkit_accessible_text_set_caret_offset): Replace usage of
2762         g_utf8_strlen() by calling to markerText.length().
2763
2764 2011-02-07  Yi Shen  <yi.4.shen@nokia.com>
2765
2766         Reviewed by Tor Arne Vestbø.
2767
2768         [Qt] Fix LayoutTests/media/restore-from-page-cache.html
2769         https://bugs.webkit.org/show_bug.cgi?id=53621
2770
2771         Changed the networkState to MediaPlayer::Loaded when 
2772         MediaPlayerPrivateQt has enough data.
2773
2774         Test: media/restore-from-page-cache.html
2775
2776         * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
2777         (WebCore::MediaPlayerPrivateQt::updateStates):
2778
2779 2011-01-31  Pavel Podivilov  <podivilov@chromium.org>
2780
2781         Reviewed by Yury Semikhatsky.
2782
2783         Web Inspector: implement beautification of scripts inlined in html documents.
2784         https://bugs.webkit.org/show_bug.cgi?id=52706
2785
2786         To beautify scripts inlined in html, we need to cut individual scripts, beautify them using UglifyJS library, and
2787         finally paste them back to html.
2788
2789         * WebCore.gypi:
2790         * WebCore.vcproj/WebCore.vcproj:
2791         * inspector/front-end/ScriptFormatter.js:
2792         (WebInspector.ScriptFormatter): Implement formatting of scripts inlined in html.
2793         (WebInspector.ScriptFormatter.prototype.formatContent.didFormatChunks):
2794         (WebInspector.ScriptFormatter.prototype.formatContent):
2795         (WebInspector.ScriptFormatter.prototype._splitContentIntoChunks):
2796         (WebInspector.ScriptFormatter.prototype._formatChunks.didFormat):
2797         (WebInspector.ScriptFormatter.prototype._formatChunks):
2798         (WebInspector.ScriptFormatter.prototype._buildContentFromChunks):
2799         (WebInspector.ScriptFormatter.prototype._formatScript.messageHandler):
2800         (WebInspector.ScriptFormatter.prototype._formatScript):
2801         * inspector/front-end/ScriptFormatterWorker.js:
2802         (onmessage):
2803         (buildMapping):
2804         * inspector/front-end/SourceFrame.js:
2805         (WebInspector.SourceFrameContent): Use SourceFrameContent and FormattedSourceFrameContent to perform operations with line numbers.
2806         * inspector/front-end/SourceFrameContent.js: Added.
2807         (WebInspector.SourceFrameContent): Helper class, holds resource text and scripts layout
2808         (WebInspector.SourceFrameContent.prototype.get scriptRanges):
2809         (WebInspector.SourceFrameContent.prototype.locationToPosition):
2810         (WebInspector.SourceFrameContent.prototype.positionToLocation):
2811         (WebInspector.SourceFrameContent.prototype.scriptLocationForLineNumber):
2812         (WebInspector.SourceFrameContent.prototype.scriptLocationForRange):
2813         (WebInspector.SourceFrameContent.prototype.lineNumberToRange):
2814         (WebInspector.SourceFrameContent.prototype._intersectingScriptRange):
2815         (WebInspector):
2816         (WebInspector.FormattedSourceFrameContent): Helper class, holds original and formatted versions of resource and mapping between them.
2817         (WebInspector.FormattedSourceFrameContent.prototype.get text):
2818         (WebInspector.FormattedSourceFrameContent.prototype.originalLocationToFormattedLocation):
2819         (WebInspector.FormattedSourceFrameContent.prototype.scriptLocationForFormattedLineNumber):
2820         (WebInspector.FormattedSourceFrameContent.prototype._convertPosition):
2821         * inspector/front-end/WebKit.qrc:
2822         * inspector/front-end/inspector.html:
2823
2824 2011-02-07  Pavel Feldman  <pfeldman@chromium.org>
2825
2826         Reviewed by Yury Semikhatsky.
2827
2828         Web Inspector: "Reveal in elements panel" does not always work.
2829         https://bugs.webkit.org/show_bug.cgi?id=53775
2830
2831         * inspector/front-end/ConsoleView.js:
2832         (WebInspector.ConsoleView):
2833         * inspector/front-end/ContextMenu.js:
2834         (WebInspector.ContextMenu.prototype.show):
2835         * inspector/front-end/ElementsPanel.js:
2836         (WebInspector.ElementsPanel.prototype.switchToAndFocus):
2837         * inspector/front-end/ElementsTreeOutline.js:
2838         (WebInspector.ElementsTreeOutline.prototype._contextMenuEventFired.focusElement):
2839         (WebInspector.ElementsTreeOutline.prototype._contextMenuEventFired):
2840         * inspector/front-end/ObjectPropertiesSection.js:
2841         (WebInspector.ObjectPropertyTreeElement.prototype.update):
2842         (WebInspector.ObjectPropertyTreeElement.prototype._contextMenuEventFired):
2843         * inspector/front-end/inspector.js:
2844         (WebInspector.cancelSearch):
2845
2846 2011-02-07  Adam Barth  <abarth@webkit.org>
2847
2848         Reviewed by Eric Seidel.
2849
2850         Relative .. in URL paths shouldn't skip adjacent / characters
2851         https://bugs.webkit.org/show_bug.cgi?id=53907
2852
2853         Our new behavior matches Firefox, Chrome, and IE.
2854
2855         * platform/KURL.cpp:
2856         (WebCore::copyPathRemovingDots):
2857
2858 2011-02-07  Maciej Stachowiak  <mjs@apple.com>
2859
2860         Reviewed by Antti Koivisto.
2861
2862         WebKitTestRunner does not block remote resources or complain about them
2863         https://bugs.webkit.org/show_bug.cgi?id=42139
2864         <rdar://problem/8183942>
2865
2866         * Configurations/WebCore.xcconfig: Allow WebKitTestRunner to link
2867         WebCore.
2868         * WebCore.exp.in: Export a handful of KURL symbols.
2869
2870 2011-02-06  Ryosuke Niwa  <rniwa@webkit.org>
2871
2872         Reviewed by Darin Adler.
2873
2874         OwnArraryPtr.h uses deleteOwnedPtr but doesn’t include OwnPtrCommon.h
2875         https://bugs.webkit.org/show_bug.cgi?id=52867
2876
2877         * ForwardingHeaders/wtf/OwnArrayPtrCommon.h: Removed.
2878         * bindings/v8/NPV8Object.cpp:
2879         (WebCore::createValueListFromVariantArgs): Returns PassOwnArrayPtr<v8::Handle<v8::Value>> instead of
2880         v8::Handle<v8::Value>*.
2881         (_NPN_Invoke): Calls createValueListFromVariantArgs.
2882         (_NPN_InvokeDefault): createValueListFromVariantArgs.
2883         (_NPN_Construct): createValueListFromVariantArgs.
2884         * bindings/v8/ScriptFunctionCall.cpp:
2885         (WebCore::ScriptFunctionCall::call): Calls adoptArrayPtr.
2886         (WebCore::ScriptFunctionCall::construct): Ditto.
2887         (WebCore::ScriptCallback::call):
2888         * bindings/v8/V8DOMWindowShell.cpp:
2889         (WebCore::V8DOMWindowShell::createNewContext): Ditto.
2890         * bindings/v8/V8NPObject.cpp:
2891         (WebCore::npObjectInvokeImpl): Ditto
2892         * bindings/v8/V8NodeFilterCondition.cpp:
2893         (WebCore::V8NodeFilterCondition::acceptNode): Ditto,
2894         * html/HTMLAreaElement.cpp:
2895         (WebCore::HTMLAreaElement::parseMappedAttribute): Calls newCoordsArray.
2896         * html/HTMLFrameSetElement.cpp:
2897         (WebCore::HTMLFrameSetElement::parseMappedAttribute): Calls newLengthArray.
2898         * html/canvas/WebGLRenderingContext.cpp:
2899         (WebCore::WebGLRenderingContext::getAttachedShaders): Calls adoptArraYptr.
2900         (WebCore::WebGLRenderingContext::simulateVertexAttrib0): Ditto.
2901         (WebCore::WebGLRenderingContext::LRUImageBufferCache::LRUImageBufferCache): Dito.
2902         * platform/Length.cpp:
2903         (WebCore::newCoordsArray): Returns PassOwnArrayPtr<Length> instead of Length*.
2904         (WebCore::newLengthArray): Returns PassOwnArrayPtr<Length> instead of Length*.
2905         * platform/Length.h: Prototype changes.
2906         * platform/graphics/ANGLEWebKitBridge.cpp:
2907         (WebCore::ANGLEWebKitBridge::validateShaderSource): Calls adoptArrayPtr.
2908         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
2909         (WebCore::getDirtyRects): Ditto.
2910         * platform/graphics/chromium/ComplexTextControllerLinux.cpp:
2911         (WebCore::ComplexTextController::getNormalizedTextRun): Ditto.
2912         * platform/graphics/chromium/HarfbuzzSkia.cpp:
2913         (WebCore::glyphsToAdvances): Ditto.
2914         (WebCore::canRender): Ditto.
2915         * platform/graphics/gpu/Texture.cpp:
2916         (WebCore::Texture::updateSubRect): Ditto.
2917         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
2918         (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): Ditto.
2919         * platform/graphics/skia/PlatformContextSkia.cpp:
2920         (WebCore::PlatformContextSkia::readbackHardwareToSoftware): Ditto.
2921         * platform/graphics/wince/SharedBitmap.cpp:
2922         (WebCore::SharedBitmap::to16bit): Ditto.
2923         * platform/win/ContextMenuWin.cpp:
2924         (WebCore::ContextMenu::getContextMenuItems): Ditto.
2925         * platform/win/LoggingWin.cpp:
2926         (WebCore::initializeWithUserDefault): Ditto.
2927         * plugins/win/PluginPackageWin.cpp:
2928         (WebCore::PluginPackage::fetchInfo): Ditto.
2929
2930 2011-02-06  Kent Tamura  <tkent@chromium.org>
2931
2932         Unreviewed.
2933
2934         * WebCore.xcodeproj/project.pbxproj: Run sort-xcode-project-file.
2935
2936 2011-02-03  Dominic Cooney  <dominicc@google.com>
2937
2938         Reviewed by Dimitri Glazkov.
2939
2940         Convert <keygen> option elements to a shadow DOM
2941         https://bugs.webkit.org/show_bug.cgi?id=51379
2942
2943         Covered by existing tests e.g. fast/html/keygen.html,
2944         html5lib/runner.html, etc.
2945
2946         * css/html.css:
2947         (form): Cleanup.
2948         (keygen, select): Border radii should match so focus ring looks good.
2949         (keygen::-webkit-keygen-select): No margin on the shadow element.
2950         (select): Hoisting border radius to keygen, select rule.
2951         * dom/SelectElement.cpp:
2952         (WebCore::toSelectElement): keygen is no longer a select element.
2953         * html/HTMLKeygenElement.cpp: Implements keygen shadow.
2954         (WebCore::KeygenSelectElement::create):
2955         (WebCore::KeygenSelectElement::shadowPseudoId):
2956         (WebCore::KeygenSelectElement::KeygenSelectElement):
2957         (WebCore::HTMLKeygenElement::HTMLKeygenElement):
2958         (WebCore::HTMLKeygenElement::parseMappedAttribute):
2959         (WebCore::HTMLKeygenElement::appendFormData):
2960         (WebCore::HTMLKeygenElement::formControlType):
2961         (WebCore::HTMLKeygenElement::reset):
2962         (WebCore::HTMLKeygenElement::selectShadow):
2963         * html/HTMLKeygenElement.h: keygen is no longer a select on C++ side.
2964         (WebCore::HTMLKeygenElement::canStartSelection):
2965         (WebCore::HTMLKeygenElement::isEnumeratable):
2966         (WebCore::HTMLKeygenElement::isResettable):
2967         * html/HTMLOptionElement.cpp:
2968         (WebCore::HTMLOptionElement::ownerSelectElement): Only owned by selects.
2969         * html/HTMLSelectElement.cpp:
2970         (WebCore::HTMLSelectElement::HTMLSelectElement): Only 'select' tag name.
2971
2972 2011-02-06  Benjamin Poulain  <ikipou@gmail.com>
2973
2974         Reviewed by Kenneth Rohde Christiansen.
2975
2976         [Qt] Fix coding style errors in ClipboardQt.h
2977         https://bugs.webkit.org/show_bug.cgi?id=43520
2978
2979         Fix coding style: order of header and indentation.
2980
2981         * platform/qt/ClipboardQt.h:
2982         (WebCore::ClipboardQt::create):
2983         (WebCore::ClipboardQt::clipboardData):
2984         (WebCore::ClipboardQt::invalidateWritableData):
2985
2986 2011-02-06  Antti Koivisto  <antti@apple.com>
2987
2988         Reviewed by Maciej Stachowiak.
2989
2990         Use bloom filter for descendant selector filtering
2991         https://bugs.webkit.org/show_bug.cgi?id=53880
2992         
2993         Bloom filter is faster than a hash set in this kind of use.
2994         
2995         Shark thinks this speeds up style matching by ~30% on sites
2996         with lots of descendant selectors.
2997
2998         * ForwardingHeaders/wtf/BloomFilter.h: Added.
2999         * css/CSSStyleSelector.cpp:
3000         (WebCore::collectElementIdentifierHashes):
3001         (WebCore::CSSStyleSelector::pushParent):
3002         (WebCore::CSSStyleSelector::popParent):
3003         (WebCore::CSSStyleSelector::fastRejectSelector):
3004         (WebCore::RuleData::collectDescendantSelectorIdentifierHashes):
3005         * css/CSSStyleSelector.h:
3006
3007 2011-02-06  Maciej Stachowiak  <mjs@apple.com>
3008
3009         Reviewed by Antti Koivisto.
3010
3011         media/video-document-types.html sometimes crashes the WebProcess
3012         https://bugs.webkit.org/show_bug.cgi?id=53884
3013
3014         No new tests. Already covered by media/video-document-types.html
3015
3016         * html/HTMLMediaElement.cpp:
3017         (WebCore::HTMLMediaElement::userCancelledLoad): Stop the load timer
3018         when cancelling the load.
3019
3020 2011-02-06  Patrick Gansterer  <paroga@webkit.org>
3021
3022         Reviewed by Adam Roben.
3023
3024         [WIN] Use WCHAR instead of TCHAR
3025         https://bugs.webkit.org/show_bug.cgi?id=53863
3026
3027         We always use the UNICODE versions of windows functions, so
3028         the usage of TCHAR makes no sense and mixing them is bad style.
3029
3030         * platform/graphics/win/IconWin.cpp:
3031         (WebCore::Icon::createIconForFiles):
3032         * platform/graphics/win/QTMovie.cpp:
3033         * platform/graphics/win/QTMovieGWorld.cpp:
3034         (QTMovieGWorld::fullscreenWndProc):
3035         (QTMovieGWorld::enterFullscreen):
3036         * platform/graphics/win/SimpleFontDataCGWin.cpp:
3037         (WebCore::SimpleFontData::platformInit):
3038         * platform/graphics/win/SimpleFontDataCairoWin.cpp:
3039         * platform/graphics/win/SimpleFontDataWin.cpp:
3040         * platform/graphics/wince/SimpleFontDataWinCE.cpp:
3041         * platform/win/BString.cpp:
3042         * platform/win/ClipboardWin.cpp:
3043         (WebCore::filesystemPathFromUrlOrTitle):
3044         (WebCore::createGlobalHDropContent):
3045         (WebCore::createGlobalImageFileDescriptor):
3046         * platform/win/ContextMenuWin.cpp:
3047         * platform/win/CursorWin.cpp:
3048         (WebCore::loadSharedCursor):
3049         * platform/win/FileChooserWin.cpp:
3050         (WebCore::FileChooser::basenameForWidth):
3051         * platform/win/PopupMenuWin.cpp:
3052         (WebCore::PopupMenuWin::popupClassName):
3053         (WebCore::PopupMenuWin::show):
3054         * platform/win/PopupMenuWin.h:
3055
3056 2011-02-06  Patrick Gansterer  <paroga@webkit.org>
3057
3058         Reviewed by Andreas Kling.
3059
3060         Replace FLT_MAX with std::numeric_limits
3061         https://bugs.webkit.org/show_bug.cgi?id=53861
3062
3063         Also move EFL's userIdleTime from TemporaryLinkStubs into SystemTimeEfl.
3064
3065         * html/NumberInputType.cpp:
3066         * html/parser/HTMLParserIdioms.cpp:
3067         (WebCore::parseToDoubleForNumberType):
3068         * platform/brew/SystemTimeBrew.cpp:
3069         (WebCore::userIdleTime):
3070         * platform/efl/SystemTimeEfl.cpp:
3071         (WebCore::userIdleTime):
3072         * platform/efl/TemporaryLinkStubs.cpp:
3073         * platform/graphics/ca/GraphicsLayerCA.cpp:
3074         (WebCore::GraphicsLayerCA::setupAnimation):
3075         * platform/win/SystemTimeWin.cpp:
3076         (WebCore::userIdleTime):
3077         * platform/wx/SystemTimeWx.cpp:
3078         (WebCore::userIdleTime):
3079
3080 2011-02-06  Patrick Gansterer  <paroga@webkit.org>
3081
3082         Reviewed by Andreas Kling.
3083
3084         [CMake] Add dependencies for Visual Studio projects
3085         https://bugs.webkit.org/show_bug.cgi?id=53773
3086
3087         Add a JavaScriptCore dependecy to WebCore, so CMake can 
3088         generate the correct build order for the solution.
3089
3090         * CMakeLists.txt:
3091
3092 2011-02-06  Patrick Gansterer  <paroga@webkit.org>
3093
3094         Reviewed by Andreas Kling.
3095
3096         [CMake] Unify ENABLE_SVG sections
3097         https://bugs.webkit.org/show_bug.cgi?id=53778
3098
3099         * CMakeLists.txt:
3100
3101 2011-02-06  Andreas Kling  <kling@webkit.org>
3102
3103         Reviewed by Dirk Schulze.
3104
3105         Refactor Font::normalizeSpaces() to avoid an extra String copy.
3106         https://bugs.webkit.org/show_bug.cgi?id=53871
3107
3108         Have normalizeSpaces() take UChar*,length arguments instead of a
3109         String, since all call sites were creating temporaries from these
3110         components anyway.
3111
3112         Font::normalizeSpaces() now always makes 1 String copy,
3113         instead of 1 in the best case and 2 in the worst case.
3114
3115         * platform/graphics/Font.cpp:
3116         (WebCore::Font::normalizeSpaces):
3117         * platform/graphics/Font.h:
3118         * platform/graphics/qt/FontQt.cpp:
3119         (WebCore::drawTextCommon):
3120         (WebCore::Font::floatWidthForSimpleText):
3121         (WebCore::Font::floatWidthForComplexText):
3122         (WebCore::Font::offsetForPositionForSimpleText):
3123         (WebCore::Font::offsetForPositionForComplexText):
3124         (WebCore::Font::selectionRectForSimpleText):
3125         (WebCore::Font::selectionRectForComplexText):
3126         * svg/SVGFont.cpp:
3127         (WebCore::SVGTextRunWalker::walk):
3128
3129 2011-02-06  Andreas Kling  <kling@webkit.org>
3130
3131         Reviewed by Dirk Schulze.
3132
3133         Fix potential buffer overrun in SVGTextRunWalker::walk()
3134         https://bugs.webkit.org/show_bug.cgi?id=53870
3135
3136         A new String was created from a UChar* with a 'length' argument
3137         that could be greater than the number of UChars available.
3138
3139         * svg/SVGFont.cpp:
3140         (WebCore::SVGTextRunWalker::walk):
3141
3142 2011-02-05  Adam Barth  <abarth@webkit.org>
3143
3144         Reviewed by Eric Seidel.
3145
3146         Remove unused parameter related to XSSAuditor
3147         https://bugs.webkit.org/show_bug.cgi?id=53862
3148
3149         * WebCore.exp.in:
3150         * bindings/ScriptControllerBase.cpp:
3151         (WebCore::ScriptController::executeScript):
3152         (WebCore::ScriptController::executeIfJavaScriptURL):
3153         * bindings/ScriptControllerBase.h:
3154         * bindings/js/ScriptController.cpp:
3155         (WebCore::ScriptController::evaluateInWorld):
3156         (WebCore::ScriptController::evaluate):
3157         (WebCore::ScriptController::executeScriptInWorld):
3158         * bindings/js/ScriptController.h:
3159         * bindings/v8/ScriptController.cpp:
3160         (WebCore::ScriptController::evaluate):
3161         * bindings/v8/ScriptController.h:
3162
3163 2011-02-05  Adam Barth  <abarth@webkit.org>
3164
3165         Fix Qt build.
3166
3167         * WebCore.pro:
3168
3169 2011-02-05  Adam Barth  <abarth@webkit.org>
3170
3171         Reviewed by Eric Seidel.
3172
3173         Delete XSSAuditor
3174         https://bugs.webkit.org/show_bug.cgi?id=53859
3175
3176         The job of the XSSAuditor is now done by the XSSFilter.  In the future,
3177         we might rename XSSFilter to XSSAuditor.
3178
3179         * Android.mk:
3180         * CMakeLists.txt:
3181         * GNUmakefile.am:
3182         * WebCore.gypi:
3183         * WebCore.vcproj/WebCore.vcproj:
3184         * WebCore.xcodeproj/project.pbxproj:
3185         * bindings/ScriptControllerBase.cpp:
3186         (WebCore::ScriptController::executeIfJavaScriptURL):
3187         * bindings/ScriptControllerBase.h:
3188         * bindings/js/ScriptController.cpp:
3189         (WebCore::ScriptController::ScriptController):
3190         (WebCore::ScriptController::evaluateInWorld):
3191         * bindings/js/ScriptController.h:
3192         * bindings/js/ScriptEventListener.cpp:
3193         (WebCore::createAttributeEventListener):
3194         * bindings/v8/ScriptController.cpp:
3195         (WebCore::ScriptController::ScriptController):
3196         (WebCore::ScriptController::evaluate):
3197         * bindings/v8/ScriptController.h:
3198         * bindings/v8/ScriptEventListener.cpp:
3199         (WebCore::createAttributeEventListener):
3200         * dom/Document.cpp:
3201         (WebCore::Document::implicitOpen):
3202         (WebCore::Document::processBaseElement):
3203         * dom/ScriptableDocumentParser.cpp:
3204         (WebCore::ScriptableDocumentParser::ScriptableDocumentParser):
3205         * dom/ScriptableDocumentParser.h:
3206         * html/parser/HTMLDocumentParser.cpp:
3207         (WebCore::HTMLDocumentParser::shouldLoadExternalScriptFromSrc):
3208         * loader/SubframeLoader.cpp:
3209         (WebCore::SubframeLoader::requestObject):
3210         (WebCore::SubframeLoader::loadMediaPlayerProxyPlugin):
3211         * page/XSSAuditor.cpp: Removed.
3212         * page/XSSAuditor.h: Removed.
3213
3214 2011-02-05  Anders Carlsson  <andersca@apple.com>
3215
3216         Reviewed by Darin Adler.
3217
3218         Need a way to resize and scroll the page at the same time
3219         https://bugs.webkit.org/show_bug.cgi?id=53814
3220         <rdar://problem/8498008>
3221
3222         Export a function needed by WebKit2.
3223
3224         * WebCore.exp.in:
3225
3226 2011-02-05  Patrick Gansterer  <paroga@webkit.org>
3227
3228         Reviewed by Alexey Proskuryakov.
3229
3230         Use Document::encoding() instead of DocumentWriter::encoding()
3231         https://bugs.webkit.org/show_bug.cgi?id=53398
3232
3233         This change makes the code more readable, when a subresource
3234         inherits the character encoding of the document.
3235
3236         * dom/ProcessingInstruction.cpp:
3237         (WebCore::ProcessingInstruction::checkStyleSheet):
3238         * dom/ScriptElement.cpp:
3239         (WebCore::ScriptElement::scriptCharset):
3240         * html/HTMLLinkElement.cpp:
3241         (WebCore::HTMLLinkElement::process):
3242         * loader/cache/CachedResourceLoader.cpp:
3243         (WebCore::CachedResourceLoader::requestPreload):
3244         * platform/network/FormDataBuilder.cpp:
3245         (WebCore::FormDataBuilder::encodingFromAcceptCharset):
3246
3247 2011-02-05  Adam Barth  <abarth@webkit.org>
3248
3249         Reviewed by Eric Seidel.
3250
3251         Introduce URLString to represent a canonicalized URL represented by a string
3252         https://bugs.webkit.org/show_bug.cgi?id=53847
3253
3254         Instead of using String all over the codebase to represent a URL,
3255         instead we should have a type to represent a canonicalized URL in the
3256         form of a string.  This patch introduces that type.
3257
3258         * GNUmakefile.am:
3259         * WebCore.gypi:
3260         * WebCore.xcodeproj/project.pbxproj:
3261         * platform/KURL.cpp:
3262         (WebCore::KURL::KURL):
3263         * platform/KURL.h:
3264         (WebCore::KURL::urlString):
3265
3266 2011-02-05  Robert Hogan  <robert@webkit.org>
3267
3268         Reviewed by Antonio Gomes.
3269
3270         [Qt] Style widgets not rendering
3271         https://bugs.webkit.org/show_bug.cgi?id=53849
3272
3273         * html/HTMLObjectElement.cpp:
3274         (WebCore::HTMLObjectElement::hasValidClassId): x-qt-styled-widget is a valid class id too
3275
3276 2011-02-05  Jochen Eisinger  <jochen@chromium.org>
3277
3278         Reviewed by Adam Barth.
3279
3280         Add ContentSecurityPolicy object to Document and pass the X-WebKit-CSP header from the MainResourceLoader.
3281         https://bugs.webkit.org/show_bug.cgi?id=53685
3282
3283         * WebCore.xcodeproj/project.pbxproj:
3284         * dom/Document.h:
3285         (WebCore::Document::contentSecurityPolicy):
3286         * loader/MainResourceLoader.cpp:
3287         (WebCore::MainResourceLoader::didReceiveResponse):
3288         * page/ContentSecurityPolicy.cpp:
3289         (WebCore::ContentSecurityPolicy::didReceiveHeader):
3290         * page/ContentSecurityPolicy.h:
3291
3292 2011-02-05  Eric Seidel  <eric@webkit.org>
3293
3294         Reviewed by Adam Barth.
3295
3296         Safari should lowercase schemes in cannonicalized urls to match every other browser
3297         https://bugs.webkit.org/show_bug.cgi?id=53848
3298
3299         We're clearly the odd man out here.  See results from every browser at:
3300         https://github.com/abarth/url-spec/blob/master/tests/gurl-results/by-browser.txt
3301
3302         * platform/KURL.cpp:
3303         (WebCore::KURL::parse):
3304          - Just lowercase the scheme when copying.
3305
3306 2011-02-05  Antti Koivisto  <antti@apple.com>
3307
3308         Reviewed by Dave Hyatt.
3309
3310         Optimize matching of descendant selectors
3311         https://bugs.webkit.org/show_bug.cgi?id=49876
3312         <rdar://problem/8772822>
3313         
3314         During style recalculation, maintain a filter of tags, ids and classes seen in ancestor elements.
3315         Use the filter to quickly reject descendant and child selectors when doing style matching.
3316
3317         This speeds up style recalculations 3-6x on many major web sites.
3318
3319         * css/CSSStyleSelector.cpp:
3320         (WebCore::RuleData::RuleData):
3321         (WebCore::RuleData::descendantSelectorIdentifierHashes):
3322         (WebCore::collectElementIdentifiers):
3323         (WebCore::CSSStyleSelector::pushParent):
3324         (WebCore::CSSStyleSelector::popParent):
3325         (WebCore::CSSStyleSelector::fastRejectSelector):
3326         (WebCore::CSSStyleSelector::matchRulesForList):
3327         (WebCore::RuleData::collectDescendantSelectorIdentifierHashes):
3328         * css/CSSStyleSelector.h:
3329         (WebCore::CSSStyleSelector::ParentStackFrame::ParentStackFrame):
3330         * dom/Element.cpp:
3331         (WebCore::StyleSelectorParentPusher::StyleSelectorParentPusher):
3332         (WebCore::StyleSelectorParentPusher::push):
3333         (WebCore::StyleSelectorParentPusher::~StyleSelectorParentPusher):
3334         (WebCore::Element::attach):
3335         (WebCore::Element::recalcStyle):
3336
3337 2011-02-05  Nate Chapin  <japhet@chromium.org>
3338
3339         Reviewed by Adam Barth.
3340
3341         Refactor: NotificationCenter shouldn't hold its own copy of the ScriptExecutionContext*
3342         when it inherits one from ActiveDOMObject.
3343         https://bugs.webkit.org/show_bug.cgi?id=53815
3344
3345         * bindings/js/JSDesktopNotificationsCustom.cpp:
3346         (WebCore::JSNotificationCenter::requestPermission):
3347         * bindings/v8/custom/V8NotificationCenterCustom.cpp:
3348         (WebCore::V8NotificationCenter::requestPermissionCallback):
3349         * notifications/NotificationCenter.cpp:
3350         (WebCore::NotificationCenter::NotificationCenter):
3351         (WebCore::NotificationCenter::checkPermission):
3352         (WebCore::NotificationCenter::requestPermission):
3353         (WebCore::NotificationCenter::disconnectFrame):
3354         * notifications/NotificationCenter.h:
3355         (WebCore::NotificationCenter::createHTMLNotification):
3356         (WebCore::NotificationCenter::createNotification):
3357
3358 2011-02-04  Adam Barth  <abarth@webkit.org>
3359
3360         Reviewed by Maciej Stachowiak.
3361
3362         Crash in WebCore::TextEncoding::decode below XSSFilter::init
3363         https://bugs.webkit.org/show_bug.cgi?id=53837
3364
3365         Add missing null check.
3366
3367         Test: http/tests/security/xssAuditor/non-block-javascript-url-frame.html
3368
3369         * html/parser/XSSFilter.cpp:
3370         (WebCore::XSSFilter::init):
3371
3372 2011-02-04  Simon Fraser  <simon.fraser@apple.com>
3373
3374         Reviewed by Dan Bernstein.
3375
3376         Crashes in ShadowBlur via WebKit2 FindController
3377         https://bugs.webkit.org/show_bug.cgi?id=53830
3378         
3379         Fix a crash cause by re-entering ShadowBlur, and add assertions to
3380         detect when it happens.
3381         
3382         The re-entrancy occurred when drawRectShadowWithTiling() filled
3383         the interior of the shadow with fillRect() on the context
3384         which still had the shadow state set. This would make another ShadowBlur
3385         on the stack and call into the code again, potentially blowing away
3386         the image buffer.
3387         
3388         Fix by turning off shadows in the destination context while we're
3389         drawing the tiled shadow. The non-tiled code path already did this.
3390
3391         Not testable because CSS shadows clip out the inside of the rect
3392         being shadowed, and SVG uses fillPath, even for rects.
3393
3394         * platform/graphics/ShadowBlur.cpp:
3395         (WebCore::ScratchBuffer::ScratchBuffer):
3396         (WebCore::ScratchBuffer::getScratchBuffer):
3397         (WebCore::ScratchBuffer::scheduleScratchBufferPurge):
3398         (WebCore::ShadowBlur::ShadowBlur):
3399         (WebCore::ShadowBlur::drawRectShadowWithTiling):
3400
3401 2011-02-04  Carlos Garcia Campos  <cgarcia@igalia.com>
3402
3403         Reviewed by Martin Robinson.
3404
3405         [GTK] Don't use a fixed size for search field icons
3406         https://bugs.webkit.org/show_bug.cgi?id=50624
3407
3408         Use the parent input content box to make sure the icon fits in the
3409         search field, scaling it down when needed.
3410
3411         * platform/gtk/RenderThemeGtk.cpp:
3412         (WebCore::paintGdkPixbuf):
3413         (WebCore::getIconSizeForPixelSize):
3414         (WebCore::adjustSearchFieldIconStyle):
3415         (WebCore::RenderThemeGtk::adjustSearchFieldResultsDecorationStyle):
3416         (WebCore::centerRectVerticallyInParentInputElement):
3417         (WebCore::RenderThemeGtk::paintSearchFieldResultsDecoration):
3418         (WebCore::RenderThemeGtk::adjustSearchFieldCancelButtonStyle):
3419         (WebCore::RenderThemeGtk::paintSearchFieldCancelButton):
3420         (WebCore::RenderThemeGtk::paintCapsLockIndicator):
3421         (WebCore::RenderThemeGtk::paintMediaButton):
3422
3423 2011-02-04  Hironori Bono  <hbono@chromium.org>
3424
3425         Reviewed by Adam Barth.
3426
3427         [chromium] JPEG corruption
3428         https://bugs.webkit.org/show_bug.cgi?id=53250
3429
3430         Same as gray-scale JPEGs, we convert the colors of CMYK JPEGs with color
3431         profiles from CMYK to RGB twice and it causes color corruption. This
3432         change suppresses the color profiles for CMYK JPEGs same as gray-scale
3433         ones.
3434
3435         Test: fast/images/cmyk-jpeg-with-color-profile.html
3436
3437         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
3438         (WebCore::JPEGImageReader::decode):
3439
3440 2011-02-04  Xiyuan Xia  <xiyuan@chromium.org>
3441
3442         Reviewed by Tony Chang.
3443
3444         [Chromium] Option text in select popup does not align with menulist button text
3445         https://bugs.webkit.org/show_bug.cgi?id=53632
3446
3447         This makes clientPaddingLeft and  clientPaddingRight return
3448         the additional m_innerBlock's padding so that the popup item text
3449         aligns with the menulist button text.
3450
3451         * rendering/RenderMenuList.cpp:
3452         (WebCore::RenderMenuList::clientPaddingLeft):
3453         (WebCore::RenderMenuList::clientPaddingRight):
3454
3455 2011-02-04  Anders Carlsson  <andersca@apple.com>
3456
3457         Reviewed by Sam Weinig and Beth Dakin.
3458
3459         REGRESSION: Horizontal scrollbar thumbs leave artifacts over page content when scrolling vertically
3460         <rdar://problem/8962457>
3461
3462         * platform/ScrollView.cpp:
3463         (WebCore::ScrollView::scrollContents):
3464         Subtract scrollbars from the scroll view rect if overlay scrollers are enabled.
3465         
3466         * platform/ScrollableArea.cpp:
3467         (WebCore::ScrollableArea::setScrollOffsetFromAnimation):
3468         Make sure to invalidate both scrollbars if overlay scrollers are enabled.
3469
3470 2011-02-04  Adam Barth  <abarth@webkit.org>
3471
3472         Reviewed by Eric Seidel.
3473
3474         PluginDocuments don't create widgets for plugins on back/forward
3475         https://bugs.webkit.org/show_bug.cgi?id=53474
3476
3477         Long ago, PluginDocument always caused the HTMLEmbedElement to create
3478         its widget synchronously during a post-layout task.  Recently, however,
3479         some changes to the HistroyController caused layout on back/forward to
3480         become slightly more complicated (and added an extra level of recursion
3481         to layout).  This extra level of recursion triggered the "I've recursed
3482         too many times" condition in the post-layout task queue, causing the
3483         FrameView to run the remainder of the tasks asynchronously.
3484         Unfortunately, that broke PluginDocument because it needs its the
3485         HTMLEmbedElement's updateWidget task to run synchronously.
3486
3487         This patch adds a mechanism for "kicking off" the pending post-layout
3488         tasks synchronously (instead of waiting for the timer to fire).
3489         PluginDocument then uses that facility to ensure that the
3490         HTMLEmbedElement's updateWidget task happens.
3491
3492         Test: plugins/plugin-document-back-forward.html
3493
3494         * html/PluginDocument.cpp:
3495         (WebCore::PluginDocumentParser::appendBytes):
3496         * page/FrameView.cpp:
3497         (WebCore::FrameView::flushAnyPendingPostLayoutTasks):
3498         * page/FrameView.h:
3499
3500 2011-02-04  Charlie Reis  <creis@chromium.org>
3501
3502         Reviewed by Mihai Parparita.
3503
3504         Crash in WebCore::HistoryController::itemsAreClones
3505         https://bugs.webkit.org/show_bug.cgi?id=52819
3506
3507         Avoids deleting the current HistoryItem while it is still in use.
3508         Ensures that provisional items are committed for same document navigations.
3509         Ensures that error pages are committed on back/forward navigations.
3510         Also removes unneeded sanity checks used for diagnosing the problem.
3511
3512         * loader/HistoryController.cpp:
3513         * loader/HistoryController.h:
3514
3515 2011-02-04  Carol Szabo  <carol.szabo@nokia.com>
3516
3517         Reviewed by David Hyatt.
3518
3519         Code Changes.