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