2011-02-07 Lucas Forschler <lforschler@apple.com>
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-02-07  Lucas Forschler  <lforschler@apple.com>
2
3         Reviewed by Geoffrey Garen.
4
5         Fix Leopard Intel Debug Build.
6         <rdar://problem/8953606> REGRESSION: Can't link WebCore on 32-bit Leopard (53681)
7         This could potentially break windows, since I had to change #include <filename> to #include "filename"
8         
9         * WebCore.xcodeproj/project.pbxproj:
10         * accessibility/AccessibilityAllInOne.cpp:
11
12 2011-02-07  Sam Weinig  <sam@webkit.org>
13
14         Fix build.
15
16         * platform/mac/ScrollAnimatorMac.mm:
17         (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
18         (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar):
19         (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
20         (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar):
21
22 2011-02-07  Sam Weinig  <sam@webkit.org>
23
24         Reviewed by Beth Dakin.
25
26         Add mechanism to inform the ScrollAnimator when Scrollbars are added 
27         and removed.
28
29         * platform/ScrollAnimator.h:
30         (WebCore::ScrollAnimator::didAddVerticalScrollbar):
31         (WebCore::ScrollAnimator::willRemoveVerticalScrollbar):
32         (WebCore::ScrollAnimator::didAddHorizontalScrollbar):
33         (WebCore::ScrollAnimator::willRemoveHorizontalScrollbar):
34         Make virtual to allow platform specific overrides.
35
36         * platform/ScrollView.cpp:
37         (WebCore::ScrollView::setHasHorizontalScrollbar):
38         (WebCore::ScrollView::setHasVerticalScrollbar):
39         Call new ScrollableArea functions.
40
41         * platform/ScrollableArea.cpp:
42         (WebCore::ScrollableArea::didAddVerticalScrollbar):
43         (WebCore::ScrollableArea::willRemoveVerticalScrollbar):
44         (WebCore::ScrollableArea::didAddHorizontalScrollbar):
45         (WebCore::ScrollableArea::willRemoveHorizontalScrollbar):
46         * platform/ScrollableArea.h:
47         Pipe to ScrollAnimator.
48
49         * platform/mac/ScrollAnimatorMac.h:
50         * platform/mac/ScrollAnimatorMac.mm:
51         (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
52         (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar):
53         (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
54         (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar):
55         * platform/mac/ScrollbarThemeMac.h:
56         * platform/mac/ScrollbarThemeMac.mm:
57         (WebCore::ScrollbarThemeMac::registerScrollbar):
58         (WebCore::ScrollbarThemeMac::unregisterScrollbar):
59         (WebCore::ScrollbarThemeMac::painterForScrollbar):
60         Move painter delegate registration to the new didAdd/willRemove functions.
61
62 2011-02-07  Anders Carlsson  <andersca@apple.com>
63
64         Reviewed by Dan Bernstein.
65
66         Missing text match markers with accelerated content
67         https://bugs.webkit.org/show_bug.cgi?id=53934
68
69         When doing the fake paint that recomputes the text match rects, we need to
70         flatten compositing layers, otherwise the rects won't be updated until the next paint call.
71
72         (This worked by accident in WebKit1 because Safari calls -[NSWindow displayIfNeeded] on the containing
73         window before asking for the text match rects).
74
75         * editing/Editor.cpp:
76         (WebCore::Editor::countMatchesForText):
77
78 2011-02-07  Antti Koivisto  <antti@apple.com>
79
80         Reviewed by Andreas Kling.
81
82         REGRESSION(r77740): CSSStyleSelector accessing deleted memory for svg/dom/use-transform.svg
83         https://bugs.webkit.org/show_bug.cgi?id=53900
84         
85         Ignore link elements in shadow trees.
86
87         * dom/Element.cpp:
88         (WebCore::StyleSelectorParentPusher::StyleSelectorParentPusher):
89         (WebCore::StyleSelectorParentPusher::~StyleSelectorParentPusher):
90                 
91             Some asserts to catch cases like this.
92
93         (WebCore::Element::attach):
94         (WebCore::Element::recalcStyle):
95         * html/HTMLLinkElement.cpp:
96         (WebCore::HTMLLinkElement::HTMLLinkElement):
97         (WebCore::HTMLLinkElement::process):
98         (WebCore::HTMLLinkElement::insertedIntoDocument):
99         (WebCore::HTMLLinkElement::removedFromDocument):
100         * html/HTMLLinkElement.h:
101
102 2011-02-07  Darin Adler  <darin@apple.com>
103
104         Turn UTF-8 decoder off for now so we can look into failing tests
105         without leaving the tree red.
106
107         * platform/text/TextCodecICU.cpp:
108         (WebCore::TextCodecICU::registerBaseEncodingNames): Reverting
109         earlier change so this can handle UTF-8.
110         (WebCore::TextCodecICU::registerBaseCodecs): Ditto.
111         (WebCore::TextCodecICU::registerExtendedEncodingNames): Ditto.
112         (WebCore::TextCodecICU::registerExtendedCodecs): Ditto.
113         * platform/text/TextCodecICU.h: Ditto.
114         * platform/text/TextEncodingRegistry.cpp:
115         (WebCore::buildBaseTextCodecMaps): Ditto.
116         (WebCore::extendTextCodecMaps): Ditto.
117         * platform/text/brew/TextCodecBrew.cpp:
118         (WebCore::TextCodecBrew::registerBaseEncodingNames): Ditto.
119         (WebCore::TextCodecBrew::registerBaseCodecs): Ditto.
120         (WebCore::TextCodecBrew::registerExtendedEncodingNames): Ditto.
121         (WebCore::TextCodecBrew::registerExtendedCodecs): Ditto.
122         * platform/text/brew/TextCodecBrew.h: Ditto.
123         * platform/text/gtk/TextCodecGtk.cpp:
124         (WebCore::TextCodecGtk::registerBaseEncodingNames): Ditto.
125         (WebCore::TextCodecGtk::registerBaseCodecs): Ditto.
126         * platform/text/wince/TextCodecWinCE.cpp:
127         (WebCore::TextCodecWinCE::registerBaseEncodingNames): Ditto.
128         (WebCore::TextCodecWinCE::registerBaseCodecs): Ditto.
129         (WebCore::TextCodecWinCE::registerExtendedEncodingNames): Ditto.
130         (WebCore::TextCodecWinCE::registerExtendedCodecs): Ditto.
131         * platform/text/wince/TextCodecWinCE.h: Ditto.
132
133 2011-02-07  Anders Carlsson  <andersca@apple.com>
134
135         Reviewed by Maciej Stachowiak.
136
137         Don't exclude overlay scrollers from the page overlay bounds
138         https://bugs.webkit.org/show_bug.cgi?id=53924
139
140         Export ScrollbarTheme::nativeTheme.
141
142         * WebCore.exp.in:
143
144 2011-02-07  Zhenyao Mo  <zmo@google.com>
145
146         Reviewed by Kenneth Russell.
147
148         Crash in glDrawArrays with NaCl crystal model
149         https://bugs.webkit.org/show_bug.cgi?id=52831
150
151         * html/canvas/WebGLRenderingContext.cpp: Allocate large enough buffer for atttrib0 if it's enabled and not used.
152         (WebCore::WebGLRenderingContext::initVertexAttrib0):
153         (WebCore::WebGLRenderingContext::simulateVertexAttrib0):
154         * html/canvas/WebGLRenderingContext.h:
155
156 2011-02-07  Chris Fleizach  <cfleizach@apple.com>
157
158         Reviewed by Darin Adler.
159
160         WAI-ARIA @aria-sort not exposed on rowheader and columnheader roles.
161         https://bugs.webkit.org/show_bug.cgi?id=53842
162
163         Test: platform/mac/accessibility/aria-sort.html
164
165         * accessibility/AccessibilityObject.cpp:
166         (WebCore::AccessibilityObject::sortDirection):
167         * accessibility/AccessibilityObject.h:
168         * accessibility/mac/AccessibilityObjectWrapper.mm:
169         (-[AccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
170         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
171         * html/HTMLAttributeNames.in:
172
173 2011-02-07  Darin Adler  <darin@apple.com>
174
175         Reviewed by Antti Koivisto.
176
177         Add built-in decoder for UTF-8 for improved performance
178         https://bugs.webkit.org/show_bug.cgi?id=53898
179
180         Correct behavior is covered by existing tests.
181
182         * Android.mk: Added TextCodecUTF8.
183         * CMakeLists.txt: Ditto.
184         * GNUmakefile.am: Ditto.
185         * WebCore.gypi: Ditto.
186         * WebCore.pro: Ditto.
187         * WebCore.vcproj/WebCore.vcproj: Ditto.
188         * WebCore.xcodeproj/project.pbxproj: Ditto.
189
190         * platform/text/TextCodecICU.cpp: Removed registration of UTF-8
191         since that's now handled by the built-in UTF-8 codec.
192         (WebCore::TextCodecICU::registerEncodingNames): Renamed to remove
193         the word "extended" since all codecs from ICU are now extended.
194         (WebCore::TextCodecICU::registerCodecs): Ditto.
195         * platform/text/TextCodecICU.h: Ditto.
196
197         * platform/text/TextCodecUTF16.cpp:
198         (WebCore::TextCodecUTF16::decode): Added a FIXME about missing
199         error handling.
200
201         * platform/text/TextCodecUTF8.cpp: Added.
202         * platform/text/TextCodecUTF8.h: Added.
203
204         * platform/text/TextEncodingRegistry.cpp:
205         (WebCore::buildBaseTextCodecMaps): Added TextCodecUTF8, and
206         removed TextCodecICU, TextCodecBrew, and TextCodecWinCE.
207         (WebCore::extendTextCodecMaps): Updated names for
208         TextCodecICU and TextCodecWinCE.
209
210         * platform/text/brew/TextCodecBrew.cpp:
211         (WebCore::TextCodecBrew::registerEncodingNames): Renamed to remove
212         the word "extended" since all codecs from Brew are now extended.
213         (WebCore::TextCodecBrew::registerCodecs): Ditto.
214         * platform/text/brew/TextCodecBrew.h: Ditto.
215
216         * platform/text/gtk/TextCodecGtk.cpp:
217         (WebCore::TextCodecGtk::registerBaseEncodingNames): Removed
218         registration of UTF-8. It's questionable whether the other codecs
219         here are really basic. If we think they qualify, then we should
220         register them on other platforms, not just GTK.
221         (WebCore::TextCodecGtk::registerBaseCodecs): Ditto.
222
223         * platform/text/wince/TextCodecWinCE.cpp:
224         (WebCore::getCodePage): Removed special case for UTF-8 since we
225         no longer use this codec for UTF-8.
226         (WebCore::TextCodecWinCE::registerEncodingNames): Renamed to remove
227         the word "extended" since all codecs from WinCE are now extended.
228         (WebCore::TextCodecWinCE::registerCodecs): Ditto.
229         * platform/text/wince/TextCodecWinCE.h: Ditto.
230
231 2011-02-07  Mario Sanchez Prada  <msanchez@igalia.com>
232
233         Reviewed by Xan Lopez.
234
235         [Gtk] atk_text_get_caret_offset fails for list items
236         https://bugs.webkit.org/show_bug.cgi?id=53436
237
238         Consider list item markers when calculating the offset.
239
240         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
241         (webkit_accessible_text_get_caret_offset): Adjust the offset
242         with the item marker's length for list items.
243         (webkit_accessible_text_set_caret_offset): Replace usage of
244         g_utf8_strlen() by calling to markerText.length().
245
246 2011-02-07  Yi Shen  <yi.4.shen@nokia.com>
247
248         Reviewed by Tor Arne Vestbø.
249
250         [Qt] Fix LayoutTests/media/restore-from-page-cache.html
251         https://bugs.webkit.org/show_bug.cgi?id=53621
252
253         Changed the networkState to MediaPlayer::Loaded when 
254         MediaPlayerPrivateQt has enough data.
255
256         Test: media/restore-from-page-cache.html
257
258         * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
259         (WebCore::MediaPlayerPrivateQt::updateStates):
260
261 2011-01-31  Pavel Podivilov  <podivilov@chromium.org>
262
263         Reviewed by Yury Semikhatsky.
264
265         Web Inspector: implement beautification of scripts inlined in html documents.
266         https://bugs.webkit.org/show_bug.cgi?id=52706
267
268         To beautify scripts inlined in html, we need to cut individual scripts, beautify them using UglifyJS library, and
269         finally paste them back to html.
270
271         * WebCore.gypi:
272         * WebCore.vcproj/WebCore.vcproj:
273         * inspector/front-end/ScriptFormatter.js:
274         (WebInspector.ScriptFormatter): Implement formatting of scripts inlined in html.
275         (WebInspector.ScriptFormatter.prototype.formatContent.didFormatChunks):
276         (WebInspector.ScriptFormatter.prototype.formatContent):
277         (WebInspector.ScriptFormatter.prototype._splitContentIntoChunks):
278         (WebInspector.ScriptFormatter.prototype._formatChunks.didFormat):
279         (WebInspector.ScriptFormatter.prototype._formatChunks):
280         (WebInspector.ScriptFormatter.prototype._buildContentFromChunks):
281         (WebInspector.ScriptFormatter.prototype._formatScript.messageHandler):
282         (WebInspector.ScriptFormatter.prototype._formatScript):
283         * inspector/front-end/ScriptFormatterWorker.js:
284         (onmessage):
285         (buildMapping):
286         * inspector/front-end/SourceFrame.js:
287         (WebInspector.SourceFrameContent): Use SourceFrameContent and FormattedSourceFrameContent to perform operations with line numbers.
288         * inspector/front-end/SourceFrameContent.js: Added.
289         (WebInspector.SourceFrameContent): Helper class, holds resource text and scripts layout
290         (WebInspector.SourceFrameContent.prototype.get scriptRanges):
291         (WebInspector.SourceFrameContent.prototype.locationToPosition):
292         (WebInspector.SourceFrameContent.prototype.positionToLocation):
293         (WebInspector.SourceFrameContent.prototype.scriptLocationForLineNumber):
294         (WebInspector.SourceFrameContent.prototype.scriptLocationForRange):
295         (WebInspector.SourceFrameContent.prototype.lineNumberToRange):
296         (WebInspector.SourceFrameContent.prototype._intersectingScriptRange):
297         (WebInspector):
298         (WebInspector.FormattedSourceFrameContent): Helper class, holds original and formatted versions of resource and mapping between them.
299         (WebInspector.FormattedSourceFrameContent.prototype.get text):
300         (WebInspector.FormattedSourceFrameContent.prototype.originalLocationToFormattedLocation):
301         (WebInspector.FormattedSourceFrameContent.prototype.scriptLocationForFormattedLineNumber):
302         (WebInspector.FormattedSourceFrameContent.prototype._convertPosition):
303         * inspector/front-end/WebKit.qrc:
304         * inspector/front-end/inspector.html:
305
306 2011-02-07  Pavel Feldman  <pfeldman@chromium.org>
307
308         Reviewed by Yury Semikhatsky.
309
310         Web Inspector: "Reveal in elements panel" does not always work.
311         https://bugs.webkit.org/show_bug.cgi?id=53775
312
313         * inspector/front-end/ConsoleView.js:
314         (WebInspector.ConsoleView):
315         * inspector/front-end/ContextMenu.js:
316         (WebInspector.ContextMenu.prototype.show):
317         * inspector/front-end/ElementsPanel.js:
318         (WebInspector.ElementsPanel.prototype.switchToAndFocus):
319         * inspector/front-end/ElementsTreeOutline.js:
320         (WebInspector.ElementsTreeOutline.prototype._contextMenuEventFired.focusElement):
321         (WebInspector.ElementsTreeOutline.prototype._contextMenuEventFired):
322         * inspector/front-end/ObjectPropertiesSection.js:
323         (WebInspector.ObjectPropertyTreeElement.prototype.update):
324         (WebInspector.ObjectPropertyTreeElement.prototype._contextMenuEventFired):
325         * inspector/front-end/inspector.js:
326         (WebInspector.cancelSearch):
327
328 2011-02-07  Adam Barth  <abarth@webkit.org>
329
330         Reviewed by Eric Seidel.
331
332         Relative .. in URL paths shouldn't skip adjacent / characters
333         https://bugs.webkit.org/show_bug.cgi?id=53907
334
335         Our new behavior matches Firefox, Chrome, and IE.
336
337         * platform/KURL.cpp:
338         (WebCore::copyPathRemovingDots):
339
340 2011-02-07  Maciej Stachowiak  <mjs@apple.com>
341
342         Reviewed by Antti Koivisto.
343
344         WebKitTestRunner does not block remote resources or complain about them
345         https://bugs.webkit.org/show_bug.cgi?id=42139
346         <rdar://problem/8183942>
347
348         * Configurations/WebCore.xcconfig: Allow WebKitTestRunner to link
349         WebCore.
350         * WebCore.exp.in: Export a handful of KURL symbols.
351
352 2011-02-06  Ryosuke Niwa  <rniwa@webkit.org>
353
354         Reviewed by Darin Adler.
355
356         OwnArraryPtr.h uses deleteOwnedPtr but doesn’t include OwnPtrCommon.h
357         https://bugs.webkit.org/show_bug.cgi?id=52867
358
359         * ForwardingHeaders/wtf/OwnArrayPtrCommon.h: Removed.
360         * bindings/v8/NPV8Object.cpp:
361         (WebCore::createValueListFromVariantArgs): Returns PassOwnArrayPtr<v8::Handle<v8::Value>> instead of
362         v8::Handle<v8::Value>*.
363         (_NPN_Invoke): Calls createValueListFromVariantArgs.
364         (_NPN_InvokeDefault): createValueListFromVariantArgs.
365         (_NPN_Construct): createValueListFromVariantArgs.
366         * bindings/v8/ScriptFunctionCall.cpp:
367         (WebCore::ScriptFunctionCall::call): Calls adoptArrayPtr.
368         (WebCore::ScriptFunctionCall::construct): Ditto.
369         (WebCore::ScriptCallback::call):
370         * bindings/v8/V8DOMWindowShell.cpp:
371         (WebCore::V8DOMWindowShell::createNewContext): Ditto.
372         * bindings/v8/V8NPObject.cpp:
373         (WebCore::npObjectInvokeImpl): Ditto
374         * bindings/v8/V8NodeFilterCondition.cpp:
375         (WebCore::V8NodeFilterCondition::acceptNode): Ditto,
376         * html/HTMLAreaElement.cpp:
377         (WebCore::HTMLAreaElement::parseMappedAttribute): Calls newCoordsArray.
378         * html/HTMLFrameSetElement.cpp:
379         (WebCore::HTMLFrameSetElement::parseMappedAttribute): Calls newLengthArray.
380         * html/canvas/WebGLRenderingContext.cpp:
381         (WebCore::WebGLRenderingContext::getAttachedShaders): Calls adoptArraYptr.
382         (WebCore::WebGLRenderingContext::simulateVertexAttrib0): Ditto.
383         (WebCore::WebGLRenderingContext::LRUImageBufferCache::LRUImageBufferCache): Dito.
384         * platform/Length.cpp:
385         (WebCore::newCoordsArray): Returns PassOwnArrayPtr<Length> instead of Length*.
386         (WebCore::newLengthArray): Returns PassOwnArrayPtr<Length> instead of Length*.
387         * platform/Length.h: Prototype changes.
388         * platform/graphics/ANGLEWebKitBridge.cpp:
389         (WebCore::ANGLEWebKitBridge::validateShaderSource): Calls adoptArrayPtr.
390         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
391         (WebCore::getDirtyRects): Ditto.
392         * platform/graphics/chromium/ComplexTextControllerLinux.cpp:
393         (WebCore::ComplexTextController::getNormalizedTextRun): Ditto.
394         * platform/graphics/chromium/HarfbuzzSkia.cpp:
395         (WebCore::glyphsToAdvances): Ditto.
396         (WebCore::canRender): Ditto.
397         * platform/graphics/gpu/Texture.cpp:
398         (WebCore::Texture::updateSubRect): Ditto.
399         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
400         (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): Ditto.
401         * platform/graphics/skia/PlatformContextSkia.cpp:
402         (WebCore::PlatformContextSkia::readbackHardwareToSoftware): Ditto.
403         * platform/graphics/wince/SharedBitmap.cpp:
404         (WebCore::SharedBitmap::to16bit): Ditto.
405         * platform/win/ContextMenuWin.cpp:
406         (WebCore::ContextMenu::getContextMenuItems): Ditto.
407         * platform/win/LoggingWin.cpp:
408         (WebCore::initializeWithUserDefault): Ditto.
409         * plugins/win/PluginPackageWin.cpp:
410         (WebCore::PluginPackage::fetchInfo): Ditto.
411
412 2011-02-06  Kent Tamura  <tkent@chromium.org>
413
414         Unreviewed.
415
416         * WebCore.xcodeproj/project.pbxproj: Run sort-xcode-project-file.
417
418 2011-02-03  Dominic Cooney  <dominicc@google.com>
419
420         Reviewed by Dimitri Glazkov.
421
422         Convert <keygen> option elements to a shadow DOM
423         https://bugs.webkit.org/show_bug.cgi?id=51379
424
425         Covered by existing tests e.g. fast/html/keygen.html,
426         html5lib/runner.html, etc.
427
428         * css/html.css:
429         (form): Cleanup.
430         (keygen, select): Border radii should match so focus ring looks good.
431         (keygen::-webkit-keygen-select): No margin on the shadow element.
432         (select): Hoisting border radius to keygen, select rule.
433         * dom/SelectElement.cpp:
434         (WebCore::toSelectElement): keygen is no longer a select element.
435         * html/HTMLKeygenElement.cpp: Implements keygen shadow.
436         (WebCore::KeygenSelectElement::create):
437         (WebCore::KeygenSelectElement::shadowPseudoId):
438         (WebCore::KeygenSelectElement::KeygenSelectElement):
439         (WebCore::HTMLKeygenElement::HTMLKeygenElement):
440         (WebCore::HTMLKeygenElement::parseMappedAttribute):
441         (WebCore::HTMLKeygenElement::appendFormData):
442         (WebCore::HTMLKeygenElement::formControlType):
443         (WebCore::HTMLKeygenElement::reset):
444         (WebCore::HTMLKeygenElement::selectShadow):
445         * html/HTMLKeygenElement.h: keygen is no longer a select on C++ side.
446         (WebCore::HTMLKeygenElement::canStartSelection):
447         (WebCore::HTMLKeygenElement::isEnumeratable):
448         (WebCore::HTMLKeygenElement::isResettable):
449         * html/HTMLOptionElement.cpp:
450         (WebCore::HTMLOptionElement::ownerSelectElement): Only owned by selects.
451         * html/HTMLSelectElement.cpp:
452         (WebCore::HTMLSelectElement::HTMLSelectElement): Only 'select' tag name.
453
454 2011-02-06  Benjamin Poulain  <ikipou@gmail.com>
455
456         Reviewed by Kenneth Rohde Christiansen.
457
458         [Qt] Fix coding style errors in ClipboardQt.h
459         https://bugs.webkit.org/show_bug.cgi?id=43520
460
461         Fix coding style: order of header and indentation.
462
463         * platform/qt/ClipboardQt.h:
464         (WebCore::ClipboardQt::create):
465         (WebCore::ClipboardQt::clipboardData):
466         (WebCore::ClipboardQt::invalidateWritableData):
467
468 2011-02-06  Antti Koivisto  <antti@apple.com>
469
470         Reviewed by Maciej Stachowiak.
471
472         Use bloom filter for descendant selector filtering
473         https://bugs.webkit.org/show_bug.cgi?id=53880
474         
475         Bloom filter is faster than a hash set in this kind of use.
476         
477         Shark thinks this speeds up style matching by ~30% on sites
478         with lots of descendant selectors.
479
480         * ForwardingHeaders/wtf/BloomFilter.h: Added.
481         * css/CSSStyleSelector.cpp:
482         (WebCore::collectElementIdentifierHashes):
483         (WebCore::CSSStyleSelector::pushParent):
484         (WebCore::CSSStyleSelector::popParent):
485         (WebCore::CSSStyleSelector::fastRejectSelector):
486         (WebCore::RuleData::collectDescendantSelectorIdentifierHashes):
487         * css/CSSStyleSelector.h:
488
489 2011-02-06  Maciej Stachowiak  <mjs@apple.com>
490
491         Reviewed by Antti Koivisto.
492
493         media/video-document-types.html sometimes crashes the WebProcess
494         https://bugs.webkit.org/show_bug.cgi?id=53884
495
496         No new tests. Already covered by media/video-document-types.html
497
498         * html/HTMLMediaElement.cpp:
499         (WebCore::HTMLMediaElement::userCancelledLoad): Stop the load timer
500         when cancelling the load.
501
502 2011-02-06  Patrick Gansterer  <paroga@webkit.org>
503
504         Reviewed by Adam Roben.
505
506         [WIN] Use WCHAR instead of TCHAR
507         https://bugs.webkit.org/show_bug.cgi?id=53863
508
509         We always use the UNICODE versions of windows functions, so
510         the usage of TCHAR makes no sense and mixing them is bad style.
511
512         * platform/graphics/win/IconWin.cpp:
513         (WebCore::Icon::createIconForFiles):
514         * platform/graphics/win/QTMovie.cpp:
515         * platform/graphics/win/QTMovieGWorld.cpp:
516         (QTMovieGWorld::fullscreenWndProc):
517         (QTMovieGWorld::enterFullscreen):
518         * platform/graphics/win/SimpleFontDataCGWin.cpp:
519         (WebCore::SimpleFontData::platformInit):
520         * platform/graphics/win/SimpleFontDataCairoWin.cpp:
521         * platform/graphics/win/SimpleFontDataWin.cpp:
522         * platform/graphics/wince/SimpleFontDataWinCE.cpp:
523         * platform/win/BString.cpp:
524         * platform/win/ClipboardWin.cpp:
525         (WebCore::filesystemPathFromUrlOrTitle):
526         (WebCore::createGlobalHDropContent):
527         (WebCore::createGlobalImageFileDescriptor):
528         * platform/win/ContextMenuWin.cpp:
529         * platform/win/CursorWin.cpp:
530         (WebCore::loadSharedCursor):
531         * platform/win/FileChooserWin.cpp:
532         (WebCore::FileChooser::basenameForWidth):
533         * platform/win/PopupMenuWin.cpp:
534         (WebCore::PopupMenuWin::popupClassName):
535         (WebCore::PopupMenuWin::show):
536         * platform/win/PopupMenuWin.h:
537
538 2011-02-06  Patrick Gansterer  <paroga@webkit.org>
539
540         Reviewed by Andreas Kling.
541
542         Replace FLT_MAX with std::numeric_limits
543         https://bugs.webkit.org/show_bug.cgi?id=53861
544
545         Also move EFL's userIdleTime from TemporaryLinkStubs into SystemTimeEfl.
546
547         * html/NumberInputType.cpp:
548         * html/parser/HTMLParserIdioms.cpp:
549         (WebCore::parseToDoubleForNumberType):
550         * platform/brew/SystemTimeBrew.cpp:
551         (WebCore::userIdleTime):
552         * platform/efl/SystemTimeEfl.cpp:
553         (WebCore::userIdleTime):
554         * platform/efl/TemporaryLinkStubs.cpp:
555         * platform/graphics/ca/GraphicsLayerCA.cpp:
556         (WebCore::GraphicsLayerCA::setupAnimation):
557         * platform/win/SystemTimeWin.cpp:
558         (WebCore::userIdleTime):
559         * platform/wx/SystemTimeWx.cpp:
560         (WebCore::userIdleTime):
561
562 2011-02-06  Patrick Gansterer  <paroga@webkit.org>
563
564         Reviewed by Andreas Kling.
565
566         [CMake] Add dependencies for Visual Studio projects
567         https://bugs.webkit.org/show_bug.cgi?id=53773
568
569         Add a JavaScriptCore dependecy to WebCore, so CMake can 
570         generate the correct build order for the solution.
571
572         * CMakeLists.txt:
573
574 2011-02-06  Patrick Gansterer  <paroga@webkit.org>
575
576         Reviewed by Andreas Kling.
577
578         [CMake] Unify ENABLE_SVG sections
579         https://bugs.webkit.org/show_bug.cgi?id=53778
580
581         * CMakeLists.txt:
582
583 2011-02-06  Andreas Kling  <kling@webkit.org>
584
585         Reviewed by Dirk Schulze.
586
587         Refactor Font::normalizeSpaces() to avoid an extra String copy.
588         https://bugs.webkit.org/show_bug.cgi?id=53871
589
590         Have normalizeSpaces() take UChar*,length arguments instead of a
591         String, since all call sites were creating temporaries from these
592         components anyway.
593
594         Font::normalizeSpaces() now always makes 1 String copy,
595         instead of 1 in the best case and 2 in the worst case.
596
597         * platform/graphics/Font.cpp:
598         (WebCore::Font::normalizeSpaces):
599         * platform/graphics/Font.h:
600         * platform/graphics/qt/FontQt.cpp:
601         (WebCore::drawTextCommon):
602         (WebCore::Font::floatWidthForSimpleText):
603         (WebCore::Font::floatWidthForComplexText):
604         (WebCore::Font::offsetForPositionForSimpleText):
605         (WebCore::Font::offsetForPositionForComplexText):
606         (WebCore::Font::selectionRectForSimpleText):
607         (WebCore::Font::selectionRectForComplexText):
608         * svg/SVGFont.cpp:
609         (WebCore::SVGTextRunWalker::walk):
610
611 2011-02-06  Andreas Kling  <kling@webkit.org>
612
613         Reviewed by Dirk Schulze.
614
615         Fix potential buffer overrun in SVGTextRunWalker::walk()
616         https://bugs.webkit.org/show_bug.cgi?id=53870
617
618         A new String was created from a UChar* with a 'length' argument
619         that could be greater than the number of UChars available.
620
621         * svg/SVGFont.cpp:
622         (WebCore::SVGTextRunWalker::walk):
623
624 2011-02-05  Adam Barth  <abarth@webkit.org>
625
626         Reviewed by Eric Seidel.
627
628         Remove unused parameter related to XSSAuditor
629         https://bugs.webkit.org/show_bug.cgi?id=53862
630
631         * WebCore.exp.in:
632         * bindings/ScriptControllerBase.cpp:
633         (WebCore::ScriptController::executeScript):
634         (WebCore::ScriptController::executeIfJavaScriptURL):
635         * bindings/ScriptControllerBase.h:
636         * bindings/js/ScriptController.cpp:
637         (WebCore::ScriptController::evaluateInWorld):
638         (WebCore::ScriptController::evaluate):
639         (WebCore::ScriptController::executeScriptInWorld):
640         * bindings/js/ScriptController.h:
641         * bindings/v8/ScriptController.cpp:
642         (WebCore::ScriptController::evaluate):
643         * bindings/v8/ScriptController.h:
644
645 2011-02-05  Adam Barth  <abarth@webkit.org>
646
647         Fix Qt build.
648
649         * WebCore.pro:
650
651 2011-02-05  Adam Barth  <abarth@webkit.org>
652
653         Reviewed by Eric Seidel.
654
655         Delete XSSAuditor
656         https://bugs.webkit.org/show_bug.cgi?id=53859
657
658         The job of the XSSAuditor is now done by the XSSFilter.  In the future,
659         we might rename XSSFilter to XSSAuditor.
660
661         * Android.mk:
662         * CMakeLists.txt:
663         * GNUmakefile.am:
664         * WebCore.gypi:
665         * WebCore.vcproj/WebCore.vcproj:
666         * WebCore.xcodeproj/project.pbxproj:
667         * bindings/ScriptControllerBase.cpp:
668         (WebCore::ScriptController::executeIfJavaScriptURL):
669         * bindings/ScriptControllerBase.h:
670         * bindings/js/ScriptController.cpp:
671         (WebCore::ScriptController::ScriptController):
672         (WebCore::ScriptController::evaluateInWorld):
673         * bindings/js/ScriptController.h:
674         * bindings/js/ScriptEventListener.cpp:
675         (WebCore::createAttributeEventListener):
676         * bindings/v8/ScriptController.cpp:
677         (WebCore::ScriptController::ScriptController):
678         (WebCore::ScriptController::evaluate):
679         * bindings/v8/ScriptController.h:
680         * bindings/v8/ScriptEventListener.cpp:
681         (WebCore::createAttributeEventListener):
682         * dom/Document.cpp:
683         (WebCore::Document::implicitOpen):
684         (WebCore::Document::processBaseElement):
685         * dom/ScriptableDocumentParser.cpp:
686         (WebCore::ScriptableDocumentParser::ScriptableDocumentParser):
687         * dom/ScriptableDocumentParser.h:
688         * html/parser/HTMLDocumentParser.cpp:
689         (WebCore::HTMLDocumentParser::shouldLoadExternalScriptFromSrc):
690         * loader/SubframeLoader.cpp:
691         (WebCore::SubframeLoader::requestObject):
692         (WebCore::SubframeLoader::loadMediaPlayerProxyPlugin):
693         * page/XSSAuditor.cpp: Removed.
694         * page/XSSAuditor.h: Removed.
695
696 2011-02-05  Anders Carlsson  <andersca@apple.com>
697
698         Reviewed by Darin Adler.
699
700         Need a way to resize and scroll the page at the same time
701         https://bugs.webkit.org/show_bug.cgi?id=53814
702         <rdar://problem/8498008>
703
704         Export a function needed by WebKit2.
705
706         * WebCore.exp.in:
707
708 2011-02-05  Patrick Gansterer  <paroga@webkit.org>
709
710         Reviewed by Alexey Proskuryakov.
711
712         Use Document::encoding() instead of DocumentWriter::encoding()
713         https://bugs.webkit.org/show_bug.cgi?id=53398
714
715         This change makes the code more readable, when a subresource
716         inherits the character encoding of the document.
717
718         * dom/ProcessingInstruction.cpp:
719         (WebCore::ProcessingInstruction::checkStyleSheet):
720         * dom/ScriptElement.cpp:
721         (WebCore::ScriptElement::scriptCharset):
722         * html/HTMLLinkElement.cpp:
723         (WebCore::HTMLLinkElement::process):
724         * loader/cache/CachedResourceLoader.cpp:
725         (WebCore::CachedResourceLoader::requestPreload):
726         * platform/network/FormDataBuilder.cpp:
727         (WebCore::FormDataBuilder::encodingFromAcceptCharset):
728
729 2011-02-05  Adam Barth  <abarth@webkit.org>
730
731         Reviewed by Eric Seidel.
732
733         Introduce URLString to represent a canonicalized URL represented by a string
734         https://bugs.webkit.org/show_bug.cgi?id=53847
735
736         Instead of using String all over the codebase to represent a URL,
737         instead we should have a type to represent a canonicalized URL in the
738         form of a string.  This patch introduces that type.
739
740         * GNUmakefile.am:
741         * WebCore.gypi:
742         * WebCore.xcodeproj/project.pbxproj:
743         * platform/KURL.cpp:
744         (WebCore::KURL::KURL):
745         * platform/KURL.h:
746         (WebCore::KURL::urlString):
747
748 2011-02-05  Robert Hogan  <robert@webkit.org>
749
750         Reviewed by Antonio Gomes.
751
752         [Qt] Style widgets not rendering
753         https://bugs.webkit.org/show_bug.cgi?id=53849
754
755         * html/HTMLObjectElement.cpp:
756         (WebCore::HTMLObjectElement::hasValidClassId): x-qt-styled-widget is a valid class id too
757
758 2011-02-05  Jochen Eisinger  <jochen@chromium.org>
759
760         Reviewed by Adam Barth.
761
762         Add ContentSecurityPolicy object to Document and pass the X-WebKit-CSP header from the MainResourceLoader.
763         https://bugs.webkit.org/show_bug.cgi?id=53685
764
765         * WebCore.xcodeproj/project.pbxproj:
766         * dom/Document.h:
767         (WebCore::Document::contentSecurityPolicy):
768         * loader/MainResourceLoader.cpp:
769         (WebCore::MainResourceLoader::didReceiveResponse):
770         * page/ContentSecurityPolicy.cpp:
771         (WebCore::ContentSecurityPolicy::didReceiveHeader):
772         * page/ContentSecurityPolicy.h:
773
774 2011-02-05  Eric Seidel  <eric@webkit.org>
775
776         Reviewed by Adam Barth.
777
778         Safari should lowercase schemes in cannonicalized urls to match every other browser
779         https://bugs.webkit.org/show_bug.cgi?id=53848
780
781         We're clearly the odd man out here.  See results from every browser at:
782         https://github.com/abarth/url-spec/blob/master/tests/gurl-results/by-browser.txt
783
784         * platform/KURL.cpp:
785         (WebCore::KURL::parse):
786          - Just lowercase the scheme when copying.
787
788 2011-02-05  Antti Koivisto  <antti@apple.com>
789
790         Reviewed by Dave Hyatt.
791
792         Optimize matching of descendant selectors
793         https://bugs.webkit.org/show_bug.cgi?id=49876
794         <rdar://problem/8772822>
795         
796         During style recalculation, maintain a filter of tags, ids and classes seen in ancestor elements.
797         Use the filter to quickly reject descendant and child selectors when doing style matching.
798
799         This speeds up style recalculations 3-6x on many major web sites.
800
801         * css/CSSStyleSelector.cpp:
802         (WebCore::RuleData::RuleData):
803         (WebCore::RuleData::descendantSelectorIdentifierHashes):
804         (WebCore::collectElementIdentifiers):
805         (WebCore::CSSStyleSelector::pushParent):
806         (WebCore::CSSStyleSelector::popParent):
807         (WebCore::CSSStyleSelector::fastRejectSelector):
808         (WebCore::CSSStyleSelector::matchRulesForList):
809         (WebCore::RuleData::collectDescendantSelectorIdentifierHashes):
810         * css/CSSStyleSelector.h:
811         (WebCore::CSSStyleSelector::ParentStackFrame::ParentStackFrame):
812         * dom/Element.cpp:
813         (WebCore::StyleSelectorParentPusher::StyleSelectorParentPusher):
814         (WebCore::StyleSelectorParentPusher::push):
815         (WebCore::StyleSelectorParentPusher::~StyleSelectorParentPusher):
816         (WebCore::Element::attach):
817         (WebCore::Element::recalcStyle):
818
819 2011-02-05  Nate Chapin  <japhet@chromium.org>
820
821         Reviewed by Adam Barth.
822
823         Refactor: NotificationCenter shouldn't hold its own copy of the ScriptExecutionContext*
824         when it inherits one from ActiveDOMObject.
825         https://bugs.webkit.org/show_bug.cgi?id=53815
826
827         * bindings/js/JSDesktopNotificationsCustom.cpp:
828         (WebCore::JSNotificationCenter::requestPermission):
829         * bindings/v8/custom/V8NotificationCenterCustom.cpp:
830         (WebCore::V8NotificationCenter::requestPermissionCallback):
831         * notifications/NotificationCenter.cpp:
832         (WebCore::NotificationCenter::NotificationCenter):
833         (WebCore::NotificationCenter::checkPermission):
834         (WebCore::NotificationCenter::requestPermission):
835         (WebCore::NotificationCenter::disconnectFrame):
836         * notifications/NotificationCenter.h:
837         (WebCore::NotificationCenter::createHTMLNotification):
838         (WebCore::NotificationCenter::createNotification):
839
840 2011-02-04  Adam Barth  <abarth@webkit.org>
841
842         Reviewed by Maciej Stachowiak.
843
844         Crash in WebCore::TextEncoding::decode below XSSFilter::init
845         https://bugs.webkit.org/show_bug.cgi?id=53837
846
847         Add missing null check.
848
849         Test: http/tests/security/xssAuditor/non-block-javascript-url-frame.html
850
851         * html/parser/XSSFilter.cpp:
852         (WebCore::XSSFilter::init):
853
854 2011-02-04  Simon Fraser  <simon.fraser@apple.com>
855
856         Reviewed by Dan Bernstein.
857
858         Crashes in ShadowBlur via WebKit2 FindController
859         https://bugs.webkit.org/show_bug.cgi?id=53830
860         
861         Fix a crash cause by re-entering ShadowBlur, and add assertions to
862         detect when it happens.
863         
864         The re-entrancy occurred when drawRectShadowWithTiling() filled
865         the interior of the shadow with fillRect() on the context
866         which still had the shadow state set. This would make another ShadowBlur
867         on the stack and call into the code again, potentially blowing away
868         the image buffer.
869         
870         Fix by turning off shadows in the destination context while we're
871         drawing the tiled shadow. The non-tiled code path already did this.
872
873         Not testable because CSS shadows clip out the inside of the rect
874         being shadowed, and SVG uses fillPath, even for rects.
875
876         * platform/graphics/ShadowBlur.cpp:
877         (WebCore::ScratchBuffer::ScratchBuffer):
878         (WebCore::ScratchBuffer::getScratchBuffer):
879         (WebCore::ScratchBuffer::scheduleScratchBufferPurge):
880         (WebCore::ShadowBlur::ShadowBlur):
881         (WebCore::ShadowBlur::drawRectShadowWithTiling):
882
883 2011-02-04  Carlos Garcia Campos  <cgarcia@igalia.com>
884
885         Reviewed by Martin Robinson.
886
887         [GTK] Don't use a fixed size for search field icons
888         https://bugs.webkit.org/show_bug.cgi?id=50624
889
890         Use the parent input content box to make sure the icon fits in the
891         search field, scaling it down when needed.
892
893         * platform/gtk/RenderThemeGtk.cpp:
894         (WebCore::paintGdkPixbuf):
895         (WebCore::getIconSizeForPixelSize):
896         (WebCore::adjustSearchFieldIconStyle):
897         (WebCore::RenderThemeGtk::adjustSearchFieldResultsDecorationStyle):
898         (WebCore::centerRectVerticallyInParentInputElement):
899         (WebCore::RenderThemeGtk::paintSearchFieldResultsDecoration):
900         (WebCore::RenderThemeGtk::adjustSearchFieldCancelButtonStyle):
901         (WebCore::RenderThemeGtk::paintSearchFieldCancelButton):
902         (WebCore::RenderThemeGtk::paintCapsLockIndicator):
903         (WebCore::RenderThemeGtk::paintMediaButton):
904
905 2011-02-04  Hironori Bono  <hbono@chromium.org>
906
907         Reviewed by Adam Barth.
908
909         [chromium] JPEG corruption
910         https://bugs.webkit.org/show_bug.cgi?id=53250
911
912         Same as gray-scale JPEGs, we convert the colors of CMYK JPEGs with color
913         profiles from CMYK to RGB twice and it causes color corruption. This
914         change suppresses the color profiles for CMYK JPEGs same as gray-scale
915         ones.
916
917         Test: fast/images/cmyk-jpeg-with-color-profile.html
918
919         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
920         (WebCore::JPEGImageReader::decode):
921
922 2011-02-04  Xiyuan Xia  <xiyuan@chromium.org>
923
924         Reviewed by Tony Chang.
925
926         [Chromium] Option text in select popup does not align with menulist button text
927         https://bugs.webkit.org/show_bug.cgi?id=53632
928
929         This makes clientPaddingLeft and  clientPaddingRight return
930         the additional m_innerBlock's padding so that the popup item text
931         aligns with the menulist button text.
932
933         * rendering/RenderMenuList.cpp:
934         (WebCore::RenderMenuList::clientPaddingLeft):
935         (WebCore::RenderMenuList::clientPaddingRight):
936
937 2011-02-04  Anders Carlsson  <andersca@apple.com>
938
939         Reviewed by Sam Weinig and Beth Dakin.
940
941         REGRESSION: Horizontal scrollbar thumbs leave artifacts over page content when scrolling vertically
942         <rdar://problem/8962457>
943
944         * platform/ScrollView.cpp:
945         (WebCore::ScrollView::scrollContents):
946         Subtract scrollbars from the scroll view rect if overlay scrollers are enabled.
947         
948         * platform/ScrollableArea.cpp:
949         (WebCore::ScrollableArea::setScrollOffsetFromAnimation):
950         Make sure to invalidate both scrollbars if overlay scrollers are enabled.
951
952 2011-02-04  Adam Barth  <abarth@webkit.org>
953
954         Reviewed by Eric Seidel.
955
956         PluginDocuments don't create widgets for plugins on back/forward
957         https://bugs.webkit.org/show_bug.cgi?id=53474
958
959         Long ago, PluginDocument always caused the HTMLEmbedElement to create
960         its widget synchronously during a post-layout task.  Recently, however,
961         some changes to the HistroyController caused layout on back/forward to
962         become slightly more complicated (and added an extra level of recursion
963         to layout).  This extra level of recursion triggered the "I've recursed
964         too many times" condition in the post-layout task queue, causing the
965         FrameView to run the remainder of the tasks asynchronously.
966         Unfortunately, that broke PluginDocument because it needs its the
967         HTMLEmbedElement's updateWidget task to run synchronously.
968
969         This patch adds a mechanism for "kicking off" the pending post-layout
970         tasks synchronously (instead of waiting for the timer to fire).
971         PluginDocument then uses that facility to ensure that the
972         HTMLEmbedElement's updateWidget task happens.
973
974         Test: plugins/plugin-document-back-forward.html
975
976         * html/PluginDocument.cpp:
977         (WebCore::PluginDocumentParser::appendBytes):
978         * page/FrameView.cpp:
979         (WebCore::FrameView::flushAnyPendingPostLayoutTasks):
980         * page/FrameView.h:
981
982 2011-02-04  Charlie Reis  <creis@chromium.org>
983
984         Reviewed by Mihai Parparita.
985
986         Crash in WebCore::HistoryController::itemsAreClones
987         https://bugs.webkit.org/show_bug.cgi?id=52819
988
989         Avoids deleting the current HistoryItem while it is still in use.
990         Ensures that provisional items are committed for same document navigations.
991         Ensures that error pages are committed on back/forward navigations.
992         Also removes unneeded sanity checks used for diagnosing the problem.
993
994         * loader/HistoryController.cpp:
995         * loader/HistoryController.h:
996
997 2011-02-04  Carol Szabo  <carol.szabo@nokia.com>
998
999         Reviewed by David Hyatt.
1000
1001         Code Changes.
1002
1003         CSS 2.1 failure: content-*
1004         https://bugs.webkit.org/show_bug.cgi?id=52126
1005
1006         Test: fast/css/counters/content-021.html
1007
1008         * rendering/CounterNode.cpp:
1009         (showCounterTree):
1010         Made parameter const because it is supposed to be so.
1011         * rendering/RenderCounter.cpp:
1012         (WebCore::previousInPreOrder):
1013         (WebCore::previousSiblingOrParent):
1014         (WebCore::parentElement):
1015         (WebCore::areRenderersElementsSiblings):
1016         (WebCore::nextInPreOrder):
1017         Added these local helper functions to help navigate the DOM tree
1018         enriched with :before and :after pseudo elements.
1019         (WebCore::planCounter):
1020         Fixed bug that would create a repeat counter for second and
1021         subsequent renderers associated with the same DOM element.
1022         (WebCore::findPlaceForCounter):
1023         (WebCore::makeCounterNode):
1024         Changed to use the new tree navigation functions described above
1025         instead of the Renderer Tree navigation functions.
1026         (WebCore::RenderCounter::rendererSubtreeAttached):
1027         (WebCore::RenderCounter::rendererStyleChanged):
1028         Optimized to not bother about counters until the renderers are
1029         finally attached.
1030         (showRendererTree):
1031         (showNodeTree):
1032         Debug helper functions used to debug Counter bugs.
1033
1034 2011-02-04  Dan Bernstein  <mitz@apple.com>
1035
1036         Typo fix.
1037
1038         * html/parser/XSSFilter.cpp:
1039         (WebCore::HTMLNames::containsJavaScriptURL):
1040
1041 2011-02-04  Dan Bernstein  <mitz@apple.com>
1042
1043         Reviewed by Anders Carlsson.
1044
1045         Make an infinite loop introduced in r77454 finite.
1046
1047         * html/parser/XSSFilter.cpp:
1048         (WebCore::HTMLNames::containsJavaScriptURL):
1049
1050 2011-02-04  Jer Noble  <jer.noble@apple.com>
1051
1052         Reviewed by Eric Carlson.
1053
1054         Frame accurate seeking isn't always accurate
1055         https://bugs.webkit.org/show_bug.cgi?id=52697
1056
1057         Test: media/video-frame-accurate-seek.html
1058
1059         Make seeking slightly more accurate by rounding instead of truncating
1060         when converting from seconds-in-float to time/timeScale.
1061
1062         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1063         (WebCore::MediaPlayerPrivateQTKit::createQTTime):
1064         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
1065         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::mediaTimeForTimeValue):
1066         * platform/graphics/win/QTMovie.cpp:
1067         (QTMovie::setCurrentTime):
1068
1069 2011-02-04  Jeremy Orlow  <jorlow@chromium.org>
1070
1071         Reviewed by Nate Chapin.
1072
1073         Second IndexedDB events overhaul patch
1074         https://bugs.webkit.org/show_bug.cgi?id=53813
1075
1076         If an IDBRequest has a IDBTransaction, it should propogate
1077         events through it. In order to do this, IDBRequest needs to
1078         hold a transaction frontend object rather than a backend one.
1079
1080         Test: storage/indexeddb/request-event-propagation.html
1081
1082         * storage/IDBCursor.cpp:
1083         (WebCore::IDBCursor::IDBCursor):
1084         * storage/IDBCursor.h:
1085         (WebCore::IDBCursor::create):
1086         * storage/IDBDatabase.cpp:
1087         (WebCore::IDBDatabase::setSetVersionTransaction):
1088         (WebCore::IDBDatabase::createObjectStore):
1089         (WebCore::IDBDatabase::deleteObjectStore):
1090         * storage/IDBDatabase.h:
1091         * storage/IDBIndex.cpp:
1092         (WebCore::IDBIndex::IDBIndex):
1093         (WebCore::IDBIndex::openCursor):
1094         (WebCore::IDBIndex::openKeyCursor):
1095         (WebCore::IDBIndex::get):
1096         (WebCore::IDBIndex::getKey):
1097         * storage/IDBIndex.h:
1098         (WebCore::IDBIndex::create):
1099         * storage/IDBObjectStore.cpp:
1100         (WebCore::IDBObjectStore::IDBObjectStore):
1101         (WebCore::IDBObjectStore::get):
1102         (WebCore::IDBObjectStore::add):
1103         (WebCore::IDBObjectStore::put):
1104         (WebCore::IDBObjectStore::deleteFunction):
1105         (WebCore::IDBObjectStore::createIndex):
1106         (WebCore::IDBObjectStore::deleteIndex):
1107         (WebCore::IDBObjectStore::openCursor):
1108         * storage/IDBObjectStore.h:
1109         (WebCore::IDBObjectStore::create):
1110         * storage/IDBRequest.cpp:
1111         (WebCore::IDBRequest::create):
1112         (WebCore::IDBRequest::IDBRequest):
1113         (WebCore::IDBRequest::resetReadyState):
1114         (WebCore::IDBRequest::onSuccess):
1115         (WebCore::IDBRequest::dispatchEvent):
1116         * storage/IDBRequest.h:
1117         * storage/IDBTransaction.cpp:
1118         (WebCore::IDBTransaction::IDBTransaction):
1119         (WebCore::IDBTransaction::objectStore):
1120         (WebCore::IDBTransaction::contextDestroyed):
1121         (WebCore::IDBTransaction::enqueueEvent):
1122         * storage/IDBTransaction.h:
1123         * storage/IDBTransaction.idl:
1124
1125 2011-02-04  Jeremy Orlow  <jorlow@chromium.org>
1126
1127         Reviewed by Nate Chapin.
1128
1129         First step towards event propogation within IndexedDB
1130         https://bugs.webkit.org/show_bug.cgi?id=53795
1131
1132         This is the first step towards implementing
1133         http://www.w3.org/Bugs/Public/show_bug.cgi?id=11348
1134         within IndexedDB. I've created a method that knows how
1135         to capture and bubble (based on Node's dispatchGenericEvent).
1136         I've then changed IDBRequest to use it.
1137
1138         The only functional change is that preventDefault now must
1139         be called in error events to prevent the transaction from
1140         being aborted. The tests reflect this change and there's one
1141         specific test to look at this behavior.
1142
1143         Test: storage/indexeddb/error-causes-abort-by-default.html
1144
1145         * storage/IDBAbortEvent.cpp:
1146         (WebCore::IDBAbortEvent::create):
1147         (WebCore::IDBAbortEvent::IDBAbortEvent):
1148         * storage/IDBAbortEvent.h:
1149         * storage/IDBCompleteEvent.cpp:
1150         (WebCore::IDBCompleteEvent::create):
1151         (WebCore::IDBCompleteEvent::IDBCompleteEvent):
1152         * storage/IDBCompleteEvent.h:
1153         * storage/IDBErrorEvent.cpp:
1154         (WebCore::IDBErrorEvent::IDBErrorEvent):
1155         * storage/IDBEvent.cpp:
1156         (WebCore::IDBEvent::IDBEvent):
1157         (WebCore::IDBEvent::dispatch):
1158         * storage/IDBEvent.h:
1159         * storage/IDBRequest.cpp:
1160         (WebCore::IDBRequest::dispatchEvent):
1161         * storage/IDBRequest.h:
1162         * storage/IDBSuccessEvent.cpp:
1163         (WebCore::IDBSuccessEvent::IDBSuccessEvent):
1164         * storage/IDBTransaction.cpp:
1165         (WebCore::IDBTransaction::onAbort):
1166         (WebCore::IDBTransaction::onComplete):
1167         * storage/IDBTransaction.h:
1168         (WebCore::IDBTransaction::backend):
1169         * storage/IDBTransactionBackendImpl.cpp:
1170         (WebCore::IDBTransactionBackendImpl::taskTimerFired):
1171
1172 2011-02-04  Daniel Cheng  <dcheng@chromium.org>
1173
1174         Reviewed by Dmitry Titov.
1175
1176         Clone WebClipboard to be frame-specific.
1177         https://bugs.webkit.org/show_bug.cgi?id=53727
1178
1179         For drop operations, Chrome currently snapshots the data and copies it
1180         into the renderer process. As we add more supported drag data types, the
1181         copy will become increasingly expensive. Instead, we'd like to snapshot
1182         data in the browser to reduce the amount of data copied and to support
1183         Blob in DataTransferItem. In order to allow this, we associated
1184         WebClipboard with a frame so it can correctly route its IPCs to the
1185         corresponding Chromium host.
1186
1187         No new tests because no new functionality.
1188
1189         * platform/chromium/ChromiumDataObject.cpp:
1190         (WebCore::ChromiumDataObject::createReadable):
1191         * platform/chromium/ChromiumDataObject.h:
1192         * platform/chromium/ClipboardChromium.cpp:
1193         (WebCore::ClipboardChromium::create):
1194         * platform/chromium/PlatformBridge.h:
1195         * platform/chromium/ReadableDataObject.cpp:
1196         (WebCore::ReadableDataObject::create):
1197         (WebCore::ReadableDataObject::ReadableDataObject):
1198         (WebCore::ReadableDataObject::getData):
1199         (WebCore::ReadableDataObject::urlTitle):
1200         (WebCore::ReadableDataObject::htmlBaseUrl):
1201         (WebCore::ReadableDataObject::filenames):
1202         (WebCore::ReadableDataObject::ensureTypeCacheInitialized):
1203         * platform/chromium/ReadableDataObject.h:
1204
1205 2011-02-04  Jeremy Orlow  <jorlow@chromium.org>
1206
1207         Revert https://bugs.webkit.org/show_bug.cgi?id=53795
1208
1209         * storage/IDBAbortEvent.cpp:
1210         (WebCore::IDBAbortEvent::create):
1211         (WebCore::IDBAbortEvent::IDBAbortEvent):
1212         * storage/IDBAbortEvent.h:
1213         * storage/IDBCompleteEvent.cpp:
1214         (WebCore::IDBCompleteEvent::create):
1215         (WebCore::IDBCompleteEvent::IDBCompleteEvent):
1216         * storage/IDBCompleteEvent.h:
1217         * storage/IDBErrorEvent.cpp:
1218         (WebCore::IDBErrorEvent::IDBErrorEvent):
1219         * storage/IDBEvent.cpp:
1220         (WebCore::IDBEvent::IDBEvent):
1221         * storage/IDBEvent.h:
1222         * storage/IDBRequest.cpp:
1223         (WebCore::IDBRequest::dispatchEvent):
1224         * storage/IDBRequest.h:
1225         * storage/IDBSuccessEvent.cpp:
1226         (WebCore::IDBSuccessEvent::IDBSuccessEvent):
1227         * storage/IDBTransaction.cpp:
1228         (WebCore::IDBTransaction::onAbort):
1229         (WebCore::IDBTransaction::onComplete):
1230         * storage/IDBTransaction.h:
1231         * storage/IDBTransactionBackendImpl.cpp:
1232         (WebCore::IDBTransactionBackendImpl::taskTimerFired):
1233
1234 2011-02-04  Martin Galpin  <martin@66laps.com>
1235
1236         Reviewed by David Levin.
1237
1238         CORS origin header not set on GET when a preflight request is required.
1239         https://bugs.webkit.org/show_bug.cgi?id=50773
1240         
1241         Test: http/tests/xmlhttprequest/cross-origin-preflight-get.html
1242
1243         * loader/DocumentThreadableLoader.cpp:
1244         (WebCore::DocumentThreadableLoader::preflightSuccess): 
1245         Explicitly set the request origin after a preflight request succeeds.
1246
1247 2011-02-04  Jeremy Orlow  <jorlow@chromium.org>
1248
1249         Reviewed by Nate Chapin.
1250
1251         First step towards event propogation within IndexedDB
1252         https://bugs.webkit.org/show_bug.cgi?id=53795
1253
1254         This is the first step towards implementing
1255         http://www.w3.org/Bugs/Public/show_bug.cgi?id=11348
1256         within IndexedDB. I've created a method that knows how
1257         to capture and bubble (based on Node's dispatchGenericEvent).
1258         I've then changed IDBRequest to use it.
1259
1260         The only functional change is that preventDefault now must
1261         be called in error events to prevent the transaction from
1262         being aborted. The tests reflect this change and there's one
1263         specific test to look at this behavior.
1264
1265         Test: storage/indexeddb/error-causes-abort-by-default.html
1266
1267         * storage/IDBAbortEvent.cpp:
1268         (WebCore::IDBAbortEvent::create):
1269         (WebCore::IDBAbortEvent::IDBAbortEvent):
1270         * storage/IDBAbortEvent.h:
1271         * storage/IDBCompleteEvent.cpp:
1272         (WebCore::IDBCompleteEvent::create):
1273         (WebCore::IDBCompleteEvent::IDBCompleteEvent):
1274         * storage/IDBCompleteEvent.h:
1275         * storage/IDBErrorEvent.cpp:
1276         (WebCore::IDBErrorEvent::IDBErrorEvent):
1277         * storage/IDBEvent.cpp:
1278         (WebCore::IDBEvent::IDBEvent):
1279         (WebCore::IDBEvent::dispatch):
1280         * storage/IDBEvent.h:
1281         * storage/IDBRequest.cpp:
1282         (WebCore::IDBRequest::dispatchEvent):
1283         * storage/IDBRequest.h:
1284         * storage/IDBSuccessEvent.cpp:
1285         (WebCore::IDBSuccessEvent::IDBSuccessEvent):
1286         * storage/IDBTransaction.cpp:
1287         (WebCore::IDBTransaction::onAbort):
1288         (WebCore::IDBTransaction::onComplete):
1289         * storage/IDBTransaction.h:
1290         (WebCore::IDBTransaction::backend):
1291         * storage/IDBTransactionBackendImpl.cpp:
1292         (WebCore::IDBTransactionBackendImpl::taskTimerFired):
1293
1294 2011-02-04  Dimitri Glazkov  <dglazkov@chromium.org>
1295
1296         Reviewed by Csaba Osztrogonác.
1297
1298         [Qt]REGRESSION(r76951): media/controls-without-preload.html fails
1299         https://bugs.webkit.org/show_bug.cgi?id=53674
1300
1301         * css/mediaControlsQt.css:
1302
1303 2011-02-04  Dan Bernstein  <mitz@apple.com>
1304
1305         Reviewed by Darin Adler and Dave Hyatt.
1306
1307         <rdar://problem/8902704> Make ruby text size 50% by default
1308         https://bugs.webkit.org/show_bug.cgi?id=53723
1309
1310         * css/html.css:
1311         (ruby > rt): Changed the font-size from 60% to 50%.
1312
1313 2011-02-04  Antti Koivisto  <antti@apple.com>
1314
1315         Reviewed by Dimitri Glazkov.
1316
1317         https://bugs.webkit.org/show_bug.cgi?id=53610
1318         Regression: adjacent sibling selector not working as expected
1319         <rdar://problem/8960033>
1320         
1321         https://bugs.webkit.org/show_bug.cgi?id=53574
1322         REGRESSION (r76012): :last-child:after not working as expected
1323         <rdar://problem/8948643>
1324         
1325         Test for additional conditions in parent style that prevent sharing.
1326
1327         Tests: fast/selectors/style-sharing-adjacent-selector.html
1328                fast/selectors/style-sharing-last-child.html
1329
1330         * css/CSSStyleSelector.cpp:
1331         (WebCore::parentStylePreventsSharing):
1332         (WebCore::CSSStyleSelector::locateSharedStyle):
1333
1334 2011-02-04  Mark Mentovai  <mark@chromium.org>
1335
1336         Reviewed by Dimitri Glazkov.
1337
1338         Chromium GYP build fix.
1339
1340         When various settings were moved to webcore_prerequisites in r66364,
1341         things that should have been direct_dependent_settings were not marked
1342         as such. GYP 'defines', for example, make no sense on a 'none'-type
1343         target such as webcore_prerequisites. It appears that it was intended
1344         for these settings to be pushed to direct dependents, which would make
1345         direct_dependent_settings correct.
1346
1347         Losing the ChromiumWebCoreObjC defines on the Mac, for example, caused
1348         http://crbug.com/71537, which at best causes Mac console log spew, and
1349         at worst may result in Chromium's copy of WebCore using system
1350         definitions of certain Objective-C classes at runtime, or vice-versa.
1351
1352         The build now includes a postbuild step to prevent
1353         http://crbug.com/71537 from regressing again. The build will fail upon
1354         regression.
1355
1356         https://bugs.webkit.org/show_bug.cgi?id=53630
1357
1358         * WebCore.gyp/WebCore.gyp: Move things in webcore_prerequisites into
1359           direct_dependent_settings as needed, add the check_objc_rename
1360           postbuild step.
1361         * WebCore.gyp/mac/check_objc_rename.sh: Added.
1362
1363 2011-02-04  Robert Hogan  <robert@webkit.org>
1364
1365         Reviewed by Darin Fisher.
1366
1367         Move chromium iframe shim code to cross-platform file
1368         https://bugs.webkit.org/show_bug.cgi?id=52594
1369
1370         Move Chromium code for identifying and cutting out
1371         iframe shims from plugins to cross-platform utility file
1372         IFrameShimSupport.cpp.
1373         Amend PluginViewQt to use this code to handle shims correctly.
1374
1375         * WebCore.gypi: Add Chromium support for IFrameShimSupport.cpp
1376         * WebCore.pro: Add Qt support for IFrameShimSupport.cpp
1377         * plugins/IFrameShimSupport.cpp: Added.
1378         (WebCore::getObjectStack):
1379         (WebCore::iframeIsAbovePlugin):
1380         (WebCore::getPluginOcclusions):
1381         * plugins/IFframeShimSupport.h: Added.
1382         * plugins/qt/PluginViewQt.cpp:
1383         (WebCore::PluginView::setNPWindowIfNeeded):
1384
1385 2011-02-04  Xiaomei Ji  <xji@chromium.org>
1386
1387         Reviewed by David Levin.
1388
1389         Implement "<option> should implement the dir attribute" for chromium port after r76983.
1390         https://bugs.webkit.org/show_bug.cgi?id=50969
1391
1392         Use manual test Source/WebCore/manual-tests/pop-up-alignment-and-direction.html
1393         added in r76983.
1394
1395         * platform/chromium/PopupMenuChromium.cpp: Remove directionality hint from
1396         <select> drop-down setting.
1397         (WebCore::PopupListBox::paintRow): Use <option>'s directionality to paint
1398         items in drop-down and pass-in bidi override flag when creating text run.
1399         * platform/chromium/PopupMenuChromium.h: Remove directionalityHint from
1400         PopupContainerSettings.
1401
1402 2011-02-04  Jeremy Orlow  <jorlow@chromium.org>
1403
1404         Build fix from merge mistake.
1405
1406         * storage/IDBTransaction.cpp:
1407         (WebCore::IDBTransaction::ensureEventTargetData):
1408
1409 2011-02-04  Levi Weintraub  <leviw@chromium.org>
1410
1411         Reviewed by Darin Adler.
1412
1413         Remove unneeded function declarations in comments in EditorClient.h
1414         https://bugs.webkit.org/show_bug.cgi?id=53745
1415
1416         Removing unused commented out function declarations. No tests since this is just cleanup.
1417
1418         * page/EditorClient.h:
1419
1420 2011-02-03  Jeremy Orlow  <jorlow@chromium.org>
1421
1422         Reviewed by Nate Chapin.
1423
1424         Refactor IDBRequest and IDBTransaction a bit
1425         https://bugs.webkit.org/show_bug.cgi?id=53565
1426
1427         There were a lot of subtle issues with the way IDBTransaction
1428         and IDBRequest used to be written. This cleans a lot of them up
1429         and largely simplifies the logic. Using EventQueue rather than
1430         timers is one example of the simplification.
1431
1432         * bindings/scripts/CodeGeneratorV8.pm:
1433         * dom/EventQueue.cpp:
1434         (WebCore::EventQueue::enqueueEvent):
1435         (WebCore::EventQueue::dispatchEvent):
1436         * storage/IDBCursor.cpp:
1437         (WebCore::IDBCursor::continueFunction):
1438         * storage/IDBRequest.cpp:
1439         (WebCore::IDBRequest::create):
1440         (WebCore::IDBRequest::IDBRequest):
1441         (WebCore::IDBRequest::resetReadyState):
1442         (WebCore::IDBRequest::onError):
1443         (WebCore::IDBRequest::onSuccess):
1444         (WebCore::IDBRequest::dispatchEvent):
1445         (WebCore::IDBRequest::enqueueEvent):
1446         (WebCore::IDBRequest::eventTargetData):
1447         (WebCore::IDBRequest::ensureEventTargetData):
1448         * storage/IDBRequest.h:
1449         (WebCore::IDBRequest::dispatchEvent):
1450         * storage/IDBTransaction.cpp:
1451         (WebCore::IDBTransaction::create):
1452         (WebCore::IDBTransaction::IDBTransaction):
1453         (WebCore::IDBTransaction::objectStore):
1454         (WebCore::IDBTransaction::abort):
1455         (WebCore::IDBTransaction::onAbort):
1456         (WebCore::IDBTransaction::onComplete):
1457         (WebCore::IDBTransaction::onTimeout):
1458         (WebCore::IDBTransaction::canSuspend):
1459         (WebCore::IDBTransaction::stop):
1460         (WebCore::IDBTransaction::enqueueEvent):
1461         (WebCore::IDBTransaction::eventTargetData):
1462         (WebCore::IDBTransaction::ensureEventTargetData):
1463         * storage/IDBTransaction.h:
1464
1465 2011-02-01  Jeremy Orlow  <jorlow@chromium.org>
1466
1467         Reviewed by Nate Chapin.
1468
1469         Remove the timeout event from IndexedDB
1470         https://bugs.webkit.org/show_bug.cgi?id=53521
1471
1472         Remove timeout and ontimeout from IDBTransaction per the spec.
1473
1474         * WebCore.gypi:
1475         * storage/IDBDatabase.cpp:
1476         (WebCore::IDBDatabase::transaction):
1477         * storage/IDBDatabase.h:
1478         (WebCore::IDBDatabase::transaction):
1479         * storage/IDBDatabase.idl:
1480         * storage/IDBDatabaseBackendImpl.cpp:
1481         (WebCore::IDBDatabaseBackendImpl::setVersion):
1482         (WebCore::IDBDatabaseBackendImpl::transaction):
1483         * storage/IDBDatabaseBackendImpl.h:
1484         * storage/IDBDatabaseBackendInterface.h:
1485         * storage/IDBTimeoutEvent.cpp: Removed.
1486         * storage/IDBTimeoutEvent.h: Removed.
1487         * storage/IDBTransaction.cpp:
1488         (WebCore::IDBTransaction::IDBTransaction):
1489         (WebCore::IDBTransaction::onAbort):
1490         (WebCore::IDBTransaction::onComplete):
1491         * storage/IDBTransaction.h:
1492         * storage/IDBTransaction.idl:
1493         * storage/IDBTransactionBackendImpl.cpp:
1494         (WebCore::IDBTransactionBackendImpl::create):
1495         (WebCore::IDBTransactionBackendImpl::IDBTransactionBackendImpl):
1496         * storage/IDBTransactionBackendImpl.h:
1497         * storage/IDBTransactionCallbacks.h:
1498
1499 2011-02-04  Chris Fleizach  <cfleizach@apple.com>
1500
1501         Reviewed by Darin Adler.
1502
1503         AX: Can't set accessibility overridden attributes on web objects
1504         https://bugs.webkit.org/show_bug.cgi?id=53725
1505
1506         accessibilitySetOverriddenValue does not work on AX objects from WebCore because 
1507         the right method needed to be overridden (accessibilitySupportsOverriddenAttributes).
1508         Unfortunately, there's no way to test this from DRT, since AppKit returns the overridden
1509         attribute only when an AX client asks for it through the AX frameworks.
1510
1511         * accessibility/mac/AccessibilityObjectWrapper.mm:
1512         (-[AccessibilityObjectWrapper accessibilitySupportsOverriddenAttributes]):
1513
1514 2011-02-03  Dimitri Glazkov  <dglazkov@chromium.org>
1515
1516         Reviewed by Kent Tamura.
1517
1518         REGRESSION(r76147): Slider thumb is not repainted when let go outside of the slider track.
1519         https://bugs.webkit.org/show_bug.cgi?id=53691
1520
1521         Test: fast/repaint/slider-thumb-drag-release.html
1522
1523         * html/shadow/SliderThumbElement.cpp:
1524         (WebCore::SliderThumbElement::stopDragging): Added dirtying the layout bit to ensure
1525             that the thumb is repainted.
1526
1527 2011-02-04  Mikhail Naganov  <mnaganov@chromium.org>
1528
1529         Reviewed by Pavel Feldman.
1530
1531         Web Inspector: Add "show more" data grid node and waiting message UI components.
1532         https://bugs.webkit.org/show_bug.cgi?id=53763
1533
1534         - "show more" data grid node is used for on-demand population of
1535         data grid contents (similar to DOM tree capability for limiting
1536         displayed nodes count);
1537
1538         - waiting message is used for informing user about long lasting
1539         operations (with a possibility to cancel them).
1540
1541         * English.lproj/localizedStrings.js:
1542         * WebCore.gypi:
1543         * WebCore.vcproj/WebCore.vcproj:
1544         * inspector/front-end/PleaseWaitMessage.js: Added.
1545         (WebInspector.PleaseWaitMessage):
1546         * inspector/front-end/ShowMoreDataGridNode.js: Added.
1547         (WebInspector.ShowMoreDataGridNode):
1548         * inspector/front-end/WebKit.qrc:
1549         * inspector/front-end/inspector.css:
1550         (.data-grid button):
1551         (.please-wait-msg):
1552         * inspector/front-end/inspector.html:
1553
1554 2011-02-04  Adele Peterson  <adele@apple.com>
1555
1556         Reviewed by Dan Bernstein.
1557
1558         Fix for https://bugs.webkit.org/show_bug.cgi?id=53740
1559         <rdar://problem/8503629> Allow platforms to specify if the placeholder should be visible when text controls are focused
1560
1561         Tests:
1562         fast/forms/textarea-placeholder-visibility-1.html
1563         fast/forms/textarea-placeholder-visibility-2.html
1564         fast/forms/input-placeholder-visibility-1.html
1565         fast/forms/input-placeholder-visibility-2.html
1566         fast/forms/input-placeholder-visibility-3.html
1567
1568         * html/HTMLFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::placeholderShouldBeVisible):
1569         Add a check for shouldShowPlaceholderWhenFocused.
1570         * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::updateValue):
1571         Whenever the value is updated, we should also update placeholder visibility.
1572         * rendering/RenderTheme.h: (WebCore::RenderTheme::shouldShowPlaceholderWhenFocused):
1573         Make the default the same as the existing behavior.
1574         * rendering/RenderThemeMac.h:
1575         * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::shouldShowPlaceholderWhenFocused):
1576         Show placeholder when appropriate. 
1577
1578 2011-02-04  Pavel Podivilov  <podivilov@chromium.org>
1579
1580         Reviewed by Pavel Feldman.
1581
1582         Web Inspector: evaluate on hover does not work on a breakpoint.
1583         https://bugs.webkit.org/show_bug.cgi?id=53768
1584
1585         * inspector/front-end/SourceFrame.js:
1586         (WebInspector.SourceFrame.prototype._mouseHover):
1587
1588 2011-02-04  Sheriff Bot  <webkit.review.bot@gmail.com>
1589
1590         Unreviewed, rolling out r77625 and r77626.
1591         http://trac.webkit.org/changeset/77625
1592         http://trac.webkit.org/changeset/77626
1593         https://bugs.webkit.org/show_bug.cgi?id=53765
1594
1595         It broke Windows builds (Requested by Ossy_ on #webkit).
1596
1597         * Android.jscbindings.mk:
1598         * CMakeLists.txt:
1599         * ForwardingHeaders/pcre/pcre.h: Added.
1600         * ForwardingHeaders/yarr/Yarr.h: Removed.
1601         * ForwardingHeaders/yarr/YarrInterpreter.h: Removed.
1602         * ForwardingHeaders/yarr/YarrPattern.h: Removed.
1603         * WebCore.gyp/WebCore.gyp:
1604         * WebCore.pro:
1605         * WebCore.vcproj/WebCore.vcproj:
1606         * WebCore.vcproj/copyForwardingHeaders.cmd:
1607         * platform/text/RegularExpression.cpp:
1608         (WebCore::RegularExpression::Private::regexp):
1609         (WebCore::RegularExpression::Private::compile):
1610         (WebCore::RegularExpression::Private::Private):
1611         (WebCore::RegularExpression::Private::create):
1612         (WebCore::RegularExpression::Private::~Private):
1613         (WebCore::RegularExpression::match):
1614
1615 2011-02-04  Peter Varga  <pvarga@webkit.org>
1616
1617         Rubber-stamped by Csaba Osztrogonác.
1618
1619         Replace PCRE with Yarr in WebCore
1620         https://bugs.webkit.org/show_bug.cgi?id=53496
1621
1622         Speculative windows build fix.
1623
1624         No new tests needed.
1625
1626         * platform/text/RegularExpression.cpp:
1627
1628 2011-02-04  Peter Varga  <pvarga@webkit.org>
1629
1630
1631         Reviewed by Gavin Barraclough.
1632
1633         Replace PCRE with Yarr in WebCore
1634         https://bugs.webkit.org/show_bug.cgi?id=53496
1635
1636         No new tests needed.
1637
1638         * Android.jscbindings.mk:
1639         * CMakeLists.txt:
1640         * ForwardingHeaders/pcre/pcre.h: Removed.
1641         * ForwardingHeaders/yarr/Yarr.h: Added.
1642         * ForwardingHeaders/yarr/YarrInterpreter.h: Added.
1643         * ForwardingHeaders/yarr/YarrPattern.h: Added.
1644         * WebCore.gyp/WebCore.gyp:
1645         * WebCore.pro:
1646         * WebCore.vcproj/WebCore.vcproj:
1647         * WebCore.vcproj/copyForwardingHeaders.cmd:
1648         * platform/text/RegularExpression.cpp:
1649         (WebCore::RegularExpression::Private::create):
1650         (WebCore::RegularExpression::Private::Private):
1651         (WebCore::RegularExpression::Private::compile):
1652         (WebCore::RegularExpression::match):
1653
1654 2011-02-04  Pavel Feldman  <pfeldman@chromium.org>
1655
1656         Reviewed by Yury Semikhatsky.
1657
1658         Web Inspector: Network panel filtering is broken.
1659         https://bugs.webkit.org/show_bug.cgi?id=53764
1660
1661         * inspector/front-end/NetworkPanel.js:
1662         (WebInspector.NetworkPanel.prototype._sortItems):
1663         (WebInspector.NetworkPanel.prototype._sortByTimeline):
1664         (WebInspector.NetworkPanel.prototype._filter):
1665         (WebInspector.NetworkPanel.prototype._updateOffscreenRows):
1666         (WebInspector.NetworkDataGridNode.prototype.isFilteredOut):
1667         (WebInspector.NetworkDataGridNode.prototype.get selectable):
1668         (WebInspector.NetworkTotalGridNode.prototype.isFilteredOut):
1669         (WebInspector.NetworkTotalGridNode.prototype.get selectable):
1670
1671 2011-02-04  Andrey Kosyakov  <caseq@chromium.org>
1672
1673         Reviewed by Pavel Feldman.
1674
1675         Web Inspector: support overriding user agent strings
1676         https://bugs.webkit.org/show_bug.cgi?id=51485
1677
1678         Test: http/tests/inspector/extensions-useragent.html
1679
1680         * inspector/Inspector.idl:
1681         * inspector/InspectorController.cpp:
1682         (WebCore::InspectorController::disconnectFrontend):
1683         (WebCore::InspectorController::setUserAgentOverride):
1684         (WebCore::InspectorController::userAgentOverride):
1685         * inspector/InspectorController.h:
1686         * inspector/front-end/ExtensionAPI.js:
1687         (WebInspector.injectedExtensionAPI.InspectedWindow.prototype.reload):
1688         * inspector/front-end/ExtensionServer.js:
1689         (WebInspector.ExtensionServer.prototype._onReload):
1690         * loader/FrameLoader.cpp:
1691         (WebCore::FrameLoader::userAgent):
1692         (WebCore::FrameLoader::applyUserAgent):
1693
1694 2011-02-04  Pavel Podivilov  <podivilov@chromium.org>
1695
1696         Reviewed by Pavel Feldman.
1697
1698         Web Inspector: scripts panel displays wrong file name after reload.
1699         https://bugs.webkit.org/show_bug.cgi?id=53761
1700
1701         * inspector/front-end/ScriptsPanel.js:
1702         (WebInspector.ScriptsPanel.prototype._resourceLoadingFinished):
1703
1704 2011-02-03  Yury Semikhatsky  <yurys@chromium.org>
1705
1706         Reviewed by Pavel Feldman.
1707
1708         Web Inspector: remove settings related methods from InspectorClient
1709         https://bugs.webkit.org/show_bug.cgi?id=53686
1710
1711         * WebCore.exp.in:
1712         * inspector/CodeGeneratorInspector.pm:
1713         * inspector/InspectorClient.h:
1714         * inspector/InspectorFrontendClientLocal.cpp:
1715         (WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal):
1716         (WebCore::InspectorFrontendClientLocal::changeAttachedWindowHeight):
1717         (WebCore::InspectorFrontendClientLocal::restoreAttachedWindowHeight):
1718         * inspector/InspectorFrontendClientLocal.h: ports that provide in-process implementation of the inspector front-end can
1719         provide platform-specific settings accessor.
1720         (WebCore::InspectorFrontendClientLocal::Settings::Settings):
1721         (WebCore::InspectorFrontendClientLocal::Settings::~Settings):
1722         (WebCore::InspectorFrontendClientLocal::Settings::inspectorAttachedHeight):
1723         (WebCore::InspectorFrontendClientLocal::Settings::storeInspectorAttachedHeight):
1724         * loader/EmptyClients.h:
1725
1726 2011-02-03  Anton Muhin  <antonm@chromium.org>
1727
1728         Reviewed by Adam Barth.
1729
1730         [v8] frame several more JS code invocations into v8::TryCatch
1731         https://bugs.webkit.org/show_bug.cgi?id=53594
1732
1733         This patch is preemptive and adjusts v8 bindings code to forthcoming small change
1734         in v8::ThrowException---currently sometimes exceptions thrown by this method
1735         do not reach surrounding v8::TryCatch handler (see
1736         http://code.google.com/p/v8/issues/detail?id=1072 and
1737         http://codereview.chromium.org/6397011/).  Therefore the goal of this patch
1738         is to make forthcoming v8 roll as smooth as possible (alas, we'll still need
1739         one rebaseline as of now.)
1740
1741         * bindings/v8/V8Proxy.cpp:
1742         (WebCore::V8Proxy::runScript): Do not rely on empty handle as a signal of exception, wrap into v8::TryCatch instead
1743         * bindings/v8/V8WindowErrorHandler.cpp:
1744         (WebCore::V8WindowErrorHandler::callListenerFunction): Ditto
1745
1746 2011-02-03  Maciej Stachowiak  <mjs@apple.com>
1747
1748         Reviewed by Dan Bernstein.
1749
1750         WebKit2: Need WebKit2 equivalent of WebResourceLoadDelegate::willSendRequest in the Bundle
1751         https://bugs.webkit.org/show_bug.cgi?id=52897
1752         <rdar://problem/8898294>
1753
1754         * WebCore.exp.in: Add export now needed by WebKit2
1755
1756 2011-02-03  Victoria Kirst  <vrk@google.com>
1757
1758         Reviewed by James Robinson.
1759
1760         Replaces float literals with uniform values in shader code
1761         so that buggy drivers unable to parse float values in different
1762         locales will not produce a pink video.
1763
1764         [chromium] Fix pink video bug with gpu-acceleration enabled
1765         https://bugs.webkit.org/show_bug.cgi?id=53568
1766
1767         * platform/graphics/chromium/VideoLayerChromium.cpp:
1768         (WebCore::VideoLayerChromium::SharedValues::SharedValues):
1769         (WebCore::VideoLayerChromium::drawYUV):
1770         * platform/graphics/chromium/VideoLayerChromium.h:
1771         (WebCore::VideoLayerChromium::SharedValues::signAdjLocation):
1772
1773 2011-02-03  James Kozianski  <koz@chromium.org>
1774
1775         Reviewed by Dimitri Glazkov.
1776
1777         Add navigator.registerProtocolHandler behind a flag.
1778         https://bugs.webkit.org/show_bug.cgi?id=52609
1779
1780         This method is described in the HTML5 specification here,
1781         http://dev.w3.org/html5/spec/Overview.html#dom-navigator-registerprotocolhandler
1782
1783         This change is largely cribbed from B. Green's 29651 patches. It is
1784         behind a flag so as not to break JS feature detection.
1785
1786         New layout test fast/dom/registerProtocolHandler.html.
1787
1788         * Configurations/FeatureDefines.xcconfig:
1789         * loader/EmptyClients.h:
1790         (WebCore::EmptyChromeClient::registerProtocolHandler):
1791         * page/Chrome.cpp:
1792         (WebCore::Chrome::registerProtocolHandler):
1793         * page/Chrome.h:
1794         * page/ChromeClient.h:
1795         * page/Navigator.cpp:
1796         (WebCore::verifyCustomHandlerURL):
1797         (WebCore::verifyProtocolHandlerScheme):
1798         (WebCore::Navigator::registerProtocolHandler):
1799         * page/Navigator.h:
1800         * page/Navigator.idl:
1801
1802 2011-02-03  Brian Ryner  <bryner@chromium.org>
1803
1804         Reviewed by Darin Fisher.
1805
1806         Add a field to the ResourceResponse for tracking the socket address
1807         of the host that the resource was fetched from.  Patch was originally
1808         by Paul Marks.
1809         https://bugs.webkit.org/show_bug.cgi?id=53699
1810
1811         * platform/network/chromium/ResourceResponse.cpp:
1812         (WebCore::ResourceResponse::doPlatformCopyData):
1813         (WebCore::ResourceResponse::doPlatformAdopt):
1814         * platform/network/chromium/ResourceResponse.h:
1815         (WebCore::ResourceResponse::socketAddress):
1816         (WebCore::ResourceResponse::setSocketAddress):
1817
1818 2011-02-03  Adam Langley  <agl@chromium.org>
1819
1820         Reviewed by Adam Barth.
1821
1822         Plumb mixed script URL to FrameLoaderClient
1823         https://bugs.webkit.org/show_bug.cgi?id=52384
1824
1825         Regressions covered by http/tests/security/mixedContent/*
1826
1827         * loader/EmptyClients.h:
1828         (WebCore::EmptyFrameLoaderClient::didRunInsecureContent):
1829         * loader/FrameLoader.cpp:
1830         (WebCore::FrameLoader::checkIfRunInsecureContent):
1831         * loader/FrameLoaderClient.h:
1832
1833 2011-02-03  Simon Fraser  <simon.fraser@apple.com>
1834
1835         Reviewed by Dan Bernstein.
1836
1837         REGRESSION: Artifacts on box-shadow corners in some cases
1838         https://bugs.webkit.org/show_bug.cgi?id=53731
1839
1840         Fix overdrawing artifacts in ShadowBlur's tiling code path,
1841         which show up in shadows using a color with alpha.
1842         
1843         Test: fast/box-shadow/shadow-tiling-artifact.html
1844
1845         * platform/graphics/ShadowBlur.cpp:
1846         (WebCore::ShadowBlur::drawRectShadowWithTiling): Ensure
1847         that the inner rect that gets filled does not overlap with any
1848         of the eight tiled areas by having the corner and side dimensions
1849         be the same for contiguous areas.
1850
1851 2011-02-03  Adam Barth  <abarth@webkit.org>
1852
1853         Reviewed by Alexey Proskuryakov.
1854
1855         XSS Auditor is spinning inside decodeURLEscapeSequences() if there are
1856         percent signs in large posted data
1857         https://bugs.webkit.org/show_bug.cgi?id=53405
1858
1859         If the input string contains many non-% characters followed by a %
1860         character that is not a valid URL escape sequence, then the old
1861         algorithm would only advance the initial search by one character
1862         (instead of jumping to just after the % character).  That would cause
1863         the algorithm to take N^2 time (in the number of characters before the
1864         first % character).  This patch just advances the search past the first
1865         % character so we can start looking for next % character sooner.
1866
1867         * platform/KURL.cpp:
1868         (WebCore::decodeURLEscapeSequences):
1869
1870 2011-02-03  Pavel Podivilov  <podivilov@chromium.org>
1871
1872         Reviewed by Pavel Feldman.
1873
1874         Web Inspector: click on a breakpoint highlights wrong line in source frame.
1875         https://bugs.webkit.org/show_bug.cgi?id=53692
1876
1877         * inspector/front-end/BreakpointsSidebarPane.js:
1878         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._setupBreakpointElement):
1879
1880 2011-02-03  Anton Muhin  <antonm@chromium.org>
1881
1882         Reviewed by Adam Barth.
1883
1884         [v8] Bail out if to string conversion returned empty handle
1885         https://bugs.webkit.org/show_bug.cgi?id=53687
1886
1887         This a temporary measure: actually one probably should never get empty handle
1888         if there was no exception.  The root cause is under investigation.
1889         The bailout though allows Chromium not to crash---attempt to convert an empty
1890         v8 hande into WebCore string crashes with invalid memory access.
1891
1892         See http://code.google.com/p/chromium/issues/detail?id=71544
1893
1894         There is no known reduction expressible as a layout test so far.  The crash found with automated testing tools.
1895
1896         * bindings/v8/V8Binding.cpp:
1897         (WebCore::v8NonStringValueToWebCoreString): Bail out on empty handle
1898         * bindings/v8/V8Binding.h:
1899         (WebCore::V8ParameterBase::prepareBase): Ditto
1900
1901 2011-02-03  Adam Barth  <abarth@webkit.org>
1902
1903         Attempt to fix Chromium build.
1904
1905         * html/parser/XSSFilter.cpp:
1906
1907 2011-02-03  Dirk Pranke  <dpranke@chromium.org>
1908
1909         Unreviewed, rolling out r77562.
1910         http://trac.webkit.org/changeset/77562
1911         https://bugs.webkit.org/show_bug.cgi?id=53630
1912
1913         broke chromium mac build
1914
1915         * WebCore.gyp/WebCore.gyp:
1916         * WebCore.gyp/mac/check_objc_rename.sh: Removed.
1917
1918 2011-02-03  Adam Barth  <abarth@webkit.org>
1919
1920         Reviewed by Daniel Bates.
1921
1922         XSS Auditor severely affects loading performance after submitting a large form
1923         https://bugs.webkit.org/show_bug.cgi?id=49845
1924
1925         Switch over from the XSSAuditor to the XSSFilter, improving performance
1926         on this example.
1927
1928         * html/parser/XSSFilter.cpp:
1929         (WebCore::XSSFilter::filterToken):
1930         * page/XSSAuditor.cpp:
1931         (WebCore::XSSAuditor::isEnabled):
1932
1933 2011-02-03  Dirk Pranke  <dpranke@chromium.org>
1934
1935         Unreviewed, rolling out r77567.
1936         http://trac.webkit.org/changeset/77567
1937         https://bugs.webkit.org/show_bug.cgi?id=53468
1938
1939         broke chromium linux svg, canvas tests, possibly win also?
1940
1941         * platform/graphics/skia/ImageBufferSkia.cpp:
1942         (WebCore::getImageData):
1943         (WebCore::ImageBuffer::getUnmultipliedImageData):
1944         (WebCore::ImageBuffer::getPremultipliedImageData):
1945         (WebCore::putImageData):
1946         (WebCore::ImageBuffer::putUnmultipliedImageData):
1947         (WebCore::ImageBuffer::putPremultipliedImageData):
1948
1949 2011-02-02  MORITA Hajime  <morrita@google.com>
1950
1951         Reviewed by Dimitri Glazkov.
1952
1953         Refactoring: <progress> should not use ShadowElement
1954         https://bugs.webkit.org/show_bug.cgi?id=53583
1955
1956         - Introduced RenderIndicatorPart and RenderProgressBarValuePart
1957           to be responsible for bar-part layout,
1958           which adopted layout logic from ShadowBlockElement.
1959         - ProgressBarValueElement is no longer a subclass of ShadowBlockElement.
1960         - Remove dependency from RenderProgress to HTMLProgressElement and
1961           ShadowBlockElement.
1962         - The shadow tree is no longer removed on detach(). It becomes persistent.
1963           This is now possible because the ShadowBlockElement dependency is gone.
1964         - ::-webkit-appearance for -webkit-progress-bar-value is no longer referred.
1965           That didn't make sense.
1966
1967         * html/HTMLProgressElement.cpp:
1968         (WebCore::HTMLProgressElement::createShadowSubtreeIfNeeded):
1969         * html/HTMLProgressElement.h:
1970         * html/shadow/ProgressBarValueElement.h: Added.
1971         (WebCore::ProgressBarValueElement::ProgressBarValueElement):
1972         (WebCore::ProgressBarValueElement::shadowPseudoId):
1973         (WebCore::ProgressBarValueElement::createRenderer):
1974         (WebCore::ProgressBarValueElement::create):
1975         * rendering/RenderIndicator.cpp:
1976         (WebCore::RenderIndicatorPart::RenderIndicatorPart):
1977         (WebCore::RenderIndicatorPart::~RenderIndicatorPart):
1978         (WebCore::RenderIndicatorPart::layout):
1979         (WebCore::RenderIndicatorPart::styleDidChange):
1980         * rendering/RenderIndicator.h: Added RenderIndicatorPart class
1981         (WebCore::RenderIndicatorPart::originalVisibility):
1982         (WebCore::RenderIndicatorPart::requiresForcedStyleRecalcPropagation):
1983         (WebCore::RenderIndicatorPart::canHaveChildren):
1984         * rendering/RenderProgress.cpp:
1985         (WebCore::RenderProgressBarValuePart::preferredFrameRect):
1986         (WebCore::RenderProgressBarValuePart::shouldBeHidden):
1987         (WebCore::RenderProgress::updateFromElement):
1988         (WebCore::RenderProgress::layoutParts):
1989         (WebCore::RenderProgress::shouldHaveParts):
1990         * rendering/RenderProgress.h:
1991         (WebCore::RenderProgressBarValuePart::RenderProgressBarValuePart):
1992
1993 2011-02-03  Jia Pu  <jpu@apple.com>
1994
1995         Reversion should not be marked as misspelled.
1996         https://bugs.webkit.org/show_bug.cgi?id=53255
1997
1998         This patch includes fix for reported bug, and also some housekeeping changes.
1999
2000         To implement desired behavior, we need:
2001         1. Add a new marker type, SpellCheckingExemption, since now we distingusish between text
2002            that shouldn't be spellchecked and text shouldn't be autocorrected.
2003         2. Make sure that there is no pending correction panel when we enter markAllMisspellingsAndBadGrammarInRanges().
2004            Otherwise the spell checking code in that function may interfere with autocorrection. This
2005            is achieved by explicitly applying pending correction when user types space, line break or
2006            paragraph break.
2007
2008         Housekeeping code changes include:
2009         1. Change manual-tests that were broken by relocated WebCore directory.
2010         2. Use TextIterator in various DocumentMarkerController functions instead of using
2011            Node::traverseNextNode() directly.
2012         3. Allow passing multiple marker types into DocumentMarkerController::removeMarkers() and
2013            DocumentMarkerController::hasMarkers() to improve clarity and efficiency.
2014         4. Fixes of minor bugs that were exposed previously.
2015
2016         * WebCore.exp.in: Change signature of DocumentMarkerController::removeMarkers().
2017
2018         * dom/DocumentMarker.h: Added new marker type SpellCheckingExemption.
2019
2020         * dom/DocumentMarkerController.cpp:
2021         (WebCore::DocumentMarkerController::removeMarkers): Use TextIterator to scan the range to be
2022            consistent with addMarker() function. Allow passing in multiple marker types in one call.
2023            Added a boolean argument to specify the behavior when removing markers that partially
2024            overlap the specified range.
2025         (WebCore::DocumentMarkerController::removeMarkersFromMarkerMapVectorPair): Allow passing in
2026            multiple marker types in one call.
2027         (WebCore::DocumentMarkerController::hasMarkers): Use TextIterator to scan the range to be
2028            consistent with addMarker() function. Allow passing in multiple marker types in one call.
2029
2030         * dom/DocumentMarkerController.h: Allow passing in multiple marker types to removeMarkers()
2031            and hasMarkers(). Added a boolean argument to removeMarkers() to specify the behavior when
2032            removing markers that partially overlap the specified range.
2033
2034         * editing/Editor.cpp:
2035         (WebCore::markerTypesForAutocorrection): Add SpellCheckingExemption marker when apply correction.
2036         (WebCore::markerTypesForReplacement): Ditto.
2037         (WebCore::Editor::respondToChangedSelection): Reordered call to dismissCorrectionPanel() and
2038            setSelection() to make sure there is no pending correction when entering
2039            markAllMisspellingsAndBadGrammarInRanges().
2040         (WebCore::Editor::appliedEditing): Only remove CorrectionIndicator markers when the command
2041            is a top level command to improve efficiency.
2042         (WebCore::Editor::insertTextWithoutSendingTextEvent): Added code to applying pending correction.
2043         (WebCore::Editor::insertLineBreak): Ditto.
2044         (WebCore::Editor::insertParagraphSeparator): Ditto.
2045         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): Don't mark mispelling if the
2046            text carries SpellCheckingExemption marker.
2047         (WebCore::Editor::correctionPanelTimerFired): Reset correction panel if the returned suggestion
2048            from spellchecker is an empty string.
2049         (WebCore::Editor::removeSpellAndCorrectionMarkersFromWordsToBeEdited):
2050            Use new DocumentMarkerController::removeMarkers() to replace custom implemenation to improve
2051            efficiency and readability.
2052         (WebCore::Editor::applyCorrectionPanelInfo): Remove the code that set caret position after
2053            applying correction, since it's unnecessary. Also, store pre-correction string together with
2054            the marker for reversion panel to use.
2055         (WebCore::Editor::applyAutocorrectionBeforeTypingIfAppropriate): Apply pending correction.
2056         (WebCore::Editor::changeSelectionAfterCommand): Moved marker removal code to Editor::appliedEditing()
2057            where we have access to EditCommand object.
2058
2059         * editing/Editor.h: Added new function applyAutocorrectionAfterTypingIfAppropriate().
2060
2061         * manual-tests/autocorrection/autocorrection-cancelled-by-ESC.html: Change manual-tests that
2062            were broken by relocated WebCore directory.
2063
2064         * manual-tests/autocorrection/autocorrection-cancelled-by-typing-1.html: Ditto.
2065
2066         * manual-tests/autocorrection/autocorrection-contraction.html: Ditto.
2067
2068         * manual-tests/autocorrection/continue-typing-to-dismiss-reversion.html: Ditto.
2069
2070         * manual-tests/autocorrection/delete-to-dismiss-reversion.html: Ditto.
2071
2072         * manual-tests/autocorrection/delete-to-end-of-word-to-show-reversion.html: Ditto.
2073
2074         * manual-tests/autocorrection/dismiss-multiple-guesses.html: Ditto.
2075
2076         * manual-tests/autocorrection/move-to-end-of-word-to-show-reversion.html: Ditto.
2077
2078         * manual-tests/autocorrection/select-from-multiple-guesses.html: Ditto.
2079
2080         * manual-tests/autocorrection/spell-checking-after-reversion.html: Added.
2081
2082         * manual-tests/autocorrection/type-whitespace-to-dismiss-reversion.html: Change manual-tests that
2083            were broken by relocated WebCore directory.
2084
2085         * rendering/InlineTextBox.cpp:
2086         (WebCore::InlineTextBox::paintDocumentMarkers): Code clean-up to be more concise.
2087
2088 2011-02-03  Abhishek Arya  <inferno@chromium.org>
2089
2090         Unreviewed, qt build fix.
2091
2092         * rendering/RenderBlock.cpp:
2093         (WebCore::RenderBlock::removeFloatingObject):
2094
2095 2011-02-03  Brian Salomon  <bsalomon@google.com>
2096
2097         Reviewed by James Robinson.
2098
2099         Handle non-raster backed images in getUnmultipliedImageData()
2100         https://bugs.webkit.org/show_bug.cgi?id=53468
2101
2102         No new tests. Existing canvas tests sufficient
2103         LayoutTests/canvas/philip/...
2104
2105         * platform/graphics/skia/ImageBufferSkia.cpp:
2106         (WebCore::getImageData):
2107         (WebCore::ImageBuffer::getUnmultipliedImageData):
2108         (WebCore::ImageBuffer::getPremultipliedImageData):
2109         (WebCore::putImageData):
2110         (WebCore::ImageBuffer::putUnmultipliedImageData):
2111         (WebCore::ImageBuffer::putPremultipliedImageData):
2112
2113 2011-02-03  Abhishek Arya  <inferno@chromium.org>
2114
2115         Reviewed by James Robinson.
2116
2117         Enforce more limits on root inline boxes height calculations.
2118         https://bugs.webkit.org/show_bug.cgi?id=53729
2119
2120         Test: fast/overflow/overflow-height-float-not-removed-crash.html
2121
2122         * rendering/RenderBlock.cpp:
2123         (WebCore::RenderBlock::removeFloatingObject): prevent logicalBottom to
2124         become negative when logicalTop is INT_MAX.
2125         (WebCore::RenderBlock::markLinesDirtyInBlockRange): when logicalBottom
2126         is INT_MAX, we should dirty everything. So, we bail out to make
2127         afterLowest equal to the lastRootBox() or lowestDirstLine.
2128
2129 2011-02-03  David Levin  <levin@chromium.org>
2130
2131         Reviewed by Adam Barth and Oliver Hunt.
2132
2133         Worker.importScript() should clean errors for cross origin imports.
2134         https://bugs.webkit.org/show_bug.cgi?id=52871
2135
2136         Test: http/tests/workers/worker-importScriptsOnError.html
2137
2138         * bindings/js/WorkerScriptController.cpp:
2139         (WebCore::WorkerScriptController::evaluate): Use sanitizeScriptError
2140         to determine when to create a clean exception.
2141         * bindings/v8/WorkerContextExecutionProxy.cpp:
2142         (WebCore::WorkerContextExecutionProxy::evaluate): Ditto.
2143         * dom/ScriptExecutionContext.cpp:
2144         (WebCore::ScriptExecutionContext::sanitizeScriptError): Figure out
2145         if the error needs to be cleaned up.
2146         (WebCore::ScriptExecutionContext::dispatchErrorEvent): Extracted
2147         sanitizeScriptError for use by other places.
2148         * dom/ScriptExecutionContext.h:
2149         * workers/WorkerContext.cpp:
2150         (WebCore::WorkerContext::importScripts): Use the reponse url when
2151         telling the evaluate where the script came fro.
2152         * workers/WorkerScriptLoader.cpp:
2153         (WebCore::WorkerScriptLoader::responseURL): Expose the url that
2154         the script was loaded from (which may be different from url() due
2155         to redirects).
2156         (WebCore::WorkerScriptLoader::didReceiveResponse): Capture the reponse url.
2157         * workers/WorkerScriptLoader.h:
2158
2159 2011-02-03  Mark Mentovai  <mark@chromium.org>
2160
2161         Reviewed by Dimitri Glazkov.
2162
2163         Chromium GYP build fix.
2164
2165         When various settings were moved to webcore_prerequisites in r66364,
2166         things that should have been direct_dependent_settings were not marked
2167         as such. GYP 'defines', for example, make no sense on a 'none'-type
2168         target such as webcore_prerequisites. It appears that it was intended
2169         for these settings to be pushed to direct dependents, which would make
2170         direct_dependent_settings correct.
2171
2172         Losing the ChromiumWebCoreObjC defines on the Mac, for example, caused
2173         http://crbug.com/71537, which at best causes Mac console log spew, and
2174         at worst may result in Chromium's copy of WebCore using system
2175         definitions of certain Objective-C classes at runtime, or vice-versa.
2176
2177         The build now includes a postbuild step to prevent
2178         http://crbug.com/71537 from regressing again. The build will fail upon
2179         regression.
2180
2181         https://bugs.webkit.org/show_bug.cgi?id=53630
2182
2183         * WebCore.gyp/WebCore.gyp: Move things in webcore_prerequisites into
2184           direct_dependent_settings as needed, add the check_objc_rename
2185           postbuild step.
2186         * WebCore.gyp/mac/check_objc_rename.sh: Added.
2187
2188 2011-02-03  Adam Barth  <abarth@webkit.org>
2189
2190         Reviewed by Eric Seidel.
2191
2192         Make XSSFilter go fast by adding a SuffixTree
2193         https://bugs.webkit.org/show_bug.cgi?id=53665
2194
2195         The SuffixTree lets us quickly reject snippets if the POST data is
2196         large (because we can avoid a linear scan over the POST data).
2197
2198         * html/parser/XSSFilter.cpp:
2199         (WebCore::XSSFilter::init):
2200         (WebCore::XSSFilter::isContainedInRequest):
2201         * html/parser/XSSFilter.h:
2202
2203 2011-02-03  Mihai Parparita  <mihaip@chromium.org>
2204
2205         Reviewed by Alexey Proskuryakov.
2206
2207         REGRESSION (r77355): Page cache layout tests crash
2208         https://bugs.webkit.org/show_bug.cgi?id=53648
2209
2210         Test: fast/events/pagehide-timeout.html
2211         
2212         Suspend active DOM objects after all pagehide event handlers have run,
2213         otherwise it's possible for them to create more objects that weren't
2214         getting suspended.
2215
2216         * history/CachedFrame.cpp:
2217         (WebCore::CachedFrame::CachedFrame):
2218
2219 2011-02-03  Jeremy Orlow  <jorlow@chromium.org>
2220
2221         Reviewed by Nate Chapin.
2222
2223         SerializedScriptValue should not require v8 to create undefined and null values
2224         https://bugs.webkit.org/show_bug.cgi?id=53730
2225
2226         Instead of creating a v8 type and passing that into the constructor, just use
2227         the writer class directly. While I was at it, I cleaned up the code a bit too
2228         by getting rid of the WireData/StringValue enum as I found that personally
2229         confusing.
2230
2231         This is necessary because these methods are called by IndexedDB in the browser
2232         process where v8 is not spun up.
2233
2234         No functionality changed and not possible to test.
2235
2236         * bindings/v8/SerializedScriptValue.cpp:
2237         (WebCore::SerializedScriptValue::createFromWire):
2238         (WebCore::SerializedScriptValue::create):
2239         (WebCore::SerializedScriptValue::nullValue):
2240         (WebCore::SerializedScriptValue::undefinedValue):
2241         (WebCore::SerializedScriptValue::release):
2242         (WebCore::SerializedScriptValue::SerializedScriptValue):
2243         * bindings/v8/SerializedScriptValue.h:
2244
2245 2011-02-03  Beth Dakin  <bdakin@apple.com>
2246
2247         Reviewed by Sam Weinig.
2248
2249         Fix for <rdar://problem/8944544> Ability to animate track
2250         for WKPainter scrollers
2251
2252         Two new WebKitSystemInterface functions.
2253         * WebCore.exp.in:
2254         * platform/mac/WebCoreSystemInterface.h:
2255         * platform/mac/WebCoreSystemInterface.mm:
2256
2257         Use Scrollbar::convertFromContainingView() to return the right point.
2258         * platform/mac/ScrollAnimatorMac.mm:
2259         (-[ScrollbarPainterControllerDelegate scrollerImpPair:convertContentPoint:toScrollerImp:]):
2260         
2261         ScrollKnobAnimation is now ScrollbarPartAnimation. It can
2262         now be used to animate the knob or the track.
2263         (-[ScrollbarPartAnimation initWithScrollbarPainter:part:WebCore::scrollAnimator:WebCore::animateAlphaTo:duration:]):
2264         (-[ScrollbarPartAnimation setCurrentProgress:]):
2265         (-[ScrollbarPainterDelegate setUpAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]):
2266         (-[ScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
2267         (-[ScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]):
2268
2269         Scrollbars need invalodating after the overlay state changes. 
2270         (-[ScrollbarPainterDelegate scrollerImp:overlayScrollerStateChangedTo:]):
2271
2272 2011-02-03  Sam Weinig  <sam@webkit.org>
2273
2274         Reviewed by Beth Dakin.
2275
2276         Scroll thumb jumps to top when resizing horizontally.
2277
2278         * platform/ScrollView.cpp:
2279         (WebCore::ScrollView::updateScrollbars): Add call to update
2280         the scrollbar's offset in the case where we may have created
2281         a new scrollbar but have not changed the current position.
2282
2283 2011-02-03  Justin Schuh  <jschuh@chromium.org>
2284
2285         Reviewed by Dirk Schulze.
2286
2287         startAnimations should use a local, RefCounted Vector.
2288         https://bugs.webkit.org/show_bug.cgi?id=53458
2289
2290         Test: svg/custom/use-animation-in-fill.html
2291
2292         * svg/SVGDocumentExtensions.cpp:
2293         (WebCore::SVGDocumentExtensions::startAnimations):
2294
2295 2011-02-03  Adam Barth  <abarth@webkit.org>
2296
2297         Reviewed by Daniel Bates.
2298
2299         XSSFilter shouldn't bother to analyze pages without "injection"
2300         characters in the request
2301         https://bugs.webkit.org/show_bug.cgi?id=53664
2302
2303         If the request lacks these "injection" characters, then it's unlikely
2304         that there's a reflective XSS attack happening.  This hueristic lets us
2305         avoid analyzing the vast majority of responses for XSS.  Of course, the
2306         hueristic isn't perfect.  Because of this huerstic, we miss out on
2307         injections into unquoted attributes.  However, it's a trade-off that's
2308         worked well in the XSSAuditor.
2309
2310         * html/parser/XSSFilter.cpp:
2311         (WebCore::HTMLNames::isRequiredForInjection):
2312         (WebCore::XSSFilter::XSSFilter):
2313         (WebCore::XSSFilter::init):
2314         (WebCore::XSSFilter::filterToken):
2315         (WebCore::XSSFilter::isContainedInRequest):
2316         * html/parser/XSSFilter.h:
2317
2318 2011-02-03  Vangelis Kokkevis  <vangelis@chromium.org>
2319
2320         Reviewed by Kenneth Russell.
2321
2322         [chromium] Fixing a compositor crash occurring on layers
2323         without an associated RenderSurface.
2324         https://bugs.webkit.org/show_bug.cgi?id=53679
2325         Regression was introduced by in r77425 
2326
2327         Test: http://webkit.org/blog/386/3d-transforms/ doesn't crash
2328         anymore.
2329
2330         * platform/graphics/chromium/LayerRendererChromium.cpp:
2331         (WebCore::LayerRendererChromium::drawLayer):
2332
2333 2011-02-03  Dan Bernstein  <mitz@apple.com>
2334
2335         Reviewed by Anders Carlsson.
2336
2337         <rdar://problem/8948788> Text emphasis marks have wrong orientation for vertical text
2338         https://bugs.webkit.org/show_bug.cgi?id=53709
2339
2340         Covered by rendering of fast/text/emphasis-vertical.html
2341
2342         * platform/graphics/mac/SimpleFontDataMac.mm:
2343         (WebCore::SimpleFontData::scaledFontData): Give the scaled font the same orientation this font
2344         has.
2345
2346 2011-02-02  Levi Weintraub  <leviw@chromium.org>
2347
2348         Reviewed by Ryosuke Niwa.
2349
2350         Moving cursor down in table cycles at the end of a row
2351         https://bugs.webkit.org/show_bug.cgi?id=50012
2352
2353         Avoids a caret cycling issue with certain content (e.g. tables) found at the very
2354         end of a document due to a bug in nextLeafWithSameEditability.
2355
2356         Test: editing/selection/move-by-line-cycles-in-table.html
2357
2358         * editing/visible_units.cpp:
2359         (WebCore::nextLeafWithSameEditability): Properly avoid descending back into the
2360         original leaf node.
2361
2362 2011-02-03  Pavel Podivilov  <podivilov@chromium.org>
2363
2364         Reviewed by Pavel Feldman.
2365
2366         Web Inspector: remove dead code related to changes panel.
2367         https://bugs.webkit.org/show_bug.cgi?id=53688
2368
2369         * WebCore.gypi:
2370         * WebCore.vcproj/WebCore.vcproj:
2371         * inspector/front-end/ChangesView.js: Removed.
2372         * inspector/front-end/WebKit.qrc:
2373         * inspector/front-end/inspector.css:
2374         (#error-warning-count):
2375         (#error-warning-count:hover):
2376         (#error-count + #warning-count):
2377         * inspector/front-end/inspector.html:
2378         * inspector/front-end/inspector.js:
2379
2380 2011-02-02  Sam Weinig  <sam@webkit.org>
2381
2382         Reviewed by Anders Carlsson.
2383
2384         Add notification of the end of a rubber band.
2385         <rdar://problem/8940648>
2386
2387         * WebCore.exp.in:
2388         Add additional exprots.
2389
2390         * page/ChromeClient.h:
2391         (WebCore::ChromeClient::didCompleteRubberBandForMainFrame):
2392         * page/FrameView.cpp:
2393         (WebCore::FrameView::didCompleteRubberBand):
2394         * page/FrameView.h:
2395         * platform/ScrollView.cpp:
2396         (WebCore::ScrollView::didCompleteRubberBand):
2397         * platform/ScrollView.h:
2398         Add hook.
2399
2400         * platform/ScrollableArea.h:
2401         (WebCore::ScrollableArea::inLiveResize):
2402         (WebCore::ScrollableArea::maximumScrollPosition):
2403         (WebCore::ScrollableArea::visibleWidth):
2404         (WebCore::ScrollableArea::overhangAmount):
2405         (WebCore::ScrollableArea::didCompleteRubberBand):
2406         Reorganize and de-virtualize live resize notifications.
2407
2408         * platform/mac/ScrollAnimatorMac.mm:
2409         (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
2410         Call the new hook when the rubberband ends.
2411
2412 2011-02-02  Evan Martin  <evan@chromium.org>
2413
2414         Reviewed by Tony Chang.
2415
2416         [chromium] complex joining characters positioned in wrong place
2417         https://bugs.webkit.org/show_bug.cgi?id=53637
2418
2419         Provide the correct font metrics to Harfbuzz related to the font design space.
2420         There are used in some fonts for GPOS positioning.
2421
2422         Test: platform/chromium-linux/fast/text/international/complex-joining-using-gpos.html
2423
2424         * platform/graphics/chromium/ComplexTextControllerLinux.cpp:
2425         (WebCore::ComplexTextController::setupFontForScriptRun):
2426         (WebCore::ComplexTextController::allocHarfbuzzFont):
2427         * platform/graphics/chromium/FontPlatformDataLinux.cpp:
2428         (WebCore::FontPlatformData::FontPlatformData):
2429         (WebCore::FontPlatformData::emSizeInFontUnits):
2430         (WebCore::FontPlatformData::operator=):
2431         * platform/graphics/chromium/FontPlatformDataLinux.h:
2432         (WebCore::FontPlatformData::FontPlatformData):
2433
2434 2011-02-02  Dimitri Glazkov  <dglazkov@chromium.org>
2435
2436         Reviewed by Kent Tamura.
2437
2438         REGRESSION(r76147): Slider thumb position is not updated when value attribute is changed.
2439         https://bugs.webkit.org/show_bug.cgi?id=53634
2440
2441         Test: fast/dom/HTMLInputElement/input-slider-update.html
2442
2443         * html/HTMLInputElement.cpp:
2444         (WebCore::HTMLInputElement::setValue): Added a call to InputType::valueChanged.
2445         * html/InputType.cpp:
2446         (WebCore::InputType::valueChanged): Added empty implementation.
2447         * html/InputType.h: Added def.
2448         * html/RangeInputType.cpp:
2449         (WebCore::RangeInputType::valueChanged): Added implementation that dirties layout
2450             bit on the thumb.
2451         * html/RangeInputType.h: Added def.
2452
2453 2011-02-02  Pavel Podivilov  <podivilov@chromium.org>
2454
2455         Reviewed by Pavel Feldman.
2456
2457         Web Inspector: do not share source frames between resources panel and scripts panel.
2458         https://bugs.webkit.org/show_bug.cgi?id=53584
2459
2460         Currently, we show error messages only for resources. This change will allow showing error
2461         messages in source frame even when resource is not available (eval scripts, inlined scripts).
2462
2463         * inspector/front-end/ConsoleView.js:
2464         (WebInspector.ConsoleView.prototype.addMessage):
2465         (WebInspector.ConsoleView.prototype.clearMessages):
2466         * inspector/front-end/ResourceView.js:
2467         (WebInspector.ResourceView.recreateResourceView):
2468         * inspector/front-end/ResourcesPanel.js:
2469         (WebInspector.FrameResourceTreeElement.prototype._setBubbleText):
2470         * inspector/front-end/ScriptsPanel.js:
2471         (WebInspector.ScriptsPanel.prototype._scriptSourceChanged):
2472         (WebInspector.ScriptsPanel.prototype.addConsoleMessage):
2473         (WebInspector.ScriptsPanel.prototype.clearConsoleMessages):
2474         (WebInspector.ScriptsPanel.prototype.reset):
2475         (WebInspector.ScriptsPanel.prototype._sourceFrameForScriptOrResource):
2476         (WebInspector.ScriptsPanel.prototype._sourceFrameForResource):
2477         (WebInspector.ScriptsPanel.prototype._sourceFrameForScript):
2478
2479 2011-02-03  Simon Fraser  <simon.fraser@apple.com>
2480
2481         Fix 32-bit builds.
2482
2483         * platform/graphics/ShadowBlur.cpp:
2484         (WebCore::ShadowBlur::blurLayerImage):
2485
2486 2011-02-03  Mikhail Naganov  <mnaganov@chromium.org>
2487
2488         Reviewed by Pavel Feldman.
2489
2490         Web Inspector: Add reporting of JS heap size limit to 'console.memory'.
2491         https://bugs.webkit.org/show_bug.cgi?id=53592
2492
2493         In JSC there is no limit, thus 'undefined' value is returned.
2494         For V8, the limit reported by the VM is returned.
2495
2496         * Android.jscbindings.mk:
2497         * CMakeLists.txt:
2498         * GNUmakefile.am:
2499         * WebCore.gypi:
2500         * WebCore.pro:
2501         * WebCore.vcproj/WebCore.vcproj:
2502         * WebCore.xcodeproj/project.pbxproj:
2503         * bindings/js/JSBindingsAllInOne.cpp:
2504         * bindings/js/JSMemoryInfoCustom.cpp: Added.
2505         * bindings/js/ScriptGCEvent.cpp:
2506         (WebCore::ScriptGCEvent::getHeapSize):
2507         * bindings/js/ScriptGCEvent.h:
2508         * bindings/v8/ScriptGCEvent.cpp:
2509         (WebCore::ScriptGCEvent::getHeapSize):
2510         * bindings/v8/ScriptGCEvent.h:
2511         * inspector/InspectorTimelineAgent.cpp:
2512         (WebCore::InspectorTimelineAgent::setHeapSizeStatistic):
2513         * page/MemoryInfo.cpp:
2514         (WebCore::MemoryInfo::MemoryInfo):
2515         * page/MemoryInfo.h:
2516         (WebCore::MemoryInfo::jsHeapSizeLimit):
2517         * page/MemoryInfo.idl:
2518
2519 2011-01-27  Philippe Normand  <pnormand@igalia.com>
2520
2521         Reviewed by Martin Robinson.
2522
2523         [GTK] LayoutTests/media/audio-mpeg4-supported.html fails
2524         https://bugs.webkit.org/show_bug.cgi?id=53125
2525
2526         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2527         (WebCore::mimeTypeCache): Add audio/x-m4a mimetype in the cache.
2528
2529 2011-02-03  Simon Fraser  <simon.fraser@apple.com>
2530
2531         Reviewed by Sam Weinig.
2532
2533         ShadowBlur radius for CSS shadows is slightly too big
2534         https://bugs.webkit.org/show_bug.cgi?id=53660
2535         
2536         If we follow SVG gaussian blur for CSS shadows, we can end up rendering
2537         shadows that extend further than the CSS "blur radius", which results
2538         in the shadows being truncated.
2539         
2540         Fix with a small fudge factor to reduce the kernel diameter slightly
2541         for CSS shadows.
2542         
2543         Also more closely follow the algorithm described in the SVG spec
2544         for computing the kernel size for different diameters, and clean up
2545         some variable naming relating to the shadow bounds.
2546
2547         * platform/graphics/ShadowBlur.cpp:
2548         (WebCore::ShadowBlur::blurLayerImage):
2549         (WebCore::ShadowBlur::drawRectShadowWithTiling):
2550
2551 2011-02-01  Pavel Podivilov  <podivilov@chromium.org>
2552
2553         Reviewed by Pavel Feldman.
2554
2555         Web Inspector: introduce new api for managing JavaScript breakpoints.
2556         https://bugs.webkit.org/show_bug.cgi?id=53235
2557
2558         Single protocol breakpoint (e.g. set by url) is mapped on zero or more VM breakpoints (set by sourceID).
2559         removeJavaScriptBreakpoint(breakpointId) removes breakpoint and all linked VM breakpoints.
2560         Since UI uses VM breakpoint location rather then protocol breakpoint location, all resolved breakpoints locations are passed to frontend.
2561
2562         SourceFrame is now aware of whether breakpoint is resolved or not and may display it accordingly.
2563         JavaScriptBreakpointsSidebarPane filters out breakpoints set on nonexistent scripts to avoid UI cluttering.
2564
2565         * bindings/js/ScriptDebugServer.cpp:
2566         (WebCore::ScriptDebugServer::setBreakpoint):
2567         (WebCore::ScriptDebugServer::removeBreakpoint):
2568         * bindings/js/ScriptDebugServer.h:
2569         * bindings/v8/DebuggerScript.js:
2570         ():
2571         * bindings/v8/ScriptDebugServer.cpp:
2572         (WebCore::ScriptDebugServer::setBreakpoint):
2573         * bindings/v8/ScriptDebugServer.h:
2574         * inspector/Inspector.idl:
2575         * inspector/InspectorAgent.cpp: clear breakpoints from inspector state when new frontend is created
2576         (WebCore::InspectorAgent::restoreInspectorStateFromCookie):
2577         (WebCore::InspectorAgent::populateScriptObjects):
2578         (WebCore::InspectorAgent::restoreDebugger):
2579         (WebCore::InspectorAgent::showAndEnableDebugger):
2580         (WebCore::InspectorAgent::enableDebugger):
2581         * inspector/InspectorAgent.h:
2582         * inspector/InspectorDebuggerAgent.cpp: manage relations between protocol breakpoints and VM breakpoints
2583         (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
2584         (WebCore::InspectorDebuggerAgent::inspectedURLChanged):
2585         (WebCore::InspectorDebuggerAgent::setJavaScriptBreakpoint):
2586         (WebCore::InspectorDebuggerAgent::setJavaScriptBreakpointBySourceId):
2587         (WebCore::InspectorDebuggerAgent::removeJavaScriptBreakpoint):
2588         (WebCore::InspectorDebuggerAgent::continueToLocation):
2589         (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
2590         (WebCore::InspectorDebuggerAgent::getScriptSource):
2591         (WebCore::InspectorDebuggerAgent::didParseSource):
2592         (WebCore::InspectorDebuggerAgent::didPause):
2593         * inspector/InspectorDebuggerAgent.h:
2594         (WebCore::InspectorDebuggerAgent::Script::Script):
2595         * inspector/InspectorValues.cpp:
2596         (WebCore::InspectorValue::asNumber):
2597         (WebCore::InspectorBasicValue::asNumber):
2598         (WebCore::InspectorObject::remove):
2599         * inspector/InspectorValues.h:
2600         (WebCore::InspectorObject::getNumber):
2601         (WebCore::InspectorObject::find):
2602         * inspector/ScriptBreakpoint.h:
2603         (WebCore::ScriptBreakpoint::ScriptBreakpoint):
2604         * inspector/front-end/Breakpoint.js:
2605         (WebInspector.Breakpoint):
2606         (WebInspector.Breakpoint.prototype.addLocation):
2607         * inspector/front-end/BreakpointManager.js: remove all stuff related to JavaScript breakpoints from here
2608         (WebInspector.BreakpointManager):
2609         (WebInspector.BreakpointManager.prototype._projectChanged):
2610         (WebInspector.BreakpointManager.prototype._saveBreakpoints):
2611         (WebInspector.BreakpointManager.prototype._validateBreakpoints):
2612         * inspector/front-end/BreakpointsSidebarPane.js:
2613         (WebInspector.JavaScriptBreakpointsSidebarPane): filter breakpoints set on nonexistent scripts to avoid ui cluttering
2614         * inspector/front-end/DebuggerModel.js:
2615         (WebInspector.DebuggerModel): pull all JavaScript from localStorage and push them to fronted when debugger is enabled, save resolved breakpoints data
2616         * inspector/front-end/Script.js:
2617         (WebInspector.Script.prototype.sourceLine):
2618         * inspector/front-end/ScriptsPanel.js:
2619         (WebInspector.ScriptsPanel.prototype._toggleDebugging):
2620         * inspector/front-end/Settings.js:
2621         (WebInspector.Settings):
2622         * inspector/front-end/SourceFrame.js: handle resolved and unresolved breakpoints differently
2623         * inspector/front-end/inspector.js:
2624
2625 2011-02-03  Nikolas Zimmermann  <nzimmermann@rim.com>
2626
2627         Reviewed by Dirk Schulze.
2628
2629         small text which is scaled to be large renders pixelated
2630         https://bugs.webkit.org/show_bug.cgi?id=12448
2631
2632         SVG <text> with font-size smaller or equal to 1 does not paint correctly
2633         https://bugs.webkit.org/show_bug.cgi?id=14242
2634
2635         misplaced text in SVG
2636         https://bugs.webkit.org/show_bug.cgi?id=17053
2637
2638         Don't render very small (but zoomed) text inside SVG
2639         https://bugs.webkit.org/show_bug.cgi?id=19393
2640
2641         Tiny fonts scaled up end up too large in Safari
2642         https://bugs.webkit.org/show_bug.cgi?id=20192
2643
2644         Stretched SVG Text has awful glyph spacing 
2645         https://bugs.webkit.org/show_bug.cgi?id=21774
2646
2647         REGRESSION (r72141?): svg/batik/text/smallFonts.svg failing on Leopard
2648         https://bugs.webkit.org/show_bug.cgi?id=49846
2649
2650         [Gtk] Text height in zoomed SVG is 1px too high
2651         https://bugs.webkit.org/show_bug.cgi?id=50313
2652
2653         SVG text smaller than 0.5px not displayed properly
2654         https://bugs.webkit.org/show_bug.cgi?id=50528
2655
2656         When rendering text, we're selecting a font with a size, as specified in the markup.
2657         This can lead to problems, if the context, where the text is rendered upon, is scaled. If a parent
2658         element of the <text> defines a transform=".." or the outermost <svg> containing a viewBox the
2659         problem becomes apparent.
2660
2661         Consider following two snippets, which should render exactly the same:
2662         <svg viewBox="0 0 100 100"><text x="25" y="50" font-size="25">test</text></svg>
2663         <svg viewBox="0 0 1 1"><text x="0.25" y="0.5" font-size="0.25">test</text></svg>
2664
2665         When selecting a font size below 0.5, FontCacheMac would request a font with size 0,
2666         which AppKit turns into 12. This lead to huge text rendering, instead of small text on Mac.
2667         Other platforms have different problems (Qt simply scales the font, leading to pixelation etc.)
2668
2669         To fix this in a cross-platform fashion, we now always compute the final font size on screen,
2670         remove any scaling from the context, draw the text using the scaled font size, then reapply
2671         the context scale. This makes the example snippets above render exactly the same and fixes
2672         numerous of bugs, present since years. As we're now heavily using floating-point font sizes
2673         internally, depending on the scale of the document, it's very important to use the new
2674         floating-point text metrics information (floatAscent/floatDescent/floatHeight) everywhere in SVG.
2675
2676         Fixes existing tests: css3/zoom-coords.xhtml (cross-platform inconsistencies should be gone, mac now reports floatHeight values for SVG text height)
2677                               svg/hixie/text/003.html (no more pixelation)
2678                               svg/batik/text/smallFonts.svg (small fonts aren't rendered huge anymore on mac)
2679                               svg/hixie/viewbox/preserveAspectRatio/001.xml (bug 21774, no more awful spacing)
2680                               svg/zoom/page/zoom-zoom-coords.xhtml (cross-platform inconsistencies should be gone, inspired by bug 50313)
2681
2682         Tests: svg/text/font-size-below-point-five-2.svg (reduction from bug 50528)
2683                svg/text/font-size-below-point-five.svg (reduction from bug 50528)
2684                svg/text/scaled-font.svg (reduction from bug 12448)
2685                svg/text/small-fonts-2.svg (reduction from bug 14242)
2686                svg/text/small-fonts-3.svg (reduction from bug 17053)
2687                svg/text/small-fonts-in-html5.html (reduction from bug 19393)
2688                svg/text/small-fonts.svg (reduction from bug 20192))
2689
2690         * rendering/svg/RenderSVGInlineText.cpp: Cache 'float scalingFactor' & 'Font scaledFont', whenever the on-screen representation changes.
2691         * rendering/svg/RenderSVGInlineText.h:
2692         * rendering/svg/RenderSVGText.cpp: Update scalingFactor/scaledFont, if necessary.
2693         * rendering/svg/SVGInlineTextBox.cpp: Switch to new font rendering strategy. Always use scaledFont, and remove any context scale before drawing.
2694         * rendering/svg/SVGInlineTextBox.h:
2695         * rendering/svg/SVGTextLayoutEngineBaseline.cpp: Use floating-point metrics everywhere.
2696         * rendering/svg/SVGTextMetrics.cpp: Ditto.
2697         * rendering/svg/SVGTextMetrics.h: Ditto.
2698         * rendering/svg/SVGTextQuery.cpp: Ditto.
2699         * svg/SVGFont.cpp: Adjust stroke thickness, when drawing SVGFonts into a normalized context (no more scale).
2700         * svg/SVGTextContentElement.cpp: Make <text> elements always dependant on window size changes in combination with viewBox set.
2701         * svg/SVGTextPositioningElement.cpp: Remove now unnecessary code to determine wheter relative lengths are used as text attributes.
2702         * svg/SVGTextPositioningElement.h: 
2703
2704 2011-02-03  Pavel Feldman  <pfeldman@chromium.org>
2705
2706         Reviewed by Yury Semikhatsky.
2707
2708         Web Inspector: resources panel doesn't show frames after reload.
2709         https://bugs.webkit.org/show_bug.cgi?id=53430
2710
2711         * inspector/front-end/ResourcesPanel.js:
2712         (WebInspector.ResourcesPanel.prototype.show):
2713         (WebInspector.ResourcesPanel.prototype.loadEventFired):
2714         (WebInspector.ResourcesPanel.prototype._initDefaultSelection):
2715         (WebInspector.ResourcesPanel.prototype.reset):
2716         (WebInspector.ResourcesPanel.prototype.clear):
2717         * inspector/front-end/inspector.js:
2718         (WebInspector.loadEventFired):
2719
2720 2011-02-01  Alexander Pavlov  <apavlov@chromium.org>
2721
2722         Reviewed by Pavel Feldman.
2723
2724         Web Inspector: Remove the *2 suffix from the CSS style-related protocol methods
2725         https://bugs.webkit.org/show_bug.cgi?id=53492
2726
2727         * inspector/Inspector.idl:
2728         * inspector/InspectorCSSAgent.cpp:
2729         (WebCore::InspectorCSSAgent::getStylesForNode):
2730         (WebCore::InspectorCSSAgent::getInlineStyleForNode):
2731         (WebCore::InspectorCSSAgent::getComputedStyleForNode):
2732         (WebCore::InspectorCSSAgent::getAllStyles):
2733         (WebCore::InspectorCSSAgent::getStyleSheet):
2734         (WebCore::InspectorCSSAgent::getStyleSheetText):
2735         (WebCore::InspectorCSSAgent::setStyleSheetText):
2736         (WebCore::InspectorCSSAgent::setPropertyText):
2737         (WebCore::InspectorCSSAgent::toggleProperty):
2738         (WebCore::InspectorCSSAgent::setRuleSelector):
2739         (WebCore::InspectorCSSAgent::addRule):
2740         * inspector/InspectorCSSAgent.h:
2741         * inspector/front-end/AuditRules.js:
2742         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun):
2743         * inspector/front-end/CSSStyleModel.js:
2744         (WebInspector.CSSStyleModel.prototype.getStylesAsync):
2745         (WebInspector.CSSStyleModel.prototype.getComputedStyleAsync):
2746         (WebInspector.CSSStyleModel.prototype.getInlineStyleAsync):
2747         (WebInspector.CSSStyleModel.prototype.setRuleSelector):
2748         (WebInspector.CSSStyleModel.prototype.addRule):
2749         (WebInspector.CSSStyleModel.prototype._styleSheetChanged):
2750         (WebInspector.CSSStyleModel.prototype._onRevert):
2751         (WebInspector.CSSStyleDeclaration.prototype.insertPropertyAt):
2752         (WebInspector.CSSProperty.prototype.setText):
2753         (WebInspector.CSSProperty.prototype.setDisabled):
2754         (WebInspector.CSSStyleSheet.createForId):
2755         (WebInspector.CSSStyleSheet.prototype.setText):
2756
2757 2011-02-03  Adam Barth  <abarth@webkit.org>
2758
2759         Reviewed by Daniel Bates.
2760
2761         Teach XSSFilter about data URLs
2762         https://bugs.webkit.org/show_bug.cgi?id=53662
2763
2764         The XSS filter doesn't really make sense for data URLs because
2765         everything in a "response" from a data URL was part of the request.
2766
2767         Test: http/tests/security/xssAuditor/data-urls-work.html
2768
2769         * html/parser/XSSFilter.cpp:
2770         (WebCore::XSSFilter::init):
2771         (WebCore::XSSFilter::filterToken):
2772
2773 2011-02-02  Chris Evans  <cevans@chromium.org>
2774
2775         Reviewed by Darin Fisher.
2776
2777         window.find() can fail when switching case sensitivity
2778         https://bugs.webkit.org/show_bug.cgi?id=53654
2779
2780         Reset the pattern to a safe one when done, to avoid usearch_reset()
2781         indirectly touching the old, stale text pointer.
2782
2783         Test: fast/text/find-window.html
2784
2785         * editing/TextIterator.cpp:
2786         (WebCore::SearchBuffer::~SearchBuffer): leave a safe pattern buffer when done.
2787
2788 2011-02-02  Adam Barth  <abarth@webkit.org>
2789
2790         Reviewed by Daniel Bates.
2791
2792         Teach XSSFilter that <param> elements can contain URLs
2793         https://bugs.webkit.org/show_bug.cgi?id=53652
2794
2795         When loading plugins for the <object> tag, we're "smart" enough to
2796         reach into the <param> elements and pull out the URL in some cases.
2797         This patch teaches the XSSFilter how to block injections into those
2798         sorts of param elements.
2799
2800         Fixes:
2801             http/tests/security/xssAuditor/object-*
2802
2803         * html/HTMLParamElement.cpp:
2804         (WebCore::HTMLParamElement::isURLParameter):
2805         (WebCore::HTMLParamElement::isURLAttribute):
2806         (WebCore::HTMLParamElement::addSubresourceAttributeURLs):
2807         * html/HTMLParamElement.h:
2808             - Add a helper function so that HTMLParamElement can share the
2809               ground truth for these names with the XSSFilter.
2810         * html/parser/XSSFilter.cpp:
2811         (WebCore::XSSFilter::filterTokenInitial):
2812         (WebCore::XSSFilter::filterParamToken):
2813         * html/parser/XSSFilter.h:
2814
2815 2011-02-02  Dimitri Glazkov  <dglazkov@chromium.org>
2816
2817         Reviewed by David Levin.
2818
2819         GCC compiler on ARM issues bogus warnings and fails to compile.
2820         https://bugs.webkit.org/show_bug.cgi?id=53620
2821
2822         Despite warnings explicitly being disallowed (-Wno-uninitialized),
2823         gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3 throws up the warnings like:
2824
2825         "error: 'colorTransparent.unstatic.4909' may be used uninitialized in this function"
2826
2827         The fix is to add an extra condition, which somehow pacifies the compiler.
2828
2829         * css/CSSPrimitiveValue.cpp:
2830         (WebCore::CSSPrimitiveValue::createColor): Added workaround conditions.
2831
2832 2011-02-02  Adam Barth  <abarth@webkit.org>
2833
2834         Reviewed by Daniel Bates.
2835
2836         Teach XSSFilter about X-XSS-Protection
2837         https://bugs.webkit.org/show_bug.cgi?id=53640
2838
2839         This patch causes us to pass:
2840             http/tests/security/xssAuditor/full-block-*
2841             http/tests/security/xssAuditor/no-protection-script-tag.html
2842
2843         * html/parser/XSSFilter.cpp:
2844         (WebCore::XSSFilter::XSSFilter):
2845         (WebCore::XSSFilter::init):
2846         (WebCore::XSSFilter::filterToken):
2847         * html/parser/XSSFilter.h:
2848
2849 2011-02-02  Adam Barth  <abarth@webkit.org>
2850
2851         Reviewed by Daniel Bates.
2852
2853         When XSSFilter blocks JavaScript URLs, use a safe JavaScript URL
2854         instead of the empty string
2855         https://bugs.webkit.org/show_bug.cgi?id=53643
2856
2857         In a URL context, the empty string completes to the URL of the current
2858         page, which causes these tests to go into an infinite loop.  Instead,
2859         we should use a "safe" JavaScript URL that does nothing.
2860
2861         Fixes:
2862             http/tests/security/xssAuditor/javascript-link*
2863
2864         * html/parser/XSSFilter.cpp:
2865         (WebCore::XSSFilter::eraseDangerousAttributesIfInjected):
2866
2867 2011-02-02  Dan Bernstein  <mitz@apple.com>
2868
2869         Reviewed by Sam Weinig.
2870
2871         <rdar://problem/8380506> REGRESSION (r61921): RTL text in <b> tag doesn't display in WebKit under certain conditions
2872         https://bugs.webkit.org/show_bug.cgi?id=44942
2873
2874         Test: fast/text/bidi-embedding-pop-and-push-same-2.html
2875
2876         * platform/text/BidiResolver.h:
2877         (WebCore::::commitExplicitEmbedding): Changed to return a boolean indicating whether there was
2878         a change to embedding levels.
2879         (WebCore::::createBidiRunsForLine): If embedding levels did not change as a result of committing
2880         the explicit embedding sequence, then runs were not added, and we should continue normally.
2881
2882 2011-02-02  Sam Weinig  <sam@webkit.org>
2883
2884         Reviewed by Dan Bernstein.
2885
2886         Fix miscalculation of the overhang area used for painting. We were
2887         not correctly accounting for scrollbars resulting in an non-negative
2888         overhang even when we weren't over the edge.
2889
2890         * platform/ScrollView.cpp:
2891         (WebCore::ScrollView::calculateOverhangAreasForPainting):
2892
2893 2011-02-02  Jeremy Orlow  <jorlow@chromium.org>
2894
2895         Reviewed by Nate Chapin.
2896
2897         IDBTransaction and IDBRequest can be deleted while ScriptExecutionContext is iterating....which is bad
2898         https://bugs.webkit.org/show_bug.cgi?id=52722
2899
2900         The solution is to change ScriptExecutionContext's destructor to iterate over
2901         the list in a way that handles the mutations. This new method is destructive,
2902         but that's OK since the object is going away. I've also added a several asserts.
2903
2904         There should be no behavior change.
2905
2906         * dom/ScriptExecutionContext.cpp:
2907         (WebCore::ScriptExecutionContext::ScriptExecutionContext):
2908         (WebCore::ScriptExecutionContext::~ScriptExecutionContext):
2909         (WebCore::ScriptExecutionContext::canSuspendActiveDOMObjects):
2910         (WebCore::ScriptExecutionContext::suspendActiveDOMObjects):
2911         (WebCore::ScriptExecutionContext::resumeActiveDOMObjects):
2912         (WebCore::ScriptExecutionContext::stopActiveDOMObjects):
2913         (WebCore::ScriptExecutionContext::createdActiveDOMObject):
2914         (WebCore::ScriptExecutionContext::destroyedActiveDOMObject):
2915         * dom/ScriptExecutionContext.h:
2916         * storage/IDBTransaction.cpp:
2917         (WebCore::IDBTransaction::contextDestroyed):
2918         * storage/IDBTransaction.h:
2919
2920 2011-02-02  Mark Rowe  <mrowe@apple.com>
2921
2922         Build fix.
2923
2924         * WebCore.exp.in: Remove some bogus symbols from the .exp.in file.
2925         * platform/mac/ScrollbarThemeMac.mm:
2926         (WebCore::ScrollbarThemeMac::unregisterScrollbar): Look the object
2927         up in the HashMap rather than relying on a local variable that doesn't
2928         exist.
2929
2930 2011-02-02  Adam Barth  <abarth@webkit.org>
2931
2932         Reviewed by Daniel Bates.
2933
2934         Teach XSSFilter about JavaScript URLs
2935         https://bugs.webkit.org/show_bug.cgi?id=53635
2936
2937         This patch teaches the XSSFilter to check for JavaScript URLs in
2938         attribute values.  If this approach has too many false positives, we
2939         can restrict which attribute names we examine.
2940
2941         Fixes these tests:
2942             http/tests/security/xssAuditor/anchor-url-dom-write-location-javascript-URL.html
2943             http/tests/security/xssAuditor/dom-write-location-javascript-URL.html
2944             http/tests/security/xssAuditor/iframe-javascript-url*
2945
2946         * html/parser/XSSFilter.cpp:
2947         (WebCore::HTMLNames::containsJavaScriptURL):
2948         (WebCore::XSSFilter::filterTokenInitial):
2949         (WebCore::XSSFilter::eraseDangerousAttributesIfInjected):
2950         * html/parser/XSSFilter.h:
2951
2952 2011-02-02  Dan Bernstein  <mitz@apple.com>
2953
2954         Reviewed by Sam Weinig, even though this is just a...
2955
2956         ...build fix.
2957
2958         * platform/mac/ScrollAnimatorMac.mm:
2959         (WebCore::ScrollAnimatorMac::~ScrollAnimatorMac):
2960
2961 2011-02-02  Mark Rowe  <mrowe@apple.com>
2962
2963         Reviewed by Beth Dakin.
2964
2965         <rdar://problem/8952012> Crash on launch inside scrollbar code.
2966
2967         We need to ensure that we remove ourselves as the delegates of objects when we're going
2968         away as failing to do this can lead to crashes if the lifetime of the other objects
2969         is longer than ours.
2970
2971         * platform/mac/ScrollAnimatorMac.mm:
2972         (WebCore::ScrollAnimatorMac::~ScrollAnimatorMac):
2973         * platform/mac/ScrollbarThemeMac.mm:
2974         (WebCore::ScrollbarThemeMac::unregisterScrollbar):
2975
2976 2011-02-02  Beth Dakin  <bdakin@apple.com>
2977
2978         Build fix.
2979
2980         * WebCore.exp.in:
2981
2982 2011-02-02  Patrick Gansterer  <paroga@webkit.org>
2983
2984         Unreviewed WinCE build fix for r77397.
2985
2986         * page/wince/FrameWinCE.cpp:
2987         (WebCore::computePageRectsForFrame):
2988
2989 2011-02-02  Patrick Gansterer  <paroga@webkit.org>
2990
2991         Unreviewed WinCE build fix for r77398.
2992
2993         * platform/graphics/wince/PlatformPathWinCE.cpp:
2994         (WebCore::containsPoint):
2995         (WebCore::inflateRectToContainPoint):
2996         (WebCore::PlatformPath::addRect):
2997         * platform/graphics/wince/SharedBitmap.cpp:
2998         (WebCore::SharedBitmap::drawPattern):
2999         * rendering/RenderThemeWinCE.cpp:
3000         (WebCore::RenderThemeWinCE::paintMenuListButton):
3001         (WebCore::RenderThemeWinCE::paintSearchFieldCancelButton):
3002         (WebCore::RenderThemeWinCE::paintSliderTrack):
3003         (WebCore::RenderThemeWinCE::paintMediaMuteButton):
3004         (WebCore::RenderThemeWinCE::paintMediaPlayButton):
3005         (WebCore::RenderThemeWinCE::paintMediaSeekBackButton):
3006         (WebCore::RenderThemeWinCE::paintMediaSeekForwardButton):
3007
3008 2011-02-02  Jian Li  <jianli@chromium.org>
3009
3010         Reviewed by Kenneth Russell.
3011
3012         [V8] Accessing DataView with index of -1 returns 0, doesn't throw
3013         https://bugs.webkit.org/show_bug.cgi?id=53559
3014
3015         Added test cases to cover this in fast/canvas/webgl/data-view-test.html.
3016
3017         * html/canvas/DataView.h:
3018         (WebCore::DataView::beyondRange):
3019
3020 2011-02-02  Sam Weinig  <sam@webkit.org>
3021
3022         Reviewed by Beth Dakin.
3023
3024         Add ChromeClient function to paint custom overhang areas.
3025         https://bugs.webkit.org/show_bug.cgi?id=53639
3026
3027         * page/Chrome.cpp:
3028         (WebCore::ChromeClient::paintCustomOverhangArea):
3029         * page/ChromeClient.h:
3030         Add ChromeClient function.
3031
3032         * page/FrameView.cpp:
3033         (WebCore::FrameView::paintOverhangAreas):
3034         * page/FrameView.h:
3035         Call out the the ChromeClient, call ScrollView base implementation
3036         if the ChromeClient returns false.
3037
3038         * platform/ScrollView.cpp:
3039         (WebCore::ScrollView::paintOverhangAreas):
3040         * platform/ScrollView.h:
3041         Add dirty rect for use when painting overhang areas.
3042
3043 2011-02-02  Peter Kasting  <pkasting@google.com>
3044
3045         Not reviewed, build fix.
3046
3047         Fix compile after r77427.
3048         https://bugs.webkit.org/show_bug.cgi?id=53455
3049
3050         * platform/graphics/qt/ImageDecoderQt.cpp:
3051         (WebCore::ImageDecoderQt::internalHandleCurrentImage):
3052         * platform/image-decoders/ImageDecoder.cpp:
3053         (WebCore::ImageFrame::operator=):
3054         * platform/image-decoders/bmp/BMPImageReader.cpp:
3055         (WebCore::BMPImageReader::decodeBMP):
3056         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
3057         (WebCore::JPEGImageDecoder::outputScanlines):
3058         * platform/image-decoders/png/PNGImageDecoder.cpp:
3059         (WebCore::PNGImageDecoder::rowAvailable):
3060         * platform/image-decoders/webp/WEBPImageDecoder.cpp:
3061         (WebCore::WEBPImageDecoder::decode):
3062
3063 2011-02-02  Peter Kasting  <pkasting@google.com>
3064
3065         Reviewed by David Levin.
3066
3067         Clean up ImageDecoder's comments (remove/trim/clarify).
3068         https://bugs.webkit.org/show_bug.cgi?id=53455
3069
3070         This also renames or eliminates a couple of functions for clarity, and
3071         switches a couple erroneous strncmp() calls to memcmp().
3072
3073         * platform/image-decoders/ImageDecoder.cpp:
3074         (WebCore::ImageDecoder::create):
3075         (WebCore::ImageFrame::clearPixelData):
3076         (WebCore::ImageFrame::zeroFillPixelData):
3077         (WebCore::ImageFrame::setSize):
3078         * platform/image-decoders/ImageDecoder.h:
3079         (WebCore::ImageFrame::originalFrameRect):
3080         (WebCore::ImageFrame::setOriginalFrameRect):
3081         (WebCore::ImageDecoder::ImageDecoder):
3082         (WebCore::ImageDecoder::~ImageDecoder):
3083         (WebCore::ImageDecoder::isSizeAvailable):
3084         (WebCore::ImageDecoder::size):
3085         (WebCore::ImageDecoder::setIgnoreGammaAndColorProfile):
3086         (WebCore::ImageDecoder::clearFrameBufferCache):
3087         (WebCore::ImageDecoder::isOverSize):
3088         * platform/image-decoders/bmp/BMPImageReader.cpp:
3089         (WebCore::BMPImageReader::processNonRLEData):
3090         * platform/image-decoders/cg/ImageDecoderCG.cpp:
3091         (WebCore::ImageFrame::setSize):
3092         * platform/image-decoders/gif/GIFImageDecoder.cpp:
3093         (WebCore::GIFImageDecoder::clearFrameBufferCache):
3094         (WebCore::GIFImageDecoder::frameComplete):
3095         (WebCore::GIFImageDecoder::initFrameBuffer):
3096         * platform/image-decoders/jpeg/JPEGImageDecoder.h:
3097         * platform/image-decoders/qt/ImageFrameQt.cpp:
3098         (WebCore::ImageFrame::operator=):
3099         (WebCore::ImageFrame::clearPixelData):
3100         (WebCore::ImageFrame::zeroFillPixelData):
3101         (WebCore::ImageFrame::setSize):
3102         * platform/image-decoders/skia/ImageDecoderSkia.cpp:
3103         (WebCore::ImageFrame::operator=):
3104         (WebCore::ImageFrame::clearPixelData):
3105         (WebCore::ImageFrame::zeroFillPixelData):
3106         (WebCore::ImageFrame::setSize):
3107         * platform/image-decoders/webp/WEBPImageDecoder.h:
3108
3109 2011-02-02  Vangelis Kokkevis  <vangelis@chromium.org>
3110
3111         [chromium] Adding support for reflections to the accelerated
3112         compositing path.
3113         https://bugs.webkit.org/show_bug.cgi?id=53179
3114
3115         All layout tests in compositing/reflections generate correct
3116         results with the exception of:
3117         1. nested-reflection-anchor-point.html : There appears to be
3118            some issue with the layer transform math that I haven't been
3119            able to track down yet.
3120         2. reflection-opacity.html : The current implementation applies
3121            opacity before doing the reflection which makes this test
3122            produce incorrect results.  This will affect reflected layers
3123            with opacity that overlap their original layer.  FIXME comment
3124            added in the code.
3125
3126         Tests: Covered by existing layout tests in compositing/reflections.
3127                Please see above for exceptions.
3128
3129         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
3130         (WebCore::GraphicsLayerChromium::setReplicatedByLayer):
3131         (WebCore::GraphicsLayerChromium::updateAnchorPoint):
3132         * platform/graphics/chromium/GraphicsLayerChromium.h:
3133         * platform/graphics/chromium/LayerChromium.cpp:
3134         (WebCore::LayerChromium::LayerChromium):
3135         * platform/graphics/chromium/LayerChromium.h:
3136         (WebCore::LayerChromium::setReplicaLayer):
3137         (WebCore::LayerChromium::replicaLayer):
3138         * platform/graphics/chromium/LayerRendererChromium.cpp:
3139         (WebCore::LayerRendererChromium::updateLayersRecursive):
3140         (WebCore::LayerRendererChromium::drawLayer):
3141         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
3142         (WebCore::RenderSurfaceChromium::drawableContentRect):
3143         (WebCore::RenderSurfaceChromium::drawSurface):
3144         (WebCore::RenderSurfaceChromium::draw):
3145         * platform/graphics/chromium/RenderSurfaceChromium.h:
3146         (WebCore::RenderSurfaceChromium::drawTransform):
3147
3148 2011-02-02  Xiyuan Xia  <xiyuan@chromium.org>
3149
3150         Reviewed by Tony Chang.
3151
3152         [Chromium] Select popup with padding has white strip on right
3153         https://bugs.webkit.org/show_bug.cgi?id=53602
3154
3155         No new tests as this change restores old behavior.
3156
3157         * platform/chromium/PopupMenuChromium.cpp:
3158         (WebCore::PopupListBox::layout):
3159
3160 2011-02-02  Beth Dakin  <bdakin@apple.com>
3161
3162         Reviewed by Mark Rowe.
3163
3164         Fix for <rdar://problem/8950343> CrashTracer: [USER]
3165         1 crash in WebProcess at com.apple.WebCore: 
3166         WebCore::ScrollbarThemeMac::unregisterScrollbar + 22
3167
3168         It is possible for a Scrollbar's ScrollableArea to be null,
3169         so we must null check.
3170         * platform/mac/ScrollbarThemeMac.mm:
3171         (WebCore::ScrollbarThemeMac::registerScrollbar):
3172         (WebCore::ScrollbarThemeMac::unregisterScrollbar):
3173
3174 2011-02-02  Zhenyao Mo  <zmo@google.com>
3175
3176         Reviewed by Kenneth Russell.
3177
3178         bufferData and bufferSubData should generate INVALID_VALUE with negative input
3179         https://bugs.webkit.org/show_bug.cgi?id=53626
3180
3181         * html/canvas/WebGLRenderingContext.cpp:
3182         (WebCore::WebGLRenderingContext::bufferData):
3183         (WebCore::WebGLRenderingContext::bufferSubData):
3184
3185 2011-02-02  Jeff Miller  <jeffm@apple.com>
3186
3187         Reviewed by Darin Adler and Steve Falkenburg.
3188
3189         Add DerivedSources.make to some Visual Studio projects
3190         https://bugs.webkit.org/show_bug.cgi?id=53607
3191
3192         * WebCore.vcproj/WebCoreGenerated.vcproj: Add DerivedSources.make.
3193
3194 2011-02-02  Cris Neckar  <cdn@chromium.org>
3195
3196         Reviewed by James Robinson.
3197
3198         Refcount domwindows when dispatching device orientation events.
3199         https://bugs.webkit.org/show_bug.cgi?id=53623
3200
3201         Test: fast/events/device-orientation-crash.html
3202
3203         * dom/DeviceMotionController.cpp:
3204         (WebCore::DeviceMotionController::timerFired):
3205         (WebCore::DeviceMotionController::didChangeDeviceMotion):
3206         * dom/DeviceMotionController.h:
3207         * dom/DeviceOrientationController.cpp:
3208         (WebCore::DeviceOrientationController::timerFired):
3209         (WebCore::DeviceOrientationController::didChangeDeviceOrientation):
3210         * dom/DeviceOrientationController.h:
3211
3212 2011-02-02  Zhenyao Mo  <zmo@google.com>
3213
3214         Reviewed by Kenneth Russell.
3215
3216         A deleted object should never been bound again
3217         https://bugs.webkit.org/show_bug.cgi?id=53604
3218
3219         * html/canvas/WebGLRenderingContext.cpp:
3220         (WebCore::WebGLRenderingContext::checkObjectToBeBound): Helper function to bind* and useProgram.
3221         (WebCore::WebGLRenderingContext::bindBuffer): Use checkObjectToBeBound.
3222         (WebCore::WebGLRenderingContext::bindFramebuffer): Ditto.
3223         (WebCore::WebGLRenderingContext::bindRenderbuffer): Ditto.
3224         (WebCore::WebGLRenderingContext::bindTexture): Ditto, also check the target matching.
3225         (WebCore::WebGLRenderingContext::deleteObject): Helper funtion to delete*.
3226         (WebCore::WebGLRenderingContext::deleteBuffer): Use deleteObject.
3227         (WebCore::WebGLRenderingContext::deleteFramebuffer): Ditto.
3228         (WebCore::WebGLRenderingContext::deleteProgram): Ditto.
3229         (WebCore::WebGLRenderingContext::deleteRenderbuffer): Ditto.
3230         (WebCore::WebGLRenderingContext::deleteShader): Ditto.
3231         (WebCore::WebGLRenderingContext::deleteTexture): Ditto.
3232         (WebCore::WebGLRenderingContext::useProgram): Use checkObjectToBeBound.
3233         * html/canvas/WebGLRenderingContext.h:
3234         * html/canvas/WebGLTexture.h:
3235         (WebCore::WebGLTexture::getTarget): Accessor to cached target.
3236
3237 2011-02-02  Alejandro G. Castro  <alex@igalia.com>
3238
3239         Unreviewed Efl buildfix after r77399.
3240
3241         * CMakeListsEfl.txt:
3242
3243 2011-02-02  Kenneth Russell  <kbr@google.com>
3244
3245         Reviewed by James Robinson.
3246
3247         Rename Typed Array subset to subarray
3248         https://bugs.webkit.org/show_bug.cgi?id=53618
3249
3250         * html/canvas/Float32Array.cpp:
3251         (WebCore::Float32Array::subarray):
3252         * html/canvas/Float32Array.h:
3253         * html/canvas/Float32Array.idl:
3254         * html/canvas/Int16Array.cpp:
3255         (WebCore::Int16Array::subarray):
3256         * html/canvas/Int16Array.h:
3257         * html/canvas/Int16Array.idl:
3258         * html/canvas/Int32Array.cpp:
3259         (WebCore::Int32Array::subarray):
3260         * html/canvas/Int32Array.h:
3261         * html/canvas/Int32Array.idl:
3262         * html/canvas/Int8Array.cpp:
3263         (WebCore::Int8Array::subarray):
3264         * html/canvas/Int8Array.h:
3265         * html/canvas/Int8Array.idl:
3266         * html/canvas/TypedArrayBase.h:
3267         (WebCore::TypedArrayBase::subarrayImpl):
3268         * html/canvas/Uint16Array.cpp:
3269         (WebCore::Uint16Array::subarray):
3270         * html/canvas/Uint16Array.h:
3271         * html/canvas/Uint16Array.idl:
3272         * html/canvas/Uint32Array.cpp:
3273         (WebCore::Uint32Array::subarray):
3274         * html/canvas/Uint32Array.h:
3275         * html/canvas/Uint32Array.idl:
3276         * html/canvas/Uint8Array.cpp:
3277         (WebCore::Uint8Array::subarray):
3278         * html/canvas/Uint8Array.h:
3279         * html/canvas/Uint8Array.idl:
3280
3281 2011-02-02  Adam Barth  <abarth@webkit.org>
3282
3283         Reviewed by Eric Seidel.
3284
3285         Add an empty file for Content Security Policy
3286         https://bugs.webkit.org/show_bug.cgi?id=53573
3287
3288         Posting this as a separate patch because editing the build files is so
3289         painful.
3290
3291         * Android.mk:
3292         * CMakeLists.txt:
3293         * GNUmakefile.am:
3294         * WebCore.gypi:
3295         * WebCore.pro:
3296         * WebCore.vcproj/WebCore.vcproj:
3297         * WebCore.xcodeproj/project.pbxproj:
3298
3299 2011-02-02  Dan Winship  <danw@gnome.org>
3300
3301         Reviewed by Martin Robinson.
3302
3303         [GTK] remove old data: URI handler, fix the SoupRequest-based one
3304         to pass tests
3305         https://bugs.webkit.org/show_bug.cgi?id=50885
3306
3307         * platform/network/soup/ResourceHandleSoup.cpp:
3308         (WebCore::sendRequestCallback): Do content-type sniffing here for
3309         non-HTTP requests.
3310         (WebCore::startHTTPRequest): Rename to match WebKit style.
3311         (WebCore::ResourceHandle::start): Pass everything except HTTP to
3312         startNonHTTPRequest, letting the SoupRequester decide whether it's
3313         supported or not.
3314         (WebCore::startNonHTTPRequest): Remove some old pre-SoupRequester
3315         code that was a no-op for file: URIs, but would break some data:
3316         URIs.
3317
3318 2011-02-02  Dimitri Glazkov  <dglazkov@chromium.org>
3319
3320         Update even more references to right() and bottom() in Chromium. Sheesh.
3321
3322         * platform/graphics/chromium/LayerRendererChromium.cpp:
3323         (WebCore::LayerRendererChromium::getFramebufferPixels): Replaced bottom/right with maxY/maxX.
3324
3325 2011-02-02  Alejandro G. Castro  <alex@igalia.com>
3326
3327         Unreviewed Gtk3 buildfix after r77286.
3328
3329         https://bugs.webkit.org/show_bug.cgi?id=53520
3330         Remove the physical terminology from IntRect and FloatRect.
3331
3332         * platform/gtk/RenderThemeGtk3.cpp:
3333         (WebCore::RenderThemeGtk::paintMenuList):
3334
3335 2011-02-02  Anders Carlsson  <andersca@apple.com>
3336
3337         Fix build.
3338
3339         * platform/mac/ScrollAnimatorMac.mm:
3340         (WebCore::ScrollAnimatorMac::pinnedInDirection):
3341
3342 2011-02-02  David Hyatt  <hyatt@apple.com>
3343
3344         Reviewed by Dan Bernstein.
3345
3346         https://bugs.webkit.org/show_bug.cgi?id=53619
3347
3348         Floats should not use physical terminology for their rects. Replace left/top with x/y and right/bottom
3349         with maxX/maxY.  This matches IntRect.
3350
3351         * rendering/RenderBlock.cpp:
3352         (WebCore::RenderBlock::addOverflowFromFloats):
3353         (WebCore::RenderBlock::flipFloatForWritingMode):
3354         (WebCore::RenderBlock::paintFloats):
3355         (WebCore::RenderBlock::selectionGaps):
3356         (WebCore::RenderBlock::addOverhangingFloats):
3357         (WebCore::RenderBlock::addIntrudingFloats):
3358         (WebCore::RenderBlock::hitTestFloats):
3359         (WebCore::RenderBlock::adjustForBorderFit):
3360         * rendering/RenderBlock.h:
3361         (WebCore::RenderBlock::FloatingObject::x):
3362         (WebCore::RenderBlock::FloatingObject::maxX):
3363         (WebCore::RenderBlock::FloatingObject::y):
3364         (WebCore::RenderBlock::FloatingObject::maxY):
3365         (WebCore::RenderBlock::FloatingObject::setX):
3366         (WebCore::RenderBlock::FloatingObject::setY):
3367         (WebCore::RenderBlock::logicalTopForFloat):
3368         (WebCore::RenderBlock::logicalBottomForFloat):
3369         (WebCore::RenderBlock::logicalLeftForFloat):
3370         (WebCore::RenderBlock::logicalRightForFloat):
3371         (WebCore::RenderBlock::setLogicalTopForFloat):
3372         (WebCore::RenderBlock::setLogicalLeftForFloat):
3373         (WebCore::RenderBlock::xPositionForFloatIncludingMargin):
3374         (WebCore::RenderBlock::yPositionForFloatIncludingMargin):
3375
3376 2011-02-02  Dimitri Glazkov  <dglazkov@chromium.org>
3377
3378         Update more references to right() and bottom() in Chromium Win.
3379
3380         * platform/graphics/chromium/TransparencyWin.cpp:
3381         (WebCore::TransparencyWin::compositeOpaqueComposite): Replaced bottom/right with maxY/maxX.
3382         (WebCore::TransparencyWin::compositeTextComposite): Ditto.
3383         * rendering/RenderThemeChromiumWin.cpp:
3384         (WebCore::RenderThemeChromiumWin::paintMenuList): Ditto.
3385
3386 2011-02-02  Adam Roben  <aroben@apple.com>
3387
3388         Encode/decode FormData and FormDataElement objects consistently
3389
3390         Fixes <http://webkit.org/b/53615> <rdar://problem/8943346> WebKit2: Restoring session state
3391         that contains form data fails (asserts in Debug build)
3392
3393         To prevent this from interfering with WebKit2 testing, it's useful to get this into a build
3394         now, even though we don't have an automated test for it yet. Writing a test is covered by
3395         <http://webkit.org/b/53616>.
3396
3397         Reviewed by Darin Adler.
3398
3399         * history/HistoryItem.cpp: Bump the encoding version, since this patch changes how we encode
3400         FormData objects.
3401
3402         * platform/network/FormData.cpp:
3403         (WebCore::decode): Decode the type from the Decoder, rather than getting it from the
3404         default-constructed FormDataElement. Failing to do this meant that all future uses of the
3405         Decoder would be reading from an unexpected part of the buffer (i.e., the next decode would
3406         start by reading the uint32_t that we forgot to decode here, and so on). We already had code
3407         to correctly set the FormDataElement's type based on this decoded type later in the
3408         function.
3409         (WebCore::FormData::encodeForBackForward): Encode m_identifier as an int64_t, since that
3410         matches its type and how we decode it.
3411
3412 2011-02-02  Dan Winship  <danw@gnome.org>
3413
3414         Reviewed by Martin Robinson.
3415
3416         [GTK] drop soup cache stuff, which has been moved to libsoup
3417         https://bugs.webkit.org/show_bug.cgi?id=50747
3418
3419         Use libsoup-based cache/requester API and remove the WebCore version
3420         of this functionality. This has been pushed upstream fully.
3421
3422         No new tests because this should not change functionality.
3423
3424         * GNUmakefile.am: Update for removed files.
3425         * platform/network/ResourceHandleInternal.h:
3426         (WebCore::ResourceHandleInternal::ResourceHandleInternal): Update
3427         type names, drop m_requester.
3428         * platform/network/soup/ResourceHandleSoup.cpp:
3429         (WebCore::ensureSessionIsInitialized): Add a SoupRequester to the
3430         session.
3431         (WebCore::parseDataUrl):
3432         (WebCore::startHttp): Get the requester from the session rather
3433         than using m_requester.
3434         (WebCore::sendRequestCallback):
3435         (WebCore::ResourceHandle::platformSetDefersLoading):
3436         (WebCore::readCallback):
3437         (WebCore::startGio): Update type names.
3438         * platform/network/soup/cache/soup-directory-input-stream.c: Removed.
3439         * platform/network/soup/cache/soup-directory-input-stream.h: Removed.
3440         * platform/network/soup/cache/soup-http-input-stream.c: Removed.
3441         * platform/network/soup/cache/soup-http-input-stream.h: Removed.
3442         * platform/network/soup/cache/soup-request-data.c: Removed.
3443         * platform/network/soup/cache/soup-request-data.h: Removed.
3444         * platform/network/soup/cache/soup-request-file.c: Removed.
3445         * platform/network/soup/cache/soup-request-file.h: Removed.
3446         * platform/network/soup/cache/soup-request-http.c: Removed.
3447         * platform/network/soup/cache/soup-request-http.h: Removed.
3448         * platform/network/soup/cache/soup-request.c: Removed.
3449         * platform/network/soup/cache/soup-request.h: Removed.
3450         * platform/network/soup/cache/soup-requester.c: Removed.
3451         * platform/network/soup/cache/soup-requester.h: Removed.
3452         * platform/network/soup/cache/webkit/soup-cache-private.h: Removed.
3453         * platform/network/soup/cache/webkit/soup-cache.c: Removed.
3454         * platform/network/soup/cache/webkit/soup-cache.h: Removed.
3455
3456 2011-02-02  David Hyatt  <hyatt@apple.com>
3457
3458         Reviewed by Darin Adler.
3459
3460         https://bugs.webkit.org/show_bug.cgi?id=53520
3461
3462         Remove physical accessors from IntRect and FloatRect.
3463
3464         * page/FrameView.cpp:
3465         (WebCore::FrameView::adjustPageHeightDeprecated):
3466         * platform/graphics/FloatRect.h:
3467         * platform/graphics/IntRect.h:
3468
3469 2011-02-02  David Hyatt  <hyatt@apple.com>
3470
3471         Reviewed by Dan Bernstein.
3472
3473         https://bugs.webkit.org/show_bug.cgi?id=53614
3474
3475         Remove physical terminology from overflow.  Replace with minX/maxX/minY/maxY.
3476
3477         * rendering/InlineFlowBox.cpp:
3478         (WebCore::InlineFlowBox::addBoxShadowVisualOverflow):
3479         (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
3480         * rendering/InlineFlowBox.h:
3481         (WebCore::InlineFlowBox::minYLayoutOverflow):
3482         (WebCore::InlineFlowBox::maxYLayoutOverflow):
3483         (WebCore::InlineFlowBox::minXLayoutOverflow):
3484         (WebCore::InlineFlowBox::maxXLayoutOverflow):
3485         (WebCore::InlineFlowBox::logicalLeftLayoutOverflow):
3486         (WebCore::InlineFlowBox::logicalRightLayoutOverflow):
3487         (WebCore::InlineFlowBox::logicalTopLayoutOverflow):
3488         (WebCore::InlineFlowBox::logicalBottomLayoutOverflow):
3489         (WebCore::InlineFlowBox::minYVisualOverflow):
3490         (WebCore::InlineFlowBox::maxYVisualOverflow):
3491         (WebCore::InlineFlowBox::minXVisualOverflow):
3492         (WebCore::InlineFlowBox::maxXVisualOverflow):
3493         (WebCore::InlineFlowBox::logicalLeftVisualOverflow):
3494         (WebCore::InlineFlowBox::logicalRightVisualOverflow):
3495         (WebCore::InlineFlowBox::logicalminYVisualOverflow):
3496         (WebCore::InlineFlowBox::logicalmaxYVisualOverflow):
3497         * rendering/RenderBlock.cpp:
3498         (WebCore::RenderBlock::adjustLinePositionForPagination):
3499         * rendering/RenderBlockLineLayout.cpp:
3500         (WebCore::RenderBlock::beforeSideVisualOverflowForLine):
3501         (WebCore::RenderBlock::afterSideVisualOverflowForLine):
3502         (WebCore::RenderBlock::beforeSideLayoutOverflowForLine):
3503         (WebCore::RenderBlock::afterSideLayoutOverflowForLine):
3504       &n