2011-04-06 Andrey Kosyakov <caseq@chromium.org>
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-04-06  Andrey Kosyakov  <caseq@chromium.org>
2
3         Reviewed by Yury Semikhatsky.
4
5         Web Inspector: [Extensions API] remove inspectedPage.* events
6         https://bugs.webkit.org/show_bug.cgi?id=57763
7
8         - Removed webInspector.inspectedPage.* events
9         - moved onNavigated to webInspector.resources
10
11         * inspector/front-end/ExtensionAPI.js:
12         (WebInspector.injectedExtensionAPI):
13         (WebInspector.injectedExtensionAPI.InspectedWindow):
14         * inspector/front-end/ExtensionAPISchema.json:
15         * inspector/front-end/ExtensionServer.js:
16         (WebInspector.ExtensionServer.prototype.notifyInspectedURLChanged):
17         * inspector/front-end/inspector.js:
18         (WebInspector.domContentEventFired):
19         (WebInspector.loadEventFired):
20         (WebInspector.inspectedURLChanged):
21
22 2011-04-06  Joseph Pecoraro  <joepeck@webkit.org>
23
24         Reviewed by Antti Koivisto.
25
26         Add <head> to the simpleUserAgentStyleSheet
27         https://bugs.webkit.org/show_bug.cgi?id=57915
28
29         * css/CSSStyleSelector.cpp:
30         (WebCore::elementCanUseSimpleDefaultStyle): add head to the
31         simple stylesheet, display:none.
32
33 2011-04-05  Mikhail Naganov  <mnaganov@chromium.org>
34
35         Reviewed by Pavel Feldman.
36
37         Web Inspector: [Chromium] Add layout test for Summary view of detailed heap snapshots.
38         https://bugs.webkit.org/show_bug.cgi?id=57856
39
40         Test: inspector/profiler/detailed-heapshots-summary.html
41
42         * inspector/front-end/DataGrid.js:
43         (WebInspector.DataGrid):
44         * inspector/front-end/DetailedHeapshotGridNodes.js:
45         (WebInspector.HeapSnapshotGridNode.prototype._populate.doPopulate):
46         (WebInspector.HeapSnapshotGridNode.prototype._populate):
47         (WebInspector.HeapSnapshotGridNode.prototype.populateChildren):
48         (WebInspector.HeapSnapshotGridNode.prototype.sort.doSort):
49         (WebInspector.HeapSnapshotGridNode.prototype.sort):
50         (WebInspector.HeapSnapshotDiffNode.prototype.populateChildren):
51         * inspector/front-end/DetailedHeapshotView.js:
52         (WebInspector.HeapSnapshotSortableDataGrid.prototype.sortingChanged):
53         * inspector/front-end/ProfilesPanel.js:
54         (WebInspector.ProfilesPanel.prototype._finishHeapSnapshot.doParse):
55         (WebInspector.ProfilesPanel.prototype._finishHeapSnapshot):
56
57 2011-04-06  Anders Bakken  <agbakken@gmail.com>
58
59         Reviewed by David Levin.
60
61         [Qt] SmartReplaceQt.cpp has coding-style errors
62         https://bugs.webkit.org/show_bug.cgi?id=40261
63
64         This patch does not require new test cases.
65
66         * editing/qt/SmartReplaceQt.cpp:
67         (WebCore::isCharacterSmartReplaceExempt):
68
69 2011-04-06  Naoki Takano  <takano.naoki@gmail.com>
70
71         Reviewed by Ryosuke Niwa.
72
73         REGRESSION(r81328): Null pointer crash in canAppendNewLineFeed when selection isn't inside an editable element
74         https://bugs.webkit.org/show_bug.cgi?id=57755
75
76         Test: editing/execCommand/insert-line-break-onload.html
77
78         * editing/TypingCommand.cpp:
79         (WebCore::canAppendNewLineFeed): Added null pointer check for rootEditableElement().
80
81 2011-04-05  Antti Koivisto  <antti@apple.com>
82
83         Reviewed by Cameron Zwarich.
84
85         Avoid calling currentTime() from FrameView::adjustedDeferredRepaintDelay() when repaints are deferred
86         https://bugs.webkit.org/show_bug.cgi?id=57914
87
88         Don't call adjustedDeferredRepaintDelay unnecessarily.
89
90         * page/FrameView.cpp:
91         (WebCore::FrameView::repaintContentRectangle):
92         (WebCore::FrameView::adjustedDeferredRepaintDelay):
93
94 2011-04-05  Steve VanDeBogart  <vandebo@chromium.org>
95
96         Reviewed by David Levin.
97
98         Update call to SkAdvancedTypefaceMetrics to new API.
99         https://bugs.webkit.org/show_bug.cgi?id=57887
100
101         * platform/graphics/chromium/FontPlatformDataLinux.cpp:
102         (WebCore::FontPlatformData::emSizeInFontUnits):
103
104 2011-04-05  Alexey Proskuryakov  <ap@apple.com>
105
106         Reviewed by Darin Adler.
107
108         Rename event dispatching functions after form event removal
109         https://bugs.webkit.org/show_bug.cgi?id=57908
110
111         * dom/InputElement.cpp:
112         (WebCore::InputElement::setValueFromRenderer):
113         * dom/Node.cpp:
114         (WebCore::Node::dispatchChangeEvent):
115         (WebCore::Node::dispatchInputEvent):
116         (WebCore::Node::defaultEventHandler):
117         * dom/Node.h:
118         * html/HTMLFormControlElement.cpp:
119         (WebCore::HTMLFormControlElement::dispatchFormControlChangeEvent):
120         (WebCore::HTMLFormControlElement::dispatchFormControlInputEvent):
121         (WebCore::HTMLTextFormControlElement::dispatchFormControlChangeEvent):
122         Renamed "events" to "event", since there is only one event to dispatch now.
123
124 2011-04-05  Anders Bakken  <agbakken@gmail.com>
125
126         Reviewed by David Levin.
127
128         [Qt] DragControllerQt.cpp has coding-style errors
129         https://bugs.webkit.org/show_bug.cgi?id=40258
130
131         This patch does not require new test cases.
132
133         * page/qt/DragControllerQt.cpp:
134         (WebCore::DragController::dragOperation):
135
136 2011-04-05  Steve VanDeBogart  <vandebo@chromium.org>
137
138         Reviewed by David Levin.
139
140         Update deprecated include: platform_canvas_win.h to platform_canvas.h.
141         https://bugs.webkit.org/show_bug.cgi?id=57896
142
143         * platform/graphics/chromium/FontChromiumWin.cpp:
144
145 2011-04-05  Darin Adler  <darin@apple.com>
146
147         Try to fix Leopard bots.
148
149         * platform/mac/HTMLConverter.mm: Fix #if back the way Alexey seems
150         to have intended it.
151
152 2011-04-05  Darin Adler  <darin@apple.com>
153
154         Try to fix Leopard bots.
155
156         * platform/mac/HTMLConverter.mm: Move declarations of new functions
157         inside the appropriate #if.
158
159 2011-04-05  Adrienne Walker  <enne@google.com>
160
161         Reviewed by Tony Chang.
162
163         Correctly set color when using skia's fillRoundedRect.
164         https://bugs.webkit.org/show_bug.cgi?id=57907
165
166         * platform/graphics/skia/GraphicsContextSkia.cpp:
167         (WebCore::GraphicsContext::fillRoundedRect):
168
169 2011-04-05  Alexey Proskuryakov  <ap@apple.com>
170
171         Reviewed by Darin Adler.
172
173         Move attributedStringFromRange down to WebCore
174         https://bugs.webkit.org/show_bug.cgi?id=57905
175
176         No change in behavior, so no new tests.
177
178         Also tweaked HTMLConverter to not use methods defined in WebKit.
179
180         * WebCore.exp.in:
181         * WebCore.xcodeproj/project.pbxproj:
182         * platform/mac/HTMLConverter.h:
183         * platform/mac/HTMLConverter.mm:
184         (-[WebHTMLConverter _newTabForElement:]):
185         (-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
186         (+[WebHTMLConverter editingAttributedStringFromRange:]):
187         (fileWrapperForURL):
188         (fileWrapperForElement):
189         * platform/mac/PasteboardMac.mm:
190         (WebCore::Pasteboard::writeSelection):
191         * platform/mac/WebNSAttributedStringExtras.h: Copied from Source/WebKit/mac/Misc/WebNSAttributedStringExtras.h.
192         * platform/mac/WebNSAttributedStringExtras.mm: Copied from Source/WebKit/mac/Misc/WebNSAttributedStringExtras.mm.
193         (WebCore::attributedStringByStrippingAttachmentCharacters):
194
195 2011-04-05  Simon Fraser  <simon.fraser@apple.com>
196
197         Reviewed by Darin Adler.
198
199         Rename variables in border drawing code for readability
200         https://bugs.webkit.org/show_bug.cgi?id=57894
201
202         * rendering/RenderObject.cpp:
203         (WebCore::RenderObject::drawLineForBoxSide):
204         (WebCore::RenderObject::drawBoxSideFromPath):
205         (WebCore::RenderObject::drawArcForBoxSide):
206
207 2011-04-05  Antti Koivisto  <antti@apple.com>
208
209         Reviewed by Darin Adler.
210
211         Defer repaints during style recalc
212         https://bugs.webkit.org/show_bug.cgi?id=57886
213
214         This reduces the need to do (often expensive) platform surface invalidation.
215         We already do this during layout but style recalculation may trigger
216         invalidation as well.
217     
218         * dom/Document.cpp:
219         (WebCore::Document::recalcStyle):
220
221 2011-04-05  Jer Noble  <jer.noble@apple.com>
222
223         Reviewed by Darin Adler.
224
225         HTML5 Player Has no Fullscreen Mode
226         https://bugs.webkit.org/show_bug.cgi?id=57795
227
228         * html/HTMLVideoElement.cpp:
229         (WebCore::HTMLVideoElement::supportsFullscreen): Call the new ChromeClient API
230             supportsFullScreenForElement() before the old supportsFullScreenForNode() API.
231
232 2011-04-05  Vsevolod Vlasov  <vsevik@chromium.org>
233
234         Reviewed by Pavel Feldman.
235
236         Web Inspector: fix data url's status and timing the network panel.
237         https://bugs.webkit.org/show_bug.cgi?id=53066
238
239         Added data url support for status of network resources.
240
241         * English.lproj/localizedStrings.js:
242         * inspector/front-end/NetworkPanel.js:
243         (WebInspector.NetworkDataGridNode.prototype._refreshStatusCell):
244         * inspector/front-end/Resource.js:
245         (WebInspector.Resource.prototype.isDataURL):
246
247 2011-04-04  Vitaly Repeshko  <vitalyr@chromium.org>
248
249         Reviewed by Adam Barth.
250
251         [V8] Keep dirty primitive CSS values alive.
252         https://bugs.webkit.org/show_bug.cgi?id=57810
253
254         * bindings/v8/V8GCController.cpp:
255         (WebCore::GrouperVisitor::visitDOMWrapper):
256
257 2011-04-05  Simon Fraser  <simon.fraser@apple.com>
258
259         Reviewed by Adele Peterson.
260
261         Add a fast path for simple color backgrounds
262         https://bugs.webkit.org/show_bug.cgi?id=57773
263
264         Add a fast path for drawing simple color backgrounds. It's
265         faster to fill a path or rect than it is to set up a clip,
266         and then paint the rect.
267         
268         No visible behavior change so no new tests.
269
270         * rendering/RenderBoxModelObject.cpp:
271         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
272
273 2011-04-05  Patrick Gansterer  <paroga@webkit.org>
274
275         Unreviewed EFL build fix for r82962.
276
277         * CMakeListsEfl.txt:
278
279 2011-04-05  Chris Rogers  <crogers@google.com>
280
281         Reviewed by Kenneth Russell.
282
283         Add support for offline audio rendering to AudioContext API
284         https://bugs.webkit.org/show_bug.cgi?id=57676
285
286         No new tests since audio API is not yet implemented.
287
288         * DerivedSources.make:
289         * WebCore.gypi:
290         * WebCore.xcodeproj/project.pbxproj:
291         * bindings/js/JSAudioContextCustom.cpp:
292         (WebCore::JSAudioContextConstructor::constructJSAudioContext):
293         * bindings/js/JSEventCustom.cpp:
294         (WebCore::toJS):
295         * bindings/js/JSEventTarget.cpp:
296         (WebCore::toJS):
297         * bindings/v8/V8DOMWrapper.cpp:
298         (WebCore::V8DOMWrapper::convertEventTargetToV8Object):
299         * bindings/v8/custom/V8AudioContextCustom.cpp:
300         (WebCore::V8AudioContext::constructorCallback):
301         * bindings/v8/custom/V8EventCustom.cpp:
302         (WebCore::toV8):
303         * dom/Event.cpp:
304         (WebCore::Event::isOfflineAudioCompletionEvent):
305         * dom/Event.h:
306         * dom/EventTarget.cpp:
307         (WebCore::EventTarget::toAudioContext):
308         * dom/EventTarget.h:
309         * platform/audio/HRTFDatabaseLoader.cpp:
310         (WebCore::HRTFDatabaseLoader::waitForLoaderThreadCompletion):
311         * platform/audio/HRTFDatabaseLoader.h:
312         (WebCore::HRTFDatabaseLoader::loader):
313         * webaudio/AudioContext.cpp:
314         (WebCore::AudioContext::createOfflineContext):
315         (WebCore::AudioContext::AudioContext):
316         (WebCore::AudioContext::constructCommon):
317         (WebCore::AudioContext::document):
318         (WebCore::AudioContext::scriptExecutionContext):
319         (WebCore::AudioContext::toAudioContext):
320         (WebCore::AudioContext::startRendering):
321         (WebCore::AudioContext::fireCompletionEvent):
322         * webaudio/AudioContext.h:
323         (WebCore::AudioContext::isOfflineContext):
324         (WebCore::AudioContext::eventTargetData):
325         (WebCore::AudioContext::ensureEventTargetData):
326         (WebCore::AudioContext::refEventTarget):
327         (WebCore::AudioContext::derefEventTarget):
328         * webaudio/AudioContext.idl:
329         * webaudio/AudioDestinationNode.cpp:
330         (WebCore::AudioDestinationNode::AudioDestinationNode):
331         * webaudio/AudioDestinationNode.h:
332         (WebCore::AudioDestinationNode::reset):
333         (WebCore::AudioDestinationNode::numberOfChannels):
334         * webaudio/ConvolverNode.cpp:
335         (WebCore::ConvolverNode::setBuffer):
336         * webaudio/DefaultAudioDestinationNode.cpp: Added.
337         (WebCore::DefaultAudioDestinationNode::DefaultAudioDestinationNode):
338         (WebCore::DefaultAudioDestinationNode::~DefaultAudioDestinationNode):
339         (WebCore::DefaultAudioDestinationNode::initialize):
340         (WebCore::DefaultAudioDestinationNode::uninitialize):
341         (WebCore::DefaultAudioDestinationNode::startRendering):
342         * webaudio/DefaultAudioDestinationNode.h: Added.
343         (WebCore::DefaultAudioDestinationNode::create):
344         (WebCore::DefaultAudioDestinationNode::sampleRate):
345         * webaudio/OfflineAudioCompletionEvent.cpp: Added.
346         (WebCore::OfflineAudioCompletionEvent::create):
347         (WebCore::OfflineAudioCompletionEvent::OfflineAudioCompletionEvent):
348         (WebCore::OfflineAudioCompletionEvent::~OfflineAudioCompletionEvent):
349         (WebCore::OfflineAudioCompletionEvent::isOfflineAudioCompletionEvent):
350         * webaudio/OfflineAudioCompletionEvent.h: Added.
351         (WebCore::OfflineAudioCompletionEvent::renderedBuffer):
352         * webaudio/OfflineAudioCompletionEvent.idl: Added.
353         * webaudio/OfflineAudioDestinationNode.cpp: Added.
354         (WebCore::OfflineAudioDestinationNode::OfflineAudioDestinationNode):
355         (WebCore::OfflineAudioDestinationNode::~OfflineAudioDestinationNode):
356         (WebCore::OfflineAudioDestinationNode::initialize):
357         (WebCore::OfflineAudioDestinationNode::uninitialize):
358         (WebCore::OfflineAudioDestinationNode::startRendering):
359         (WebCore::OfflineAudioDestinationNode::renderEntry):
360         (WebCore::OfflineAudioDestinationNode::render):
361         (WebCore::OfflineAudioDestinationNode::notifyCompleteDispatch):
362         (WebCore::OfflineAudioDestinationNode::notifyComplete):
363         * webaudio/OfflineAudioDestinationNode.h: Added.
364         (WebCore::OfflineAudioDestinationNode::create):
365         (WebCore::OfflineAudioDestinationNode::sampleRate):
366
367 2011-04-05  Martin Robinson  <mrobinson@igalia.com>
368
369         Reviewed by Eric Seidel.
370
371         [Cairo] Better separate the concerns of GraphicsContextCairo
372         https://bugs.webkit.org/show_bug.cgi?id=55150
373
374         Add a PlatformContextCairo which right now stores the cairo_t* for a
375         GraphicsContextCairo. Later patches will move logic for tracking ContextShadow
376         and image masking layers into this PlatformContextCairo class.
377
378         No new tests. This patch is only a code cleanup.
379
380         * GNUmakefile.am:
381         * platform/graphics/GraphicsContext.h: The platform context is no longer a
382         cairo_t, but our new class the PlatformContextCairo.
383         * platform/graphics/cairo/ContextShadowCairo.cpp: Updated to reflect new class.j
384         * platform/graphics/cairo/FontCairo.cpp: Ditto.
385         * platform/graphics/cairo/GradientCairo.cpp: Ditto.
386         * platform/graphics/cairo/GraphicsContextCairo.cpp: Mostly mechanical
387         changes which now reference platformContext()->cr() to get the cairo_t.
388         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h: Now hold the
389         PlatformContextCairo instead of the cairo_t.
390         * platform/graphics/cairo/ImageBufferCairo.cpp: Update to reflect new class.
391         * platform/graphics/cairo/ImageCairo.cpp: Ditto.
392         * platform/graphics/cairo/PathCairo.cpp: Ditto.
393         * platform/graphics/cairo/PlatformContextCairo.cpp: Added.
394         * platform/graphics/cairo/PlatformContextCairo.h: Added.
395         * platform/graphics/gtk/FontGtk.cpp: Update to reflect new class.
396         * platform/graphics/gtk/IconGtk.cpp: Ditto.
397         * platform/graphics/win/GraphicsContextCairoWin.cpp: Now fill out
398         m_data with a private section containing the platform context instead of
399         just a cairo_t.
400         * platform/gtk/RenderThemeGtk.cpp: Update to reflect new class.
401         * platform/gtk/WidgetRenderingContext.cpp: Ditto.
402         (WebCore::WidgetRenderingContext::~WidgetRenderingContext): Ditto.
403         * plugins/gtk/PluginViewGtk.cpp: Ditto.
404
405 2011-04-05  David Dorwin  <ddorwin@chromium.org>
406
407         Reviewed by David Levin.
408
409         Fullscreen code assumes all layers use GPU compositing when USE(ACCELERATED_COMPOSITING)
410         https://bugs.webkit.org/show_bug.cgi?id=57400
411
412         Check whether the full screen renderer layer is being composited by the GPU before assuming that the backing is valid. 
413         Accelerated compositing may be compiled in but disabled at runtime or for some elements.
414
415         Tests: Fullscreen layout tests on Chromium.
416
417         * dom/Document.cpp:
418         (WebCore::Document::webkitWillEnterFullScreenForElement):
419         (WebCore::Document::webkitDidEnterFullScreenForElement):
420         (WebCore::Document::webkitWillExitFullScreenForElement):
421
422 2011-04-05  Nikolas Zimmermann  <nzimmermann@rim.com>
423
424         Reviewed by Dirk Schulze.
425
426         Regression: Invalid write in SVGTextLayoutEngine
427         https://bugs.webkit.org/show_bug.cgi?id=57721
428
429         Properly stop layout if all metrics object refer to zero-width/height characters,
430         which can happen for instance when using <text font-size="0">.
431
432         Test: svg/text/font-size-null-assertion.svg
433
434         * rendering/svg/SVGTextLayoutEngine.cpp:
435         (WebCore::SVGTextLayoutEngine::currentLogicalCharacterAttributes):
436         (WebCore::SVGTextLayoutEngine::currentLogicalCharacterMetrics):
437
438 2011-04-04 MORITA Hajime  <morrita@google.com>
439
440         Reviewed by Ryosuke Niwa.
441
442         [Refactoring] SpellCheckingResult should be replaced with TextCheckingResult
443         https://bugs.webkit.org/show_bug.cgi?id=56085
444         
445         Removed WebCore::SpellCheckingResult and replaced it with TextCheckingResult.
446         This change also added TextCheckerClient::requestCheckingOfString() should have
447         TextCheckingTypeMask as a parameter to control text checking type.
448
449         * WebCore.exp.in:
450         * editing/Editor.cpp:
451         (WebCore::Editor::replaceSelectionWithFragment):
452         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
453         (WebCore::Editor::textCheckingTypeMaskFor): Extracted from markAllMisspellingsAndBadGrammarInRanges()
454         * editing/SpellChecker.cpp:
455         (WebCore::SpellChecker::requestCheckingFor): Added a parameter.
456         (WebCore::SpellChecker::markAt): Extracted from didCheck(), Added a check for the GrammarDetail object.
457         (WebCore::SpellChecker::didCheck):
458         * editing/SpellChecker.h:
459         * loader/EmptyClients.h:
460         (WebCore::EmptyTextCheckerClient::checkTextOfParagraph):
461         (WebCore::EmptyTextCheckerClient::requestCheckingOfString):
462         * platform/text/TextCheckerClient.h:
463
464 2011-04-04  Antti Koivisto  <antti@apple.com>
465
466         Reviewed by Sam Weinig.
467
468         Print stylesheet on nytimes.com loads too early
469         https://bugs.webkit.org/show_bug.cgi?id=57814
470
471         Don't load resources with Very Low priority until there are no other resources to 
472         load for the host (or until document is complete enough that we stop limiting requests).
473
474         No tests, this is  difficult to observe reliably with our current testing infrastructure.
475         Verified working with Wireshark.
476
477         * loader/ResourceLoadScheduler.cpp:
478         (WebCore::ResourceLoadScheduler::servePendingRequests):
479         (WebCore::ResourceLoadScheduler::HostInformation::limitRequests):
480         * loader/ResourceLoadScheduler.h:
481
482 2011-04-04  Steve Block  <steveblock@google.com>
483
484         Reviewed by Dimitri Glazkov.
485
486         JavaInstance should be a pure interface
487         https://bugs.webkit.org/show_bug.cgi?id=55383
488
489         This patch fixes JavaInstance for V8 only.
490
491         It factors out a JavaInstance interface which does not use JNI
492         types. This will allow the Java bridge to be used with objects
493         that don't use JNI directly. The existing jobject-backed
494         implementation is moved to a new JavaInstanceJobject class which
495         implements the interface.
496
497         No new tests, refactoring only.
498
499         * Android.v8bindings.mk:
500         * WebCore.gypi:
501         * bridge/jni/JobjectWrapper.h:
502         * bridge/jni/v8/JNIUtilityPrivate.cpp:
503         (JSC::Bindings::jvalueToJavaValue):
504         (JSC::Bindings::javaValueToJvalue):
505         * bridge/jni/v8/JavaInstanceJobjectV8.cpp:
506         (JavaInstanceJobject::JavaInstanceJobject):
507         (JavaInstanceJobject::~JavaInstanceJobject):
508         (JavaInstanceJobject::begin):
509         (JavaInstanceJobject::end):
510         (JavaInstanceJobject::getClass):
511         (JavaInstanceJobject::invokeMethod):
512         (JavaInstanceJobject::getField):
513         * bridge/jni/v8/JavaInstanceJobjectV8.h: Copied from Source/WebCore/bridge/jni/v8/JavaInstanceV8.h.
514         (JSC::Bindings::JavaInstanceJobject::javaInstance):
515         * bridge/jni/v8/JavaInstanceV8.h:
516         (JSC::Bindings::JavaInstance::~JavaInstance):
517
518 2011-04-05  Dimitri Glazkov  <dglazkov@chromium.org>
519
520        Reviewed by Darin Adler.
521
522         Move MouseEvent-dispatching logic into MouseEventDispatchMediator.
523         https://bugs.webkit.org/show_bug.cgi?id=57639
524
525         Refactoring, covered by existing tests.
526
527         * dom/EventDispatcher.cpp:
528         (WebCore::EventDispatcher::dispatchEvent): Moved useful assertion here
529             from dispatchMouseEvent.
530         (WebCore::EventDispatcher::adjustRelatedTarget): Converted into a method.
531         * dom/EventDispatcher.h: Adjusted decls.
532         (WebCore::EventDispatcher::node): Added.
533         * dom/MouseEvent.cpp:
534         (WebCore::MouseEvent::create): Moved useful assertion here from
535             dispatchMouseEvent.
536         (WebCore::MouseEventDispatchMediator::MouseEventDispatchMediator): Added.
537         (WebCore::MouseEventDispatchMediator::event): Added.
538         (WebCore::MouseEventDispatchMediator::dispatchEvent): Added.
539         * dom/MouseEvent.h:
540         (WebCore::MouseEvent::setRelatedTarget): Added.
541         * dom/Node.cpp:
542         (WebCore::Node::dispatchMouseEvent): Changed to use MouseEventDispatchMediator.
543
544 2011-04-05  Nikolas Zimmermann  <nzimmermann@rim.com>
545
546         Reviewed by Adam Roben & Dirk Schulze.
547
548         text-tspan-02-b.svg from SVG 1.1 2nd edition fails
549         https://bugs.webkit.org/show_bug.cgi?id=57831
550
551         We were not spanning rotation values correcty accross text children, which resulted in text-span-02-b.svg misrendering.
552         While rewriting the rotation specific code, it came apparent that the LayoutScope concept is flawed in general and
553         should be replaced by a global list of x/y/dx/dy/rotate values for the whole text subtree. This makes it much simpler
554         to implement the demand that the last rotation value spans the whole scope. A follow-up patch will optimize the
555         required memory.
556
557         Example:
558         <text rotate="10,20,999,50">AB<tspan rotate="30">CDE</>FGH</text>
559     
560         text:   A  B  C  D  E  F  G  H
561         rotate="10 20 30 30 30 50 50 50"
562
563         Tests: svg/W3C-SVG-1.1-SE/text-tspan-02-b.svg
564                svg/text/text-midpoint-split-bug.svg
565
566         * rendering/RenderBlockLineLayout.cpp:     Move SVG specific midpoint creation after the non-SVG specific code that may mutate the midpoints. otherwhise we end up in an
567         (WebCore::RenderBlock::findNextLineBreak): inconsistent state. We were intereferring with the ignoreSpaces code resulting in wrong truncations - covered by new testcase.
568         * rendering/svg/SVGTextLayoutAttributes.cpp:
569         (WebCore::SVGTextLayoutAttributes::reserveCapacity): Also reserveCapacity for the text metrics list (minor optimization).
570         (WebCore::SVGTextLayoutAttributes::fillWithEmptyValue): Added helper function for use from SVGTextLayoutAttributesBuilder.
571         (WebCore::SVGTextLayoutAttributes::appendEmptyValue): Ditto.
572         (WebCore::safeValueAtPosition): Ditto. (Inline helper)
573         (WebCore::SVGTextLayoutAttributes::appendSingleValueFromAttribute): Ditto.
574         * rendering/svg/SVGTextLayoutAttributes.h: Ditto.
575         * rendering/svg/SVGTextLayoutAttributesBuilder.cpp: Rewrite code, see explaination above.
576         (WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForTextSubtree):
577         (WebCore::processRenderSVGInlineText):
578         (WebCore::SVGTextLayoutAttributesBuilder::collectTextPositioningElements):
579         (WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForAllCharacters):
580         (WebCore::SVGTextLayoutAttributesBuilder::propagateLayoutAttributes):
581         (WebCore::fillListAtPosition):
582         (WebCore::SVGTextLayoutAttributesBuilder::fillAttributesAtPosition):
583         * rendering/svg/SVGTextLayoutAttributesBuilder.h:
584         (WebCore::SVGTextLayoutAttributesBuilder::TextPosition::TextPosition):
585
586 2011-04-05  Levi Weintraub  <leviw@chromium.org>
587
588         Reviewed by Ryosuke Niwa.
589
590         DeleteButtonController is given invalid style
591         https://bugs.webkit.org/show_bug.cgi?id=57853
592
593         DeleteButtonController was assigned an invalid style that can lead to assertions
594         in debug builds. This matches up the code with its intent.
595
596         No new tests as this changes nothing on release builds.
597
598         * editing/DeleteButtonController.cpp:
599         (WebCore::DeleteButtonController::createDeletionUI):
600
601 2011-04-05  Anders Bakken  <agbakken@gmail.com>
602
603         Reviewed by Laszlo Gombos.
604
605         [Qt] EditorQt.cpp has coding-style errors
606         https://bugs.webkit.org/show_bug.cgi?id=40260
607         
608         This patch does not require new test cases.
609
610         * editing/qt/EditorQt.cpp:
611
612 2011-04-05  Pavel Podivilov  <podivilov@chromium.org>
613
614         Reviewed by Pavel Feldman.
615
616         Web Inspector: go to line dialog highlights wrong line.
617         https://bugs.webkit.org/show_bug.cgi?id=57845
618
619         * inspector/front-end/GoToLineDialog.js:
620         (WebInspector.GoToLineDialog.prototype._highlightSelectedLine):
621
622 2011-04-05  Luke Macpherson   <macpherson@chromium.org>
623
624         Reviewed by Dimitri Glazkov.
625
626         Implement CSSPropertyDirection in CSSStyleApplyProperty
627         https://bugs.webkit.org/show_bug.cgi?id=57608
628
629         No new tests required as no new functionality introduced.
630
631         * css/CSSStyleApplyProperty.cpp:
632         Add implementation class for CSSPropertyDirection
633         * css/CSSStyleSelector.cpp:
634         Remove existing implementation for CSSPropertyDirection
635         * css/CSSStyleSelector.h:
636         Add getter for element
637
638 2011-04-05  Leandro Gracia Gil  <leandrogracia@chromium.org>
639
640         Reviewed by Steve Block.
641
642         Factoring the creation of 'FunctionOnly' callbacks in V8.
643         https://bugs.webkit.org/show_bug.cgi?id=57760
644
645         This method creates a template from an existing functionality in V8GeolocationCustom.cpp
646         to V8Utilities to be used by the custom bindings of both Geolocation and the Media Stream API.
647
648         No new tests. LayoutTests/fast/dom/Geolocation/argument-types.html
649
650         * bindings/v8/V8Utilities.cpp:
651         (WebCore::throwTypeMismatchException):
652         * bindings/v8/V8Utilities.h:
653         (WebCore::createFunctionOnlyCallback):
654         * bindings/v8/custom/V8GeolocationCustom.cpp:
655         (WebCore::V8Geolocation::getCurrentPositionCallback):
656         (WebCore::V8Geolocation::watchPositionCallback):
657
658 2011-04-05  Nikolas Zimmermann  <nzimmermann@rim.com>
659
660         Reviewed by Andreas Kling.
661
662         Switch from Vector<UChar> to StringBuilder in bindings/
663         https://bugs.webkit.org/show_bug.cgi?id=57838
664
665         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
666         (WebCore::cssPropertyName):
667         * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
668         (WebCore::cssPropertyInfo):
669
670 2011-04-05  Nikolas Zimmermann  <nzimmermann@rim.com>
671
672         Reviewed by Andreas Kling.
673
674         Switch from Vector<UChar> to StringBuilder in accessibility/
675         https://bugs.webkit.org/show_bug.cgi?id=57837
676
677         * accessibility/AccessibilityObject.cpp:
678         (WebCore::AccessibilityObject::listMarkerTextForNodeAndPosition):
679         (WebCore::AccessibilityObject::stringForVisiblePositionRange):
680         * accessibility/AccessibilityRenderObject.cpp:
681         (WebCore::AccessibilityRenderObject::accessibilityDescriptionForElements):
682
683 2011-04-05  Andrey Adaikin  <aandrey@google.com>
684
685         Reviewed by Pavel Feldman.
686
687         Web Inspector: Scripts with syntax errors are cropped in the UI
688         https://bugs.webkit.org/show_bug.cgi?id=57828
689
690         * inspector/front-end/SourceFrame.js:
691         (WebInspector.SourceFrame.prototype.addMessageToSource):
692
693 2011-04-05  Alexey Proskuryakov  <ap@apple.com>
694
695         Reviewed by Darin Adler.
696
697         Remove onformchange and onforminput events/event handlers
698         https://bugs.webkit.org/show_bug.cgi?id=55755
699         <rdar://problem/9087969>
700
701         Covered by existing tests.
702
703         * dom/Document.h:
704         * dom/Document.idl:
705         * dom/Element.h:
706         * dom/Element.idl:
707         * dom/Event.cpp:
708         (WebCore::Event::fromUserGesture):
709         * dom/EventNames.h:
710         * html/FormAssociatedElement.h:
711         * html/HTMLAttributeNames.in:
712         * html/HTMLElement.cpp:
713         (WebCore::HTMLElement::parseMappedAttribute):
714         * html/HTMLElement.h:
715         * html/HTMLFormControlElement.h:
716         (WebCore::HTMLFormControlElement::isEnumeratable):
717         * html/HTMLFormElement.cpp:
718         * html/HTMLFormElement.h:
719         * html/HTMLFormElement.idl:
720         * html/HTMLInputElement.h:
721         * html/HTMLKeygenElement.h:
722         * html/HTMLObjectElement.h:
723         (WebCore::HTMLObjectElement::isEnumeratable):
724         * html/HTMLOutputElement.h:
725         (WebCore::HTMLOutputElement::isEnumeratable):
726         * html/HTMLSelectElement.h:
727         (WebCore::HTMLSelectElement::isEnumeratable):
728         * html/HTMLTextAreaElement.h:
729         (WebCore::HTMLTextAreaElement::isEnumeratable):
730         * page/DOMWindow.h:
731         * page/DOMWindow.idl:
732
733 2011-04-05  Sheriff Bot  <webkit.review.bot@gmail.com>
734
735         Unreviewed, rolling out r82915.
736         http://trac.webkit.org/changeset/82915
737         https://bugs.webkit.org/show_bug.cgi?id=57825
738
739         Broke 270 chromium tests on win and linux (Requested by
740         podivilov on #webkit).
741
742         * rendering/RenderThemeChromiumSkia.cpp:
743         (WebCore::RenderThemeChromiumSkia::defaultGUIFont):
744
745 2011-04-05  James Simonsen  <simonjam@chromium.org>
746
747         Reviewed by Adam Barth.
748
749         Stop preload scanning CSS when it&apos;s impossible to have another @import.
750         https://bugs.webkit.org/show_bug.cgi?id=57664
751
752         @import statements are only allowed at the beginning of a CSS file.
753         Only comments or @charset can precede them. After seeing anything else,
754         abort early so that we:
755         - don't have to parse the rest of the CSS.
756         - don't preload something that the regular parser won't load.
757
758         * html/parser/CSSPreloadScanner.cpp:
759         (WebCore::CSSPreloadScanner::scan): Terminate early if we're done with @imports.
760         (WebCore::CSSPreloadScanner::tokenize): Terminate early if we see a {} or any style rule.
761         (WebCore::CSSPreloadScanner::emitRule): Only @charset or @import are allowed to precede @import.
762         * html/parser/CSSPreloadScanner.h: Add DoneParsingImportRules state.
763
764 2011-04-05  Takayoshi Kochi <kochi@chromium.org>
765
766         Reviewed by Tony Chang.
767
768         [chromium] Specify 'sans-serif' as a fallback to the default UI font
769         'Arial' for non-latin UI scripts (e.g. CJK).
770         https://bugs.webkit.org/show_bug.cgi?id=55035
771
772         No new tests, because it may still fail if the system is not configured
773         properly to resolve 'sans-serif' to existing real font file, thus even
774         manual test is hard to systematically tell it is working properly.
775
776         * rendering/RenderThemeChromiumSkia.cpp
777
778 2011-04-05  Kent Tamura  <tkent@chromium.org>
779
780         Reviewed by Dimitri Glazkov.
781
782         Setting defaultValue on a textarea with a modified value still clobbers the value
783         https://bugs.webkit.org/show_bug.cgi?id=57636
784
785         If the dirty flag is true, we shouldn't update the value when the
786         defaultValue is updated
787
788         Test: fast/forms/textarea-set-defaultvalue-after-value.html
789
790         * html/HTMLTextAreaElement.cpp:
791         (WebCore::HTMLTextAreaElement::childrenChanged):
792         (WebCore::HTMLTextAreaElement::setDefaultValue):
793
794 2011-04-04  Kent Tamura  <tkent@chromium.org>
795
796         Add a case label which was unexpectedly removed in r82899.
797         https://bugs.webkit.org/show_bug.cgi?id=50661
798
799         * css/CSSSelector.cpp:
800         (WebCore::CSSSelector::extractPseudoType):
801
802 2011-04-04  Dan Bernstein  <mitz@apple.com>
803
804         Reviewed by Simon Fraser.
805
806         <rdar://problem/7709452> Implement Default Ruby Overhang Behavior
807         https://bugs.webkit.org/show_bug.cgi?id=49334
808
809         Tests: fast/ruby/overhang-horizontal.html
810                fast/ruby/overhang-vertical.html
811
812         This is a first cut at ruby overhang. It allows ruby text to hang over other
813         text of equal or smaller size. Two notable omissions are that max preferred
814         width computation was not patched, so it will overshoot, and that overhang
815         ignores the width of the adjoining text runs.
816
817         * rendering/RenderBlock.h:
818         * rendering/RenderBlockLineLayout.cpp:
819         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Adjust margins
820         of ruby runs for overhang.
821         (WebCore::RenderBlock::fitBelowFloats): Maintain the increase in line width to
822         compensate for overhang.
823         (WebCore::RenderBlock::findNextLineBreak): When encountering
824         a ruby run, increase the line width to account for the fact that overhang will be
825         collapsed.
826         * rendering/RenderRubyRun.cpp:
827         (WebCore::RenderRubyRun::getOverhang): Added. Allows ruby to overhang if
828         the adjoining renderer is text with equal or smaller font size.
829         * rendering/RenderRubyRun.h:
830         (WebCore::toRenderRubyRun):
831
832 2011-04-04  David Kilzer  <ddkilzer@apple.com>
833
834         <http://webkit.org/b/57384> CFNetwork and WebCore load priorities should match
835
836         Reviewed by Alexey Proskuryakov.
837
838         * WebCore.exp.in: Export wkSetHTTPPipeliningMaximumPriority().
839         * platform/mac/WebCoreSystemInterface.h:
840         (wkSetHTTPPipeliningMaximumPriority): Added function pointer
841         declaration.
842         * platform/mac/WebCoreSystemInterface.mm:
843         (wkSetHTTPPipeliningMaximumPriority): Added function pointer.
844         * platform/network/cf/ResourceRequestCFNet.cpp:
845         (WebCore::initializeMaximumHTTPConnectionCountPerHost): Call
846         wkSetHTTPPipeliningMaximumPriority() to set the maximum HTTP
847         pipelining priority.
848         * platform/network/cf/ResourceRequestCFNet.h:
849         (WebCore::toResourceLoadPriority): Renamed from
850         mapHTTPPipeliningPriorityToResourceLoadPriority().  Updated to
851         to handle Unresolved case.
852         (WebCore::toHTTPPipeliningPriority): Renamed from
853         mapResourceLoadPriorityToHTTPPipeliningPriority().  Updated to
854         handle Unresolved case.
855         * platform/network/mac/ResourceRequestMac.mm:
856         (WebCore::ResourceRequest::doUpdateResourceRequest): Switched to
857         use toResourceLoadPriority().
858         (WebCore::ResourceRequest::doUpdatePlatformRequest): Switched to
859         use toHTTPPipeliningPriority().  Moved
860         shouldForceHTTPPipeliningPriorityHigh() check into the argument
861         of toHTTPPipeliningPriority() instead of hard-coding a
862         now-incorrect value.
863
864 2011-04-04  MORITA Hajime  <morrita@google.com>
865
866         Reviewed by Kent Tamura.
867
868         Convert <meter> shadow DOM to a DOM-based shadow.
869         https://bugs.webkit.org/show_bug.cgi?id=50661
870         
871         Eliminated a large part of <meter> custom layout code,
872         which is replaced by a shadow tree.
873         Note that the shadow tree is created on construction time and
874         will remain during the host HTMLMeterElement lifecycle.
875         
876         * Android.mk:
877         * CMakeLists.txt:
878         * GNUmakefile.am:
879         * WebCore.gypi:
880         * WebCore.pro:
881         * WebCore.vcproj/WebCore.vcproj:
882         * WebCore.xcodeproj/project.pbxproj:
883         * css/CSSMutableStyleDeclaration.cpp:
884         (WebCore::CSSMutableStyleDeclaration::setProperty):
885         * css/CSSMutableStyleDeclaration.h:
886         * css/CSSSelector.cpp:
887         (WebCore::CSSSelector::pseudoId):
888         (WebCore::nameToPseudoTypeMap):
889         (WebCore::CSSSelector::extractPseudoType):
890         * css/CSSSelector.h:
891         * css/html.css:
892         (meter):
893         (meter::-webkit-meter-bar):
894         (meter::-webkit-meter-optimum-value):
895         (meter::-webkit-meter-suboptimum-value):
896         (meter::-webkit-meter-even-less-good-value):
897         * html/HTMLMeterElement.cpp:
898         (WebCore::HTMLMeterElement::~HTMLMeterElement):
899         (WebCore::HTMLMeterElement::parseMappedAttribute):
900         (WebCore::HTMLMeterElement::attach):
901         (WebCore::HTMLMeterElement::valueRatio):
902         (WebCore::HTMLMeterElement::didElementStateChange):
903         (WebCore::HTMLMeterElement::createShadowSubtree):
904         * html/HTMLMeterElement.h:
905         * html/shadow/MeterShadowElement.cpp: Added.
906         (WebCore::MeterShadowElement::MeterShadowElement):        
907         (WebCore::MeterShadowElement::meterElement):
908         (WebCore::MeterShadowElement::rendererIsNeeded):
909         (WebCore::MeterBarElement::shadowPseudoId):
910         (WebCore::MeterValueElement::shadowPseudoId):
911         (WebCore::MeterValueElement::setWidthPercentage):
912         * html/shadow/MeterShadowElement.h: Added.
913         (WebCore::MeterBarElement::MeterBarElement):
914         (WebCore::MeterBarElement::create):
915         (WebCore::MeterValueElement::MeterValueElement):
916         (WebCore::MeterValueElement::create):
917         * rendering/RenderMeter.cpp:
918         (WebCore::RenderMeter::RenderMeter):
919         (WebCore::RenderMeter::~RenderMeter):
920         (WebCore::RenderMeter::valueRatio):
921         * rendering/RenderMeter.h:
922         (WebCore::RenderMeter::renderName):
923         (WebCore::RenderMeter::isMeter):
924         (WebCore::RenderMeter::requiresForcedStyleRecalcPropagation):
925         (WebCore::RenderMeter::canHaveChildren):
926
927 2011-04-04  Dimitri Glazkov  <dglazkov@chromium.org>
928
929         Reviewed by Adam Barth.
930
931         Introduce EventDispatchMediator abstraction, which encapsulate all
932         non-trivial logic around firing a specific type of an event.
933         https://bugs.webkit.org/show_bug.cgi?id=57562
934
935         Refactoring, covered by existing tests.
936
937         * dom/Event.cpp:
938         (WebCore::EventDispatchMediator::EventDispatchMediator): Added.
939         (WebCore::EventDispatchMediator::~EventDispatchMediator): Added.
940         (WebCore::EventDispatchMediator::dispatchEvent): Added.
941         (WebCore::EventDispatchMediator::event): Added.
942         * dom/Event.h: Added decl.
943         * dom/EventDispatcher.cpp:
944         (WebCore::EventDispatcher::dispatchEvent): Changed to use EventDispatchMediator.
945         * dom/EventDispatcher.h: Updated decls.
946         * dom/KeyboardEvent.cpp:
947         (WebCore::KeyboardEventDispatchMediator::KeyboardEventDispatchMediator): Added.
948         (WebCore::KeyboardEventDispatchMediator::dispatchEvent): Added.
949         * dom/KeyboardEvent.h: Updated decls
950         * dom/Node.cpp:
951         (WebCore::Node::dispatchEvent): Changed to use EventDispatchMediator.
952         (WebCore::Node::dispatchKeyEvent): Changed to use KeyboardEventDispatchMediator.
953
954 2011-04-04  Martin Robinson  <mrobinson@igalia.com>
955
956         Reviewed by Xan Lopez.
957
958         [Cairo] Memory leak in RefPtrCairo
959         https://bugs.webkit.org/show_bug.cgi?id=57758
960
961         No new tests. This just fixes a memory leak.
962
963         * platform/graphics/cairo/RefPtrCairo.cpp:
964         (WTF::derefIfNotNull): Deref should unref the cairo_font_fact_t, not reference it.
965
966 2011-04-04  Adrienne Walker  <enne@google.com>
967
968         Unreviewed, rolling out r82880.
969         http://trac.webkit.org/changeset/82880
970         https://bugs.webkit.org/show_bug.cgi?id=50661
971
972         Meter elements not rendered in Chromium Linux layout tests
973
974         * Android.mk:
975         * CMakeLists.txt:
976         * GNUmakefile.am:
977         * WebCore.gypi:
978         * WebCore.pro:
979         * WebCore.vcproj/WebCore.vcproj:
980         * WebCore.xcodeproj/project.pbxproj:
981         * css/CSSMutableStyleDeclaration.cpp:
982         * css/CSSMutableStyleDeclaration.h:
983         * css/CSSSelector.cpp:
984         (WebCore::CSSSelector::pseudoId):
985         (WebCore::nameToPseudoTypeMap):
986         (WebCore::CSSSelector::extractPseudoType):
987         * css/CSSSelector.h:
988         * css/html.css:
989         (meter):
990         (meter::-webkit-meter):
991         (meter::-webkit-meter-bar):
992         (meter::-webkit-meter-optimum-value):
993         (meter::-webkit-meter-suboptimal-value):
994         (meter::-webkit-meter-even-less-good-value):
995         * html/HTMLMeterElement.cpp:
996         (WebCore::HTMLMeterElement::create):
997         (WebCore::HTMLMeterElement::parseMappedAttribute):
998         (WebCore::HTMLMeterElement::attach):
999         * html/HTMLMeterElement.h:
1000         * html/shadow/MeterShadowElement.cpp: Removed.
1001         * html/shadow/MeterShadowElement.h: Removed.
1002         * rendering/RenderMeter.cpp:
1003         (WebCore::RenderMeter::RenderMeter):
1004         (WebCore::RenderMeter::~RenderMeter):
1005         (WebCore::RenderMeter::createPart):
1006         (WebCore::RenderMeter::updateFromElement):
1007         (WebCore::RenderMeter::layoutParts):
1008         (WebCore::RenderMeter::styleDidChange):
1009         (WebCore::RenderMeter::shouldHaveParts):
1010         (WebCore::RenderMeter::valueRatio):
1011         (WebCore::RenderMeter::barPartRect):
1012         (WebCore::RenderMeter::valuePartRect):
1013         (WebCore::RenderMeter::valuePseudoId):
1014         (WebCore::RenderMeter::barPseudoId):
1015         (WebCore::RenderMeter::detachShadows):
1016         (WebCore::RenderMeter::updateShadows):
1017         * rendering/RenderMeter.h:
1018         (WebCore::RenderMeter::renderName):
1019         (WebCore::RenderMeter::isMeter):
1020         (WebCore::RenderMeter::shadowAttached):
1021
1022 2011-04-04  Chang Shu  <cshu@webkit.org>
1023
1024         Reviewed by Ryosuke Niwa.
1025
1026         setContentEditable with true/false/inherit string is not working properly
1027         https://bugs.webkit.org/show_bug.cgi?id=52058
1028
1029         Move isContentEditable from HTMLElement to Node. Thus, Node provides two functions for
1030         checking editability: rendererIsEditable and isContentEdiable. The former is a fast path,
1031         which does NOT trigger layout and only checks the render style of usermodify. The latter
1032         updates the layout first to make sure the render style syncs with DOM contenteditable 
1033         attribute. Certain call sites that need to call isContentEditable rather than rendererIsEditable
1034         are also updated in the patch. But a complete fix will follow up in bug 57244.
1035
1036         This patch fixes all the failed layout tests related to set contenteditable.
1037
1038         * accessibility/AccessibilityRenderObject.cpp:
1039         (WebCore::AccessibilityRenderObject::isReadOnly):
1040         * dom/Node.cpp:
1041         (WebCore::Node::isContentEditable):
1042         (WebCore::Node::shouldUseInputMethod):
1043         * dom/Node.h:
1044         * html/HTMLElement.cpp:
1045         * html/HTMLElement.h:
1046
1047 2011-04-04  Roland Steiner  <rolandsteiner@chromium.org>
1048
1049         Reviewed by Dimitri Glazkov.
1050
1051         Bug 57689 - Extract scoping functionality from Document
1052         https://bugs.webkit.org/show_bug.cgi?id=57689
1053
1054         Moved selfOnlyRef (renamed to guardRef), element ID, image map
1055         and accesss key functionalities from Document to a new base
1056         class TreeScope.
1057
1058         TreeShared: made removedLastRef protected
1059
1060         No new tests. (refactoring)
1061
1062         * Android.mk:
1063         * CMakeLists.txt:
1064         * GNUmakefile.am:
1065         * WebCore.gypi:
1066         * WebCore.pro:
1067         * WebCore.vcproj/WebCore.vcproj:
1068         * WebCore.xcodeproj/project.pbxproj:
1069         * dom/Document.cpp:
1070         (WebCore::Document::Document):
1071         (WebCore::Document::destroyScope):
1072         (WebCore::Document::getElementById):
1073         (WebCore::Document::childrenChanged):
1074         (WebCore::Document::scheduleStyleRecalc):
1075         (WebCore::Document::attach):
1076         (WebCore::Document::detach):
1077         * dom/Document.h:
1078         (WebCore::Node::Node):
1079         * dom/DocumentOrderedMap.cpp:
1080         (WebCore::DocumentOrderedMap::get):
1081         (WebCore::DocumentOrderedMap::getElementById):
1082         (WebCore::DocumentOrderedMap::getElementByMapName):
1083         (WebCore::DocumentOrderedMap::getElementByLowercasedMapName):
1084         * dom/DocumentOrderedMap.h:
1085         * dom/DOMAllInOne.cpp:
1086         * dom/Node.cpp:
1087         (WebCore::Node::~Node):
1088         (WebCore::Node::setDocument):
1089         * dom/Node.h:
1090         * dom/TreeScope.cpp: Added.
1091         * dom/TreeScope.h: Added.
1092         * platform/TreeShared.h:
1093         (WebCore::TreeShared::removedLastRef): made protected
1094
1095 2011-04-04  MORITA Hajime  <morrita@google.com>
1096
1097         Reviewed by Dimitri Glazkov.
1098
1099         Convert <meter> shadow DOM to a DOM-based shadow.
1100         https://bugs.webkit.org/show_bug.cgi?id=50661
1101         
1102         Eliminated a large part of <meter> custom layout code,
1103         which is replaced by a shadow tree.
1104         Note that the shadow tree is created on construction time and
1105         will remain during the host HTMLMeterElement lifecycle.
1106         
1107         * Android.mk:
1108         * CMakeLists.txt:
1109         * GNUmakefile.am:
1110         * WebCore.gypi:
1111         * WebCore.pro:
1112         * WebCore.vcproj/WebCore.vcproj:
1113         * WebCore.xcodeproj/project.pbxproj:
1114         * css/CSSMutableStyleDeclaration.cpp:
1115         (WebCore::CSSMutableStyleDeclaration::setProperty):
1116         * css/CSSMutableStyleDeclaration.h:
1117         * css/CSSSelector.cpp:
1118         (WebCore::CSSSelector::pseudoId):
1119         (WebCore::nameToPseudoTypeMap):
1120         (WebCore::CSSSelector::extractPseudoType):
1121         * css/CSSSelector.h:
1122         * css/html.css:
1123         (meter):
1124         (meter::-webkit-meter-bar):
1125         (meter::-webkit-meter-optimum-value):
1126         (meter::-webkit-meter-suboptimum-value):
1127         (meter::-webkit-meter-even-less-good-value):
1128         * html/HTMLMeterElement.cpp:
1129         (WebCore::HTMLMeterElement::~HTMLMeterElement):
1130         (WebCore::HTMLMeterElement::parseMappedAttribute):
1131         (WebCore::HTMLMeterElement::attach):
1132         (WebCore::HTMLMeterElement::valueRatio):
1133         (WebCore::HTMLMeterElement::didElementStateChange):
1134         (WebCore::HTMLMeterElement::createShadowSubtree):
1135         * html/HTMLMeterElement.h:
1136         * html/shadow/MeterShadowElement.cpp: Added.
1137         (WebCore::MeterShadowElement::MeterShadowElement):        
1138         (WebCore::MeterShadowElement::meterElement):
1139         (WebCore::MeterShadowElement::rendererIsNeeded):
1140         (WebCore::MeterBarElement::shadowPseudoId):
1141         (WebCore::MeterValueElement::shadowPseudoId):
1142         (WebCore::MeterValueElement::setWidthPercentage):
1143         * html/shadow/MeterShadowElement.h: Added.
1144         (WebCore::MeterBarElement::MeterBarElement):
1145         (WebCore::MeterBarElement::create):
1146         (WebCore::MeterValueElement::MeterValueElement):
1147         (WebCore::MeterValueElement::create):
1148         * rendering/RenderMeter.cpp:
1149         (WebCore::RenderMeter::RenderMeter):
1150         (WebCore::RenderMeter::~RenderMeter):
1151         (WebCore::RenderMeter::valueRatio):
1152         * rendering/RenderMeter.h:
1153         (WebCore::RenderMeter::renderName):
1154         (WebCore::RenderMeter::isMeter):
1155         (WebCore::RenderMeter::requiresForcedStyleRecalcPropagation):
1156         (WebCore::RenderMeter::canHaveChildren):
1157
1158 2011-04-04  Martin Robinson  <mrobinson@igalia.com>
1159
1160         Reviewed by Gustavo Noronha Silva.
1161
1162         [GTK] WebGL support
1163         https://bugs.webkit.org/show_bug.cgi?id=31517
1164
1165         Add WebGL support for the GTK+ bits of WebCore.
1166
1167         No new tests. This will be covered by the existing WebGL tests once
1168         the bots are capable of running WebGL tests.
1169
1170         * GNUmakefile.am: Added new files required for WebGL support.
1171         * html/HTMLCanvasElement.cpp:
1172         (WebCore::HTMLCanvasElement::getContext): Extend #ifdef to cover GTK+ as well, which does not
1173         yet support accelerated compositing.
1174         * platform/graphics/ANGLEWebKitBridge.h: Update to reflect the fact that ANGLE isn't compiled as
1175         a framework for GTK+.
1176         * platform/graphics/GraphicsContext3D.h:
1177         (WebCore::GraphicsContext3D::platformTexture): Added a declaration of this method for Cairo.
1178         (WebCore::GraphicsContext3D::paintsIntoCanvasBuffer): Ditto.
1179         * platform/graphics/cairo/GraphicsContext3DCairo.cpp: Added.
1180         (WebCore::GraphicsContext3D::getImageData): Added.
1181         (WebCore::GraphicsContext3D::paintToCanvas): Added.
1182         * platform/graphics/cairo/OpenGLShims.cpp: Added. This file controls loading of GL extension
1183         functions dynamically. They have different names across the different vendors' GL implementations.
1184         (WebCore::lookupOpenGLFunctionAddress): Added
1185         (WebCore::openGLFunctionTable): Added
1186         (WebCore::initializeOpenGLShims): Added
1187         * platform/graphics/cairo/OpenGLShims.h: Added.
1188         * platform/graphics/gtk/DrawingBufferGtk.cpp: Added.
1189         (WebCore::DrawingBuffer::DrawingBuffer): Very generic implementation for Cairo.
1190         (WebCore::DrawingBuffer::~DrawingBuffer): Ditto.
1191         (WebCore::DrawingBuffer::didReset): Ditto.
1192         (WebCore::DrawingBuffer::platformColorBuffer): Ditto.
1193         * platform/graphics/gtk/GraphicsContext3DGtk.cpp: Added.
1194         (WebCore::GraphicsContext3D::create): Initial implementation.
1195         (WebCore::GraphicsContext3D::GraphicsContext3D): Ditto.
1196         (WebCore::GraphicsContext3D::~GraphicsContext3D): Ditto.
1197         (WebCore::GraphicsContext3D::makeContextCurrent): Ditto.
1198         (WebCore::GraphicsContext3D::platformGraphicsContext3D): Ditto.
1199         (WebCore::GraphicsContext3D::isGLES2Compliant): Ditto.
1200         * platform/graphics/gtk/GraphicsContext3DInternal.cpp: Added.
1201         (sharedDisplay): Added this shared display which is required by some
1202         display drivers.
1203         (WebCore::activeGraphicsContexts): This method keeps track of all active GraphicsContext3D
1204         contexts, in order to clean them up at exit. This prevents crashes on certain OpenGL drivers.
1205         (WebCore::GraphicsContext3DInternal::addActiveGraphicsContext): Ditto.
1206         (WebCore::GraphicsContext3DInternal::removeActiveGraphicsContext): Ditto.
1207         (WebCore::GraphicsContext3DInternal::cleanupActiveContextsAtExit): Ditto.
1208         (WebCore::GraphicsContext3DInternal::create): Figure out the best way to create an OpenGL
1209         context given the current environment.
1210         (WebCore::GraphicsContext3DInternal::createPbufferContext): Pbuffer context initializer.
1211         (WebCore::GraphicsContext3DInternal::createPixmapContext): Pixmap context initializer.
1212         (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal): Initial implementation.
1213         (WebCore::GraphicsContext3DInternal::~GraphicsContext3DInternal): Ditto.
1214         (WebCore::GraphicsContext3DInternal::makeContextCurrent): Ditto.
1215         * platform/graphics/gtk/GraphicsContext3DInternal.h: Added.
1216         * platform/graphics/opengl/Extensions3DOpenGL.cpp: Added generic implementation.
1217         (WebCore::Extensions3DOpenGL::ensureEnabled): Ditto.
1218         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
1219         (WebCore::GraphicsContext3D::reshape): Test for the context using the public API rather than
1220         the private bits that are specific to the Apple port.
1221
1222 2011-04-04  Alexey Proskuryakov  <ap@apple.com>
1223
1224         Reviewed by Dan Bernstein.
1225
1226         REGRESSION (WebKit2): Caps-Lock indicator sometimes doesn't appear in WebKit2
1227         https://bugs.webkit.org/show_bug.cgi?id=51230
1228         <rdar://problem/8780989>
1229
1230         <rdar://problem/9015250> REGRESSION (WebKit2): Key events not fired for modifier keys
1231
1232         * page/EventHandler.cpp: (WebCore::EventHandler::keyEvent): Moved Caps Lock handling from
1233         WebKits to WebCore, because WebKit shouldn't be smart.
1234
1235 2011-04-04  Steve Falkenburg  <sfalken@apple.com>
1236
1237         Fix Windows build warning.
1238
1239         * WebCore.vcproj/WebCore.vcproj: Exclude EventQueue.cpp in Debug_All build.
1240
1241 2011-04-04  Adam Roben  <aroben@apple.com>
1242
1243         Attempted Mac build fix, part III
1244
1245         * WebCore.exp.in: Export PlatformCALayer::setGeometryFlipped. Also resorted some symbols.
1246
1247 2011-04-04  Andy Estes  <aestes@apple.com>
1248
1249         Fix the Mac build.
1250
1251         * WebCore.exp.in:
1252
1253 2011-04-04  David Dorwin  <ddorwin@chromium.org>
1254
1255         Reviewed by David Levin.
1256
1257         Chromium Mac crashes when entering fullscreen
1258         https://bugs.webkit.org/show_bug.cgi?id=57483
1259
1260         Override extraFullScreenStyleSheet in RenderThemeChromiumMac to avoid hitting the ASSERT_NOT_REACHED in RenderThemeMac.
1261
1262         * WebCore.gyp/WebCore.gyp:
1263         * rendering/RenderThemeChromiumMac.h:
1264         * rendering/RenderThemeChromiumMac.mm:
1265         (WebCore::RenderThemeChromiumMac::extraFullScreenStyleSheet):
1266
1267 2011-04-04  Adam Roben  <aroben@apple.com>
1268
1269         Attempted Mac build fix, part II
1270
1271         * WebCore.xcodeproj/project.pbxproj: Marked PlatformCALayerClient.h and
1272         PlatformCAAnimation.h as private so that WebKit2 can #include them (transitively).
1273
1274 2011-04-04  Steve Falkenburg  <sfalken@apple.com>
1275
1276         Reviewed by Adam Roben.
1277
1278         Remove unused AnalyzeWithLargeStack code from Windows build files
1279         https://bugs.webkit.org/show_bug.cgi?id=57771
1280         
1281         This was used for us to build with prefast automatically,
1282         but it is out-of-date and hasn't been used for some time.
1283         Removing completely for now.
1284
1285         * WebCore.vcproj/WebCore.vcproj:
1286         * WebCore.vcproj/WebCorePreBuild.cmd:
1287
1288 2011-04-01  Matthew Delaney  <mdelaney@apple.com>
1289
1290         Reviewed by Simon Fraser.
1291
1292         [CG] Do not accelerate small canvases
1293         https://bugs.webkit.org/show_bug.cgi?id=57596
1294
1295         No new tests. No outward behavior changes.
1296
1297         * platform/graphics/cg/ImageBufferCG.cpp:
1298
1299 2011-04-04  Adam Roben  <aroben@apple.com>
1300
1301         Attempted Mac build fix
1302
1303         * WebCore.xcodeproj/project.pbxproj: Marked PlatformCALayer.h and GraphicsLayerCA.h private
1304         so that WebKit can #include them.
1305
1306 2011-04-04  Malcolm MacLeod  <mmacleod@webmail.co.za>
1307
1308         Reviewed by Kevin Ollivier.
1309
1310         [wx] Implement support for temporary files.
1311         
1312         https://bugs.webkit.org/show_bug.cgi?id=57772
1313
1314         * platform/FileSystem.h:
1315         * platform/wx/FileSystemWx.cpp:
1316         (WebCore::getFileModificationTime):
1317         (WebCore::openTemporaryFile):
1318         (WebCore::closeFile):
1319         (WebCore::writeToFile):
1320
1321 2011-04-01  Oliver Hunt  <oliver@apple.com>
1322
1323         Reviewed by Geoffrey Garen.
1324
1325         Make StructureChain GC allocated
1326         https://bugs.webkit.org/show_bug.cgi?id=56695
1327
1328         Update for new Structure marking function
1329
1330         * bindings/js/JSDOMGlobalObject.cpp:
1331         (WebCore::JSDOMGlobalObject::markChildren):
1332
1333 2011-04-04  Pavel Feldman  <pfeldman@google.com>
1334
1335         Reviewed by Yury Semikhatsky.
1336
1337         Web Inspector: add support for the enumerated types in the protocol.
1338         https://bugs.webkit.org/show_bug.cgi?id=57761
1339
1340         * inspector/Inspector.json:
1341         * inspector/InspectorDebuggerAgent.cpp:
1342         (WebCore::InspectorDebuggerAgent::setPauseOnExceptions):
1343         * inspector/InspectorDebuggerAgent.h:
1344         * inspector/InspectorInstrumentation.cpp:
1345         (WebCore::InspectorInstrumentation::resourceRetrievedByXMLHttpRequestImpl):
1346         (WebCore::InspectorInstrumentation::scriptImportedImpl):
1347         * inspector/InspectorResourceAgent.cpp:
1348         (WebCore::cachedResourceTypeString):
1349         (WebCore::InspectorResourceAgent::didReceiveResponse):
1350         (WebCore::InspectorResourceAgent::setInitialScriptContent):
1351         (WebCore::InspectorResourceAgent::setInitialXHRContent):
1352         * inspector/InspectorResourceAgent.h:
1353         * inspector/front-end/ScriptsPanel.js:
1354         * inspector/generate-inspector-idl:
1355
1356 2011-04-04  Yury Semikhatsky  <yurys@chromium.org>
1357
1358         Reviewed by Pavel Feldman.
1359
1360         Web Inspector: InspectorRuntimeAgent should not depend on Page
1361         https://bugs.webkit.org/show_bug.cgi?id=57759
1362
1363         Descendants of InspectorRuntimeAgent should implement a method providing access to the default
1364         inspected state used for console evaluations.
1365
1366         * inspector/InspectorAgent.cpp:
1367         (WebCore::InspectorAgent::InspectorAgent): runtime agent is created and deleted along with other agents.
1368         (WebCore::InspectorAgent::setFrontend):
1369         * inspector/InspectorAgent.h:
1370         * inspector/InspectorRuntimeAgent.cpp:
1371         (WebCore::InspectorRuntimeAgent::create):
1372         (WebCore::InspectorRuntimeAgent::InspectorRuntimeAgent):
1373         (WebCore::InspectorRuntimeAgent::evaluate):
1374         * inspector/InspectorRuntimeAgent.h:
1375         (WebCore::InspectorRuntimeAgent::InspectedStateProvider::~InspectedStateProvider):
1376
1377 2011-04-04  Yong Li  <yoli@rim.com>
1378
1379         Reviewed by Antonio Gomes.
1380
1381         https://bugs.webkit.org/show_bug.cgi?id=55969
1382         Fix the issue that document state is not saved when
1383         going backward and ending up with error page.
1384
1385         Test: platform/qt/fast/history/back-to-unreachable-url-then-forward.html
1386
1387         (For manual test, load a non-existent html first, then load
1388         fast/history/resources/check-scroll-position.html, then go
1389         back and go forward. If it doesn't show "SUCCESS" at the bottom
1390         of the page, your browser has failed the test)
1391
1392         * loader/FrameLoader.cpp:
1393         (WebCore::FrameLoader::load):
1394
1395 2011-04-04  Sergio Villar Senin  <svillar@igalia.com>
1396
1397         Reviewed by Martin Robinson.
1398
1399         [GTK] Fix make distcheck for 1.4.0
1400         https://bugs.webkit.org/show_bug.cgi?id=57750
1401
1402         Added a missing header file to the Makefile
1403
1404         * GNUmakefile.am:
1405
1406 2011-04-04  Martin Robinson  <mrobinson@igalia.com>
1407
1408         Reviewed by Xan Lopez.
1409
1410         [GTK] http/tests/plugins/post-url-file.html fails on GTK+
1411         https://bugs.webkit.org/show_bug.cgi?id=55826
1412
1413         Correct the implementation of handlePostReadFile which uses GIO APIs and
1414         actually resizes the buffer to fit the entire size of the file data. This
1415         was likely leading to memory corruption until now.
1416
1417         * plugins/gtk/PluginViewGtk.cpp:
1418         (WebCore::PluginView::handlePostReadFile): Fix this method.
1419
1420 2011-04-04  Andrey Kosyakov  <caseq@chromium.org>
1421
1422         Reviewed by Yury Semikhatsky.
1423
1424         Web Inspector: [Extensions API] add notifications on panels shown/hidden
1425         https://bugs.webkit.org/show_bug.cgi?id=57752
1426
1427         * inspector/front-end/ExtensionAPI.js:
1428         (WebInspector.injectedExtensionAPI.PanelImpl):
1429         * inspector/front-end/ExtensionServer.js:
1430         (WebInspector.ExtensionServer.prototype.notifyPanelShown):
1431         (WebInspector.ExtensionServer.prototype.notifyPanelHidden):
1432         * inspector/front-end/Panel.js:
1433         (WebInspector.Panel.prototype.show):
1434         (WebInspector.Panel.prototype.hide):
1435
1436 2011-04-04  Pavel Podivilov  <podivilov@chromium.org>
1437
1438         Reviewed by Yury Semikhatsky.
1439
1440         Web Inspector: search in resources panel is broken.
1441         https://bugs.webkit.org/show_bug.cgi?id=57631
1442
1443         Search in resources panel should trigger source frame content load.
1444
1445         * inspector/front-end/Panel.js:
1446         (WebInspector.Panel.prototype.jumpToNextSearchResult):
1447         (WebInspector.Panel.prototype.jumpToPreviousSearchResult):
1448         * inspector/front-end/ResourcesPanel.js:
1449         * inspector/front-end/SearchController.js:
1450         (WebInspector.SearchController.prototype.handleShortcut):
1451         (WebInspector.SearchController.prototype.focusSearchField):
1452         * inspector/front-end/SourceFrame.js:
1453         (WebInspector.SourceFrame.prototype.show):
1454         (WebInspector.SourceFrame.prototype._ensureContentLoaded):
1455         (WebInspector.SourceFrame.prototype.performSearch):
1456
1457 2011-04-03  Eric Seidel  <eric@webkit.org>
1458
1459         Reviewed by Ryosuke Niwa.
1460
1461         Split out UnicodeBidi enum into its own header (to allow use in platform)
1462         https://bugs.webkit.org/show_bug.cgi?id=57722
1463
1464         unicode-bidi is a CSS concept.  However the same concept is really needed throughout
1465         the bidi code in platform as well.  So I'm moving the enum to platform.
1466         The only part of the enum which doesn't make much sense to platform/ is "normal".
1467
1468         * WebCore.xcodeproj/project.pbxproj:
1469         * css/CSSPrimitiveValueMappings.h:
1470         * platform/text/UnicodeBidi.h: Added.
1471         * rendering/style/RenderStyle.h:
1472         * rendering/style/RenderStyleConstants.h:
1473
1474 2011-04-04  Andrey Adaikin  <aandrey@google.com>
1475
1476         Reviewed by Yury Semikhatsky.
1477
1478         Web Inspector: Highlighted search tokens would not be shown on long lines in the text viewer
1479         https://bugs.webkit.org/show_bug.cgi?id=57749
1480
1481         * inspector/front-end/TextViewer.js:
1482         (WebInspector.TextEditorMainPanel.prototype.markAndRevealRange):
1483         (WebInspector.TextEditorMainPanel.prototype._paintLine):
1484
1485 2011-04-04  Alexander Pavlov  <apavlov@chromium.org>
1486
1487         Reviewed by Yury Semikhatsky.
1488
1489         Web Inspector: Incorrectly reports warning on missing/incorrect content-type for 304s
1490         https://bugs.webkit.org/show_bug.cgi?id=48525
1491
1492         * inspector/front-end/Resource.js:
1493         (WebInspector.Resource.prototype._mimeTypeIsConsistentWithType):
1494
1495 2011-04-01  Alexander Pavlov  <apavlov@chromium.org>
1496
1497         Reviewed by Yury Semikhatsky.
1498
1499         Web Inspector: appropriateSelectorForNode() invokes the "localName" getter on DOMNode rather than function
1500         https://bugs.webkit.org/show_bug.cgi?id=57632
1501
1502         Moved the affected method onto the DOMNode.prototype as "appropriateSelectorFor".
1503
1504         * inspector/front-end/DOMAgent.js:
1505         (WebInspector.DOMNode.prototype.appropriateSelectorFor):
1506         * inspector/front-end/EventListenersSidebarPane.js:
1507         ():
1508         * inspector/front-end/StylesSidebarPane.js:
1509         (WebInspector.StylesSidebarPane.prototype.addBlankSection):
1510         * inspector/front-end/utilities.js:
1511
1512 2011-04-04  Andrey Kosyakov  <caseq@chromium.org>
1513
1514         Unreviewed. Followup to an incomplete commit in r82806.
1515
1516         * inspector/front-end/ExtensionAPI.js:
1517         (WebInspector.injectedExtensionAPI.PanelWithSidebarImpl.prototype.createSidebarPane):
1518         (WebInspector.injectedExtensionAPI.ExtensionSidebarPaneImpl):
1519         (WebInspector.injectedExtensionAPI.ExtensionSidebarPaneImpl.prototype.setHeight):
1520         (WebInspector.injectedExtensionAPI.ExtensionSidebarPaneImpl.prototype.setExpression):
1521         (WebInspector.injectedExtensionAPI):
1522         * inspector/front-end/ExtensionPanel.js:
1523         (WebInspector.ExtensionSidebarPane):
1524         (WebInspector.ExtensionSidebarPane.prototype.setPage):
1525         (WebInspector.ExtensionSidebarPane.prototype._setObject):
1526         * inspector/front-end/ExtensionServer.js:
1527         (WebInspector.ExtensionServer):
1528         (WebInspector.ExtensionServer.prototype.notifyExtensionSidebarUpdated):
1529         (WebInspector.ExtensionServer.prototype._onCreatePanel):
1530         (WebInspector.ExtensionServer.prototype._onCreateSidebarPane):
1531         (WebInspector.ExtensionServer.prototype.createClientIframe):
1532         (WebInspector.ExtensionServer.prototype._onSetSidebarContent):
1533
1534 2011-04-04  Yury Semikhatsky  <yurys@chromium.org>
1535
1536         Unreviewed. Fix Qt minimal build.
1537
1538         * inspector/InspectorFrontendChannel.h:
1539
1540 2011-04-01  Sergey Vorobyev  <sergeyvorobyev@google.com>
1541
1542         Reviewed by Yury Semikhatsky.
1543
1544         Web Inspector: Separate sendMessageToFrontend function
1545         from InspectorClient to individual interface.
1546         https://bugs.webkit.org/show_bug.cgi?id=57548
1547
1548         Refactoring - covered with existing inspector tests.
1549
1550         * GNUmakefile.am:
1551         * WebCore.gypi:
1552         * WebCore.vcproj/WebCore.vcproj:
1553         * WebCore.xcodeproj/project.pbxproj:
1554         * inspector/CodeGeneratorInspector.pm:
1555         * inspector/InspectorClient.h:
1556         * inspector/InspectorFrontendChannel.h: Added.
1557         (WebCore::InspectorFrontendChannel::~InspectorFrontendChannel):
1558
1559 2011-04-04  Nico Weber  <thakis@chromium.org>
1560
1561         Reviewed by Eric Seidel.
1562
1563         Prefer a using directive over qualified names in LocalizedNumberICU.cpp
1564         https://bugs.webkit.org/show_bug.cgi?id=57742
1565
1566         Requested by ap in https://bugs.webkit.org/show_bug.cgi?id=57715
1567
1568         * platform/text/LocalizedNumberICU.cpp:
1569         (WebCore::createFormatterForCurrentLocale):
1570         (WebCore::numberFormatter):
1571         (WebCore::parseLocalizedNumber):
1572         (WebCore::formatLocalizedNumber):
1573
1574 2011-04-04  Andrey Adaikin  <aandrey@google.com>
1575
1576         Reviewed by Yury Semikhatsky.
1577
1578         Web Inspector: Breakpoints in the gutter stay static while editing the text
1579         https://bugs.webkit.org/show_bug.cgi?id=57616
1580
1581         * inspector/front-end/SourceFrame.js:
1582         (WebInspector.SourceFrame):
1583         (WebInspector.SourceFrame.prototype._saveViewerState):
1584         (WebInspector.SourceFrame.prototype._restoreViewerState):
1585         (WebInspector.SourceFrame.prototype._endEditing):
1586         (WebInspector.SourceFrame.prototype._lineNumberAfterEditing):
1587         (WebInspector.SourceFrame.prototype.addBreakpoint):
1588         (WebInspector.SourceFrame.prototype.removeBreakpoint):
1589         * inspector/front-end/TextViewer.js:
1590         (WebInspector.TextViewer.prototype._syncDecorationsForLine):
1591         (WebInspector):
1592         (WebInspector.TextEditorChunkedPanel.prototype.removeDecoration):
1593         (WebInspector.TextEditorChunkedPanel.prototype.makeLineAChunk):
1594         (WebInspector.TextEditorChunkedPanel.prototype._splitChunkOnALine):
1595         (WebInspector.TextEditorMainPanel.prototype._splitChunkOnALine):
1596
1597 2011-04-04  Ilya Tikhonovsky  <loislo@chromium.org>
1598
1599         Reviewed by Yury Semikhatsky.
1600
1601         Web Inspector: remove obsolete doc generating code from CodeGenerator.
1602         https://bugs.webkit.org/show_bug.cgi?id=57748
1603
1604         * inspector/CodeGeneratorInspector.pm:
1605
1606 2011-04-04  Andrey Kosyakov  <caseq@chromium.org>
1607
1608         Reviewed by Yury Semikhatsky.
1609
1610         Web Inspector: [Extensions API] Merge WatchExpressionSidebarPane into ExtensionSidebarPane
1611         https://bugs.webkit.org/show_bug.cgi?id=57622
1612
1613         Merged WatchExpressionSidebarPane into ExtensionSidebarPane, added setPage(url).
1614         Fixed wrong getter in schema (scripts -> elements)
1615
1616         * inspector/front-end/ExtensionAPI.js:
1617         (WebInspector.injectedExtensionAPI.WatchExpressionSidebarPaneImpl.prototype.setObject):
1618         (WebInspector.injectedExtensionAPI.WatchExpressionSidebarPaneImpl.prototype.setPage):
1619         * inspector/front-end/ExtensionAPISchema.json:
1620         * inspector/front-end/ExtensionServer.js:
1621         (WebInspector.ExtensionServer.prototype._onSetSidebarPage):
1622
1623 2011-04-04  Ilya Tikhonovsky  <loislo@chromium.org>
1624
1625         Reviewed by Pavel Feldman.
1626
1627         Web Inspector: introduce support of 'optional' flag for command arguments.
1628         https://bugs.webkit.org/show_bug.cgi?id=57698
1629
1630         * inspector/CodeGeneratorInspector.pm:
1631         * inspector/Inspector.json:
1632         * inspector/InspectorDebuggerAgent.cpp:
1633         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
1634         (WebCore::InspectorDebuggerAgent::setBreakpoint):
1635         (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame):
1636         * inspector/InspectorDebuggerAgent.h:
1637         * inspector/InspectorPageAgent.cpp:
1638         (WebCore::InspectorPageAgent::reloadPage):
1639         * inspector/InspectorPageAgent.h:
1640         * inspector/InspectorResourceAgent.cpp:
1641         (WebCore::InspectorResourceAgent::getResourceContent):
1642         * inspector/InspectorResourceAgent.h:
1643         * inspector/InspectorRuntimeAgent.cpp:
1644         (WebCore::InspectorRuntimeAgent::evaluate):
1645         * inspector/InspectorRuntimeAgent.h:
1646         * inspector/generate-inspector-idl:
1647
1648 2011-04-04  Yury Semikhatsky  <yurys@chromium.org>
1649
1650         Reviewed by Pavel Feldman.
1651
1652         Web Inspector: InjectedScriptManager should not try to access inspected window in case of workers
1653         https://bugs.webkit.org/show_bug.cgi?id=57637
1654
1655         * bindings/js/JSInjectedScriptManager.cpp:
1656         (WebCore::InjectedScriptManager::injectedScriptFor):
1657         * bindings/v8/custom/V8InjectedScriptManager.cpp:
1658         (WebCore::InjectedScriptManager::injectedScriptFor):
1659         * inspector/InjectedScript.cpp:
1660         (WebCore::InjectedScript::InjectedScript):
1661         (WebCore::InjectedScript::canAccessInspectedWindow):
1662         * inspector/InjectedScript.h:
1663         * inspector/InjectedScriptManager.cpp:
1664         (WebCore::InjectedScriptManager::createForPage):
1665         (WebCore::InjectedScriptManager::createForWorker):
1666         (WebCore::InjectedScriptManager::InjectedScriptManager): access check function is passed as a parameter to the constructor
1667         and it depends on which type of context we're inspecting(worker or page).
1668         (WebCore::InjectedScriptManager::canAccessInspectedWorkerContext):
1669         * inspector/InjectedScriptManager.h:
1670         * inspector/InspectorController.cpp:
1671         (WebCore::InspectorController::InspectorController):
1672
1673 2011-04-04  Ryuan Choi  <ryuan.choi@samsung.com>
1674
1675         Reviewed by Eric Seidel.
1676
1677         V8StringCallback.cpp requires V8Binding.h
1678         https://bugs.webkit.org/show_bug.cgi?id=57699
1679
1680         No new tests required because of just adding header file.
1681
1682         * bindings/scripts/CodeGeneratorV8.pm:
1683
1684 2011-04-03  Ryuan Choi  <ryuan.choi@samsung.com>
1685
1686         Reviewed by Eric Seidel.
1687
1688         [CMAKE] Clean duplicated files in WebCore_Sources
1689         https://bugs.webkit.org/show_bug.cgi?id=57741
1690
1691         No new tests, Only duplicated files were removed.
1692
1693         * CMakeLists.txt:
1694
1695 2011-04-03  Luke Macpherson   <macpherson@chromium.org>
1696
1697         Reviewed by Darin Adler.
1698
1699         Fix 2-space indentation introduced in bug 54706.
1700         https://bugs.webkit.org/show_bug.cgi?id=57740
1701
1702         No new tests - whitespace changes only.
1703
1704         * css/CSSStyleSelector.cpp:
1705         (WebCore::CSSStyleSelector::applyProperty):
1706         Convert 2-space indentation to 4-space indentation.
1707
1708 2011-04-03  Luke Macpherson   <macpherson@chromium.org>
1709
1710         Reviewed by Dimitri Glazkov.
1711
1712         Make CSSStyleApplyProperty non-copyable
1713         https://bugs.webkit.org/show_bug.cgi?id=57738
1714
1715         No new functionality added so no new tests required.
1716
1717         * css/CSSStyleApplyProperty.h:
1718         Added WTF_MAKE_NONCOPYABLE(CSSStyleApplyProperty) to ensure singleton stays single.
1719
1720 2011-04-03  Dan Bernstein  <mitz@apple.com>
1721
1722         Reviewed by Maciej Stachowiak.
1723
1724         fast/images/extra-image-in-image-document.html crashes when run after embed-image.html
1725         https://bugs.webkit.org/show_bug.cgi?id=57733
1726
1727         The crash happens because resetting the page scale as part of preparing the WebView for the
1728         next test triggered layout, which in turn caused a plug-in to make a resource request, and
1729         DumpRenderTree's delegate to be dispatched. The delegate doesn’t expect to be called between
1730         tests, and it references the layout test controller, which is null.
1731
1732         * page/Frame.cpp:
1733         (WebCore::Frame::scalePage): Avoid an unnecessary layout if the page scale isn’t changing. This
1734         is more efficient, and has the side effect of avoiding the crash in DumpRenderTree, although
1735         DumpRenderTree could still crash when after a test with disabled plug-ins and a non-1 page scale.
1736         I think there are currently no such tests, so I am not fixing DumpRenderTree.
1737
1738 2011-04-03  Eric Seidel  <eric@webkit.org>
1739
1740         Reviewed by Ryosuke Niwa.
1741
1742         Teach InlineIterator how to work from any root, not just a RenderBlock
1743         https://bugs.webkit.org/show_bug.cgi?id=57726
1744
1745         For implementing bidi-unicode: isolate, we need to be able to run the
1746         bidi algorithm over a subtree of inlines, not just from a block root.
1747         This is the first step in making this possible.
1748
1749         * rendering/InlineIterator.h:
1750         (WebCore::InlineIterator::InlineIterator):
1751         (WebCore::InlineIterator::root):
1752         (WebCore::bidiNext):
1753         (WebCore::bidiFirst):
1754         (WebCore::InlineIterator::increment):
1755         (WebCore::InlineBidiResolver::appendRun):
1756         * rendering/RenderBlockLineLayout.cpp:
1757         (WebCore::RenderBlock::findNextLineBreak):
1758
1759 2011-04-03  Eric Seidel  <eric@webkit.org>
1760
1761         Reviewed by Dan Bernstein.
1762
1763         Split out handling of trailing spaces from layoutInlineChildren
1764         https://bugs.webkit.org/show_bug.cgi?id=57432
1765
1766         There is much more we could split out from this function, but this is a start.
1767
1768         I suspect this is very hot code.  Hopefully the compiler will do the right thing.
1769         If it doesn't the Chromium PLT bots will tell us.
1770
1771         * rendering/RenderBlock.h:
1772         * rendering/RenderBlockLineLayout.cpp:
1773         (WebCore::RenderBlock::handleTrailingSpaces):
1774         (WebCore::RenderBlock::layoutInlineChildren):
1775
1776 2011-03-21  Ryosuke Niwa  <rniwa@webkit.org>
1777
1778         Reviewed by Eric Seidel.
1779
1780         editing commands shouldn't run when there's no body
1781         https://bugs.webkit.org/show_bug.cgi?id=56771
1782
1783         The bug was caused by WebKit's not checking the existence of root editable element
1784         in enabled* functions. Although isContentEditable returns true whenever we're in design mode,
1785         we should not run editing commands in a document without a body element editable because
1786         doing so results in appending a non-body element to the document node.
1787
1788         Fixed the bug by modifying various enabled* functions to ensure we have a root editable element.
1789         New behavior tries to match that of Firefox except StyleWithCSS, which Firefox seems to ignore
1790         when there are no body element. Since StyleWithCSS is a document's state or property, we allow
1791         execCommand('StyleWithCSS') even in a document without a body element.
1792
1793         WebKit's and Firefox's behaviors also deviate in insert-image-with-selecting-document.html.
1794         Whereas WebKit respects selection set by script and ignores execCommand, Firefox modifies
1795         the selection when document.write("x") is ran and successfully inserts image.
1796
1797         Thus, empty-document-delete.html and empty-document-justify-right.html both pass on Firefox
1798         while empty-document-stylewithcss.html and insert-image-with-selecting-document.html both fail.
1799
1800         Since Internet Explorer does not allow execCommand to run under design mode properly, we could
1801         not test its behavior.
1802
1803         Tests: editing/editability/empty-document-delete.html
1804                editing/editability/empty-document-justify-right.html
1805                editing/editability/empty-document-stylewithcss.html
1806                editing/execCommand/insert-image-with-selecting-document.html
1807
1808         * editing/Editor.cpp:
1809         (WebCore::Editor::canEdit): Verify that the root editable element exists
1810         instead of just checking that selection endpoints are editable because
1811         selection endpoints could be document node without a body element in design mode
1812         and we don't want to consider such a document editable.
1813         (WebCore::Editor::canDelete): Ditto.
1814         * editing/EditorCommand.cpp:
1815         (WebCore::enabledInEditableText): Ditto.
1816         (WebCore::enabledInRichlyEditableText): Ditto.
1817         (WebCore::enabledDelete): Call enabledCut and enabledInEditableText instead
1818         of duplicating the code in order to fix the same bug.
1819
1820 2011-04-02  Dan Bernstein  <mitz@apple.com>
1821
1822         Reviewed by Maciej Stachowiak.
1823
1824         REGRESSION (r82786): Media controls render incorrectly on GTK and Qt
1825         https://bugs.webkit.org/show_bug.cgi?id=57719
1826
1827         r82786 exposed an incorrect assumption inRenderMediaControlTimeDisplay::layout()
1828         that the timeline container is the parent of the time display. This is not true
1829         with the GTK media style, where the current time display is an inline box, and
1830         thus wrapped in an anonymous flexible box. The code was incorrectly considering
1831         the width of the anonymous box and deciding to hide the time display. Prior to
1832         r82786, this mistake was corrected by the call to computeLogicalWidth() in line layout.
1833
1834         * rendering/MediaControlElements.cpp:
1835         (WebCore::RenderMediaControlTimeDisplay::layout): Changed to skip past anonymous ancestors.
1836
1837 2011-04-02  Nico Weber  <thakis@chromium.org>
1838
1839         Reviewed by Adam Barth.
1840
1841         Explicitly use icu namespace for ports building with U_USING_ICU_NAMESPACE=0
1842
1843         By default, ICU includes |using namespace icu;| in its header files
1844         for backwards compatibility. Clients can define
1845         U_USING_ICU_NAMESPACE=0 to tell ICU to not do this. Prefixing all ICU
1846         classes with |icu::| makes this file compile no matter what
1847         U_USING_ICU_NAMESPACE is set to.
1848
1849         https://bugs.webkit.org/show_bug.cgi?id=57715
1850
1851         * platform/text/LocalizedNumberICU.cpp:
1852         (WebCore::createFormatterForCurrentLocale):
1853         (WebCore::numberFormatter):
1854         (WebCore::parseLocalizedNumber):
1855         (WebCore::formatLocalizedNumber):
1856
1857 2011-04-02  Dan Bernstein  <mitz@apple.com>
1858
1859         Reviewed by Dave Hyatt.
1860
1861         Remove an unnecessary extra computeLogicalWidth() from line layout
1862         https://bugs.webkit.org/show_bug.cgi?id=57711
1863
1864         Changes in behavior (MathML progression) covered by existing layout tests.
1865
1866         * rendering/RenderBlockLineLayout.cpp:
1867         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Removed a
1868         call to computeLogicalWidth(). Because of <http://webkit.org/b/57700>, this
1869         actually prevents MathML rows from reverting to an incorrect width.
1870
1871 2011-04-02  Dan Bernstein  <mitz@apple.com>
1872
1873         Reviewed by Beth Dakin.
1874
1875         <details> marker loses its margin
1876         https://bugs.webkit.org/show_bug.cgi?id=57713
1877
1878         * rendering/RenderDetails.cpp:
1879         (WebCore::RenderDetails::computePreferredLogicalWidths): Override to update
1880         the marker location.
1881         * rendering/RenderDetails.h:
1882         (WebCore::RenderDetails::renderName): Made private.
1883         (WebCore::RenderDetails::isDetails): Ditto.
1884         * rendering/RenderDetailsMarker.cpp:
1885         (WebCore::RenderDetailsMarker::computePreferredLogicalWidths): Set the margins
1886         in the style, like RenderListMarker does.
1887         (WebCore::RenderDetailsMarker::layout): Set the margins from the style.
1888
1889 2011-04-02  Andy Estes  <aestes@apple.com>
1890
1891         Reviewed by Oliver Hunt.
1892
1893         REGRESSION (r69237): Black border around map elements while using an image map on Mac platform
1894         https://bugs.webkit.org/show_bug.cgi?id=52518
1895
1896         Test: fast/images/imagemap-focus-ring-zero-outline-width.html
1897
1898         * rendering/RenderImage.cpp:
1899         (WebCore::RenderImage::paintAreaElementFocusRing): Return early if outlineWidth is 0.
1900
1901 2011-04-02  Beth Dakin  <bdakin@apple.com>
1902
1903         Reviewed by Sam Weinig.
1904
1905         https://bugs.webkit.org/show_bug.cgi?id=57605
1906         Frame::pageScaleFactor() should not affect getBoundingClientRect() or 
1907         getClientRects()
1908         -and corresponding-
1909         <rdar://problem/9194541>
1910
1911         New functions adjust*ForPageScale() are analogous to adjust*ForAbsoluteZoom().
1912         * dom/Element.cpp:
1913         (WebCore::Element::getClientRects):
1914         (WebCore::Element::getBoundingClientRect):
1915         * dom/Range.cpp:
1916         (WebCore::adjustFloatQuadsForScrollAndAbsoluteZoomAndPageScale):
1917         (WebCore::Range::getBorderAndTextQuads):
1918         * rendering/RenderObject.h:
1919         (WebCore::adjustFloatPointForPageScale):
1920         (WebCore::adjustFloatQuadForPageScale):
1921         (WebCore::adjustFloatRectForPageScale):
1922
1923 2011-04-02  Dan Bernstein  <mitz@apple.com>
1924
1925         Reverted r82775 due to changes in <details> test results, which are
1926         likely progressions.
1927
1928         * rendering/RenderBlockLineLayout.cpp:
1929         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Removed a
1930
1931 2011-04-02  Dan Bernstein  <mitz@apple.com>
1932
1933         Reviewed by Dave Hyatt.
1934
1935         Remove an unnecessary extra computeLogicalWidth() from line layout
1936         https://bugs.webkit.org/show_bug.cgi?id=57711
1937
1938         Changes in behavior (MathML progression) covered by existing layout tests.
1939
1940         * rendering/RenderBlockLineLayout.cpp:
1941         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Removed a
1942         call to computeLogicalWidth(). Because of <http://webkit.org/b/57700>, this
1943         actually prevents MathML rows from reverting to an incorrect width.
1944
1945 2011-04-02  Ryuan Choi  <ryuan.choi@samsung.com>
1946
1947         Reviewed by Martin Robinson.
1948
1949         [GTK] Fix leaked pointer in FontGtk.cpp
1950         https://bugs.webkit.org/show_bug.cgi?id=57307
1951
1952         Fix a memory leak.
1953
1954         No new functionality, so no new tests.
1955
1956         * platform/graphics/gtk/FontGtk.cpp:
1957         (WebCore::utf16ToUtf8): Rename utf16_to_utf8 and fix indentation.
1958         (WebCore::convertUniCharToUTF8):
1959
1960 2011-04-02  Ilya Tikhonovsky  <loislo@chromium.org>
1961
1962         Reviewed by Pavel Feldman.
1963
1964         Web Inspector: we should be able to have in and out arguments of a command with same name.
1965         https://bugs.webkit.org/show_bug.cgi?id=57701
1966
1967         * inspector/CodeGeneratorInspector.pm:
1968         * inspector/Inspector.json:
1969
1970 2011-04-01  Ilya Tikhonovsky  <loislo@chromium.org>
1971
1972         Not reviewed trivial change.
1973
1974         Web Inspector: The page agent should be enabled even if JAVASCRIPT_DEBUGGER is off.
1975         Followup change for r82281.
1976         https://bugs.webkit.org/show_bug.cgi?id=57327
1977
1978         * inspector/InspectorPageAgent.cpp:
1979         * inspector/InspectorPageAgent.h:
1980
1981 2011-04-01  Michael Saboff  <msaboff@apple.com>
1982
1983         Reviewed by Darin Adler.
1984
1985         Cached Resource Overhead Space Usage and Accounting Inaccurate
1986         https://bugs.webkit.org/show_bug.cgi?id=57488
1987
1988         Fixed windows test failures.
1989         Changed the fixed overhead value for ResourceResponse to 3800 bytes.
1990         Modified ResourceResponse::platformLazyInit() to handle "base" level
1991         attributes or all attributes.  The base attributes, like URL, status
1992         code, mime type and a few header fields (mostly cache related) are
1993         suitable for most resources.  This reduces the per resource memory
1994         needs by over 1K bytes per resource thus saving memory in the cache.
1995         Collectively, these two changes bring the overhead memory calculation
1996         in line with reality.
1997
1998         No new tests added due to existing tests cover areas of change and
1999         there is no functional change.  The change is limited to reducing 
2000         memory usage along existing paths.
2001
2002         * loader/cache/CachedResource.cpp:
2003         (WebCore::CachedResource::canUseCacheValidator):
2004         * platform/network/ResourceResponseBase.cpp:
2005         (WebCore::ResourceResponseBase::adopt):
2006         (WebCore::ResourceResponseBase::isHTTP):
2007         (WebCore::ResourceResponseBase::url):
2008         (WebCore::ResourceResponseBase::setURL):
2009         (WebCore::ResourceResponseBase::mimeType):
2010         (WebCore::ResourceResponseBase::setMimeType):
2011         (WebCore::ResourceResponseBase::expectedContentLength):
2012         (WebCore::ResourceResponseBase::setExpectedContentLength):
2013         (WebCore::ResourceResponseBase::textEncodingName):
2014         (WebCore::ResourceResponseBase::setTextEncodingName):
2015         (WebCore::ResourceResponseBase::suggestedFilename):
2016         (WebCore::ResourceResponseBase::setSuggestedFilename):
2017         (WebCore::ResourceResponseBase::httpStatusCode):
2018         (WebCore::ResourceResponseBase::setHTTPStatusCode):
2019         (WebCore::ResourceResponseBase::httpStatusText):
2020         (WebCore::ResourceResponseBase::setHTTPStatusText):
2021         (WebCore::ResourceResponseBase::httpHeaderField):
2022         (WebCore::ResourceResponseBase::setHTTPHeaderField):
2023         (WebCore::ResourceResponseBase::httpHeaderFields):
2024         (WebCore::ResourceResponseBase::parseCacheControlDirectives):
2025         (WebCore::ResourceResponseBase::hasCacheValidatorFields):
2026         (WebCore::ResourceResponseBase::date):
2027         (WebCore::ResourceResponseBase::age):
2028         (WebCore::ResourceResponseBase::expires):
2029         (WebCore::ResourceResponseBase::lastModified):
2030         (WebCore::ResourceResponseBase::isAttachment):
2031         (WebCore::ResourceResponseBase::setLastModifiedDate):
2032         (WebCore::ResourceResponseBase::lastModifiedDate):
2033         (WebCore::ResourceResponseBase::wasCached):
2034         (WebCore::ResourceResponseBase::connectionReused):
2035         (WebCore::ResourceResponseBase::setConnectionReused):
2036         (WebCore::ResourceResponseBase::connectionID):
2037         (WebCore::ResourceResponseBase::setConnectionID):
2038         (WebCore::ResourceResponseBase::resourceLoadTiming):
2039         (WebCore::ResourceResponseBase::setResourceLoadTiming):
2040         (WebCore::ResourceResponseBase::resourceLoadInfo):
2041         (WebCore::ResourceResponseBase::setResourceLoadInfo):
2042         (WebCore::ResourceResponseBase::lazyInit):
2043         * platform/network/ResourceResponseBase.h:
2044         (WebCore::ResourceResponseBase::platformLazyInit):
2045         * platform/network/cf/ResourceResponse.h:
2046         (WebCore::ResourceResponse::ResourceResponse):
2047         (WebCore::ResourceResponse::memoryUsage):
2048         * platform/network/cf/ResourceResponseCFNet.cpp:
2049         (WebCore::ResourceResponse::platformLazyInit):
2050         * platform/network/mac/ResourceResponseMac.mm:
2051         (WebCore::ResourceResponse::platformLazyInit):
2052
2053 2011-04-01  Anantanarayanan G Iyengar  <ananta@chromium.org>
2054
2055         Reviewed by Adam Barth.
2056
2057         https://bugs.webkit.org/show_bug.cgi?id=45855
2058         Windowless plugins added dynamically to the DOM should receive paint events.
2059         This is done by ensuring that the plugin widget is marked for painting when
2060         it is added.
2061
2062         Test: plugins/windowless_plugin_paint_test.html
2063
2064         * rendering/RenderWidget.cpp:
2065         (WebCore::RenderWidget::setWidget):
2066
2067 2011-04-01  Mike Reed  <reed@google.com>
2068
2069         Reviewed by James Robinson.
2070
2071         always use native font rendering on skia_gpu
2072         fixes a crash when SKIA_GPU is enabled, as we can't call getTopPlatformDevice()
2073         https://bugs.webkit.org/show_bug.cgi?id=57663
2074
2075         No new tests. existing rendering tests will exercise this
2076
2077         * platform/graphics/skia/PlatformContextSkia.cpp:
2078         (WebCore::PlatformContextSkia::isNativeFontRenderingAllowed):
2079
2080 2011-04-01  Sheriff Bot  <webkit.review.bot@gmail.com>
2081
2082         Unreviewed, rolling out r82712, r82729, and r82746.
2083         http://trac.webkit.org/changeset/82712
2084         http://trac.webkit.org/changeset/82729
2085         http://trac.webkit.org/changeset/82746
2086         https://bugs.webkit.org/show_bug.cgi?id=57682
2087
2088         fast/frames/frame-programmatic-noresize.html is failing on
2089         Windows bots. Will look into this offline. (Requested by dydx
2090         on #webkit).
2091
2092         * html/HTMLFrameElement.cpp:
2093         (WebCore::HTMLFrameElement::HTMLFrameElement):
2094         (WebCore::HTMLFrameElement::attach):
2095         (WebCore::HTMLFrameElement::parseMappedAttribute):
2096         * html/HTMLFrameElement.h:
2097         (WebCore::HTMLFrameElement::noResize):
2098         * rendering/RenderFrame.cpp:
2099         * rendering/RenderFrame.h:
2100         * rendering/RenderFrameSet.cpp:
2101         * rendering/RenderFrameSet.h:
2102
2103 2011-04-01  Adam Barth  <abarth@webkit.org>
2104
2105         Reviewed by Tony Chang.
2106
2107         Valgrind error in _ZN7WebCore8Document11updateTitleERKNS_19StringWithDirectionE
2108         https://bugs.webkit.org/show_bug.cgi?id=57656
2109
2110         We should initialize memory when constructing objects.
2111
2112         * platform/text/StringWithDirection.h:
2113         (WebCore::StringWithDirection::StringWithDirection):
2114
2115 2011-04-01  Jer Noble  <jer.noble@apple.com>
2116
2117         Reviewed by Darin Adler.
2118
2119         WebKit2: Link from PDF opens in a new tab instead of in the same tab
2120         https://bugs.webkit.org/show_bug.cgi?id=57528
2121
2122         * WebCore.exp.in: Export MouseEvent::create().
2123
2124 2011-04-01  John Bauman  <jbauman@chromium.org>
2125
2126         Reviewed by Kenneth Russell.
2127
2128         Avoid decoding images twice in texImage2D
2129         https://bugs.webkit.org/show_bug.cgi?id=51498
2130
2131         Make sure to redecode the image only if it's not opaque and texImage2D
2132         wouldn't premultiply it anyway.
2133
2134         * platform/graphics/BitmapImage.h:
2135         * platform/graphics/cg/GraphicsContext3DCG.cpp:
2136         (WebCore::GraphicsContext3D::getImageData):
2137         * platform/graphics/skia/GraphicsContext3DSkia.cpp:
2138         (WebCore::GraphicsContext3D::getImageData):
2139
2140 2011-04-01  Alexey Proskuryakov  <ap@apple.com>
2141
2142         32-bit Mac build fix.
2143
2144         * dom/KeyboardEvent.h: (WebCore::KeypressCommand::KeypressCommand): Use 0U to index a String
2145         to avoid ambiguity.
2146
2147 2011-04-01  Alexey Proskuryakov  <ap@apple.com>
2148
2149         Reviewed by Darin Adler.
2150
2151         Make WebKit2 text input handling more like WebKit1
2152         https://bugs.webkit.org/show_bug.cgi?id=57649
2153
2154         * dom/KeyboardEvent.h: (WebCore::KeypressCommand::KeypressCommand): Put back the assertions
2155         we used to have. It is dangerous to confuse editor commands and selector names - besides the
2156         presence of a semicolon, they sometimes have different names, and WebKit2 failed to map those.
2157
2158 2011-04-01  Sheriff Bot  <webkit.review.bot@gmail.com>
2159
2160         Unreviewed, rolling out r82711.
2161         http://trac.webkit.org/changeset/82711
2162         https://bugs.webkit.org/show_bug.cgi?id=57657
2163
2164         Made every test crash on XP and Win7 (Requested by
2165         abarth|gardening on #webkit).
2166
2167         * loader/cache/CachedResource.cpp:
2168         (WebCore::CachedResource::canUseCacheValidator):
2169         * platform/network/ResourceResponseBase.cpp:
2170         (WebCore::ResourceResponseBase::adopt):
2171         (WebCore::ResourceResponseBase::isHTTP):
2172         (WebCore::ResourceResponseBase::url):
2173         (WebCore::ResourceResponseBase::setURL):
2174         (WebCore::ResourceResponseBase::mimeType):
2175         (WebCore::ResourceResponseBase::setMimeType):
2176         (WebCore::ResourceResponseBase::expectedContentLength):
2177         (WebCore::ResourceResponseBase::setExpectedContentLength):
2178         (WebCore::ResourceResponseBase::textEncodingName):
2179         (WebCore::ResourceResponseBase::setTextEncodingName):
2180         (WebCore::ResourceResponseBase::suggestedFilename):
2181         (WebCore::ResourceResponseBase::setSuggestedFilename):
2182         (WebCore::ResourceResponseBase::httpStatusCode):
2183         (WebCore::ResourceResponseBase::setHTTPStatusCode):
2184         (WebCore::ResourceResponseBase::httpStatusText):
2185         (WebCore::ResourceResponseBase::setHTTPStatusText):
2186         (WebCore::ResourceResponseBase::httpHeaderField):
2187         (WebCore::ResourceResponseBase::setHTTPHeaderField):
2188         (WebCore::ResourceResponseBase::httpHeaderFields):
2189         (WebCore::ResourceResponseBase::parseCacheControlDirectives):
2190         (WebCore::ResourceResponseBase::date):
2191         (WebCore::ResourceResponseBase::age):
2192         (WebCore::ResourceResponseBase::expires):
2193         (WebCore::ResourceResponseBase::lastModified):
2194         (WebCore::ResourceResponseBase::isAttachment):
2195         (WebCore::ResourceResponseBase::setLastModifiedDate):
2196         (WebCore::ResourceResponseBase::lastModifiedDate):
2197         (WebCore::ResourceResponseBase::wasCached):
2198         (WebCore::ResourceResponseBase::connectionReused):
2199         (WebCore::ResourceResponseBase::setConnectionReused):
2200         (WebCore::ResourceResponseBase::connectionID):
2201         (WebCore::ResourceResponseBase::setConnectionID):
2202         (WebCore::ResourceResponseBase::resourceLoadTiming):
2203         (WebCore::ResourceResponseBase::setResourceLoadTiming):
2204         (WebCore::ResourceResponseBase::resourceLoadInfo):
2205         (WebCore::ResourceResponseBase::setResourceLoadInfo):
2206         (WebCore::ResourceResponseBase::lazyInit):
2207         * platform/network/ResourceResponseBase.h:
2208         (WebCore::ResourceResponseBase::platformLazyInit):
2209         * platform/network/cf/ResourceResponse.h:
2210         (WebCore::ResourceResponse::ResourceResponse):
2211         (WebCore::ResourceResponse::memoryUsage):
2212         * platform/network/cf/ResourceResponseCFNet.cpp:
2213         (WebCore::ResourceResponse::platformLazyInit):
2214         * platform/network/mac/ResourceResponseMac.mm:
2215         (WebCore::ResourceResponse::platformLazyInit):
2216
2217 2011-04-01  Matthew Delaney  <mdelaney@apple.com>
2218
2219         Reviewed by Simon Fraser.
2220
2221         Behavior of isAccelerated() for a IOSurface-backed canvas should be consistent with accelerated status of its ImageBuffer
2222         https://bugs.webkit.org/show_bug.cgi?id=57651
2223
2224         No new tests. This patch does not affect outward behavior.
2225
2226         * html/canvas/CanvasRenderingContext2D.cpp:
2227         (WebCore::CanvasRenderingContext2D::isAccelerated):
2228         * platform/graphics/ImageBuffer.h:
2229         (WebCore::ImageBuffer::isAccelerated):
2230
2231 2011-04-01  Daniel Bates  <dbates@rim.com>
2232
2233         Reviewed by Darin Adler.
2234
2235         Frame's noResize attribute can not be set by JavaScript
2236         https://bugs.webkit.org/show_bug.cgi?id=14845
2237
2238         Tests: fast/frames/frame-inherit-noresize-from-frameset.html
2239                fast/frames/frame-programmatic-noresize.html
2240                fast/frames/frame-with-noresize-can-be-resized-after-removal-of-noresize.html
2241                fast/frames/frame-with-noresize-can-be-resized-after-setting-noResize-to-false.html
2242
2243         Implements support to programmatically allow and disallow frame resizing.
2244
2245         Currently, HTMLFrameElement::parseMappedAttribute() is hardcoded to disallow frame resize (i.e.
2246         m_noResize = true) when either the noresize DOM attribute is specified (or existed at some
2247         point in time) or the value of the noResize attribute is modified. Instead we should allow/disallow
2248         frame resize depending on the presence of the noresize DOM attribute/the value of the noResize
2249         attribute.
2250
2251         * html/HTMLFrameElement.cpp:
2252         (WebCore::HTMLFrameElement::HTMLFrameElement):
2253         (WebCore::HTMLFrameElement::noResize): Made this a non-inline function since this
2254         code path isn't performance critical.
2255         (WebCore::HTMLFrameElement::attach): Removed code to inherit noresize attribute from
2256         parent <frameset> since this functionality is part of RenderFrameSet::computeEdgeInfo().
2257         (WebCore::HTMLFrameElement::parseMappedAttribute):
2258         * html/HTMLFrameElement.h:
2259         * rendering/RenderFrame.cpp:
2260         (WebCore::RenderFrame::updateFromElement): Added.
2261         * rendering/RenderFrame.h:
2262         * rendering/RenderFrameSet.cpp:
2263         (WebCore::RenderFrameSet::notifyFrameEdgeInfoChanged): Added.
2264         * rendering/RenderFrameSet.h:
2265
2266 2011-04-01  Michael Saboff  <msaboff@apple.com>
2267
2268         Reviewed by Darin Adler.
2269
2270         Cached Resource Overhead Space Usage and Accounting Inaccurate
2271         https://bugs.webkit.org/show_bug.cgi?id=57488
2272
2273         Changed the fixed overhead value for ResourceResponse to 3800 bytes.
2274         Modified ResourceResponse::platformLazyInit() to handle "base" level
2275         attributes or all attributes.  The base attributes, like URL, status
2276         code, mime type and a few header fields (mostly cache related) are
2277         suitable for most resources.  This reduces the per resource memory
2278         needs by over 1K bytes per resource thus saving memory in the cache.
2279         Collectively, these two changes bring the overhead memory calculation
2280         in line with reality.
2281
2282         No new tests added due to existing tests cover areas of change and
2283         there is no functional change.  The change is limited to reducing 
2284         memory usage along existing paths.
2285
2286         * loader/cache/CachedResource.cpp:
2287         (WebCore::CachedResource::canUseCacheValidator):
2288         * platform/network/ResourceResponseBase.cpp:
2289         (WebCore::ResourceResponseBase::isHTTP):
2290         (WebCore::ResourceResponseBase::url):
2291         (WebCore::ResourceResponseBase::setURL):
2292         (WebCore::ResourceResponseBase::mimeType):
2293         (WebCore::ResourceResponseBase::setMimeType):
2294         (WebCore::ResourceResponseBase::expectedContentLength):
2295         (WebCore::ResourceResponseBase::setExpectedContentLength):
2296         (WebCore::ResourceResponseBase::textEncodingName):
2297         (WebCore::ResourceResponseBase::setTextEncodingName):
2298         (WebCore::ResourceResponseBase::suggestedFilename):
2299         (WebCore::ResourceResponseBase::setSuggestedFilename):
2300         (WebCore::ResourceResponseBase::httpStatusCode):
2301         (WebCore::ResourceResponseBase::setHTTPStatusCode):
2302         (WebCore::ResourceResponseBase::httpHeaderField):
2303         (WebCore::ResourceResponseBase::setHTTPHeaderField):
2304         (WebCore::ResourceResponseBase::parseCacheControlDirectives):
2305         (WebCore::ResourceResponseBase::hasCacheValidatorFields):
2306         (WebCore::ResourceResponseBase::date):
2307         (WebCore::ResourceResponseBase::age):
2308         (WebCore::ResourceResponseBase::expires):
2309         (WebCore::ResourceResponseBase::lastModified):
2310         (WebCore::ResourceResponseBase::lazyInit):
2311         * platform/network/ResourceResponseBase.h:
2312         (WebCore::ResourceResponseBase::platformLazyInit):
2313         * platform/network/cf/ResourceResponse.h:
2314         (WebCore::ResourceResponse::ResourceResponse):
2315         (WebCore::ResourceResponse::memoryUsage):
2316         * platform/network/cf/ResourceResponseCFNet.cpp:
2317         * platform/network/mac/ResourceResponseMac.mm:
2318         (WebCore::ResourceResponse::platformLazyInit):
2319
2320 2011-04-01  Timothy Hatcher  <timothy@apple.com>
2321
2322         Make momentum scroll event latching work in WebKit2 on Mac.
2323
2324         <rdar://problem/8751861>
2325
2326         Reviewed by Darin Adler.
2327
2328         * WebCore.exp.in: Remove _wkIsLatchingWheelEvent, add _wkGetNSEventMomentumPhase.
2329         * page/EventHandler.cpp:
2330         (WebCore::EventHandler::handleWheelEvent): Set m_useLatchedWheelEventNode based on the
2331         event's momentumPhase.
2332         * page/mac/EventHandlerMac.mm:
2333         (WebCore::EventHandler::wheelEvent): Remove the setting of m_useLatchedWheelEventNode.
2334         It is now done in EventHandler::handleWheelEvent.
2335         * platform/mac/WebCoreSystemInterface.h: Remove wkIsLatchingWheelEvent, add wkGetNSEventMomentumPhase.
2336         * platform/mac/WebCoreSystemInterface.mm: Ditto.
2337         * platform/mac/WheelEventMac.mm:
2338         (WebCore::momentumPhaseForEvent): Return a phase on older Mac system by using wkGetNSEventMomentumPhase.
2339
2340 2011-04-01  Steve Block  <steveblock@google.com>
2341
2342         Reviewed by Jeremy Orlow.
2343
2344         JavaClass should be an interface and free of JNI types
2345         https://bugs.webkit.org/show_bug.cgi?id=57533
2346
2347         This patch fixes JavaClass for V8 only.
2348
2349         It factors out a JavaClass interface which does not use JNI types.
2350         This will allow the Java bridge to be used with objects that
2351         don't use JNI directly. The existing jobject-backed
2352         implementation is moved to a new JavaClassJobject class which
2353         implements the interface.
2354
2355         No new tests, refactoring only.
2356
2357         * Android.v8bindings.mk:
2358         * WebCore.gypi:
2359         * bridge/jni/v8/JavaClassJobjectV8.cpp:
2360         (JavaClassJobject::JavaClassJobject):
2361         (JavaClassJobject::~JavaClassJobject):
2362         (JavaClassJobject::methodsNamed):
2363         (JavaClassJobject::fieldNamed):
2364         * bridge/jni/v8/JavaClassJobjectV8.h: Copied from Source/WebCore/bridge/jni/v8/JavaClassV8.h.
2365         * bridge/jni/v8/JavaClassV8.h:
2366         (JSC::Bindings::JavaClass::~JavaClass):
2367         * bridge/jni/v8/JavaInstanceV8.cpp:
2368         (JavaInstance::getClass):
2369
2370 2011-04-01  Jaehun Lim  <ljaehun.lim@samsung.com>
2371
2372         Unreviewed build fix.
2373
2374         Fix build break when font backend is Pango.
2375         Pango is missed in changeset 80589.
2376
2377         https://bugs.webkit.org/show_bug.cgi?id=57609
2378
2379         * platform/graphics/pango/FontPlatformData.h:
2380         (WebCore::FontPlatformData::setOrientation):
2381
2382 2011-04-01  Sheriff Bot  <webkit.review.bot@gmail.com>
2383
2384         Unreviewed, rolling out r82687.
2385         http://trac.webkit.org/changeset/82687
2386         https://bugs.webkit.org/show_bug.cgi?id=57643
2387
2388         This patch broke accessibility aria-treegrid test in Mac
2389         (Requested by msanchez on #webkit).
2390
2391         * accessibility/AccessibilityARIAGrid.cpp:
2392         * accessibility/AccessibilityARIAGrid.h:
2393         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
2394         (atkRole):
2395         * accessibility/mac/AccessibilityObjectWrapper.mm:
2396
2397 2011-03-31  Abhishek Arya  <inferno@chromium.org>
2398
2399         Reviewed by Andreas Kling.
2400
2401         Whenever a relayout is trigger for SVGPath, make sure
2402         to clear its previous marker layout info. This helps
2403         to prevent removed markers from being used.
2404         https://bugs.webkit.org/show_bug.cgi?id=57492
2405
2406         Test: svg/dom/path-marker-removed-crash.svg
2407
2408         * rendering/svg/RenderSVGPath.cpp:
2409         (WebCore::RenderSVGPath::layout):
2410         * rendering/svg/SVGMarkerLayoutInfo.cpp:
2411         (WebCore::SVGMarkerLayoutInfo::clear):
2412         * rendering/svg/SVGMarkerLayoutInfo.h:
2413
2414 2011-04-01  Rob Buis  <rwlbuis@gmail.com>
2415
2416         Reviewed by Nikolas Zimmermann.
2417
2418         https://bugs.webkit.org/show_bug.cgi?id=55750
2419         SVG <image> referenced by <use> is displayed incorrectly
2420
2421         Reintroduce old behaviour for valid base URI, for invalid
2422         keep using document base URI.
2423         Fixes regression of W3C-SVG-1.1/struct-image-07-t.svg.
2424
2425         Test: svg/custom/image-base-uri.svg
2426
2427         * svg/SVGImageLoader.cpp:
2428         (WebCore::SVGImageLoader::sourceURI):
2429
2430 2011-04-01  Mario Sanchez Prada  <msanchez@igalia.com>
2431
2432         Reviewed by Chris Fleizach.
2433
2434         ARIA Grid tables should return GridRole in roleValue() method
2435         https://bugs.webkit.org/show_bug.cgi?id=57614
2436
2437         This change does not need any test since it doesn't change anything
2438         from the point of view of the consumers (Assistive Technoglogies).
2439         It's just an internal change to simplify identifying HTML and ARIA
2440         tables by calling to the AccessibilityObject::roleValue method.
2441
2442         * accessibility/AccessibilityARIAGrid.h:
2443         * accessibility/AccessibilityARIAGrid.cpp:
2444         (WebCore::AccessibilityARIAGrid::roleValue): Return GridRole.
2445
2446         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
2447         (atkRole): Removed unneeded comment.
2448
2449         * accessibility/mac/AccessibilityObjectWrapper.mm: Map GridRole to
2450         NSAccessibilityTableRole, to keep the same behaviour.
2451
2452 2011-04-01  MORITA Hajime  <morrita@google.com>
2453
2454         Reviewed by Dimitri Glazkov.
2455
2456         <meter> can only support horizontal indicator
2457         https://bugs.webkit.org/show_bug.cgi?id=56001
2458
2459         - Removed code which deals with the direction and
2460           left the horizontal path.
2461         - Removed "horizontal" from related names which is now
2462           redundant.
2463         
2464         * css/CSSSelector.cpp:
2465         (WebCore::CSSSelector::pseudoId):
2466         (WebCore::nameToPseudoTypeMap):
2467         (WebCore::CSSSelector::extractPseudoType):
2468         * css/CSSSelector.h:
2469         * css/html.css:
2470         (meter::-webkit-meter-bar):
2471         (meter::-webkit-meter-optimum-value):
2472         (meter::-webkit-meter-suboptimal-value):
2473         (meter::-webkit-meter-even-less-good-value):
2474         * rendering/RenderMeter.cpp:
2475         (WebCore::RenderMeter::~RenderMeter):
2476         (WebCore::RenderMeter::createPart):
2477         (WebCore::RenderMeter::updateFromElement):
2478         (WebCore::RenderMeter::layoutParts):
2479         (WebCore::RenderMeter::styleDidChange):
2480         (WebCore::RenderMeter::shouldHaveParts):
2481         (WebCore::RenderMeter::valuePartRect):
2482         (WebCore::RenderMeter::valuePseudoId):
2483         (WebCore::RenderMeter::barPseudoId):
2484         (WebCore::RenderMeter::detachShadows):
2485         (WebCore::RenderMeter::updateShadows):
2486         * rendering/RenderMeter.h:
2487         (WebCore::RenderMeter::shadowAttached):
2488         * rendering/RenderTheme.cpp:
2489         (WebCore::RenderTheme::supportsMeter):
2490         * rendering/RenderTheme.h:
2491         * rendering/RenderThemeMac.h:
2492         * rendering/RenderThemeMac.mm:
2493         (WebCore::RenderThemeMac::paintMeter):
2494         (WebCore::RenderThemeMac::supportsMeter):
2495         * rendering/style/RenderStyleConstants.h:
2496
2497 2011-03-23  Pavel Podivilov  <podivilov@chromium.org>
2498
2499         Reviewed by Pavel Feldman.
2500
2501         Web Inspector: fix reveal line in formatted script.
2502         https://bugs.webkit.org/show_bug.cgi?id=56941
2503
2504         * inspector/front-end/BreakpointsSidebarPane.js:
2505         (WebInspector.JavaScriptBreakpointsSidebarPane):
2506         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointClicked):
2507         * inspector/front-end/DebuggerPresentationModel.js:
2508         (WebInspector.DebuggerPresentationModel.prototype.sourceFileForScriptURL):
2509         * inspector/front-end/NetworkPanel.js:
2510         (WebInspector.NetworkPanel.prototype.canShowAnchorLocation):
2511         (WebInspector.NetworkPanel.prototype.showAnchorLocation):
2512         * inspector/front-end/Panel.js:
2513         (WebInspector.Panel.prototype.canShowAnchorLocation):
2514         (WebInspector.Panel.prototype.showAnchorLocation):
2515         * inspector/front-end/ResourcesPanel.js:
2516         (WebInspector.ResourcesPanel.prototype.canShowAnchorLocation):
2517         (WebInspector.ResourcesPanel.prototype.showAnchorLocation):
2518         (WebInspector.ResourcesPanel.prototype.showResource):
2519         * inspector/front-end/ScriptsPanel.js:
2520         (WebInspector.ScriptsPanel):
2521         (WebInspector.ScriptsPanel.prototype.canShowAnchorLocation):
2522         (WebInspector.ScriptsPanel.prototype.showAnchorLocation):
2523         (WebInspector.ScriptsPanel.prototype._showSourceLine):
2524         * inspector/front-end/SourceFrame.js:
2525         (WebInspector.SourceFrame.prototype.highlightLine):
2526         (WebInspector.SourceFrame.prototype._createTextViewer):
2527         * inspector/front-end/inspector.js:
2528         (WebInspector.documentClick.followLink):
2529         (WebInspector.documentClick):
2530         (WebInspector._showAnchorLocation):
2531
2532 2011-04-01  Pavel Podivilov  <podivilov@chromium.org>
2533
2534         Reviewed by Yury Semikhatsky.
2535
2536         Web Inspector: make editScriptSource a Script's method.
2537         https://bugs.webkit.org/show_bug.cgi?id=57615
2538
2539         * inspector/front-end/DebuggerModel.js:
2540         (WebInspector.DebuggerModel.prototype.editScriptSource):
2541         (WebInspector.DebuggerModel.prototype._didEditScriptSource):
2542         * inspector/front-end/Script.js:
2543         (WebInspector.Script.prototype.requestSource):
2544         (WebInspector.Script.prototype.editSource):
2545
2546 2011-04-01  Pavel Feldman  <pfeldman@google.com>
2547
2548         Reviewed by Yury Semikhatsky.
2549
2550         Web Inspector: event should have "data" attribute, not "body"
2551         https://bugs.webkit.org/show_bug.cgi?id=57628
2552
2553         * inspector/CodeGeneratorInspector.pm:
2554
2555 2011-04-01  Pavel Podivilov  <podivilov@chromium.org>
2556
2557         Reviewed by Yury Semikhatsky.
2558
2559         Web Inspector: checkboxes are broken in xhr breakpoints sidebar pane.
2560         https://bugs.webkit.org/show_bug.cgi?id=57610
2561
2562         * inspector/front-end/BreakpointsSidebarPane.js:
2563         (WebInspector.XHRBreakpointsSidebarPane.prototype._checkboxClicked):
2564
2565 2011-04-01  Alexander Pavlov  <apavlov@chromium.org>
2566
2567         Reviewed by Yury Semikhatsky.
2568
2569         Web Inspector: up/down keys are not treating hex numbers properly while editing styles.
2570         https://bugs.webkit.org/show_bug.cgi?id=40522
2571
2572         Drive-by: fix inc/dec for numbers like ".5"
2573
2574         Test: inspector/styles/up-down-numerics-and-colors.html
2575
2576         * inspector/front-end/StylesSidebarPane.js:
2577         (WebInspector.StylePropertyTreeElement.prototype):
2578
2579 2011-03-30  Pavel Podivilov  <podivilov@chromium.org>
2580
2581         Reviewed by Pavel Feldman.
2582
2583         Web Inspector: remove dead code from Script.js.
2584         https://bugs.webkit.org/show_bug.cgi?id=57454
2585
2586         * inspector/front-end/DebuggerModel.js:
2587         (WebInspector.DebuggerModel.prototype._parsedScriptSource):
2588         (WebInspector.DebuggerModel.prototype._failedToParseScriptSource):
2589         * inspector/front-end/Script.js:
2590         (WebInspector.Script):
2591         (WebInspector.Script.prototype.requestSource.didGetScriptSource):
2592         (WebInspector.Script.prototype.requestSource):
2593
2594 2011-04-01  Sheriff Bot  <webkit.review.bot@gmail.com>
2595
2596         Unreviewed, rolling out r82667.
2597         http://trac.webkit.org/changeset/82667
2598         https://bugs.webkit.org/show_bug.cgi?id=57612
2599
2600         Breaks Leopard layout tests (Requested by podivilov on
2601         #webkit).
2602
2603         * GNUmakefile.am:
2604         * inspector/front-end/DebuggerPresentationModel.js:
2605         (WebInspector.DebuggerPresentationModel):
2606         (WebInspector.DebuggerPresentationModel.prototype.toggleFormatSourceFiles):
2607
2608 2011-03-30  Pavel Podivilov  <podivilov@chromium.org>
2609
2610         Reviewed by Pavel Feldman.
2611
2612         Web Inspector: remove unused SourceFrameContent class.
2613         https://bugs.webkit.org/show_bug.cgi?id=57453
2614
2615         * WebCore.gypi:
2616         * WebCore.vcproj/WebCore.vcproj:
2617         * inspector/front-end/ResourceView.js:
2618         (WebInspector.SourceFrameDelegateForResourcesPanel.prototype.requestContent):
2619         * inspector/front-end/ScriptsPanel.js:
2620         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.requestContent):
2621         * inspector/front-end/SourceFrame.js:
2622         (WebInspector.SourceFrame.prototype._createTextViewer):
2623         * inspector/front-end/SourceFrameContent.js: Removed.
2624         * inspector/front-end/WebKit.qrc:
2625         * inspector/front-end/inspector.html:
2626
2627 2011-03-30  Pavel Podivilov  <podivilov@chromium.org>
2628
2629         Reviewed by Pavel Feldman.
2630
2631         Web Inspector: add test for script formatter worker.
2632         https://bugs.webkit.org/show_bug.cgi?id=57447
2633
2634         Test: inspector/debugger/script-formatter.html
2635
2636         * GNUmakefile.am:
2637         * inspector/front-end/DebuggerPresentationModel.js:
2638         (WebInspector.DebuggerPresentationModel):
2639         (WebInspector.DebuggerPresentationModel.prototype.toggleFormatSourceFiles):
2640
2641 2011-03-30  Pavel Podivilov  <podivilov@chromium.org>
2642
2643         Reviewed by Pavel Feldman.
2644
2645         Web Inspector: [chromium] script formatting doesn't work when all scripts are concatenated.
2646         https://bugs.webkit.org/show_bug.cgi?id=57446
2647
2648         * inspector/front-end/ScriptFormatterWorker.js:
2649
2650 2011-04-01  Pavel Podivilov  <podivilov@chromium.org>
2651
2652         Reviewed by Pavel Feldman.
2653
2654         Web Inspector: allow file access from inspector page so inspector can use workers.
2655         https://bugs.webkit.org/show_bug.cgi?id=57339
2656
2657         * inspector/InspectorFrontendClientLocal.cpp:
2658         (WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal):
2659
2660 2011-03-31  Yury Semikhatsky  <yurys@chromium.org>
2661
2662         Reviewed by Pavel Feldman.
2663
2664         Web Inspector: inspected page crashes on attempt to log object with broken .toString
2665         https://bugs.webkit.org/show_bug.cgi?id=57557
2666
2667         If ScriptValue.toString causes a JavaScript exception, the exception is cleared
2668         before returning from the toString method.
2669
2670         Test: inspector/console/console-log-toString-object.html
2671
2672         * bindings/js/ScriptValue.cpp:
2673         (WebCore::ScriptValue::toString):
2674         * bindings/js/ScriptValue.h:
2675         * bindings/v8/ScriptValue.cpp:
2676         (WebCore::ScriptValue::toString):
2677
2678 2011-03-31  Andrey Kosyakov  <caseq@chromium.org>
2679
2680         Reviewed by Pavel Feldman.
2681
2682         - removed documentWide parameter to querySelector[All]() (user document node id instead)
2683         - factor out document request logic within DOMAgent into separate method
2684         - add querySelector() and querySelectorAll() to DOMAgent.js, assure we have document before calling back-end
2685         - use the above wrappers for querySelector() and querySelectorAll(), do not call backend directly
2686         - minor style fixes in Inspector.json
2687         - more error logging
2688
2689         Web Inspector: provide front-end wrappers for DOMAgent.querySelector[All]() that take care of fetching the document
2690         https://bugs.webkit.org/show_bug.cgi?id=57466
2691
2692         * inspector/Inspector.json:
2693         * inspector/InspectorDOMAgent.cpp:
2694         (WebCore::InspectorDOMAgent::querySelector):
2695         (WebCore::InspectorDOMAgent::querySelectorAll):
2696         * inspector/InspectorDOMAgent.h:
2697         * inspector/front-end/AuditRules.js:
2698         (WebInspector.AuditRules.ImageDimensionsRule.prototype.doRun):
2699         (WebInspector.AuditRules.ImageDimensionsRule.prototype.doRun.getStyles):
2700         * inspector/front-end/CSSStyleModel.js:
2701         (WebInspector.CSSStyleModel.prototype.setRuleSelector.callback):
2702         (WebInspector.CSSStyleModel.prototype.setRuleSelector):
2703         (WebInspector.CSSStyleModel.prototype.addRule.callback):
2704         (WebInspector.CSSStyleModel.prototype.addRule):
2705         * inspector/front-end/DOMAgent.js:
2706         (WebInspector.DOMAgent.prototype.requestDocument.onDocumentAvailable):
2707         (WebInspector.DOMAgent.prototype.requestDocument):
2708         (WebInspector.DOMAgent.prototype.pushNodeToFrontend):
2709         (WebInspector.DOMAgent.prototype.pushNodeByPathToFrontend):
2710         (WebInspector.DOMAgent.prototype._dispatchWhenDocumentAvailable.onDocumentAvailable):
2711         (WebInspector.DOMAgent.prototype._dispatchWhenDocumentAvailable):
2712         (WebInspector.DOMAgent.prototype.cancelSearch):
2713         (WebInspector.DOMAgent.prototype.querySelector):
2714         (WebInspector.DOMAgent.prototype.querySelectorAll):
2715
2716 2011-04-01  Kent Tamura  <tkent@chromium.org>
2717
2718         Apply sort-Xcode-project-file.
2719
2720         * WebCore.xcodeproj/project.pbxproj:
2721
2722 2011-03-31  Sheriff Bot  <webkit.review.bot@gmail.com>
2723
2724         Unreviewed, rolling out r82652.
2725         http://trac.webkit.org/changeset/82652
2726         https://bugs.webkit.org/show_bug.cgi?id=57603
2727
2728         Test still fails (Requested by abarth|gardener on #webkit).
2729
2730         * rendering/RenderWidget.cpp:
2731         (WebCore::RenderWidget::setWidget):
2732
2733 2011-03-31  Naoki Takano  <takano.naoki@gmail.com>
2734
2735         Reviewed by Kent Tamura.
2736
2737         REGRESSION (r64712): Safari removes the first blank line in a textarea
2738         https://bugs.webkit.org/show_bug.cgi?id=56434
2739
2740         Test: fast/forms/textarea-newline.html
2741
2742         A linefeed removal after a textarea tag is originally processed in WebCore::HTMLTextAreaElement::defaultValue().
2743         But HTML5 tree builder now removes the linefeed. It means linefeed removal happens twice.
2744         And devalutValue() removal is not needed anymore.
2745
2746         * html/HTMLTextAreaElement.cpp:
2747         (WebCore::HTMLTextAreaElement::setDefaultValue): Remove an extra linefeed insertion at the beginning.
2748         (WebCore::HTMLTextAreaElement::defaultValue): Remove linefeed removal check in default value creation function.
2749
2750 2011-03-31  Luke Macpherson   <macpherson@chromium.org>
2751
2752         Reviewed by Dimitri Glazkov.
2753
2754         Remove refcounting of CSSStyleApplyProperty singleton
2755         https://bugs.webkit.org/show_bug.cgi?id=57592
2756
2757         No new tests required as no functionality changes.
2758
2759         * css/CSSStyleApplyProperty.h:
2760
2761 2011-03-31  Anantanarayanan G Iyengar  <ananta@chromium.org>
2762
2763         Reviewed by Adam Barth.
2764
2765         https://bugs.webkit.org/show_bug.cgi?id=45855
2766         Windowless plugins added dynamically to the DOM should receive paint events.
2767         This is done by ensuring that the plugin widget is marked for painting when
2768         it is added.
2769
2770         Test: plugins/windowless_plugin_paint_test.html
2771
2772         * rendering/RenderWidget.cpp:
2773         (WebCore::RenderWidget::setWidget):
2774
2775 2011-03-31  Adam Roben  <aroben@apple.com>
2776
2777         Add a new AbstractCACFLayerTreeHost base class
2778
2779         This class exposes the interface that LayerChangesFlusher and PlatformCALayer rely on.
2780         CACFLayerTreeHost now derives from AbstractCACFLayerTreeHost. In the future, WebKit2's
2781         LayerTreeHostCA will also derive from it (on Windows).
2782
2783         This should cause no change in behavior.
2784
2785         Fixes <http://webkit.org/b/57598> Coupling between CACFLayerTreeHost and other CACF-related
2786         code is too high
2787
2788         Reviewed by Anders Carlsson.
2789
2790         * WebCore.vcproj/WebCore.vcproj: Added AbstractCACFLayerTreeHost, and let VS reorder files.
2791
2792         * platform/graphics/ca/win/AbstractCACFLayerTreeHost.h: Added.
2793
2794         * platform/graphics/ca/win/CACFLayerTreeHost.h: Changed to derive from
2795         AbstractCACFLayerTreeHost, and annotated the overrides of its functions.
2796         AbstractCACFLayerTreeHost also allows us to get rid of the friend relationship with
2797         PlatformCALayer.
2798
2799         * platform/graphics/ca/win/LayerChangesFlusher.cpp:
2800         (WebCore::LayerChangesFlusher::flushPendingLayerChangesSoon):
2801         (WebCore::LayerChangesFlusher::cancelPendingFlush):
2802         (WebCore::LayerChangesFlusher::hookFired):
2803         * platform/graphics/ca/win/LayerChangesFlusher.h:
2804         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
2805         (layerTreeHostForLayer):
2806         (PlatformCALayer::rootLayer):
2807         (PlatformCALayer::setNeedsCommit):
2808         (PlatformCALayer::addAnimationForKey):
2809         (PlatformCALayer::removeAnimationForKey):
2810         Changed to use AbstractCACFLayerTreeHost instead of using CACFLayerTreeHost directly.
2811
2812 2011-03-31  Andy Estes  <aestes@apple.com>
2813
2814         Reviewed by Alexey Proskuryakov.
2815
2816         REGRESSION: Java applet fails to load when <object> has a classid attribute.
2817         https://bugs.webkit.org/show_bug.cgi?id=52703
2818         
2819         Java applets embedded with the object element sometimes use classid to
2820         specify their main resource. When this is done, the classid is prefixed
2821         with "java:". Treat these as supported classids in WebKit.
2822
2823         Test: java/embedding-java-with-object.html
2824
2825         * html/HTMLObjectElement.cpp:
2826         (WebCore::HTMLObjectElement::hasValidClassId): If the MIME type is a
2827         Java Applet type and the classid starts with "java:", the classid
2828         should be considered valid.
2829
2830 2011-03-31  Brent Fulgham  <bfulgham@webkit.org>
2831
2832         Reviewed Adam Roben.
2833
2834         [WinCairo] Implement Missing drawWindowsBitmap method.
2835         https://bugs.webkit.org/show_bug.cgi?id=57409
2836
2837         * WebCore.vcproj/WebCore.vcproj: Add new DIBPixelData files.
2838         * platform/graphics/GraphicsContext.h:
2839         (WebCore::GraphicsContext::WindowsBitmap::buffer):
2840         (WebCore::GraphicsContext::WindowsBitmap::bufferLength):
2841         (WebCore::GraphicsContext::WindowsBitmap::size):
2842         (WebCore::GraphicsContext::WindowsBitmap::bytesPerRow):
2843         (WebCore::GraphicsContext::WindowsBitmap::bitsPerPixel):
2844         (WebCore::GraphicsContext::WindowsBitmap::windowsDIB):
2845         * platform/graphics/win/GraphicsContextCGWin.cpp:
2846         (WebCore::CGContextWithHDC):
2847         (WebCore::GraphicsContext::releaseWindowsContext): Modified to use
2848         new common routines.
2849         * platform/graphics/win/GraphicsContextCairoWin.cpp:
2850         (WebCore::drawBitmapToContext): New common drawing implementation.
2851         (WebCore::GraphicsContext::releaseWindowsContext): Modified to use
2852         new common routines.
2853         (WebCore::GraphicsContext::drawWindowsBitmap):
2854         * platform/graphics/win/GraphicsContextWin.cpp:
2855         (WebCore::GraphicsContext::WindowsBitmap::WindowsBitmap): Modified
2856         to use new DIBPixelData data type.
2857         * platform/graphics/win/DIBPixelData.cpp: Added.
2858         (WebCore::DIBPixelData::DIBPixelData):
2859         (WebCore::DIBPixelData::initialize):
2860         * platform/graphics/win/DIBPixelData.h: Added.
2861         (WebCore::DIBPixelData::DIBPixelData):
2862         (WebCore::DIBPixelData::buffer):
2863         (WebCore::DIBPixelData::bufferLength):
2864         (WebCore::DIBPixelData::size):
2865         (WebCore::DIBPixelData::bytesPerRow):
2866         (WebCore::DIBPixelData::bitsPerPixel):
2867
2868 2011-03-31  Sheriff Bot  <webkit.review.bot@gmail.com>
2869
2870         Unreviewed, rolling out r81849.
2871         http://trac.webkit.org/changeset/81849
2872         https://bugs.webkit.org/show_bug.cgi?id=57588
2873
2874         CSS Parsing broke with -webkit-calc and introduced crashes
2875         (Requested by inferno-sec on #webkit).
2876
2877         * css/CSSGrammar.y:
2878         * css/CSSParserValues.cpp:
2879         * css/CSSParserValues.h:
2880         * css/tokenizer.flex:
2881
2882 2011-03-31  Adam Roben  <aroben@apple.com>
2883
2884         Don't ref CACFLayerTreeHosts when telling them to flush layer changes
2885
2886         LayerChangesFlusher was reffing CACFLayerTreeHosts before calling out to them. This would
2887         have protected us if calling out to one CACFLayerTreeHost could cause a different
2888         CACFLayerTreeHost to be destroyed. But that isn't possible; each CACFLayerTreeHost is
2889         associated with its own page, and flushing layer changes doesn't touch any other page. So it
2890         isn't possible for a CACFLayerTreeHost to be deleted while another one is flushing layer
2891         changes.
2892
2893         One benefit of this change is that it will make it easier to make LayerChangesFlusher
2894         interact with a forthcoming abstract base class, rather than with CACFLayerTreeHost itself.
2895
2896         This should cause no change in behavior.
2897
2898         Fixes <http://webkit.org/b/57590> LayerChangesFlusher unnecessarily refs CACFLayerTreeHost
2899         before calling out to it
2900
2901         Reviewed by Darin Adler.
2902
2903         * platform/graphics/ca/win/LayerChangesFlusher.cpp:
2904         (WebCore::LayerChangesFlusher::hookFired): Just store bare pointers to the
2905         CACFLayerTreeHosts.
2906
2907 2011-03-31  Antti Koivisto  <antti@apple.com>
2908
2909         Reviewed by Oliver Hunt.
2910
2911         https://bugs.webkit.org/show_bug.cgi?id=57574
2912         Preload scanner fails to pick up resources from document.write() output
2913
2914         - Scan script inserted source using a separate preload scanner.
2915         - Make the main preload scanner correctly process the remaining source if script execution blocked the parser.
2916
2917         Tests: fast/preloader/document-write-2.html
2918                fast/preloader/document-write.html
2919
2920         * html/parser/HTMLDocumentParser.cpp:
2921         (WebCore::HTMLDocumentParser::insert):
2922         (WebCore::HTMLDocumentParser::appendCurrentInputStreamToPreloadScannerAndScan):
2923         * html/parser/HTMLDocumentParser.h:
2924         (WebCore::HTMLDocumentParser::hasPreloadScanner):
2925         * html/parser/HTMLScriptRunner.cpp:
2926         (WebCore::HTMLScriptRunner::execute):
2927         * html/parser/HTMLScriptRunnerHost.h:
2928
2929 2011-03-31  Tony Gentilcore  <tonyg@chromium.org>
2930
2931         Build fix: Add missing include
2932         https://bugs.webkit.org/show_bug.cgi?id=57587
2933
2934         * loader/cache/CachedResourceLoader.cpp:
2935
2936 2011-03-31  Tony Gentilcore  <tonyg@chromium.org>
2937
2938         Reviewed by Antti Koivisto.
2939
2940         PreloadScanner doesn&apos;t find image while executing script in head
2941         https://bugs.webkit.org/show_bug.cgi?id=45072
2942
2943         Previously, while parsing the head, no resources in the body would be
2944         preloaded. After this patch, we will preload scripts and styles in the
2945         body, although we continue to hold off on all images until the page is 
2946         first rendered.
2947
2948         To evaluate this change, I've recorded a sampling of 45 of alexa's top
2949         sites and replayed them under simulated bandwidth conditions, loading
2950         each 5-15 times until stddev is small enough.
2951
2952         Time to the load event improved at the overall average by 3%.
2953         Most sites are unchanged, but sites with certain blocking patterns had
2954         big wins -- ebay 19% (331ms), microsoft 15% (226ms), conduit 15% (277ms)
2955         nytimes 7% (182ms).
2956
2957         Time to DOM content loaded event improved by 6% with some even bigger
2958         individual wins.
2959
2960         First paint time held steady.
2961
2962         Note that I originally wanted to allow preloading of images while in the
2963         head, but that regressed first paint time (even though it was better for
2964         overall load time).
2965
2966         Test: fast/preloader/scan-body-from-head.html
2967
2968         * loader/cache/CachedResourceLoader.cpp:
2969         (WebCore::CachedResourceLoader::preload):
2970
2971 2011-03-31  Sheriff Bot  <webkit.review.bot@gmail.com>
2972
2973         Unreviewed, rolling out r82616.
2974         http://trac.webkit.org/changeset/82616
2975         https://bugs.webkit.org/show_bug.cgi?id=57585
2976
2977         New test does not pass on Gtk, chromium-mac, chromium-linux
2978         and possibly elsewhere (Requested by abarth|gardener on
2979         #webkit).
2980
2981         * rendering/RenderWidget.cpp:
2982         (WebCore::RenderWidget::setWidget):
2983
2984 2011-03-31  Adrienne Walker  <enne@google.com>
2985
2986         Reviewed by James Robinson.
2987
2988         [chromium] Fix ownership semantics for LayerChromium/CCLayerImpl
2989         https://bugs.webkit.org/show_bug.cgi?id=57577
2990
2991         LayerRendererChromium now uses a RefPtr to preserve ownership of all
2992         of the CCLayerImpl layers that it is using during the update/draw
2993         pass.  Addtionally, when a LayerChromium is destroyed, the weak
2994         owner pointer from its CCLayerImpl is correctly unset.
2995
2996         * platform/graphics/chromium/LayerRendererChromium.cpp:
2997         (WebCore::LayerRendererChromium::compareLayerZ):
2998         (WebCore::LayerRendererChromium::updateAndDrawLayers):
2999         (WebCore::LayerRendererChromium::updateLayers):
3000         (WebCore::LayerRendererChromium::drawLayers):
3001         (WebCore::LayerRendererChromium::updatePropertiesAndRenderSurfaces):
3002         (WebCore::LayerRendererChromium::drawLayer):
3003         * platform/graphics/chromium/LayerRendererChromium.h:
3004         * platform/graphics/chromium/RenderSurfaceChromium.h:
3005         * platform/graphics/chromium/VideoLayerChromium.cpp:
3006         (WebCore::VideoLayerChromium::updateCompositorResources):
3007         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
3008         (WebCore::CCLayerImpl::drawsContent):
3009         (WebCore::CCLayerImpl::cleanupResources):
3010
3011 2011-03-31  Sam Weinig  <sam@webkit.org>
3012
3013         Reviewed by Anders Carlsson.
3014
3015         Rename WebCore's UI_STRING to WEB_UI_STRING to not overlap with WebKit API
3016         https://bugs.webkit.org/show_bug.cgi?id=57582
3017
3018         * platform/DefaultLocalizationStrategy.cpp:
3019         * platform/LocalizedStrings.h:
3020
3021 2011-03-31  Eric Seidel  <eric@webkit.org>
3022
3023         Reviewed by Ryosuke Niwa.
3024
3025         Rename BidiResolver::lastBeforeET to m_lastBeforeET to match modern style
3026         https://bugs.webkit.org/show_bug.cgi?id=57550
3027
3028         * platform/text/BidiResolver.h:
3029         (WebCore::::createBidiRunsForLine):
3030
3031 2011-03-31  Anantanarayanan G Iyengar  <ananta@chromium.org>
3032
3033         Reviewed by James Robinson.
3034
3035         https://bugs.webkit.org/show_bug.cgi?id=45855
3036         Windowless plugins added dynamically to the DOM should receive paint events.
3037         This is done by ensuring that the plugin widget is marked for painting when
3038         it is added.
3039
3040         Test: plugins/windowless_plugin_paint_test.html
3041
3042         * rendering/RenderWidget.cpp:
3043         (WebCore::RenderWidget::setWidget):
3044
3045 2011-03-31  Stephen White  <senorblanco@chromium.org>
3046
3047         Reviewed by Kenneth Russell.
3048
3049         Speed up accelerated path drawing.
3050         https://bugs.webkit.org/show_bug.cgi?id=57371
3051         This CL does three things:  re-uses the same vertex and index buffer
3052         for all path draws, converts all vertex layouts from vec3 to vec2, and
3053         does a convexity check for polygons before passing them to the
3054         tesselator.
3055
3056         Covered by canvas/philip/tests/2d.path.bezierCurveTo.*, and others.
3057
3058         * platform/graphics/chromium/GLES2Canvas.cpp:
3059         Replace the Vector<double> for interpolated curves with a
3060         Vector<FloatPoint>.
3061         (WebCore::Cubic::evaluate):
3062         Inline the evaluation function (as Quadratic does).
3063         (WebCore::GLES2Canvas::GLES2Canvas):
3064         Initialize the m_pathIndexBuffer.
3065         (WebCore::GLES2Canvas::~GLES2Canvas):
3066         Delete the path vertex and index buffers on destruction.
3067         (WebCore::interpolateQuadratic):
3068         (WebCore::interpolateCubic):
3069         Interpolate directly to a Vector<FloatPoint>, rather than
3070         Vector<double>.
3071         (WebCore::PolygonData::PolygonData):
3072         (WebCore::combineData):
3073         Replace the DoubleVector with a FloatPointVector.
3074         (WebCore::GLES2Canvas::tesselateAndFillPath):
3075         Move curve drawing into this function, and rename it to reflect the
3076         new behaviour.  Re-use the common vertex and index buffers.  If the
3077         curve consists of a single convex polygon, draw the curve as a single
3078         triangle fan.  Otherwise, convert it to doubles and pass it to the
3079         tesselator.
3080         (WebCore::GLES2Canvas::fillPathInternal):
3081         * platform/graphics/chromium/GLES2Canvas.h:
3082         Rename createVertexBufferFromPath() -> tesselateAndFillPath().
3083         Add a persistent index buffer for all path draws.
3084         * platform/graphics/gpu/BicubicShader.cpp:
3085         (WebCore::BicubicShader::create):
3086         (WebCore::BicubicShader::use):
3087         * platform/graphics/gpu/ConvolutionShader.cpp:
3088         (WebCore::ConvolutionShader::create):
3089         (WebCore::ConvolutionShader::use):
3090         Use vec2s instead of vec3s for all vertex data.
3091         * platform/graphics/gpu/LoopBlinnMathUtils.cpp:
3092         (WebCore::LoopBlinnMathUtils::convexCompare):
3093         (WebCore::LoopBlinnMathUtils::convexCross):
3094         (WebCore::LoopBlinnMathUtils::convexCheckTriple):
3095         (WebCore::LoopBlinnMathUtils::isConvex):
3096         * platform/graphics/gpu/LoopBlinnMathUtils.h:
3097         Implement a convexity check, based on the code in Graphics Gems IV.
3098         * platform/graphics/gpu/Shader.cpp:
3099         (WebCore::Shader::generateVertex):
3100         * platform/graphics/gpu/SharedGraphicsContext3D.cpp:
3101         (WebCore::SharedGraphicsContext3D::useQuadVertices):
3102         * platform/graphics/gpu/SolidFillShader.cpp:
3103         (WebCore::SolidFillShader::use):
3104         * platform/graphics/gpu/TexShader.cpp:
3105         (WebCore::TexShader::use):
3106         Use vec2s instead of vec3s for all vertex data.
3107
3108 2011-03-31  David Hyatt  <hyatt@apple.com>
3109
3110         Reviewed by Simon Fraser.
3111
3112         https://bugs.webkit.org/show_bug.cgi?id=57565
3113
3114         Optimize overflow computations on lines to avoid allocating RenderOverflows in nearly all cases and to avoid even having
3115         to check the line for overflow in the first place.
3116         
3117         For the purposes of overflow computation, an inline object's default containment box for overflow is now assumed to extend
3118         all the way from lineTop to lineBottom instead of snugly fitting the inline object's own block dimensions. This allows
3119         replaced objects to be inside spans without triggering overflow allocation.
3120         
3121         The overflow accessors on InlineFlowBox have been changed to require passing in the lineTop and lineBottom so that the block
3122         dimensions can be forced to those values. Because these values are checked during painting and hit testing of lines, the
3123         lineTop and lineBottom are now passed as arguments to the painting and hit testing functions to avoid repeatedly crawling
3124         back up to the root box to fetch them.
3125         
3126         Added a new boolean flag to all InlineBoxes, knownToHaveNoOverflow(), and optimized for common cases where no overflow can
3127         possibly be present.  When the bit is set, computeOverflow will just immediately return.
3128  
3129         This change speeds up line layout by ~10%.
3130
3131         * rendering/EllipsisBox.cpp:
3132         (WebCore::EllipsisBox::paint):
3133         (WebCore::EllipsisBox::nodeAtPoint):
3134         * rendering/EllipsisBox.h:
3135         * rendering/InlineBox.cpp:
3136         (WebCore::InlineBox::paint):
3137         (WebCore::InlineBox::nodeAtPoint):
3138         (WebCore::InlineBox::clearKnownToHaveNoOverflow):
3139         * rendering/InlineBox.h:
3140         (WebCore::InlineBox::InlineBox):
3141         (WebCore::InlineBox::logicalFrameRect):
3142         (WebCore::InlineBox::knownToHaveNoOverflow):
3143         * rendering/InlineFlowBox.cpp:
3144         (WebCore::InlineFlowBox::addToLine):
3145         (WebCore::InlineFlowBox::placeBoxesInInlineDirection):
3146         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
3147         (WebCore::InlineFlowBox::addBoxShadowVisualOverflow):
3148         (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
3149         (WebCore::InlineFlowBox::addReplacedChildOverflow):
3150         (WebCore::InlineFlowBox::computeOverflow):
3151         (WebCore::InlineFlowBox::setLayoutOverflow):
3152         (WebCore::InlineFlowBox::setVisualOverflow):
3153         (WebCore::InlineFlowBox::setOverflowFromLogicalRects):
3154         (WebCore::InlineFlowBox::nodeAtPoint):
3155         (WebCore::InlineFlowBox::paint):
3156         * rendering/InlineFlowBox.h:
3157         (WebCore::InlineFlowBox::layoutOverflowRect):
3158         (WebCore::InlineFlowBox::logicalLeftLayoutOverflow):
3159         (WebCore::InlineFlowBox::logicalRightLayoutOverflow):
3160         (WebCore::InlineFlowBox::logicalTopLayoutOverflow):
3161         (WebCore::InlineFlowBox::logicalBottomLayoutOverflow):
3162         (WebCore::InlineFlowBox::logicalLayoutOverflowRect):
3163         (WebCore::InlineFlowBox::visualOverflowRect):
3164         (WebCore::InlineFlowBox::logicalLeftVisualOverflow):
3165         (WebCore::InlineFlowBox::logicalRightVisualOverflow):
3166         (WebCore::InlineFlowBox::logicalTopVisualOverflow):
3167         (WebCore::InlineFlowBox::logicalBottomVisualOverflow):
3168         (WebCore::InlineFlowBox::logicalVisualOverflowRect):
3169         (WebCore::InlineFlowBox::frameRectIncludingLineHeight):
3170         (WebCore::InlineFlowBox::logicalFrameRectIncludingLineHeight):
3171         * rendering/InlineTextBox.cpp:
3172         (WebCore::InlineTextBox::nodeAtPoint):
3173         (WebCore::InlineTextBox::paint):
3174         * rendering/InlineTextBox.h:
3175         * rendering/RenderBlock.cpp:
3176         (WebCore::RenderBlock::simplifiedNormalFlowLayout):
3177         (WebCore::RenderBlock::paintEllipsisBoxes):
3178         (WebCore::RenderBlock::adjustLinePositionForPagination):
3179         * rendering/RenderBlock.h:
3180         * rendering/RenderBlockLineLayout.cpp:
3181         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine):
3182         (WebCore::RenderBlock::layoutInlineChildren):
3183         (WebCore::RenderBlock::determineStartPosition):
3184         (WebCore::RenderBlock::matchedEndLine):
3185         (WebCore::RenderBlock::addOverflowFromInlineChildren):
3186         * rendering/RenderBox.h:
3187         (WebCore::RenderBox::hasRenderOverflow):
3188         * rendering/RenderBoxModelObject.cpp:
3189         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
3190         * rendering/RenderInline.cpp:
3191         (WebCore::RenderInline::linesVisualOverflowBoundingBox):
3192         * rendering/RenderLineBoxList.cpp:
3193         (WebCore::RenderLineBoxList::anyLineIntersectsRect):
3194         (WebCore::RenderLineBoxList::lineIntersectsDirtyRect):
3195         (WebCore::RenderLineBoxList::paint):
3196         (WebCore::RenderLineBoxList::hitTest):
3197         * rendering/RenderListItem.cpp:
3198         (WebCore::RenderListItem::positionListMarker):
3199         * rendering/RootInlineBox.cpp:
3200         (WebCore::RootInlineBox::paintEllipsisBox):
3201         (WebCore::RootInlineBox::addHighlightOverflow):
3202         (WebCore::RootInlineBox::paint):
3203         (WebCore::RootInlineBox::nodeAtPoint):
3204         (WebCore::RootInlineBox::paddedLayoutOverflowRect):
3205         * rendering/RootInlineBox.h:
3206         (WebCore::RootInlineBox::logicalTopVisualOverflow):
3207         (WebCore::RootInlineBox::logicalBottomVisualOverflow):
3208         (WebCore::RootInlineBox::logicalTopLayoutOverflow):
3209         (WebCore::RootInlineBox::logicalBottomLayoutOverflow):
3210         * rendering/svg/SVGInlineFlowBox.cpp:
3211         (WebCore::SVGInlineFlowBox::paint):
3212         * rendering/svg/SVGInlineFlowBox.h:
3213         * rendering/svg/SVGInlineTextBox.cpp:
3214         (WebCore::SVGInlineTextBox::paint):
3215         * rendering/svg/SVGInlineTextBox.h:
3216         * rendering/svg/SVGRootInlineBox.cpp:
3217         (WebCore::SVGRootInlineBox::paint):
3218         * rendering/svg/SVGRootInlineBox.h:
3219
3220 2011-03-31  Pavel Feldman  <pfeldman@chromium.org>
3221
3222         Reviewed by Yury Semikhatsky.
3223
3224         Web Inspector: disable properties abbreviation.
3225         https://bugs.webkit.org/show_bug.cgi?id=57525
3226
3227         * inspector/InjectedScript.cpp:
3228         (WebCore::InjectedScript::getProperties):
3229         * inspector/InjectedScript.h:
3230         * inspector/InjectedScriptSource.js:
3231         (.):
3232         ():
3233         * inspector/Inspector.json:
3234         * inspector/InspectorRuntimeAgent.cpp:
3235         (WebCore::InspectorRuntimeAgent::getProperties):
3236         * inspector/InspectorRuntimeAgent.h:
3237         * inspector/front-end/ConsoleView.js:
3238         (WebInspector.ConsoleView.prototype.completions.evaluated):
3239         (WebInspector.ConsoleView.prototype._formatarray):
3240         * inspector/front-end/ObjectPropertiesSection.js:
3241         (WebInspector.ObjectPropertiesSection.prototype.update.callback):
3242         (WebInspector.ObjectPropertiesSection.prototype.update):
3243         (WebInspector.ObjectPropertyTreeElement.prototype.onpopulate):
3244         (WebInspector.ObjectPropertyTreeElement.prototype.update):
3245         (WebInspector.ObjectPropertyTreeElement.prototype.startEditing):
3246         * inspector/front-end/PropertiesSidebarPane.js:
3247         (WebInspector.PropertiesSidebarPane.prototype.update.nodePrototypesReady):
3248         * inspector/front-end/RemoteObject.js:
3249         (WebInspector.RemoteObject.prototype.getOwnProperties):
3250         (WebInspector.RemoteObject.prototype.getAllProperties):
3251         (WebInspector.RemoteObject.prototype._getProperties):
3252         (WebInspector.LocalJSONObject.prototype.getOwnProperties):
3253         (WebInspector.LocalJSONObject.prototype.getAllProperties):
3254         * inspector/front-end/inspector.css:
3255         (.console-formatted-string, .console-formatted-regexp):
3256
3257 2011-03-31  Adam Roben  <aroben@apple.com>
3258
3259         Update WKCACFViewLayerTreeHost for changes to WKCACFView API
3260
3261         This should not result in any change in behavior.
3262
3263         Fixes <http://webkit.org/b/57560> WKCACFViewLayerTreeHost needs to tell WKCACFView where to
3264         render
3265
3266         Reviewed by Darin Adler.
3267
3268         * platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp: Updated API declarations.
3269         (WebCore::WKCACFViewLayerTreeHost::WKCACFViewLayerTreeHost): Tell WKCACFView it should
3270         render into the window we give it.
3271
3272 2011-03-31  Marius Storm-Olsen  <marius.storm-olsen@nokia.com>
3273
3274         Reviewed by Kenneth Rohde Christiansen.
3275
3276         [Qt] Properly detect phonon include, and avoid double qtLibraryTarget() call
3277         https://bugs.webkit.org/show_bug.cgi?id=57017
3278
3279         Build fix. No new tests.
3280
3281         * WebCore.pri:
3282
3283 2011-03-31  Vsevolod Vlasov  <vsevik@chromium.org>
3284
3285         Reviewed by Pavel Feldman.
3286
3287         XML viewer is not shown when frame has non-null opener
3288         https://bugs.webkit.org/show_bug.cgi?id=56384
3289
3290         Removed opener check in XML viewer
3291
3292         Test: http/tests/xmlviewer/extensions-api.html
3293
3294         * xml/XMLTreeViewer.cpp:
3295         (WebCore::XMLTreeViewer::hasNoStyleInformation):
3296         * xml/XMLViewer.js:
3297
3298 2011-03-31  Sheriff Bot  <webkit.review.bot@gmail.com>
3299
3300         Unreviewed, rolling out r82589.
3301         http://trac.webkit.org/changeset/82589
3302         https://bugs.webkit.org/show_bug.cgi?id=57564
3303
3304         This patch requires many more updated results than it contains
3305         (Requested by abarth|gardener on #webkit).
3306
3307         * css/CSSSelector.cpp:
3308         (WebCore::CSSSelector::pseudoId):
3309         (WebCore::nameToPseudoTypeMap):
3310         (WebCore::CSSSelector::extractPseudoType):
3311         * css/CSSSelector.h:
3312         * css/html.css:
3313         (meter::-webkit-meter-horizontal-bar):
3314         (meter::-webkit-meter-vertical-bar):
3315         (meter::-webkit-meter-horizontal-optimum-value):
3316         (meter::-webkit-meter-horizontal-suboptimal-value):
3317         (meter::-webkit-meter-horizontal-even-less-good-value):
3318         (meter::-webkit-meter-vertical-optimum-value):
3319         (meter::-webkit-meter-vertical-suboptimal-value):
3320         (meter::-webkit-meter-vertical-even-less-good-value):
3321         * rendering/RenderMeter.cpp:
3322         (WebCore::MeterPartElement::MeterPartElement):
3323         (WebCore::MeterPartElement::createForPart):
3324         (WebCore::MeterPartElement::hide):
3325         (WebCore::MeterPartElement::restoreVisibility):
3326         (WebCore::MeterPartElement::updateStyleForPart):
3327         (WebCore::MeterPartElement::saveVisibility):
3328         (WebCore::RenderMeter::~RenderMeter):
3329         (WebCore::RenderMeter::createPart):
3330         (WebCore::RenderMeter::updateFromElement):
3331         (WebCore::RenderMeter::layoutParts):
3332         (WebCore::RenderMeter::shouldHaveParts):
3333         (WebCore::RenderMeter::valuePartRect):
3334         (WebCore::RenderMeter::orientation):
3335         (WebCore::RenderMeter::valuePseudoId):
3336         (WebCore::RenderMeter::barPseudoId):
3337         * rendering/RenderMeter.h:
3338         (WebCore::RenderMeter::shadowAttached):
3339         * rendering/RenderTheme.cpp:
3340         (WebCore::RenderTheme::supportsMeter):
3341         * rendering/RenderTheme.h:
3342         * rendering/RenderThemeMac.h:
3343         * rendering/RenderThemeMac.mm:
3344         (WebCore::RenderThemeMac::paintMeter):
3345         (WebCore::RenderThemeMac::supportsMeter):
3346         * rendering/style/RenderStyleConstants.h:
3347
3348 2011-03-31  Xan Lopez  <xlopez@igalia.com>
3349
3350         Reviewed by Martin Robinson.
3351
3352         [GTK] Link explicitly with XRender on Linux/Unix
3353         https://bugs.webkit.org/show_bug.cgi?id=57558
3354
3355         * GNUmakefile.am: add XRender CFLAGS.
3356
3357 2011-03-31  Eric Seidel  <eric@webkit.org>
3358
3359         Reviewed by Ryosuke Niwa.
3360
3361         Rename BidiResolver::emptyRun to m_emtpyRun to match modern style
3362         https://bugs.webkit.org/show_bug.cgi?id=57549
3363
3364         * platform/text/BidiResolver.h:
3365         (WebCore::BidiResolver::BidiResolver):
3366         (WebCore::::appendRun):
3367         (WebCore::::lowerExplicitEmbeddingLevel):
3368         (WebCore::::raiseExplicitEmbeddingLevel):
3369         (WebCore::::deleteRuns):
3370         (WebCore::::createBidiRunsForLine):
3371         * rendering/InlineIterator.h:
3372         (WebCore::InlineBidiResolver::appendRun):
3373
3374 2011-03-31  Tom Sepez  <tsepez@chromium.org>
3375
3376         Reviewed by Eric Seidel.
3377
3378         Make ContainerNode::insertIntoDocument() collect all nodes before
3379         operating on any of them.  Add small helper function and use it
3380         througout the file where this action is already taking place.
3381         https://bugs.webkit.org/show_bug.cgi?id=57265
3382         
3383         Test: svg/dom/range-delete.html
3384
3385         * dom/ContainerNode.cpp:
3386         (WebCore::collectNodes):
3387         (WebCore::collectTargetNodes):
3388         (WebCore::ContainerNode::takeAllChildrenFrom):
3389         (WebCore::willRemoveChildren):
3390         (WebCore::ContainerNode::insertedIntoDocument):
3391
3392 2011-03-31  Satish Sampath  <satish@chromium.org>
3393
3394         Reviewed by Steve Block.
3395
3396         While drawing a speech input button, validate that the node is really a speech input button.
3397         https://bugs.webkit.org/show_bug.cgi?id=57469
3398
3399         Test: fast/speech/speech-style-on-non-speech-elements.html
3400
3401         * dom/Element.h:
3402         (WebCore::Element::isInputFieldSpeechButtonElement):
3403         * html/shadow/TextControlInnerElements.h:
3404         (WebCore::InputFieldSpeechButtonElement::isInputFieldSpeechButtonElement):
3405         (WebCore::toInputFieldSpeechButtonElement):
3406         * rendering/RenderInputSpeech.cpp:
3407         (WebCore::RenderInputSpeech::paintInputFieldSpeechButton):
3408
3409 2011-03-31  Ryosuke Niwa  <rniwa@webkit.org>
3410
3411         Build fix after r82588. Reverted unintentional change.
3412
3413         * editing/SelectionController.cpp:
3414         (WebCore::SelectionController::modifyMovingLeft):
3415
3416 2011-03-31  Mario Sanchez Prada  <msanchez@igalia.com>
3417
3418         Reviewed by Xan Lopez.
3419
3420         [GTK] Warnings happening because of unhandled switch cases in AccessibilityObjectWrapperAtk
3421         https://bugs.webkit.org/show_bug.cgi?id=57534
3422
3423         Fix compilation warnings.
3424
3425         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
3426         (getAttributeSetForAccessibilityObject): Add unhandled cases.
3427
3428 2011-03-30  Pavel Podivilov  <podivilov@chromium.org>
3429
3430         Reviewed by Pavel Feldman.
3431
3432         Web Inspector: remove unnecessary newBody output parameter from editScriptSource protocol method.
3433         https://bugs.webkit.org/show_bug.cgi?id=57444
3434
3435         * bindings/js/ScriptDebugServer.cpp:
3436         (WebCore::ScriptDebugServer::editScriptSource):
3437         * bindings/js/ScriptDebugServer.h:
3438         * bindings/v8/ScriptDebugServer.cpp:
3439         (WebCore::ScriptDebugServer::editScriptSource):
3440         * bindings/v8/ScriptDebugServer.h:
3441         * inspector/Inspector.json:
3442         * inspector/InspectorDebuggerAgent.cpp:
3443         (WebCore::InspectorDebuggerAgent::editScriptSource):
3444         * inspector/InspectorDebuggerAgent.h:
3445         * inspector/front-end/DebuggerModel.js:
3446         (WebInspector.DebuggerModel.prototype.editScriptSource):
3447         (WebInspector.DebuggerModel.prototype._didEditScriptSource):
3448         * inspector/front-end/DebuggerPresentationModel.js:
3449         (WebInspector.DebuggerPresentationModel.prototype.editScriptSource.didEditScriptSource):
3450         (WebInspector.DebuggerPresentationModel.prototype.editScriptSource):
3451         * inspector/front-end/SourceFrame.js:
3452         (WebInspector.SourceFrame.prototype._handleSave.didEditScriptSource):
3453         (WebInspector.SourceFrame.prototype._handleSave):
3454
3455 2011-03-30  MORITA Hajime <morrita@google.com>
3456
3457         Reviewed by Dimitri Glazkov.
3458
3459         <meter> can only support horizontal indicator
3460         https://bugs.webkit.org/show_bug.cgi?id=56001
3461
3462         - Removed code which deals with the direction and
3463           left the horizontal path.
3464         - Removed "horizontal" from related names which is now
3465           redundant.
3466         
3467         * css/CSSSelector.cpp:
3468         (WebCore::CSSSelector::pseudoId):
3469         (WebCore::nameToPseudoTypeMap):
3470         (WebCore::CSSSelector::extractPseudoType):
3471         * css/CSSSelector.h:
3472         * css/html.css:
3473         (meter::-webkit-meter-bar):
3474         (meter::-webkit-meter-optimum-value):
3475         (meter::-webkit-meter-suboptimal-value):
3476         (meter::-webkit-meter-even-less-good-value):
3477         * rendering/RenderMeter.cpp:
3478         (WebCore::RenderMeter::~RenderMeter):
3479         (WebCore::RenderMeter::createPart):
3480         (WebCore::RenderMeter::updateFromElement):
3481         (WebCore::RenderMeter::layoutParts):
3482         (WebCore::RenderMeter::styleDidChange):
3483         (WebCore::RenderMeter::shouldHaveParts):
3484         (WebCore::RenderMeter::valuePartRect):
3485         (WebCore::RenderMeter::valuePseudoId):
3486         (WebCore::RenderMeter::barPseudoId):
3487         (WebCore::RenderMeter::detachShadows):
3488         (WebCore::RenderMeter::updateShadows):
3489         * rendering/RenderMeter.h:
3490         (WebCore::RenderMeter::shadowAttached):
3491         * rendering/RenderTheme.cpp:
3492         (WebCore::RenderTheme::supportsMeter):
3493         * rendering/RenderTheme.h:
3494         * rendering/RenderThemeMac.h:
3495         * rendering/RenderThemeMac.mm:
3496         (WebCore::RenderThemeMac::paintMeter):
3497         (WebCore::RenderThemeMac::supportsMeter):
3498         * rendering/style/RenderStyleConstants.h:
3499
3500 2011-03-30  Xiaomei Ji  <xji@chromium.org>
3501
3502         Reviewed by Ryosuke Niwa.
3503
3504         Experiment with moving caret by word in visual order.
3505         https://bugs.webkit.org/show_bug.cgi?id=57336
3506
3507         Follow Firefox's convention in Windows, 
3508         In LTR block, word break visually moves cursor to the left boundary of words,
3509         In RTL block, word break visually moves cursor to the right boundary of words.
3510
3511         This is the 1st version of implementing "move caret by word in visual order".
3512         It only works in the following situation: