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