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