2011-03-29 Leo Yang <leo.yang@torchmobile.com.cn>
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-03-29  Leo Yang  <leo.yang@torchmobile.com.cn>
2
3         Reviewed by Nikolas Zimmermann.
4
5         Incorrect offset of svg <use> element which is in <symbol> element
6         https://bugs.webkit.org/show_bug.cgi?id=57318
7
8         When webkit expanded a svg <symbol> element in the shadow tree it
9         would clone the children of the <symbol>. The children may contain
10         SVGShadowTreeContainerElement which was expanded from svg <use>
11         element. But the clone operation would clone a
12         SVGShadowTreeContainerElement as a svg <g> element. This resulted
13         that updateContainerOffset wouldn't update offset for those elements
14         which were expand from <use> elements.
15
16         This patch implements cloneElementWithoutAttributesAndChildren for
17         SVGShadowTreeContainerElement to make the container clone itself
18         correctly.
19
20         Test: svg/custom/use-in-symbol-with-offset.svg
21
22         * rendering/svg/SVGShadowTreeElements.cpp:
23         (WebCore::SVGShadowTreeContainerElement::cloneElementWithoutAttributesAndChildren):
24         * rendering/svg/SVGShadowTreeElements.h:
25
26 2011-03-29  Eric Seidel  <eric@webkit.org>
27
28         Reviewed by Ryosuke Niwa.
29
30         Rename InlineIterator::obj to m_obj to match modern style
31         https://bugs.webkit.org/show_bug.cgi?id=57319
32
33         I started this rename after confusion in InlineBidiResolver::appendRun.
34         (Which uses an "obj" local in InlineIterator.h.  It's not actually
35         masking m_obj because it's a separate class, but I didn't realize
36         that at the time because it's in InlineIterator.h which is itself confusing!)
37
38         * rendering/InlineIterator.h:
39         (WebCore::InlineIterator::InlineIterator):
40         (WebCore::operator==):
41         (WebCore::operator!=):
42         (WebCore::InlineIterator::increment):
43         (WebCore::InlineIterator::atEnd):
44         (WebCore::InlineIterator::current):
45         (WebCore::InlineIterator::direction):
46         (WebCore::InlineBidiResolver::appendRun):
47         * rendering/RenderBlockLineLayout.cpp:
48         (WebCore::checkMidpoints):
49         (WebCore::RenderBlock::appendRunsForObject):
50         (WebCore::RenderBlock::layoutInlineChildren):
51         (WebCore::RenderBlock::matchedEndLine):
52         (WebCore::skipNonBreakingSpace):
53         (WebCore::RenderBlock::requiresLineBox):
54         (WebCore::RenderBlock::skipTrailingWhitespace):
55         (WebCore::RenderBlock::skipLeadingWhitespace):
56         (WebCore::tryHyphenating):
57         (WebCore::RenderBlock::findNextLineBreak):
58
59 2011-03-29  Pavel Feldman  <pfeldman@chromium.org>
60
61         Reviewed by Yury Semikhatsky.
62
63         Web Inspector: document Timeline domain, make timeline event types of type string.
64         https://bugs.webkit.org/show_bug.cgi?id=57299
65
66         * inspector/Inspector.json:
67         * inspector/InspectorTimelineAgent.cpp:
68         (WebCore::InspectorTimelineAgent::pushGCEventRecords):
69         (WebCore::InspectorTimelineAgent::start):
70         (WebCore::InspectorTimelineAgent::stop):
71         (WebCore::InspectorTimelineAgent::willCallFunction):
72         (WebCore::InspectorTimelineAgent::didCallFunction):
73         (WebCore::InspectorTimelineAgent::willDispatchEvent):
74         (WebCore::InspectorTimelineAgent::didDispatchEvent):
75         (WebCore::InspectorTimelineAgent::willLayout):
76         (WebCore::InspectorTimelineAgent::didLayout):
77         (WebCore::InspectorTimelineAgent::willRecalculateStyle):
78         (WebCore::InspectorTimelineAgent::didRecalculateStyle):
79         (WebCore::InspectorTimelineAgent::willPaint):
80         (WebCore::InspectorTimelineAgent::didPaint):
81         (WebCore::InspectorTimelineAgent::willWriteHTML):
82         (WebCore::InspectorTimelineAgent::didWriteHTML):
83         (WebCore::InspectorTimelineAgent::didInstallTimer):
84         (WebCore::InspectorTimelineAgent::didRemoveTimer):
85         (WebCore::InspectorTimelineAgent::willFireTimer):
86         (WebCore::InspectorTimelineAgent::didFireTimer):
87         (WebCore::InspectorTimelineAgent::willChangeXHRReadyState):
88         (WebCore::InspectorTimelineAgent::didChangeXHRReadyState):
89         (WebCore::InspectorTimelineAgent::willLoadXHR):
90         (WebCore::InspectorTimelineAgent::didLoadXHR):
91         (WebCore::InspectorTimelineAgent::willEvaluateScript):
92         (WebCore::InspectorTimelineAgent::didEvaluateScript):
93         (WebCore::InspectorTimelineAgent::didScheduleResourceRequest):
94         (WebCore::InspectorTimelineAgent::willSendResourceRequest):
95         (WebCore::InspectorTimelineAgent::willReceiveResourceData):
96         (WebCore::InspectorTimelineAgent::didReceiveResourceData):
97         (WebCore::InspectorTimelineAgent::willReceiveResourceResponse):
98         (WebCore::InspectorTimelineAgent::didReceiveResourceResponse):
99         (WebCore::InspectorTimelineAgent::didFinishLoadingResource):
100         (WebCore::InspectorTimelineAgent::didMarkTimeline):
101         (WebCore::InspectorTimelineAgent::didMarkDOMContentEvent):
102         (WebCore::InspectorTimelineAgent::didMarkLoadEvent):
103         (WebCore::InspectorTimelineAgent::addRecordToTimeline):
104         (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
105         (WebCore::InspectorTimelineAgent::pushCurrentRecord):
106         * inspector/InspectorTimelineAgent.h:
107         (WebCore::InspectorTimelineAgent::TimelineRecordEntry::TimelineRecordEntry):
108         * inspector/front-end/TimelineAgent.js:
109         * inspector/front-end/TimelinePanel.js:
110         (WebInspector.TimelinePanel.prototype.get _recordStyles):
111         (WebInspector.TimelinePanel.prototype._createEventDivider):
112         (WebInspector.TimelinePanel.prototype._findParentRecord):
113         (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline):
114         (WebInspector.TimelineDispatcher.prototype.started):
115         (WebInspector.TimelineDispatcher.prototype.stopped):
116         (WebInspector.TimelineDispatcher.prototype.eventRecorded):
117         (WebInspector.TimelinePanel.FormattedRecord):
118         (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent):
119         (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails):
120
121 2011-03-29  Andrey Adaikin  <aandrey@google.com>
122
123         Reviewed by Pavel Feldman.
124
125         Web Inspector: Fixing live edits tests on chromium.
126         https://bugs.webkit.org/show_bug.cgi?id=57316
127
128         * inspector/front-end/ScriptsPanel.js:
129         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.editScriptSource):
130         * inspector/front-end/SourceFrame.js:
131         (WebInspector.SourceFrame.prototype._handleSave.didEditScriptSource):
132         (WebInspector.SourceFrame.prototype._handleSave):
133         (WebInspector.SourceFrameDelegate.prototype.editScriptSource):
134
135 2011-03-29  Pavel Podivilov  <podivilov@chromium.org>
136
137         Reviewed by Yury Semikhatsky.
138
139         Web Inspector: fix call frames positions in formatted scripts.
140         https://bugs.webkit.org/show_bug.cgi?id=57036
141
142         Introduce PresentationCallFrame class that encapsulates source mapping details from UI components.
143
144         * inspector/front-end/CallStackSidebarPane.js:
145         (WebInspector.CallStackSidebarPane.prototype.update.didGetSourceLocation):
146         (WebInspector.CallStackSidebarPane.prototype.update):
147         (WebInspector.CallStackSidebarPane.prototype.set selectedCallFrame):
148         (WebInspector.CallStackSidebarPane.prototype._placardSelected):
149         (WebInspector.CallStackSidebarPane.prototype._contextMenu):
150         (WebInspector.CallStackSidebarPane.prototype._copyStackTrace):
151         * inspector/front-end/DebuggerModel.js:
152         (WebInspector.DebuggerModel.prototype._didEditScriptSource):
153         (WebInspector.DebuggerModel.prototype.get debuggerPausedDetails):
154         (WebInspector.DebuggerModel.prototype._pausedScript):
155         * inspector/front-end/DebuggerPresentationModel.js:
156         (WebInspector.DebuggerPresentationModel):
157         (WebInspector.DebuggerPresentationModel.prototype.editScriptSource.didEditScriptSource):
158         (WebInspector.DebuggerPresentationModel.prototype.editScriptSource):
159         (WebInspector.DebuggerPresentationModel.prototype.toggleFormatSourceFiles):
160         (WebInspector.DebuggerPresentationModel.prototype._debuggerPaused):
161         (WebInspector.DebuggerPresentationModel.prototype._debuggerResumed):
162         (WebInspector.DebuggerPresentationModel.prototype.set selectedCallFrame):
163         (WebInspector.DebuggerPresentationModel.prototype.get selectedCallFrame):
164         (WebInspector.DebuggerPresentationModel.prototype._reset):
165         (WebInspector.PresenationCallFrame): Call frame wrapper for UI.
166         * inspector/front-end/ScriptsPanel.js:
167         (WebInspector.ScriptsPanel):
168         (WebInspector.ScriptsPanel.prototype.evaluateInSelectedCallFrame):
169         (WebInspector.ScriptsPanel.prototype._debuggerPaused.else.didGetSourceLocation):
170         (WebInspector.ScriptsPanel.prototype._debuggerPaused):
171         (WebInspector.ScriptsPanel.prototype._debuggerResumed):
172         (WebInspector.ScriptsPanel.prototype._sourceFrameLoaded):
173         (WebInspector.ScriptsPanel.prototype._callFrameSelected.didGetSourceLocation):
174         (WebInspector.ScriptsPanel.prototype._callFrameSelected):
175         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.evaluateInSelectedCallFrame):
176         * inspector/front-end/SourceFile.js:
177         (WebInspector.SourceFile.prototype.get content):
178         * inspector/front-end/SourceFrame.js:
179         (WebInspector.SourceFrame.prototype._createTextViewer):
180         (WebInspector.SourceFrame.prototype.setExecutionLine):
181         (WebInspector.SourceFrame.prototype.clearExecutionLine):
182         (WebInspector.SourceFrame.prototype._showPopup.showObjectPopup):
183         (WebInspector.SourceFrame.prototype._showPopup):
184
185 2011-03-29  Emil A Eklund  <eae@chromium.org>
186
187         Reviewed by Darin Adler.
188
189         Fix for execCommand("Delete") with an empty selection.
190         https://bugs.webkit.org/show_bug.cgi?id=56652
191
192         Test: editing/execCommand/delete-empty-container.html
193
194         * editing/TypingCommand.cpp:
195         (WebCore::TypingCommand::makeEditableRootEmpty): Add check for root element.
196
197 2011-03-29  Mikhail Naganov  <mnaganov@chromium.org>
198
199         Reviewed by Pavel Feldman.
200
201         Web Inspector: [Chromium] Refactor HeapSnapshot-related code to
202         make sure we don't return big amounts of data to forms.
203         https://bugs.webkit.org/show_bug.cgi?id=57227
204
205         * inspector/front-end/DetailedHeapshotGridNodes.js:
206         (WebInspector.HeapSnapshotGridNode.prototype.populateChildren):
207         (WebInspector.HeapSnapshotGenericObjectNode.prototype.get _countPercent):
208         (WebInspector.HeapSnapshotObjectNode):
209         (WebInspector.HeapSnapshotObjectNode.prototype._createProvider):
210         (WebInspector.HeapSnapshotInstanceNode):
211         (WebInspector.HeapSnapshotInstanceNode.prototype._createProvider):
212         (WebInspector.HeapSnapshotConstructorNode.prototype._createNodesProvider):
213         (WebInspector.HeapSnapshotConstructorNode.prototype.get _countPercent):
214         (WebInspector.HeapSnapshotDiffNode.prototype._createNodesProvider.createProvider):
215         (WebInspector.HeapSnapshotDiffNode.prototype._createNodesProvider):
216         (WebInspector.HeapSnapshotDominatorObjectNode.prototype._createProvider):
217         * inspector/front-end/DetailedHeapshotView.js:
218         (WebInspector.HeapSnapshotContainmentDataGrid.prototype.setDataSource):
219         (WebInspector.HeapSnapshotDominatorsDataGrid.prototype.setDataSource):
220         * inspector/front-end/HeapSnapshot.js:
221         (WebInspector.HeapSnapshotNode.prototype.get dominatorIndex):
222         (WebInspector.HeapSnapshotNode.prototype.get retainers):
223         (WebInspector.HeapSnapshot):
224         (WebInspector.HeapSnapshot.prototype.get _allNodes):
225         (WebInspector.HeapSnapshot.prototype.get nodeCount):
226         (WebInspector.HeapSnapshot.prototype.get rootNodeIndex):
227         (WebInspector.HeapSnapshot.prototype.hasId):
228         (WebInspector.HeapSnapshot.prototype.get nodeIds):
229         (WebInspector.HeapSnapshot.prototype._retainersForNode):
230         (WebInspector.HeapSnapshot.prototype._buildRetainers):
231         (WebInspector.HeapSnapshot.prototype._buildAggregates):
232         (WebInspector.HeapSnapshot.prototype._buildAggregatesIndexes):
233         (WebInspector.HeapSnapshot.prototype._buildIdsList):
234         (WebInspector.HeapSnapshot.prototype._buildNodeIndex):
235         (WebInspector.HeapSnapshotFilteredOrderedIterator):
236         (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.next):
237         (WebInspector.HeapSnapshotEdgesProvider):
238         (WebInspector.HeapSnapshotNodesProvider):
239
240 2011-03-29  Mikhail Naganov  <mnaganov@chromium.org>
241
242         Reviewed by Pavel Feldman.
243
244         Web Inspector: [Chromium] Fix detailed heap snapshots UI.
245         https://bugs.webkit.org/show_bug.cgi?id=57235
246
247         Fix two problems:
248           1. Text color of grid cells under selection needs to be white, otherwise it's unreadable for some colors;
249           2. Long strings need to be truncated in grid, their contents can be shown on hover.
250
251         * inspector/front-end/DetailedHeapshotView.js:
252         (WebInspector.DetailedHeapshotView.prototype._getHoverAnchor):
253         (WebInspector.DetailedHeapshotView.prototype._showStringContentPopup):
254         * inspector/front-end/heapProfiler.css:
255         (.detailed-heapshot-view .console-formatted-string):
256         (.detailed-heapshot-view .data-grid tr.selected *):
257         (.detailed-heapshot-view .data-grid:focus tr.selected *):
258
259 2011-03-29  Andrey Adaikin  <aandrey@google.com>
260
261         Reviewed by Yury Semikhatsky.
262
263         Web Inspector: Highlight visible lines first
264         https://bugs.webkit.org/show_bug.cgi?id=57013
265
266         * inspector/front-end/TextViewer.js:
267         (WebInspector.TextEditorChunkedPanel.prototype._findFirstVisibleChunkNumber):
268         (WebInspector.TextEditorChunkedPanel.prototype._findVisibleChunks):
269         (WebInspector.TextEditorChunkedPanel.prototype._findFirstVisibleLineNumber.compareLineRowOffsetTops):
270         (WebInspector.TextEditorChunkedPanel.prototype._findFirstVisibleLineNumber):
271         (WebInspector.TextEditorMainPanel.prototype._paintScheduledLines):
272         (WebInspector.TextEditorMainPanel.prototype._paintLines):
273         (WebInspector.TextEditorMainPanel.prototype._paintLineChunks):
274         (WebInspector.TextEditorMainPanel.prototype._paintLine):
275         (WebInspector.TextEditorMainChunk.prototype.set expanded):
276
277 2011-03-29  Emil A Eklund  <eae@chromium.org>
278
279         Reviewed by Dimitri Glazkov.
280
281         Relative mouse coordinates recalculated for each target
282         https://bugs.webkit.org/show_bug.cgi?id=57130
283
284         Calculate relative coordinates lazily for mouse events instead of doing
285         it for each target. Speeds up dispatching of mouse events in deep dom
286         structures significantly, O(n^2) to O(n).
287
288         Also fixes https://bugs.webkit.org/show_bug.cgi?id=34973
289
290         Tests: fast/events/mouse-relative-position.html
291                perf/mouse-event.html
292
293         * dom/Event.cpp:
294         (WebCore::Event::setTarget):
295         * dom/MouseRelatedEvent.cpp:
296         (WebCore::MouseRelatedEvent::MouseRelatedEvent):
297         (WebCore::MouseRelatedEvent::initCoordinates):
298         (WebCore::pageZoomFactor):
299         (WebCore::MouseRelatedEvent::receivedTarget):
300         (WebCore::MouseRelatedEvent::computeRelativePosition):
301         (WebCore::MouseRelatedEvent::layerX):
302         (WebCore::MouseRelatedEvent::layerY):
303         (WebCore::MouseRelatedEvent::offsetX):
304         (WebCore::MouseRelatedEvent::offsetY):
305         * dom/MouseRelatedEvent.h:
306         * dom/UIEvent.cpp:
307         (WebCore::UIEvent::layerX):
308         (WebCore::UIEvent::layerY):
309         * dom/UIEvent.h:
310
311 2011-03-29  Emil A Eklund  <eae@chromium.org>
312
313         Reviewed by Darin Adler.
314
315         getComputedStyle counterIncrement crash @ WebCore::counterToCSSValue
316         https://bugs.webkit.org/show_bug.cgi?id=57266
317
318         Add null check to counterToCSSValue.
319
320         Test: fast/css/getComputedStyle/counterIncrement-without-counter.html
321
322         * css/CSSComputedStyleDeclaration.cpp:
323         (WebCore::counterToCSSValue):
324
325 2011-03-29  Gavin Peters  <gavinp@chromium.org>
326
327         Reviewed by Tony Gentilcore.
328
329         Implement onerror events for <link rel=prefetch>
330         https://bugs.webkit.org/show_bug.cgi?id=57182
331
332         These events are equired on link elements, see
333         http://dev.w3.org/html5/spec/Overview.html#the-link-element
334
335         After a discussion in WebKit-dev about the direction of prefetch in the loader, and about a path
336         to adding the Link header, we decided to look at making onerror, onload and onbeforeload events
337         more uniformly supported.  See the thread at
338         https://lists.webkit.org/pipermail/webkit-dev/2011-February/016034.html .
339
340         It turned out that part of adding onerror for link prefetch was to make the top CachedResource less
341         abstract.  It was pure virtual until prefetch became the first consumer to use an unspecialised
342         implementation, and this CL continues that by adding a default checkNotify method to it.  As it
343         happens there were already two subclasses using what amounted to the generic checkNotify, so I
344         also removed those, buying us some code cleanup with the change.
345
346         Test: fast/dom/HTMLLinkElement/prefetch-onerror.html
347
348         * html/HTMLLinkElement.cpp:
349         (WebCore::HTMLLinkElement::parseMappedAttribute):
350         (WebCore::HTMLLinkElement::onloadTimerFired):
351         (WebCore::HTMLLinkElement::notifyFinished):
352         * loader/cache/CachedImage.cpp:
353         * loader/cache/CachedImage.h:
354         * loader/cache/CachedResource.cpp:
355         (WebCore::CachedResource::checkNotify):
356         (WebCore::CachedResource::data):
357         (WebCore::CachedResource::error):
358         * loader/cache/CachedResource.h:
359         * loader/cache/CachedScript.cpp:
360         * loader/cache/CachedScript.h:
361
362 2011-03-29  Eric Seidel  <eric@webkit.org>
363
364         Reviewed by Ryosuke Niwa.
365
366         Add support for parsing unicode-bidi: -webkit-isolate
367         https://bugs.webkit.org/show_bug.cgi?id=57181
368
369         Test: css3/unicode-bidi-insolate-parse.html
370
371         * WebCore.xcodeproj/project.pbxproj:
372         * css/CSSParser.cpp:
373         (WebCore::CSSParser::parseValue):
374         * css/CSSPrimitiveValueMappings.h:
375         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
376         (WebCore::CSSPrimitiveValue::operator EUnicodeBidi):
377         * css/CSSValueKeywords.in:
378         * rendering/style/RenderStyleConstants.h:
379
380 2011-03-29  Patrick Gansterer  <paroga@webkit.org>
381
382         Unreviewed WinCE build fix for r82193.
383
384         * platform/wince/FileSystemWinCE.cpp:
385         (WebCore::openTemporaryFile):
386
387 2011-03-28  Sheriff Bot  <webkit.review.bot@gmail.com>
388
389         Unreviewed, rolling out r82198.
390         http://trac.webkit.org/changeset/82198
391         https://bugs.webkit.org/show_bug.cgi?id=57304
392
393         Broke Chromium Win build. (Requested by dave_levin on
394         #webkit).
395
396         * platform/image-decoders/png/PNGImageDecoder.cpp:
397         (WebCore::PNGImageDecoder::headerAvailable):
398         (WebCore::PNGImageDecoder::rowAvailable):
399
400 2011-03-28  Ofri Wolfus  <ofri@google.com>
401
402         Reviewed by Eric Seidel.
403
404         RTL: Select elements with a size attribute are always left aligned.
405         https://bugs.webkit.org/show_bug.cgi?id=50928
406
407         Added support for alignment in RenderListBox.
408
409         Test: fast/forms/listbox-bidi-align.html
410
411         * rendering/RenderListBox.cpp:
412         (WebCore::itemOffsetForAlignment):
413         (WebCore::RenderListBox::paintItemForeground): Add support for alignment and directionality.
414
415 2011-03-28  Kwang Yul Seo  <skyul@company100.net>
416
417         Reviewed by Benjamin Poulain.
418
419         [Qt] Change TextureMapperVideoLayer to TextureMapperMediaLayer
420         https://bugs.webkit.org/show_bug.cgi?id=57142
421
422         TextureMapperMediaLayer is a better name here because both video and plugins use this layer.
423         Remove ENABLE(VIDEO) guard.
424
425         * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
426         * platform/graphics/qt/MediaPlayerPrivateQt.h:
427         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
428         (WebCore::GraphicsLayerTextureMapper::setContentsToMedia):
429         * platform/graphics/texmap/TextureMapperNode.h:
430         * platform/graphics/texmap/TextureMapperPlatformLayer.h:
431         (WebCore::TextureMapperMediaLayer::layerType):
432
433 2011-03-28  Thomas Klausner  <tk@giga.or.at>
434
435         Reviewed by David Levin.
436
437         png-1.5 fixes
438         https://bugs.webkit.org/show_bug.cgi?id=54406
439
440         Fix compilation with png-1.5: struct members were hidden, and
441         a new API to terminate data processing was added (especially for
442         WebKit).
443
444         Compilation fixes, so no new tests.
445
446         * platform/image-decoders/png/PNGImageDecoder.cpp:
447         (WebCore::PNGImageDecoder::headerAvailable):
448         (WebCore::PNGImageDecoder::rowAvailable):
449
450 2011-03-28  Kwang Yul Seo  <skyul@company100.net>
451
452         Reviewed by Adam Barth.
453
454         Replace fprintf(stderr, ...) with LOG_ERROR
455         https://bugs.webkit.org/show_bug.cgi?id=57216
456
457         LOG_ERROR is a better choice here.
458
459         * bridge/jni/v8/JavaClassV8.cpp:
460         (JavaClass::JavaClass):
461
462 2011-03-28  Steve Block  <steveblock@google.com>
463
464         Reviewed by Jeremy Orlow.
465
466         Add a new JavaValue to type to represent a Java value in the Java bridge
467         https://bugs.webkit.org/show_bug.cgi?id=57022
468
469         This change introduces a new JavaValue type and uses it in place of jvalue
470         in the conversions to and from JavaNPObject used in the V8 Java bridge.
471
472         Refactoring only, no new tests.
473
474         * WebCore.gypi:
475         * bridge/jni/JNIUtility.cpp:
476         (JSC::Bindings::javaTypeFromClassName):
477         (JSC::Bindings::signatureFromJavaType):
478         (JSC::Bindings::getJNIField):
479         (JSC::Bindings::callJNIMethod):
480         * bridge/jni/JavaType.h:
481         * bridge/jni/v8/JNIUtilityPrivate.cpp:
482         (JSC::Bindings::convertNPVariantToJavaValue):
483         (JSC::Bindings::convertJavaValueToNPVariant):
484         (JSC::Bindings::jvalueToJavaValue):
485         (JSC::Bindings::javaValueToJvalue):
486         * bridge/jni/v8/JNIUtilityPrivate.h:
487         * bridge/jni/v8/JavaNPObjectV8.cpp:
488         (JSC::Bindings::JavaNPObjectInvoke):
489         (JSC::Bindings::JavaNPObjectGetProperty):
490         * bridge/jni/v8/JavaValueV8.h: Added.
491         (JSC::Bindings::JavaValue::JavaValue):
492
493 2011-03-28  Patrick Gansterer  <paroga@webkit.org>
494
495         Reviewed by Darin Adler.
496
497         Use String instead of CString as return value of openTemporaryFile
498         https://bugs.webkit.org/show_bug.cgi?id=55332
499
500         We usually store all paths as UTF-16. Do this for temporary files too.
501
502         * WebCore.exp.in
503         * platform/FileSystem.h:
504         * platform/android/FileSystemAndroid.cpp:
505         * platform/brew/FileSystemBrew.cpp:
506         * platform/efl/FileSystemEfl.cpp:
507         * platform/gtk/FileSystemGtk.cpp:
508         * platform/haiku/FileSystemHaiku.cpp:
509         * platform/mac/FileSystemMac.mm:
510         * platform/qt/FileSystemQt.cpp:
511         * platform/win/FileSystemWin.cpp:
512         * platform/wince/FileSystemWinCE.cpp:
513         * platform/wx/FileSystemWx.cpp:
514         * plugins/PluginStream.cpp:
515         (WebCore::PluginStream::destroyStream):
516         * plugins/PluginStream.h:
517
518 2011-03-28  Jeff Johnson  <opendarwin@lapcatsoftware.com>
519
520         Reviewed by Pavel Feldman.
521
522         Web Inspector: empty, non-functional window
523         https://bugs.webkit.org/show_bug.cgi?id=56354
524
525         Check whether DOM local storage is enabled
526         before attempting to access window.localStorage.
527
528         No new tests.
529
530         * inspector/front-end/Settings.js:
531         (WebInspector.Settings.prototype.findSettingForAllProjects):
532         (WebInspector.Settings.prototype._get):
533         (WebInspector.Settings.prototype._set):
534
535 2011-03-28  Beth Dakin  <bdakin@apple.com>
536
537         Reviewed by Darin Adler.
538
539         Fix for https://bugs.webkit.org/show_bug.cgi?id=57286 Alternative fix for: 
540         Horizontal scroller stops appearing after going Forward
541         -and corresponding-
542         <rdar://problem/9026946>
543
544         This patch rolls out revision 79053 and fixes the same bug in a  better way.
545
546         New function resetScrollbarsAndClearContentsSize() calls resetScrollbars() and then 
547         sets the contents size to 0. This is called when a document is going into the page 
548         cache.
549         * dom/Document.cpp:
550         (WebCore::Document::setInPageCache):
551         (WebCore::FrameView::resetScrollbarsAndClearContentsSize):
552
553         Roll-out of 79053.
554         * history/CachedFrame.cpp:
555         (WebCore::CachedFrameBase::restore):
556         * page/FrameView.cpp:
557         (WebCore::FrameView::FrameView):
558         (WebCore::FrameView::reset):
559         (WebCore::FrameView::layout):
560         * page/FrameView.h:
561
562 2011-03-28  Ojan Vafai  <ojan@chromium.org>
563
564         Reviewed by Antti Koivisto.
565
566         fix style sharing with :any and sibling selectors
567         https://bugs.webkit.org/show_bug.cgi?id=57211
568
569         Test: fast/css/sibling-selectors.html
570
571         * css/CSSStyleSelector.cpp:
572         (WebCore::collectFeaturesFromList):
573
574 2011-03-27  Ojan Vafai  <ojan@chromium.org>
575
576         Reviewed by Antti Koivisto.
577
578         fix :-webkit-any(:last-child)
579         https://bugs.webkit.org/show_bug.cgi?id=57207
580
581         We were passing the wrong arguments to checkSelector. Also, we were not
582         passing through the encounteredLink bool.
583
584         * css/CSSStyleSelector.cpp:
585         (WebCore::CSSStyleSelector::SelectorChecker::checkSelector):
586         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
587         * css/CSSStyleSelector.h:
588
589 2011-03-27  Ojan Vafai  <ojan@chromium.org>
590
591         Reviewed by Antti Koivisto.
592
593         fix :-webkit-any(:last-child)
594         https://bugs.webkit.org/show_bug.cgi?id=57207
595
596         We were passing the wrong arguments to checkSelector. Also, we were not
597         passing through the encounteredLink bool.
598
599         * css/CSSStyleSelector.cpp:
600         (WebCore::CSSStyleSelector::SelectorChecker::checkSelector):
601         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
602         * css/CSSStyleSelector.h:
603
604 2011-03-28  Maciej Stachowiak  <mjs@apple.com>
605
606         Reviewed by Darin Adler.
607
608         REGRESSION(r82152): fast/dom/HTMLAnchorElement/set-href-attribute-pathname.html
609         https://bugs.webkit.org/show_bug.cgi?id=57291
610
611         * platform/KURL.cpp:
612         (WebCore::KURL::parse): Instead of considering URLs with
613         credentials but no host invalid, consider them to have a host
614         ending in @ (which fails down the line)/
615
616 2011-03-28  Kent Tamura  <tkent@chromium.org>
617
618         Reviewed by Dimitri Glazkov.
619
620         Fix some problems of the appearance of form validation message bubble.
621         https://bugs.webkit.org/show_bug.cgi?id=57208
622
623         No new tests. Validation message bubble appearance is not testable
624         because it depends on a timer.
625
626         * css/html.css:
627         (::-webkit-validation-bubble):
628         (::-webkit-validation-bubble-message):
629         (::-webkit-validation-bubble-arrow):
630         (::-webkit-validation-bubble-arrow-clipper):
631           - Explicitly set margin, padding, and color.
632           - Make the shadow darker.
633           - Make the background color darker.
634           - Make opacity larger.
635           - Make the border color lighter.
636           - Add inset shadows
637           - Change the implementation of an arrow.
638             Stop making a right triangle by the border trick.
639             Use -webkit-transform instead.
640           - Make min-width workable by changing display property of
641             -webkit-validation-bubble to "inline-block".
642         * html/ValidationMessage.cpp:
643         (WebCore::ValidationMessage::buildBubbleTree):
644           Change the node structure. Before this change, -webkit-validation-bubble
645           had three DIVs inside. After this change, it has two DIVs;
646           -webkit-validation-bubble-arrow-clipper and
647           -webkit-validation-bubble-message, and
648           -webkit-validation-bubble-arrow-clipper contains
649           -webkit-validation-bubble-arrow.
650
651 2011-03-28  Enrica Casucci  <enrica@apple.com>
652
653         Reviewed by Sam Weinig.
654
655         REGRESSION: Can't enter pasted with context or Edit menu text in search or address field in the browser.
656         https://bugs.webkit.org/show_bug.cgi?id=57275
657         <rdar://problem/8246691>
658
659         We need to classify cut and paste actions as user typing actions even when
660         the action is triggered by a context menu selection to
661         allow the propagation of the textDidChangeInTextField event.
662
663         * editing/EditorCommand.cpp:
664         The following methods have been modified to properly set up
665         the UserTypingGestureAction when the command source is the
666         menu or a key binding sequence.
667         (WebCore::executeCut):
668         (WebCore::executePaste):
669         (WebCore::executePasteAndMatchStyle):
670         (WebCore::executePasteAsPlainText):
671         (WebCore::executeDelete):
672         * page/ContextMenuController.cpp:
673         (WebCore::ContextMenuController::contextMenuItemSelected): Changed to
674         call execute command instead of referring to the specific method in
675         the editor class.
676
677 2011-03-28  Oliver Hunt  <oliver@apple.com>
678
679         Reviewed by Geoffrey Garen.
680
681         instanceof Array test fails when using iframes
682         https://bugs.webkit.org/show_bug.cgi?id=17250
683
684         Update for new function and date apis
685
686         Test: fast/js/js-constructors-use-correct-global.html
687
688         * WebCore.xcodeproj/project.pbxproj:
689         * bindings/js/JSDOMBinding.cpp:
690         (WebCore::jsDateOrNull):
691         * bindings/js/JSLazyEventListener.cpp:
692         (WebCore::JSLazyEventListener::initializeJSFunction):
693
694 2011-03-28  Beth Dakin  <bdakin@apple.com>
695
696         Reviewed by Darin Adler.
697
698         Fix for https://bugs.webkit.org/show_bug.cgi?id=57124 When the scroller style is 
699         changed via delegate method, the page needs a full relayout and repaint
700         -and corresponding-
701         <rdar://problem/9059129>
702
703         Call into WebKitSystemInterface to associate the new painter with the existing 
704         painter controller. Reset the scrollbar frame rects to the new thickness -- normally 
705         this only happens when a scrollbar is created, so we have to reset the thickness 
706         here to pick up the new theme thickness. Finally, force a full relayout and style 
707         recall with setNeedsRecalcStyleInAllFrames()
708         * platform/mac/ScrollAnimatorMac.mm:
709         (-[ScrollbarPainterControllerDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:]):
710
711         setNeedsRecalcStyleInAllFrames() used to be a static method in Settings.cpp. This 
712         patch moves it to be a member function on Page so that it can be called from 
713         FrameView when the scrollbar style changes.
714         * page/FrameView.cpp:
715         (WebCore::FrameView::setNeedsRecalcStyleInAllFrames):
716         * page/FrameView.h:
717         * page/Page.cpp:
718         (WebCore::Page::setNeedsRecalcStyleInAllFrames):
719         * page/Page.h:
720         * page/Settings.cpp:
721         (WebCore::Settings::setStandardFontFamily):
722         (WebCore::Settings::setFixedFontFamily):
723         (WebCore::Settings::setSerifFontFamily):
724         (WebCore::Settings::setSansSerifFontFamily):
725         (WebCore::Settings::setCursiveFontFamily):
726         (WebCore::Settings::setFantasyFontFamily):
727         (WebCore::Settings::setMinimumFontSize):
728         (WebCore::Settings::setMinimumLogicalFontSize):
729         (WebCore::Settings::setDefaultFontSize):
730         (WebCore::Settings::setDefaultFixedFontSize):
731         (WebCore::Settings::setTextAreasAreResizable):
732         (WebCore::Settings::setAuthorAndUserStylesEnabled):
733         (WebCore::Settings::setFontRenderingMode):
734         (WebCore::Settings::setAcceleratedCompositingEnabled):
735         (WebCore::Settings::setShowDebugBorders):
736         (WebCore::Settings::setShowRepaintCounter):
737         * platform/ScrollableArea.h:
738         (WebCore::ScrollableArea::setNeedsRecalcStyleInAllFrames):
739
740 2011-03-28  Dirk Pranke  <dpranke@chromium.org>
741
742         RS=Tony Chang.
743
744         r81977 moved FontPlatformData.h from
745         WebCore/platform/graphics/cocoa to platform/graphics. This
746         change updates the chromium build accordingly.
747
748         https://bugs.webkit.org/show_bug.cgi?id=57281
749
750         * platform/graphics/chromium/CrossProcessFontLoading.mm:
751
752 2011-03-28  Jer Noble  <jer.noble@apple.com>
753
754         Reviewed by Darin Adler.
755
756         MediaPlayerPrivateAVFoundation should report that it supportsFullScreen()
757         https://bugs.webkit.org/show_bug.cgi?id=57249
758
759         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
760         (WebCore::MediaPlayerPrivateAVFoundation::supportsFullscreen):
761         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
762
763 2011-03-28  Jer Noble  <jer.noble@apple.com>
764
765         Reviewed by Darin Adler.
766
767         AVFoundation can indeed support full screen.
768
769         MediaPlayerPrivateAVFoundation should report that it supportsFullScreen()
770         https://bugs.webkit.org/show_bug.cgi?id=57249
771
772         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
773         (WebCore::MediaPlayerPrivateAVFoundation::supportsFullscreen): Return true if using
774             the new full screen APIs.
775         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
776
777 2011-03-28  Eric Carlson  <eric.carlson@apple.com>
778
779         Reviewed by Darin Adler.
780
781         http streams don't always display video with AVFoundation backend
782         https://bugs.webkit.org/show_bug.cgi?id=57203
783
784         No new tests, we don't currently have tests for http live streams. Changes verified manually.
785
786         * platform/graphics/MediaPlayer.cpp:
787         (WebCore::MediaPlayer::MediaPlayer): Initialize m_shouldPrepareToRender.
788         (WebCore::MediaPlayer::loadWithNextMediaEngine): Call prepareForRendering on new engine
789             if m_shouldPrepareToRender is set.
790         (WebCore::MediaPlayer::prepareForRendering): Set m_shouldPrepareToRender.
791         * platform/graphics/MediaPlayer.h:
792
793         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
794         (WebCore::MediaPlayerPrivateAVFoundation::isReadyForVideoSetup): Don't return true until
795             m_isAllowedToRender has been set.
796         (WebCore::MediaPlayerPrivateAVFoundation::prepareForRendering): Always call setUpVideoRendering,
797             it has logic to figure out when setup is required.
798         (WebCore::MediaPlayerPrivateAVFoundation::updateStates): Call setUpVideoRendering when we aren't
799             using the preferred rendering mode because if we get a file's metadata between the
800             time supportsAcceleratedRendering() and paint() are called, we will allocate a software
801             renderer even when we prefer a layer backed renderer.
802         (WebCore::MediaPlayerPrivateAVFoundation::movieLoadType): Return "unknown" until we have metadata.
803
804         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h:
805         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
806         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): Use itemKVOProperties() instead of
807             an explicit list of key path names.
808         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerForURL): Ditto.
809         (WebCore::MediaPlayerPrivateAVFoundationObjC::beginLoadingMetadata): metadataKeyNames renamed
810             to assetMetadataKeyNames, return an NSArray instead of a CFArrayRef since that is what the
811             callers need.
812         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration): Return the duration of the 
813             player item, not the asset, because AVAsset.duration always returns an indefinite time
814             for all streaming files.
815         (WebCore::MediaPlayerPrivateAVFoundationObjC::assetStatus): metadataKeyNames renamed
816             to assetMetadataKeyNames.
817         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintCurrentFrameInContext): Do nothing until
818             metadata is available.
819         (WebCore::MediaPlayerPrivateAVFoundationObjC::paint): Ditto.
820         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Split size calculation logic off
821             into sizeChanged().
822         (WebCore::MediaPlayerPrivateAVFoundationObjC::sizeChanged): New. Use AVPlayerItem.presentationSize
823             until tracks is non-NULL so we have a size as early as possible.
824         (WebCore::MediaPlayerPrivateAVFoundationObjC::assetMetadataKeyNames): Renamed from metadataKeyNames.
825         (WebCore::MediaPlayerPrivateAVFoundationObjC::itemKVOProperties): New, return an array of
826             KVO observable properties.
827         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): Respond to 
828             presentationSize change.
829
830 2011-03-28  Anders Carlsson  <andersca@apple.com>
831
832         Reviewed by Sam Weinig.
833
834         Search field focus ring is missing
835         https://bugs.webkit.org/show_bug.cgi?id=57270
836         <rdar://problem/8765555>
837
838         Add an _automaticFocusRingDisabled method which returns YES.
839
840         * platform/mac/ThemeMac.mm:
841         (-[WebCoreFlippedView _automaticFocusRingDisabled]):
842
843 2011-03-28  Dimitri Glazkov  <dglazkov@chromium.org>
844
845         Reviewed by Darin Adler.
846
847         Move more events to EventDispatcher.
848         https://bugs.webkit.org/show_bug.cgi?id=57247
849
850         No functional changes, covered by existing tests.
851
852         * dom/EventDispatcher.cpp:
853         (WebCore::eventTargetRespectingSVGTargetRules): Made a static function,
854             since it's not used anywhere outside of the EventDispatcher.
855         (WebCore::EventDispatcher::dispatchScopedEvent): Moved from Node.cpp.
856         (WebCore::EventDispatcher::dispatchKeyEvent): Ditto.
857         (WebCore::EventDispatcher::dispatchWheelEvent): Ditto.
858         (WebCore::EventDispatcher::dispatchEvent): Changed to use eventTargetRespectingSVGTargetRules
859             as a static function.
860         * dom/EventDispatcher.h: Updated decls.
861         * dom/Node.cpp:
862         (WebCore::Node::dispatchScopedEvent): Replaced with calling EventDispatcher.
863         (WebCore::Node::dispatchKeyEvent): Ditto.
864         (WebCore::Node::dispatchWheelEvent): Ditto.
865
866 2011-03-28  Adele Peterson  <adele@apple.com>
867
868         Reviewed by Eric Seidel.
869
870         Fix for <rdar://problem/9112694> REGRESSION (r79411): "Check grammar with spelling" context menu doesn't check as you type
871         https://bugs.webkit.org/show_bug.cgi?id=57173
872
873         Test: editing/spelling/grammar.html
874
875         * WebCore.exp.in: Add symbol for new selectionStartHasMarkerFor method.
876         * editing/Editor.cpp:
877         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): Every use of paragraph is specific to spelling or grammar, 
878          so to avoid confusion, we should explicitly use spellingParagraph or grammarParagraph.  In the case of this bug, 
879          when we're consider ambiguous boundary characters (characters that could indicate word boundaries, but are used 
880          in the middle of words too, like apostrophes), we should use the use the spellingParagraph since the spellingParagraph 
881          is the only one operated on when this information is used.
882          (WebCore::Editor::selectionStartHasMarkerFor): Changed from selectionStartHasSpellingMarkerFor so it can check for grammar as well as spelling.
883         * editing/Editor.h:
884
885 2011-03-28  Dan Bernstein  <mitz@apple.com>
886
887         Reviewed by Darin Adler.
888
889         <rdar://problem/8895977> REGRESSION: multicol crashes with positioned elements
890         https://bugs.webkit.org/show_bug.cgi?id=48983
891
892         Test: fast/multicol/paginated-layer-crash.html
893
894         * rendering/RenderLayer.cpp:
895         (WebCore::RenderLayer::paintPaginatedChildLayer): Bring the logic for finding pagintating layers
896         into sync with updatePagination() after r68069.
897         (WebCore::RenderLayer::hitTestPaginatedChildLayer): Ditto.
898
899 2011-03-28  Maciej Stachowiak  <mjs@apple.com>
900
901         Reviewed by Darin Adler' .
902
903         URLSs with non-empty username but empty hostname treat first path segment as hostname, potentially enabling XSS
904         https://bugs.webkit.org/show_bug.cgi?id=57220
905
906         Test: http/tests/uri/username-with-no-hostname.html
907
908         * platform/KURL.cpp:
909         (WebCore::hostPortIsEmptyButUserPassIsNot):
910         (WebCore::KURL::parse):
911
912 2011-03-28  Adam Barth  <abarth@webkit.org>
913
914         Reviewed by Eric Seidel.
915
916         script-src should block inline event handlers
917         https://bugs.webkit.org/show_bug.cgi?id=57212
918
919         I considered wrapping this into the canExecute check, but that approach
920         would require passing that function a bunch of context information to
921         behave correctly once we add support for the "options" directive that
922         re-enables these features.
923
924         Test: http/tests/security/contentSecurityPolicy/script-src-none-inline-event.html
925
926         * bindings/js/JSLazyEventListener.cpp:
927         (WebCore::JSLazyEventListener::initializeJSFunction):
928             - This function was a mess.  I couldn't resist cleaning it up a
929               bunch.  Notice that we ASSERT at the beginning of the function
930               that scriptExecutionContext is a document and that both ways of
931               getting the global object are the same when document->frame() is
932               non-zero because the document must be active and there is a
933               one-to-one relation between Frames and active Documents.
934         * bindings/v8/V8LazyEventListener.cpp:
935         (WebCore::V8LazyEventListener::prepareListenerObject):
936         * page/ContentSecurityPolicy.cpp:
937         (WebCore::ContentSecurityPolicy::allowInlineEventHandlers):
938         * page/ContentSecurityPolicy.h:
939
940 2011-03-28  Jeff Miller  <jeffm@apple.com>
941
942         Reviewed by Adam Roben.
943
944         ResourceError::certificate() should return a PCCERT_CONTEXT
945         https://bugs.webkit.org/show_bug.cgi?id=57262
946
947         * platform/network/cf/ResourceError.h: certificate() now returns a PCCERT_CONTEXT.
948         * platform/network/cf/ResourceErrorCF.cpp:
949         (WebCore::ResourceError::certificate): Added.
950
951 2011-03-28  David Hyatt  <hyatt@apple.com>
952
953         Reviewed by Simon Fraser and Darin Adler.
954
955         https://bugs.webkit.org/show_bug.cgi?id=57221, memory corruption/crashes when positioned objects
956         occur at the end of a line.
957         
958         The old code and new code for dealing with a trailing space object midpoint manipulated a raw
959         array instead of the Vector. Otherwise this corruption would have been caught prior to check-in.
960         
961         I have patched the code to only go through the Vector and to make it handle the case that led to
962         the corruption. Trailing positioned objects can occur both prior to and following the trailing space
963         object's midpoint, so we have to be prepared to deal with both cases.
964         
965         This is already tested by fast/block/positioning/052.html, and that test now properly progresses
966         like the other positioning tests did.
967
968         * rendering/RenderBlockLineLayout.cpp:
969         (WebCore::RenderBlock::findNextLineBreak):
970
971 2011-03-28  Andrei Popescu  <andreip@google.com>
972
973         Reviewed by Steve Block.
974
975         V8IDBKeyCustom.cpp does not compile with INDEXED_DATABASE disabled
976         https://bugs.webkit.org/show_bug.cgi?id=57100
977
978         Close the ENABLE guard and the namespace in the right order.
979
980         No new tests, just cleanup.
981
982         * bindings/v8/custom/V8IDBAnyCustom.cpp:
983         * bindings/v8/custom/V8IDBKeyCustom.cpp:
984
985 2011-03-28  Jeff Miller  <jeffm@apple.com>
986
987         Reviewed by Adam Roben.
988
989         Include certificate when sending a WebCore::ResourceError to UI process on Windows
990         https://bugs.webkit.org/show_bug.cgi?id=57195
991
992         Add support for tracking the certificate in WebCore::ResourceError.
993
994         * platform/network/ResourceErrorBase.cpp:
995         (WebCore::ResourceErrorBase::copy): Call platformCopy() to copy platform-specific fields.
996         * platform/network/ResourceErrorBase.h:
997         (WebCore::ResourceErrorBase::platformCopy): Added.
998         * platform/network/cf/ResourceError.h: Added constructor that takes certificate data, shadowed platformCopy, added m_certificate.
999         (WebCore::ResourceError::certificate): Added.
1000         * platform/network/cf/ResourceErrorCF.cpp:
1001         (WebCore::ResourceError::ResourceError): Added constructor that takes certificate data.
1002         (WebCore::ResourceError::platformLazyInit): Read any certificate from the userInfo dictionary.
1003         (WebCore::ResourceError::platformCopy): Copy m_certificate.
1004         (WebCore::ResourceError::cfError): Add any certificate data to the userInfo dictionary in the CFErrorRef.
1005
1006 2011-03-28  Jessie Berlin  <jberlin@apple.com>
1007
1008         Rubber-stamped by Adam Roben.
1009
1010         Add an extra newline to the end of the generated Inspector.idl file so that it does not
1011         trigger the Windows "no newline at at end of file" warning.
1012
1013         * inspector/generate-inspector-idl:
1014
1015 2011-03-28  Csaba Osztrogon√°c  <ossy@webkit.org>
1016
1017         Buildfix after r82125.
1018
1019         [Qt] QtWebKit will not compile with QT_ASCII_CAST_WARNINGS enabled
1020         https://bugs.webkit.org/show_bug.cgi?id=57087
1021
1022         * platform/graphics/qt/MediaPlayerPrivateQt.cpp: Convert all char* to QString explicitly.
1023         (WebCore::MediaPlayerPrivateQt::getSupportedTypes):
1024         (WebCore::MediaPlayerPrivateQt::commitLoad):
1025
1026 2011-03-28  Sheriff Bot  <webkit.review.bot@gmail.com>
1027
1028         Unreviewed, rolling out r82099.
1029         http://trac.webkit.org/changeset/82099
1030         https://bugs.webkit.org/show_bug.cgi?id=57245
1031
1032         Breaks live edits tests on chromium. (Requested by pfeldman on
1033         #webkit).
1034
1035         * inspector/front-end/ScriptsPanel.js:
1036         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.editScriptSource):
1037         * inspector/front-end/SourceFrame.js:
1038         (WebInspector.SourceFrame.prototype._handleSave):
1039         (WebInspector.SourceFrameDelegate.prototype.editScriptSource):
1040
1041 2011-03-28  Pavel Feldman  <pfeldman@chromium.org>
1042
1043         Reviewed by Yury Semikhatsky.
1044
1045         Web Inspector: brush up and rename debugger domain functions.
1046         https://bugs.webkit.org/show_bug.cgi?id=57240
1047
1048         * inspector/Inspector.json:
1049         * inspector/InspectorAgent.cpp:
1050         (WebCore::InspectorAgent::setFrontend):
1051         (WebCore::InspectorAgent::postWorkerNotificationToFrontend):
1052         * inspector/InspectorDebuggerAgent.cpp:
1053         (WebCore::InspectorDebuggerAgent::setBreakpointsActive):
1054         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
1055         (WebCore::InspectorDebuggerAgent::setBreakpoint):
1056         (WebCore::InspectorDebuggerAgent::removeBreakpoint):
1057         (WebCore::InspectorDebuggerAgent::editScriptSource):
1058         (WebCore::InspectorDebuggerAgent::setPauseOnExceptionsState):
1059         (WebCore::InspectorDebuggerAgent::didParseSource):
1060         (WebCore::InspectorDebuggerAgent::failedToParseSource):
1061         (WebCore::InspectorDebuggerAgent::didPause):
1062         (WebCore::InspectorDebuggerAgent::didContinue):
1063         * inspector/InspectorDebuggerAgent.h:
1064         * inspector/front-end/DebuggerModel.js:
1065         (WebInspector.DebuggerModel.prototype.setBreakpoint):
1066         (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
1067         (WebInspector.DebuggerModel.prototype.removeBreakpoint):
1068         (WebInspector.DebuggerModel.prototype._didEditScriptSource):
1069         (WebInspector.DebuggerDispatcher.prototype.paused):
1070         (WebInspector.DebuggerDispatcher.prototype.resumed):
1071         (WebInspector.DebuggerDispatcher.prototype.scriptParsed):
1072         (WebInspector.DebuggerDispatcher.prototype.scriptFailedToParse):
1073         (WebInspector.DebuggerDispatcher.prototype.breakpointResolved):
1074         * inspector/front-end/ScriptsPanel.js:
1075         (WebInspector.ScriptsPanel.prototype.toggleBreakpointsClicked):
1076         * inspector/front-end/inspector.js:
1077         (WebInspector.didCreateWorker):
1078         (WebInspector.didDestroyWorker):
1079
1080 2011-03-28  David Kilzer  <ddkilzer@apple.com>
1081
1082         <http://webkit.org/b/57239> Use forward class declaration instead of including header
1083
1084         Reviewed by Dan Bernstein.
1085
1086         Adding a "using namespace WebCore;" statement in a header may
1087         cause issues when <WebCore/Length.h> is included before
1088         <CoreText/CoreText.h>.
1089
1090         Length.h defines the LengthType enum with a 'Fixed' value.
1091         CoreText.h includes MacTypes.h, which has a
1092         "typedef SInt32 Fixed;" statement, and then CoreText.h includes
1093         other headers that also use 'Fixed', but expect the typedef to
1094         be defined, not the enum.  If another header includes
1095         "using namespace WebCore;" before CoreText.h, the
1096         following compiler errors result (paths abbreviated):
1097
1098             CoreText.framework/Headers/SFNTLayoutTypes.h:689: error: reference to 'Fixed' is ambiguous
1099             MacTypes.h:184: error: candidates are: typedef SInt32 Fixed
1100             Length.h:37: error:                 WebCore::LengthType WebCore::Fixed
1101             SFNTLayoutTypes.h:689: error: 'Fixed' does not name a type
1102
1103         * platform/mac/HTMLConverter.h: Use forward declaration of
1104         DocumentLoader class instead of including header.  Remove the
1105         unused "using namespace WebCore;" statement.
1106
1107 2011-03-26  Dimitri Glazkov  <dglazkov@chromium.org>
1108
1109         Reviewed by Eric Seidel.
1110
1111         Introduce EventDispatcher, the new common way to fire events.
1112         https://bugs.webkit.org/show_bug.cgi?id=57168
1113
1114         The goal here is two-fold:
1115         1) reduce the need to randomly sprinkle guards around the dispatch code
1116         by creating a well-scoped abstraction for dispatching events.
1117         2) create a place where fiddly event-related things like creating event
1118         contexts for ancestors can be done lazily.
1119
1120         Additionally, with all the free-standing static functions, this code was
1121         just begging to come out of Node.cpp.
1122
1123         The first step is a near-mechanical extraction of mouse-related events
1124         from Node.cpp to EventDispatcher. For now, the call sites are just
1125         replaced with invoking EventDispatcher. Later, we can remove these methods
1126         from Node.
1127
1128         Refactoring, no functional changes.
1129
1130         * Android.mk: Added EventDispatcher to build system.
1131         * CMakeLists.txt: Ditto.
1132         * GNUmakefile.am: Ditto.
1133         * WebCore.gypi: Ditto.
1134         * WebCore.pro: Ditto.
1135         * WebCore.vcproj/WebCore.vcproj: Ditto.
1136         * WebCore.xcodeproj/project.pbxproj: Ditto.
1137         * dom/DOMAllInOne.cpp: Ditto.
1138         * dom/EventDispatcher.cpp: Added.
1139         * dom/EventDispatcher.h: Added.
1140         * dom/Node.cpp:
1141         (WebCore::Node::dispatchScopedEvent): Replaced to use EventDispatcher.
1142         (WebCore::Node::dispatchEvent): Ditto.
1143         (WebCore::Node::dispatchMouseEvent): Ditto.
1144         (WebCore::Node::dispatchSimulatedClick): Ditto.
1145         * dom/Node.h: Updated decls.
1146
1147 2011-03-28  Dan Bernstein  <mitz@apple.com>
1148
1149         Reviewed by Maciej Stachowiak.
1150
1151         <rdar://problem/9003382> Incomplete repaint of overflow in flipped lines writing modes
1152         https://bugs.webkit.org/show_bug.cgi?id=57197
1153
1154         Tests: fast/repaint/overflow-flipped-writing-mode-block.html
1155                fast/repaint/overflow-flipped-writing-mode-table.html
1156
1157         * rendering/RenderBlock.cpp:
1158         (WebCore::RenderBlock::paint): Flip the overflow rect before testing for intersection
1159         with the damage rect.
1160         * rendering/RenderTable.cpp:
1161         (WebCore::RenderTable::paint): Made the intersection check more like the one in
1162         RenderBlock::paint().
1163
1164 2011-03-28  Xiaomei Ji  <xji@chromium.org>
1165
1166         Reviewed by Ryosuke Niwa.
1167
1168         move directionOfEnclosingBlock() to be global so that it could be reused.
1169         https://bugs.webkit.org/show_bug.cgi?id=57233.
1170
1171         Provide global function directionOfEnclosingBlock(Node*) so that it could be
1172         reused in SelectionController and other functionalities that need enclosing
1173         block's direcionality, such as moving caret by word in visual order.
1174       
1175         No new functionality, so no new tests.
1176
1177         * editing/SelectionController.cpp:
1178         (WebCore::SelectionController::directionOfEnclosingBlock):
1179         * editing/htmlediting.cpp:
1180         (WebCore::directionOfEnclosingBlock):
1181         * editing/htmlediting.h:
1182
1183 2011-03-28  Jarkko Sakkinen  <jarkko.j.sakkinen@gmail.com>
1184
1185         Reviewed by Benjamin Poulain.
1186
1187         [Qt] fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html fails
1188         https://bugs.webkit.org/show_bug.cgi?id=56825
1189
1190         Fixes for context attribute handling:
1191         - Initialize depth and stencil buffer depending on whether they
1192         are enabled in context attributes.
1193         - Always enable depth buffer when stencil buffer is enabled.
1194         - Disable stencil buffer on OpenGL ES 2.0
1195         - Cleaned up clutter code from initialization. Made code paths 
1196         more sane.
1197         - Clear mask is now set correctly in reshape().
1198
1199         Tests: fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html
1200
1201         * platform/graphics/qt/GraphicsContext3DQt.cpp:
1202         (WebCore::GraphicsContext3DInternal::isValid):
1203         (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal):
1204         (WebCore::GraphicsContext3DInternal::reshape):
1205         (WebCore::GraphicsContext3DInternal::paint):
1206         (WebCore::GraphicsContext3DInternal::getProcAddress):
1207         (WebCore::GraphicsContext3D::GraphicsContext3D):
1208         (WebCore::GraphicsContext3D::reshape):
1209         (WebCore::GraphicsContext3D::bindFramebuffer):
1210
1211 2011-03-28  Pavel Feldman  <pfeldman@chromium.org>
1212
1213         Reviewed by Yury Semikhatsky.
1214
1215         Web Inspector: rename network domain events from didHappenSomething to somethingHappened.
1216         https://bugs.webkit.org/show_bug.cgi?id=57226
1217
1218         * inspector/Inspector.json:
1219         * inspector/InspectorResourceAgent.cpp:
1220         (WebCore::InspectorResourceAgent::willSendRequest):
1221         (WebCore::InspectorResourceAgent::markResourceAsCached):
1222         (WebCore::InspectorResourceAgent::didReceiveResponse):
1223         (WebCore::InspectorResourceAgent::didReceiveContentLength):
1224         (WebCore::InspectorResourceAgent::didFinishLoading):
1225         (WebCore::InspectorResourceAgent::didFailLoading):
1226         (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
1227         (WebCore::InspectorResourceAgent::setInitialContent):
1228         (WebCore::InspectorResourceAgent::didCommitLoad):
1229         (WebCore::InspectorResourceAgent::frameDetachedFromParent):
1230         (WebCore::InspectorResourceAgent::didCreateWebSocket):
1231         (WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
1232         (WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
1233         (WebCore::InspectorResourceAgent::didCloseWebSocket):
1234         * inspector/front-end/NetworkManager.js:
1235         (WebInspector.NetworkDispatcher.prototype.requestWillBeSent):
1236         (WebInspector.NetworkDispatcher.prototype.resourceMarkedAsCached):
1237         (WebInspector.NetworkDispatcher.prototype.responseReceived):
1238         (WebInspector.NetworkDispatcher.prototype.dataReceived):
1239         (WebInspector.NetworkDispatcher.prototype.loadingFinished):
1240         (WebInspector.NetworkDispatcher.prototype.loadingFailed):
1241         (WebInspector.NetworkDispatcher.prototype.resourceLoadedFromMemoryCache):
1242         (WebInspector.NetworkDispatcher.prototype.frameDetached):
1243         (WebInspector.NetworkDispatcher.prototype.initialContentSet):
1244         (WebInspector.NetworkDispatcher.prototype.frameNavigated):
1245         (WebInspector.NetworkDispatcher.prototype.webSocketCreated):
1246         (WebInspector.NetworkDispatcher.prototype.webSocketWillSendHandshakeRequest):
1247         (WebInspector.NetworkDispatcher.prototype.webSocketHandshakeResponseReceived):
1248         (WebInspector.NetworkDispatcher.prototype.webSocketClosed):
1249
1250 2011-03-28  Mikhail Naganov  <mnaganov@chromium.org>
1251
1252         Reviewed by Pavel Feldman.
1253
1254         WebInspector: [Chromium] Delete native CPU profiles and heap snapshots on binding disposal.
1255         https://bugs.webkit.org/show_bug.cgi?id=57099
1256
1257         * bindings/v8/ScriptHeapSnapshot.cpp:
1258         (WebCore::ScriptHeapSnapshot::~ScriptHeapSnapshot):
1259         * bindings/v8/ScriptHeapSnapshot.h:
1260         * bindings/v8/ScriptProfile.cpp:
1261         (WebCore::ScriptProfile::~ScriptProfile):
1262         * bindings/v8/ScriptProfile.h:
1263         * inspector/InspectorProfilerAgent.cpp:
1264         (WebCore::InspectorProfilerAgent::resetState):
1265
1266 2011-03-24  Pavel Podivilov  <podivilov@chromium.org>
1267
1268         Reviewed by Yury Semikhatsky.
1269
1270         Web Inspector: fix console messages positions in formatted scripts.
1271         https://bugs.webkit.org/show_bug.cgi?id=57010
1272
1273         * inspector/front-end/DebuggerPresentationModel.js:
1274         (WebInspector.DebuggerPresentationModel):
1275         (WebInspector.DebuggerPresentationModel.prototype.toggleFormatSourceFiles):
1276         (WebInspector.DebuggerPresentationModel.prototype.addConsoleMessage.didRequestMapping):
1277         (WebInspector.DebuggerPresentationModel.prototype.addConsoleMessage):
1278         (WebInspector.DebuggerPresentationModel.prototype.clearConsoleMessages):
1279         (WebInspector.DebuggerPresentationModel.prototype._reset):
1280         * inspector/front-end/ResourceTreeModel.js:
1281         (WebInspector.ResourceTreeModel.prototype.addConsoleMessage):
1282         * inspector/front-end/ScriptsPanel.js:
1283         (WebInspector.ScriptsPanel):
1284         (WebInspector.ScriptsPanel.prototype.addConsoleMessage):
1285         (WebInspector.ScriptsPanel.prototype.clearConsoleMessages):
1286         (WebInspector.ScriptsPanel.prototype._consoleMessageAdded):
1287         (WebInspector.ScriptsPanel.prototype.reset):
1288         (WebInspector.ScriptsPanel.prototype._sourceFrameLoaded):
1289         * inspector/front-end/SourceFile.js:
1290         (WebInspector.SourceFile):
1291         * inspector/front-end/SourceFrame.js:
1292         (WebInspector.SourceFrame.prototype.addMessage):
1293         (WebInspector.SourceFrame.prototype._addExistingMessagesToSource):
1294         (WebInspector.SourceFrame.prototype.addMessageToSource):
1295
1296 2011-03-27  Pavel Feldman  <pfeldman@chromium.org>
1297
1298         Reviewed by Yury Semikhatsky.
1299
1300         Web Inspector: refactor ResourceTreeModel to remove poor dependencies.
1301         https://bugs.webkit.org/show_bug.cgi?id=57186
1302
1303         - ResourceTreeModel is now event target (Object)
1304         - There is no ResourceTreeModel -> UI dependencies
1305         - NetworkManager -> ResourceTreeModel dependencies has been removed
1306         - NetworkManager is no longer dealing with the resources tree, it is only responsible for network events
1307         - ResourceTreeModel requests tree structure from the backend separately
1308         - Cached resources tree payload is now limited to url and type (no headers involved)
1309         - Resources tree is being rendered lazily upon request from the panel.
1310
1311         * inspector/Inspector.json:
1312         * inspector/InspectorResourceAgent.cpp:
1313         (WebCore::InspectorResourceAgent::resourceContent):
1314         (WebCore::InspectorResourceAgent::resourceContentBase64):
1315         (WebCore::buildObjectForFrameTree):
1316         (WebCore::InspectorResourceAgent::enable):
1317         (WebCore::InspectorResourceAgent::getCachedResources):
1318         (WebCore::InspectorResourceAgent::getResourceContent):
1319         * inspector/InspectorResourceAgent.h:
1320         * inspector/InspectorStyleSheet.cpp:
1321         (WebCore::InspectorStyleSheet::resourceStyleSheetText):
1322         * inspector/front-end/InspectorFrontendHostStub.js:
1323         (.WebInspector.InspectorFrontendHostStub.prototype.sendMessageToBackend):
1324         (.WebInspector.InspectorFrontendHostStub.prototype.loadSessionSetting):
1325         * inspector/front-end/NetworkManager.js:
1326         (WebInspector.NetworkManager):
1327         (WebInspector.NetworkManager.prototype.frontendReused):
1328         (WebInspector.NetworkManager.prototype.requestContent):
1329         (WebInspector.NetworkDispatcher):
1330         (WebInspector.NetworkDispatcher.prototype.didReceiveResponse):
1331         (WebInspector.NetworkDispatcher.prototype.didLoadResourceFromMemoryCache):
1332         (WebInspector.NetworkDispatcher.prototype.frameDetachedFromParent):
1333         (WebInspector.NetworkDispatcher.prototype.didCommitLoadForFrame):
1334         * inspector/front-end/NetworkPanel.js:
1335         (WebInspector.NetworkPanel):
1336         (WebInspector.NetworkPanel.prototype._updateSummaryBar):
1337         (WebInspector.NetworkPanel.prototype._onFrameCommitLoad):
1338         * inspector/front-end/ResourceTreeModel.js:
1339         (WebInspector.ResourceTreeModel):
1340         (WebInspector.ResourceTreeModel.prototype.frontendReused):
1341         (WebInspector.ResourceTreeModel.prototype._processCachedResources):
1342         (WebInspector.ResourceTreeModel.prototype._addOrUpdateFrame):
1343         (WebInspector.ResourceTreeModel.prototype.frames):
1344         (WebInspector.ResourceTreeModel.prototype.subframes):
1345         (WebInspector.ResourceTreeModel.prototype.resources):
1346         (WebInspector.ResourceTreeModel.prototype._onCommitLoad):
1347         (WebInspector.ResourceTreeModel.prototype._onFrameDetachedFromParent):
1348         (WebInspector.ResourceTreeModel.prototype._onResourceUpdated):
1349         (WebInspector.ResourceTreeModel.prototype._addResourceToFrame):
1350         (WebInspector.ResourceTreeModel.prototype.resourceForURL):
1351         (WebInspector.ResourceTreeModel.prototype._bindResourceURL):
1352         (WebInspector.ResourceTreeModel.prototype._clearChildFramesAndResources):
1353         (WebInspector.ResourceTreeModel.prototype._clearResources):
1354         (WebInspector.ResourceTreeModel.prototype._callForFrameResources):
1355         (WebInspector.ResourceTreeModel.prototype._unbindResourceURL):
1356         (WebInspector.ResourceTreeModel.prototype._addFramesRecursively):
1357         (WebInspector.ResourceTreeModel.prototype._createResource):
1358         * inspector/front-end/ResourcesPanel.js:
1359         (WebInspector.ResourcesPanel):
1360         (WebInspector.ResourcesPanel.prototype.show):
1361         (WebInspector.ResourcesPanel.prototype._populateResourceTree.populateFrame):
1362         (WebInspector.ResourcesPanel.prototype._populateResourceTree):
1363         (WebInspector.ResourcesPanel.prototype._frameAdded):
1364         (WebInspector.ResourcesPanel.prototype._frameDetached):
1365         (WebInspector.ResourcesPanel.prototype._resourceAdded):
1366         (WebInspector.ResourcesPanel.prototype._frameNavigated):
1367         (WebInspector.FrameTreeElement.prototype.setTitles):
1368         * inspector/front-end/inspector.js:
1369         (WebInspector.frontendReused):
1370
1371 2011-03-27  Ryosuke Niwa  <rniwa@webkit.org>
1372
1373         Reviewed by Eric Seidel.
1374
1375         WebKit's behavior for text-align inherit differs from other browsers
1376         https://bugs.webkit.org/show_bug.cgi?id=56377
1377
1378         The bug was caused by WebKit's resolving text-align: start and text-align: end too early.
1379         As discussed on the bug, when text-align: start and text-align: end are inherited by descendent nodes,
1380         the alignment of the text in those nodes should be determined based on the directionality of the text,
1381         not by the directionality of the ancestor node from which text-align property is inherited.
1382
1383         Fixed the bug by introducing new enum values to ETextAlign: TASTART and TAEND. These two values will
1384         align text to the left in a LTR context and to the right in a RTL context respectively.
1385
1386         * css/CSSPrimitiveValueMappings.h:
1387         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added the support for TASTART and TAEND.
1388         (WebCore::CSSPrimitiveValue::operator ETextAlign): Ditto.
1389         * css/CSSStyleSelector.cpp:
1390         (WebCore::CSSStyleSelector::applyProperty): No longer processes CSSValueStart and CSSValueEnd.
1391         * rendering/RenderBlock.cpp:
1392         (WebCore::RenderBlock::localCaretRect): Added the support for TASTART and TAEND.
1393         * rendering/RenderBlockLineLayout.cpp:
1394         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Added the support for TASTART and TAEND.
1395         * rendering/RenderText.cpp:
1396         (WebCore::RenderText::localCaretRect): Ditto.
1397         * rendering/style/RenderStyle.h: ETextAlign now has 10 values and requires 4 bits.
1398         * rendering/style/RenderStyleConstants.h: Added TASTART and TAEND to ETextAlign.
1399
1400 2011-03-28  Pavel Podivilov  <podivilov@chromium.org>
1401
1402         Reviewed by Yury Semikhatsky.
1403
1404         Web Inspector: fix breakpoints positions in formatted scripts.
1405         https://bugs.webkit.org/show_bug.cgi?id=56931
1406
1407         Add async requestMapping method to SourceFile interface as required for populating
1408         breakpoints sidebar pane when in "format all scripts" mode.
1409
1410         * inspector/front-end/DebuggerPresentationModel.js:
1411         (WebInspector.DebuggerPresentationModel.prototype.continueToLine):
1412         (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint.didRequestSourceMapping):
1413         (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint):
1414         (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded.didRequestSourceMapping):
1415         (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded):
1416         (WebInspector.DebuggerPresentationModel.prototype.set selectedCallFrame.didRequestSourceMapping):
1417         (WebInspector.DebuggerPresentationModel.prototype.set selectedCallFrame):
1418         (WebInspector.PresentationBreakpoint): Breakpoint wrapper for UI.
1419         (WebInspector.PresentationBreakpoint.prototype.get sourceFileId):
1420         (WebInspector.PresentationBreakpoint.prototype.get lineNumber):
1421         (WebInspector.PresentationBreakpoint.prototype.get condition):
1422         (WebInspector.PresentationBreakpoint.prototype.get enabled):
1423         (WebInspector.PresentationBreakpoint.prototype.get url):
1424         (WebInspector.PresentationBreakpoint.prototype.get resolved):
1425         (WebInspector.PresentationBreakpoint.prototype.loadSnippet):
1426         * inspector/front-end/ScriptFormatter.js:
1427         (WebInspector.ScriptFormatter.prototype.formatContent.didFormatChunks):
1428         (WebInspector.ScriptFormatter.prototype.formatContent):
1429         * inspector/front-end/SourceFile.js:
1430         (WebInspector.SourceFile.prototype.requestSourceMapping):
1431         (WebInspector.FormattedSourceFile.prototype.requestSourceMapping):
1432         (WebInspector.FormattedSourceFile.prototype._didRequestContent):
1433         (WebInspector.SourceMapping):
1434         (WebInspector.SourceMapping.prototype.scriptLocationToSourceLocation):
1435         (WebInspector.SourceMapping.prototype.sourceLocationToScriptLocation):
1436         (WebInspector.FormattedSourceMapping):
1437         (WebInspector.FormattedSourceMapping.prototype.scriptLocationToSourceLocation):
1438         (WebInspector.FormattedSourceMapping.prototype.sourceLocationToScriptLocation):
1439         (WebInspector.FormattedSourceMapping.prototype._convertPosition):
1440
1441 2011-03-28  Nancy Piedra  <nancy.piedra@nokia.com>
1442
1443         Reviewed by Csaba Osztrogon√°c.
1444
1445         This patch fixes linking errors on Qt Webkit Windows MinGW builds.
1446         This patch sets the BUILDING_WEBKIT & QT_MAKEDLL macros so that
1447         QWEBKIT_EXPORT is defined as follows:
1448         #define QWEBKIT_EXPORT Q_DECL_EXPORT
1449
1450         No new tests needed since only changing .pro file.
1451
1452         * WebCore.pro:
1453
1454 2011-03-28  Andrey Adaikin  <aandrey@google.com>
1455
1456         Reviewed by Yury Semikhatsky.
1457
1458         Web Inspector: source frame should show the error to user when live edit is failed
1459         https://bugs.webkit.org/show_bug.cgi?id=57002
1460
1461         * inspector/front-end/ScriptsPanel.js:
1462         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.editScriptSource):
1463         * inspector/front-end/SourceFrame.js:
1464         (WebInspector.SourceFrame.prototype._handleSave.didSaveScriptSource):
1465         (WebInspector.SourceFrame.prototype._handleSave):
1466         (WebInspector.SourceFrameDelegate.prototype.editScriptSource):
1467
1468 2011-03-26  Mario Sanchez Prada  <msanchez@igalia.com>
1469
1470         Reviewed by Martin Robinson.
1471
1472         [GTK] Expose the AtkValue interface for WAI-ARIA sliders
1473         https://bugs.webkit.org/show_bug.cgi?id=56655
1474
1475         Implement AtkValue interface for WAI-ARIA sliders.
1476
1477         Test: platform/gtk/accessibility/aria-slider-required-attributes.html
1478
1479         * accessibility/gtk/AXObjectCacheAtk.cpp:
1480         (WebCore::AXObjectCache::postPlatformNotification): Emit the
1481         'property-change::accessible-value' signal when needed.
1482
1483         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
1484         (core): New, returns a core object from an AtkValue.
1485         (webkitAccessibleValueGetCurrentValue): New, implements AtkValue.
1486         (webkitAccessibleValueGetMaximumValue): Ditto.
1487         (webkitAccessibleValueGetMinimumValue): Ditto.
1488         (webkitAccessibleValueSetCurrentValue): Ditto.
1489         (webkitAccessibleValueGetMinimumIncrement): Ditto.
1490         (atkValueInterfaceInit): Ditto.
1491         (GetAtkInterfaceTypeFromWAIType): Add ATK_TYPE_VALUE.
1492         (getInterfaceMaskFromObject): Set the WAI_VALUE bit for sliders.
1493
1494 2011-03-28  Maciej Stachowiak  <mjs@apple.com>
1495
1496         Reviewed by Dan Bernstein.
1497
1498         Assigning location.path to something that doesn't start with / mangles the authority
1499         https://bugs.webkit.org/show_bug.cgi?id=57209
1500         <rdar://problem/9195132>
1501         
1502         Tests: http/tests/uri/assign-path-with-leading-slash.html
1503                http/tests/uri/assign-path-without-leading-slash.html
1504
1505         * platform/KURL.cpp:
1506         (WebCore::KURL::setPath): If the new path does not have a leading slash, add one.
1507
1508 2011-03-28  Ryosuke Niwa  <rniwa@webkit.org>
1509
1510         Reviewed by Eric Seidel.
1511
1512         Extract functions to update logical width from computeInlineDirectionPositionsForLine
1513         https://bugs.webkit.org/show_bug.cgi?id=57213
1514
1515         Extracted updateLogicalWidthForLeftAlignedBlock, updateLogicalWidthForRightAlignedBlock,
1516         and updateLogicalWidthForCenterAlignedBlock from computeInlineDirectionPositionsForLine.
1517
1518         They are used to update logical widths, logical left, and total logical width for left,
1519         right, and center aligned blocks.
1520
1521         * rendering/RenderBlockLineLayout.cpp:
1522         (WebCore::updateLogicalWidthForLeftAlignedBlock):
1523         (WebCore::updateLogicalWidthForRightAlignedBlock):
1524         (WebCore::updateLogicalWidthForCenterAlignedBlock):
1525         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine):
1526
1527 2011-03-28  Evan Martin  <evan@chromium.org>
1528
1529         Reviewed by Ryosuke Niwa.
1530
1531         Refactor duplicate code in HTMLTextElement
1532         https://bugs.webkit.org/show_bug.cgi?id=57215
1533
1534         * html/HTMLTitleElement.cpp:
1535         (WebCore::HTMLTitleElement::childrenChanged):
1536         This method did an equivalent loop to the text() method on
1537         the same object.
1538
1539 2011-03-27  Fumitoshi Ukai  <ukai@chromium.org>
1540
1541         Reviewed by Alexey Proskuryakov.
1542
1543         Don't call WebSocket::didClose() more than once.
1544         https://bugs.webkit.org/show_bug.cgi?id=57081
1545
1546         If WebSocket close() is called, and connection is established, then
1547         it will call didClose() that resets m_channel to 0.
1548         After that, when connection is closed, WebSocketChannel will call
1549         didClose for the WebSocket instance.
1550
1551         Call WebSocketChannel::disconnect() before m_channel = 0 to make sure
1552         WebSocketChannel suppress the second didClose().
1553
1554         Test: http/tests/websocket/tests/close-unref-websocket.html
1555
1556         * websockets/WebSocket.cpp:
1557         (WebCore::WebSocket::didClose):
1558
1559 2011-03-27  Adam Barth  <abarth@webkit.org>
1560
1561         Reviewed by Eric Seidel.
1562
1563         Fix script-src redirect handling
1564         https://bugs.webkit.org/show_bug.cgi?id=57196
1565
1566         Resource-loading requirements in CSP apply to each hop in the redirect
1567         chain.  To make that work properly, we need to move enforcement into
1568         the loader.  Fortunately, we already have a choke-point in the loader
1569         for enforcing this kind of policy.
1570
1571         * dom/ScriptElement.cpp:
1572         (WebCore::ScriptElement::requestScript):
1573         * html/parser/HTMLDocumentParser.cpp:
1574         * html/parser/HTMLDocumentParser.h:
1575         * html/parser/HTMLScriptRunnerHost.h:
1576         * loader/cache/CachedResourceLoader.cpp:
1577         (WebCore::CachedResourceLoader::canRequest):
1578         * page/ContentSecurityPolicy.cpp:
1579         (WebCore::ContentSecurityPolicy::allowScriptFromSource):
1580         * page/ContentSecurityPolicy.h:
1581
1582 2011-03-27  Jer Noble  <jer.noble@apple.com>
1583
1584         Reviewed by Maciej Stachowiak.
1585
1586         Full Screen: disable keyboard access by default
1587         https://bugs.webkit.org/show_bug.cgi?id=56684
1588
1589         Pass whether keyboard access was requested up to ChromeClient when asking
1590         if fullscreen mode is supported.
1591
1592         * dom/Document.cpp:
1593         (WebCore::Document::webkitRequestFullScreenForElement):
1594         * page/ChromeClient.h:
1595         (WebCore::ChromeClient::supportsFullscreenForElement):
1596
1597 2011-03-27  Patrick Gansterer  <paroga@webkit.org>
1598
1599         Reviewed by Andreas Kling.
1600
1601         [CMake] Generate WebKitVersion.h
1602         https://bugs.webkit.org/show_bug.cgi?id=57128
1603
1604         This file will be used for the user agent string by the CMake based ports.
1605
1606         * CMakeLists.txt:
1607
1608 2011-03-27  Ben Taylor  <bentaylor.solx86@gmail.com>
1609
1610         Reviewed by Alexey Proskuryakov.
1611
1612         https://bugs.webkit.org/show_bug.cgi?id=57170  Fix last elements
1613         in an enum to remove a trailing comma. Sun Studio 12 CC errors out.
1614
1615         Compile fix only, no actual code change.
1616
1617         * dom/ExceptionCode.h:
1618         * editing/EditorInsertAction.h:
1619         * loader/FrameLoaderTypes.h:
1620         * platform/PlatformKeyboardEvent.h:
1621         * platform/ScrollTypes.h:
1622         * platform/graphics/BitmapImage.h:
1623         * platform/image-decoders/ImageDecoder.h:
1624         * platform/network/ProtectionSpace.h:
1625         * platform/network/ResourceHandleClient.h:
1626         * platform/network/ResourceRequestBase.h:
1627         * platform/text/TextCodec.h:
1628
1629 2011-03-27  Rob Buis  <rwlbuis@gmail.com>
1630
1631         Reviewed by Nikolas Zimmermann.
1632
1633         Text on path positioning at zero startOffset
1634         https://bugs.webkit.org/show_bug.cgi?id=56245
1635
1636         Since for length 0 no previous point is set, choose epsilon
1637         length to get normal at starting point of the path.
1638
1639         Test: svg/text/text-path-middle-align.svg
1640
1641         * platform/graphics/Path.cpp:
1642         (WebCore::Path::normalAngleAtLength):
1643
1644 2011-03-27  Ben Taylor  <bentaylor.solx86@gmail.com>
1645
1646         Reviewed by Oliver Hunt.
1647
1648         https://bugs.webkit.org/show_bug.cgi?id=57151, patch derived from set
1649         created by Thiago Macieria in bug https://bugs.webkit.org/show_bug.cgi?id=24932
1650
1651         Fix compile issue on Solaris 10/Sun Studio 12 regarding ambiguity on ?: functions
1652
1653         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
1654         (WebCore::JSJavaScriptCallFrame::thisObject):
1655
1656 2011-03-26  Jer Noble  <jer.noble@apple.com>
1657
1658         Unreviewed build fix.
1659
1660         Fix a bug which was causing the "skip back" button to be missing, causing 
1661         the media layout tests to fail.
1662
1663         * rendering/RenderThemeMac.mm:
1664         (WebCore::RenderThemeMac::shouldRenderMediaControlPart):
1665
1666 2011-03-26  Dan Bernstein  <mitz@apple.com>
1667
1668         Reviewed by Maciej Stachowiak.
1669
1670         <rdar://problem/9180716> REGRESSION (r80582): Angle bracket rendered upright in vertical mode
1671         https://bugs.webkit.org/show_bug.cgi?id=57169
1672
1673         Test: fast/blockflow/fallback-orientation.html
1674
1675         * platform/graphics/FontFastPath.cpp:
1676         (WebCore::Font::glyphDataForCharacter): If the font has vertical glyphs, use it, rather
1677         than continuing down the fallback list.
1678
1679 2011-03-26  Maciej Stachowiak  <mjs@apple.com>
1680
1681         Reviewed by Darin Adler.
1682
1683         Follow-up fix for crash with giant inline stylesheets - actually don't crash, and add test
1684         https://bugs.webkit.org/show_bug.cgi?id=56150
1685
1686         Test: fast/css/giant-stylesheet-crash.html
1687
1688         * dom/StyleElement.cpp:
1689         (WebCore::StyleElement::process):
1690
1691 2011-03-22  Jer Noble  <jer.noble@apple.com>
1692
1693         Reviewed by Eric Carlson.
1694
1695         Media controls must use full screen style when in new full screen mode.
1696         https://bugs.webkit.org/show_bug.cgi?id=56851
1697
1698         Add new full screen styles for the full screen media elements.
1699
1700         * DerivedSources.make: Add fullScreenQuickTime.css.
1701         * WebCore.xcodeproj/project.pbxproj: Ditto.
1702         * css/CSSStyleSelector.cpp: Removed loadFullScreenRulesIfNeeded().
1703         (WebCore::CSSStyleSelector::CSSStyleSelector): Ditto.
1704         (WebCore::CSSStyleSelector::styleForElement): Load full screen rules 
1705             if needed.
1706         * css/fullscreenQuickTime.css: Added.
1707         * css/mediaControls.css:
1708         * html/shadow/MediaControls.cpp:
1709         (WebCore::isFullScreen): Added.
1710         (WebCore::MediaControls::create): Add new full screen volume controls.
1711         (WebCore::MediaControls::updateStyle): Ditto.
1712         (WebCore::MediaControls::update): Ditto.
1713         (WebCore::MediaControls::updateVolumeSliderContainer): Ditto.
1714         (WebCore::MediaControls::forwardEvent): Ditto.
1715         * rendering/MediaControlElements.cpp:
1716         (WebCore::MediaControlFullscreenVolumeSliderElement::MediaControlFullscreenVolumeSliderElement): Added.
1717         (WebCore::MediaControlFullscreenVolumeSliderElement::create): Added.
1718         (WebCore::MediaControlFullscreenVolumeSliderElement::shadowPseudoId): Added.
1719         (WebCore::MediaControlFullscreenVolumeMinButtonElement::MediaControlFullscreenVolumeMinButtonElement): Addet
1720         (WebCore::MediaControlFullscreenVolumeMinButtonElement::create): Added.
1721         (WebCore::MediaControlFullscreenVolumeMinButtonElement::defaultEventHandler): Added.
1722         (WebCore::MediaControlFullscreenVolumeMinButtonElement::shadowPseudoId): Added.
1723         (WebCore::MediaControlFullscreenVolumeMaxButtonElement::MediaControlFullscreenVolumeMaxButtonElement): Added.
1724         (WebCore::MediaControlFullscreenVolumeMaxButtonElement::create): Added.
1725         (WebCore::MediaControlFullscreenVolumeMaxButtonElement::defaultEventHandler): Added.
1726         (WebCore::MediaControlFullscreenVolumeMaxButtonElement::shadowPseudoId): Added.
1727         * rendering/MediaControlElements.h:
1728             Added m_overridePosition.
1729         (WebCore::MediaControlVolumeSliderContainerElement::setOverridesPosition): Added.
1730         * rendering/MediaControlElements.h:
1731         (WebCore::MediaControlVolumeSliderContainerElement::overridesPosition): Added.
1732         * rendering/RenderTheme.h:
1733         (WebCore::RenderTheme::extraFullScreenStyleSheet): Added.
1734         * rendering/RenderThemeMac.h:
1735         * rendering/RenderThemeMac.mm:
1736         (WebCore::RenderThemeMac::extraFullScreenStyleSheet): Added.
1737         (WebCore::RenderThemeMac::shouldRenderMediaControlPart): Render seek forward and backward 
1738             buttons.
1739
1740 2011-03-26  Jer Noble  <jer.noble@apple.com>
1741
1742         Reviewed by Dan Bernstein.
1743
1744         RenderMedia should obey the view's flattening bit.
1745         https://bugs.webkit.org/show_bug.cgi?id=57156
1746
1747         Paint the current frame in software when the associated FrameView
1748         has its flattening bit set.
1749
1750         * rendering/RenderVideo.cpp:
1751         (WebCore::RenderVideo::paintReplaced):
1752
1753 2011-03-26  Patrick Gansterer  <paroga@webkit.org>
1754
1755         Unreviewed build fix for !ENABLE(DOM_STORAGE).
1756
1757         * storage/StorageTracker.cpp:
1758             Added #if ENABLE(DOM_STORAGE) like in the other storage files.
1759
1760 2011-03-26  Kwang Yul Seo  <skyul@company100.net>
1761
1762         Reviewed by Benjamin Poulain.
1763
1764         [Qt] Remove GraphicsLayerTextureMapper::nativeLayer
1765         https://bugs.webkit.org/show_bug.cgi?id=57141
1766
1767         GraphicsLayer::nativeLayer was removed in r73380.
1768
1769         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
1770         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
1771
1772 2011-03-26  Adam Barth  <abarth@webkit.org>
1773
1774         Reviewed by Eric Seidel.
1775
1776         Teach Content Security Policy how to parse source-list
1777         https://bugs.webkit.org/show_bug.cgi?id=54799
1778
1779         This patch is larger than I would like, but I wasn't sure how to make
1780         it any smaller while still being reasonably testable.  I've left out
1781         some features (such as host wildcarding and 'self') so I can add them
1782         in later patches with tests.
1783
1784         Test: http/tests/security/contentSecurityPolicy/source-list-parsing.html
1785
1786         * bindings/ScriptControllerBase.cpp:
1787         * dom/ScriptElement.cpp:
1788         * html/parser/HTMLDocumentParser.cpp:
1789         * loader/FrameLoader.cpp:
1790             - Add include explicitly now that we're not spamming the include
1791               everywhere.
1792         * dom/Document.cpp:
1793         (WebCore::Document::initSecurityContext):
1794             - We need to pass the SecurityOrigin object to
1795               ContentSecurityPolicy so that it can resolve implicit parts of
1796               source patterns, such as the scheme.
1797         * dom/Document.h:
1798             - Forward declare ContentSecurityPolicy rather than including the
1799               header.  Technically this could be a separate change, but I was
1800               getting annoyed at the world re-builds.
1801         * page/ContentSecurityPolicy.cpp:
1802         (WebCore::skipExactly):
1803         (WebCore::skipUtil):
1804         (WebCore::skipWhile):
1805             - Clean up these parser helper functions.  We might consider moving
1806               them to a more general location.  They're very helpful for
1807               writing secure HTTP header parsers.
1808         (WebCore::CSPSource::CSPSource):
1809             - New class to represent one source in a source-list.
1810         (WebCore::CSPSource::matches):
1811         (WebCore::CSPSource::schemeMatches):
1812         (WebCore::CSPSource::hostMatches):
1813         (WebCore::CSPSource::portMatches):
1814         (WebCore::CSPSource::isSchemeOnly):
1815             - Currently we represent scheme-only sources using with an empty
1816               m_host.  Another approach I considered was using another bool,
1817               but that seemed slighly messier.
1818         (WebCore::CSPSourceList::CSPSourceList):
1819             - CSPSourceList doesn't need to ref SecurityOrigin because
1820               CSPSourceList is owned by ContentSecurityPolicy, which holds a
1821               ref.
1822         (WebCore::CSPSourceList::parse):
1823         (WebCore::CSPSourceList::matches):
1824         (WebCore::CSPSourceList::parseSource):
1825         (WebCore::CSPSourceList::parseScheme):
1826         (WebCore::CSPSourceList::parseHost):
1827         (WebCore::CSPSourceList::parsePort):
1828             - A basic "segment and recurse" parser.  This parser causes us to
1829               take more branches than we need, but I don't think we need to
1830               squeeze every last ouch of performance out of this parser.  This
1831               approach is more simple than some of the other approaches I
1832               tried.
1833         (WebCore::CSPSourceList::addSourceSelf):
1834         (WebCore::CSPDirective::CSPDirective):
1835         (WebCore::CSPDirective::allows):
1836         (WebCore::ContentSecurityPolicy::ContentSecurityPolicy):
1837         (WebCore::ContentSecurityPolicy::parse):
1838         (WebCore::ContentSecurityPolicy::parseDirective):
1839         (WebCore::ContentSecurityPolicy::addDirective):
1840             - I couldn't resist re-writing this parser to use the helper
1841               functions and to match the style of the source-list parser.
1842         * page/ContentSecurityPolicy.h:
1843         (WebCore::ContentSecurityPolicy::create):
1844             - Accept a SecurityOrigin context object.
1845
1846 2011-03-26  Patrick Gansterer  <paroga@webkit.org>
1847
1848         Unreviewed EFL and WinCE build fix for r81977.
1849
1850         * platform/graphics/FontPlatformData.h:
1851
1852 2011-03-26  Patrick Gansterer  <paroga@webkit.org>
1853
1854         Unreviewed WinCE build fix for r82000.
1855
1856         * platform/wince/FileSystemWinCE.cpp:
1857         (WebCore::openFile): Added missing function.
1858
1859 2011-03-25  Kevin Ollivier  <kevino@theolliviers.com>
1860
1861         [wx] Build fix, don't use the new FPD implementation yet, until we can merge ours with it.
1862
1863         * platform/graphics/FontPlatformData.h:
1864
1865 2011-03-25  Jer Noble  <jer.noble@apple.com>
1866
1867         Reviewed by Eric Carlson.
1868
1869         MediaPlayerPrivateQuickTimeVisualContext should use the Application Cache during load.
1870         https://bugs.webkit.org/show_bug.cgi?id=57047
1871
1872         No new tests.
1873         
1874         When loading a URL, checkk osee if the Appplication Cache has a version of that URL
1875         stored; if so, use the local path to that cached media instead of the remote URL.
1876
1877         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
1878         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::loadInternal):
1879         * platform/graphics/win/QTMovie.cpp:
1880         (QTMovie::loadPath):
1881         * platform/graphics/win/QTMovie.h:
1882
1883 2011-03-25  Dan Bernstein  <mitz@apple.com>
1884
1885         Reviewed by Darin Adler.
1886
1887         <rdar://problem/9134330> Missing expansion before ideograph at the beginning or end of a text run
1888         https://bugs.webkit.org/show_bug.cgi?id=57106
1889
1890         Test: fast/text/justify-ideograph-leading-expansion.html
1891
1892         * platform/graphics/TextRun.h:
1893         Replaced TrailingExpansionBehavior enum with ExpansionBehavior flags.
1894         (WebCore::TextRun::TextRun): Constructors now take an expansionBehavior parameter.
1895         (WebCore::TextRun::allowsLeadingExpansion): Added this accessor.
1896         (WebCore::TextRun::allowsTrailingExpansion): Changed to use the m_expansionBehavior member.
1897         * platform/graphics/WidthIterator.cpp:
1898         (WebCore::WidthIterator::WidthIterator): Initialize m_isAfterExpansion from the TextRun, allowing
1899         leading expansion when appropriate.
1900         (WebCore::WidthIterator::advance): Moved the last-glyph-in-run check to only apply to expansion
1901         after the glyph, not expansion before the glyph, since that is not trailing expansion. Added code
1902         to handle expansion before the first glyph.
1903         * platform/graphics/mac/ComplexTextController.cpp:
1904         (WebCore::ComplexTextController::ComplexTextController): Initialize m_afterExpansion from the
1905         TextRun, allowing leading expansion when appropriate. Set m_runWidthSoFar to the leading expansion.
1906         (WebCore::ComplexTextController::offsetForPosition): Account for leading expansion.
1907         (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Similar to WidthIterator::advance()
1908         * platform/graphics/mac/ComplexTextController.h: Added m_leadingExpansion member variable.
1909         * rendering/InlineBox.h:
1910         (WebCore::InlineBox::InlineBox): Renamed m_hasSelectedChildren to m_hasSelectedChildrenOrCanHaveLeadingExpansion
1911         to reflect the use of this bit by InlineTextBox.
1912         * rendering/InlineTextBox.cpp:
1913         (WebCore::InlineTextBox::selectionRect): Replaced calls to trailingExpansionBehavior() with expansionBehavior().
1914         (WebCore::InlineTextBox::paint): Ditto.
1915         (WebCore::InlineTextBox::paintSelection): Ditto.
1916         (WebCore::InlineTextBox::paintCompositionBackground): Ditto.
1917         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker): Ditto.
1918         (WebCore::InlineTextBox::paintTextMatchMarker): Ditto.
1919         (WebCore::InlineTextBox::computeRectForReplacementMarker): Ditto.
1920         (WebCore::InlineTextBox::offsetForPosition): Ditto.
1921         (WebCore::InlineTextBox::positionForOffset): Ditto.
1922         * rendering/InlineTextBox.h:
1923         (WebCore::InlineTextBox::canHaveLeadingExpansion): Added this accessor.
1924         (WebCore::InlineTextBox::setCanHaveLeadingExpansion): Ditto.
1925         (WebCore::InlineTextBox::expansionBehavior): Replaced trailingExpansionBehavior() with this function,
1926         which also considers canHaveLeadingExpansion().
1927         * rendering/RenderBlockLineLayout.cpp:
1928         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Call setCanHaveLeadingExpansion() on
1929         text boxes that can have leading expansion. Avoid negative expansion.
1930         * rendering/RootInlineBox.cpp:
1931         * rendering/RootInlineBox.h:
1932         (WebCore::RootInlineBox::hasSelectedChildren): Updated for renaming of the flag.
1933         (WebCore::RootInlineBox::setHasSelectedChildren): Ditto.
1934
1935 2011-03-23  Jer Noble  <jer.noble@apple.com>
1936
1937         Reviewed by Maciej Stachowiak.
1938
1939         MediaPlayerPrivateAVFoundation should use the Application Cache during load.
1940         https://bugs.webkit.org/show_bug.cgi?id=56997
1941
1942         No new tests.
1943
1944         When loading a URL, check to see if the Application Cache has a version of that URL
1945         stored; if so, use the local path to that cached media instead of the remote URL.
1946
1947         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1948         (WebCore::MediaPlayerPrivateAVFoundation::prepareToPlay): Check to see if the media should be loaded
1949             from the application cache.
1950         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1951         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h:
1952         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
1953         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerForURL):
1954         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerForCacheResource): Added.
1955         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Split out from createAVPlayerForURL.
1956
1957 2011-03-25  Ben Taylor  <bentaylor.solx86@gmail.com>
1958
1959         Reviewed by Darin Adler.
1960
1961         https://bugs.webkit.org/show_bug.cgi?id=57122. Solaris 10/SunStudio 12 expect
1962         both sides of a ?: operation to have the same types.  Extracted from original
1963         https://bugs.webkit.org/show_bug.cgi?id=24932, patch 13 of 17, and originally
1964         created by Thiago Macieira.
1965
1966         fixes a compile issue on Solaris 10/SunStudio 12
1967
1968         * loader/DocumentLoader.h:
1969         (WebCore::DocumentLoader::serverRedirectSourceForHistory):
1970         * loader/FrameLoader.cpp:
1971         (WebCore::FrameLoader::load):
1972         (WebCore::FrameLoader::loadWithNavigationAction):
1973
1974 2011-02-03  Jer Noble  <jer.noble@apple.com>
1975
1976         Reviewed by Maciej Stachowiak.
1977
1978         MediaPlayerPrivateQTKit should use the Application Cache during load.        
1979         https://bugs.webkit.org/show_bug.cgi?id=53818
1980
1981         No new tests.
1982
1983         When loading a URL, check to see if the Application Cache has a version of that URL
1984         stored; if so, use that data instead of the remote URL.
1985
1986         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1987         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1988         (WebCore::MediaPlayerPrivateQTKit::commonMovieAttributes):
1989         (WebCore::MediaPlayerPrivateQTKit::createQTMovie):
1990         (WebCore::MediaPlayerPrivateQTKit::loadInternal):
1991
1992 2011-03-25  James Robinson  <jamesr@chromium.org>
1993
1994         Reviewed by Kenneth Russell.
1995
1996         [chromium] Move draw implementations to CCLayerImpl for everything except content layers
1997         https://bugs.webkit.org/show_bug.cgi?id=56793
1998
1999         Moves the implementation of the layer's draw() function from LayerChromium subclasses to CCLayerImpl subclasses for
2000         all layer types except content layers.  This gets us closer to decoupling the composite step itself from updating the layers.
2001
2002         The biggest change in this patch is adding a set of CCLayerImpl subclasses to implement the different drawing routines
2003         and moving the code from each XXXLayerChromium to CCXXXLayerImpl.  In order to render from the CCLayerImpl side all state
2004         needed at draw time also has to be synchronized, which is performed in pushPropertiesTo().
2005
2006         On the LayerRendererChromium side there are a few changes.  I've split the updateContents calls on LayerChromiums into two operations
2007         tentatively named 'paintContentsIfNeeded' and 'updateCompositorResources'.  paintContents() is used for any code that calls into WebKit in order to generate
2008         new pixel data.  It's expected that this call may take a long period of time and may involve "odd" side effects.  updateCompositorResources() is used for
2009         code that needs to update the compositor's texture data or other state.  It is not expected that this callback will take long (since it's just inserting
2010         commands into the GL command stream, ideally) and this call is expected to have access to the compositor's context, unlike paintContents().
2011
2012         The updateAndDrawLayers cycle now looks like this:
2013         1.) update the root content layer
2014         2.) update the root layer scrollbars
2015         3.) for each LayerChromium in tree order:
2016           a.) ensure a CCLayerImpl of the correct type exists for this layer
2017           b.) push all draw time properties from the LayerChromium to the CCLayerImpl
2018           c.) construct the appropriate draw transforms, render surfaces and render surface z-order sublayer lists
2019         4.) for each LayerChromium in tree order, paint the layer's contents
2020         5.) for each LayerChromium in tree order, update the associate compositor resources (textures, etc)
2021         6.) draw the root layer and its scrollbars
2022         7.) for each CCLayerImpl in render surface order, draw it
2023
2024         Step 3 should really happen after step 5, but right now painting a content layer requires knowledge of the render surface properties and draw transforms
2025         in order to paint.  We also currently push layer properties from LayerChromium->CCLayerImpls twice now - once at 3.b and once after 5 so we can pick
2026         up any texture updates.  This will also get fixed when the paint dependency on render surfaces is resolved.
2027
2028         I haven't modified the root layer or content layers in order to minimize conflicts with the other pending work in that area.
2029
2030         Tests: compositing/
2031
2032         * WebCore.gypi:
2033         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
2034         (WebCore::Canvas2DLayerChromium::updateCompositorResources):
2035         * platform/graphics/chromium/Canvas2DLayerChromium.h:
2036         * platform/graphics/chromium/CanvasLayerChromium.cpp:
2037         (WebCore::CanvasLayerChromium::createCCLayerImpl):
2038         (WebCore::CanvasLayerChromium::pushPropertiesTo):
2039         * platform/graphics/chromium/CanvasLayerChromium.h:
2040         * platform/graphics/chromium/ContentLayerChromium.cpp:
2041         (WebCore::ContentLayerChromium::requiresClippedUpdateRect):
2042         (WebCore::ContentLayerChromium::paintContentsIfDirty):
2043         (WebCore::ContentLayerChromium::updateCompositorResources):
2044         (WebCore::ContentLayerChromium::bindContentsTexture):
2045         * platform/graphics/chromium/ContentLayerChromium.h:
2046         * platform/graphics/chromium/ImageLayerChromium.cpp:
2047         (WebCore::ImageLayerChromium::paintContentsIfDirty):
2048         * platform/graphics/chromium/ImageLayerChromium.h:
2049         * platform/graphics/chromium/LayerChromium.cpp:
2050         (WebCore::LayerChromium::LayerChromium):
2051         (WebCore::LayerChromium::cleanupResources):
2052         (WebCore::LayerChromium::setLayerRenderer):
2053         (WebCore::LayerChromium::setName):
2054         (WebCore::LayerChromium::pushPropertiesTo):
2055         (WebCore::LayerChromium::dumpLayer):
2056         (WebCore::LayerChromium::createCCLayerImpl):
2057         (WebCore::LayerChromium::createCCLayerImplIfNeeded):
2058         (WebCore::LayerChromium::ccLayerImpl):
2059         (WebCore::LayerChromium::layerRenderer):
2060         * platform/graphics/chromium/LayerChromium.h:
2061         (WebCore::LayerChromium::paintContentsIfDirty):
2062         (WebCore::LayerChromium::updateCompositorResources):
2063         * platform/graphics/chromium/LayerRendererChromium.cpp:
2064         (WebCore::LayerRendererChromium::updateLayers):
2065         (WebCore::LayerRendererChromium::updatePropertiesAndRenderSurfaces):
2066         (WebCore::LayerRendererChromium::paintContentsRecursive):
2067         (WebCore::LayerRendererChromium::updateCompositorResourcesRecursive):
2068         (WebCore::LayerRendererChromium::drawLayer):
2069         (WebCore::LayerRendererChromium::initializeSharedObjects):
2070         * platform/graphics/chromium/LayerRendererChromium.h:
2071         (WebCore::LayerRendererChromium::canvasLayerProgram):
2072         (WebCore::LayerRendererChromium::pluginLayerProgram):
2073         (WebCore::LayerRendererChromium::videoLayerRGBAProgram):
2074         (WebCore::LayerRendererChromium::videoLayerYUVProgram):
2075         * platform/graphics/chromium/PluginLayerChromium.cpp:
2076         (WebCore::PluginLayerChromium::createCCLayerImpl):
2077         (WebCore::PluginLayerChromium::setTextureId):
2078         (WebCore::PluginLayerChromium::pushPropertiesTo):
2079         * platform/graphics/chromium/PluginLayerChromium.h:
2080         (WebCore::PluginLayerChromium::textureId):
2081         * platform/graphics/chromium/VideoLayerChromium.cpp:
2082         (WebCore::VideoLayerChromium::createCCLayerImpl):
2083         (WebCore::VideoLayerChromium::updateCompositorResources):
2084         (WebCore::VideoLayerChromium::pushPropertiesTo):
2085         * platform/graphics/chromium/VideoLayerChromium.h:
2086         * platform/graphics/chromium/WebGLLayerChromium.cpp:
2087         (WebCore::WebGLLayerChromium::updateCompositorResources):
2088         * platform/graphics/chromium/WebGLLayerChromium.h:
2089         * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp: Copied from Source/WebCore/platform/graphics/chromium/PluginLayerChromium.cpp.
2090         (WebCore::CCCanvasLayerImpl::CCCanvasLayerImpl):
2091         (WebCore::CCCanvasLayerImpl::~CCCanvasLayerImpl):
2092         (WebCore::CCCanvasLayerImpl::draw):
2093         (WebCore::CCCanvasLayerImpl::dumpLayerProperties):
2094         * platform/graphics/chromium/cc/CCCanvasLayerImpl.h: Copied from Source/WebCore/platform/graphics/chromium/PluginLayerChromium.h.
2095         (WebCore::CCCanvasLayerImpl::create):
2096         (WebCore::CCCanvasLayerImpl::setTextureId):
2097         (WebCore::CCCanvasLayerImpl::setPremultipliedAlpha):
2098         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
2099         (WebCore::CCLayerImpl::descendantsDrawsContent):
2100         (WebCore::CCLayerImpl::updateCompositorResources):
2101         (WebCore::CCLayerImpl::writeIndent):
2102         * platform/graphics/chromium/cc/CCLayerImpl.h:
2103         (WebCore::CCLayerImpl::setAnchorPoint):
2104         (WebCore::CCLayerImpl::setAnchorPointZ):
2105         (WebCore::CCLayerImpl::setMasksToBounds):
2106         (WebCore::CCLayerImpl::setOpacity):
2107         (WebCore::CCLayerImpl::setPosition):
2108         (WebCore::CCLayerImpl::setPreserves3D):
2109         (WebCore::CCLayerImpl::setSublayerTransform):
2110         (WebCore::CCLayerImpl::setTransform):
2111         * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp: Copied from Source/WebCore/platform/graphics/chromium/PluginLayerChromium.cpp.
2112         (WebCore::CCPluginLayerImpl::CCPluginLayerImpl):
2113         (WebCore::CCPluginLayerImpl::~CCPluginLayerImpl):
2114         (WebCore::CCPluginLayerImpl::draw):
2115         (WebCore::CCPluginLayerImpl::dumpLayerProperties):
2116         * platform/graphics/chromium/cc/CCPluginLayerImpl.h: Copied from Source/WebCore/platform/graphics/chromium/PluginLayerChromium.h.
2117         (WebCore::CCPluginLayerImpl::create):
2118         (WebCore::CCPluginLayerImpl::setTextureId):
2119         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: Added.
2120         (WebCore::CCVideoLayerImpl::CCVideoLayerImpl):
2121         (WebCore::CCVideoLayerImpl::~CCVideoLayerImpl):
2122         (WebCore::CCVideoLayerImpl::setTexture):
2123         (WebCore::CCVideoLayerImpl::draw):
2124         (WebCore::CCVideoLayerImpl::drawYUV):
2125         (WebCore::CCVideoLayerImpl::drawRGBA):
2126         (WebCore::CCVideoLayerImpl::dumpLayerProperties):
2127         * platform/graphics/chromium/cc/CCVideoLayerImpl.h: Copied from Source/WebCore/platform/graphics/chromium/PluginLayerChromium.h.
2128         (WebCore::CCVideoLayerImpl::create):
2129         (WebCore::CCVideoLayerImpl::setSkipsDraw):
2130         (WebCore::CCVideoLayerImpl::setFrameFormat):
2131
2132 2011-03-25  Oliver Hunt  <oliver@apple.com>
2133
2134         Reviewed by Darin Adler.
2135
2136         Allow defineOwnProperty to work on DOMObjects
2137         https://bugs.webkit.org/show_bug.cgi?id=57129
2138
2139         As other engines are allowing defineOwnProperty to be applied
2140         to host objects there's no reason for us to retain this
2141         restriction.
2142
2143         * bindings/js/JSDOMWrapper.cpp:
2144         * bindings/js/JSDOMWrapper.h:
2145
2146 2011-03-25  Andy Estes  <aestes@apple.com>
2147
2148         Reviewed by Adele Peterson.
2149
2150         REGRESSION (r70748): latest nightly builds kills AC_QuickTime.js
2151         https://bugs.webkit.org/show_bug.cgi?id=49016
2152
2153         AC_QuickTime.js uses the common <object>/<embed> paradigm to embed the 
2154         QuickTime plug-in in web pages. r70748 removed our mapping of classids 
2155         to MIME types, which causes WebKit to fall back from the object to the 
2156         embed tag when QuickTime is embedded by this script. The script emits 
2157         the following embed tag to embed a QuickTime movie with a poster frame: 
2158
2159         <embed src="poster-frame.png" target="quicktimeplayer" href="movie.mov"> 
2160
2161         The expectation is that a QuickTime plug-in is instantiated to display the 
2162         poster frame, since QuickTime registers for many common image MIME 
2163         types. This is how Gecko behaves for embed. However, WebKit prefers to 
2164         use its native image rendering for image embeds, in which case no movie 
2165         is played when the poster frame is clicked. 
2166
2167         Fix this by changing embed to check for a plug-in that can handle the 
2168         image type before rendering the image natively. This matches Gecko. 
2169
2170         Test: plugins/embed-prefers-plugins-for-images.html
2171
2172         * html/HTMLEmbedElement.cpp:
2173         (WebCore::HTMLEmbedElement::HTMLEmbedElement):
2174         * html/HTMLObjectElement.cpp:
2175         (WebCore::HTMLObjectElement::HTMLObjectElement):
2176         (WebCore::HTMLObjectElement::parametersForPlugin):
2177         * html/HTMLPlugInImageElement.cpp:
2178         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
2179         (WebCore::HTMLPlugInImageElement::isImageType):
2180         (WebCore::HTMLPlugInImageElement::wouldLoadAsNetscapePlugin):
2181         * html/HTMLPlugInImageElement.h:
2182         (WebCore::HTMLPlugInImageElement::shouldPreferPlugInsForImages):
2183         * loader/EmptyClients.h:
2184         (WebCore::EmptyFrameLoaderClient::objectContentType):
2185         * loader/FrameLoader.cpp:
2186         (WebCore::FrameLoader::defaultObjectContentType):
2187         * loader/FrameLoader.h:
2188         * loader/FrameLoaderClient.h:
2189         * loader/SubframeLoader.cpp:
2190         (WebCore::SubframeLoader::resourceWillUsePlugin):
2191         (WebCore::SubframeLoader::requestPlugin):
2192         (WebCore::SubframeLoader::requestObject):
2193         (WebCore::SubframeLoader::shouldUsePlugin):
2194         * loader/SubframeLoader.h:
2195
2196 2011-03-23  Jer Noble  <jer.noble@apple.com>
2197
2198         Reviewed by Eric Carlson.
2199
2200         Application Cache should save audio/ and video/ mime types as flat files
2201         https://bugs.webkit.org/show_bug.cgi?id=53784
2202         <rdar://problem/8932473>
2203
2204         No new tests, as this behavior is not possible to test without changes to the MediaPlayer engines.
2205
2206         Store certain mime types as flat files alongside the Application Cache database.
2207         This requires plumbing the saved file path from ApplicationCacheStorage through
2208         to ApplicationCacheResource.
2209
2210         (WebCore::ApplicationCacheStorage::openDatabase): Modify the CacheResourceData schema and
2211             add a new DeletedCacheResources table, add a new CacheResourceDataDeleted trigger.
2212         (WebCore::ApplicationCacheStorage::store): Add the new path data when adding new rows in 
2213             CacheResourceData, and store media resources as flat files.
2214         (WebCore::ApplicationCacheStorage::loadCache): Pull the "path" column from CacheResourceData
2215             when loading cache items.
2216         (WebCore::ApplicationCacheStorage::remove): Call checkForDeletedResources.
2217         (WebCore::ApplicationCacheStorage::empty): Ditto.
2218         (WebCore::ApplicationCacheStorage::storeCopyOfCache): Ditto.
2219         (WebCore::ApplicationCacheStorage::deleteCacheGroup): Ditto.
2220         (WebCore::ApplicationCacheStorage::checkForDeletedResources): Walk through DeletedCacheResourceData
2221             looking for entries with non-empty "path" columns; if found, delete.
2222         (WebCore::ApplicationCacheStorage::flatFileAreaSize): Walk through CacheResourceData rows
2223             and sum the file size of those rows with flat file storage.
2224         (WebCore::ApplicationCacheStorage::verifySchemaVersion): Call deleteTables() instead of 
2225             clearAllTables() directly.
2226         (WebCore::ApplicationCacheStorage::deleteTables): Call empty() before deleting the tables,
2227             so that flat files get deleted.
2228         (WebCore::ApplicationCacheStorage::shouldStoreResourceAsFlatFile): Added.
2229         (WebCore::ApplicationCacheStorage::writeDataToUniqueFileInDirectory): Added.
2230         * loader/appcache/ApplicationCacheStorage.h:
2231         * platform/win/FileSystemWin.cpp:
2232         (WebCore::openFile): Implement openFile on Windows.
2233
2234 2011-03-24  David Hyatt  <hyatt@apple.com>
2235
2236         Reviewed by Dan Bernstein.
2237
2238         https://bugs.webkit.org/show_bug.cgi?id=56909
2239         
2240         Add a simplified normal flow layout path optimization for overflow recomputation
2241         and for positioned objects inside relative positioned containers.
2242
2243         Currently there is an optimized code path for positioned objects, but as soon as
2244         we encounter a normal flow object in the containing block chain, we lose the
2245         optimization.
2246
2247         This patch adds a new type of style difference called SimplifiedLayout that is
2248         returned when only overflow needs to be recomputed. Whenever a transform changes,
2249         this is the hint returned now instead of a full layout.
2250         
2251         In addition, when positioned objects need layout and start marking up the
2252         containing block chain, we now propagate the fact that the layout is simplified
2253         all the way up to the root, even when we encounter normal flow containing
2254         blocks.
2255         
2256         The layoutOnlyPositionedObjects function has been renamed to simplifiedLayout()
2257         and is now used for all of these cases (in addition to what it handled before).
2258         
2259         The simplified layout optimization (even in ToT) did not work correctly when
2260         static distances needed to be recomputed. In order to make static distance
2261         computations work with simplified layout, positioned objects now always compute
2262         their static offsets, even if they explicitly specify left/top.  That way normal
2263         flow layout never has to re-run when the positioned object moves.  This makes
2264         movement of a positioned object along a single non-auto axis much faster when the
2265         other axis is auto. Because this code kicked in more often for absolutely positioned
2266         objects whose original display was inline, I went ahead and fixed the trailing space
2267         issue with those objects.  This causes a bunch of layout tests to progress.
2268
2269         Added fast/block/positioning/static-inline-position-dynamic.html and trailing-space-test.html.
2270
2271         * rendering/RenderBlock.cpp:
2272         (WebCore::RenderBlock::layoutBlock):
2273         (WebCore::RenderBlock::adjustPositionedBlock):
2274         (WebCore::RenderBlock::simplifiedNormalFlowLayout):
2275         (WebCore::RenderBlock::simplifiedLayout):
2276         * rendering/RenderBlock.h:
2277         * rendering/RenderBlockLineLayout.cpp:
2278         (WebCore::setStaticPositions):
2279         (WebCore::RenderBlock::findNextLineBreak):
2280         * rendering/RenderBox.cpp:
2281         (WebCore::RenderBox::styleDidChange):
2282         (WebCore::RenderBox::positionLineBox):
2283         * rendering/RenderBoxModelObject.cpp:
2284         (WebCore::RenderBoxModelObject::styleWillChange):
2285         * rendering/RenderFlexibleBox.cpp:
2286         (WebCore::RenderFlexibleBox::layoutBlock):
2287         (WebCore::RenderFlexibleBox::layoutHorizontalBox):
2288         (WebCore::RenderFlexibleBox::layoutVerticalBox):
2289         * rendering/RenderObject.cpp:
2290         (WebCore::RenderObject::RenderObject):
2291         (WebCore::RenderObject::adjustStyleDifference):
2292         (WebCore::RenderObject::setStyle):
2293         (WebCore::RenderObject::styleDidChange):
2294         * rendering/RenderObject.h:
2295         (WebCore::RenderObject::needsLayout):
2296         (WebCore::RenderObject::needsPositionedMovementLayoutOnly):
2297         (WebCore::RenderObject::needsSimplifiedNormalFlowLayout):
2298         (WebCore::RenderObject::setNeedsLayout):
2299         (WebCore::RenderObject::setChildNeedsLayout):
2300         (WebCore::RenderObject::setNeedsSimplifiedNormalFlowLayout):
2301         (WebCore::RenderObject::markContainingBlocksForLayout):
2302         * rendering/RenderTable.cpp:
2303         (WebCore::RenderTable::layout):
2304         * rendering/style/RenderStyle.cpp:
2305         (WebCore::RenderStyle::diff):
2306         * rendering/style/RenderStyleConstants.h:
2307         * rendering/svg/RenderSVGText.cpp:
2308         (WebCore::RenderSVGText::layout):
2309
2310 2011-03-25  Martin Robinson  <mrobinson@igalia.com>
2311
2312         Fix the GTK+ build until we can implement the new cross-platform
2313         FontPlatformData.h bits.
2314
2315         * platform/graphics/FontPlatformData.h: Include the proper old font headers.
2316         (WebCore::FontPlatformData::FontPlatformData): Eliminate GTK+ specific bits of this file
2317         which reference our obsolete font implementation.
2318         (WebCore::FontPlatformData::hash): Ditto.
2319
2320 2011-03-25  Steve Falkenburg  <sfalken@apple.com>
2321
2322         Reviewed by Brian Weinstein.
2323
2324         Microsoft Windows Presentation Foundation (WPF) plug-in complains about missing xpcom.dll
2325         https://bugs.webkit.org/show_bug.cgi?id=57119
2326         <rdar://problem/9054148>
2327         
2328         This plug-in from Microsoft links against xpcom.dll, which is a Firefox-specific DLL
2329         not available in WebKit. The plug-in is fairly widespread, since it was included in
2330         a Windows Update push at one point.
2331
2332         * plugins/win/PluginPackageWin.cpp:
2333         (WebCore::PluginPackage::isPluginBlacklisted): Blacklist npwpf.dll.
2334
2335 2011-03-25  Tony Chang  <tony@chromium.org>
2336
2337         Try to fix the chromium mac build.
2338         We used the mac FontPlatformData on chromium mac.
2339
2340         * WebCore.gyp/WebCore.gyp:
2341         * WebCore.gypi:
2342         * platform/graphics/FontPlatformData.h:
2343
2344 2011-03-25  Tony Chang  <tony@chromium.org>
2345
2346         Build fix:
2347         have chromium and qt use the correct FontPlatformData.h
2348         https://bugs.webkit.org/show_bug.cgi?id=57115
2349
2350         * platform/graphics/FontPlatformData.h:
2351
2352 2011-03-25  Beth Dakin  <bdakin@apple.com>
2353
2354         Reviewed by Dave Hyatt.
2355
2356         Fix for https://bugs.webkit.org/show_bug.cgi?id=57057 Overlay scrollbars in overflow 
2357         areas paint behind positive z-index content
2358         -and corresponding-
2359         <rdar://problem/9070500>
2360
2361         Since overlay scrollbars don't clip the scrollable content like other scrollbars do, 
2362         the only way to get them to paint on top of all possible scrollable content is to 
2363         make them paint on top of everything. To do this, this patch adds a second trip 
2364         through the layer tree if it contains overlay scrollbars that need painting.
2365
2366         After calling paint() on the rootLayer, call paintOverlayScrollers() if 
2367         containsDirtyOverlayScrollbars() is true. 
2368         * page/FrameView.cpp:
2369         (WebCore::FrameView::paintContents):
2370
2371         RenderLayer has two new member variable. m_containsDirtyOverlayScrollbars is a bool 
2372         that is set on the root layer when it has child layers that need overlay scrollbars 
2373         to be painted. m_cachedOverlayScrollbarOffset is an IntPoint to cache the tx and ty 
2374         of the overlay scrollbars on the first (normal) pass through the layer tree. This 
2375         prevents us from having to re-enter the render tree during the second (overlay-only) 
2376         pass. Finally, there is also a new paint flag: PaintLayerPaintingOverlayScrollbars.
2377         * rendering/RenderLayer.h:
2378         (WebCore::RenderLayer::containsDirtyOverlayScrollbars):
2379         (WebCore::RenderLayer::setContainsDirtyOverlayScrollbars):
2380         * rendering/RenderLayer.cpp:
2381         (WebCore::RenderLayer::RenderLayer):
2382         (WebCore::RenderLayer::paintOverflowControls):
2383         (WebCore::RenderLayer::paintOverlayScrollbars):
2384         (WebCore::RenderLayer::paintLayer):
2385
2386 2011-03-25  Jessie Berlin  <jberlin@apple.com>
2387
2388         Reviewed by Sam Weinig.
2389
2390         WebKit2: Need to be able to set and get the Cookie Storage Policy.
2391         https://bugs.webkit.org/show_bug.cgi?id=50780
2392
2393         * platform/network/cf/CookieStorageCFNet.cpp:
2394         (WebCore::privateCookieStorage):
2395         Rename privateBrowsingCookieStorage to privateCookieStorage.
2396         (WebCore::currentCookieStorage):
2397         Ditto.
2398         (WebCore::setCurrentCookieStorage):
2399         Ditto.
2400         (WebCore::setCookieStoragePrivateBrowsingEnabled):
2401         Ditto.
2402         (WebCore::defaultCookieStorage):
2403         Return the default cookie storage.
2404         (WebCore::privateBrowsingCookieStorage):
2405         Return privateCookieStorage().get()
2406         * platform/network/cf/CookieStorageCFNet.h:
2407
2408 2011-03-25  Emil A Eklund  <eae@chromium.org>
2409
2410         Reviewed by Dimitri Glazkov.
2411
2412         Text field "onchange" event is triggered if actual value unchanged
2413         https://bugs.webkit.org/show_bug.cgi?id=36314
2414
2415         Change RenderTextControl::subtreeHasChanged to only return true if the
2416         subtree has changed since the last event was triggered.
2417
2418         * html/HTMLFormControlElement.cpp:
2419         (WebCore::HTMLTextFormControlElement::insertedIntoDocument):
2420         (WebCore::HTMLTextFormControlElement::dispatchFormControlChangeEvent):
2421         * html/HTMLFormControlElement.h:
2422         (WebCore::HTMLTextFormControlElement::setTextAsOfLastFormControlChangeEvent):
2423         * html/HTMLInputElement.cpp:
2424         (WebCore::HTMLInputElement::setChecked):
2425         (WebCore::HTMLInputElement::setValue):
2426         * html/HTMLTextAreaElement.cpp:
2427         (WebCore::HTMLTextAreaElement::setValue):
2428         (WebCore::HTMLTextAreaElement::setNonDirtyValue):
2429
2430 2011-03-25  Brent Fulgham  <bfulgham@webkit.org>
2431
2432         Reviewed by David Hyatt.
2433
2434         Clean up FontPlatformData structure so that a single implementation
2435         is used across all ports.  This first patch works for the Windows
2436         build (both CG and WinCairo), and Cocoa.
2437
2438         * WebCore.vcproj/WebCore.vcproj:
2439         * platform/graphics/FontPlatformData.cpp: Added.
2440         (WebCore::FontPlatformData::FontPlatformData):
2441         (WebCore::FontPlatformData::operator=):
2442         * platform/graphics/FontPlatformData.h: Added.
2443         (WebCore::toCTFontRef):
2444         (WebCore::FontPlatformData::FontPlatformData):
2445         (WebCore::FontPlatformData::hfont):
2446         (WebCore::FontPlatformData::useGDI):
2447         (WebCore::FontPlatformData::font):
2448         (WebCore::FontPlatformData::cgFont):
2449         (WebCore::FontPlatformData::size):
2450         (WebCore::FontPlatformData::setSize):
2451         (WebCore::FontPlatformData::syntheticBold):
2452         (WebCore::FontPlatformData::syntheticOblique):
2453         (WebCore::FontPlatformData::isColorBitmapFont):
2454         (WebCore::FontPlatformData::orientation):
2455         (WebCore::FontPlatformData::textOrientation):
2456         (WebCore::FontPlatformData::widthVariant):
2457         (WebCore::FontPlatformData::setOrientation):
2458         (WebCore::FontPlatformData::scaledFont):
2459         (WebCore::FontPlatformData::fontFace):
2460         (WebCore::FontPlatformData::hash):
2461         (WebCore::FontPlatformData::operator==):
2462         (WebCore::FontPlatformData::isHashTableDeletedValue):
2463         (WebCore::FontPlatformData::hashTableDeletedFontValue):
2464         * platform/graphics/cg/FontPlatformData.h: Removed.
2465         * platform/graphics/cocoa/FontPlatformData.h: Removed.
2466         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2467         (WebCore::~FontPlatformData):
2468         (WebCore::FontPlatformData::platformDataInit):
2469         (WebCore::FontPlatformData::platformDataAssign):
2470         * platform/graphics/win/FontPlatformDataCGWin.cpp:
2471         (WebCore::FontPlatformData::FontPlatformData):
2472         (WebCore::FontPlatformData::~FontPlatformData):
2473         (WebCore::FontPlatformData::platformDataInit):
2474         (WebCore::FontPlatformData::platformDataAssign):
2475         * platform/graphics/win/FontPlatformDataCairoWin.cpp:
2476         (WebCore::FontPlatformData::FontPlatformData):
2477         (WebCore::FontPlatformData::~FontPlatformData):
2478         (WebCore::FontPlatformData::platformDataInit):
2479         (WebCore::FontPlatformData::platformDataAssign):
2480         * platform/graphics/win/FontPlatformDataWin.cpp:
2481         (WebCore::FontPlatformData::FontPlatformData):
2482         * platform/graphics/win/cairo/FontPlatformData.h: Removed.
2483
2484 2011-03-25  Enrica Casucci  <enrica@apple.com>
2485
2486         Reviewed by Oliver Hunt.
2487
2488         Pasteboard data's RTF data doesn't always include URLs via NSLinkAttributeName.
2489         https://bugs.webkit.org/show_bug.cgi?id=57107
2490         <rdar://problem/9084267>
2491
2492         If the selection is at the beginning of content inside an anchor tag
2493         we move the selection start to include the anchor.
2494         
2495         * platform/mac/PasteboardMac.mm:
2496         (WebCore::Pasteboard::writeSelection): Modified to change the selection
2497         start according to the new rule.
2498
2499 2011-03-25  Pavel Feldman  <pfeldman@chromium.org>
2500
2501         Reviewed by Yury Semikhatsky.
2502
2503         Web Inspector: refactor Network domain's frame tree API
2504         https://bugs.webkit.org/show_bug.cgi?id=57103
2505
2506         * inspector/Inspector.json:
2507         * inspector/InspectorResourceAgent.cpp:
2508         (WebCore::buildObjectForFrameResource):
2509         (WebCore::buildObjectForCachedResource):
2510         (WebCore::InspectorResourceAgent::willSendRequest):
2511         (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
2512         (WebCore::buildObjectForFrame):
2513         (WebCore::buildObjectForFrameTree):
2514         (WebCore::InspectorResourceAgent::didCommitLoad):
2515         (WebCore::InspectorResourceAgent::enable):
2516         * inspector/front-end/NetworkManager.js:
2517         (WebInspector.NetworkManager.prototype.requestContent):
2518         (WebInspector.NetworkDispatcher):
2519         (WebInspector.NetworkDispatcher.prototype.willSendRequest):
2520         (WebInspector.NetworkDispatcher.prototype.didReceiveResponse):
2521         (WebInspector.NetworkDispatcher.prototype.didLoadResourceFromMemoryCache):
2522         (WebInspector.NetworkDispatcher.prototype.frameDetachedFromParent):
2523         (WebInspector.NetworkDispatcher.prototype.didCommitLoadForFrame):
2524         (WebInspector.NetworkDispatcher.prototype.didCreateWebSocket):
2525         (WebInspector.NetworkDispatcher.prototype._appendRedirect):
2526         (WebInspector.NetworkDispatcher.prototype._addFramesRecursively):
2527         (WebInspector.NetworkDispatcher.prototype._createResource):
2528         * inspector/front-end/ResourceTreeModel.js:
2529         (WebInspector.ResourceTreeModel.prototype.addOrUpdateFrame):
2530         (WebInspector.ResourceTreeModel.prototype.didCommitLoadForFrame):
2531         (WebInspector.ResourceTreeModel.prototype._clearChildFramesAndResources):
2532         (WebInspector.ResourceTreeModel.prototype._clearResources):
2533         * inspector/front-end/ResourcesPanel.js:
2534         (WebInspector.ResourcesPanel.prototype.addOrUpdateFrame):
2535         (WebInspector.ResourcesPanel.prototype.addResourceToFrame):
2536
2537 2011-03-25  Dave Hyatt  <hyatt@apple.com>
2538
2539         Reviewed by Adele Peterson.
2540
2541         REGRESSION(r77257): Only first page of a document is printed
2542         https://bugs.webkit.org/show_bug.cgi?id=56958
2543
2544         Test: printing/page-count-layout-overflow.html
2545
2546         * page/FrameView.cpp:
2547         (WebCore::FrameView::forceLayoutForPagination): Moved clearing of overflow
2548             to the right place.
2549
2550 2011-03-25  Benjamin Poulain  <benjamin.poulain@nokia.com>
2551
2552         Reviewed by Andreas Kling.
2553
2554         [Qt] QtWebKit will not compile with QT_ASCII_CAST_WARNINGS enabled
2555         https://bugs.webkit.org/show_bug.cgi?id=57087
2556
2557         Use explicit conversion for string to avoid depending on the default codec
2558         installed by the user code.
2559
2560         * bridge/qt/qt_pixmapruntime.cpp:
2561         (JSC::Bindings::QtPixmapToDataUrlMethod::invoke):
2562         (JSC::Bindings::QtPixmapInstance::valueOf):
2563         * platform/qt/LanguageQt.cpp:
2564         (WebCore::platformDefaultLanguage):
2565         * platform/qt/PasteboardQt.cpp:
2566         (WebCore::Pasteboard::writeSelection):
2567         * plugins/qt/PluginPackageQt.cpp:
2568         (WebCore::initializeGtk):
2569         * plugins/qt/PluginViewQt.cpp:
2570         (WebCore::getPluginDisplay):
2571
2572 2011-03-25  Chang Shu  <cshu@webkit.org>
2573
2574         Reviewed by Ryosuke Niwa.
2575
2576         rename Node::isContentEditable and all call sites to rendererIsEditable
2577         https://bugs.webkit.org/show_bug.cgi?id=54290
2578
2579         This is part of the effort to separate JS API HTMLElement isContentEditable from
2580         internal Node::rendererIsEditable.
2581
2582         Code refactoring. No new tests.
2583
2584         * accessibility/AccessibilityRenderObject.cpp:
2585         (WebCore::AccessibilityRenderObject::isReadOnly):
2586         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
2587         * dom/Document.cpp:
2588         (WebCore::acceptsEditingFocus):
2589         * dom/Node.cpp:
2590         (WebCore::Node::rendererIsEditable):
2591         (WebCore::Node::shouldUseInputMethod):
2592         (WebCore::Node::canStartSelection):
2593         (WebCore::Node::rootEditableElement):
2594         * dom/Node.h:
2595         (WebCore::Node::isContentEditable):
2596         (WebCore::Node::rendererIsEditable):
2597         (WebCore::Node::rendererIsRichlyEditable):
2598         * dom/Position.cpp:
2599         (WebCore::nextRenderedEditable):
2600         (WebCore::previousRenderedEditable):
2601         (WebCore::Position::atEditingBoundary):
2602         (WebCore::Position::parentEditingBoundary):
2603         (WebCore::Position::upstream):
2604         (WebCore::Position::downstream):
2605         (WebCore::Position::isCandidate):
2606         * dom/PositionIterator.cpp:
2607         (WebCore::PositionIterator::isCandidate):
2608         * editing/AppendNodeCommand.cpp:
2609         (WebCore::AppendNodeCommand::AppendNodeCommand):
2610         (WebCore::AppendNodeCommand::doApply):
2611         (WebCore::AppendNodeCommand::doUnapply):
2612         * editing/ApplyStyleCommand.cpp:
2613         (WebCore::containsNonEditableRegion):
2614         (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
2615         (WebCore::ApplyStyleCommand::removeInlineStyleFromElement):
2616         (WebCore::ApplyStyleCommand::surroundNodeRangeWithElement):
2617         * editing/CompositeEditCommand.cpp:
2618         (WebCore::CompositeEditCommand::breakOutOfEmptyListItem):
2619         * editing/DeleteButtonController.cpp:
2620         (WebCore::isDeletableElement):
2621         (WebCore::enclosingDeletableElement):
2622         * editing/DeleteFromTextNodeCommand.cpp:
2623         (WebCore::DeleteFromTextNodeCommand::doApply):
2624         (WebCore::DeleteFromTextNodeCommand::doUnapply):
2625         * editing/DeleteSelectionCommand.cpp:
2626         (WebCore::DeleteSelectionCommand::removeNode):
2627         * editing/Editor.cpp:
2628         (WebCore::Editor::canDeleteRange):
2629         (WebCore::Editor::markMisspellingsOrBadGrammar):
2630         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
2631         * editing/EditorCommand.cpp:
2632         (WebCore::verticalScrollDistance):
2633         * editing/FormatBlockCommand.cpp:
2634         (WebCore::enclosingBlockToSplitTreeTo):
2635         * editing/IndentOutdentCommand.cpp:
2636         (WebCore::IndentOutdentCommand::outdentParagraph):
2637         * editing/InsertIntoTextNodeCommand.cpp:
2638         (WebCore::InsertIntoTextNodeCommand::doApply):
2639         (WebCore::InsertIntoTextNodeCommand::doUnapply):
2640         * editing/InsertNodeBeforeCommand.cpp:
2641         (WebCore::InsertNodeBeforeCommand::InsertNodeBeforeCommand):
2642         (WebCore::InsertNodeBeforeCommand::doApply):
2643         (WebCore::InsertNodeBeforeCommand::doUnapply):
2644         * editing/JoinTextNodesCommand.cpp:
2645         (WebCore::JoinTextNodesCommand::doApply):
2646         (WebCore::JoinTextNodesCommand::doUnapply):
2647         * editing/MergeIdenticalElementsCommand.cpp:
2648         (WebCore::MergeIdenticalElementsCommand::doApply):
2649         (WebCore::MergeIdenticalElementsCommand::doUnapply):
2650         * editing/RemoveNodeCommand.cpp:
2651         (WebCore::RemoveNodeCommand::doApply):
2652         (WebCore::RemoveNodeCommand::doUnapply):
2653         * editing/ReplaceSelectionCommand.cpp:
2654         (WebCore::ReplacementFragment::ReplacementFragment):
2655         * editing/SelectionController.cpp:
2656         (WebCore::SelectionController::selectFrameElementInParentIfFullySelected):
2657         (WebCore::SelectionController::setSelectionFromNone):
2658         * editing/SplitElementCommand.cpp:
2659         (WebCore::SplitElementCommand::executeApply):
2660         (WebCore::SplitElementCommand::doUnapply):
2661         * editing/SplitTextNodeCommand.cpp:
2662         (WebCore::SplitTextNodeCommand::doApply):
2663         (WebCore::SplitTextNodeCommand::doUnapply):
2664         (WebCore::SplitTextNodeCommand::doReapply):
2665         * editing/SplitTextNodeContainingElementCommand.cpp:
2666         (WebCore::SplitTextNodeContainingElementCommand::doApply):
2667         * editing/VisiblePosition.cpp:
2668         (WebCore::VisiblePosition::canonicalPosition):
2669         * editing/WrapContentsInDummySpanCommand.cpp:
2670         (WebCore::WrapContentsInDummySpanCommand::doUnapply):
2671         (WebCore::WrapContentsInDummySpanCommand::doReapply):
2672         * editing/htmlediting.cpp:
2673         (WebCore::highestEditableRoot):
2674         (WebCore::lowestEditableAncestor):
2675         (WebCore::isEditablePosition):
2676         (WebCore::isRichlyEditablePosition):
2677         (WebCore::firstEditablePositionAfterPositionInRoot):
2678         (WebCore::extendRangeToWrappingNodes):
2679         (WebCore::enclosingNodeWithTag):
2680         (WebCore::enclosingNodeOfType):
2681         (WebCore::highestEnclosingNodeOfType):
2682         (WebCore::canMergeLists):
2683         * editing/visible_units.cpp:
2684         (WebCore::previousLeafWithSameEditability):
2685         (WebCore::previousLinePosition):
2686         (WebCore::nextLeafWithSameEditability):
2687         (WebCore::nextLinePosition):
2688         (WebCore::startOfParagraph):
2689         (WebCore::endOfParagraph):
2690         * html/HTMLAnchorElement.cpp:
2691         (WebCore::HTMLAnchorElement::supportsFocus):
2692         (WebCore::HTMLAnchorElement::defaultEventHandler):
2693         (WebCore::HTMLAnchorElement::setActive):
2694         (WebCore::HTMLAnchorElement::canStartSelection):
2695         (WebCore::HTMLAnchorElement::treatLinkAsLiveForEventType):
2696         * html/HTMLBodyElement.cpp:
2697         (WebCore::HTMLBodyElement::supportsFocus):
2698         * html/HTMLElement.cpp:
2699         (WebCore::HTMLElement::supportsFocus):
2700         (WebCore::HTMLElement::isContentEditable):
2701         (WebCore::HTMLElement::contentEditable):
2702         * html/HTMLElement.h:
2703         * page/DragController.cpp:
2704         (WebCore::DragController::operationForLoad):
2705         (WebCore::DragController::canProcessDrag):
2706         * page/EventHandler.cpp:
2707         (WebCore::EventHandler::handleMouseReleaseEvent):
2708         (WebCore::EventHandler::selectCursor):
2709         * page/FocusController.cpp:
2710         (WebCore::relinquishesEditingFocus):
2711         * rendering/HitTestResult.cpp:
2712         (WebCore::HitTestResult::isContentEditable):
2713         * rendering/RenderBlock.cpp:
2714         (WebCore::positionForPointRespectingEditingBoundaries):
2715         (WebCore::RenderBlock::hasLineIfEmpty):
2716         * rendering/RenderBlockLineLayout.cpp:
2717         (WebCore::RenderBlock::addOverflowFromInlineChildren):
2718         * rendering/RenderBox.cpp:
2719         (WebCore::RenderBox::canBeProgramaticallyScrolled):
2720         * rendering/RenderObject.cpp:
2721         (WebCore::RenderObject::createVisiblePosition):
2722         * rendering/RootInlineBox.cpp:
2723         (WebCore::isEditableLeaf):
2724         * svg/SVGAElement.cpp:
2725         (WebCore::SVGAElement::supportsFocus):
2726
2727 2011-03-25  Maciej Stachowiak  <mjs@apple.com>
2728
2729         Reviewed by Antti Koivisto.
2730
2731         Crash when a wbr element is inserted inside mroot
2732         https://bugs.webkit.org/show_bug.cgi?id=56352
2733
2734         Test: mathml/wbr-in-mroot-crash.html
2735
2736         * rendering/mathml/RenderMathMLRoot.cpp:
2737         (WebCore::RenderMathMLRoot::layout): Look for the first box model child of the first
2738         child, instead of just assuming.
2739
2740 2011-03-25  Vsevolod Vlasov  <vsevik@chromium.org>
2741
2742         Reviewed by Pavel Feldman.
2743
2744         XML Viewer: extensions can't render original XML
2745         https://bugs.webkit.org/show_bug.cgi?id=56263
2746
2747         Added source xml to transformed document, renamed onload function.
2748
2749         * xml/XMLTreeViewer.cpp:
2750         (WebCore::XMLTreeViewer::transformDocumentToTreeView):
2751         * xml/XMLViewer.xsl:
2752
2753 2011-03-25  Benjamin Poulain  <benjamin.poulain@nokia.com>
2754
2755         Reviewed by Andreas Kling.
2756
2757         [Qt] Get rid of the invalid string conversion with ::fromAscii()
2758         https://bugs.webkit.org/show_bug.cgi?id=57102
2759
2760         Replace ::fromAscii() with ::fromLatin1() to make sure the codec does not depend on the user code.
2761
2762         * platform/network/qt/QNetworkReplyHandler.cpp:
2763         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
2764         * platform/qt/CookieJarQt.cpp:
2765         (WebCore::cookies):
2766         (WebCore::cookieRequestHeaderFieldValue):
2767
2768 2011-03-25  Sheriff Bot  <webkit.review.bot@gmail.com>
2769
2770         Unreviewed, rolling out r81953.
2771         http://trac.webkit.org/changeset/81953
2772         https://bugs.webkit.org/show_bug.cgi?id=57096
2773
2774         "inspector test breakage: part 2/2" (Requested by apavlov on
2775         #webkit).
2776
2777         * inspector/Inspector.json:
2778         * inspector/InspectorCSSAgent.cpp:
2779         (WebCore::InspectorCSSAgent::getAllStyles):
2780         * inspector/InspectorCSSAgent.h:
2781         * inspector/InspectorStyleSheet.cpp:
2782         (WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
2783         * inspector/InspectorStyleSheet.h:
2784         * inspector/front-end/AuditRules.js:
2785         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.styleSheetCallback):
2786         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.allStylesCallback):
2787         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun):
2788         * inspector/front-end/CSSStyleModel.js:
2789         (WebInspector.CSSStyleModel.prototype._styleSheetChanged.callback):
2790         (WebInspector.CSSStyleModel.prototype._styleSheetChanged):
2791         (WebInspector.CSSStyleModel.prototype._onRevert):
2792         (WebInspector.CSSStyleSheet):
2793         (WebInspector.CSSStyleSheet.prototype.setText):
2794
2795 2011-03-15  Alexander Pavlov  <apavlov@chromium.org>
2796
2797         Reviewed by Pavel Feldman.
2798
2799         Web Inspector: Fix handling of the CSSAgent.setStyleSheetText() results in CSSStyleModel.js
2800         https://bugs.webkit.org/show_bug.cgi?id=56310
2801
2802         Instead of stylesheet ids, CSSAgent.getAllStyleSheets() now returns metainfo objects containing
2803         "styleSheetId", "sourceURL", "disabled", and "title" fields. The latter three are not returned
2804         by CSSAgent.getStyleSheet() anymore.
2805
2806         Test: inspector/styles/get-set-stylesheet-text.html
2807
2808         * inspector/Inspector.json:
2809         * inspector/InspectorCSSAgent.cpp:
2810         (WebCore::InspectorCSSAgent::getAllStyleSheets):
2811         * inspector/InspectorCSSAgent.h:
2812         * inspector/InspectorStyleSheet.cpp:
2813         (WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
2814         (WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo):
2815         * inspector/InspectorStyleSheet.h:
2816         * inspector/front-end/AuditRules.js:
2817         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.styleSheetCallback):
2818         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.allStylesCallback):
2819         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun):
2820         * inspector/front-end/CSSStyleModel.js:
2821         (WebInspector.CSSStyleModel.prototype._styleSheetChanged.callback):
2822         (WebInspector.CSSStyleModel.prototype._styleSheetChanged):
2823         (WebInspector.CSSStyleModel.prototype._onRevert):
2824         (WebInspector.CSSStyleSheet):
2825         (WebInspector.CSSStyleSheet.prototype.setText):
2826
2827 2011-03-25  Pavel Feldman  <pfeldman@chromium.org>
2828
2829         Reviewed by Yury Semikhatsky.
2830
2831         Web Inspector: extension server should not convert all resources to HAR when there are no extensions.
2832         https://bugs.webkit.org/show_bug.cgi?id=57044
2833
2834         * inspector/front-end/ExtensionServer.js:
2835         (WebInspector.ExtensionServer.prototype._notifyResourceFinished):
2836         (WebInspector.ExtensionServer.prototype._hasSubscribers):
2837
2838 2011-03-25  Leo Yang  <leo.yang@torchmobile.com.cn>
2839
2840         Reviewed by Nikolas Zimmermann.
2841
2842         SVG <use> element performance improvement
2843         https://bugs.webkit.org/show_bug.cgi?id=57077
2844
2845         SVG <use> element was expanding nesting <use> and <symbol> elements
2846         in an inefficient way. After it expanded an <use> or a <symbol>
2847         element it would restart expanding from the shadow tree root.
2848         This behavior was leading about 160 millions of calls to
2849         expandUseElementInShadowTree or expandSymbolElementInShadowTree for
2850         a single shadow tree which is illustrated by
2851         http://upload.wikimedia.org/wikipedia/commons/4/4e/Sierpinski_carpet_6.svg.
2852         But the effective calls, which really expand <use> or <symbol>
2853         elements, were about 5200; others were passing-by calls, which are
2854         recursively down to the children.
2855
2856         This patch is altering the expanding path to reduce the passing-by
2857         calls. It will expand elements in sibling chain where there is an
2858         effective call, because the effective call replaces element which is
2859         expanded and the replacement results lose of the sibling chain of
2860         the replaced on the upper recursion stack. With this patch the
2861         passing-by calls are reduced from about 160 millions to about 30
2862         thousands.
2863
2864         No functionality change, no new tests.
2865
2866         * svg/SVGUseElement.cpp:
2867         (WebCore::SVGUseElement::expandUseElementsInShadowTree):
2868         (WebCore::SVGUseElement::expandSymbolElementsInShadowTree):
2869         * svg/SVGUseElement.h:
2870
2871 2011-03-25  Dominic Cooney  <dominicc@google.com>
2872
2873         Reviewed by Kent Tamura.
2874
2875         Makes keygen support autofocus attribute.
2876         https://bugs.webkit.org/show_bug.cgi?id=57091
2877
2878         Test: fast/forms/autofocus-keygen.html
2879
2880         * html/HTMLFormControlElement.cpp:
2881         (WebCore::HTMLFormControlElement::attach):
2882
2883 2011-03-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2884
2885         Reviewed by Antonio Gomes.
2886
2887         [EFL] Add sound / mute button to MediaControl UI
2888         https://bugs.webkit.org/show_bug.cgi?id=56726
2889
2890         Add sound / mute button to MediaControl UI.
2891
2892         * platform/efl/RenderThemeEfl.cpp:
2893         (WebCore::RenderThemeEfl::edjeGroupFromFormType):
2894         (WebCore::RenderThemeEfl::emitMediaButtonSignal):
2895         (WebCore::RenderThemeEfl::paintMediaMuteButton):
2896         * platform/efl/RenderThemeEfl.h:
2897
2898 2011-03-24  Nikolas Zimmermann  <nzimmermann@rim.com>
2899
2900         Reviewed by Darin Adler.
2901
2902         Introduce WTF HexNumber.h
2903         https://bugs.webkit.org/show_bug.cgi?id=56099
2904
2905         Introduce a set of functions that ease converting from a bye or a number to a hex string,
2906         replacing several of these conversions and String::format("%x") usages all over WebCore.
2907
2908         * ForwardingHeaders/wtf/HexNumber.h: Added.
2909         * css/CSSOMUtils.cpp:
2910         (WebCore::serializeCharacterAsCodePoint):
2911         * css/CSSParser.cpp:
2912         (WebCore::quoteCSSString):
2913         * inspector/InspectorResourceAgent.cpp:
2914         (WebCore::createReadableStringFromBinary):
2915         * platform/FileSystem.cpp:
2916         (WebCore::encodeForFileName):
2917         * platform/KURL.cpp:
2918         (WebCore::appendEscapedChar):
2919         * platform/UUID.cpp:
2920         (WebCore::createCanonicalUUIDString):
2921         * platform/graphics/Color.cpp:
2922         (WebCore::Color::serialized):
2923         * platform/network/FormDataBuilder.cpp:
2924         (WebCore::FormDataBuilder::encodeStringAsFormData):
2925         * rendering/RenderTreeAsText.cpp:
2926         (WebCore::quoteAndEscapeNonPrintables):
2927
2928 2011-03-24  Stephanie Lewis  <slewis@apple.com>
2929
2930         Reviewed by Geoff Garen.
2931
2932         <rdar://problem/9146716> REGRESSION: ~10 MB increase in memory under CachedScripts
2933         Add back a call to destroy decoded data after access.  Keep the SourceProviderCache 
2934         around as long as their are still clients to use it.
2935
2936         No new tests because there is no change in behavior.  Current tests pass.
2937
2938         * loader/cache/CachedScript.cpp:
2939         (WebCore::CachedScript::script):
2940         (WebCore::CachedScript::destroyDecodedData):
2941
2942 2011-03-24  Stephanie Lewis  <slewis@apple.com>
2943
2944         Reviewed by Geoff Garen.
2945
2946         https://bugs.webkit.org/show_bug.cgi?id=57073
2947         Rework the AtomicHTMLConstructor to reserve space for attributes based on the size of the attribute list.
2948         Saves 1.5 MB on Membuster.
2949
2950         No new tests because there was no change in behavior.  Current tests pass.
2951
2952         * html/parser/HTMLToken.h:
2953         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
2954         (WebCore::AtomicHTMLToken::initializeAttributes):
2955
2956 2011-03-24  Sheriff Bot  <webkit.review.bot@gmail.com>
2957
2958         Unreviewed, rolling out r81916 and r81917.
2959         http://trac.webkit.org/changeset/81916
2960         http://trac.webkit.org/changeset/81917
2961         https://bugs.webkit.org/show_bug.cgi?id=57071
2962
2963         broke a test on platforms that do not have QuickTime installed
2964         (Requested by estes on #webkit).
2965
2966         * html/HTMLEmbedElement.cpp:
2967         (WebCore::HTMLEmbedElement::HTMLEmbedElement):
2968         * html/HTMLObjectElement.cpp:
2969         (WebCore::HTMLObjectElement::HTMLObjectElement):
2970         (WebCore::HTMLObjectElement::parametersForPlugin):
2971         * html/HTMLPlugInImageElement.cpp:
2972         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
2973         (WebCore::HTMLPlugInImageElement::isImageType):
2974         (WebCore::HTMLPlugInImageElement::wouldLoadAsNetscapePlugin):
2975         * html/HTMLPlugInImageElement.h:
2976         * loader/EmptyClients.h:
2977         (WebCore::EmptyFrameLoaderClient::objectContentType):
2978         * loader/FrameLoader.cpp:
2979         (WebCore::FrameLoader::defaultObjectContentType):
2980         * loader/FrameLoader.h:
2981         * loader/FrameLoaderClient.h:
2982         * loader/SubframeLoader.cpp:
2983         (WebCore::SubframeLoader::resourceWillUsePlugin):
2984         (WebCore::SubframeLoader::requestObject):
2985         (WebCore::SubframeLoader::shouldUsePlugin):
2986         * loader/SubframeLoader.h:
2987
2988 2011-03-24  Dimitri Glazkov  <dglazkov@chromium.org>
2989
2990         Reviewed by Darin Adler.
2991
2992         Eliminate Node::dispatchGenericEvent.
2993         https://bugs.webkit.org/show_bug.cgi?id=57045
2994
2995         No functional change, covered by existing tests.
2996
2997         * dom/Node.cpp:
2998         (WebCore::Node::dispatchEvent): Combined with the body of dispatchGenericEvent,
2999             removed unnecessary extra refs and a stale comment.
3000         * dom/Node.h:
3001         * page/DOMWindow.cpp:
3002         (WebCore::DOMWindow::dispatchLoadEvent): Changed to use dispatchEvent.
3003         * svg/SVGElement.cpp:
3004         (WebCore::SVGElement::sendSVGLoadEventIfPossible): Ditto.
3005         * svg/SVGElementInstance.cpp:
3006         (WebCore::SVGElementInstance::dispatchEvent): Ditto. The code here still
3007             works thanks to SVG-aware retargeting in Node.
3008
3009 2011-03-24  Chris Rogers  <crogers@google.com>
3010
3011         Reviewed by Kenneth Russell.
3012
3013         web audio: Properly sample-rate convert audio assets in chromium port
3014         https://bugs.webkit.org/show_bug.cgi?id=56980
3015
3016         No new tests since audio API is not yet implemented.
3017
3018         * WebCore.gypi:
3019         * platform/audio/AudioBus.cpp:
3020         (WebCore::AudioBus::createBySampleRateConverting):
3021         (WebCore::AudioBus::createByMixingToMono):
3022         * platform/audio/AudioBus.h:
3023         * platform/audio/HRTFKernel.cpp:
3024         (WebCore::extractAverageGroupDelay):
3025         (WebCore::HRTFKernel::HRTFKernel):
3026         * platform/audio/SincResampler.cpp:
3027         * platform/audio/chromium/AudioBusChromium.cpp:
3028         (WebCore::AudioBus::loadPlatformResource):
3029         (WebCore::createBusFromInMemoryAudioFile):
3030
3031 2011-03-24  Rik Cabanier  <cabanier@adobe.com>
3032
3033         Reviewed by David Hyatt.
3034
3035         REGRESSION (r81625): fast/css/percentage-non-integer.html fails on Windows
3036         https://bugs.webkit.org/show_bug.cgi?id=56829
3037
3038         Test: fast/css/percentage-non-integer.html
3039
3040         * platform/Length.h:
3041         (WebCore::Length::calcValue):
3042         (WebCore::Length::calcMinValue):
3043         (WebCore::Length::calcFloatValue):
3044
3045 2011-03-24  Mihai Parparita  <mihaip@chromium.org>
3046
3047         Reviewed by James Robinson.
3048
3049         [Chromium] Vertical Japanese text is not displayed on Snow Leopard
3050         https://bugs.webkit.org/show_bug.cgi?id=56962
3051
3052         Make Snow Leopard check added by r80740 into a runtime check for
3053         Chromium, since it uses the same binary on both Leopard and Snow Leopard.
3054
3055         * platform/graphics/mac/FontMac.mm:
3056         (WebCore::hasBrokenCTFontGetVerticalTranslationsForGlyphs):
3057         (WebCore::showGlyphsWithAdvances):
3058
3059 2011-03-24  Brady Eidson  <beidson@apple.com>
3060
3061         Reviewed by Sam Weinig.
3062
3063         https://bugs.webkit.org/show_bug.cgi?id=57058
3064         Hookup the UIProcess WebIconDatabase to a WebCore::IconDatabase as its implementation
3065
3066         * loader/icon/IconDatabase.cpp:
3067         (WebCore::IconDatabase::synchronousLoadDecisionForIconURL): Only add the DocumentLoader to the set if it's non-zero.
3068         (WebCore::IconDatabase::IconDatabase): Add more logging.
3069         (WebCore::IconDatabase::performURLImport): Dispatch the "didFinishURLImport" client callback using the following 3 methods.
3070         (WebCore::FinishedURLImport::FinishedURLImport):
3071         (WebCore::FinishedURLImport::performWork):
3072         (WebCore::IconDatabase::dispatchDidFinishURLImportOnMainThread):
3073
3074         * loader/icon/IconDatabase.h:
3075         (WebCore::IconDatabase::create): Expose a PassOwnPtr<> creator.
3076
3077         * WebCore.exp.in:
3078
3079 2011-03-23  Jer Noble  <jer.noble@apple.com>
3080
3081         Reviewed by Maciej Stachowiak.
3082
3083         Application Cache should save audio/ and video/ mime types as flat files
3084         https://bugs.webkit.org/show_bug.cgi?id=53784
3085         <rdar://problem/8932473>
3086
3087         No new tests.
3088
3089         ApplicationCacheResource::create() now takes an additional "path" parameter.  To facilitate 
3090         extracting this path information, two functions in ApplicationCacheHost have been made public.
3091
3092         * loader/appcache/ApplicationCacheGroup.cpp:
3093         (WebCore::ApplicationCacheGroup::didReceiveResponse): Pass along new "path" parameter.
3094         (WebCore::ApplicationCacheGroup::didFail): Ditto.
3095         * loader/appcache/ApplicationCacheHost.h:
3096         (WebCore::ApplicationCacheHost::shouldLoadResourceFromApplicationCache): Made public.
3097         (WebCore::ApplicationCacheHost::getApplicationCacheFallbackResource): Made public.
3098         * loader/appcache/ApplicationCacheResource.cpp:
3099         (WebCore::ApplicationCacheResource::ApplicationCacheResource): Add new "path" parameter.
3100         * loader/appcache/ApplicationCacheResource.h:
3101         (WebCore::ApplicationCacheResource::create): Ditto.
3102         (WebCore::ApplicationCacheResource::path): New accessor.
3103
3104 2011-03-24  Andy Estes  <aestes@apple.com>
3105
3106         Reviewed by Darin Adler.
3107
3108         REGRESSION (r70748): latest nightly builds kills AC_QuickTime.js
3109         https://bugs.webkit.org/show_bug.cgi?id=49016
3110
3111         AC_QuickTime.js uses the common <object>/<embed> paradigm to embed the
3112         QuickTime plug-in in web pages. r70748 removed our mapping of classids
3113         to MIME types, which causes WebKit to fall back from the object to the
3114         embed tag when QuickTime is embedded by this script. The script emits
3115         the following embed tag to embed a QuickTime movie with a poster frame:
3116
3117         <embed src="poster-frame.png" target="quicktimeplayer" href="movie.mov">
3118
3119         The expectation is that a QuickTime plug-in is instantiated to display the
3120         poster frame, since QuickTime registers for many common image MIME
3121         types. This is how Gecko behaves for embed. However, WebKit prefers to
3122         use its native image rendering for image embeds, in which case no movie
3123         is played when the poster frame is clicked.
3124
3125         Fix this by changing embed to check for a plug-in that can handle the
3126         image type before rendering the image natively. This matches Gecko.
3127
3128         Test: fast/images/embed-image-plugins-disabled.html
3129
3130         * html/HTMLObjectElement.cpp:
3131         (WebCore::HTMLObjectElement::parametersForPlugin):
3132         * html/HTMLPlugInImageElement.cpp:
3133         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
3134         (WebCore::HTMLPlugInImageElement::isImageType):
3135         (WebCore::HTMLPlugInImageElement::wouldLoadAsNetscapePlugin):
3136         * html/HTMLPlugInImageElement.h:
3137         (WebCore::HTMLPlugInImageElement::preferPluginsForImages):
3138         * loader/EmptyClients.h:
3139         (WebCore::EmptyFrameLoaderClient::objectContentType):
3140         * loader/FrameLoader.cpp:
3141         (WebCore::FrameLoader::defaultObjectContentType):
3142         * loader/FrameLoader.h:
3143         * loader/FrameLoaderClient.h:
3144         * loader/SubframeLoader.cpp:
3145         (WebCore::SubframeLoader::resourceWillUsePlugin):
3146         (WebCore::SubframeLoader::requestPlugin):
3147         (WebCore::SubframeLoader::requestObject):
3148         (WebCore::SubframeLoader::shouldUsePlugin):
3149         * loader/SubframeLoader.h:
3150
3151 2011-03-24  Mike Reed  <reed@google.com>
3152
3153         Reviewed by James Robinson.
3154
3155         Move lifetime management of grContext from a global to being
3156         per-SharedGraphicsContext3D, which correctly is 1:1 with the
3157         underlying opengl context.
3158         https://bugs.webkit.org/show_bug.cgi?id=54330
3159
3160         No new tests. Existing <canvas> tests exercise this:
3161
3162         * platform/graphics/chromium/DrawingBufferChromium.cpp:
3163         (WebCore::DrawingBuffer::DrawingBuffer):
3164         (WebCore::DrawingBuffer::~DrawingBuffer):
3165         (WebCore::DrawingBuffer::publishToPlatformLayer):
3166         (WebCore::DrawingBuffer::setGrContext):
3167         * platform/graphics/gpu/DrawingBuffer.h:
3168         * platform/graphics/gpu/SharedGraphicsContext3D.cpp:
3169         (WebCore::SharedGraphicsContext3D::SharedGraphicsContext3D):
3170         (WebCore::SharedGraphicsContext3D::~SharedGraphicsContext3D):
3171         (WebCore::SharedGraphicsContext3D::getGrContext):
3172         * platform/graphics/gpu/SharedGraphicsContext3D.h:
3173         * platform/graphics/skia/PlatformContextSkia.cpp:
3174         (WebCore::PlatformContextSkia::~PlatformContextSkia):
3175         (WebCore::PlatformContextSkia::setSharedGraphicsContext3D):
3176
3177 2011-03-24  Dimitri Glazkov  <dglazkov@chromium.org>
3178
3179         Reviewed by Darin Adler.
3180
3181         Untangle dependency between event ancestor chain computation and InspectorDOMAgent.
3182         https://bugs.webkit.org/show_bug.cgi?id=57050
3183
3184         Inspector's list of event listeners does not need to invoke Node::getEventListeners,
3185         because it simply wants to collect all ancestors and never uses EventContext bits.
3186
3187         No functional change, covered by existing tests.
3188
3189         * dom/Node.cpp:
3190         (WebCore::getEventAncestors): Converted into a static function.
3191         (WebCore::Node::dispatchGenericEvent): Changed to pass node to getEventAncestors.
3192         * dom/Node.h: Removed decl, moved EventDispatchBehavior enum inside.
3193         * inspector/InspectorDOMAgent.cpp:
3194         (WebCore::InspectorDOMAgent::getEventListenersForNode): Replaced the call
3195             to getEventAncestors with a simple ancestor traversal loop.
3196
3197 2011-03-24  Adam Klein  <adamk@chromium.org>
3198
3199         Reviewed by David Levin.
3200
3201         [fileapi] Make FileError and FileException accessible from WorkerContext
3202         https://bugs.webkit.org/show_bug.cgi?id=57041
3203
3204         * workers/WorkerContext.idl:
3205
3206 2011-03-24  Sam Weinig  <sam@webkit.org>
3207
3208         Reviewed by Anders Carlsson.
3209
3210         Remove legacy version of findPlainText.
3211         https://bugs.webkit.org/show_bug.cgi?id=57056
3212
3213         * editing/TextIterator.cpp:
3214         * editing/TextIterator.h:
3215         Remove legacy overload of findPlainText that doesn't
3216         take an options parameter.
3217
3218 2011-03-24  Geoffrey Garen  <ggaren@apple.com>
3219
3220         Reviewed by Oliver Hunt.
3221
3222         Ensure that all compilation takes place within a dynamic global object scope
3223         https://bugs.webkit.org/show_bug.cgi?id=57054
3224
3225         * bindings/js/JSErrorHandler.cpp:
3226         (WebCore::JSErrorHandler::handleEvent):
3227         * bindings/js/JSEventListener.cpp:
3228         (WebCore::JSEventListener::handleEvent): Updated for signature change.
3229
3230 2011-03-24  John Bauman  <jbauman@chromium.org>
3231
3232         Reviewed by Kenneth Russell.
3233
3234         preserveDrawingBuffer=true is ignored
3235         https://bugs.webkit.org/show_bug.cgi?id=56987
3236
3237         Add code to the V8 and JSC bindings to support grabbing the value of
3238         preserveDrawingBuffer from the input context attributes. Also, in
3239         WebGLRenderingContext use the WebGLContextAttributes that were input
3240         directly, not those from the GraphicsContext3D which could have been
3241         changed.
3242
3243         No new tests, as this can't be tested with DRT. However, this works
3244         when tested manually.
3245
3246         * bindings/js/JSHTMLCanvasElementCustom.cpp:
3247         (WebCore::JSHTMLCanvasElement::getContext):
3248         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
3249         (WebCore::V8HTMLCanvasElement::getContextCallback):
3250         * html/canvas/WebGLRenderingContext.cpp:
3251         (WebCore::WebGLRenderingContext::clearIfComposited):
3252         (WebCore::WebGLRenderingContext::paintRenderingResultsToCanvas):
3253
3254 2011-03-24  Enrica Casucci  <enrica@apple.com>
3255
3256         Reviewed by Alexey Proskuryakov.
3257
3258         WebKit2:Services menu item to convert selected Simplified/Traditional Chinese Text is not working.
3259         https://bugs.webkit.org/show_bug.cgi?id=56975
3260         <rdar://problem/8915066>
3261         
3262         Adding support in WebCore to implement readSelectionFromPasteboard
3263         to support Mac OS X services from WebKit2.
3264
3265         * WebCore.exp.in:
3266         * editing/Editor.h:
3267         * editing/mac/EditorMac.mm:
3268         (WebCore::Editor::readSelectionFromPasteboard): Added entry point
3269         to call the paste functions with the specified pasteboard.
3270
3271 2011-03-24  Vsevolod Vlasov  <vsevik@chromium.org>
3272
3273         Reviewed by Pavel Feldman.
3274
3275         Web Inspector: Inspector does not show correct transfer size for synchronous requests
3276         https://bugs.webkit.org/show_bug.cgi?id=56951
3277
3278         Fixed transfer size for synchronous load.
3279
3280         Test: http/tests/inspector/network/network-size-sync.html
3281
3282         * loader/FrameLoader.cpp:
3283         (WebCore::FrameLoader::willLoadMediaElementURL):
3284         (WebCore::FrameLoader::commitProvisionalLoad):
3285         (WebCore::FrameLoader::loadResourceSynchronously):
3286         (WebCore::FrameLoader::loadedResourceFromMemoryCache):
3287         * loader/ResourceLoadNotifier.cpp:
3288         (WebCore::ResourceLoadNotifier::sendRemainingDelegateMessages):
3289         * loader/ResourceLoadNotifier.h:
3290
3291 2011-03-24  Brady Eidson  <beidson@apple.com>
3292
3293         Reviewed by Adam Roben.
3294
3295         https://bugs.webkit.org/show_bug.cgi?id=57030
3296         REGRESSION (r81782): http/tests/inspector/extensions-resources-redirect.html sometimes crashes WebKit2's 
3297         web process while handling a WebIconDatabaseProxy::ReceivedIconLoadDecision message
3298
3299         The callback objects had some bogus ASSERTs and missed a relevant null check. If a callback was waiting on
3300         a message back from the UIProcess, but was invalidated from within the WebProcess in the meantime, it's
3301         perfectly valid to attempt to performCallback() after the callback function pointer has been cleared.
3302
3303         * loader/icon/IconDatabaseBase.h:
3304         (WebCore::EnumCallback::performCallback):
3305         (WebCore::EnumCallback::invalidate):
3306         (WebCore::EnumCallback::EnumCallback):
3307         (WebCore::ObjectCallback::performCallback):
3308         (WebCore::ObjectCallback::invalidate):
3309         (WebCore::ObjectCallback::ObjectCallback):
3310
3311 2011-03-24  Sam Weinig  <sam@webkit.org>
3312
3313         Reviewed by Darin Adler.
3314
3315         Dictionary text extraction is not correctly detecting word boundaries on bing.com
3316         <rdar://problem/9078569>
3317         https://bugs.webkit.org/show_bug.cgi?id=56995
3318
3319         * WebCore.exp.in:
3320         Add some editing related exports needed by WebKit2.
3321
3322 2011-03-24  Andy Estes  <aestes@apple.com>
3323
3324         Reviewed by Eric Seidel.
3325
3326         REGRESSION (r80231): Bad cast in HTMLTreeBuilder with closed </form> tags
3327         https://bugs.webkit.org/show_bug.cgi?id=56836
3328
3329         During fragment parsing, HTMLConstructionSite holds a reference to the
3330         fragment context's closest form ancestor. If a misnested form end tag is
3331         then encountered as the first node of the fragment, we will check to see
3332         if a corresponding form start tag is in scope even though no such tag
3333         exists. This led to isScope() walking the HTMLElementStack all the way
3334         to the root DocumentFragment and attempting to cast it to Element*.
3335
3336         Fix this by ensuring that the inScope() family of functions operate in
3337         terms of ContainerNodes to account for the fragment case.
3338
3339         Test: fast/parser/fragment-closest-form-ancestor.html
3340
3341         * html/parser/HTMLElementStack.cpp:
3342         (WebCore::HTMLNames::isRootNode):
3343         (WebCore::HTMLNames::isScopeMarker):
3344         (WebCore::HTMLNames::isTableScopeMarker):
3345         (WebCore::HTMLNames::isTableBodyScopeMarker):
3346         (WebCore::HTMLNames::isTableRowScopeMarker):
3347         (WebCore::HTMLElementStack::hasOnlyHTMLElementsInScope):
3348         (WebCore::HTMLElementStack::inScope):
3349
3350 2011-03-24  Enrica Casucci  <enrica@apple.com>
3351
3352         Reviewed by Darin Adler.
3353
3354         Repeated copy and paste-in-place operation results in increasingly verbose HTML.
3355         <rdar://problem/8690506>
3356         https://bugs.webkit.org/show_bug.cgi?id=56874
3357         
3358         When we calculate the style to apply at the insertion point we compare the initial
3359         style at the insertion point against the style calculated at the span we wrap the
3360         copied markup fragment with. We could end up with a series of unnecessary spans
3361         to remove the initial style that simply grow our markup.
3362         The consists in moving the insertion point outside any inline element that could
3363         affect the fragment being inserted when we are not pasting and matching the style.
3364
3365         Test: editing/pasteboard/paste-text-with-style.html
3366
3367         * editing/ReplaceSelectionCommand.cpp:
3368         (WebCore::isInlineNodeWithStyle): Added.
3369         (WebCore::ReplaceSelectionCommand::doApply): Added logic to change the insertion
3370         point according to the new rules.
3371
3372 2011-03-24  Benjamin Poulain  <benjamin.poulain@nokia.com>
3373
3374         Reviewed by Kenneth Rohde Christiansen.
3375
3376         [Qt] When we render WebGL offscreen, color conversion cost a lot of CPU cycles
3377         https://bugs.webkit.org/show_bug.cgi?id=40884
3378
3379         The software fallback is now only needed for corner cases like a manual rendering
3380         of the page to QImage.
3381
3382         Keeping the image with the last pixel values is no longer needed. Removing it reduce the
3383         performance for real-time rendering on software surface, but this case should no longer be
3384         supported.
3385
3386         The conversion from OpenGL color space and coordinates is done manually for performance. This
3387         also fix the bug of the inverted X axis due to the transformation.
3388
3389         The tests and benchmarks are done through Qt API tests.
3390
3391         * platform/graphics/qt/GraphicsContext3DQt.cpp:
3392         (WebCore::swapBgrToRgb):
3393         (WebCore::GraphicsContext3DInternal::paint):
3394         (WebCore::GraphicsContext3D::reshape):
3395
3396 2011-03-24  Nat Duca  <nduca@chromium.org>
3397
3398         Reviewed by James Robinson.
3399
3400         [chromium] Remove bool that forces compositor HUD to always be enabled
3401         https://bugs.webkit.org/show_bug.cgi?id=57034
3402
3403         * platform/graphics/chromium/cc/CCHeadsUpDisplay.h:
3404         (WebCore::CCHeadsUpDisplay::enabled):
3405
3406 2011-03-24  Nat Duca  <nduca@chromium.org>
3407
3408         Reviewed by Kenneth Russell.
3409
3410         [chromium] Add traceEvents to compositor
3411         https://bugs.webkit.org/show_bug.cgi?id=56965
3412
3413         * WebCore.gypi:
3414         * platform/chromium/TraceEvent.h: Added.
3415         (WebCore::internal::ScopeTracer::ScopeTracer):
3416         (WebCore::internal::ScopeTracer::~ScopeTracer):
3417         * platform/graphics/chromium/LayerRendererChromium.cpp:
3418         (WebCore::LayerRendererChromium::updateRootLayerContents):
3419         (WebCore::LayerRendererChromium::updateRootLayerScrollbars):
3420         (WebCore::LayerRendererChromium::updateLayers):
3421         (WebCore::LayerRendererChromium::drawLayers):
3422         (WebCore::LayerRendererChromium::finish):
3423         (WebCore::LayerRendererChromium::present):
3424         * platform/graphics/chromium/LayerTilerChromium.cpp:
3425         (WebCore::LayerTilerChromium::update):
3426
3427 2011-03-24  Pavel Feldman  <pfeldman@chromium.org>
3428
3429         Reviewed by Yury Semikhatsky.
3430
3431         Web Inspector: render XHRs matching JSON regex as JSON.
3432         https://bugs.webkit.org/show_bug.cgi?id=57035
3433
3434         * English.lproj/localizedStrings.js:
3435         * WebCore.gypi:
3436         * WebCore.vcproj/WebCore.vcproj:
3437         * inspector/front-end/NetworkItemView.js:
3438         (WebInspector.NetworkItemView):