068eaa75f18901ddb753d841f6c7c6a2f32a6b6a
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-03-31  Eric Seidel  <eric@webkit.org>
2
3         Reviewed by Ryosuke Niwa.
4
5         Rename BidiResolver::emptyRun to m_emtpyRun to match modern style
6         https://bugs.webkit.org/show_bug.cgi?id=57549
7
8         * platform/text/BidiResolver.h:
9         (WebCore::BidiResolver::BidiResolver):
10         (WebCore::::appendRun):
11         (WebCore::::lowerExplicitEmbeddingLevel):
12         (WebCore::::raiseExplicitEmbeddingLevel):
13         (WebCore::::deleteRuns):
14         (WebCore::::createBidiRunsForLine):
15         * rendering/InlineIterator.h:
16         (WebCore::InlineBidiResolver::appendRun):
17
18 2011-03-31  Tom Sepez  <tsepez@chromium.org>
19
20         Reviewed by Eric Seidel.
21
22         Make ContainerNode::insertIntoDocument() collect all nodes before
23         operating on any of them.  Add small helper function and use it
24         througout the file where this action is already taking place.
25         https://bugs.webkit.org/show_bug.cgi?id=57265
26         
27         Test: svg/dom/range-delete.html
28
29         * dom/ContainerNode.cpp:
30         (WebCore::collectNodes):
31         (WebCore::collectTargetNodes):
32         (WebCore::ContainerNode::takeAllChildrenFrom):
33         (WebCore::willRemoveChildren):
34         (WebCore::ContainerNode::insertedIntoDocument):
35
36 2011-03-31  Satish Sampath  <satish@chromium.org>
37
38         Reviewed by Steve Block.
39
40         While drawing a speech input button, validate that the node is really a speech input button.
41         https://bugs.webkit.org/show_bug.cgi?id=57469
42
43         Test: fast/speech/speech-style-on-non-speech-elements.html
44
45         * dom/Element.h:
46         (WebCore::Element::isInputFieldSpeechButtonElement):
47         * html/shadow/TextControlInnerElements.h:
48         (WebCore::InputFieldSpeechButtonElement::isInputFieldSpeechButtonElement):
49         (WebCore::toInputFieldSpeechButtonElement):
50         * rendering/RenderInputSpeech.cpp:
51         (WebCore::RenderInputSpeech::paintInputFieldSpeechButton):
52
53 2011-03-31  Ryosuke Niwa  <rniwa@webkit.org>
54
55         Build fix after r82588. Reverted unintentional change.
56
57         * editing/SelectionController.cpp:
58         (WebCore::SelectionController::modifyMovingLeft):
59
60 2011-03-31  Mario Sanchez Prada  <msanchez@igalia.com>
61
62         Reviewed by Xan Lopez.
63
64         [GTK] Warnings happening because of unhandled switch cases in AccessibilityObjectWrapperAtk
65         https://bugs.webkit.org/show_bug.cgi?id=57534
66
67         Fix compilation warnings.
68
69         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
70         (getAttributeSetForAccessibilityObject): Add unhandled cases.
71
72 2011-03-30  Pavel Podivilov  <podivilov@chromium.org>
73
74         Reviewed by Pavel Feldman.
75
76         Web Inspector: remove unnecessary newBody output parameter from editScriptSource protocol method.
77         https://bugs.webkit.org/show_bug.cgi?id=57444
78
79         * bindings/js/ScriptDebugServer.cpp:
80         (WebCore::ScriptDebugServer::editScriptSource):
81         * bindings/js/ScriptDebugServer.h:
82         * bindings/v8/ScriptDebugServer.cpp:
83         (WebCore::ScriptDebugServer::editScriptSource):
84         * bindings/v8/ScriptDebugServer.h:
85         * inspector/Inspector.json:
86         * inspector/InspectorDebuggerAgent.cpp:
87         (WebCore::InspectorDebuggerAgent::editScriptSource):
88         * inspector/InspectorDebuggerAgent.h:
89         * inspector/front-end/DebuggerModel.js:
90         (WebInspector.DebuggerModel.prototype.editScriptSource):
91         (WebInspector.DebuggerModel.prototype._didEditScriptSource):
92         * inspector/front-end/DebuggerPresentationModel.js:
93         (WebInspector.DebuggerPresentationModel.prototype.editScriptSource.didEditScriptSource):
94         (WebInspector.DebuggerPresentationModel.prototype.editScriptSource):
95         * inspector/front-end/SourceFrame.js:
96         (WebInspector.SourceFrame.prototype._handleSave.didEditScriptSource):
97         (WebInspector.SourceFrame.prototype._handleSave):
98
99 2011-03-30  MORITA Hajime <morrita@google.com>
100
101         Reviewed by Dimitri Glazkov.
102
103         <meter> can only support horizontal indicator
104         https://bugs.webkit.org/show_bug.cgi?id=56001
105
106         - Removed code which deals with the direction and
107           left the horizontal path.
108         - Removed "horizontal" from related names which is now
109           redundant.
110         
111         * css/CSSSelector.cpp:
112         (WebCore::CSSSelector::pseudoId):
113         (WebCore::nameToPseudoTypeMap):
114         (WebCore::CSSSelector::extractPseudoType):
115         * css/CSSSelector.h:
116         * css/html.css:
117         (meter::-webkit-meter-bar):
118         (meter::-webkit-meter-optimum-value):
119         (meter::-webkit-meter-suboptimal-value):
120         (meter::-webkit-meter-even-less-good-value):
121         * rendering/RenderMeter.cpp:
122         (WebCore::RenderMeter::~RenderMeter):
123         (WebCore::RenderMeter::createPart):
124         (WebCore::RenderMeter::updateFromElement):
125         (WebCore::RenderMeter::layoutParts):
126         (WebCore::RenderMeter::styleDidChange):
127         (WebCore::RenderMeter::shouldHaveParts):
128         (WebCore::RenderMeter::valuePartRect):
129         (WebCore::RenderMeter::valuePseudoId):
130         (WebCore::RenderMeter::barPseudoId):
131         (WebCore::RenderMeter::detachShadows):
132         (WebCore::RenderMeter::updateShadows):
133         * rendering/RenderMeter.h:
134         (WebCore::RenderMeter::shadowAttached):
135         * rendering/RenderTheme.cpp:
136         (WebCore::RenderTheme::supportsMeter):
137         * rendering/RenderTheme.h:
138         * rendering/RenderThemeMac.h:
139         * rendering/RenderThemeMac.mm:
140         (WebCore::RenderThemeMac::paintMeter):
141         (WebCore::RenderThemeMac::supportsMeter):
142         * rendering/style/RenderStyleConstants.h:
143
144 2011-03-30  Xiaomei Ji  <xji@chromium.org>
145
146         Reviewed by Ryosuke Niwa.
147
148         Experiment with moving caret by word in visual order.
149         https://bugs.webkit.org/show_bug.cgi?id=57336
150
151         Follow Firefox's convention in Windows, 
152         In LTR block, word break visually moves cursor to the left boundary of words,
153         In RTL block, word break visually moves cursor to the right boundary of words.
154
155         This is the 1st version of implementing "move caret by word in visual order".
156         It only works in the following situation:
157         1. For a LTR box in a LTR block or a RTL box in RTL block, 
158         when caret is at the left boundary of the box and we are looking for 
159         the word boundary in right.
160         2. For a LTR or RTL box in a LTR block, when caret is at the left boundary
161         of the box and we are looking for the word boundary in left and 
162         previous box is a LTR box.
163         3. For a LTR or RTL box in a RTL block, when the caret is at the right 
164         boundary of the box and we are looking for the word boundary in right and next box is RTL box.
165
166         An experimental granularity is introduced, as a side effect, functions having switch statements
167         to handle those granularities have to add more one case to handle this new granularity.
168         The experimental granularity is exposed though JS by '-webkit-visual-word".
169
170         The overall algorithm is looping through inline boxes visually and looking
171         for the visually nearest word break position. 
172
173         Test: editing/selection/move-by-word-visually.html
174
175         * editing/SelectionController.cpp:
176         (WebCore::SelectionController::modifyExtendingRight):
177         (WebCore::SelectionController::modifyExtendingForward):
178         (WebCore::SelectionController::modifyMovingRight):
179         (WebCore::SelectionController::modifyMovingForward):
180         (WebCore::SelectionController::modifyExtendingLeft):
181         (WebCore::SelectionController::modifyExtendingBackward):
182         (WebCore::SelectionController::modifyMovingLeft):
183         (WebCore::SelectionController::modifyMovingBackward):
184         * editing/TextGranularity.h:
185         * editing/VisibleSelection.cpp:
186         (WebCore::VisibleSelection::setStartAndEndFromBaseAndExtentRespectingGranularity):
187         * editing/visible_units.cpp:
188         (WebCore::previousWordBreakInBoxInsideBlockWithSameDirectionality):
189         (WebCore::wordBoundaryInBox):
190         (WebCore::wordBoundaryInAdjacentBoxes):
191         (WebCore::leftWordBoundary):
192         (WebCore::rightWordBoundary):
193         (WebCore::leftWordPosition):
194         (WebCore::rightWordPosition):
195         * editing/visible_units.h:
196         * page/DOMSelection.cpp:
197         (WebCore::DOMSelection::modify):
198
199 2011-03-31  Dimitri Glazkov  <dglazkov@chromium.org>
200
201         Reviewed by Darin Adler.
202
203         Move coordinate-computing logic into MouseRelatedEvent.
204         https://bugs.webkit.org/show_bug.cgi?id=57521
205
206         Refactoring, covered by existing tests.
207
208         * dom/EventDispatcher.cpp:
209         (WebCore::EventDispatcher::dispatchWheelEvent): Yank calculation of
210             coordinates out.
211         (WebCore::EventDispatcher::dispatchMouseEvent): Ditto.
212         * dom/MouseEvent.cpp:
213         (WebCore::MouseEvent::create): Add coordinate-computing logic.
214         * dom/MouseEvent.h: Adjust decl to reflect new meaning of params.
215         * dom/MouseRelatedEvent.cpp:
216         (WebCore::MouseRelatedEvent::MouseRelatedEvent): Ditto.
217         * page/EventHandler.cpp:
218         (WebCore::EventHandler::dispatchDragEvent): Ditto.
219
220 2011-03-30  Alexander Pavlov  <apavlov@chromium.org>
221
222         Reviewed by Pavel Feldman.
223
224         Web Inspector: document CSS agent.
225         https://bugs.webkit.org/show_bug.cgi?id=57435
226
227         * inspector/Inspector.json:
228
229 2011-03-31  Andrey Kosyakov  <caseq@chromium.org>
230
231         Reviewed by Yury Semikhatsky.
232
233         Web Inspector: remove periods at the end of error messages
234         https://bugs.webkit.org/show_bug.cgi?id=57544
235
236         * inspector/InjectedScript.cpp:
237         (WebCore::InjectedScript::getProperties):
238         (WebCore::InjectedScript::makeObjectCall):
239         * inspector/InspectorCSSAgent.cpp:
240         (WebCore::InspectorCSSAgent::elementForId):
241         (WebCore::InspectorCSSAgent::styleSheetForId):
242         * inspector/InspectorDOMAgent.cpp:
243         (WebCore::InspectorDOMAgent::assertNode):
244         (WebCore::InspectorDOMAgent::assertElement):
245         (WebCore::InspectorDOMAgent::assertHTMLElement):
246         (WebCore::InspectorDOMAgent::querySelector):
247         (WebCore::InspectorDOMAgent::querySelectorAll):
248         (WebCore::InspectorDOMAgent::setAttribute):
249         (WebCore::InspectorDOMAgent::removeAttribute):
250         (WebCore::InspectorDOMAgent::removeNode):
251         (WebCore::InspectorDOMAgent::setNodeValue):
252         * inspector/InspectorDebuggerAgent.cpp:
253         (WebCore::InspectorDebuggerAgent::setPauseOnExceptionsState):
254         * inspector/InspectorResourceAgent.cpp:
255         (WebCore::InspectorResourceAgent::resourceContent):
256         (WebCore::InspectorResourceAgent::resourceContentBase64):
257         (WebCore::InspectorResourceAgent::getResourceContent):
258         * inspector/InspectorRuntimeAgent.cpp:
259         (WebCore::InspectorRuntimeAgent::setPropertyValue):
260
261 2011-03-31  Evan Martin  <evan@chromium.org>
262
263         Reviewed by Eric Seidel.
264
265         <title> should support dir attribute
266         https://bugs.webkit.org/show_bug.cgi?id=50961
267
268         Introduce a new StringWithDirection object that carries a String along
269         with the TextDirection associated with the String.  Use this object for
270         document titles used within WebCore, because in HTML the direction of
271         a title can be set with the 'dir' attribute.
272
273         Put FIXMEs at the WebKit level to expose the new direction information
274         to clients.
275
276         No behavioral change intended, so no new tests.  A follow-up will expose
277         the title direction and hopefully can be accompanied by tests that
278         verify it is correct.
279
280         * dom/Document.cpp:
281         (WebCore::Document::Document):
282         (WebCore::Document::updateTitle):
283         (WebCore::Document::setTitle):
284         (WebCore::Document::removeTitle):
285         * dom/Document.h:
286         (WebCore::Document::title):
287         * html/HTMLTitleElement.cpp:
288         (WebCore::HTMLTitleElement::HTMLTitleElement):
289         (WebCore::HTMLTitleElement::childrenChanged):
290         (WebCore::HTMLTitleElement::text):
291         (WebCore::HTMLTitleElement::textWithDirection):
292         * html/HTMLTitleElement.h:
293         * loader/DocumentLoader.cpp:
294         (WebCore::DocumentLoader::setTitle):
295         * loader/DocumentLoader.h:
296         (WebCore::DocumentLoader::title):
297         * loader/EmptyClients.h:
298         (WebCore::EmptyFrameLoaderClient::dispatchDidReceiveTitle):
299         (WebCore::EmptyFrameLoaderClient::setTitle):
300         * loader/FrameLoader.cpp:
301         (WebCore::FrameLoader::receivedFirstData):
302         (WebCore::FrameLoader::commitProvisionalLoad):
303         (WebCore::FrameLoader::setTitle):
304         * loader/FrameLoader.h:
305         * loader/FrameLoaderClient.h:
306         * loader/HistoryController.cpp:
307         (WebCore::HistoryController::updateForBackForwardNavigation):
308         (WebCore::HistoryController::updateForReload):
309         (WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
310         (WebCore::HistoryController::updateForClientRedirect):
311         (WebCore::HistoryController::updateForCommit):
312         (WebCore::HistoryController::setCurrentItemTitle):
313         (WebCore::HistoryController::initializeItem):
314         * loader/HistoryController.h:
315         * platform/text/StringWithDirection.h: Added.
316         (WebCore::StringWithDirection::StringWithDirection):
317         (WebCore::StringWithDirection::operator==):
318         (WebCore::StringWithDirection::operator!=):
319         * svg/SVGTitleElement.cpp:
320         (WebCore::SVGTitleElement::insertedIntoDocument):
321         (WebCore::SVGTitleElement::childrenChanged):
322
323 2011-03-31  Alexander Pavlov  <apavlov@chromium.org>
324
325         Reviewed by Yury Semikhatsky.
326
327         Web Inspector: CSS domain - make a "range" object, get rid of "properties" object for Style objects
328         https://bugs.webkit.org/show_bug.cgi?id=57538
329
330         * inspector/InspectorStyleSheet.cpp:
331         (WebCore::buildSourceRangeObject):
332         (WebCore::InspectorStyle::buildObjectForStyle):
333         (WebCore::InspectorStyle::populateObjectWithStyleProperties):
334         * inspector/front-end/AuditRules.js:
335         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.evalCallback.selectorsCallback):
336         * inspector/front-end/CSSStyleModel.js:
337         (WebInspector.CSSStyleDeclaration):
338
339 2011-03-31  Sheriff Bot  <webkit.review.bot@gmail.com>
340
341         Unreviewed, rolling out r82565.
342         http://trac.webkit.org/changeset/82565
343         https://bugs.webkit.org/show_bug.cgi?id=57541
344
345         Caused assertion failures. (Requested by bbandix on #webkit).
346
347         * platform/graphics/filters/FEFlood.cpp:
348         (WebCore::FEFlood::setFloodColor):
349         (WebCore::FEFlood::setFloodOpacity):
350         * platform/graphics/filters/FEFlood.h:
351         * platform/graphics/filters/FESpecularLighting.cpp:
352         (WebCore::FESpecularLighting::setLightingColor):
353         * platform/graphics/filters/FESpecularLighting.h:
354         * rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
355         * rendering/svg/RenderSVGResourceFilterPrimitive.h:
356         * rendering/svg/SVGResourcesCache.cpp:
357         (WebCore::SVGResourcesCache::clientStyleChanged):
358         * svg/SVGFEDiffuseLightingElement.cpp:
359         (WebCore::SVGFEDiffuseLightingElement::setFilterEffectAttribute):
360         * svg/SVGFEFloodElement.cpp:
361         * svg/SVGFEFloodElement.h:
362         * svg/SVGFESpecularLightingElement.cpp:
363         (WebCore::SVGFESpecularLightingElement::setFilterEffectAttribute):
364
365 2011-03-31  Renata Hodovan  <reni@webkit.org>
366
367         Reviewed by Dirk Schulze.
368
369         CSS related SVG*Element changes doesn't require relayout
370         https://bugs.webkit.org/show_bug.cgi?id=56906
371
372         The changes of some CSS related SVGFilter properties e.g. lighting-color, flood-color, flood-opacity
373         need only repaint. To avoid the default invalidation of filters in SVGResourceCache::clientStyleChange()
374         we need an early return. So RenderSVGResourceFilterPrimitive::styleDidChange() can handle these properties
375         via RenderSVGResourceFilter::primitiveAttributeChanged() the same way like we do it for the other SVGAttributes.
376
377         Tests: svg/dynamic-updates/SVGFEDiffuseLightingElement-inherit-lighting-color-css-prop.html
378                svg/dynamic-updates/SVGFEFloodElement-inherit-flood-color.html
379                svg/dynamic-updates/SVGFESpecularLightingElement-inherit-lighting-color-css-prop.html
380                svg/dynamic-updates/SVGFESpecularLightingElement-lighting-color-css-prop.html
381
382         * platform/graphics/filters/FEFlood.cpp:
383         (WebCore::FEFlood::setFloodColor):
384         (WebCore::FEFlood::setFloodOpacity):
385         * platform/graphics/filters/FEFlood.h:
386         * platform/graphics/filters/FESpecularLighting.cpp:
387         (WebCore::FESpecularLighting::setLightingColor):
388         * platform/graphics/filters/FESpecularLighting.h:
389         * rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
390         (WebCore::RenderSVGResourceFilterPrimitive::styleDidChange):
391         * rendering/svg/RenderSVGResourceFilterPrimitive.h:
392         * rendering/svg/SVGResourcesCache.cpp:
393         (WebCore::SVGResourcesCache::clientStyleChanged):
394         * svg/SVGFEDiffuseLightingElement.cpp:
395         (WebCore::SVGFEDiffuseLightingElement::setFilterEffectAttribute):
396         * svg/SVGFEFloodElement.cpp:
397         (WebCore::SVGFEFloodElement::setFilterEffectAttribute):
398         * svg/SVGFEFloodElement.h:
399         * svg/SVGFESpecularLightingElement.cpp:
400         (WebCore::SVGFESpecularLightingElement::setFilterEffectAttribute):
401
402 2011-03-29  Vsevolod Vlasov  <vsevik@chromium.org>
403
404         Reviewed by Pavel Feldman.
405
406         XML Viewer: declared namespaces are not rendered.
407         https://bugs.webkit.org/show_bug.cgi?id=56262
408
409         XML viewer rewritten on javascript.
410
411         * CMakeLists.txt:
412         * DerivedSources.make:
413         * GNUmakefile.am:
414         * WebCore.gyp/WebCore.gyp:
415         * WebCore.gypi:
416         * WebCore.vcproj/WebCore.vcproj:
417         * WebCore.xcodeproj/project.pbxproj:
418         * dom/XMLDocumentParserLibxml2.cpp:
419         (WebCore::XMLDocumentParser::doEnd):
420         * xml/XMLTreeViewer.cpp:
421         (WebCore::XMLTreeViewer::transformDocumentToTreeView):
422         * xml/XMLViewer.css: Added.
423         * xml/XMLViewer.js: Added.
424         * xml/XMLViewer.xsl: Removed.
425         * xml/XSLStyleSheet.h:
426
427 2011-03-31  Jaehun Lim  <ljaehun.lim@samsung.com>
428
429         Unreviewed build fix.
430
431         Fix build break after rolling out r82496
432         https://bugs.webkit.org/show_bug.cgi?id=57536
433
434         * platform/efl/RenderThemeEfl.cpp:
435
436 2011-03-31  Andrey Adaikin  <aandrey@google.com>
437
438         Reviewed by Pavel Feldman.
439
440         Web Inspector: execution line is displayed incorrectly after source editing.
441         https://bugs.webkit.org/show_bug.cgi?id=57229
442
443         * inspector/front-end/SourceFrame.js:
444         (WebInspector.SourceFrame.prototype._saveViewerState):
445         (WebInspector.SourceFrame.prototype._restoreViewerState):
446         (WebInspector.SourceFrame.prototype._startEditing):
447         (WebInspector.SourceFrame.prototype._endEditing):
448         (WebInspector.SourceFrame.prototype._createTextViewer):
449         (WebInspector.SourceFrame.prototype.setExecutionLine):
450         (WebInspector.SourceFrame.prototype._handleSave.didEditScriptSource):
451         (WebInspector.SourceFrame.prototype._handleSave):
452         (WebInspector.SourceFrame.prototype._handleRevertEditing):
453         * inspector/front-end/TextViewer.js:
454         (WebInspector.TextEditorChunkedPanel.prototype.addDecoration):
455         (WebInspector.TextEditorChunkedPanel.prototype.removeDecoration):
456         (WebInspector.TextEditorMainPanel.prototype.makeLineAChunk):
457         (WebInspector.TextEditorMainPanel.prototype._positionToSelection):
458
459 2011-03-30  Alexander Pavlov  <apavlov@chromium.org>
460
461         Reviewed by Pavel Feldman.
462
463         Web Inspector: Make the CSStyle "shorthandValues" name-value map an array
464         https://bugs.webkit.org/show_bug.cgi?id=57452
465
466         No new tests, as this is a refactoring.
467
468         * inspector/InspectorCSSAgent.cpp:
469         * inspector/InspectorStyleSheet.cpp:
470         (WebCore::InspectorStyle::populateObjectWithStyleProperties):
471         * inspector/front-end/CSSStyleModel.js:
472         (WebInspector.CSSStyleDeclaration):
473         (WebInspector.CSSStyleDeclaration.buildShorthandValueMap):
474
475 2011-03-30  Steve Block  <steveblock@google.com>
476
477         Reviewed by Jeremy Orlow.
478
479         JavaField should not expose JavaString in its API
480         https://bugs.webkit.org/show_bug.cgi?id=55766
481
482         This patch fixes JavaField for V8 only.
483         - Factors out a JavaField interface which does not use JNI types.
484           This will allow the Java bridge to be used with objects that
485           don't use JNI directly. The existing jobject-backed
486           implementation is moved to a new JavaFieldJobject class which
487           implements the interface.
488         - Use WTF::String in place of JavaString in the API, as JavaString
489           exposes JNI types in its interface.
490
491         No new tests, refactoring only.
492
493         * Android.v8bindings.mk:
494         * WebCore.gypi:
495         * bridge/jni/JavaMethod.h:
496         (JSC::Bindings::JavaMethod::~JavaMethod):
497         * bridge/jni/JobjectWrapper.h:
498         * bridge/jni/v8/JavaClassV8.cpp:
499         (JavaClass::JavaClass):
500         * bridge/jni/v8/JavaFieldJobjectV8.cpp:
501         (JavaFieldJobject::JavaFieldJobject):
502         * bridge/jni/v8/JavaFieldJobjectV8.h:
503         (JSC::Bindings::JavaFieldJobject::name):
504         (JSC::Bindings::JavaFieldJobject::typeClassName):
505         (JSC::Bindings::JavaFieldJobject::type):
506         * bridge/jni/v8/JavaFieldV8.h:
507         (JSC::Bindings::JavaField::~JavaField):
508         * bridge/jni/v8/JavaInstanceV8.cpp:
509         (JavaInstance::getField):
510
511 2011-03-31  Levi Weintraub  <leviw@chromium.org>
512
513         Reviewed by Ryosuke Niwa.
514
515         Clean up from r82447.
516         https://bugs.webkit.org/attachment.cgi?bugid=57532
517
518         No new tests since this doesn't change behavior.
519
520         * rendering/RenderBlock.cpp: Removing unnecessary visible_units.h include.
521         * rendering/RootInlineBox.cpp:
522         (WebCore::RootInlineBox::getLogicalStartBoxWithNode): Making const.
523         (WebCore::RootInlineBox::getLogicalEndBoxWithNode): Ditto.
524         * rendering/RootInlineBox.h:
525
526 2011-03-31  Benjamin Kalman  <kalman@chromium.org>
527
528         Reviewed by Ojan Vafai.
529
530         DeleteSelectionCommand::removeNode tries to insert block placeholder in non-editable table cell positions
531         https://bugs.webkit.org/show_bug.cgi?id=57079
532
533         Test: editing/execCommand/delete-table-with-empty-contents.html
534
535         This bug results in an ASSERT fail in CompositeEditCommand::insertNodeAt, so is only observable in debug builds
536         of WebKit.
537
538         * editing/DeleteSelectionCommand.cpp:
539         (WebCore::firstEditablePositionInNode):
540         (WebCore::DeleteSelectionCommand::removeNode): Use firstEditablePositionInNode rather than firstPositionInNode
541         to find anchor node for the placeholder's position, if any.
542
543 2011-03-30  Ojan Vafai  <ojan@chromium.org>
544
545         Reviewed by Adam Roben.
546
547         REGRESSION (r82400): Leaks seen beneath CSSParser::createFloatingVectorSelector when parsing UA stylesheet
548         https://bugs.webkit.org/show_bug.cgi?id=57478
549
550         * css/CSSGrammar.y:
551         * css/CSSParser.cpp:
552         (WebCore::CSSParser::sinkFloatingSelectorVector):
553         * css/CSSParser.h:
554
555 2011-03-30  Dominic Cooney  <dominicc@google.com>
556
557         Reviewed by Dimitri Glazkov.
558
559         Adds layoutTestController.shadowRoot accessor to Mac DRT.
560         https://bugs.webkit.org/show_bug.cgi?id=57415
561
562         * WebCore.exp.in: DRT needs to link WebCore::Element::shadowRoot
563
564 2011-03-30  Kent Tamura  <tkent@chromium.org>
565
566         Reviewed by Dimitri Glazkov.
567
568         Simplify HTMLFormElement::validateInteractively() for asynchronous scroll event
569         https://bugs.webkit.org/show_bug.cgi?id=57424
570
571         r75555 made 'scroll' event asynchronous. So we don't need to worry about
572         deleting or moving a target node in scrollIntoViewIfNeeded().
573
574         * html/HTMLFormElement.cpp:
575         (WebCore::HTMLFormElement::validateInteractively): Remove unnecessary code.
576
577 2011-03-30  Kent Tamura  <tkent@chromium.org>
578
579         Reviewed by Darin Adler.
580
581         REGRESSION (r74895): Crash if input.type = 'file' twice
582         https://bugs.webkit.org/show_bug.cgi?id=57343
583
584         * html/HTMLInputElement.cpp:
585         (WebCore::HTMLInputElement::updateType):
586           Don't call setAttribute() if the type is not changed.
587
588 2011-03-30  Jia Pu  <jpu@apple.com>
589
590         Reviewed by Darin Adler.
591
592         Autocorrection panel isn't positioned correctly in Safari (mac) when the zooming is not 1x.
593         https://bugs.webkit.org/show_bug.cgi?id=57353
594         <rdar://problem/9163983>
595
596         We use Range::textQuads() instead of Range::boundingRect() to compute the position of correction
597         panel. The latter function compensates for zooming, which we don't need in this case. We also
598         dismiss correction panel when zooming factor is changed. This is done in Frame::setPageAndTextZoomFactors().
599
600         * WebCore.exp.in:
601         * dom/Range.cpp:
602         (WebCore::Range::textQuads):
603         * dom/Range.h:
604         * editing/Editor.cpp:
605         (WebCore::Editor::windowRectForRange):
606         * editing/Editor.h:
607         * page/Frame.cpp:
608         (WebCore::Frame::setPageAndTextZoomFactors):
609
610 2011-03-30  Chris Guillory  <chris.guillory@google.com>
611
612         Reviewed by Dimitri Glazkov.
613
614         Render fonts using skia when requested by platform context.
615         https://bugs.webkit.org/show_bug.cgi?id=56441
616
617         * platform/graphics/skia/PlatformContextSkia.cpp:
618         (WebCore::PlatformContextSkia::isNativeFontRenderingAllowed):
619         * platform/graphics/skia/PlatformContextSkia.h:
620         * platform/graphics/skia/SkiaFontWin.cpp:
621         (WebCore::windowsCanHandleTextDrawing):
622         (WebCore::skiaDrawText):
623         (WebCore::setupPaintForFont):
624         (WebCore::paintSkiaText):
625
626 2011-03-30  Dan Bernstein  <mitz@apple.com>
627
628         Reviewed by Darin Adler.
629
630         <rdar://problem/9199518> Crash when focusing a styled editable element
631
632         Test: editing/deleting/delete-button-background-image-none.html
633
634         * editing/DeleteButtonController.cpp:
635         (WebCore::isDeletableElement): Check all background layers for background images.
636         * rendering/style/RenderStyle.h: Removed backgroundImage() as it was only used, incorrectly,
637         in the above function.
638
639 2011-03-30  Martin Robinson  <mrobinson@igalia.com>
640
641         Try once more to fix the EFL build.
642
643         * platform/efl/RenderThemeEfl.cpp:
644
645 2011-03-30  Chris Fleizach  <cfleizach@apple.com>
646
647         Reviewed by Darin Adler.
648
649         Regression: VO cursor doesn't follow KB focus back into HTML view
650         https://bugs.webkit.org/show_bug.cgi?id=57509
651
652         In WK2, because the web area never believes focus leave the area, sending the initial
653         focus change when moving back into the web area, does not trigger a notification.
654
655         That behavior needs to be overridden by explicitly posting a focused UI element change
656         at the appropriate time. This is only used in WK2, hence the absence of a layout test for now.
657
658         * page/FocusController.cpp:
659         (WebCore::FocusController::setInitialFocus):
660
661 2011-03-30  MORITA Hajime  <morrita@google.com>
662
663         Reviewed by Simon Fraser.
664
665         box-shadow radii stays the same regardless of any spread set
666         https://bugs.webkit.org/show_bug.cgi?id=49726
667
668         - Removed special shadowSpread handling path
669         - Fixed broken multple inset shadow border computation.
670
671         Test: fast/box-shadow/spread-multiple-inset.html
672
673         * rendering/RenderBoxModelObject.cpp:
674         (WebCore::RenderBoxModelObject::paintBoxShadow):
675
676 2011-03-29  Matthew Delaney  <mdelaney@apple.com>
677
678         Reviewed by Simon Fraser.
679
680         Use the Accelerate vImage vectorized (un)premultiplyImageData functions for ImageBufferCG
681
682         https://bugs.webkit.org/show_bug.cgi?id=53134
683
684         Test: fast/canvas/getPutImageDataPairTest.html
685
686         * platform/graphics/cg/ImageBufferCG.cpp:
687
688 2011-03-30  Steve Falkenburg  <sfalken@apple.com>
689
690         Reviewed by Adam Roben.
691
692         Share most vsprops between Release and Production builds in releaseproduction.vsprops
693         https://bugs.webkit.org/show_bug.cgi?id=57508
694
695         * WebCore.vcproj/QTMovieWinProduction.vsprops:
696         * WebCore.vcproj/QTMovieWinRelease.vsprops:
697         * WebCore.vcproj/QTMovieWinReleaseCairoCFLite.vsprops:
698         * WebCore.vcproj/WebCoreProduction.vsprops:
699         * WebCore.vcproj/WebCoreRelease.vsprops:
700         * WebCore.vcproj/WebCoreReleaseCairoCFLite.vsprops:
701
702 2011-03-30  Timur Iskhodzhanov  <timurrrr@google.com>
703
704         Reviewed by Alexey Proskuryakov.
705
706         Add some dynamic annotations to JavaScriptCore/wtf
707         https://bugs.webkit.org/show_bug.cgi?id=53747
708
709         By using these annotations we can improve the precision of finding
710         WebKit errors using dynamic analysis tools like ThreadSanitizer and Valgrind.
711         These annotations don't affect the compiled binaries unless USE(DYNAMIC_ANNOTATIONS) is "1".
712
713         These files don't add new functionality, so don't need extra tests.
714
715         * ForwardingHeaders/wtf/DynamicAnnotations.h: Added.
716
717 2011-03-30  Abhishek Arya  <inferno@chromium.org>
718
719         Reviewed by Simon Fraser.
720
721         Fix wrong type assumptions in editing code. Move code
722         from ASSERTs to hard checks.
723         https://bugs.webkit.org/show_bug.cgi?id=57348
724
725         Test: editing/execCommand/remove-format-non-html-element-crash.html
726
727         * css/CSSStyleSelector.cpp:
728         (WebCore::CSSStyleSelector::applyProperty):
729         * editing/ApplyStyleCommand.cpp:
730         (WebCore::getRGBAFontColor):
731         (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):
732         * editing/DeleteButtonController.cpp:
733         (WebCore::enclosingDeletableElement):
734         * editing/EditingStyle.cpp:
735         (WebCore::EditingStyle::textDirection):
736         (WebCore::EditingStyle::prepareToApplyAt):
737         * editing/Editor.cpp:
738         (WebCore::Editor::textDirectionForSelection):
739         * editing/FormatBlockCommand.cpp:
740         (WebCore::FormatBlockCommand::elementForFormatBlockCommand):
741
742 2011-03-30  Stephen White  <senorblanco@chromium.org>
743
744         Reviewed by Kenneth Russell.
745
746         Speed up clipping in accelerated 2D canvas.
747         https://bugs.webkit.org/show_bug.cgi?id=57464
748
749         Instead of clearing the entire stencil buffer when removing clipping paths, we erase the path with a DECR stencil operation.
750         Covered by canvas/philip/tests/2d.path.clip.intersect.html, and others.
751
752         * platform/graphics/chromium/GLES2Canvas.cpp:
753         (WebCore::PathAndTransform::PathAndTransform):
754         New structure to keep track of the CTM at the time the clipping path was added.
755         (WebCore::GLES2Canvas::State::State):
756         Replace m_clippingEnabled with a count of total clipping paths.
757         (WebCore::GLES2Canvas::clearRect):
758         Check the total clipping path count, instead of m_clippingEnabled.
759         (WebCore::GLES2Canvas::fillPath):
760         (WebCore::GLES2Canvas::fillRect):
761         Perform state application after doing shadows.  This is necessary
762         since restore() may now leave clipping enabled.
763         (WebCore::GLES2Canvas::clipPath):
764         Explicitly specify the stencil operation as INCR.  Store the current
765         transformation when saving clipping paths.
766         (WebCore::GLES2Canvas::restore):
767         Don't clear the stencil buffer and re-draw active paths on each restore.
768         Erase the old paths with DECR.
769         (WebCore::GLES2Canvas::drawTexturedRect):
770         Check m_numClippingPaths instead of m_clippingEnabled.
771         (WebCore::GLES2Canvas::beginShadowDraw):
772         Perform state application when drawing hard shadows.
773         (WebCore::GLES2Canvas::endShadowDraw):
774         Check m_numClippingPaths instead of m_clippingEnabled.
775         (WebCore::GLES2Canvas::beginStencilDraw):
776         Make the stencil op a parameter to beginShadowDraw().
777         (WebCore::GLES2Canvas::applyClipping):
778         Compare against the total number of stencil paths, not just the ones in
779         the current state.
780         * platform/graphics/chromium/GLES2Canvas.h:
781         Make the stencil op a parameter to beginShadowDraw().
782
783 2011-03-29  Dimitri Glazkov  <dglazkov@chromium.org>
784
785         Reviewed by Darin Adler.
786
787         Move factory-like things in EventDispatcher::dispatchMouseEvent to a factory, clean up names and ordering.
788         https://bugs.webkit.org/show_bug.cgi?id=57419
789
790         Refactoring, covered by existing tests.
791
792         * dom/EventDispatcher.cpp:
793         (WebCore::EventDispatcher::dispatchMouseEvent): Reordered and clarified names.
794         * dom/MouseEvent.cpp:
795         (WebCore::MouseEvent::create): Added a new factory method that takes PlatformMouseEvent.
796         * dom/MouseEvent.h: Added decl.
797
798 2011-03-30  Erik Arvidsson  <arv@chromium.org>
799
800         Reviewed by Alexey Proskuryakov.
801
802         Missing DOM bindings for a ping
803         https://bugs.webkit.org/show_bug.cgi?id=51955
804
805         Test: fast/dom/ping-attribute-dom-binding.html
806
807         * html/HTMLAnchorElement.idl:
808         * html/HTMLAreaElement.idl:
809
810 2011-03-30  Patrick Gansterer  <paroga@webkit.org>
811
812         Unreviewed WinCE build fix for r82465.
813
814         * CMakeListsWinCE.txt:
815
816 2011-03-30  Steve Falkenburg  <sfalken@apple.com>
817
818         Reviewed by Adam Roben.
819
820         Update Windows production build logic for new production configurations
821         https://bugs.webkit.org/show_bug.cgi?id=57494
822
823         * WebCore.vcproj/QTMovieWinProduction.vsprops:
824         * WebCore.vcproj/WebCore.make:
825         * WebCore.vcproj/WebCoreProduction.vsprops:
826
827 2011-03-30  Sam Weinig  <sam@webkit.org>
828
829         Reviewed by Brady Eidson.
830
831         WebKit2: Attempting to view css file from url causes it to download
832         <rdar://problem/9102611>
833         https://bugs.webkit.org/show_bug.cgi?id=57501
834
835         * WebCore.exp.in:
836         * platform/MIMETypeRegistry.cpp:
837         (WebCore::initializeUnsupportedTextMIMETypes):
838         (WebCore::initializeMIMETypeRegistry):
839         (WebCore::MIMETypeRegistry::isUnsupportedTextMIMEType):
840         (WebCore::MIMETypeRegistry::getUnsupportedTextMIMETypes):
841         * platform/MIMETypeRegistry.h:
842         Add set of unsupported text MIME types, taken from WebKit/mac.
843
844 2011-03-30  Brian Weinstein  <bweinstein@apple.com>
845
846         Reviewed by Darin Adler.
847         
848         Crash when closing "Add Bookmark" dialog using the Enter Key
849         https://bugs.webkit.org/show_bug.cgi?id=57294
850         <rdar://problem/9044756>
851
852         Protect the FrameView in EventHandler::keyEvent, like we do in other EventHandler
853         functions that could destroy the frame.
854
855         * page/EventHandler.cpp:
856         (WebCore::EventHandler::keyEvent):
857
858 2011-03-30  Sheriff Bot  <webkit.review.bot@gmail.com>
859
860         Unreviewed, rolling out r82463.
861         http://trac.webkit.org/changeset/82463
862         https://bugs.webkit.org/show_bug.cgi?id=57482
863
864         Assertion failure in Node::rendererIsEditable on multiple
865         editing tests (Requested by aroben|meeting on #webkit).
866
867         * css/CSSParser.cpp:
868         (WebCore::CSSParser::parseValue):
869         * css/CSSPrimitiveValueMappings.h:
870         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
871         (WebCore::CSSPrimitiveValue::operator EUnicodeBidi):
872         * css/CSSValueKeywords.in:
873         * rendering/style/RenderStyle.h:
874         * rendering/style/RenderStyleConstants.h:
875
876 2011-03-24  Luiz Agostini  <luiz.agostini@openbossa.org>
877
878         Reviewed by Kenneth Rohde Christiansen.
879
880         [Qt] QNetworkReplyHandler refactoring: signal sequence.
881         https://bugs.webkit.org/show_bug.cgi?id=57049
882
883         This is the first step in QNetworkReplyHandler. The main objective here is to create simple invariants:
884
885             1 - that the signals metadatachanged, readyRead and finished will come in this order.
886             2 - that signals metadatachanged and finished will be called exactly once.
887
888         Having these invariants further simplifications will be possible and will come in future patches.
889
890         Class QNetworkReplyWrapper was created to handle QNetworkReply object. To connect to the signals of it
891         instead of connecting to the signals of QNetworkReply is what guarantees the sequence of the signals.
892         QNetworkReplyWrapper will be used in future to perform mime type sniffing before sending
893         metadatachanged signal.
894
895         * platform/network/qt/QNetworkReplyHandler.cpp:
896         (WebCore::QNetworkReplyWrapper::QNetworkReplyWrapper):
897         (WebCore::QNetworkReplyWrapper::~QNetworkReplyWrapper):
898         (WebCore::QNetworkReplyWrapper::release):
899         (WebCore::QNetworkReplyWrapper::resetConnections):
900         (WebCore::QNetworkReplyWrapper::receiveMetaData):
901         (WebCore::QNetworkReplyWrapper::didReceiveFinished):
902         (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
903         (WebCore::QNetworkReplyHandler::resetState):
904         (WebCore::QNetworkReplyHandler::release):
905         (WebCore::QNetworkReplyHandler::finish):
906         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
907         (WebCore::QNetworkReplyHandler::redirect):
908         (WebCore::QNetworkReplyHandler::forwardData):
909         (WebCore::QNetworkReplyHandler::sendNetworkRequest):
910         (WebCore::QNetworkReplyHandler::start):
911         * platform/network/qt/QNetworkReplyHandler.h:
912         (WebCore::QNetworkReplyWrapper::reply):
913         (WebCore::QNetworkReplyWrapper::redirectionTargetUrl):
914         (WebCore::QNetworkReplyWrapper::encoding):
915         (WebCore::QNetworkReplyWrapper::advertisedMimeType):
916         (WebCore::QNetworkReplyHandler::reply):
917
918 2011-03-30  Steve Falkenburg  <sfalken@apple.com>
919
920         Reviewed by Adam Roben.
921
922         Rename Windows configuration Release_LTCG to Production for clarity
923         https://bugs.webkit.org/show_bug.cgi?id=57465
924
925         * WebCore.vcproj/QTMovieWin.vcproj:
926         * WebCore.vcproj/QTMovieWinProduction.vsprops: Copied from Source/WebCore/WebCore.vcproj/QTMovieWinReleaseLTCG.vsprops.
927         * WebCore.vcproj/QTMovieWinReleaseLTCG.vsprops: Removed.
928         * WebCore.vcproj/WebCore.sln:
929         * WebCore.vcproj/WebCore.submit.sln:
930         * WebCore.vcproj/WebCore.vcproj:
931         * WebCore.vcproj/WebCoreGenerated.vcproj:
932         * WebCore.vcproj/WebCoreProduction.vsprops: Copied from Source/WebCore/WebCore.vcproj/WebCoreReleaseLTCG.vsprops.
933         * WebCore.vcproj/WebCoreReleaseLTCG.vsprops: Removed.
934
935 2011-03-30  Brian Weinstein  <bweinstein@apple.com>
936
937         Reviewed by Anders Carlsson.
938         
939         ASSERT(cookieStorageAdapter) when calling stopObservingCookieChanges after WebProcess has crashed
940         https://bugs.webkit.org/show_bug.cgi?id=57477
941         <rdar://problem/9178751>
942         
943         If someone has called startObservingCookieChanges, and the WebProcess crashes and restarts, the UIProcess
944         will call stopObservingCookieChanges when cookieStorageAdapter is nil.
945         
946         The assert is wrong when the web process crashes, and there is no harm in dispatching a message to nil,
947         so remove the assert.
948         
949         * platform/network/mac/CookieStorageMac.mm:
950         (WebCore::stopObservingCookieChanges):
951
952 2011-03-30  Sam Weinig  <sam@webkit.org>
953
954         Fix Leopard build.
955
956         * platform/DefaultLocalizationStrategy.cpp:
957         (WebCore::DefaultLocalizationStrategy::contextMenuItemTagLookUpInDictionary):
958
959 2011-03-30  Sam Weinig  <sam@webkit.org>
960
961         Reviewed by Anders Carlsson.
962
963         Add default localization strategy that can be shared by WebKit1 and WebKit2
964         https://bugs.webkit.org/show_bug.cgi?id=57406
965
966         Currently, only WebKit2 uses this default strategy, but WebKit1 should be able
967         to adopt it soon.
968
969         * platform/DefaultLocalizationStrategy.cpp: Copied from Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp.
970         (WebCore::DefaultLocalizationStrategy::DefaultLocalizationStrategy):
971         * platform/DefaultLocalizationStrategy.h: Copied from Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.h.
972         Copy the implementation of the Localization strategy from WebKit2 into a shared default strategy.
973
974         * platform/LocalizedStrings.cpp:
975         (WebCore::localizedString):
976         Add default implementation of localization bottleneck function.
977
978         * platform/LocalizedStrings.h:
979         Add localization macros here, instead of defining them in the above layer.
980
981         * platform/PlatformStrategies.cpp:
982         (WebCore::PlatformStrategies::createLocalizationStrategy):
983         * platform/PlatformStrategies.h:
984         Add default implementation of strategy creation function which creates the default strategy.
985
986         * platform/win/LocalizedStringsWin.cpp: Copied from Source/WebCore/platform/mac/LocalizedStringsMac.mm.
987         (WebCore::localizedString):
988         Add stub for windows, this will be update to pull from the bundle in a follow up patch.
989
990         * Android.mk:
991         * CMakeLists.txt:
992         * GNUmakefile.am:
993         * WebCore.exp.in:
994         * WebCore.gypi:
995         * WebCore.pro:
996         * WebCore.vcproj/WebCore.vcproj:
997         * WebCore.xcodeproj/project.pbxproj:
998         Add new files.
999
1000 2011-03-30  Andras Becsi  <abecsi@webkit.org>
1001
1002         Reviewed by Darin Adler.
1003
1004         CSS: Slow parsing of rgb() with percent values
1005         https://bugs.webkit.org/show_bug.cgi?id=16708
1006
1007         Implement fast-path parsing for percentage color values.
1008
1009         Gain ~30% speedup on  http://canvex.lazyilluminati.com/misc/3d.html
1010
1011         Relanding with rounding fix after it was rolled out in r82315.
1012
1013         * css/CSSParser.cpp:
1014         (WebCore::checkForValidDouble): Extend to return the number of characters forming a valid double.
1015         (WebCore::parseDouble): Function for parsing double values if they are valid.
1016         (WebCore::parseColorIntOrPercentage): Extend parseColorInt to deal with percentage values.
1017         (WebCore::parseAlphaValue): Use the new functions.
1018         (WebCore::CSSParser::parseColor): Ditto.
1019
1020 2011-03-30  Ofri Wolfus  <ofri@dhcp-172-28-40-178.tlv.corp.google.com>
1021
1022         Reviewed by Eric Seidel.
1023
1024         Add support for parsing unicode-bidi: -webkit-plaintext.
1025         https://bugs.webkit.org/show_bug.cgi?id=57457
1026
1027         Test: css3/unicode-bidi-plaintext-parse.html
1028
1029         * css/CSSParser.cpp:
1030         (WebCore::CSSParser::parseValue):
1031         * css/CSSPrimitiveValueMappings.h:
1032         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1033         (WebCore::CSSPrimitiveValue::operator EUnicodeBidi):
1034         * css/CSSValueKeywords.in:
1035         * rendering/style/RenderStyle.h:
1036         * rendering/style/RenderStyleConstants.h:
1037
1038 2011-03-30  Andreas Kling  <kling@webkit.org>
1039
1040         Reviewed by Benjamin Poulain.
1041
1042         [Qt] Remove unused variables in GraphicsContext::fillRect()
1043
1044         * platform/graphics/qt/GraphicsContextQt.cpp:
1045         (WebCore::GraphicsContext::fillRect):
1046
1047 2011-03-30  Yael Aharon  <yael.aharon@nokia.com>
1048
1049         Reviewed by Eric Seidel.
1050
1051         REGRESSION(r82419): New pixel test failure fast/box-shadow/basic-shadows.html
1052         https://bugs.webkit.org/show_bug.cgi?id=57442
1053
1054         When checking the position of the inline iterator in the logicallyLastRun, we should not consider BR as text.
1055
1056         No new tests as existing test covers this case.
1057
1058         * rendering/RenderBlockLineLayout.cpp:
1059         (WebCore::reachedEndOfTextRenderer):
1060
1061 2011-03-30  Mario Sanchez Prada  <msanchez@igalia.com>
1062
1063         Reviewed by Chris Fleizach.
1064
1065         AX: GTK: ARIA role is not respected on <p> <label> <div> and <form>
1066         https://bugs.webkit.org/show_bug.cgi?id=47636
1067
1068         Define new roles in WebCore and map them to ATK accordingly.
1069
1070         Test: platform/gtk/accessibility/aria-roles-unignored.html
1071
1072         * accessibility/AccessibilityObject.h: Added new roles to
1073         represent paragraphs, labels, forms and div sections.
1074         * accessibility/AccessibilityRenderObject.cpp:
1075         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
1076         Return ParagraphRole, LabelRole, FormRole and DivRole when needed
1077         for the GTK platform only.
1078         * accessibility/gtk/AccessibilityObjectAtk.cpp:
1079         (WebCore::AccessibilityObject::allowsTextRanges): Consider the new
1080         roles now that those kind of nodes won't return true to isGroup().
1081         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
1082         (atkRole): Map new WebCore roles to ATK Roles.
1083         (webkit_accessible_get_role): Remove code to define roles for
1084         paragraphs, labels, forms and divs based on node's tag name.
1085
1086         Update mappings for the Mac platform.
1087
1088         * accessibility/mac/AccessibilityObjectWrapper.mm:
1089         (createAccessibilityRoleMap): Add explicit mappings from the new
1090         roles introduced to NSAccessibilityGroupRole.
1091
1092 2011-03-30  Yury Semikhatsky  <yurys@chromium.org>
1093
1094         Unreviewed. Build fix for Efl and Qt Win.
1095
1096         * inspector/PageDebuggerAgent.cpp: removed ENABLE(WORKERS) guard from code that has nothing to do with workers.
1097
1098 2011-03-30  Andrey Kosyakov  <caseq@chromium.org>
1099
1100         Reviewed by Pavel Feldman.
1101
1102         Web Inspector: audit run never completes, fails in DOMAgent.js
1103         https://bugs.webkit.org/show_bug.cgi?id=57349
1104
1105         - assure document is present before calling DOMAgent.querySelectAll()
1106
1107         * inspector/front-end/AuditRules.js:
1108         (WebInspector.AuditRules.ImageDimensionsRule.prototype.doRun):
1109
1110 2011-03-30  Yury Semikhatsky  <yurys@chromium.org>
1111
1112         Unreviewed. Build fix.
1113
1114         * UseJSC.cmake: fix typo PageDebugServer -> PageScriptDebugServer
1115
1116 2011-03-30  Yury Semikhatsky  <yurys@chromium.org>
1117
1118         Reviewed by Pavel Feldman.
1119
1120         Web Inspector: split debugger agent into Page and Worker-specific ones
1121         https://bugs.webkit.org/show_bug.cgi?id=57345
1122
1123         ScriptDebugServer and InspectorDebuggerAgent contain only functionality common
1124         for Worker and Page debugger. All specifics is moved into Page/WorkerScriptDebugServer
1125         and Page/WorkerDebuggerAgent.
1126
1127         * CMakeLists.txt:
1128         * GNUmakefile.am:
1129         * UseJSC.cmake:
1130         * WebCore.gypi:
1131         * WebCore.pro:
1132         * WebCore.vcproj/WebCore.vcproj:
1133         * WebCore.xcodeproj/project.pbxproj:
1134         * bindings/js/JSBindingsAllInOne.cpp:
1135         * bindings/js/JSInjectedScriptHostCustom.cpp:
1136         (WebCore::JSInjectedScriptHost::currentCallFrame):
1137         * bindings/js/PageScriptDebugServer.cpp: Added.
1138         (WebCore::toPage):
1139         (WebCore::PageScriptDebugServer::shared):
1140         (WebCore::PageScriptDebugServer::PageScriptDebugServer):
1141         (WebCore::PageScriptDebugServer::~PageScriptDebugServer):
1142         (WebCore::PageScriptDebugServer::addListener):
1143         (WebCore::PageScriptDebugServer::removeListener):
1144         (WebCore::PageScriptDebugServer::recompileAllJSFunctions):
1145         (WebCore::PageScriptDebugServer::getListenersForGlobalObject):
1146         (WebCore::PageScriptDebugServer::didPause):
1147         (WebCore::PageScriptDebugServer::didContinue):
1148         (WebCore::PageScriptDebugServer::didRemoveLastListener):
1149         (WebCore::PageScriptDebugServer::setJavaScriptPaused):
1150         * bindings/js/PageScriptDebugServer.h: Added.
1151         * bindings/js/ScriptDebugServer.cpp:
1152         (WebCore::ScriptDebugServer::ScriptDebugServer):
1153         (WebCore::ScriptDebugServer::sourceParsed):
1154         (WebCore::ScriptDebugServer::dispatchFunctionToListeners):
1155         (WebCore::ScriptDebugServer::createCallFrameAndPauseIfNeeded):
1156         (WebCore::ScriptDebugServer::updateCallFrameAndPauseIfNeeded):
1157         (WebCore::ScriptDebugServer::pauseIfNeeded):
1158         * bindings/js/ScriptDebugServer.h:
1159         * bindings/js/WorkerScriptDebugServer.cpp: Added.
1160         (WebCore::WorkerScriptDebugServer::WorkerScriptDebugServer):
1161         (WebCore::WorkerScriptDebugServer::addListener):
1162         (WebCore::WorkerScriptDebugServer::removeListener):
1163         * bindings/js/WorkerScriptDebugServer.h: Added.
1164         (WebCore::WorkerScriptDebugServer::~WorkerScriptDebugServer):
1165         (WebCore::WorkerScriptDebugServer::recompileAllJSFunctions):
1166         (WebCore::WorkerScriptDebugServer::getListenersForGlobalObject):
1167         (WebCore::WorkerScriptDebugServer::didPause):
1168         (WebCore::WorkerScriptDebugServer::didContinue):
1169         * bindings/v8/PageScriptDebugServer.cpp: Added.
1170         (WebCore::retrieveFrame):
1171         (WebCore::PageScriptDebugServer::shared):
1172         (WebCore::PageScriptDebugServer::PageScriptDebugServer):
1173         (WebCore::PageScriptDebugServer::addListener):
1174         (WebCore::PageScriptDebugServer::removeListener):
1175         (WebCore::PageScriptDebugServer::setClientMessageLoop):
1176         (WebCore::PageScriptDebugServer::getDebugListenerForContext):
1177         (WebCore::PageScriptDebugServer::runMessageLoopOnPause):
1178         (WebCore::PageScriptDebugServer::quitMessageLoopOnPause):
1179         * bindings/v8/PageScriptDebugServer.h: Added.
1180         (WebCore::PageScriptDebugServer::setEnabled):
1181         (WebCore::PageScriptDebugServer::ClientMessageLoop::~ClientMessageLoop):
1182         (WebCore::PageScriptDebugServer::~PageScriptDebugServer):
1183         * bindings/v8/ScriptDebugServer.cpp:
1184         (WebCore::ScriptDebugServer::ScriptDebugServer):
1185         (WebCore::ScriptDebugServer::setPauseOnNextStatement):
1186         (WebCore::ScriptDebugServer::breakProgram):
1187         (WebCore::ScriptDebugServer::continueProgram):
1188         (WebCore::ScriptDebugServer::stepIntoStatement):
1189         (WebCore::ScriptDebugServer::stepOverStatement):
1190         (WebCore::ScriptDebugServer::stepOutOfFunction):
1191         (WebCore::ScriptDebugServer::editScriptSource):
1192         (WebCore::toScriptDebugServer):
1193         (WebCore::ScriptDebugServer::breakProgramCallback):
1194         (WebCore::ScriptDebugServer::v8DebugEventCallback):
1195         (WebCore::ScriptDebugServer::handleV8DebugEvent):
1196         (WebCore::ScriptDebugServer::isPaused):
1197         * bindings/v8/ScriptDebugServer.h:
1198         * bindings/v8/WorkerScriptDebugServer.cpp: Added.
1199         (WebCore::WorkerScriptDebugServer::WorkerScriptDebugServer):
1200         (WebCore::WorkerScriptDebugServer::addListener):
1201         (WebCore::WorkerScriptDebugServer::removeListener):
1202         * bindings/v8/WorkerScriptDebugServer.h: Added.
1203         (WebCore::WorkerScriptDebugServer::~WorkerScriptDebugServer):
1204         (WebCore::WorkerScriptDebugServer::getDebugListenerForContext):
1205         (WebCore::WorkerScriptDebugServer::runMessageLoopOnPause):
1206         (WebCore::WorkerScriptDebugServer::quitMessageLoopOnPause):
1207         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
1208         (WebCore::V8InjectedScriptHost::currentCallFrameCallback):
1209         * inspector/InjectedScriptHost.h:
1210         (WebCore::InjectedScriptHost::init):
1211         (WebCore::InjectedScriptHost::debuggerAgent):
1212         * inspector/InspectorAgent.cpp:
1213         (WebCore::InspectorAgent::InspectorAgent):
1214         * inspector/InspectorDebuggerAgent.cpp:
1215         (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
1216         (WebCore::InspectorDebuggerAgent::enable):
1217         (WebCore::InspectorDebuggerAgent::disable):
1218         (WebCore::InspectorDebuggerAgent::setBreakpointsActive):
1219         (WebCore::InspectorDebuggerAgent::removeBreakpoint):
1220         (WebCore::InspectorDebuggerAgent::continueToLocation):
1221         (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
1222         (WebCore::InspectorDebuggerAgent::editScriptSource):
1223         (WebCore::InspectorDebuggerAgent::schedulePauseOnNextStatement):
1224         (WebCore::InspectorDebuggerAgent::cancelPauseOnNextStatement):
1225         (WebCore::InspectorDebuggerAgent::resume):
1226         (WebCore::InspectorDebuggerAgent::stepOver):
1227         (WebCore::InspectorDebuggerAgent::stepInto):
1228         (WebCore::InspectorDebuggerAgent::stepOut):
1229         (WebCore::InspectorDebuggerAgent::setPauseOnExceptionsState):
1230         (WebCore::InspectorDebuggerAgent::didPause):
1231         (WebCore::InspectorDebuggerAgent::breakProgram):
1232         * inspector/InspectorDebuggerAgent.h:
1233         * inspector/InspectorProfilerAgent.cpp:
1234         (WebCore::InspectorProfilerAgent::disable):
1235         (WebCore::InspectorProfilerAgent::enable):
1236         (WebCore::InspectorProfilerAgent::startUserInitiatedProfiling):
1237         * inspector/PageDebuggerAgent.cpp: Added.
1238         (WebCore::PageDebuggerAgent::create):
1239         (WebCore::PageDebuggerAgent::PageDebuggerAgent):
1240         (WebCore::PageDebuggerAgent::~PageDebuggerAgent):
1241         (WebCore::PageDebuggerAgent::startListeningScriptDebugServer):
1242         (WebCore::PageDebuggerAgent::stopListeningScriptDebugServer):
1243         (WebCore::PageDebuggerAgent::scriptDebugServer):
1244         * inspector/PageDebuggerAgent.h: Added.
1245         * inspector/WorkerDebuggerAgent.cpp: Added.
1246         (WebCore::WorkerDebuggerAgent::create):
1247         (WebCore::WorkerDebuggerAgent::WorkerDebuggerAgent):
1248         (WebCore::WorkerDebuggerAgent::~WorkerDebuggerAgent):
1249         (WebCore::WorkerDebuggerAgent::startListeningScriptDebugServer):
1250         (WebCore::WorkerDebuggerAgent::stopListeningScriptDebugServer):
1251         (WebCore::WorkerDebuggerAgent::scriptDebugServer):
1252         * inspector/WorkerDebuggerAgent.h: Added.
1253
1254 2011-03-30  Levi Weintraub  <leviw@chromium.org>
1255
1256         Reviewed by Ryosuke Niwa.
1257
1258         Clicking below last line of right-to-left editable text that puts caret in the wrong place
1259         https://bugs.webkit.org/show_bug.cgi?id=38087
1260
1261         Moving getLogical[Start/End]BoxWithNode to RootInlineBox and using it in positionForPointWithInlineChildren
1262         instead of lastLeafChild, which wasn't correct in the RTL case.
1263
1264         Test: editing/selection/click-below-rtl-text.html
1265
1266         * editing/visible_units.cpp:
1267         (WebCore::logicalStartPositionForLine): Moved to RootInlineBox.
1268         (WebCore::logicalEndPositionForLine): Ditto.
1269         * editing/visible_units.h:
1270         * rendering/RenderBlock.cpp:
1271         (WebCore::RenderBlock::positionForPointWithInlineChildren): Useing getLogicalEndBoxWithNode instead
1272         of lastLeafChild.
1273         * rendering/RootInlineBox.cpp:
1274         (WebCore::RootInlineBox::getLogicalStartBoxWithNode): Moved and refactored.
1275         (WebCore::RootInlineBox::getLogicalEndBoxWithNode): Ditto.
1276         * rendering/RootInlineBox.h:
1277
1278 2011-03-30  Yury Semikhatsky  <yurys@chromium.org>
1279
1280         Unreviewed. Rollout r82438 and r82436.
1281
1282         * CMakeLists.txt:
1283         * GNUmakefile.am:
1284         * UseJSC.cmake:
1285         * WebCore.gypi:
1286         * WebCore.pro:
1287         * WebCore.vcproj/WebCore.vcproj:
1288         * WebCore.xcodeproj/project.pbxproj:
1289         * bindings/js/JSBindingsAllInOne.cpp:
1290         * bindings/js/JSInjectedScriptHostCustom.cpp:
1291         (WebCore::JSInjectedScriptHost::currentCallFrame):
1292         * bindings/js/PageScriptDebugServer.cpp: Removed.
1293         * bindings/js/PageScriptDebugServer.h: Removed.
1294         * bindings/js/ScriptDebugServer.cpp:
1295         (WebCore::ScriptDebugServer::shared):
1296         (WebCore::ScriptDebugServer::ScriptDebugServer):
1297         (WebCore::ScriptDebugServer::addListener):
1298         (WebCore::ScriptDebugServer::removeListener):
1299         (WebCore::ScriptDebugServer::hasListenersInterestedInPage):
1300         (WebCore::toPage):
1301         (WebCore::ScriptDebugServer::sourceParsed):
1302         (WebCore::ScriptDebugServer::dispatchFunctionToListeners):
1303         (WebCore::ScriptDebugServer::setJavaScriptPaused):
1304         (WebCore::ScriptDebugServer::createCallFrameAndPauseIfNeeded):
1305         (WebCore::ScriptDebugServer::updateCallFrameAndPauseIfNeeded):
1306         (WebCore::ScriptDebugServer::pauseIfNeeded):
1307         (WebCore::ScriptDebugServer::recompileAllJSFunctions):
1308         (WebCore::ScriptDebugServer::didAddListener):
1309         (WebCore::ScriptDebugServer::didRemoveListener):
1310         * bindings/js/ScriptDebugServer.h:
1311         * bindings/js/WorkerScriptDebugServer.cpp: Removed.
1312         * bindings/js/WorkerScriptDebugServer.h: Removed.
1313         * bindings/v8/PageScriptDebugServer.cpp: Removed.
1314         * bindings/v8/PageScriptDebugServer.h: Removed.
1315         * bindings/v8/ScriptDebugServer.cpp:
1316         (WebCore::retrieveFrame):
1317         (WebCore::ScriptDebugServer::shared):
1318         (WebCore::ScriptDebugServer::ScriptDebugServer):
1319         (WebCore::ScriptDebugServer::addListener):
1320         (WebCore::ScriptDebugServer::removeListener):
1321         (WebCore::ScriptDebugServer::setPauseOnNextStatement):
1322         (WebCore::ScriptDebugServer::breakProgram):
1323         (WebCore::ScriptDebugServer::continueProgram):
1324         (WebCore::ScriptDebugServer::stepIntoStatement):
1325         (WebCore::ScriptDebugServer::stepOverStatement):
1326         (WebCore::ScriptDebugServer::stepOutOfFunction):
1327         (WebCore::ScriptDebugServer::editScriptSource):
1328         (WebCore::ScriptDebugServer::setEnabled):
1329         (WebCore::ScriptDebugServer::breakProgramCallback):
1330         (WebCore::ScriptDebugServer::v8DebugEventCallback):
1331         (WebCore::ScriptDebugServer::handleV8DebugEvent):
1332         (WebCore::ScriptDebugServer::didResume):
1333         * bindings/v8/ScriptDebugServer.h:
1334         (WebCore::ScriptDebugServer::pageCreated):
1335         (WebCore::ScriptDebugServer::ClientMessageLoop::~ClientMessageLoop):
1336         (WebCore::ScriptDebugServer::setClientMessageLoop):
1337         * bindings/v8/WorkerScriptDebugServer.cpp: Removed.
1338         * bindings/v8/WorkerScriptDebugServer.h: Removed.
1339         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
1340         (WebCore::V8InjectedScriptHost::currentCallFrameCallback):
1341         * inspector/InjectedScriptHost.h:
1342         (WebCore::InjectedScriptHost::init):
1343         * inspector/InspectorAgent.cpp:
1344         (WebCore::InspectorAgent::InspectorAgent):
1345         * inspector/InspectorDebuggerAgent.cpp:
1346         (WebCore::InspectorDebuggerAgent::create):
1347         (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
1348         (WebCore::InspectorDebuggerAgent::enable):
1349         (WebCore::InspectorDebuggerAgent::disable):
1350         (WebCore::InspectorDebuggerAgent::setBreakpointsActive):
1351         (WebCore::InspectorDebuggerAgent::removeBreakpoint):
1352         (WebCore::InspectorDebuggerAgent::continueToLocation):
1353         (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
1354         (WebCore::InspectorDebuggerAgent::editScriptSource):
1355         (WebCore::InspectorDebuggerAgent::schedulePauseOnNextStatement):
1356         (WebCore::InspectorDebuggerAgent::cancelPauseOnNextStatement):
1357         (WebCore::InspectorDebuggerAgent::resume):
1358         (WebCore::InspectorDebuggerAgent::stepOver):
1359         (WebCore::InspectorDebuggerAgent::stepInto):
1360         (WebCore::InspectorDebuggerAgent::stepOut):
1361         (WebCore::InspectorDebuggerAgent::setPauseOnExceptionsState):
1362         (WebCore::InspectorDebuggerAgent::didPause):
1363         (WebCore::InspectorDebuggerAgent::breakProgram):
1364         * inspector/InspectorDebuggerAgent.h:
1365         * inspector/InspectorProfilerAgent.cpp:
1366         (WebCore::InspectorProfilerAgent::disable):
1367         (WebCore::InspectorProfilerAgent::enable):
1368         (WebCore::InspectorProfilerAgent::startUserInitiatedProfiling):
1369         * inspector/PageDebuggerAgent.cpp: Removed.
1370         * inspector/PageDebuggerAgent.h: Removed.
1371         * inspector/WorkerDebuggerAgent.cpp: Removed.
1372         * inspector/WorkerDebuggerAgent.h: Removed.
1373
1374 2011-03-30  Yury Semikhatsky  <yurys@chromium.org>
1375
1376         Unreviewed. Fix compilation on Windows and EFL.
1377
1378         * CMakeLists.txt:
1379         * bindings/js/JSBindingsAllInOne.cpp:
1380
1381 2011-03-30  Yury Semikhatsky  <yurys@chromium.org>
1382
1383         Reviewed by Pavel Feldman.
1384
1385         Web Inspector: split debugger agent into Page and Worker-specific ones
1386         https://bugs.webkit.org/show_bug.cgi?id=57345
1387
1388         ScriptDebugServer and InspectorDebuggerAgent contain only functionality common
1389         for Worker and Page debugger. All specifics is moved into Page/WorkerScriptDebugServer
1390         and Page/WorkerDebuggerAgent.
1391
1392         * GNUmakefile.am:
1393         * UseJSC.cmake:
1394         * WebCore.gypi:
1395         * WebCore.pro:
1396         * WebCore.vcproj/WebCore.vcproj:
1397         * WebCore.xcodeproj/project.pbxproj:
1398         * bindings/js/JSInjectedScriptHostCustom.cpp:
1399         (WebCore::JSInjectedScriptHost::currentCallFrame):
1400         * bindings/js/PageScriptDebugServer.cpp: Added.
1401         (WebCore::toPage):
1402         (WebCore::PageScriptDebugServer::shared):
1403         (WebCore::PageScriptDebugServer::PageScriptDebugServer):
1404         (WebCore::PageScriptDebugServer::~PageScriptDebugServer):
1405         (WebCore::PageScriptDebugServer::addListener):
1406         (WebCore::PageScriptDebugServer::removeListener):
1407         (WebCore::PageScriptDebugServer::recompileAllJSFunctions):
1408         (WebCore::PageScriptDebugServer::getListenersForGlobalObject):
1409         (WebCore::PageScriptDebugServer::didPause):
1410         (WebCore::PageScriptDebugServer::didContinue):
1411         (WebCore::PageScriptDebugServer::didRemoveLastListener):
1412         (WebCore::PageScriptDebugServer::setJavaScriptPaused):
1413         * bindings/js/PageScriptDebugServer.h: Added.
1414         * bindings/js/ScriptDebugServer.cpp:
1415         (WebCore::ScriptDebugServer::ScriptDebugServer):
1416         (WebCore::ScriptDebugServer::sourceParsed):
1417         (WebCore::ScriptDebugServer::dispatchFunctionToListeners):
1418         (WebCore::ScriptDebugServer::createCallFrameAndPauseIfNeeded):
1419         (WebCore::ScriptDebugServer::updateCallFrameAndPauseIfNeeded):
1420         (WebCore::ScriptDebugServer::pauseIfNeeded):
1421         * bindings/js/ScriptDebugServer.h:
1422         * bindings/js/WorkerScriptDebugServer.cpp: Added.
1423         (WebCore::WorkerScriptDebugServer::WorkerScriptDebugServer):
1424         (WebCore::WorkerScriptDebugServer::addListener):
1425         (WebCore::WorkerScriptDebugServer::removeListener):
1426         * bindings/js/WorkerScriptDebugServer.h: Added.
1427         (WebCore::WorkerScriptDebugServer::~WorkerScriptDebugServer):
1428         (WebCore::WorkerScriptDebugServer::recompileAllJSFunctions):
1429         (WebCore::WorkerScriptDebugServer::getListenersForGlobalObject):
1430         (WebCore::WorkerScriptDebugServer::didPause):
1431         (WebCore::WorkerScriptDebugServer::didContinue):
1432         * bindings/v8/PageScriptDebugServer.cpp: Added.
1433         (WebCore::retrieveFrame):
1434         (WebCore::PageScriptDebugServer::shared):
1435         (WebCore::PageScriptDebugServer::PageScriptDebugServer):
1436         (WebCore::PageScriptDebugServer::addListener):
1437         (WebCore::PageScriptDebugServer::removeListener):
1438         (WebCore::PageScriptDebugServer::setClientMessageLoop):
1439         (WebCore::PageScriptDebugServer::getDebugListenerForContext):
1440         (WebCore::PageScriptDebugServer::runMessageLoopOnPause):
1441         (WebCore::PageScriptDebugServer::quitMessageLoopOnPause):
1442         * bindings/v8/PageScriptDebugServer.h: Added.
1443         (WebCore::PageScriptDebugServer::setEnabled):
1444         (WebCore::PageScriptDebugServer::ClientMessageLoop::~ClientMessageLoop):
1445         (WebCore::PageScriptDebugServer::~PageScriptDebugServer):
1446         * bindings/v8/ScriptDebugServer.cpp:
1447         (WebCore::ScriptDebugServer::ScriptDebugServer):
1448         (WebCore::ScriptDebugServer::setPauseOnNextStatement):
1449         (WebCore::ScriptDebugServer::breakProgram):
1450         (WebCore::ScriptDebugServer::continueProgram):
1451         (WebCore::ScriptDebugServer::stepIntoStatement):
1452         (WebCore::ScriptDebugServer::stepOverStatement):
1453         (WebCore::ScriptDebugServer::stepOutOfFunction):
1454         (WebCore::ScriptDebugServer::editScriptSource):
1455         (WebCore::toScriptDebugServer):
1456         (WebCore::ScriptDebugServer::breakProgramCallback):
1457         (WebCore::ScriptDebugServer::v8DebugEventCallback):
1458         (WebCore::ScriptDebugServer::handleV8DebugEvent):
1459         (WebCore::ScriptDebugServer::isPaused):
1460         * bindings/v8/ScriptDebugServer.h:
1461         * bindings/v8/WorkerScriptDebugServer.cpp: Added.
1462         (WebCore::WorkerScriptDebugServer::WorkerScriptDebugServer):
1463         (WebCore::WorkerScriptDebugServer::addListener):
1464         (WebCore::WorkerScriptDebugServer::removeListener):
1465         * bindings/v8/WorkerScriptDebugServer.h: Added.
1466         (WebCore::WorkerScriptDebugServer::~WorkerScriptDebugServer):
1467         (WebCore::WorkerScriptDebugServer::getDebugListenerForContext):
1468         (WebCore::WorkerScriptDebugServer::runMessageLoopOnPause):
1469         (WebCore::WorkerScriptDebugServer::quitMessageLoopOnPause):
1470         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
1471         (WebCore::V8InjectedScriptHost::currentCallFrameCallback):
1472         * inspector/InjectedScriptHost.h:
1473         (WebCore::InjectedScriptHost::init):
1474         (WebCore::InjectedScriptHost::debuggerAgent):
1475         * inspector/InspectorAgent.cpp:
1476         (WebCore::InspectorAgent::InspectorAgent):
1477         * inspector/InspectorDebuggerAgent.cpp:
1478         (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
1479         (WebCore::InspectorDebuggerAgent::enable):
1480         (WebCore::InspectorDebuggerAgent::disable):
1481         (WebCore::InspectorDebuggerAgent::setBreakpointsActive):
1482         (WebCore::InspectorDebuggerAgent::removeBreakpoint):
1483         (WebCore::InspectorDebuggerAgent::continueToLocation):
1484         (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
1485         (WebCore::InspectorDebuggerAgent::editScriptSource):
1486         (WebCore::InspectorDebuggerAgent::schedulePauseOnNextStatement):
1487         (WebCore::InspectorDebuggerAgent::cancelPauseOnNextStatement):
1488         (WebCore::InspectorDebuggerAgent::resume):
1489         (WebCore::InspectorDebuggerAgent::stepOver):
1490         (WebCore::InspectorDebuggerAgent::stepInto):
1491         (WebCore::InspectorDebuggerAgent::stepOut):
1492         (WebCore::InspectorDebuggerAgent::setPauseOnExceptionsState):
1493         (WebCore::InspectorDebuggerAgent::didPause):
1494         (WebCore::InspectorDebuggerAgent::breakProgram):
1495         * inspector/InspectorDebuggerAgent.h:
1496         * inspector/InspectorProfilerAgent.cpp:
1497         (WebCore::InspectorProfilerAgent::disable):
1498         (WebCore::InspectorProfilerAgent::enable):
1499         (WebCore::InspectorProfilerAgent::startUserInitiatedProfiling):
1500         * inspector/PageDebuggerAgent.cpp: Added.
1501         (WebCore::PageDebuggerAgent::create):
1502         (WebCore::PageDebuggerAgent::PageDebuggerAgent):
1503         (WebCore::PageDebuggerAgent::~PageDebuggerAgent):
1504         (WebCore::PageDebuggerAgent::startListeningScriptDebugServer):
1505         (WebCore::PageDebuggerAgent::stopListeningScriptDebugServer):
1506         (WebCore::PageDebuggerAgent::scriptDebugServer):
1507         * inspector/PageDebuggerAgent.h: Added.
1508         * inspector/WorkerDebuggerAgent.cpp: Added.
1509         (WebCore::WorkerDebuggerAgent::create):
1510         (WebCore::WorkerDebuggerAgent::WorkerDebuggerAgent):
1511         (WebCore::WorkerDebuggerAgent::~WorkerDebuggerAgent):
1512         (WebCore::WorkerDebuggerAgent::startListeningScriptDebugServer):
1513         (WebCore::WorkerDebuggerAgent::stopListeningScriptDebugServer):
1514         (WebCore::WorkerDebuggerAgent::scriptDebugServer):
1515         * inspector/WorkerDebuggerAgent.h: Added.
1516
1517 2011-03-30  Alexander Pavlov  <apavlov@chromium.org>
1518
1519         Reviewed by Pavel Feldman.
1520
1521         Web Inspector: Make the getStylesForNode result "styleAttributes" value an array rather than a map
1522         https://bugs.webkit.org/show_bug.cgi?id=57440
1523
1524         * inspector/InspectorCSSAgent.cpp:
1525         (WebCore::InspectorCSSAgent::getStylesForNode):
1526         (WebCore::InspectorCSSAgent::buildArrayForAttributeStyles):
1527         * inspector/InspectorCSSAgent.h:
1528         * inspector/front-end/CSSStyleModel.js:
1529         (WebInspector.CSSStyleModel.prototype.getStylesAsync):
1530
1531 2011-03-30  Evan Martin  <evan@chromium.org>
1532
1533         Reviewed by Ryosuke Niwa.
1534
1535         Fix a last-second ASSERT in previous change that was wrong.
1536
1537         * dom/Document.cpp:
1538         (WebCore::Document::setTitle):
1539
1540 2011-03-30  Levi Weintraub  <leviw@chromium.org>
1541
1542         Reviewed by Eric Seidel.
1543
1544         RTL:  Directionality always reset on hard line break
1545         https://bugs.webkit.org/show_bug.cgi?id=23124
1546
1547         No longer clearing all BidiContexts when we hit a hard line break.
1548         Instead, directionality applied by DOM elements is preserved by
1549         reconstructing the context stack ignoring those that didn't come
1550         from the DOM.
1551
1552         Test: fast/text/international/bidi-br-as-paragraph-separator.html
1553
1554         * platform/text/BidiContext.cpp:
1555         (WebCore::BidiContext::createUncached):
1556         (WebCore::BidiContext::create):
1557         (WebCore::copyContextAndRebaselineLevel): Helper to make a copy of a context
1558         and recalculate its bidi level.
1559         (WebCore::BidiContext::copyStackRemovingUnicodeEmbeddingContexts): Returns the top of
1560         a BidiContext stack that's equivalent but without contexts from Unicode directional
1561         characters.
1562         (WebCore::operator==): Now takes into account embedding source.
1563         * platform/text/BidiContext.h:
1564         (WebCore::BidiContext::source): Enum to specify whether an embedded
1565         bidirectional control came from the DOM/Style or Unicode characters
1566         (WebCore::BidiContext::BidiContext):
1567         * platform/text/BidiResolver.h:
1568         (WebCore::BidiEmbedding::BidiEmbedding): An embedding is now a direction
1569         and a hint about where it came from so we can differentiate DOM directions
1570         from unicode direction control characters.
1571         (WebCore::BidiEmbedding::direction):
1572         (WebCore::BidiEmbedding::source):
1573         (WebCore::::embed): Now takes a source as well as a direction.
1574         (WebCore::::commitExplicitEmbedding):
1575         (WebCore::::createBidiRunsForLine):
1576         * rendering/InlineIterator.h:
1577         (WebCore::bidiNext):
1578         (WebCore::bidiFirst):
1579         * rendering/RenderBlockLineLayout.cpp:
1580         (WebCore::RenderBlock::determineStartPosition):
1581
1582 2011-03-30  Steve Block  <steveblock@google.com>
1583
1584         Reviewed by Jeremy Orlow.
1585
1586         JavaMethod should not expose JavaString in its API
1587         https://bugs.webkit.org/show_bug.cgi?id=55765
1588
1589         - Factors out a JavaMethod interface which does not use JNI types.
1590           This will allow the Java bridge to be used with objects that
1591           don't use JNI directly. The existing jobject-backed
1592           implementation is moved to a new JavaMethodJobject class which
1593           implements the interface.
1594         - Use WTF::String in place of JavaString in the API, as JavaString
1595           exposes JNI types in its interface.
1596         - Remove the method ID as it uses JNI types.
1597
1598         No new tests, refactoring only.
1599
1600         * Android.jscbindings.mk:
1601         * Android.v8bindings.mk:
1602         * GNUmakefile.am:
1603         * WebCore.gypi:
1604         * WebCore.xcodeproj/project.pbxproj:
1605         * bridge/jni/JavaMethod.h:
1606         * bridge/jni/JavaMethodJobject.cpp:
1607         (JavaMethodJobject::JavaMethodJobject):
1608         (JavaMethodJobject::~JavaMethodJobject):
1609         (appendClassName):
1610         (JavaMethodJobject::signature):
1611         * bridge/jni/JavaMethodJobject.h: Copied from Source/WebCore/bridge/jni/JavaMethod.h.
1612         (JSC::Bindings::JavaMethodJobject::name):
1613         (JSC::Bindings::JavaMethodJobject::returnTypeClassName):
1614         (JSC::Bindings::JavaMethodJobject::parameterAt):
1615         (JSC::Bindings::JavaMethodJobject::returnType):
1616         (JSC::Bindings::JavaMethodJobject::isStatic):
1617         (JSC::Bindings::JavaMethodJobject::numParameters):
1618         * bridge/jni/jsc/JavaClassJSC.cpp:
1619         (JavaClass::JavaClass):
1620         * bridge/jni/jsc/JavaInstanceJSC.cpp:
1621         (JavaInstance::invokeMethod):
1622         * bridge/jni/v8/JavaClassV8.cpp:
1623         (JavaClass::JavaClass):
1624         * bridge/jni/v8/JavaInstanceV8.cpp:
1625         (JavaInstance::invokeMethod):
1626
1627 2011-03-30  Evan Martin  <evan@chromium.org>
1628
1629         Reviewed by Ryosuke Niwa.
1630
1631         clean up Document's handling of title changes
1632         https://bugs.webkit.org/show_bug.cgi?id=57433
1633
1634         Document::setTitle has two entry points:
1635         1) from DOM bindings, like document.title="foo"
1636         2) from title tags, like <title>foo</title> in HTML
1637
1638         Split these two code paths to make the code easier to follow.
1639         Also, replace the repeated pattern of
1640             m_rawTitle = "foo"; updateTitle();
1641         with
1642             updateTitle("foo");
1643
1644         * dom/Document.cpp:
1645         (WebCore::Document::updateTitle):
1646         (WebCore::Document::setTitle):
1647         (WebCore::Document::setTitleElement):
1648         (WebCore::Document::removeTitle):
1649         * dom/Document.h:
1650         * html/HTMLTitleElement.cpp:
1651         (WebCore::HTMLTitleElement::insertedIntoDocument):
1652         (WebCore::HTMLTitleElement::childrenChanged):
1653         * svg/SVGTitleElement.cpp:
1654         (WebCore::SVGTitleElement::insertedIntoDocument):
1655         (WebCore::SVGTitleElement::childrenChanged):
1656
1657 2011-03-30  Levi Weintraub  <leviw@chromium.org>
1658
1659         Reviewed by Ryosuke Niwa.
1660
1661         BreakBlockQuoteCommand assumes all li tags have list item renderers
1662         https://bugs.webkit.org/show_bug.cgi?id=57253
1663
1664         Checking that the renderers of li nodes are actually RenderListItems
1665         before treating them as such.
1666
1667         Test: editing/execCommand/crash-breaking-blockquote-with-list.html
1668
1669         * editing/BreakBlockquoteCommand.cpp:
1670         (WebCore::BreakBlockQuoteCommand::doApply):
1671
1672 2011-03-30  Pavel Feldman  <pfeldman@chromium.org>
1673
1674         Not reviewed: fixing typo in the inspector front-end.
1675
1676         Web Inspector: REGRESSION: Broken live edit errors handling
1677         https://bugs.webkit.org/show_bug.cgi?id=57436
1678
1679         * inspector/front-end/DebuggerModel.js:
1680         (WebInspector.DebuggerModel.prototype._didEditScriptSource):
1681
1682 2011-03-30  Yael Aharon  <yael.aharon@nokia.com>
1683
1684         Reviewed by Eric Seidel.
1685
1686         Left/Right borders/padding/margins are not always added correctly when rendering multiline inline boxes with bidi elements
1687         https://bugs.webkit.org/show_bug.cgi?id=9272
1688
1689
1690         Also fixes https://bugs.webkit.org/show_bug.cgi?id=47210 and https://bugs.webkit.org/show_bug.cgi?id=8392.
1691
1692         Change how we decide if an InlineFlowBox is the last one for its renderer. Use the position of resolver's logicallyLastRun
1693         to decide if there is more text in the next line.
1694
1695         Tests: fast/borders/rtl-border-01.html
1696                fast/borders/rtl-border-02.html
1697                fast/borders/rtl-border-03.html
1698                fast/borders/rtl-border-04.html
1699                fast/borders/rtl-border-05.html
1700
1701         * rendering/InlineFlowBox.cpp:
1702         (WebCore::isAnsectorAndWithinBlock):
1703         (WebCore::InlineFlowBox::determineSpacingForFlowBoxes):
1704         * rendering/InlineFlowBox.h:
1705         * rendering/RenderBlock.h:
1706         * rendering/RenderBlockLineLayout.cpp:
1707         (WebCore::RenderBlock::constructLine):
1708         (WebCore::reachedEndOfTextRenderer):
1709         (WebCore::RenderBlock::layoutInlineChildren):
1710
1711 2011-03-29  Nikolas Zimmermann  <nzimmermann@rim.com>
1712
1713         Reviewed by Eric Seidel.
1714
1715         REGRESSION (r68976): Incorrect bidi rendering in SVG text
1716         https://bugs.webkit.org/show_bug.cgi?id=53980
1717
1718         Deconvolute SVGTextLayoutEngine code, which was confusing due to the simultaneous processing of the rendered text
1719         in visual and logical order. Added several helper methods to make the code more readable.
1720
1721         Fix Unicode directional formatting characters support, now works as expected.
1722
1723         Test: svg/text/bidi-embedded-direction.svg
1724
1725         * editing/visible_units.cpp: Refactor getLeafBoxesInLogicalOrder(), move to InlineFlowBox.
1726         (WebCore::getLogicalStartBoxAndNode): Use new collectLeafBoxesInLogicalOrder() method in InlineFlowBox.
1727         (WebCore::getLogicalEndBoxAndNode): Ditto.
1728         * rendering/InlineFlowBox.cpp: Add new helper function, that returns a list of all leaf boxes in logical order.
1729         (WebCore::InlineFlowBox::collectLeafBoxesInLogicalOrder):
1730         * rendering/InlineFlowBox.h:
1731         * rendering/svg/RenderSVGText.cpp: Actually trigger reordering the x/y/dx/dy/rotate value lists, if needed.
1732         (WebCore::RenderSVGText::RenderSVGText):
1733         (WebCore::RenderSVGText::layout):
1734         * rendering/svg/RenderSVGText.h: Ditto.
1735         (WebCore::RenderSVGText::layoutAttributes):
1736         (WebCore::RenderSVGText::needsReordering):
1737         * rendering/svg/SVGRootInlineBox.cpp: Use new InlineFlowBox::collectLeafBoxesINLogicalOrder(), with a custom "inline box reverse" implementation,
1738                                               which not only reverses the order of InlineBoxes, but also the order of the x/y/dx/dy/rotate value lists, if needed.
1739         (WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation):
1740         (WebCore::SVGRootInlineBox::layoutCharactersInTextBoxes):
1741         (WebCore::swapItems):
1742         (WebCore::reverseInlineBoxRangeAndValueListsIfNeeded):
1743         (WebCore::SVGRootInlineBox::reorderValueLists):
1744         * rendering/svg/SVGRootInlineBox.h:
1745         * rendering/svg/SVGTextLayoutAttributes.cpp: Store RenderSVGInlineText* pointer, where we belong to.
1746         (WebCore::SVGTextLayoutAttributes::SVGTextLayoutAttributes):
1747         (WebCore::SVGTextLayoutAttributes::dump):
1748         * rendering/svg/SVGTextLayoutAttributes.h:
1749         (WebCore::SVGTextLayoutAttributes::context):
1750         * rendering/svg/SVGTextLayoutAttributesBuilder.cpp: Pass RenderSVGInlineText* object when creating SVGTextLayoutAttributes.
1751         (WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForTextSubtree):
1752         (WebCore::SVGTextLayoutAttributesBuilder::propagateLayoutAttributes):
1753         * rendering/svg/SVGTextLayoutAttributesBuilder.h:
1754         * rendering/svg/SVGTextLayoutEngine.cpp: Rewrite & cleanup the main layout algorithm, to be less confusing.
1755         (WebCore::SVGTextLayoutEngine::SVGTextLayoutEngine):
1756         (WebCore::SVGTextLayoutEngine::updateRelativePositionAdjustmentsIfNeeded):
1757         (WebCore::SVGTextLayoutEngine::recordTextFragment):
1758         (WebCore::SVGTextLayoutEngine::currentLogicalCharacterAttributes):
1759         (WebCore::SVGTextLayoutEngine::currentLogicalCharacterMetrics):
1760         (WebCore::SVGTextLayoutEngine::currentVisualCharacterMetrics):
1761         (WebCore::SVGTextLayoutEngine::advanceToNextLogicalCharacter):
1762         (WebCore::SVGTextLayoutEngine::advanceToNextVisualCharacter):
1763         (WebCore::SVGTextLayoutEngine::layoutTextOnLineOrPath):
1764         * rendering/svg/SVGTextLayoutEngine.h:
1765
1766 2011-03-30  Ilya Tikhonovsky  <loislo@chromium.org>
1767
1768         Not reviewed trivial change.
1769
1770         Web Inspector: Remove unnecessary function arguments after r82281.
1771         https://bugs.webkit.org/show_bug.cgi?id=57327
1772
1773         * inspector/InspectorAgent.cpp:
1774         (WebCore::InspectorAgent::didCommitLoad):
1775         (WebCore::InspectorAgent::domContentLoadedEventFired):
1776         * inspector/InspectorAgent.h:
1777         * inspector/InspectorInstrumentation.cpp:
1778         (WebCore::InspectorInstrumentation::domContentLoadedEventFiredImpl):
1779         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
1780
1781 2011-03-30  Kent Tamura  <tkent@chromium.org>
1782
1783         Reviewed by Ojan Vafai.
1784
1785         H1 element should have different default style if it is in HTML5 sectioning elements.
1786         https://bugs.webkit.org/show_bug.cgi?id=52693
1787
1788         Test: fast/css/h1-in-section-elements.html
1789
1790         * css/html.css: Add font-size and margin declarations to follow HTML5 specification.
1791         (:-webkit-any(article,aside,nav,section) h1):
1792         (:-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1):
1793         (:-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1):
1794         (:-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1):
1795         (:-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1):
1796
1797 2011-03-29  Beth Dakin  <bdakin@apple.com>
1798
1799         Reviewed by Maciej Stachowiak.
1800
1801         Fix for https://bugs.webkit.org/show_bug.cgi?id=57408
1802         webkit-min-device-pixel-ratio media query doesn't work post-SnowLeopard 
1803         -and corresponding-
1804         <rdar://problem/8665411>
1805
1806         * platform/mac/PlatformScreenMac.mm:
1807         (WebCore::windowScaleFactor):
1808         (WebCore::toUserSpace):
1809         (WebCore::toDeviceSpace):
1810
1811 2011-03-29  Eric Seidel  <eric@webkit.org>
1812
1813         Reviewed by Dimitri Glazkov.
1814
1815         Rename BidiResolver::eor and sor to m_eor and m_sor to match modern style
1816         https://bugs.webkit.org/show_bug.cgi?id=57369
1817
1818         I considered renaming these to m_endOfRun and m_startOfRun but decided
1819         that was too verbose for now (given how often they're used).  I suspect
1820         with a bit more refactoring we'll find they're not used very often and can be renamed
1821         if so desired.
1822
1823         * platform/text/BidiResolver.h:
1824         (WebCore::::appendRun):
1825         (WebCore::::checkDirectionInLowerRaiseEmbeddingLevel):
1826         (WebCore::::lowerExplicitEmbeddingLevel):
1827         (WebCore::::raiseExplicitEmbeddingLevel):
1828         (WebCore::::createBidiRunsForLine):
1829         * rendering/InlineIterator.h:
1830         (WebCore::InlineBidiResolver::appendRun):
1831
1832 2011-03-29  Mikhail Naganov  <mnaganov@chromium.org>
1833
1834         Reviewed by Pavel Feldman.
1835
1836         Web Inspector: [Chromium] Remove exact retained size request in detailed heap snapshots.
1837         https://bugs.webkit.org/show_bug.cgi?id=57351
1838
1839         * bindings/js/ScriptHeapSnapshot.h:
1840         * bindings/v8/ScriptHeapSnapshot.cpp:
1841         * bindings/v8/ScriptHeapSnapshot.h:
1842         * inspector/Inspector.json:
1843         * inspector/InspectorProfilerAgent.cpp:
1844         * inspector/InspectorProfilerAgent.h:
1845         * inspector/front-end/DetailedHeapshotGridNodes.js:
1846         (WebInspector.HeapSnapshotGenericObjectNode):
1847         (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data):
1848         * inspector/front-end/DetailedHeapshotView.js:
1849         (WebInspector.DetailedHeapshotView.prototype._mouseClickInContainmentGrid):
1850
1851 2011-03-29  Eric Seidel  <eric@webkit.org>
1852
1853         Reviewed by Ryosuke Niwa.
1854
1855         Split more logic out from createBidiRunsForLine for readability
1856         https://bugs.webkit.org/show_bug.cgi?id=57341
1857
1858         I marked reorderRunsFromLevels inline, but it probably doesn't actually need to (or want to) be.
1859         This lops another large hunk off of reorderRunsFromLevels further reducing the size and complexity.
1860
1861         * platform/text/BidiResolver.h:
1862         (WebCore::::reorderRunsFromLevels):
1863         (WebCore::::createBidiRunsForLine):
1864
1865 2011-03-29  Kent Tamura  <tkent@chromium.org>
1866
1867         Reviewed by Dimitri Glazkov.
1868
1869         Make validation message bubble testable
1870         https://bugs.webkit.org/show_bug.cgi?id=57290
1871
1872         Introduce a setting for validation message timer so that we can configure
1873         how long we show a validation message bubble.
1874
1875         Test: fast/forms/validation-message-appearance.html
1876
1877         * html/ValidationMessage.cpp:
1878         (WebCore::ValidationMessage::setMessageDOMAndStartTimer):
1879           Don't set a timer if the timer magnification value is 0 or negative.
1880           Otherwise, hides the bubble length * magnification / 1000 seconds.
1881         * page/Settings.cpp:
1882         (WebCore::Settings::Settings): Initialize the timer magnification value.
1883         * page/Settings.h:
1884         (WebCore::Settings::setValidationMessageTimerMagnification): Added.
1885         (WebCore::Settings::validationMessageTimerMaginification): Added.
1886
1887 2011-03-29  Dimitri Glazkov  <dglazkov@chromium.org>
1888
1889         Remove the extraneous declaration I accidentally added in r82376.
1890
1891         * dom/MouseEvent.h: Removed createSimulated decl.
1892
1893 2011-03-29  James Robinson  <jamesr@chromium.org>
1894
1895         Reviewed by Kenneth Russell.
1896
1897         [chromium] Compositor crash with show-layer-borders flag
1898         https://bugs.webkit.org/show_bug.cgi?id=57292
1899
1900         Synchronize the debug border color/width with other properties to ensure the appropriate
1901         CCLayerImpl exists.  Code is only exercised with a debugging command line flag so no layout
1902         test.
1903
1904         * platform/graphics/chromium/LayerChromium.cpp:
1905         (WebCore::LayerChromium::pushPropertiesTo):
1906         (WebCore::LayerChromium::setBorderColor):
1907         (WebCore::LayerChromium::setBorderWidth):
1908         * platform/graphics/chromium/LayerChromium.h:
1909
1910 2011-03-29  Tony Gentilcore  <tonyg@chromium.org>
1911
1912         Reviewed by Adam Barth.
1913
1914         Teach the preload scanner about &lt;input type=image&gt;
1915         https://bugs.webkit.org/show_bug.cgi?id=57404
1916
1917         I did a very rough sample of the top 50 web pages to see how many of each
1918         HTML resource type they include:
1919         img src: 1,359
1920         script src: 276
1921         link href: 256
1922         iframe src: 104
1923         input src: 50
1924         embed src: 37
1925         @import: 13
1926         object data: 11
1927
1928         Based on this, it seems worthwhile to preload inputs and iframes (possibly embed).
1929         This patch only does inputs.
1930
1931         Test: fast/preloader/input.html
1932
1933         * html/parser/HTMLPreloadScanner.cpp:
1934         (WebCore::HTMLNames::PreloadTask::PreloadTask):
1935         (WebCore::HTMLNames::PreloadTask::processAttributes):
1936         (WebCore::HTMLNames::PreloadTask::inputTypeAttributeIsImage):
1937         (WebCore::HTMLNames::PreloadTask::preload):
1938
1939 2011-03-29  Luke Macpherson   <macpherson@chromium.org>
1940
1941         Reviewed by David Levin.
1942
1943         Improve the massive switch statement in CSSStyleSelector::applyProperty.
1944         https://bugs.webkit.org/show_bug.cgi?id=56288
1945
1946         No new tests are needed because no new functionality exposed.
1947
1948         * css/CSSStyleSelector.cpp:
1949         (WebCore::CSSStyleSelector::applyProperty):
1950         Asserted that cases implemented in the CSSStyleApplyProperty lookup table are unreachable.
1951         Updated comment.
1952
1953 2011-03-29  Dimitri Glazkov  <dglazkov@chromium.org>
1954
1955         Reviewed by Darin Adler.
1956
1957         Introduce SimulatedMouseEvent and teach EventDispatcher how to use it.
1958         https://bugs.webkit.org/show_bug.cgi?id=57402
1959
1960         No functional changes, covered by existing tests.
1961
1962         * dom/EventDispatcher.cpp:
1963         (WebCore::EventDispatcher::dispatchSimulatedClick): Changed to use SimulatedMouseEvent.
1964         (WebCore::EventDispatcher::dispatchMouseEvent): Combined two dispatchMouseEvent methods
1965             into one, now that simulated-click events don't need one.
1966         * dom/EventDispatcher.h: Updated decls.
1967         * dom/MouseEvent.cpp:
1968         (WebCore::SimulatedMouseEvent::create): Added.
1969         (WebCore::SimulatedMouseEvent::~SimulatedMouseEvent): Added.
1970         (WebCore::SimulatedMouseEvent::SimulatedMouseEvent): Added.
1971         * dom/MouseEvent.h: Made constructor protected.
1972
1973 2011-03-29  Anders Carlsson  <andersca@apple.com>
1974
1975         Fix build.
1976
1977         * WebCore.exp.in:
1978
1979 2011-03-29  Steve Block  <steveblock@google.com>
1980
1981         Reviewed by Jeremy Orlow.
1982
1983         JavaInstance should not use jvalue in its API
1984         https://bugs.webkit.org/show_bug.cgi?id=57019
1985
1986         This change updates JavaInstance for V8 to use JavaValue, rather than
1987         jvalue, in its API. This will allow us to create an API for
1988         JavaInstance that is independent of JNI, to allow it to be
1989         implemented on platforms that do not use JNI directly.
1990
1991         Refactoring only, no new tests.
1992
1993         * bridge/jni/v8/JavaInstanceV8.cpp:
1994         (JavaInstance::invokeMethod):
1995         (JavaInstance::getField):
1996         * bridge/jni/v8/JavaInstanceV8.h:
1997         * bridge/jni/v8/JavaNPObjectV8.cpp:
1998         (JSC::Bindings::JavaNPObjectInvoke):
1999         (JSC::Bindings::JavaNPObjectGetProperty):
2000         * bridge/jni/v8/JavaValueV8.h:
2001
2002 2011-03-29  Eric Seidel  <eric@webkit.org>
2003
2004         Reviewed by Dimitri Glazkov.
2005
2006         Rename BidiResolver::last to m_last to match modern style
2007         https://bugs.webkit.org/show_bug.cgi?id=57367
2008
2009         * platform/text/BidiResolver.h:
2010         (WebCore::::lowerExplicitEmbeddingLevel):
2011         (WebCore::::raiseExplicitEmbeddingLevel):
2012         (WebCore::::createBidiRunsForLine):
2013
2014 2011-03-29  Justin Schuh  <jschuh@chromium.org>
2015
2016         Reviewed by Maciej Stachowiak.
2017
2018         SVGComponentTransferFunctionElement should validate type
2019         https://bugs.webkit.org/show_bug.cgi?id=56960
2020
2021         Test: svg/filters/feComponentTransfer-style-crash.xhtml
2022
2023         * svg/SVGComponentTransferFunctionElement.cpp:
2024         (WebCore::SVGComponentTransferFunctionElement::svgAttributeChanged):
2025         * svg/SVGComponentTransferFunctionElement.h:
2026
2027 2011-03-29  Thomas Klausner  <tk@giga.or.at>
2028
2029         Reviewed by David Levin.
2030
2031         png-1.5 fixes
2032         https://bugs.webkit.org/show_bug.cgi?id=54406
2033
2034         Fix compilation with png-1.5: struct members were hidden, and
2035         a new API to terminate data processing was added (especially for
2036         WebKit).
2037
2038         Compilation fixes, so no new tests.
2039
2040         * platform/image-decoders/png/PNGImageDecoder.cpp:
2041         (WebCore::PNGImageDecoder::headerAvailable):
2042         (WebCore::PNGImageDecoder::rowAvailable):
2043
2044 2011-03-29  Gavin Peters  <gavinp@chromium.org>
2045
2046         Reviewed by Tony Gentilcore.
2047
2048         Add beforeload to icon and prefetch link rel types
2049         https://bugs.webkit.org/show_bug.cgi?id=56424
2050
2051         Over in https://lists.webkit.org/pipermail/webkit-dev/2011-February/016034.html , a webkit-dev
2052         thread, I've discussed my hopes for the link element, and adding the link header.  This
2053         change helps improve the link header by making it participate in the beforeload event in
2054         two more important cases.
2055
2056         Tests: fast/dom/HTMLLinkElement/prefetch-beforeload.html
2057                http/tests/misc/link-rel-icon-beforeload.html
2058                webarchive/test-link-rel-icon-beforeload.html
2059
2060         * html/HTMLLinkElement.cpp:
2061         (WebCore::HTMLLinkElement::checkBeforeLoadEvent):
2062         (WebCore::HTMLLinkElement::process):
2063         * html/HTMLLinkElement.h:
2064
2065 2011-03-29  Eric Seidel  <eric@webkit.org>
2066
2067         Reviewed by Dimitri Glazkov.
2068
2069         Rename BidiResolver::current to BidiResolver::m_current to match modern style
2070         https://bugs.webkit.org/show_bug.cgi?id=57363
2071
2072         I was very confused by current until I realized it was a member variable.
2073         I also did m_reachedEndOfLine since that was small.
2074
2075         * platform/text/BidiResolver.h:
2076         (WebCore::BidiResolver::position):
2077         (WebCore::BidiResolver::setPosition):
2078         (WebCore::BidiResolver::increment):
2079         (WebCore::::createBidiRunsForLine):
2080
2081 2011-03-29  Geoff Pike  <gpike@chromium.org>
2082
2083         Reviewed by Dimitri Glazkov.
2084
2085         In HitTestResult objects, initialize the ListHashSet<RefPtr<Node> >
2086         lazily.  In my informal testing it seems to be used hardly at all, so
2087         it's wasteful to create it eagerly.  Initializing a ListHashSet
2088         is expensive because a ListHashSet initially has space for 256
2089         elements, and that space is memset to 0.
2090
2091         This change should improve performance but have no impact on
2092         correctness.  On x86-64, for example, the change cuts the
2093         cost of HitTestResult(IntPoint()) in EventHandler::mouseMoved()
2094         from ~1700 cycles to ~300 cycles.
2095
2096         * rendering/HitTestResult.cpp:
2097         (WebCore::HitTestResult::HitTestResult): copy *m_rectBasedTestResult if m_rectBasedTestResult isn't 0
2098         (WebCore::HitTestResult::operator=): copy *m_rectBasedTestResult if m_rectBasedTestResult isn't 0
2099         (WebCore::HitTestResult::addNodeToRectBasedTestResult): use mutableRectBasedTestResult() rather than m_rectBasedTestResult
2100         (WebCore::HitTestResult::append): append *(other.m_rectBasedTestResult) if other.m_rectBasedTestResult isn't 0
2101         * rendering/HitTestResult.h:
2102         (WebCore::HitTestResult::rectBasedTestResult): Add a typedef for ListHashSet<RefPtr<Node> > to ease readability.  Change m_rectBasedTestResult from ListHashSet<RefPtr<Node> > to an OwnPtr of same.  Modify rectBasedTestResult() and add mutableRectBasedTestResult().
2103
2104 2011-03-29  Timothy Hatcher  <timothy@apple.com>
2105
2106         Update the order of the context menu to better match AppKit on Mac.
2107
2108         <rdar://problem/9054893>
2109
2110         Reviewed by John Sullivan.
2111
2112         * English.lproj/Localizable.strings: Updated.
2113         * page/ContextMenuController.cpp:
2114         (WebCore::ContextMenuController::populate): Update the order of items on Mac.
2115         * platform/LocalizationStrategy.h:
2116         * platform/LocalizedStrings.cpp:
2117         (WebCore::contextMenuItemTagLookUpInDictionary): Added argument for selected string.
2118         * platform/LocalizedStrings.h:
2119         * platform/android/LocalizedStringsAndroid.cpp:
2120         (WebCore::contextMenuItemTagLookUpInDictionary): Ditto.
2121         * platform/brew/LocalizedStringsBrew.cpp:
2122         (WebCore::contextMenuItemTagLookUpInDictionary): Ditto.
2123         * platform/efl/LocalizedStringsEfl.cpp:
2124         (WebCore::contextMenuItemTagLookUpInDictionary): Ditto.
2125         * platform/gtk/LocalizedStringsGtk.cpp:
2126         (WebCore::contextMenuItemTagLookUpInDictionary): Ditto.
2127         * platform/haiku/LocalizedStringsHaiku.cpp:
2128         (WebCore::contextMenuItemTagLookUpInDictionary): Ditto.
2129         * platform/wx/LocalizedStringsWx.cpp:
2130         (WebCore::contextMenuItemTagLookUpInDictionary): Ditto.
2131
2132 2011-03-29  Dean Jackson  <dino@apple.com>
2133
2134         Reviewed by Chris Marrin and Ken Russell.
2135
2136         https://bugs.webkit.org/show_bug.cgi?id=57248
2137         Occlusion issues with WebGL in Safari
2138
2139         The depth buffer on Safari ports was being set up with a
2140         maximum of 16 bits. Now we use a combined 24/8 depth/stencil
2141         buffer on Mac ports.
2142
2143         No new tests as this is the setting for a particular port. Other
2144         ports may use different defaults.
2145
2146         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
2147         (WebCore::GraphicsContext3D::validateAttributes):
2148         - use Extensions3D to test for depth and multisample extensions
2149           rather than querying OpenGL directly.
2150         (WebCore::GraphicsContext3D::reshape):
2151         - use a 24bit depth buffer when the extension is enabled.
2152
2153 2011-03-29  Dimitri Glazkov  <dglazkov@chromium.org>
2154
2155         Sorted XCode project. It's gotten quite out of sorts.
2156
2157         * WebCore.xcodeproj/project.pbxproj: Ran sort-XCode-project-file.
2158
2159 2011-03-29  Emil A Eklund  <eae@chromium.org>
2160
2161         Reviewed by Dimitri Glazkov.
2162
2163         DatasetDOMStringMap::item and ::contains copies attribute name string
2164         https://bugs.webkit.org/show_bug.cgi?id=55645
2165
2166         Change propertyNameMatchesAttributeName to match without creating a copy
2167         of the string.
2168
2169         * dom/DatasetDOMStringMap.cpp:
2170         (WebCore::propertyNameMatchesAttributeName):
2171
2172 2011-03-29  Csaba Osztrogon√°c  <ossy@webkit.org>
2173
2174         Unreviewed rollout r82282, part of r82288, r82298.
2175
2176         * css/CSSParser.cpp:
2177         (WebCore::parseColorInt):
2178         (WebCore::isValidDouble):
2179         (WebCore::parseAlphaValue):
2180         (WebCore::CSSParser::parseColor):
2181
2182 2011-03-25  Brent Fulgham  <bfulgham@webkit.org>
2183
2184         Reviewed by Dave Hyatt.
2185
2186         https://bugs.webkit.org/show_bug.cgi?id=55981
2187         Second round of clean-ups, aimed at supporting GTK with the
2188         same unified FontPlatformData header.  This version removes
2189         some unneeded WinCairo code, and aligns the WinCairo and
2190         GTK ports to reduce code duplication.
2191
2192         * WebCore.vcproj/WebCore.vcproj: Get rid of a dangling reference
2193           to an old WinCairo file.
2194         * platform/graphics/FontPlatformData.h: Remove unneeded member
2195           for m_fontFace, which is a member of m_scaledFont.  Switch to
2196           standard Cairo hashing.
2197         (WebCore::FontPlatformData::FontPlatformData):
2198         (WebCore::FontPlatformData::font):
2199         (WebCore::FontPlatformData::scaledFont):
2200         (WebCore::FontPlatformData::hash):
2201         (WebCore::FontPlatformData::isHashTableDeletedValue):
2202         (WebCore::FontPlatformData::hashTableDeletedFontValue):
2203         * platform/graphics/win/FontCacheWin.cpp: Update to no longer use
2204           the unnecessary fontFace() accessor.
2205         (WebCore::FontCache::createFontPlatformData):
2206         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
2207         * platform/graphics/win/FontPlatformDataCairoWin.cpp:
2208         (WebCore::FontPlatformData::platformDataInit):
2209         (WebCore::FontPlatformData::FontPlatformData):
2210         (WebCore::FontPlatformData::~FontPlatformData):
2211         (WebCore::FontPlatformData::platformDataAssign):
2212         (WebCore::FontPlatformData::platformIsEqual):
2213         * platform/graphics/win/FontPlatformDataWin.cpp:
2214         (WebCore::FontPlatformData::FontPlatformData):
2215
2216 2011-03-29  Jian Li  <jianli@chromium.org>
2217
2218         Reviewed by Adam Barth.
2219
2220         Inline worker powered by blob URL does not work with files URL even if
2221         allowFileAccessFromFileURLs is enabled
2222         https://bugs.webkit.org/show_bug.cgi?id=56063
2223
2224         Test: fast/files/workers/inline-worker-via-blob-url.html
2225
2226         * fileapi/BlobURL.cpp: Removed unneeded getOrigin() method.
2227         * fileapi/BlobURL.h: Removed unneeded getOrigin() method.
2228         * page/SecurityOrigin.cpp:
2229         (WebCore::SecurityOrigin::SecurityOrigin): Extended the logic to handle
2230         filesystem URL also to blob URL. Also fixed the problem that m_isUnique
2231         is incorrectly set for blob and filesystem URLs.
2232         (WebCore::SecurityOrigin::create): Removed the special logic for blob URL
2233         since we use the same logic in SecurityOrigin constructor as filesystem
2234         URL.
2235         (WebCore::SecurityOrigin::canRequest): Removed the special logic for blob
2236         URL since it is not needed with the fix in SecurityOrigin constructor.
2237
2238 2011-03-29  Timothy Hatcher  <timothy@apple.com>
2239
2240         Update WebCore Localizable.strings to contain WebCore, WebKit/mac and WebKit2 strings.
2241
2242         https://webkit.org/b/57354
2243
2244         Reviewed by Sam Weinig.
2245
2246         * English.lproj/Localizable.strings: Updated.
2247         * StringsNotToBeLocalized.txt: Removed. To hard to maintain in WebCore.
2248         * platform/network/cf/LoaderRunLoopCF.h: Remove a single quote in an #error so
2249         extract-localizable-strings does not complain about unbalanced single quotes.
2250
2251 2011-03-29  Sheriff Bot  <webkit.review.bot@gmail.com>
2252
2253         Unreviewed, rolling out r82295 and r82300.
2254         http://trac.webkit.org/changeset/82295
2255         http://trac.webkit.org/changeset/82300
2256         https://bugs.webkit.org/show_bug.cgi?id=57380
2257
2258         This patch breaks compile on Chromium (Requested by
2259         abarth|gardener on #webkit).
2260
2261         * accessibility/AccessibilityObject.h:
2262         * accessibility/AccessibilityRenderObject.cpp:
2263         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
2264         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
2265         (atkRole):
2266         (webkit_accessible_get_role):
2267         * accessibility/mac/AccessibilityObjectWrapper.mm:
2268
2269 2011-03-29  Anders Carlsson  <andersca@apple.com>
2270
2271         Fix clang build.
2272
2273         * platform/text/BidiResolver.h:
2274         (WebCore::::createBidiRunsForLine):
2275
2276 2011-03-29  Steve Falkenburg  <sfalken@apple.com>
2277
2278         Reviewed by Adam Roben.
2279
2280         Use per-configuration vsprops in WebCore to avoid WebKitVSPropsRedirectionDir removal by MSVC IDE
2281         https://bugs.webkit.org/show_bug.cgi?id=57378
2282
2283         Visual Studio's IDE was removing instances of $(WebKitVSPropsRedirectionDir) from
2284         InheritedPropertySheet rules in our vcproj files when the vcproj was edited from within
2285         the IDE. To avoid this, add a separate vsprops file for each project configuration that
2286         contains the required inherited property sheets.
2287
2288         * WebCore.vcproj/QTMovieWin.vcproj:
2289         * WebCore.vcproj/QTMovieWinDebug.vsprops: Added.
2290         * WebCore.vcproj/QTMovieWinDebugAll.vsprops: Added.
2291         * WebCore.vcproj/QTMovieWinDebugCairoCFLite.vsprops: Added.
2292         * WebCore.vcproj/QTMovieWinRelease.vsprops: Added.
2293         * WebCore.vcproj/QTMovieWinReleaseCairoCFLite.vsprops: Added.
2294         * WebCore.vcproj/QTMovieWinReleaseLTCG.vsprops: Added.
2295         * WebCore.vcproj/WebCore.vcproj:
2296         * WebCore.vcproj/WebCoreDebug.vsprops: Added.
2297         * WebCore.vcproj/WebCoreDebugAll.vsprops: Added.
2298         * WebCore.vcproj/WebCoreDebugCairoCFLite.vsprops: Added.
2299         * WebCore.vcproj/WebCoreRelease.vsprops: Added.
2300         * WebCore.vcproj/WebCoreReleaseCairoCFLite.vsprops: Added.
2301         * WebCore.vcproj/WebCoreReleaseLTCG.vsprops: Added.
2302
2303 2011-03-29  David Hyatt  <hyatt@apple.com>
2304
2305         Reviewed by Simon Fraser.
2306
2307         <rdar://problem/9194927> REGRESSION (r81691): Page at www.mondaynote.com lays out incorrectly
2308         
2309         Back out the optimization that stopped when it hit the first float. This was an incorrect optimization
2310         and can't be done without more work.
2311
2312         Added fast/block/float/float-forced-below-other-floats.html
2313
2314         * rendering/RenderBlock.cpp:
2315         (WebCore::RenderBlock::logicalLeftOffsetForLine):
2316         (WebCore::RenderBlock::logicalRightOffsetForLine):
2317
2318 2011-03-29  Eric Seidel  <eric@webkit.org>
2319
2320         Reviewed by Ryosuke Niwa.
2321
2322         Start to clean up BidiResolver::createBidiRunsForLine so that mere mortals can understand it
2323         https://bugs.webkit.org/show_bug.cgi?id=57338
2324
2325         I'm attempting to break createBidiRunsForLine into understandable pieces
2326         so that we can tell what it's actually doing.  Our implementation of the
2327         unicode bidi algorithm is slightly different from the spec in that we
2328         run it per-line (instead of over the entire paragraph at once).  This is
2329         great for performance (our implementation is resumable), but it makes
2330         things a bit tricky to understand.  Splitting createBidiRunsForLine into
2331         pieces should help make our UBA implementation more readable.
2332
2333         * platform/text/BidiResolver.h:
2334         (WebCore::::updateStatusLastFromCurrentDirection):
2335         (WebCore::::createBidiRunsForLine):
2336
2337 2011-03-29  Mario Sanchez Prada  <msanchez@igalia.com>
2338
2339         Reviewed by Martin Robinson.
2340
2341         [Gtk] Consistent crash from Google/ARIA combobox click
2342         https://bugs.webkit.org/show_bug.cgi?id=55883
2343
2344         Do not call to firstChild() to avoid entering into infinite loops.
2345
2346         This would happen when current item is a WebCore Group and some of
2347         its children have either role 'option' or 'menuitem'. Other than
2348         that the logic behind that call to firstChild() seems to be no
2349         longer needed so it's safe to remove it.
2350
2351         Test: platform/gtk/accessibility/aria-options-and-menuitems-crash.html
2352
2353         * accessibility/gtk/AccessibilityObjectAtk.cpp:
2354         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
2355         Remove call to firsChild, which was leading to crashes sometimes.
2356
2357 2011-03-29  Mario Sanchez Prada  <msanchez@igalia.com>
2358
2359         Reviewed by Chris Fleizach.
2360
2361         AX: GTK: ARIA role is not respected on <p> <label> <div> and <form>
2362         https://bugs.webkit.org/show_bug.cgi?id=47636
2363
2364         Define new roles in WebCore and map them to ATK accordingly.
2365
2366         Test: platform/gtk/accessibility/aria-roles-unignored.html
2367
2368         * accessibility/AccessibilityObject.h: Added new roles to
2369         represent paragraphs, labels, forms and div sections.
2370         * accessibility/AccessibilityRenderObject.cpp:
2371         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
2372         Return ParagraphRole, LabelRole, FormRole and DivRole when needed.
2373         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
2374         (atkRole): Map new WebCore roles to ATK Roles.
2375         (webkit_accessible_get_role): Remove code to define roles for
2376         paragraphs, labels, forms and divs based on node's tag name.
2377
2378         Update mappings for the Mac platform.
2379
2380         * accessibility/mac/AccessibilityObjectWrapper.mm:
2381         (createAccessibilityRoleMap): Add explicit mappings from the new
2382         roles introduced to NSAccessibilityGroupRole.
2383
2384 2011-03-29  Philippe Normand  <pnormand@igalia.com>
2385
2386         Unreviewed build fix. Remove ASSERT hitting consitently on GTK.
2387
2388         * rendering/InlineIterator.h:
2389         (WebCore::InlineIterator::moveToStartOf):
2390
2391 2011-03-29  Darin Adler  <darin@apple.com>
2392
2393         Fix some just-introduced build failures.
2394
2395         * WebCore.pro: Correct spelling of filename.
2396
2397         * css/CSSParser.cpp:
2398         (WebCore::parseColorIntOrPercentage): Fix double/int conversion that fails to compile
2399         on Leopard. Also renamed one local variabel.
2400
2401         * inspector/InspectorAgent.cpp:
2402         (WebCore::InspectorAgent::didCommitLoad): Removed unused argument names to avoid warning.
2403         (WebCore::InspectorAgent::domContentLoadedEventFired): Ditto.
2404
2405 2011-03-29  Andras Becsi  <abecsi@webkit.org>
2406
2407         Reviewed by Darin Adler.
2408
2409         CSS: Slow parsing of rgb() with percent values
2410         https://bugs.webkit.org/show_bug.cgi?id=16708
2411
2412         Implement fast-path parsing for percentage color values.
2413
2414         Gain ~30% speedup on http://canvex.lazyilluminati.com/misc/3d.html.
2415
2416         * css/CSSParser.cpp:
2417         (WebCore::checkForValidDouble): Extend to return the number of characters forming a valid double.
2418         (WebCore::parseDouble): Function for parsing double values if they are valid.
2419         (WebCore::parseColorIntOrPercentage): Extend parseColorInt to deal with percentage values.
2420         (WebCore::parseAlphaValue): Use the new functions.
2421         (WebCore::CSSParser::parseColor): Ditto.
2422
2423 2011-03-29  Ilya Tikhonovsky  <loislo@chromium.org>
2424
2425         Reviewed by Pavel Feldman.
2426
2427         Web Inspector: extract InspectorPageAgent from InspectorAgent.
2428         https://bugs.webkit.org/show_bug.cgi?id=57327
2429
2430         There are page related methods and inspector related methods in InspectorAgent.
2431         It would be nice to extract page specific methods for future usage the rest of methods in workers debugger.
2432
2433         * GNUmakefile.am:
2434         * WebCore.gypi:
2435         * inspector/CodeGeneratorInspector.pm:
2436         * inspector/Inspector.json:
2437         * inspector/InspectorAgent.cpp:
2438         (WebCore::InspectorAgent::InspectorAgent):
2439         (WebCore::InspectorAgent::restoreInspectorStateFromCookie):
2440         (WebCore::InspectorAgent::didClearWindowObjectInWorld):
2441         (WebCore::InspectorAgent::setFrontend):
2442         (WebCore::InspectorAgent::disconnectFrontend):
2443         (WebCore::InspectorAgent::didCommitLoad):
2444         (WebCore::InspectorAgent::domContentLoadedEventFired):
2445         * inspector/InspectorAgent.h:
2446         (WebCore::InspectorAgent::pageAgent):
2447         * inspector/InspectorPageAgent.cpp: Added.
2448         (WebCore::InspectorPageAgent::create):
2449         (WebCore::InspectorPageAgent::InspectorPageAgent):
2450         (WebCore::InspectorPageAgent::setFrontend):
2451         (WebCore::InspectorPageAgent::clearFrontend):
2452         (WebCore::InspectorPageAgent::addScriptToEvaluateOnLoad):
2453         (WebCore::InspectorPageAgent::removeAllScriptsToEvaluateOnLoad):
2454         (WebCore::InspectorPageAgent::reloadPage):
2455         (WebCore::InspectorPageAgent::openInInspectedWindow):
2456         (WebCore::InspectorPageAgent::setUserAgentOverride):
2457         (WebCore::buildObjectForCookie):
2458         (WebCore::buildArrayForCookies):
2459         (WebCore::InspectorPageAgent::getCookies):
2460         (WebCore::InspectorPageAgent::deleteCookie):
2461         (WebCore::InspectorPageAgent::inspectedURLChanged):
2462         (WebCore::InspectorPageAgent::restore):
2463         (WebCore::InspectorPageAgent::didCommitLoad):
2464         (WebCore::InspectorPageAgent::domContentEventFired):
2465         (WebCore::InspectorPageAgent::loadEventFired):
2466         (WebCore::InspectorPageAgent::didClearWindowObjectInWorld):
2467         (WebCore::InspectorPageAgent::applyUserAgentOverride):
2468         * inspector/InspectorPageAgent.h: Added.
2469         * inspector/InspectorController.cpp:
2470         (WebCore::InspectorController::connectFrontend):
2471         * inspector/InspectorInstrumentation.cpp:
2472         (WebCore::InspectorInstrumentation::didClearWindowObjectInWorldImpl):
2473         (WebCore::InspectorInstrumentation::applyUserAgentOverrideImpl):
2474         (WebCore::InspectorInstrumentation::domContentLoadedEventFiredImpl):
2475         (WebCore::InspectorInstrumentation::loadEventFiredImpl):
2476         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
2477         (WebCore::InspectorInstrumentation::retrievePageAgent):
2478         * inspector/InspectorInstrumentation.h:
2479         * inspector/InstrumentingAgents.h:
2480         (WebCore::InstrumentingAgents::InstrumentingAgents):
2481         (WebCore::InstrumentingAgents::inspectorPageAgent):
2482         (WebCore::InstrumentingAgents::setInspectorPageAgent):
2483         * inspector/front-end/AuditsPanel.js:
2484         (WebInspector.AuditsPanel.prototype._reloadResources):
2485         * inspector/front-end/CookieItemsView.js:
2486         (WebInspector.CookieItemsView.prototype._deleteCookie):
2487         (WebInspector.Cookies.getCookiesAsync):
2488         * inspector/front-end/ExtensionServer.js:
2489         (WebInspector.ExtensionServer.prototype._onReload):
2490         * inspector/front-end/NetworkPanel.js:
2491         (WebInspector.NetworkDataGridNode.prototype._openInNewTab):
2492         * inspector/front-end/ResourcesPanel.js:
2493         (WebInspector.FrameResourceTreeElement.prototype.ondblclick):
2494         * inspector/front-end/WorkersSidebarPane.js:
2495         (WebInspector.WorkersSidebarPane.prototype.setInstrumentation):
2496         * inspector/front-end/inspector.js:
2497         (WebInspector.openResource):
2498         (WebInspector.documentKeyDown):
2499
2500 2011-03-29  David Hyatt  <hyatt@apple.com>
2501
2502         Reviewed by Darin Adler.
2503
2504         https://bugs.webkit.org/show_bug.cgi?id=57276
2505         
2506         Add optimizations to make the vertical placement of boxes much faster. Whenever a box is added
2507         to a line, compare it with the parent box. If we can determine that the child box has the exact
2508         same height and baseline position as the parent box, then we keep a boolean flag set called
2509         descendantsHaveSameLineHeightAndBaseline(). If the box is different for any reason then we clear the
2510         flag up the line box parent chain.
2511
2512         When it comes time to do computeLogicalboxHeights, we can avoid recurring into the children of
2513         a box whose descendants all have the same position. When we do placeBoxesInBlockDirection, we
2514         can do a simplified recursion that just calls adjustBlockDirectionPosition to offset the boxes
2515         without doing anything else.
2516         
2517         Because of the quirks mode rule of only shrinking boxes with no immediate text children, we need
2518         to track whether a box has text descendants now as well.  When we avoid doing the recursion
2519         this flag tells us whether the collection of boxes should have an effect on the ascent and descent
2520         of the line in quirks mode.
2521  
2522         * rendering/InlineFlowBox.cpp:
2523         (WebCore::InlineFlowBox::addToLine):
2524         (WebCore::InlineFlowBox::computeLogicalBoxHeights):
2525         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
2526         (WebCore::InlineFlowBox::nodeAtPoint):
2527         (WebCore::InlineFlowBox::paintBoxDecorations):
2528         (WebCore::InlineFlowBox::paintMask):
2529         * rendering/InlineFlowBox.h:
2530         (WebCore::InlineFlowBox::InlineFlowBox):
2531         (WebCore::InlineFlowBox::hasTextDescendants):
2532         (WebCore::InlineFlowBox::descendantsHaveSameLineHeightAndBaseline):
2533         (WebCore::InlineFlowBox::clearDescendantsHaveSameLineHeightAndBaseline):
2534         * rendering/RenderBlock.h:
2535         * rendering/RenderBlockLineLayout.cpp:
2536         (WebCore::RenderBlock::createLineBoxes):
2537         (WebCore::RenderBlock::constructLine):
2538         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine):
2539
2540 2011-03-29  Eric Seidel  <eric@webkit.org>
2541
2542         Reviewed by Ryosuke Niwa.
2543
2544         Remove a bunch of duplicate code by adding some InlineIterator helper methods
2545         https://bugs.webkit.org/show_bug.cgi?id=57326
2546
2547         Once I started adding these it became clear how much crazy duplicated code
2548         we had due to treating InlineIterator as a struct and accessing its
2549         members directly.  We can't quite make the members private yet since
2550         findNextLineBreak still splits out the members.  But this change
2551         makes the code much cleaner.
2552
2553         * rendering/InlineIterator.h:
2554         (WebCore::InlineIterator::clear):
2555         (WebCore::InlineIterator::moveToStartOf):i
2556         (WebCore::InlineIterator::moveTo):
2557         (WebCore::InlineIterator::increment):
2558         * rendering/RenderBlockLineLayout.cpp:
2559         (WebCore::tryHyphenating):
2560         (WebCore::RenderBlock::findNextLineBreak):
2561
2562 2011-03-29  Eric Seidel  <eric@webkit.org>
2563
2564         Reviewed by Ryosuke Niwa.
2565
2566         Clean up bidiNext by abstracting repeated code
2567         https://bugs.webkit.org/show_bug.cgi?id=57335
2568
2569         I also added a comment to explain what bidiNext is actually doing.
2570         This whole area of code is confusing but need not be.
2571
2572         * rendering/InlineIterator.h:
2573         (WebCore::embedCharFromDirection):
2574         (WebCore::notifyResolverEnteredObject):
2575         (WebCore::notifyResolverWillExitObject):
2576         (WebCore::bidiNext):
2577         (WebCore::bidiFirst):
2578
2579 2011-03-29  Alexander Pavlov  <apavlov@chromium.org>
2580
2581         Reviewed by Yury Semikhatsky.
2582
2583         Web Inspector: Support external CSS stylesheet freeflow text editing
2584         https://bugs.webkit.org/show_bug.cgi?id=54397
2585
2586         In this implementation, Ctrl/Cmd-S commits the current changes into the model.
2587
2588         * inspector/front-end/ResourceView.js:
2589         (WebInspector.ResourceView.createResourceView):
2590         (WebInspector.CSSSourceFrameDelegateForResourcesPanel):
2591         (WebInspector.CSSSourceFrameDelegateForResourcesPanel.prototype.canEditScriptSource):
2592         (WebInspector.CSSSourceFrameDelegateForResourcesPanel.prototype.editScriptSource):
2593         (WebInspector.CSSSourceFrameDelegateForResourcesPanel.prototype.editScriptSource.handleInfos):
2594         (WebInspector.CSSSourceFrameDelegateForResourcesPanel.prototype._saveStyleSheet):
2595         * inspector/front-end/ResourcesPanel.js:
2596         (WebInspector.ResourcesPanel.prototype._applyDiffMarkup):
2597         (WebInspector.FrameResourceTreeElement.prototype._contentChanged):
2598         * inspector/front-end/SourceFrame.js:
2599         (WebInspector.SourceFrame.prototype._createTextViewer):
2600
2601 2011-03-29  Eric Carlson  <eric.carlson@apple.com>
2602
2603         Reviewed by Dan Bernstein.
2604
2605         playbackRate should not be set to defaultPlaybackRate in play()
2606         https://bugs.webkit.org/show_bug.cgi?id=55943
2607
2608         Test: media/video-playbackrate.html
2609
2610         * html/HTMLMediaElement.cpp:
2611         (WebCore::HTMLMediaElement::playbackRate): No need to ask the media engine for the current
2612             rate, we already have the current value cached.
2613         (WebCore::HTMLMediaElement::playInternal): Don't reset the engine's playback rate to 
2614             the default rate.
2615         (WebCore::HTMLMediaElement::togglePlayState): Do reset the engine's playback rate to 
2616             the default rate before triggering playback.
2617         * manual-tests/media-default-playback-rate.html: Added.
2618
2619 2011-03-28  Dimitri Glazkov  <dglazkov@chromium.org>
2620
2621         Reviewed by Eric Seidel.
2622
2623         Remove specialization of EventDispatcher with inversion of control.
2624         https://bugs.webkit.org/show_bug.cgi?id=57285
2625
2626         Since some events have extra logic around their dispatch, allow them
2627         to dispatch themselves and specialize the logic. This change only
2628         converts KeyboardEvent to this model.
2629
2630         No functional change, covered by existing tests.
2631
2632         * dom/Event.cpp:
2633         (WebCore::Event::dispatch): Added.
2634         * dom/Event.h: Updated decls.
2635         * dom/EventDispatcher.cpp:
2636         (WebCore::EventDispatcher::dispatchEvent): Changed to ask event to dispatch
2637             itself.
2638         * dom/EventDispatcher.h: Updated decls.
2639         * dom/KeyboardEvent.cpp:
2640         (WebCore::KeyboardEvent::dispatch): Added, moving code from EventDispatcher.
2641         * dom/KeyboardEvent.h: Updated decls.
2642         * dom/Node.cpp:
2643         (WebCore::Node::dispatchKeyEvent): Changed to use the new ways.
2644
2645 2011-03-29  Ilya Tikhonovsky  <loislo@chromium.org>
2646
2647         Reviewed by Yury Semikhatsky.
2648
2649         Web Inspector: InspectorDOMAgent has unnecessary dependency from InspectorAgent.
2650         https://bugs.webkit.org/show_bug.cgi?id=57329
2651
2652         * inspector/InspectorAgent.cpp:
2653         (WebCore::InspectorAgent::InspectorAgent):
2654         (WebCore::InspectorAgent::setFrontend):
2655         * inspector/InspectorAgent.h:
2656         * inspector/InspectorController.cpp:
2657         (WebCore::InspectorController::inspect):
2658         * inspector/InspectorDOMAgent.cpp:
2659         (WebCore::InspectorDOMAgent::InspectorDOMAgent):
2660         (WebCore::InspectorDOMAgent::setFrontend):
2661         (WebCore::InspectorDOMAgent::handleMousePress):
2662         (WebCore::InspectorDOMAgent::inspect):
2663         (WebCore::InspectorDOMAgent::focusNode):
2664         (WebCore::InspectorDOMAgent::highlight):
2665         (WebCore::InspectorDOMAgent::hideHighlight):
2666         * inspector/InspectorDOMAgent.h:
2667         (WebCore::InspectorDOMAgent::create):
2668
2669 2011-03-29  Eric Seidel  <eric@webkit.org>
2670
2671         Reviewed by Nikolas Zimmermann.
2672
2673         Rename InlineIterator::pos to m_pos to match modern style
2674         https://bugs.webkit.org/show_bug.cgi?id=57342
2675
2676         Somehow I failed to upload this one earlier, no wonder later patches didn't apply.
2677
2678         * rendering/InlineIterator.h:
2679         (WebCore::InlineIterator::InlineIterator):
2680         (WebCore::operator==):
2681         (WebCore::operator!=):
2682         (WebCore::InlineIterator::increment):
2683         (WebCore::InlineIterator::current):
2684         (WebCore::InlineBidiResolver::appendRun):
2685         * rendering/RenderBlockLineLayout.cpp:
2686         (WebCore::checkMidpoints):
2687         (WebCore::RenderBlock::appendRunsForObject):
2688         (WebCore::RenderBlock::layoutInlineChildren):
2689         (WebCore::RenderBlock::matchedEndLine):
2690         (WebCore::tryHyphenating):
2691         (WebCore::RenderBlock::findNextLineBreak):
2692
2693 2011-03-29  Pavel Feldman  <pfeldman@chromium.org>
2694
2695         Reviewed by Yury Semikhatsky.
2696
2697         Web Inspector: document BrowserDebugger agent.
2698         https://bugs.webkit.org/show_bug.cgi?id=57331
2699
2700         * inspector/Inspector.json:
2701
2702 2011-03-29  Alexander Pavlov  <apavlov@chromium.org>
2703
2704         Reviewed by Pavel Feldman.
2705
2706         Web Inspector: Fix handling of the CSSAgent.setStyleSheetText() results in CSSStyleModel.js
2707         https://bugs.webkit.org/show_bug.cgi?id=56310
2708
2709         Instead of stylesheet ids, CSSAgent.getAllStyleSheets() now returns metainfo objects containing
2710         "styleSheetId", "sourceURL", "disabled", and "title" fields. The latter three are not returned
2711         by CSSAgent.getStyleSheet() anymore.
2712
2713         Test: inspector/styles/get-set-stylesheet-text.html
2714
2715         * inspector/Inspector.json:
2716         * inspector/InspectorCSSAgent.cpp:
2717         (WebCore::InspectorCSSAgent::getAllStyleSheets):
2718         * inspector/InspectorCSSAgent.h:
2719         * inspector/InspectorStyleSheet.cpp:
2720         (WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
2721         (WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo):
2722         * inspector/InspectorStyleSheet.h:
2723         * inspector/front-end/AuditRules.js:
2724         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.styleSheetCallback):
2725         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.allStylesCallback):
2726         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun):
2727         * inspector/front-end/CSSStyleModel.js:
2728         (WebInspector.CSSStyleModel.prototype._styleSheetChanged.callback):
2729         (WebInspector.CSSStyleModel.prototype._styleSheetChanged):
2730         (WebInspector.CSSStyleModel.prototype._onRevert):
2731         (WebInspector.CSSStyleSheet):
2732         (WebInspector.CSSStyleSheet.prototype.setText):
2733
2734 2011-03-29  Jeremy Moskovich  <jeremy@chromium.org>
2735
2736         Reviewed by Eric Seidel.
2737
2738         Implement text-align:match-parent as -webkit-match-parent.
2739         https://bugs.webkit.org/show_bug.cgi?id=50951
2740
2741         Add support to the CSS parser.
2742
2743         Tests: fast/css/text-align-webkit-match-parent-parse.html
2744                fast/css/text-align-webkit-match-parent.html
2745
2746         * css/CSSParser.cpp:
2747         (WebCore::CSSParser::parseValue):
2748         * css/CSSStyleSelector.cpp:
2749         (WebCore::CSSStyleSelector::applyProperty):
2750         * css/CSSValueKeywords.in:
2751
2752 2011-03-29  Eric Seidel  <eric@webkit.org>
2753
2754         Reviewed by Ryosuke Niwa.
2755
2756         Rename InlineIterator::nextBreakablePosition to m_nextBreakablePosition to match modern style
2757         https://bugs.webkit.org/show_bug.cgi?id=57323
2758
2759         All of these m_nextBreakablePosition = -1 could probably be replaced with
2760         some new methods.  But I'll do that in a separate change.  Clearly
2761         m_nextBreakablePosition is just a cached value which should be cleared
2762         at the right times.  I suspect we may even fail to clear it sometimes when
2763         we should due to the current used of direct access instead of smarter functions.
2764
2765         * rendering/InlineIterator.h:
2766         (WebCore::InlineIterator::InlineIterator):
2767         (WebCore::InlineIterator::increment):
2768         * rendering/RenderBlockLineLayout.cpp:
2769         (WebCore::tryHyphenating):
2770         (WebCore::RenderBlock::findNextLineBreak):
2771
2772 2011-03-29  Jeff Miller  <jeffm@apple.com>
2773
2774         Reviewed by Jon Honeycutt.
2775
2776         Add WebCore::copyCertificateToData() on Windows
2777         https://bugs.webkit.org/show_bug.cgi?id=57296
2778
2779         Create a new win directory in platform/cf and add CertificateCFWin.cpp and CertificateCFWin.h to it.
2780
2781         * WebCore.vcproj/WebCore.vcproj: Added CertificateCFWin.cpp and CertificateCFWin.h.
2782         * WebCore.vcproj/copyForwardingHeaders.cmd: Copy all header files in \platform\cf\win\.
2783         * platform/cf/win: Added.
2784         * platform/cf/win/CertificateCFWin.cpp: Added.
2785         (WebCore::deallocCertContext): Added.
2786         (WebCore::createCertContextDeallocator): Added.
2787         (WebCore::copyCertificateToData): Added.
2788         * platform/cf/win/CertificateCFWin.h: Added.
2789
2790 2011-03-29  Eric Seidel  <eric@webkit.org>
2791
2792         Reviewed by Ryosuke Niwa.
2793
2794         Rename InlineIterator::block to m_block to match modern style
2795         https://bugs.webkit.org/show_bug.cgi?id=57321
2796
2797         I could have made m_block private, since it's only accessed in
2798         one place outside of InlineIterator (for an ASSERT).  But I chose
2799         not to do so in this change.
2800
2801         * rendering/InlineIterator.h:
2802         (WebCore::InlineIterator::InlineIterator):
2803         (WebCore::InlineIterator::increment):
2804         (WebCore::InlineBidiResolver::appendRun):
2805         * rendering/RenderBlockLineLayout.cpp:
2806         (WebCore::RenderBlock::findNextLineBreak):
2807
2808 2011-03-29  Leo Yang  <leo.yang@torchmobile.com.cn>
2809
2810         Reviewed by Nikolas Zimmermann.
2811
2812         Incorrect offset of svg <use> element which is in <symbol> element
2813         https://bugs.webkit.org/show_bug.cgi?id=57318
2814
2815         When webkit expanded a svg <symbol> element in the shadow tree it
2816         would clone the children of the <symbol>. The children may contain
2817         SVGShadowTreeContainerElement which was expanded from svg <use>
2818         element. But the clone operation would clone a
2819         SVGShadowTreeContainerElement as a svg <g> element. This resulted
2820         that updateContainerOffset wouldn't update offset for those elements
2821         which were expand from <use> elements.
2822
2823         This patch implements cloneElementWithoutAttributesAndChildren for
2824         SVGShadowTreeContainerElement to make the container clone itself
2825         correctly.
2826
2827         Test: svg/custom/use-in-symbol-with-offset.svg
2828
2829         * rendering/svg/SVGShadowTreeElements.cpp:
2830         (WebCore::SVGShadowTreeContainerElement::cloneElementWithoutAttributesAndChildren):
2831         * rendering/svg/SVGShadowTreeElements.h:
2832
2833 2011-03-29  Eric Seidel  <eric@webkit.org>
2834
2835         Reviewed by Ryosuke Niwa.
2836
2837         Rename InlineIterator::obj to m_obj to match modern style
2838         https://bugs.webkit.org/show_bug.cgi?id=57319
2839
2840         I started this rename after confusion in InlineBidiResolver::appendRun.
2841         (Which uses an "obj" local in InlineIterator.h.  It's not actually
2842         masking m_obj because it's a separate class, but I didn't realize
2843         that at the time because it's in InlineIterator.h which is itself confusing!)
2844
2845         * rendering/InlineIterator.h:
2846         (WebCore::InlineIterator::InlineIterator):
2847         (WebCore::operator==):
2848         (WebCore::operator!=):
2849         (WebCore::InlineIterator::increment):
2850         (WebCore::InlineIterator::atEnd):
2851         (WebCore::InlineIterator::current):
2852         (WebCore::InlineIterator::direction):
2853         (WebCore::InlineBidiResolver::appendRun):
2854         * rendering/RenderBlockLineLayout.cpp:
2855         (WebCore::checkMidpoints):
2856         (WebCore::RenderBlock::appendRunsForObject):
2857         (WebCore::RenderBlock::layoutInlineChildren):
2858         (WebCore::RenderBlock::matchedEndLine):
2859         (WebCore::skipNonBreakingSpace):
2860         (WebCore::RenderBlock::requiresLineBox):
2861         (WebCore::RenderBlock::skipTrailingWhitespace):
2862         (WebCore::RenderBlock::skipLeadingWhitespace):
2863         (WebCore::tryHyphenating):
2864         (WebCore::RenderBlock::findNextLineBreak):
2865
2866 2011-03-29  Pavel Feldman  <pfeldman@chromium.org>
2867
2868         Reviewed by Yury Semikhatsky.
2869
2870         Web Inspector: document Timeline domain, make timeline event types of type string.
2871         https://bugs.webkit.org/show_bug.cgi?id=57299
2872
2873         * inspector/Inspector.json:
2874         * inspector/InspectorTimelineAgent.cpp:
2875         (WebCore::InspectorTimelineAgent::pushGCEventRecords):
2876         (WebCore::InspectorTimelineAgent::start):
2877         (WebCore::InspectorTimelineAgent::stop):
2878         (WebCore::InspectorTimelineAgent::willCallFunction):
2879         (WebCore::InspectorTimelineAgent::didCallFunction):
2880         (WebCore::InspectorTimelineAgent::willDispatchEvent):
2881         (WebCore::InspectorTimelineAgent::didDispatchEvent):
2882         (WebCore::InspectorTimelineAgent::willLayout):
2883         (WebCore::InspectorTimelineAgent::didLayout):
2884         (WebCore::InspectorTimelineAgent::willRecalculateStyle):
2885         (WebCore::InspectorTimelineAgent::didRecalculateStyle):
2886         (WebCore::InspectorTimelineAgent::willPaint):
2887         (WebCore::InspectorTimelineAgent::didPaint):
2888         (WebCore::InspectorTimelineAgent::willWriteHTML):
2889         (WebCore::InspectorTimelineAgent::didWriteHTML):
2890         (WebCore::InspectorTimelineAgent::didInstallTimer):
2891         (WebCore::InspectorTimelineAgent::didRemoveTimer):
2892         (WebCore::InspectorTimelineAgent::willFireTimer):
2893         (WebCore::InspectorTimelineAgent::didFireTimer):
2894         (WebCore::InspectorTimelineAgent::willChangeXHRReadyState):
2895         (WebCore::InspectorTimelineAgent::didChangeXHRReadyState):
2896         (WebCore::InspectorTimelineAgent::willLoadXHR):
2897         (WebCore::InspectorTimelineAgent::didLoadXHR):
2898         (WebCore::InspectorTimelineAgent::willEvaluateScript):
2899         (WebCore::InspectorTimelineAgent::didEvaluateScript):
2900         (WebCore::InspectorTimelineAgent::didScheduleResourceRequest):
2901         (WebCore::InspectorTimelineAgent::willSendResourceRequest):
2902         (WebCore::InspectorTimelineAgent::willReceiveResourceData):
2903         (WebCore::InspectorTimelineAgent::didReceiveResourceData):
2904         (WebCore::InspectorTimelineAgent::willReceiveResourceResponse):
2905         (WebCore::InspectorTimelineAgent::didReceiveResourceResponse):
2906         (WebCore::InspectorTimelineAgent::didFinishLoadingResource):
2907         (WebCore::InspectorTimelineAgent::didMarkTimeline):
2908         (WebCore::InspectorTimelineAgent::didMarkDOMContentEvent):
2909         (WebCore::InspectorTimelineAgent::didMarkLoadEvent):
2910         (WebCore::InspectorTimelineAgent::addRecordToTimeline):
2911         (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
2912         (WebCore::InspectorTimelineAgent::pushCurrentRecord):
2913         * inspector/InspectorTimelineAgent.h:
2914         (WebCore::InspectorTimelineAgent::TimelineRecordEntry::TimelineRecordEntry):
2915         * inspector/front-end/TimelineAgent.js:
2916         * inspector/front-end/TimelinePanel.js:
2917         (WebInspector.TimelinePanel.prototype.get _recordStyles):
2918         (WebInspector.TimelinePanel.prototype._createEventDivider):
2919         (WebInspector.TimelinePanel.prototype._findParentRecord):
2920         (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline):
2921         (WebInspector.TimelineDispatcher.prototype.started):
2922         (WebInspector.TimelineDispatcher.prototype.stopped):
2923         (WebInspector.TimelineDispatcher.prototype.eventRecorded):
2924         (WebInspector.TimelinePanel.FormattedRecord):
2925         (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent):
2926         (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails):
2927
2928 2011-03-29  Andrey Adaikin  <aandrey@google.com>
2929
2930         Reviewed by Pavel Feldman.
2931
2932         Web Inspector: Fixing live edits tests on chromium.
2933         https://bugs.webkit.org/show_bug.cgi?id=57316
2934
2935         * inspector/front-end/ScriptsPanel.js:
2936         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.editScriptSource):
2937         * inspector/front-end/SourceFrame.js:
2938         (WebInspector.SourceFrame.prototype._handleSave.didEditScriptSource):
2939         (WebInspector.SourceFrame.prototype._handleSave):
2940         (WebInspector.SourceFrameDelegate.prototype.editScriptSource):
2941
2942 2011-03-29  Pavel Podivilov  <podivilov@chromium.org>
2943
2944         Reviewed by Yury Semikhatsky.
2945
2946         Web Inspector: fix call frames positions in formatted scripts.
2947         https://bugs.webkit.org/show_bug.cgi?id=57036
2948
2949         Introduce PresentationCallFrame class that encapsulates source mapping details from UI components.
2950
2951         * inspector/front-end/CallStackSidebarPane.js:
2952         (WebInspector.CallStackSidebarPane.prototype.update.didGetSourceLocation):
2953         (WebInspector.CallStackSidebarPane.prototype.update):
2954         (WebInspector.CallStackSidebarPane.prototype.set selectedCallFrame):
2955         (WebInspector.CallStackSidebarPane.prototype._placardSelected):
2956         (WebInspector.CallStackSidebarPane.prototype._contextMenu):
2957         (WebInspector.CallStackSidebarPane.prototype._copyStackTrace):
2958         * inspector/front-end/DebuggerModel.js:
2959         (WebInspector.DebuggerModel.prototype._didEditScriptSource):
2960         (WebInspector.DebuggerModel.prototype.get debuggerPausedDetails):
2961         (WebInspector.DebuggerModel.prototype._pausedScript):
2962         * inspector/front-end/DebuggerPresentationModel.js:
2963         (WebInspector.DebuggerPresentationModel):
2964         (WebInspector.DebuggerPresentationModel.prototype.editScriptSource.didEditScriptSource):
2965         (WebInspector.DebuggerPresentationModel.prototype.editScriptSource):
2966         (WebInspector.DebuggerPresentationModel.prototype.toggleFormatSourceFiles):
2967         (WebInspector.DebuggerPresentationModel.prototype._debuggerPaused):
2968         (WebInspector.DebuggerPresentationModel.prototype._debuggerResumed):
2969         (WebInspector.DebuggerPresentationModel.prototype.set selectedCallFrame):
2970         (WebInspector.DebuggerPresentationModel.prototype.get selectedCallFrame):
2971         (WebInspector.DebuggerPresentationModel.prototype._reset):
2972         (WebInspector.PresenationCallFrame): Call frame wrapper for UI.
2973         * inspector/front-end/ScriptsPanel.js:
2974         (WebInspector.ScriptsPanel):
2975         (WebInspector.ScriptsPanel.prototype.evaluateInSelectedCallFrame):
2976         (WebInspector.ScriptsPanel.prototype._debuggerPaused.else.didGetSourceLocation):
2977         (WebInspector.ScriptsPanel.prototype._debuggerPaused):
2978         (WebInspector.ScriptsPanel.prototype._debuggerResumed):
2979         (WebInspector.ScriptsPanel.prototype._sourceFrameLoaded):
2980         (WebInspector.ScriptsPanel.prototype._callFrameSelected.didGetSourceLocation):
2981         (WebInspector.ScriptsPanel.prototype._callFrameSelected):
2982         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.evaluateInSelectedCallFrame):
2983         * inspector/front-end/SourceFile.js:
2984         (WebInspector.SourceFile.prototype.get content):
2985         * inspector/front-end/SourceFrame.js:
2986         (WebInspector.SourceFrame.prototype._createTextViewer):
2987         (WebInspector.SourceFrame.prototype.setExecutionLine):
2988         (WebInspector.SourceFrame.prototype.clearExecutionLine):
2989         (WebInspector.SourceFrame.prototype._showPopup.showObjectPopup):
2990         (WebInspector.SourceFrame.prototype._showPopup):
2991
2992 2011-03-29  Emil A Eklund  <eae@chromium.org>
2993
2994         Reviewed by Darin Adler.
2995
2996         Fix for execCommand("Delete") with an empty selection.
2997         https://bugs.webkit.org/show_bug.cgi?id=56652
2998
2999         Test: editing/execCommand/delete-empty-container.html
3000
3001         * editing/TypingCommand.cpp:
3002         (WebCore::TypingCommand::makeEditableRootEmpty): Add check for root element.
3003
3004 2011-03-29  Mikhail Naganov  <mnaganov@chromium.org>
3005
3006         Reviewed by Pavel Feldman.
3007
3008         Web Inspector: [Chromium] Refactor HeapSnapshot-related code to
3009         make sure we don't return big amounts of data to forms.
3010         https://bugs.webkit.org/show_bug.cgi?id=57227
3011
3012         * inspector/front-end/DetailedHeapshotGridNodes.js:
3013         (WebInspector.HeapSnapshotGridNode.prototype.populateChildren):
3014         (WebInspector.HeapSnapshotGenericObjectNode.prototype.get _countPercent):
3015         (WebInspector.HeapSnapshotObjectNode):
3016         (WebInspector.HeapSnapshotObjectNode.prototype._createProvider):
3017         (WebInspector.HeapSnapshotInstanceNode):
3018         (WebInspector.HeapSnapshotInstanceNode.prototype._createProvider):
3019         (WebInspector.HeapSnapshotConstructorNode.prototype._createNodesProvider):
3020         (WebInspector.HeapSnapshotConstructorNode.prototype.get _countPercent):
3021         (WebInspector.HeapSnapshotDiffNode.prototype._createNodesProvider.createProvider):
3022         (WebInspector.HeapSnapshotDiffNode.prototype._createNodesProvider):
3023         (WebInspector.HeapSnapshotDominatorObjectNode.prototype._createProvider):
3024         * inspector/front-end/DetailedHeapshotView.js:
3025         (WebInspector.HeapSnapshotContainmentDataGrid.prototype.setDataSource):
3026         (WebInspector.HeapSnapshotDominatorsDataGrid.prototype.setDataSource):
3027         * inspector/front-end/HeapSnapshot.js:
3028         (WebInspector.HeapSnapshotNode.prototype.get dominatorIndex):
3029         (WebInspector.HeapSnapshotNode.prototype.get retainers):
3030         (WebInspector.HeapSnapshot):
3031         (WebInspector.HeapSnapshot.prototype.get _allNodes):
3032         (WebInspector.HeapSnapshot.prototype.get nodeCount):
3033         (WebInspector.HeapSnapshot.prototype.get rootNodeIndex):
3034         (WebInspector.HeapSnapshot.prototype.hasId):
3035         (WebInspector.HeapSnapshot.prototype.get nodeIds):
3036         (WebInspector.HeapSnapshot.prototype._retainersForNode):
3037         (WebInspector.HeapSnapshot.prototype._buildRetainers):
3038         (WebInspector.HeapSnapshot.prototype._buildAggregates):
3039         (WebInspector.HeapSnapshot.prototype._buildAggregatesIndexes):
3040         (WebInspector.HeapSnapshot.prototype._buildIdsList):
3041         (WebInspector.HeapSnapshot.prototype._buildNodeIndex):
3042         (WebInspector.HeapSnapshotFilteredOrderedIterator):
3043         (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.next):
3044         (WebInspector.HeapSnapshotEdgesProvider):
3045         (WebInspector.HeapSnapshotNodesProvider):
3046
3047 2011-03-29  Mikhail Naganov  <mnaganov@chromium.org>
3048
3049         Reviewed by Pavel Feldman.
3050
3051         Web Inspector: [Chromium] Fix detailed heap snapshots UI.
3052         https://bugs.webkit.org/show_bug.cgi?id=57235
3053
3054         Fix two problems:
3055           1. Text color of grid cells under selection needs to be white, otherwise it's unreadable for some colors;
3056           2. Long strings need to be truncated in grid, their contents can be shown on hover.
3057
3058         * inspector/front-end/DetailedHeapshotView.js:
3059         (WebInspector.DetailedHeapshotView.prototype._getHoverAnchor):
3060         (WebInspector.DetailedHeapshotView.prototype._showStringContentPopup):
3061         * inspector/front-end/heapProfiler.css:
3062         (.detailed-heapshot-view .console-formatted-string):
3063         (.detailed-heapshot-view .data-grid tr.selected *):
3064         (.detailed-heapshot-view .data-grid:focus tr.selected *):
3065
3066 2011-03-29  Andrey Adaikin  <aandrey@google.com>
3067
3068         Reviewed by Yury Semikhatsky.
3069
3070         Web Inspector: Highlight visible lines first
3071         https://bugs.webkit.org/show_bug.cgi?id=57013
3072
3073         * inspector/front-end/TextViewer.js:
3074         (WebInspector.TextEditorChunkedPanel.prototype._findFirstVisibleChunkNumber):
3075         (WebInspector.TextEditorChunkedPanel.prototype._findVisibleChunks):
3076         (WebInspector.TextEditorChunkedPanel.prototype._findFirstVisibleLineNumber.compareLineRowOffsetTops):
3077         (WebInspector.TextEditorChunkedPanel.prototype._findFirstVisibleLineNumber):
3078         (WebInspector.TextEditorMainPanel.prototype._paintScheduledLines):
3079         (WebInspector.TextEditorMainPanel.prototype._paintLines):
3080         (WebInspector.TextEditorMainPanel.prototype._paintLineChunks):
3081         (WebInspector.TextEditorMainPanel.prototype._paintLine):
3082         (WebInspector.TextEditorMainChunk.prototype.set expanded):
3083
3084 2011-03-29  Emil A Eklund  <eae@chromium.org>
3085
3086         Reviewed by Dimitri Glazkov.
3087
3088         Relative mouse coordinates recalculated for each target
3089         https://bugs.webkit.org/show_bug.cgi?id=57130
3090
3091         Calculate relative coordinates lazily for mouse events instead of doing
3092         it for each target. Speeds up dispatching of mouse events in deep dom
3093         structures significantly, O(n^2) to O(n).
3094
3095         Also fixes https://bugs.webkit.org/show_bug.cgi?id=34973
3096
3097         Tests: fast/events/mouse-relative-position.html
3098                perf/mouse-event.html
3099
3100         * dom/Event.cpp:
3101         (WebCore::Event::setTarget):
3102         * dom/MouseRelatedEvent.cpp:
3103         (WebCore::MouseRelatedEvent::MouseRelatedEvent):
3104         (WebCore::MouseRelatedEvent::initCoordinates):
3105         (WebCore::pageZoomFactor):
3106         (WebCore::MouseRelatedEvent::receivedTarget):
3107         (WebCore::MouseRelatedEvent::computeRelativePosition):
3108         (WebCore::MouseRelatedEvent::layerX):
3109         (WebCore::MouseRelatedEvent::layerY):
3110         (WebCore::MouseRelatedEvent::offsetX):
3111         (WebCore::MouseRelatedEvent::offsetY):
3112         * dom/MouseRelatedEvent.h:
3113         * dom/UIEvent.cpp:
3114         (WebCore::UIEvent::layerX):
3115         (WebCore::UIEvent::layerY):
3116         * dom/UIEvent.h:
3117
3118 2011-03-29  Emil A Eklund  <eae@chromium.org>
3119
3120         Reviewed by Darin Adler.
3121
3122         getComputedStyle counterIncrement crash @ WebCore::counterToCSSValue
3123         https://bugs.webkit.org/show_bug.cgi?id=57266
3124
3125         Add null check to counterToCSSValue.
3126
3127         Test: fast/css/getComputedStyle/counterIncrement-without-counter.html
3128
3129         * css/CSSComputedStyleDeclaration.cpp:
3130         (WebCore::counterToCSSValue):
3131
3132 2011-03-29  Gavin Peters  <gavinp@chromium.org>
3133
3134         Reviewed by Tony Gentilcore.
3135
3136         Implement onerror events for <link rel=prefetch>
3137         https://bugs.webkit.org/show_bug.cgi?id=57182
3138
3139         These events are equired on link elements, see
3140         http://dev.w3.org/html5/spec/Overview.html#the-link-element
3141
3142         After a discussion in WebKit-dev about the direction of prefetch in the loader, and about a path
3143         to adding the Link header, we decided to look at making onerror, onload and onbeforeload events
3144         more uniformly supported.  See the thread at
3145         https://lists.webkit.org/pipermail/webkit-dev/2011-February/016034.html .
3146
3147         It turned out that part of adding onerror for link prefetch was to make the top CachedResource less
3148         abstract.  It was pure virtual until prefetch became the first consumer to use an unspecialised
3149         implementation, and this CL continues that by adding a default checkNotify method to it.  As it
3150         happens there were already two subclasses using what amounted to the generic checkNotify, so I
3151         also removed those, buying us some code cleanup with the change.
3152
3153         Test: fast/dom/HTMLLinkElement/prefetch-onerror.html
3154
3155         * html/HTMLLinkElement.cpp:
3156         (WebCore::HTMLLinkElement::parseMappedAttribute):
3157         (WebCore::HTMLLinkElement::onloadTimerFired):
3158         (WebCore::HTMLLinkElement::notifyFinished):
3159         * loader/cache/CachedImage.cpp:
3160         * loader/cache/CachedImage.h:
3161         * loader/cache/CachedResource.cpp:
3162         (WebCore::CachedResource::checkNotify):
3163         (WebCore::CachedResource::data):
3164         (WebCore::CachedResource::error):
3165         * loader/cache/CachedResource.h:
3166         * loader/cache/CachedScript.cpp:
3167         * loader/cache/CachedScript.h:
3168
3169 2011-03-29  Eric Seidel  <eric@webkit.org>
3170
3171         Reviewed by Ryosuke Niwa.
3172
3173         Add support for parsing unicode-bidi: -webkit-isolate
3174         https://bugs.webkit.org/show_bug.cgi?id=57181
3175
3176         Test: css3/unicode-bidi-insolate-parse.html
3177
3178         * WebCore.xcodeproj/project.pbxproj:
3179         * css/CSSParser.cpp:
3180         (WebCore::CSSParser::parseValue):
3181         * css/CSSPrimitiveValueMappings.h:
3182         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3183         (WebCore::CSSPrimitiveValue::operator EUnicodeBidi):
3184         * css/CSSValueKeywords.in:
3185         * rendering/style/RenderStyleConstants.h:
3186
3187 2011-03-29  Patrick Gansterer  <paroga@webkit.org>
3188
3189         Unreviewed WinCE build fix for r82193.
3190
3191         * platform/wince/FileSystemWinCE.cpp:
3192         (WebCore::openTemporaryFile):
3193
3194 2011-03-28  Sheriff Bot  <webkit.review.bot@gmail.com>
3195
3196         Unreviewed, rolling out r82198.
3197         http://trac.webkit.org/changeset/82198
3198         https://bugs.webkit.org/show_bug.cgi?id=57304
3199
3200         Broke Chromium Win build. (Requested by dave_levin on
3201         #webkit).
3202
3203         * platform/image-decoders/png/PNGImageDecoder.cpp:
3204         (WebCore::PNGImageDecoder::headerAvailable):
3205         (WebCore::PNGImageDecoder::rowAvailable):
3206
3207 2011-03-28  Ofri Wolfus  <ofri@google.com>
3208
3209         Reviewed by Eric Seidel.
3210
3211         RTL: Select elements with a size attribute are always left aligned.
3212         https://bugs.webkit.org/show_bug.cgi?id=50928
3213
3214         Added support for alignment in RenderListBox.
3215
3216         Test: fast/forms/listbox-bidi-align.html
3217
3218         * rendering/RenderListBox.cpp:
3219         (WebCore::itemOffsetForAlignment):
3220         (WebCore::RenderListBox::paintItemForeground): Add support for alignment and directionality.
3221
3222 2011-03-28  Kwang Yul Seo  <skyul@company100.net>
3223
3224         Reviewed by Benjamin Poulain.
3225
3226         [Qt] Change TextureMapperVideoLayer to TextureMapperMediaLayer
3227         https://bugs.webkit.org/show_bug.cgi?id=57142
3228
3229         TextureMapperMediaLayer is a better name here because both video and plugins use this layer.
3230         Remove ENABLE(VIDEO) guard.
3231
3232         * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
3233         * platform/graphics/qt/MediaPlayerPrivateQt.h:
3234         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
3235         (WebCore::GraphicsLayerTextureMapper::setContentsToMedia):
3236         * platform/graphics/texmap/TextureMapperNode.h:
3237         * platform/graphics/texmap/TextureMapperPlatformLayer.h:
3238         (WebCore::TextureMapperMediaLayer::layerType):
3239
3240 2011-03-28  Thomas Klausner  <tk@giga.or.at>
3241
3242         Reviewed by David Levin.
3243
3244         png-1.5 fixes
3245         https://bugs.webkit.org/show_bug.cgi?id=54406
3246
3247         Fix compilation with png-1.5: struct members were hidden, and
3248         a new API to terminate data processing was added (especially for
3249         WebKit).
3250
3251         Compilation fixes, so no new tests.
3252
3253         * platform/image-decoders/png/PNGImageDecoder.cpp:
3254         (WebCore::PNGImageDecoder::headerAvailable):
3255         (WebCore::PNGImageDecoder::rowAvailable):
3256
3257 2011-03-28  Kwang Yul Seo  <skyul@company100.net>
3258
3259         Reviewed by Adam Barth.
3260
3261         Replace fprintf(stderr, ...) with LOG_ERROR
3262         https://bugs.webkit.org/show_bug.cgi?id=57216
3263
3264         LOG_ERROR is a better choice here.
3265
3266         * bridge/jni/v8/JavaClassV8.cpp:
3267         (JavaClass::JavaClass):
3268
3269 2011-03-28  Steve Block  <steveblock@google.com>
3270
3271         Reviewed by Jeremy Orlow.
3272
3273         Add a new JavaValue to type to represent a Java value in the Java bridge
3274         https://bugs.webkit.org/show_bug.cgi?id=57022
3275
3276         This change introduces a new JavaValue type and uses it in place of jvalue
3277         in the conversions to and from JavaNPObject used in the V8 Java bridge.
3278
3279         Refactoring only, no new tests.
3280
3281         * WebCore.gypi:
3282         * bridge/jni/JNIUtility.cpp:
3283         (JSC::Bindings::javaTypeFromClassName):
3284         (JSC::Bindings::signatureFromJavaType):
3285         (JSC::Bindings::getJNIField):
3286         (JSC::Bindings::callJNIMethod):
3287         * bridge/jni/JavaType.h:
3288         * bridge/jni/v8/JNIUtilityPrivate.cpp:
3289         (JSC::Bindings::convertNPVariantToJavaValue):
3290         (JSC::Bindings::convertJavaValueToNPVariant):
3291         (JSC::Bindings::jvalueToJavaValue):
3292         (JSC::Bindings::javaValueToJvalue):
3293         * bridge/jni/v8/JNIUtilityPrivate.h:
3294         * bridge/jni/v8/JavaNPObjectV8.cpp:
3295         (JSC::Bindings::JavaNPObjectInvoke):
3296         (JSC::Bindings::JavaNPObjectGetProperty):
3297         * bridge/jni/v8/JavaValueV8.h: Added.
3298         (JSC::Bindings::JavaValue::JavaValue):
3299
3300 2011-03-28  Patrick Gansterer  <paroga@webkit.org>
3301
3302         Reviewed by Darin Adler.
3303
3304         Use String instead of CString as return value of openTemporaryFile
3305         https://bugs.webkit.org/show_bug.cgi?id=55332
3306
3307         We usually store all paths as UTF-16. Do this for temporary files too.
3308
3309         * WebCore.exp.in
3310         * platform/FileSystem.h:
3311         * platform/android/FileSystemAndroid.cpp:
3312         * platform/brew/FileSystemBrew.cpp:
3313         * platform/efl/FileSystemEfl.cpp:
3314         * platform/gtk/FileSystemGtk.cpp:
3315         * platform/haiku/FileSystemHaiku.cpp:
3316         * platform/mac/FileSystemMac.mm:
3317         * platform/qt/FileSystemQt.cpp:
3318         * platform/win/FileSystemWin.cpp:
3319         * platform/wince/FileSystemWinCE.cpp:
3320         * platform/wx/FileSystemWx.cpp:
3321         * plugins/PluginStream.cpp:
3322         (WebCore::PluginStream::destroyStream):
3323         * plugins/PluginStream.h:
3324
3325 2011-03-28  Jeff Johnson  <opendarwin@lapcatsoftware.com>
3326
3327         Reviewed by Pavel Feldman.
3328
3329         Web Inspector: empty, non-functional window
3330         https://bugs.webkit.org/show_bug.cgi?id=56354
3331
3332         Check whether DOM local storage is enabled
3333         before attempting to access window.localStorage.
3334
3335         No new tests.
3336
3337         * inspector/front-end/Settings.js:
3338         (WebInspector.Settings.prototype.findSettingForAllProjects):
3339         (WebInspector.Settings.prototype._get):
3340         (WebInspector.Settings.prototype._set):
3341
3342 2011-03-28  Beth Dakin  <bdakin@apple.com>
3343
3344         Reviewed by Darin Adler.
3345
3346         Fix for https://bugs.webkit.org/show_bug.cgi?id=57286 Alternative fix for: 
3347         Horizontal scroller stops appearing after going Forward
3348         -and corresponding-
3349         <rdar://problem/9026946>
3350
3351         This patch rolls out revision 79053 and fixes the same bug in a  better way.
3352
3353         New function resetScrollbarsAndClearContentsSize() calls resetScrollbars() and then 
3354         sets the contents size to 0. This is called when a document is going into the page 
3355         cache.
3356         * dom/Document.cpp:
3357         (WebCore::Document::setInPageCache):
3358         (WebCore::FrameView::resetScrollbarsAndClearContentsSize):
3359
3360         Roll-out of 79053.
3361         * history/CachedFrame.cpp:
3362         (WebCore::CachedFrameBase::restore):
3363         * page/FrameView.cpp:
3364         (WebCore::FrameView::FrameView):
3365         (WebCore::FrameView::reset):
3366         (WebCore::FrameView::layout):
3367         * page/FrameView.h:
3368
3369 2011-03-28  Ojan Vafai  <ojan@chromium.org>
3370
3371         Reviewed by Antti Koivisto.
3372
3373         fix style sharing with :any and sibling selectors
3374         https://bugs.webkit.org/show_bug.cgi?id=57211
3375
3376         Test: fast/css/sibling-selectors.html
3377
3378         * css/CSSStyleSelector.cpp:
3379         (WebCore::collectFeaturesFromList):
3380
3381 2011-03-27  Ojan Vafai  <ojan@chromium.org>
3382
3383         Reviewed by Antti Koivisto.
3384
3385         fix :-webkit-any(:last-child)
3386         https://bugs.webkit.org/show_bug.cgi?id=57207
3387
3388         We were passing the wrong arguments to checkSelector. Also, we were not
3389         passing through the encounteredLink bool.
3390
3391         * css/CSSStyleSelector.cpp:
3392         (WebCore::CSSStyleSelector::SelectorChecker::checkSelector):
3393         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
3394         * css/CSSStyleSelector.h:
3395
3396 2011-03-27  Ojan Vafai  <ojan@chromium.org>
3397
3398         Reviewed by Antti Koivisto.
3399
3400         fix :-webkit-any(:last-child)
3401         https://bugs.webkit.org/show_bug.cgi?id=57207
3402
3403         We were passing the wrong arguments to checkSelector. Also, we were not
3404         passing through the encounteredLink bool.
3405
3406         * css/CSSStyleSelector.cpp:
3407         (WebCore::CSSStyleSelector::SelectorChecker::checkSelector):
3408         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
3409         * css/CSSStyleSelector.h:
3410
3411 2011-03-28  Maciej Stachowiak  <mjs@apple.com>
3412
3413         Reviewed by Darin Adler.
3414
3415         REGRESSION(r82152): fast/dom/HTMLAnchorElement/set-href-attribute-pathname.html
3416         https://bugs.webkit.org/show_bug.cgi?id=57291
3417
3418         * platform/KURL.cpp:
3419         (WebCore::KURL::parse): Instead of considering URLs with
3420         credentials but no host invalid, consider them to have a host
3421         ending in @ (which fails down the line)/
3422
3423 2011-03-28  Kent Tamura  <tkent@chromium.org>
3424
3425         Reviewed by Dimitri Glazkov.
3426
3427         Fix some problems of the appearance of form validation message bubble.
3428         https://bugs.webkit.org/show_bug.cgi?id=57208
3429
3430         No new tests. Validation message bubble appearance is not testable
3431         because it depends on a timer.
3432
3433         * css/html.css:
3434         (::-webkit-validation-bubble):
3435         (::-webkit-validation-bubble-message):
3436         (::-webkit-validation-bubble-arrow):
3437         (::-webkit-validation-bubble-arrow-clipper):
3438           - Explicitly set margin, padding, and color.
3439           - Make the shadow darker.
3440           - Make the background color darker.
3441           - Make opacity larger.
3442           - Make the border color lighter.
3443           - Add inset shadows
3444           - Change the implementation of an arrow.
3445             Stop making a right triangle by the border trick.
3446             Use -webkit-transform instead.
3447           - Make min-width workable by changing display property of
3448             -webkit-validation-bubble to "inline-block".
3449         * html/ValidationMessage.cpp:
3450         (WebCore::ValidationMessage::buildBubbleTree):
3451           Change the node structure. Before this change, -webkit-validation-bubble
3452           had three DIVs inside. After this change, it has two DIVs;
3453           -webkit-validation-bubble-arrow-clipper and
3454           -webkit-validation-bubble-message, and
3455           -webkit-validation-bubble-arrow-clipper contains
3456           -webkit-validation-bubble-arrow.
3457
3458 2011-03-28  Enrica Casucci  <enrica@apple.com>
3459
3460         Reviewed by Sam Weinig.
3461
3462         REGRESSION: Can't enter pasted with context or Edit menu text in search or address field in the browser.
3463         https://bugs.webkit.org/show_bug.cgi?id=57275
3464         <rdar://problem/8246691>
3465
3466         We need to classify cut and paste actions as user typing actions even when
3467         the action is triggered by a context menu selection to
3468         allow the propagation of the textDidChangeInTextField event.
3469
3470         * editing/EditorCommand.cpp:
3471         The following methods have been modified to properly set up
3472         the UserTypingGestureAction when the command source is the
3473         menu or a key binding sequence.
3474         (WebCore::executeCut):
3475         (WebCore::executePaste):
3476         (WebCore::executePasteAndMatchStyle):
3477         (WebCore::executePasteAsPlainText):
3478         (WebCore::executeDelete):
3479         * page/ContextMenuController.cpp:
3480         (WebCore::ContextMenuController::contextMenuItemSelected): Changed to
3481         call execute command instead of referring to the specific method in
3482         the editor class.
3483
3484 2011-03-28  Oliver Hunt  <oliver@apple.com>
3485
3486         Reviewed by Geoffrey Garen.
3487
3488         instanceof Array test fails when using iframes
3489         https://bugs.webkit.org/show_bug.cgi?id=17250
3490
3491         Update for new function and date apis
3492
3493         Test: fast/js/js-constructors-use-correct-global.html
3494
3495         * WebCore.xcodeproj/project.pbxproj:
3496         * bindings/js/JSDOMBinding.cpp:
3497         (WebCore::jsDateOrNull):
3498         * bindings/js/JSLazyEventListener.cpp:
3499         (WebCore::JSLazyEventListener::initializeJSFunction):
3500
3501 2011-03-28  Beth Dakin  <bdakin@apple.com>
3502
3503         Reviewed by Darin Adler.
3504
3505         Fix for https://bugs.webkit.org/show_bug.cgi?id=57124 When the scroller style is 
3506         changed via delegate method, the page needs a full relayout and repaint
3507         -and corresponding-
3508         <rdar://problem/9059129>
3509
3510         Call into WebKitSystemInterface to associate the new painter with the existing 
3511         painter controller. Reset the scrollbar frame rects to the new thickness -- normally 
3512         this only happens when a scrollbar is created, so we have to reset the thickness 
3513         here to pick up the new theme thickness. Finally, force a full relayout and style 
3514         recall with setNeedsRecalcStyleInAllFrames()
3515         * platform/mac/ScrollAnimatorMac.mm:
3516         (-[ScrollbarPainterControllerDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:]):
3517
3518         setNeedsRecalcStyleInAllFrames() used to be a static method in Settings.cpp. This 
3519         patch moves it to be a member function on Page so that it can be called from 
3520         FrameView when the scrollbar style changes.
3521         * page/FrameView.cpp:
3522         (WebCore::FrameView::setNeedsRecalcStyleInAllFrames):
3523         * page/FrameView.h:
3524         * page/Page.cpp:
3525         (WebCore::Page::setNeedsRecalcStyleInAllFrames):
3526         * page/Page.h:
3527         * page/Settings.cpp:
3528         (WebCore::Settings::setStandardFontFamily):
3529         (WebCore::Settings::setFixedFontFamily):
3530         (WebCore::Settings::setSerifFontFamily):
3531         (WebCore::Settings::setSansSerifFontFamily):
3532         (WebCore::Settings::setCursiveFontFamily):
3533         (WebCore::Settings::setFantasyFontFamily):
3534         (WebCore::Settings::setMinimumFontSize):
3535         (WebCore::Settings::setMinimumLogicalFontSize):
3536         (WebCore::Settings::setDefaultFontSize):
3537         (WebCore::Settings::setDefaultFixedFontSize):
3538         (WebCore::Settings::setTextAreasAreResizable):
3539         (WebCore::Settings::setAuthorAndUserStylesEnabled):
3540         (WebCore::Settings::setFontRenderingMode):
3541         (WebCore::Settings::setAcceleratedCompositingEnabled):
3542         (WebCore::Settings::setShowDebugBorders):
3543         (WebCore::Settings::setShowRepaintCounter):
3544         * platform/ScrollableArea.h:
3545         (WebCore::ScrollableArea::setNeedsRecalcStyleInAllFrames):
3546
3547 2011-03-28  Dirk Pranke  <dpranke@chromium.org>
3548
3549         RS=Tony Chang.
3550
3551         r81977 moved FontPlatformData.h from
3552         WebCore/platform/graphics/cocoa to platform/graphics. This
3553         change updates the chromium build accordingly.
3554
3555         https://bugs.webkit.org/show_bug.cgi?id=57281
3556
3557         * platform/graphics/chromium/CrossProcessFontLoading.mm:
3558
3559 2011-03-28  Jer Noble  <jer.noble@apple.com>
3560
3561         Reviewed by Darin Adler.
3562
3563         MediaPlayerPrivateAVFoundation should report that it supportsFullScreen()
3564         https://bugs.webkit.org/show_bug.cgi?id=57249
3565
3566         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
3567         (WebCore::MediaPlayerPrivateAVFoundation::supportsFullscreen):
3568         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
3569
3570 2011-03-28  Jer Noble  <jer.noble@apple.com>
3571
3572         Reviewed by Darin Adler.
3573
3574         AVFoundation can indeed support full screen.
3575
3576         MediaPlayerPrivateAVFoundation should report that it supportsFullScreen()
3577         https://bugs.webkit.org/show_bug.cgi?id=57249
3578
3579         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
3580         (WebCore::MediaPlayerPrivateAVFoundation::supportsFullscreen): Return true if using
3581             the new full screen APIs.
3582         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
3583
3584 2011-03-28  Eric Carlson  <eric.carlson@apple.com>
3585
3586         Reviewed by Darin Adler.
3587
3588         http streams don't always display video with AVFoundation backend
3589         https://bugs.webkit.org/show_bug.cgi?id=57203
3590
3591         No new tests, we don't currently have tests for http live streams. Changes verified manually.
3592
3593         * platform/graphics/MediaPlayer.cpp:
3594         (WebCore::MediaPlayer::MediaPlayer): Initialize m_shouldPrepareToRender.
3595         (WebCore::MediaPlayer::loadWithNextMediaEngine): Call prepareForRendering on new engine
3596             if m_shouldPrepareToRender is set.
3597         (WebCore::MediaPlayer::prepareForRendering): Set m_shouldPrepareToRender.
3598         * platform/graphics/MediaPlayer.h:
3599
3600         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
3601         (WebCore::MediaPlayerPrivateAVFoundation::isReadyForVideoSetup): Don't return true until
3602             m_isAllowedToRender has been set.
3603         (WebCore::MediaPlayerPrivateAVFoundation::prepareForRendering): Always call setUpVideoRendering,
3604             it has logic to figure out when setup is required.
3605         (WebCore::MediaPlayerPrivateAVFoundation::updateStates): Call setUpVideoRendering when we aren't
3606             using the preferred rendering mode because if we get a file's metadata between the
3607             time supportsAcceleratedRendering() and paint() are called, we will allocate a software
3608             renderer even when we prefer a layer backed renderer.
3609         (WebCore::MediaPlayerPrivateAVFoundation::movieLoadType): Return "unknown" until we have metadata.
3610
3611         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h:
3612         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
3613         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): Use itemKVOProperties() instead of
3614             an explicit list of key path names.
3615         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerForURL): Ditto.
3616         (WebCore::MediaPlayerPrivateAVFoundationObjC::beginLoadingMetadata): metadataKeyNames renamed
3617             to assetMetadataKeyNames, return an NSArray instead of a CFArrayRef since that is what the
3618             callers need.
3619         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration): Return the duration of the 
3620             player item, not the asset, because AVAsset.duration always returns an indefinite time
3621             for all streaming files.
3622         (WebCore::MediaPlayerPrivateAVFoundationObjC::assetStatus): metadataKeyNames renamed
3623             to assetMetadataKeyNames.
3624         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintCurrentFrameInContext): Do nothing until
3625             metadata is available.
3626         (WebCore::MediaPlayerPrivateAVFoundationObjC::paint): Ditto.
3627         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Split size calculation logic off
3628             into sizeChanged().
3629         (WebCore::MediaPlayerPrivateAVFoundationObjC::sizeChanged): New. Use AVPlayerItem.presentationSize
3630             until tracks is non-NULL so we have a size as early as possible.
3631         (WebCore::MediaPlayerPrivateAVFoundationObjC::assetMetadataKeyNames): Renamed from metadataKeyNames.
3632         (WebCore::MediaPlayerPrivateAVFoundationObjC::itemKVOProperties): New, return an array of
3633             KVO observable properties.
3634         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): Respond to 
3635             presentationSize change.
3636
3637 2011-03-28  Anders Carlsson  <andersca@apple.com>
3638
3639         Reviewed by Sam Weinig.
3640
3641         Search field focus ring is missing
3642         https://bugs.webkit.org/show_bug.cgi?id=57270
3643         <rdar://problem/8765555>
3644
3645         Add an _automaticFocusRingDisabled method which returns YES.
3646
3647         * platform/mac/ThemeMac.mm:
3648         (-[WebCoreFlippedView _automaticFocusRingDisabled]):
3649
3650 2011-03-28  Dimitri Glazkov  <dglazkov@chromium.org>
3651
3652         Reviewed by Darin Adler.
3653
3654         Move more events to EventDispatcher.
3655         https://bugs.webkit.org/show_bug.cgi?id=57247
3656
3657         No functional changes, covered by existing tests.
3658
3659         * dom/EventDispatcher.cpp:
3660         (WebCore::eventTargetRespectingSVGTargetRules): Made a static function,
3661             since it's not used anywhere outside of the EventDispatcher.
3662         (WebCore::EventDispatcher::dispatchScopedEvent): Moved from Node.cpp.
3663         (WebCore::EventDispatcher::dispatchKeyEvent): Ditto.
3664         (WebCore::EventDispatcher::dispatchWheelEvent): Ditto.
3665         (WebCore::EventDispatcher::dispatchEvent): Changed to use eventTargetRespectingSVGTargetRules
3666             as a static function.
3667         * dom/EventDispatcher.h: Updated decls.
3668         * dom/Node.cpp:
3669         (WebCore::Node::dispatchScopedEvent): Replaced with calling EventDispatcher.
3670         (WebCore::Node::dispatchKeyEvent): Ditto.
3671         (WebCore::Node::dispatchWheelEvent): Ditto.
3672
3673 2011-03-28  Adele Peterson  <adele@apple.com>
3674
3675         Reviewed by Eric Seidel.
3676
3677         Fix for <rdar://problem/9112694> REGRESSION (r79411): "Check grammar with spelling" context menu doesn't check as you type
3678         https://bugs.webkit.org/show_bug.cgi?id=57173
3679
3680         Test: editing/spelling/grammar.html
3681
3682         * WebCore.exp.in: Add symbol for new selectionStartHasMarkerFor method.
3683         * editing/Editor.cpp:
3684         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): Every use of paragraph is specific to spelling or grammar, 
3685          so to avoid confusion, we should explicitly use spellingParagraph or grammarParagraph.  In the case of this bug, 
3686          when we're consider ambiguous boundary characters (characters that could indicate word boundaries, but are used 
3687          in the middle of words too, like apostrophes), we should use the use the spellingParagraph since the spellingParagraph 
3688          is the only one operated on when this information is used.
3689          (WebCore::Editor::selectionStartHasMarkerFor): Changed from selectionStartHasSpellingMarkerFor so it can check for grammar as well as spelling.
3690         * editing/Editor.h:
3691
3692 2011-03-28  Dan Bernstein  <mitz@apple.com>
3693
3694         Reviewed by Darin Adler.
3695
3696         <rdar://problem/8895977> REGRESSION: multicol crashes with positioned elements
3697         https://bugs.webkit.org/show_bug.cgi?id=48983
3698
3699         Test: fast/multicol/paginated-layer-crash.html
3700
3701         * rendering/RenderLayer.cpp:
3702         (WebCore::RenderLayer::paintPaginatedChildLayer): Bring the logic for finding pagintating layers
3703         into sync with updatePagination() after r68069.
3704         (WebCore::RenderLayer::hitTestPaginatedChildLayer): Ditto.
3705
3706 2011-03-28  Maciej Stachowiak  <mjs@apple.com>
3707
3708         Reviewed by Darin Adler' .
3709
3710         URLSs with non-empty username but empty hostname treat first path segment as hostname, potentially enabling XSS
3711         https://bugs.webkit.org/show_bug.cgi?id=57220
3712
3713         Test: http/tests/uri/username-with-no-hostname.html
3714
3715         * platform/KURL.cpp:
3716         (WebCore::hostPortIsEmptyButUserPassIsNot):
3717         (WebCore::KURL::parse):
3718
3719 2011-03-28  Adam Barth  <abarth@webkit.org>
3720
3721         Reviewed by Eric Seidel.
3722
3723         script-src should block inline event handlers
3724         https://bugs.webkit.org/show_bug.cgi?id=57212
3725
3726         I considered wrapping this into the canExecute check, but that approach
3727         would require passing that function a bunch of context information to
3728         behave correctly once we add support for the "options" directive that
3729         re-enables these features.
3730
3731         Test: http/tests/security/contentSecurityPolicy/script-src-none-inline-event.html
3732
3733         * bindings/js/JSLazyEventListener.cpp:
3734         (WebCore::JSLazyEventListener::initializeJSFunction):
3735             - This function was a mess.  I couldn't resist cleaning it up a
3736               bunch.  Notice that we ASSERT at the beginning of the function
3737               that scriptExecutionContext is a document and that both ways of
3738               getting the global object are the same when document->frame() is
3739               non-zero because the document must be active and there is a
3740               one-to-one relation between Frames and active Documents.
3741         * bindings/v8/V8LazyEventListener.cpp:
3742         (WebCore::V8LazyEventListener::prepareListenerObject):
3743         * page/ContentSecurityPolicy.cpp:
3744         (WebCore::ContentSecurityPolicy::allowInlineEventHandlers):
3745         * page/ContentSecurityPolicy.h:
3746
3747 2011-03-28  Jeff Miller  <jeffm@apple.com>
3748
3749         Reviewed by Adam Roben.
3750
3751         ResourceError::certificate() should return a PCCERT_CONTEXT
3752         https://bugs.webkit.org/show_bug.cgi?id=57262
3753
3754         * platform/network/cf/ResourceError.h: certificate() now returns a PCCERT_CONTEXT.
3755         * platform/network/cf/ResourceErrorCF.cpp:
3756         (WebCore::ResourceError::certificate): Added.
3757
3758 2011-03-28  David Hyatt  <hyatt@apple.com>
3759
3760         Reviewed by Simon Fraser and Darin Adler.
3761
3762         https://bugs.webkit.org/show_bug.cgi?id=57221, memory corruption/crashes when positioned objects
3763         occur at the end of a line.
3764         
3765         The old code and new code for dealing with a trailing space object midpoint manipulated a raw
3766         array instead of the Vector. Otherwise this corruption would have been caught prior to check-in.
3767         
3768         I have patched the code to only go through the Vector and to make it handle the case that led to
3769         the corruption. Trailing positioned objects can occur both prior to and following the trailing space
3770         object's midpoint, so we have to be prepared to deal with both cases.
3771         
3772         This is already tested by fast/block/positioning/052.html, and that test now properly progresses
3773         like the other positioning tests did.
3774
3775         * rendering/RenderBlockLineLayout.cpp:
3776         (WebCore::RenderBlock::findNextLineBreak):
3777
3778 2011-03-28  Andrei Popescu  <andreip@google.com>
3779
3780         Reviewed by Steve Block.
3781
3782         V8IDBKeyCustom.cpp does not compile with INDEXED_DATABASE disabled
3783         https://bugs.webkit.org/show_bug.cgi?id=57100
3784
3785         Close the ENABLE guard and the namespace in the right order.
3786
3787         No new tests, just cleanup.
3788
3789         * bindings/v8/custom/V8IDBAnyCustom.cpp:
3790         * bindings/v8/custom/V8IDBKeyCustom.cpp:
3791
3792 2011-03-28  Jeff Miller  <jeffm@apple.com>
3793
3794         Reviewed by Adam Roben.
3795
3796         Include certificate when sending a WebCore::ResourceError to UI process on Windows
3797         https://bugs.webkit.org/show_bug.cgi?id=57195
3798
3799         Add support for tracking the certificate in WebCore::ResourceError.
3800
3801         * platform/network/ResourceErrorBase.cpp:
3802         (WebCore::ResourceErrorBase::copy): Call platformCopy() to copy platform-specific fields.
3803         * platform/network/ResourceErrorBase.h:
3804         (WebCore::ResourceErrorBase::platformCopy): Added.
3805         * platform/network/cf/ResourceError.h: Added constructor that takes certificate data, shadowed platformCopy, added m_certificate.
3806         (WebCore::ResourceError::certificate): Added.
3807         * platform/network/cf/ResourceErrorCF.cpp:
3808         (WebCore::ResourceError::ResourceError): Added constructor that takes certificate data.
3809         (WebCore::ResourceError::platformLazyInit): Read any certificate from the userInfo dictionary.
3810         (WebCore::ResourceError::platformCopy): Copy m_certificate.
3811         (WebCore::ResourceError::cfError): Add any certificate data to the userInfo dictionary in the CFErrorRef.
3812
3813 2011-03-28  Jessie Berlin  <jberlin@apple.com>
3814
3815         Rubber-stamped by Adam Roben.
3816
3817         Add an extra newline to the end of the generated Inspector.idl file so that it does not
3818         trigger the Windows "no newline at at end of file" warning.
3819
3820         * inspector/generate-inspector-idl:
3821
3822 2011-03-28  Csaba Osztrogon√°c  <ossy@webkit.org>
3823
3824         Buildfix after r82125.
3825
3826         [Qt] QtWebKit will not compile with QT_ASCII_CAST_WARNINGS enabled
3827         https://bugs.webkit.org/show_bug.cgi?id=57087
3828
3829         * platform/graphics/qt/MediaPlayerPrivateQt.cpp: Convert all char* to QString explicitly.
3830         (WebCore::MediaPlayerPrivateQt::getSupportedTypes):
3831         (WebCore::MediaPlayerPrivateQt::commitLoad):
3832
3833 2011-03-28  Sheriff Bot  <webkit.review.bot@gmail.com>
3834
3835         Unreviewed, rolling out r82099.
3836         http://trac.webkit.org/changeset/82099
3837         https://bugs.webkit.org/show_bug.cgi?id=57245
3838
3839         Breaks live edits tests on chromium. (Requested by pfeldman on
3840         #webkit).
3841
3842         * inspector/front-end/ScriptsPanel.js:
3843         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.editScriptSource):
3844         * inspector/front-end/SourceFrame.js:
3845         (WebInspector.SourceFrame.prototype._handleSave):
3846         (WebInspector.SourceFrameDelegate.prototype.editScriptSource):
3847
3848 2011-03-28  Pavel Feldman  <pfeldman@chromium.org>
3849
3850         Reviewed by Yury Semikhatsky.
3851
3852         Web Inspector: brush up and rename debugger domain functions.
3853         https://bugs.webkit.org/show_bug.cgi?id=57240
3854
3855         * inspector/Inspector.json:
3856         * inspector/InspectorAgent.cpp:
3857         (WebCore::InspectorAgent::setFrontend):
3858         (WebCore::InspectorAgent::postWorkerNotificationToFrontend):
3859         * inspector/InspectorDebuggerAgent.cpp:
3860         (WebCore::InspectorDebuggerAgent::setBreakpointsActive):
3861         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
3862         (WebCore::InspectorDebuggerAgent::setBreakpoint):
3863         (WebCore::InspectorDebuggerAgent::removeBreakpoint):
3864         (WebCore::InspectorDebuggerAgent::editScriptSource):
3865         (WebCore::InspectorDebuggerAgent::setPauseOnExceptionsState):
3866         (WebCore::InspectorDebuggerAgent::didParseSource):
3867         (WebCore::InspectorDebuggerAgent::failedToParseSource):
3868         (WebCore::InspectorDebuggerAgent::didPause):
3869         (WebCore::InspectorDebuggerAgent::didContinue):
3870         * inspector/InspectorDebuggerAgent.h:
3871         * inspector/front-end/DebuggerModel.js:
3872         (WebInspector.DebuggerModel.prototype.setBreakpoint):
3873         (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
3874         (WebInspector.DebuggerModel.prototype.removeBreakpoint):
3875         (WebInspector.DebuggerModel.prototype._didEditScriptSource):
3876         (WebInspector.DebuggerDispatcher.prototype.paused):
3877         (WebInspector.DebuggerDispatcher.prototype.resumed):
3878         (WebInspector.DebuggerDispatcher.prototype.scriptParsed):
3879         (WebInspector.DebuggerDispatcher.prototype.scriptFailedToParse):
3880         (WebInspector.DebuggerDispatcher.prototype.breakpointResolved):
3881         * inspector/front-end/ScriptsPanel.js:
3882         (WebInspector.ScriptsPanel.prototype.toggleBreakpointsClicked):
3883         * inspector/front-end/inspector.js:
3884         (WebInspector.didCreateWorker):
3885         (WebInspector.didDestroyWorker):
3886
3887 2011-03-28  David Kilzer  <ddkilzer@apple.com>
3888
3889         <http://webkit.org/b/57239> Use forward class declaration instead of including header
3890
3891         Reviewed by Dan Bernstein.
3892
3893         Adding a "using namespace WebCore;" statement in a header may
3894         cause issues when <WebCore/Length.h> is included before
3895         <CoreText/CoreText.h>.
3896
3897         Length.h defines the LengthType enum with a 'Fixed' value.
3898         CoreText.h includes MacTypes.h, which has a
3899         "typedef SInt32 Fixed;" statement, and then CoreText.h includes
3900         other headers that also use 'Fixed', but expect the typedef to
3901         be defined, not the enum.  If another header includes
3902         "using namespace WebCore;" before CoreText.h, the
3903         following compiler errors result (paths abbreviated):
3904
3905             CoreText.framework/Headers/SFNTLayoutTypes.h:689: error: reference to 'Fixed' is ambiguous
3906             MacTypes.h:184: error: candidates are: typedef SInt32 Fixed
3907             Length.h:37: error:                 WebCore::LengthType WebCore::Fixed
3908             SFNTLayoutTypes.h:689: error: 'Fixed' does not name a type
3909
3910         * platform/mac/HTMLConverter.h: Use forward declaration of
3911         DocumentLoader class instead of including header.  Remove the
3912         unused "using namespace WebCore;" statement.
3913
3914 2011-03-26  Dimitri Glazkov  <dglazkov@chromium.org>
3915
3916         Reviewed by Eric Seidel.
3917
3918         Introduce EventDispatcher, the new common way to fire events.
3919         https://bugs.webkit.org/show_bug.cgi?id=57168
3920
3921         The goal here is two-fold:
3922         1) reduce the need to randomly sprinkle guards around the dispatch code
3923         by creating a well-scoped abstraction for dispatching events.
3924         2) create a place where fiddly event-related things like creating event
3925         contexts for ancestors can be done lazily.
3926
3927         Additionally, with all the free-standing static functions, this code was
3928         just begging to come out of Node.cpp.
3929
3930         The first step is a near-mechanical extraction of mouse-related events
3931         from Node.cpp to EventDispatcher. For now, the call sites are just
3932         replaced with invoking EventDispatcher. Later, we can remove these methods
3933         from Node.
3934
3935         Refactoring, no functional changes.
3936
3937         * Android.mk: Added EventDispatcher to build system.
3938         * CMakeLists.txt: Ditto.
3939         * GNUmakefile.am: Ditto.
3940         * WebCore.gypi: Ditto.
3941         * WebCore.pro: Ditto.
3942         * WebCore.vcproj/WebCore.vcproj: Ditto.
3943         * WebCore.xcodeproj/project.pbxproj: Ditto.
3944         * dom/DOMAllInOne.cpp: Ditto.
3945         * dom/EventDispatcher.cpp: Added.
3946         * dom/EventDispatcher.h: Added.
3947         * dom/Node.cpp:
3948         (WebCore::Node::dispatchScopedEvent): Replaced to use EventDispatcher.
3949         (WebCore::Node::dispatchEvent): Ditto.
3950         (WebCore::Node::dispatchMouseEvent): Ditto.
3951         (WebCore::Node::dispatchSimulatedClick): Ditto.
3952         * dom/Node.h: Updated decls.
3953
3954 2011-03-28  Dan Bernstein  <mitz@apple.com>
3955
3956         Reviewed by Maciej Stachowiak.
3957
3958         <rdar://problem/9003382> Incomplete repaint of overflow in flipped lines writing modes
3959         https://bugs.webkit.org/show_bug.cgi?id=57197
3960
3961         Tests: fast/repaint/overflow-flipped-writing-mode-block.html
3962                fast/repaint/overflow-flipped-writing-mode-table.html
3963
3964         * rendering/RenderBlock.cpp:
3965         (WebCore::RenderBlock::paint): Flip the overflow rect before testing for intersection
3966         with the damage rect.
3967         * rendering/RenderTable.cpp:
3968         (WebCore::RenderTable::paint): Made the intersection check more like the one in
3969         RenderBlock::paint().
3970
3971 2011-03-28  Xiaomei Ji  <xji@chromium.org>
3972
3973         Reviewed by Ryosuke Niwa.
3974
3975         move directionOfEnclosingBlock() to be global so that it could be reused.
3976         https://bugs.webkit.org/show_bug.cgi?id=57233.
3977
3978         Provide global function directionOfEnclosingBlock(Node*) so that it could be
3979         reused in SelectionController and other functionalities that need enclosing
3980         block's direcionality, such as moving caret by word in visual order.
3981       
3982         No new functionality, so no new tests.
3983
3984         * editing/SelectionController.cpp:
3985         (WebCore::SelectionController::directionOfEnclosingBlock):
3986         * editing/htmlediting.cpp:
3987         (WebCore::directionOfEnclosingBlock):
3988         * editing/htmlediting.h:
3989
3990 2011-03-28  Jarkko Sakkinen  <jarkko.j.sakkinen@gmail.com>
3991
3992         Reviewed by Benjamin Poulain.
3993
3994         [Qt] fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html fails
3995         https://bugs.webkit.org/show_bug.cgi?id=56825
3996
3997         Fixes for context attribute handling:
3998         - Initialize depth and stencil buffer depending on whether they
3999         are enabled in context attributes.
4000         - Always enable depth buffer when stencil buffer is enabled.
4001         - Disable stencil buffer on OpenGL ES 2.0
4002         - Cleaned up clutter code from initialization. Made code paths 
4003         more sane.
4004         - Clear mask is now set correctly in reshape().
4005
4006         Tests: fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html
4007
4008         * platform/graphics/qt/GraphicsContext3DQt.cpp:
4009         (WebCore::GraphicsContext3DInternal::isValid):
4010         (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal):
4011         (WebCore::GraphicsContext3DInternal::reshape):
4012         (WebCore::GraphicsContext3DInternal::paint):
4013         (WebCore::GraphicsContext3DInternal::getProcAddress):
4014         (WebCore::GraphicsContext3D::GraphicsContext3D):
4015         (WebCore::GraphicsContext3D::reshape):
4016         (WebCore::GraphicsContext3D::bindFramebuffer):
4017
4018 2011-03-28  Pavel Feldman  <pfeldman@chromium.org>
4019
4020         Reviewed by Yury Semikhatsky.
4021
4022         Web Inspector: rename network domain events from didHappenSomething to somethingHappened.
4023         https://bugs.webkit.org/show_bug.cgi?id=57226
4024
4025         * inspector/Inspector.json:
4026         * inspector/InspectorResourceAgent.cpp:
4027         (WebCore::InspectorResourceAgent::willSendRequest):
4028         (WebCore::InspectorResourceAgent::markResourceAsCached):
4029         (WebCore::InspectorResourceAgent::didReceiveResponse):
4030         (WebCore::InspectorResourceAgent::didReceiveContentLength):
4031         (WebCore::InspectorResourceAgent::didFinishLoading):
4032         (WebCore::InspectorResourceAgent::didFailLoading):
4033         (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
4034         (WebCore::InspectorResourceAgent::setInitialContent):
4035         (WebCore::InspectorResourceAgent::didCommitLoad):
4036         (WebCore::InspectorResourceAgent::frameDetachedFromParent):
4037         (WebCore::InspectorResourceAgent::didCreateWebSocket):
4038         (WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
4039         (WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
4040         (WebCore::InspectorResourceAgent::didCloseWebSocket):
4041         * inspector/front-end/NetworkManager.js:
4042         (WebInspector.NetworkDispatcher.prototype.requestWillBeSent):
4043         (WebInspector.NetworkDispatcher.prototype.resourceMarkedAsCached):
4044         (WebInspector.NetworkDispatcher.prototype.responseReceived):
4045         (WebInspector.NetworkDispatcher.prototype.dataReceived):
4046         (WebInspector.NetworkDispatcher.prototype.loadingFinished):
4047         (WebInspector.NetworkDispatcher.prototype.loadingFailed):
4048         (WebInspector.NetworkDispatcher.prototype.resourceLoadedFromMemoryCache):
4049         (WebInspector.NetworkDispatcher.prototype.frameDetached):
4050         (WebInspector.NetworkDispatcher.prototype.initialContentSet):
4051         (WebInspector.NetworkDispatcher.prototype.frameNavigated):
4052         (WebInspector.NetworkDispatcher.prototype.webSocketCreated):
4053         (WebInspector.NetworkDispatcher.prototype.webSocketWillSendHandshakeRequest):
4054         (WebInspector.NetworkDispatcher.prototype.webSocketHandshakeResponseReceived):
4055         (WebInspector.NetworkDispatcher.prototype.webSocketClosed):
4056
4057 2011-03-28  Mikhail Naganov  <mnaganov@chromium.org>
4058
4059         Reviewed by Pavel Feldman.
4060
4061         WebInspector: [Chromium] Delete native CPU profiles and heap snapshots on binding disposal.
4062         https://bugs.webkit.org/show_bug.cgi?id=57099
4063
4064         * bindings/v8/ScriptHeapSnapshot.cpp:
4065         (WebCore::ScriptHeapSnapshot::~ScriptHeapSnapshot):
4066         * bindings/v8/ScriptHeapSnapshot.h:
4067         * bindings/v8/ScriptProfile.cpp:
4068         (WebCore::ScriptProfile::~ScriptProfile):
4069         * bindings/v8/ScriptProfile.h:
4070         * inspector/InspectorProfilerAgent.cpp:
4071         (WebCore::InspectorProfilerAgent::resetState):
4072
4073 2011-03-24  Pavel Podivilov  <podivilov@chromium.org>