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