Crash from multicol spans with layers
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-12-07  Ken Buchanan <kenrb@chromium.org>
2
3         Crash from multicol spans with layers
4         https://bugs.webkit.org/show_bug.cgi?id=68030
5
6         Reviewed by David Hyatt.
7
8         The layer tree diverges from the render tree when a span is being split
9         between columns. This patch causes the layer tree to be updated when necessary.
10
11         * rendering/RenderBlock.cpp:
12         (WebCore::RenderBlock::splitFlow)
13         (WebCore::RenderBlock::splitBlocks)
14
15 2011-12-07  Alexey Proskuryakov  <ap@apple.com>
16
17         Handling of !important in inline style sets is broken
18         https://bugs.webkit.org/show_bug.cgi?id=73941
19
20         Reviewed by Dave Hyatt.
21
22         This behavior was introduced in bug 8223 to match IE and Firefox. But it doesn't appear that we're matching
23         any browser today, and CSSOM spec agrees with them.
24
25         * WebCore.exp.in: Don't export CSSStyleDeclaration::setProperty(), no one is using it.
26
27         * bindings/js/JSCSSStyleDeclarationCustom.cpp: (WebCore::JSCSSStyleDeclaration::putDelegate): Use regular
28         setProperty(), not the incorrect version that's being removed. Properties set via IDL attributes are never
29         important.
30
31         * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp: (WebCore::V8CSSStyleDeclaration::namedPropertySetter):
32         Made the same fix for v8. Why did v8 bindings authors copy/paste the code?!
33
34         * css/CSSStyleDeclaration.cpp:
35         * css/CSSStyleDeclaration.h:
36         Removed a version of setProperty() that attempted to parse the value and extract !important from it.
37
38         * html/ImageDocument.cpp:
39         (WebCore::ImageDocument::resizeImageToFit):
40         (WebCore::ImageDocument::restoreImageSize):
41         (WebCore::ImageDocument::windowSizeChanged):
42         * page/DragController.cpp:
43         (WebCore::DragController::concludeEditDrag):
44         We never needed to use this version of setProperty() here, it was just unnecessarily slower.
45
46 2011-12-07  Xianzhu Wang  <wangxianzhu@chromium.org>
47
48         In FontCacheAndroid.cpp should keep the pointer valid returned from CString::data()
49         https://bugs.webkit.org/show_bug.cgi?id=73849
50
51         The changed code has been covered by many existing layout tests.
52
53         Reviewed by Adam Barth.
54
55         * platform/graphics/chromium/FontCacheAndroid.cpp:
56         (WebCore::FontCache::createFontPlatformData):
57
58 2011-12-07  Xiaomei Ji  <xji@chromium.org>
59
60         Turn on move caret by word visually for Windows platform.
61         https://bugs.webkit.org/show_bug.cgi?id=59652
62
63         Reviewed by Ryosuke Niwa.
64
65         We already support (arrow key) moving cursor by character in visual order.
66         This patch implements (ctrl/alt-arrow) moving cursor by word in visual order (in Windows).
67         It matches Firefox's default behavior.
68
69         Without this patch, ctrl(alt for mac)-arrow key or
70         selection.modify("move", "left"/"right", "word") moves cursor by word in logical order. 
71
72         IE implements moving cursor by logical order for both arrow key and ctrl-arrow key.
73         Firefox implements moving cursor by visual order for both operations.
74         From Chromium bug report, native speakers would like moving cursor by visual order since it
75         is more intuitive.
76
77         The patch is only enabled for Windows (by EditingBehavior) because current implementation
78         matches Windows' native behavior.
79         For exmaple, if the logical text is "abc def hij", the cursor positions are
80         "|abc |def |hij|" no matter pressing ctrl-left-arrow or ctrl-right-arrow.
81
82         Mac and Linux's native behavior is slightly different. In which, when pressing
83         ctrl-left-arrow, the cursor positions are "|abc |def |hij|". When pressing ctrl-right-arrow,
84         the cursor positions are "|abc| def| hij|". We will implement it next.
85
86         Test: editing/selection/move-left-right-by-word-mac.html
87
88         * editing/EditingBehavior.h:
89         (WebCore::EditingBehavior::shouldMoveLeftRightByWordInVisualOrder):
90         * editing/FrameSelection.cpp: Remove experimental enum WebKitVisualWordGranularity.
91         (WebCore::FrameSelection::modifyExtendingRight):
92         (WebCore::FrameSelection::modifyExtendingForward):
93         (WebCore::FrameSelection::modifyMovingRight):
94         (WebCore::FrameSelection::modifyMovingForward):
95         (WebCore::FrameSelection::modifyExtendingLeft):
96         (WebCore::FrameSelection::modifyExtendingBackward):
97         (WebCore::FrameSelection::modifyMovingLeft):
98         (WebCore::FrameSelection::modifyMovingBackward):
99         * editing/TextGranularity.h: Remove experimental enum WebKitVisualWordGranularity.
100         * editing/VisibleSelection.cpp: Remove experimental enum WebKitVisualWordGranularity.
101         (WebCore::VisibleSelection::setStartAndEndFromBaseAndExtentRespectingGranularity):
102         * page/DOMSelection.cpp: Remove experimental experimental flag -webkit-visual-word.
103         (WebCore::DOMSelection::modify):
104
105 2011-12-07  Jonathan Backer  <backer@chromium.org>
106
107         [chromium] Plumb damage from WebExternalTextureLayer and WebPluginContainer to CCDamageTracker
108         https://bugs.webkit.org/show_bug.cgi?id=73485
109
110         Reviewed by Darin Fisher.
111
112         * platform/graphics/chromium/PluginLayerChromium.cpp:
113         (WebCore::PluginLayerChromium::updateCompositorResources):
114         (WebCore::PluginLayerChromium::invalidateRect):
115         * platform/graphics/chromium/PluginLayerChromium.h:
116
117 2011-12-07  Mary Wu  <mary.wu@torchmobile.com.cn>
118
119         Upstream 5 files into WebCore/platform/blackberry
120         https://bugs.webkit.org/show_bug.cgi?id=73632
121
122         Reviewed by Rob Buis.
123
124         Initial upstream, no new tests.
125
126         * PlatformBlackBerry.cmake: Remove two empty files from build list.
127         * platform/blackberry/PopupMenuBlackBerry.cpp: Added.
128         (WebCore::PopupMenuBlackBerry::PopupMenuBlackBerry):
129         (WebCore::PopupMenuBlackBerry::~PopupMenuBlackBerry):
130         (WebCore::PopupMenuBlackBerry::show):
131         (WebCore::PopupMenuBlackBerry::hide):
132         (WebCore::PopupMenuBlackBerry::updateFromElement):
133         (WebCore::PopupMenuBlackBerry::disconnectClient):
134         * platform/blackberry/PopupMenuBlackBerry.h: Added.
135         (WebCore::PopupMenuBlackBerry::client):
136         * platform/blackberry/ScrollbarThemeBlackBerry.cpp: Added.
137         (WebCore::ScrollbarTheme::nativeTheme):
138         * platform/blackberry/SearchPopupMenuBlackBerry.cpp: Added.
139         (WebCore::SearchPopupMenuBlackBerry::SearchPopupMenuBlackBerry):
140         (WebCore::SearchPopupMenuBlackBerry::popupMenu):
141         (WebCore::SearchPopupMenuBlackBerry::enabled):
142         (WebCore::SearchPopupMenuBlackBerry::saveRecentSearches):
143         (WebCore::SearchPopupMenuBlackBerry::loadRecentSearches):
144         * platform/blackberry/SearchPopupMenuBlackBerry.h: Added.
145
146 2011-12-07  Dan Bernstein  <mitz@apple.com>
147
148         Fixed the definition of BUTTON_CELL_DRAW_WITH_FRAME_DRAWS_FOCUS_RING from r102246.
149
150         * platform/mac/ThemeMac.mm: Added parentheses.
151
152 2011-12-07  Dan Bernstein  <mitz@apple.com>
153
154         <rdar://problem/10542095> Focus rings are not drawn around push buttons, radio buttons and checkboxes
155
156         Reviewed by Darin Adler.
157
158         Instead of relying on -setShowsFirstResponder: to make -drawWithFrame:inView: draw the focus
159         ring, use -drawFocusRingMaskWithFrame:inView:.
160
161         * platform/mac/ThemeMac.mm:
162         (-[NSCell _web_drawFocusRingWithFrame:inView:]): Added. Sets up the focus ring style and a
163         transparency layer, then uses -drawFocusRingMaskWithFrame:inView: to draw the focus ring.
164         (WebCore::updateStates): Eliminated calls to get and set showsFirstResponder.
165         (WebCore::paintCheckbox): Changed to use -_web_drawFocusRingWithFrame:inView:.
166         (WebCore::paintRadio): Ditto.
167         (WebCore::paintButton): Ditto.
168
169 2011-12-07  Brian Salomon  <bsalomon@google.com>
170
171         [CHROMIUM/SKIA] Handle put[Un/Pre]multipliedImageData conversions in Skia rather than ImageBuffer
172         https://bugs.webkit.org/show_bug.cgi?id=73953
173
174         Reviewed by Stephen White.
175
176         Tested by existing canvas2d layout tests.
177
178         * platform/graphics/skia/ImageBufferSkia.cpp:
179         (WebCore::putImageData):
180         (WebCore::ImageBuffer::putUnmultipliedImageData):
181         (WebCore::ImageBuffer::putPremultipliedImageData):
182
183 2011-12-07  Andreas Kling  <kling@webkit.org>
184
185         Micro-optimize ScrollView::visibleContentRect().
186         <http://webkit.org/b/74001>
187
188         Reviewed by Anders Carlsson.
189
190         Reorder the scrollbar exclusion code to minimize the number of virtual calls
191         to ScrollableArea::verticalScrollbar(), ScrollableArea::horizontalScrollbar()
192         and Scrollbar::isOverlayScrollbar().
193
194         * platform/ScrollView.cpp:
195         (WebCore::ScrollView::visibleContentRect):
196
197 2011-12-07  Andreas Kling  <kling@webkit.org>
198
199         ApplyPropertyBorderImage: Remove unneeded template argument for mapNinePieceImage().
200         <http://webkit.org/b/73998>
201
202         Reviewed by Antti Koivisto.
203
204         Have ApplyPropertyBorderImage call mapNinePieceImage() directly now that it's
205         public (instead of passing it as a template argument.)
206
207         * css/CSSStyleApplyProperty.cpp:
208         (WebCore::ApplyPropertyBorderImage::applyValue):
209         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
210
211 2011-12-07  Jessie Berlin  <jberlin@apple.com>
212
213         Mac build fix after r102235.
214
215         * WebCore.exp.in:
216
217 2011-11-30  Simon Hausmann  <simon.hausmann@nokia.com>
218
219         [Qt] V8 debug build fixes.
220
221         Reviewed by Tor Arne Vestbø.
222
223         * Target.pri: Add missing files to the build.
224         * loader/SubresourceLoader.cpp: Add missing CString.h header file inclusion,
225         that is implicitly included with Chromium builds and only needed in ASSERTS
226         in debug builds.
227         * loader/cache/CachedResource.cpp: Ditto.
228         * page/FrameTree.cpp: Ditto.
229         * platform/graphics/MediaPlayer.cpp: Ditto.
230
231 2011-11-30  Simon Hausmann  <simon.hausmann@nokia.com>
232
233         [Qt] V8 build fixes.
234
235         Reviewed by Tor Arne Vestbø.
236
237         * Target.pri: Don't load(javascriptcore) if we're building with v8.
238
239 2011-12-07  Mary Wu  <mary.wu@torchmobile.com.cn>
240
241         Change function name InitializeLoggingChannelsIfNecessary to follow coding style guideline
242         https://bugs.webkit.org/show_bug.cgi?id=73986
243
244         Reviewed by Kenneth Rohde Christiansen.
245
246         Just function name change, no new tests.
247
248         * platform/Logging.h:
249         * platform/efl/LoggingEfl.cpp:
250         (WebCore::initializeLoggingChannelsIfNecessary):
251         * platform/gtk/LoggingGtk.cpp:
252         (WebCore::initializeLoggingChannelsIfNecessary):
253         * platform/mac/LoggingMac.mm:
254         (WebCore::initializeLoggingChannelsIfNecessary):
255         * platform/qt/LoggingQt.cpp:
256         (WebCore::initializeLoggingChannelsIfNecessary):
257         * platform/win/LoggingWin.cpp:
258         (WebCore::initializeLoggingChannelsIfNecessary):
259         * platform/wx/LoggingWx.cpp:
260         (WebCore::initializeLoggingChannelsIfNecessary):
261
262 2011-12-07  Mihnea Ovidenie  <mihnea@adobe.com>
263
264         [CSSRegions]Add support for background-color in region styling
265         https://bugs.webkit.org/show_bug.cgi?id=71488
266
267         Reviewed by David Hyatt.
268
269         Tests: fast/regions/region-style-block-background-color.html
270                fast/regions/region-style-block-background-color2.html
271                fast/regions/region-style-image-background-color.html
272                fast/regions/region-style-inline-background-color.html
273
274         * WebCore.exp.in:
275         * css/CSSStyleSelector.cpp:
276         (WebCore::RuleData::regionStyleRule):
277         (WebCore::CSSStyleSelector::CSSStyleSelector):
278         (WebCore::CSSStyleSelector::addMatchedDeclaration):
279         (WebCore::CSSStyleSelector::matchRules):
280         (WebCore::CSSStyleSelector::matchAllRules):
281         (WebCore::CSSStyleSelector::initForRegionStyling):
282         (WebCore::CSSStyleSelector::styleForElement):
283         (WebCore::CSSStyleSelector::pseudoStyleForElement):
284         (WebCore::RuleData::RuleData):
285         (WebCore::RuleSet::RuleSet):
286         (WebCore::RuleSet::addToRuleSet):
287         (WebCore::CSSStyleSelector::applyDeclarations):
288         (WebCore::isValidRegionStyleProperty):
289         (WebCore::CSSStyleSelector::applyProperty):
290         * css/CSSStyleSelector.h:
291         (WebCore::CSSStyleSelector::setRegionForStyling):
292         (WebCore::CSSStyleSelector::regionForStyling):
293         (WebCore::CSSStyleSelector::applyPropertyToRegionStyle):
294         * rendering/RenderFlowThread.cpp:
295         (WebCore::RenderFlowThread::clearRenderRegionRangeMap):
296         (WebCore::RenderFlowThread::~RenderFlowThread):
297         (WebCore::RenderFlowThread::layout):
298         (WebCore::RenderFlowThread::clearRenderObjectCustomStyle):
299         (WebCore::RenderFlowThread::setRegionRangeForBox):
300         * rendering/RenderFlowThread.h:
301         * rendering/RenderLayer.cpp:
302         (WebCore::CurrentRenderRegionMaintainer::CurrentRenderRegionMaintainer):
303         (WebCore::CurrentRenderRegionMaintainer::~CurrentRenderRegionMaintainer):
304         (WebCore::RenderLayer::paint):
305         (WebCore::RenderLayer::hitTest):
306         * rendering/RenderObject.cpp:
307         (WebCore::RenderObject::style):
308         * rendering/RenderObject.h:
309         (WebCore::RenderObject::canHaveRegionStyle):
310         * rendering/RenderObjectChildList.cpp:
311         (WebCore::RenderObjectChildList::removeChildNode):
312         * rendering/RenderRegion.cpp:
313         (WebCore::RenderRegion::layout):
314         (WebCore::RenderRegion::renderObjectRegionStyle):
315         (WebCore::RenderRegion::computeStyleInRegion):
316         (WebCore::RenderRegion::clearObjectStyleInRegion):
317         * rendering/RenderRegion.h:
318         * rendering/RenderView.cpp:
319         (WebCore::RenderView::RenderView):
320         * rendering/RenderView.h:
321         (WebCore::RenderView::currentRenderRegion):
322         (WebCore::RenderView::setCurrentRenderRegion):
323
324 2011-12-01  Vsevolod Vlasov  <vsevik@chromium.org>
325
326         Web Inspector: Extract default call stack creation and check for front-end from console.
327         https://bugs.webkit.org/show_bug.cgi?id=73566
328
329         Reviewed by Yury Semikhatsky.
330
331         * bindings/js/ScriptCallStackFactory.cpp:
332         (WebCore::createScriptCallStack):
333         * bindings/js/ScriptCallStackFactory.h:
334         * bindings/scripts/CodeGeneratorJS.pm:
335         (GenerateParametersCheck):
336         * bindings/scripts/CodeGeneratorV8.pm:
337         (GenerateFunctionCallback):
338         * bindings/scripts/test/JS/JSTestObj.cpp:
339         (WebCore::jsTestObjPrototypeFunctionCustomArgsAndException):
340         * bindings/scripts/test/V8/V8TestObj.cpp:
341         (WebCore::TestObjInternal::customArgsAndExceptionCallback):
342         * bindings/v8/ScriptCallStackFactory.cpp:
343         (WebCore::createScriptCallStack):
344         * bindings/v8/ScriptCallStackFactory.h:
345         * inspector/InspectorInstrumentation.cpp:
346         (WebCore::InspectorInstrumentation::hasFrontendForScriptContext):
347         * inspector/InspectorInstrumentation.h:
348         (WebCore::InspectorInstrumentation::hasFrontendForScriptContext):
349         * inspector/WorkerInspectorController.h:
350         (WebCore::WorkerInspectorController::hasFrontend):
351         * page/Console.cpp:
352         * page/Console.h:
353
354 2011-12-07  Shinya Kawanaka  <shinyak@google.com>
355
356         Internals should have a method to reutrn the max sequence number of spellcheck reqeust.
357         https://bugs.webkit.org/show_bug.cgi?id=73511
358
359         Reviewed by Hajime Morita.
360
361         Internal state of SpellChecker should be able to be exposed for testing SpellChecker.
362         This patch will enable us to know asynchronous spellcheck has finished or not.
363
364         Test: editing/spelling/spellcheck-sequencenum.html
365
366         * editing/SpellChecker.cpp:
367         (WebCore::SpellChecker::SpellChecker):
368         (WebCore::SpellChecker::createRequest):
369         (WebCore::SpellChecker::didCheck):
370         * editing/SpellChecker.h:
371         (WebCore::SpellChecker::lastRequestSequence):
372           Interface to take SpellCheck sequence numbers.
373         (WebCore::SpellChecker::lastProcessedSequence): ditto.
374         * testing/Internals.cpp:
375         (WebCore::spellchecker):
376         (WebCore::Internals::lastSpellCheckRequestSequence):
377         (WebCore::Internals::lastSpellCheckProcessedSequence):
378         * testing/Internals.h:
379         * testing/Internals.idl:
380
381 2011-12-07  Ryosuke Niwa  <rniwa@webkit.org>
382
383         TypingCommand duplicates code to obtain the last typing command
384         https://bugs.webkit.org/show_bug.cgi?id=73984
385
386         Reviewed by Kent Tamura.
387
388         Extracted lastTypingCommandIfStillOpenForTyping out of isOpenForMoreTypingCommand
389         and a bunch of TypingCommand static member functions.
390
391         Also made more member functions of TypingCommand private.
392
393         * editing/Editor.cpp:
394         (WebCore::Editor::setComposition):
395         * editing/FrameSelection.cpp:
396         (WebCore::FrameSelection::setSelection):
397         * editing/TypingCommand.cpp:
398         (WebCore::TypingCommand::deleteSelection):
399         (WebCore::TypingCommand::deleteKeyPressed):
400         (WebCore::TypingCommand::forwardDeleteKeyPressed):
401         (WebCore::TypingCommand::insertText):
402         (WebCore::TypingCommand::insertLineBreak):
403         (WebCore::TypingCommand::insertParagraphSeparatorInQuotedContent):
404         (WebCore::TypingCommand::insertParagraphSeparator):
405         (WebCore::TypingCommand::lastTypingCommandIfStillOpenForTyping):
406         (WebCore::TypingCommand::closeTyping):
407         * editing/TypingCommand.h:
408         (WebCore::TypingCommand::isOpenForMoreTyping):
409         (WebCore::TypingCommand::closeTyping):
410
411 2011-12-06  Mary Wu  <mary.wu@torchmobile.com.cn>
412
413         upstream BlackBerry porting of KURL/Logging
414         https://bugs.webkit.org/show_bug.cgi?id=73524
415
416         Reviewed by Antonio Gomes.
417
418         * platform/blackberry/KURLBlackBerry.cpp: Added.
419         (WebCore::KURL::fileSystemPath):
420         * platform/blackberry/LoggingBlackBerry.cpp: Added.
421         (WebCore::initializeWithUserDefault):
422         (WebCore::InitializeLoggingChannelsIfNecessary):
423
424 2011-12-06  Leo Yang  <leo.yang@torchmobile.com.cn>
425
426         [BlackBerry] Remove redundant files in PlatformBlackBerry.cmake
427         https://bugs.webkit.org/show_bug.cgi?id=73976
428
429         Reviewed by Antonio Gomes.
430
431         The listing of the following files in PlatformBlackBerry.cmake are redundant. They should be removed.
432         platform/network/blackberry/MultipartResponseDelegate.cpp
433         platform/network/blackberry/NetworkManager.cpp
434         platform/network/blackberry/NetworkStateNotifierBlackBerry.cpp
435         platform/network/blackberry/ResourceErrorBlackBerry.cpp
436         platform/network/blackberry/ResourceRequestBlackBerry.cpp
437
438         * PlatformBlackBerry.cmake:
439
440 2011-12-06  Shinya Kawanaka  <shinyak@google.com>
441
442         Refactoring: Editor::markAllMisspellingsAndBadGrammarInRanges should be refactored.
443         https://bugs.webkit.org/show_bug.cgi?id=73628
444
445         Reviewed by Hajime Morita.
446
447         Extracted a code for adding markers and replacing misspelled words from WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges.
448
449         No new tests. covered by existing tests.
450
451         * editing/Editor.cpp:
452         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
453           Extracted a code for adding markers and replacing missplled words, and moved to markAndReplaceFor.
454         (WebCore::Editor::markAndReplaceFor):
455         * editing/Editor.h:
456
457 2011-12-06  Julien Chaffraix  <jchaffraix@webkit.org>
458
459         Avoid calling calculateRects in RenderLayer::paintLayer when the rectangles are not needed
460         https://bugs.webkit.org/show_bug.cgi?id=73754
461
462         Reviewed by Simon Fraser.
463
464         Performance change, no change in behavior.
465
466         RenderLayer::paintLayer can easily be called a million time when scrolling on a big table with
467         td { overflow: hidden; }. We would spend a lot of time recomputing the rectangles that we never
468         unused for painting as our layer was not self-painting (clipping layer only) and we did not paint
469         some overlay scrollbars.
470
471         * rendering/RenderLayer.cpp:
472         (WebCore::RenderLayer::paintLayer):
473         Simplified and moved the shouldPaint logic earlier in the function. Now the branches
474         are checking the same boolean which makes the logic more obvious. A consequence of
475         filling shouldPaint earlier is that we call |calculateRects| only if there is a chance
476         the rectangles will used. Also cached the result of isSelfPaintingLayer() in a local
477         variable (isSelfPaintingLayer() is fairly expensive due to several virtual calls).
478
479         * rendering/RenderLayerBacking.cpp:
480         (WebCore::RenderLayerBacking::paintIntoLayer):
481         For coherency, applied the same optimizations here too: added an early return instead
482         of conditionaly call |calculateRects| as we don't have to restore any clip.
483
484 2011-12-06  Benjamin Poulain  <benjamin@webkit.org>
485
486         Simplify KURL's checkEncodedString()
487         https://bugs.webkit.org/show_bug.cgi?id=73890
488
489         Reviewed by Andreas Kling.
490
491         The Macro UNUSED_PARAM is not supposed to be used for this case,
492         use ASSERT_UNUSED instead.
493
494         * platform/KURL.cpp:
495         (WebCore::checkEncodedString):
496
497 2011-12-06  Ryosuke Niwa  <rniwa@webkit.org>
498
499         The code to create a NodeListsNodeData is duplicated everywhere
500         https://bugs.webkit.org/show_bug.cgi?id=73961
501
502         Reviewed by Darin Adler.
503
504         Extracted the logic to create NodeListsNodeData as NodeRareData::ensureNodeLists.
505
506         * dom/Document.cpp:
507         (WebCore::Document::getItems):
508         * dom/Node.cpp:
509         (WebCore::Node::childNodes):
510         (WebCore::Node::registerDynamicNodeList):
511         (WebCore::Node::getElementsByTagName):
512         (WebCore::Node::getElementsByTagNameNS):
513         (WebCore::Node::getElementsByName):
514         (WebCore::Node::getElementsByClassName):
515         * dom/NodeRareData.h:
516         (WebCore::NodeRareData::ensureNodeLists):
517         * html/HTMLFormControlElement.cpp:
518         (WebCore::HTMLFormControlElement::labels):
519
520 2011-12-06  Leo Yang  <leo.yang@torchmobile.com.cn>
521
522         Upstream about: feature in WebKit/blackberry/WebCoreSupport/
523         https://bugs.webkit.org/show_bug.cgi?id=73612
524
525         Reviewed by Antonio Gomes.
526
527         * PlatformBlackBerry.cmake: Move platform/network/blackberry/AboutData.{h, cpp}
528                                     to WebKit/blackberry/WebCoreSupport
529
530 2011-12-06  Benjamin Poulain  <bpoulain@apple.com>
531
532         WebKit Mac does not build without CONTEXT MENU
533         https://bugs.webkit.org/show_bug.cgi?id=73962
534
535         Reviewed by Pavel Feldman.
536
537         In the patch r100903, the symbols were exported under ENABLE(CONTEXT_MENUS)
538         because the feature is triggered from the menus.
539
540         The implementation has no dependency on the context menu but is necessary to build
541         when the inspector is enabled.
542         This patch moves the exported symbols from ENABLE(CONTEXT_MENUS) to ENABLE(INSPECTOR).
543
544         * WebCore.exp.in:
545
546 2011-12-06  Adrienne Walker  <enne@google.com>
547
548         [chromium] setNeedsCommit on non-composited host layers should trigger commit
549         https://bugs.webkit.org/show_bug.cgi?id=73711
550
551         Reviewed by James Robinson.
552
553         Pipe non-composited content host syncs to setNeedsCommit.
554
555         Since now the NonCompositedContentHost generates setNeedsCommit, don't
556         call it unnecessarily, e.g. calling setBackgroundColor to the same
557         color each frame should not retrigger more commits.
558
559         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
560         (WebCore::GraphicsLayerChromium::setAnchorPoint):
561         (WebCore::GraphicsLayerChromium::setTransform):
562         (WebCore::GraphicsLayerChromium::setChildrenTransform):
563         (WebCore::GraphicsLayerChromium::setMasksToBounds):
564         (WebCore::GraphicsLayerChromium::setBackgroundColor):
565         (WebCore::GraphicsLayerChromium::clearBackgroundColor):
566         (WebCore::GraphicsLayerChromium::setContentsOpaque):
567         (WebCore::GraphicsLayerChromium::setBackfaceVisibility):
568         (WebCore::GraphicsLayerChromium::setOpacity):
569         * platform/graphics/chromium/LayerChromium.cpp:
570         (WebCore::LayerChromium::setNeedsCommit):
571         (WebCore::LayerChromium::setAnchorPoint):
572         (WebCore::LayerChromium::setAnchorPointZ):
573         (WebCore::LayerChromium::setBackgroundColor):
574         (WebCore::LayerChromium::setMasksToBounds):
575         (WebCore::LayerChromium::setMaskLayer):
576         (WebCore::LayerChromium::setOpacity):
577         (WebCore::LayerChromium::setOpaque):
578         (WebCore::LayerChromium::setPosition):
579         (WebCore::LayerChromium::setSublayerTransform):
580         (WebCore::LayerChromium::setTransform):
581         (WebCore::LayerChromium::setScrollPosition):
582         (WebCore::LayerChromium::setScrollable):
583         (WebCore::LayerChromium::setDoubleSided):
584         * platform/graphics/chromium/LayerChromium.h:
585         (WebCore::LayerChromium::setReplicaLayer):
586         * platform/graphics/chromium/NonCompositedContentHost.cpp:
587         (WebCore::NonCompositedContentHost::notifySyncRequired):
588         * platform/graphics/chromium/NonCompositedContentHost.h:
589
590 2011-12-06  Kenichi Ishibashi  <bashi@chromium.org>
591
592         [Chromium] unknown characters symbol on \n in complex script text (RTL and LTR)
593         https://bugs.webkit.org/show_bug.cgi?id=73806
594
595         Reviewed by Tony Chang.
596
597         Sets fMergeNeutralItems to 1 instead of merging script items based on their tags.
598
599         Tests: platform/chromium/fast/text/international/chromium-complex-text-non-printable-expected.html
600                platform/chromium/fast/text/international/chromium-complex-text-non-printable.html
601
602         * platform/graphics/chromium/UniscribeHelper.cpp:
603         (WebCore::UniscribeHelper::fillRuns): Removed a block which merges script items.
604
605 2011-12-06  Luke Macpherson   <macpherson@chromium.org>
606
607         Implement remaining border-image and webkit-maskbox-image properties in CSSStyleApplyProperty.
608         https://bugs.webkit.org/show_bug.cgi?id=73391
609
610         Reviewed by Hajime Morita.
611
612         No new tests / refacoring only.
613
614         * css/CSSStyleApplyProperty.cpp:
615         (WebCore::ApplyPropertyBorderImageModifier::getValue):
616         (WebCore::ApplyPropertyBorderImageModifier::setValue):
617         (WebCore::ApplyPropertyBorderImageModifier::applyInheritValue):
618         (WebCore::ApplyPropertyBorderImageModifier::applyInitialValue):
619         (WebCore::ApplyPropertyBorderImageModifier::applyValue):
620         (WebCore::ApplyPropertyBorderImageModifier::createHandler):
621         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
622         * css/CSSStyleSelector.cpp:
623         (WebCore::CSSStyleSelector::applyProperty):
624         * css/CSSStyleSelector.h:
625
626 2011-12-06  Pavel Feldman  <pfeldman@google.com>
627
628         Web Inspector: introduce a memory agent stub.
629         https://bugs.webkit.org/show_bug.cgi?id=73930
630
631         Reviewed by Timothy Hatcher.
632
633         We'd like to experiment with the memory stats and hence need a
634         nice home for that. Adding this undocumented agent / domain for now.
635
636         * CMakeLists.txt:
637         * GNUmakefile.list.am:
638         * Target.pri:
639         * WebCore.gypi:
640         * WebCore.vcproj/WebCore.vcproj:
641         * WebCore.xcodeproj/project.pbxproj:
642         * bindings/js/ScriptProfiler.h:
643         (WebCore::ScriptProfiler::nodeCount):
644         * bindings/v8/ScriptProfiler.cpp:
645         (WebCore::ScriptProfiler::nodeCount):
646         * bindings/v8/ScriptProfiler.h:
647         * inspector/Inspector.json:
648         * inspector/InspectorController.cpp:
649         (WebCore::InspectorController::InspectorController):
650         * inspector/InspectorMemoryAgent.cpp: Added.
651         (WebCore::InspectorMemoryAgent::~InspectorMemoryAgent):
652         (WebCore::InspectorMemoryAgent::getNodeCounter):
653         (WebCore::InspectorMemoryAgent::InspectorMemoryAgent):
654         * inspector/InspectorMemoryAgent.h: Added.
655         (WebCore::InspectorMemoryAgent::create):
656
657 2011-12-06  Julien Chaffraix  <jchaffraix@webkit.org>
658
659         Unreviewed build fix after 102183.
660
661         * rendering/style/RenderStyle.h:
662         (WebCore::InheritedFlags::initialGridTrackValue):
663         Use DEFINE_STATIC_LOCAL to avoid having an exit-time destructor.
664
665 2011-12-06  Julien Chaffraix  <jchaffraix@webkit.org>
666
667         Inline RenderObject::view()
668         https://bugs.webkit.org/show_bug.cgi?id=73733
669
670         Reviewed by Darin Adler.
671
672         Micro-performance optimization, no change in behavior.
673
674         RenderObject::view() is super hot and is taking ~4-5% of the time in some
675         benchmarks as it is called several hundred thousands times. For some reason,
676         the compiler did not inline it even though it is very simple in release builds.
677
678         * WebCore.exp.in: Removed RenderObject::view() as it is inlined now.
679
680         * rendering/RenderObject.cpp: Moved the implementation from here ...
681         * rendering/RenderView.h:
682         (WebCore::RenderObject::view): ... to here to avoid a cyclic
683         dependency between RenderObject and RenderView. Also marked the
684         function as ALWAYS_INLINE.
685
686         * rendering/RenderObject.h:
687         * rendering/svg/RenderSVGResourceContainer.cpp:
688         Added #include "RenderView.h" as the code checks for view() during repaint.
689
690 2011-12-06  Julien Chaffraix  <jchaffraix@webkit.org>
691
692         CSS Grid Layout: Add support for parsing multiple grid-columns or grid-rows
693         https://bugs.webkit.org/show_bug.cgi?id=73272
694
695         Reviewed by Tony Chang.
696
697         Test: fast/css-grid-layout/grid-columns-rows-get-set-multiple.html
698
699         Updated our supported syntax to match the following:
700         <track-list> := [ <track-breadth> ]+ | 'none'
701         <track-breadth> := <length> | <percentage> | 'auto'
702         (the naming loosely matches the specification)
703
704         * css/CSSComputedStyleDeclaration.cpp:
705         (WebCore::valueForGridTrackBreadth): Added function to handle a breadth
706         (extended with 'auto' that the spec puts in <track-minmax>).
707
708         (WebCore::valueForGridTrackList): Create a space seperated list of
709         track breadth or none.
710
711         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Updated
712         to use the new functions.
713
714         * css/CSSParser.cpp:
715         (WebCore::CSSParser::parseGridTrackList): Extended the function to
716         match the new syntax.
717
718         * css/CSSStyleApplyProperty.cpp:
719         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): Removed our
720         simple implementation. Replaced by the CSSStyleSelector functions.
721
722         * css/CSSStyleSelector.cpp:
723         (WebCore::createGridTrackBreadth):
724         (WebCore::createGridTrackList):
725         Added those 2 functions to convert the CSSPrimitiveValue to a Vector
726         as expected by RenderStyle.
727
728         (WebCore::CSSStyleSelector::applyProperty): Added our 2 properties
729         now that it is not handled by CSSStyleApplyProperty.
730
731         * rendering/style/RenderStyle.h:
732         (WebCore::InheritedFlags::gridColumns):
733         (WebCore::InheritedFlags::gridRows):
734         (WebCore::InheritedFlags::setGridColumns):
735         (WebCore::InheritedFlags::setGridRows):
736         (WebCore::InheritedFlags::initialGridColumns):
737         (WebCore::InheritedFlags::initialGridRows):
738         Updated the previous methods to take a Vector of Length.
739
740         (WebCore::InheritedFlags::initialGridTrackValue):
741         Needed function to return a Vector with one 'none' Length (the initial
742         value per the specification).
743
744         * rendering/style/StyleGridData.h: Updated to use a Vector.
745
746 2011-12-06  David Reveman  <reveman@chromium.org>
747
748         [Chromium] Implement tile-sized painting using SkPicture.
749         https://bugs.webkit.org/show_bug.cgi?id=71869
750
751         Reviewed by James Robinson.
752
753         Add texture uploader that paints tile-sized chunks using SkPicture
754         recording and playback. Expose setting which allows this texture
755         updater to be enabled.
756
757         No new tests. Covered by existing tests.
758
759         * WebCore.gypi:
760         * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp: Added.
761         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::Texture::Texture):
762         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::Texture::prepareRect):
763         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::Texture::updateRect):
764         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::create):
765         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::BitmapSkPictureCanvasLayerTextureUpdater):
766         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::~BitmapSkPictureCanvasLayerTextureUpdater):
767         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::createTexture):
768         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::sampledTexelFormat):
769         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::prepareToUpdate):
770         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::paintContentsRect):
771         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::updateTextureRect):
772         * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h: Added.
773         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::Texture::textureUpdater):
774         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::orientation):
775         * platform/graphics/chromium/ContentLayerChromium.cpp:
776         (WebCore::ContentLayerChromium::createTextureUpdater):
777         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
778         (WebCore::CCSettings::CCSettings):
779
780 2011-12-06  Adrienne Walker  <enne@google.com>
781
782         [chromium] Don't crash if tile upload happens without painting first
783         https://bugs.webkit.org/show_bug.cgi?id=73939
784
785         Reviewed by James Robinson.
786
787         Remove at least one place (in ImageLayerChromium) where this could
788         happen.
789
790         Although this shouldn't happen, we should be robust to it in the
791         chance that other code causes it to.
792
793         * platform/graphics/chromium/ImageLayerChromium.cpp:
794         (WebCore::ImageLayerChromium::paintContentsIfDirty):
795         * platform/graphics/chromium/TiledLayerChromium.cpp:
796         (WebCore::TiledLayerChromium::updateCompositorResources):
797
798 2011-12-06  Ruben  <chromium@hybridsource.org>
799
800         Enable web audio by default on non-Mac POSIX platforms
801         https://bugs.webkit.org/show_bug.cgi?id=73491
802
803         Reviewed by Tony Chang.
804
805         No new tests, just changing gyp includes.
806
807         * WebCore.gyp/WebCore.gyp:
808
809 2011-12-06  Benjamin Poulain  <benjamin@webkit.org>
810
811         Put length in its own variable in KURL copyASCII
812         https://bugs.webkit.org/show_bug.cgi?id=73928
813
814         Reviewed by Darin Adler.
815
816         * platform/KURL.cpp:
817         (WebCore::copyASCII):
818
819 2011-12-06  Dana Jansens  <danakj@chromium.org>
820
821         [chromium] Set opaque flag for ImageLayerChromium
822         https://bugs.webkit.org/show_bug.cgi?id=72964
823
824         Reviewed by James Robinson.
825
826         Unit test in tests/ImageLayerChromiumTest.cpp.
827
828         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
829         (WebCore::GraphicsLayerChromium::setContentsToImage):
830         * platform/graphics/chromium/GraphicsLayerChromium.h:
831         (WebCore::GraphicsLayerChromium::contentsLayer):
832         * platform/graphics/chromium/ImageLayerChromium.cpp:
833         (WebCore::ImageLayerChromium::setContents):
834
835 2011-12-06  Alexandre Elias  <aelias@google.com>
836
837         [chromium] Apply sent deltas on finishCommit
838         https://bugs.webkit.org/show_bug.cgi?id=73884
839
840         Reviewed by James Robinson.
841
842         This moves scroll and pageScale "sent" deltas to be applied to
843         the layer at the end of the commit, instead of the beginning.
844
845         This has several advantages, especially for page scale:
846         - When pageScale changes, no longer any need to change the scroll's
847         coordinate space at beginning of commit, which is complex and prone to
848         bugs (this fixes a problem where we were forgetting to modify the
849         scrollPosition before).
850         - No need for non-commit-related code to consider the "sent" values.
851         m_pageScale is now always the content scale factor, and
852         m_pageScaleDelta is the scale to be on the impl-side matrix.
853         - This will make it easy to send arbitrary fake or future delta
854         values for example while pinch zooming out.
855
856         The scroll logic is similarly altered for consistency's sake.  Note that
857         I also moved the tree synchronize to the beginning of finishCommit
858         in order to avoid having to change the pageScale coordinate space of
859         sentScrollDelta in adjustScrollsForPageScaleChange().
860
861         No new tests. (Refactoring of existing code.)
862
863         * platform/graphics/chromium/LayerChromium.cpp:
864         (WebCore::LayerChromium::pushPropertiesTo):
865         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
866         (WebCore::CCLayerTreeHost::finishCommitOnImplThread):
867         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
868         (WebCore::CCLayerTreeHostImpl::setPageScaleFactorAndLimits):
869         (WebCore::CCLayerTreeHostImpl::applyPageScaleDeltaToScrollLayer):
870         (WebCore::CCLayerTreeHostImpl::processScrollDeltas):
871
872 2011-12-06  Gavin Barraclough  <barraclough@apple.com>
873
874         https://bugs.webkit.org/show_bug.cgi?id=68328
875         The generator and intrinsic fields in HashTableValue/HashEntry and associated structures and methods are redundant
876
877         Reviewed by Geoff Garen.
878
879         Intrinsic is no longer in the DFG namespace, is always in the
880         hash table. Removed ThunkGenerator.
881
882         * bindings/scripts/CodeGeneratorJS.pm:
883         (GenerateHashTable):
884
885 2011-12-06  Dimitri Glazkov  <dglazkov@chromium.org>
886
887         Unreviewed, rolling out r102091.
888         http://trac.webkit.org/changeset/102091
889         https://bugs.webkit.org/show_bug.cgi?id=73711
890
891         Caused Clang Linux compile failure.
892
893         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
894         (WebCore::GraphicsLayerChromium::setAnchorPoint):
895         (WebCore::GraphicsLayerChromium::setTransform):
896         (WebCore::GraphicsLayerChromium::setChildrenTransform):
897         (WebCore::GraphicsLayerChromium::setMasksToBounds):
898         (WebCore::GraphicsLayerChromium::setBackgroundColor):
899         (WebCore::GraphicsLayerChromium::clearBackgroundColor):
900         (WebCore::GraphicsLayerChromium::setContentsOpaque):
901         (WebCore::GraphicsLayerChromium::setBackfaceVisibility):
902         (WebCore::GraphicsLayerChromium::setOpacity):
903         * platform/graphics/chromium/LayerChromium.cpp:
904         (WebCore::LayerChromium::setNeedsCommit):
905         * platform/graphics/chromium/LayerChromium.h:
906         (WebCore::LayerChromium::setAnchorPoint):
907         (WebCore::LayerChromium::setAnchorPointZ):
908         (WebCore::LayerChromium::setBackgroundColor):
909         (WebCore::LayerChromium::setMasksToBounds):
910         (WebCore::LayerChromium::setMaskLayer):
911         (WebCore::LayerChromium::setOpacity):
912         (WebCore::LayerChromium::setOpaque):
913         (WebCore::LayerChromium::setPosition):
914         (WebCore::LayerChromium::setSublayerTransform):
915         (WebCore::LayerChromium::setTransform):
916         (WebCore::LayerChromium::setScrollPosition):
917         (WebCore::LayerChromium::setScrollable):
918         (WebCore::LayerChromium::setDoubleSided):
919         (WebCore::LayerChromium::setReplicaLayer):
920         * platform/graphics/chromium/NonCompositedContentHost.cpp:
921         (WebCore::NonCompositedContentHost::notifySyncRequired):
922         * platform/graphics/chromium/NonCompositedContentHost.h:
923
924 2011-12-06  Dana Jansens  <danakj@chromium.org>
925
926         [Chromium] Make root layer always opaque
927         https://bugs.webkit.org/show_bug.cgi?id=70564
928
929         Reviewed by James Robinson.
930
931         * platform/graphics/chromium/NonCompositedContentHost.cpp:
932         (WebCore::NonCompositedContentHost::NonCompositedContentHost):
933         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
934         (WebCore::CCTiledLayerImpl::draw):
935
936 2011-12-06  Noel Gordon  <noel.gordon@gmail.com>
937
938         WebPImageDecoder computes image width and height multiple times
939         https://bugs.webkit.org/show_bug.cgi?id=73796
940
941         Reviewed by Adam Barth.
942
943         Once sufficient image data arrives, we can compute the decoded image height
944         and width from the WEBP image header data.
945
946         From then on, the decoded image size is known so there's no need to re-read
947         it from the WEBP image header again.
948
949         No change in behavior, so no new tests.
950
951         * platform/image-decoders/webp/WEBPImageDecoder.cpp:
952         (WebCore::WEBPImageDecoder::decode):
953
954 2011-12-06  Mike Reed  <reed@google.com>
955
956         optimize TransformationMatrix::scale by not calling through to generic multiply
957         https://bugs.webkit.org/show_bug.cgi?id=73830
958
959         Reviewed by Kenneth Russell.
960
961         No new tests. Optimization only, existing tests exercise the code
962
963         * platform/graphics/transforms/TransformationMatrix.cpp:
964         (WebCore::TransformationMatrix::scaleNonUniform):
965         (WebCore::TransformationMatrix::scale3d):
966
967 2011-12-06  Eric Carlson  <eric.carlson@apple.com>
968
969         Revert WebCore track Settings changes made in r101977
970         https://bugs.webkit.org/show_bug.cgi?id=73879
971
972         Reviewed by Sam Weinig.
973
974         No new tests yet, still nothing to test.
975
976         * page/Settings.cpp: Move the preference setters back into the .h file.
977         * page/Settings.h:
978         (WebCore::Settings::setShouldDisplaySubtitles):
979         (WebCore::Settings::setShouldDisplayCaptions):
980         (WebCore::Settings::setShouldDisplayTextDescriptions):
981
982 2011-12-06  Andreas Kling  <kling@webkit.org>
983
984         MediaList: Remove constructor that takes a CSSImportRule*.
985         <http://webkit.org/b/73833>
986
987         Reviewed by Antti Koivisto.
988
989         * css/MediaList.h:
990         * css/MediaList.cpp:
991
992             Remove MediaList(CSSImportRule*, ...) constructor.
993
994         * css/CSSImportRule.cpp:
995         (WebCore::CSSImportRule::CSSImportRule):
996
997             Have CSSImportRule construct its MediaList by passing the parent
998             style sheet, which is exactly what the old constructor accomplished.
999             Also assert that we're always created with a non-null parent sheet.
1000
1001 2011-12-06  Jarred Nicholls  <jarred@sencha.com>
1002
1003         getComputedStyle returns wrong value for margin-*
1004         https://bugs.webkit.org/show_bug.cgi?id=73334
1005
1006         margin-* getComputedStyle values should return the "used" absolute value when there is a renderer
1007         and the specified value is relative (percentage, auto, etc.).
1008         When there is no renderer, the specified value should be returned.
1009         See http://dev.w3.org/csswg/cssom/#resolved-values.
1010
1011         Reviewed by Darin Adler.
1012
1013         Test: fast/css/getComputedStyle/getComputedStyle-resolved-values.html
1014
1015         * css/CSSComputedStyleDeclaration.cpp:
1016         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1017
1018 2011-12-06  Alexey Proskuryakov  <ap@apple.com>
1019
1020         REGRESSION (WebKit2): Kill ring is not cleared when selection changes
1021         https://bugs.webkit.org/show_bug.cgi?id=73888
1022         <rdar://problem/10532310>
1023
1024         Reviewed by Mark Rowe.
1025
1026         Test: editing/pasteboard/emacs-ctrl-k-with-move.html
1027
1028         * editing/Editor.cpp: (WebCore::Editor::respondToChangedSelection): Moved the code to clear
1029         kill ring from Mac WebKit, as it's needed in all Mac ports at least.
1030
1031 2011-12-06  Darin Adler  <darin@apple.com>
1032
1033         Use HashMap<OwnPtr> in CollectionCache
1034         https://bugs.webkit.org/show_bug.cgi?id=73784
1035
1036         Reviewed by Andreas Kling.
1037
1038         * html/CollectionCache.cpp:
1039         (WebCore::CollectionCache::copyCacheMap): Use adoptPtr.
1040         (WebCore::CollectionCache::reset): Removed now-unneeded calls to deleteAllValues.
1041         (WebCore::append): Added. Helper function for appending elements to the maps from
1042         the collection cache.
1043
1044         * html/CollectionCache.h: Changed mapped type in NodeCacheMap to OwnPtr.
1045         Added append function.
1046
1047         * html/HTMLCollection.cpp:
1048         (WebCore::nameShouldBeVisibleInDocumentAll): Added, to factor out common code in
1049         two functions below.
1050         (WebCore::HTMLCollection::checkForNameMatch): Changed to call nameShouldBeVisibleInDocumentAll.
1051         (WebCore::HTMLCollection::updateNameCache): Ditto. Also updated cache code to use the append
1052         function, so it will work with OwnPtr. Also eliminated an unneeded get call before
1053         each hash table add; we do both at once in the new append function.
1054         * html/HTMLFormCollection.cpp:
1055         (WebCore::HTMLFormCollection::updateNameCache): More of the same.
1056
1057 2011-12-06  Yury Semikhatsky  <yurys@chromium.org>
1058
1059         [Chromium] Web Inspector: getFunctionLocation should return scriptId as String not as int
1060         https://bugs.webkit.org/show_bug.cgi?id=73892
1061
1062         Reviewed by Pavel Feldman.
1063
1064         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
1065         (WebCore::V8InjectedScriptHost::functionLocationCallback): scriptId should be a string not a number
1066         * inspector/Inspector.json: removed unused parameter
1067
1068 2011-11-21  Balazs Kelemen  <kbalazs@webkit.org>
1069
1070         Enable ParallelJobs by default
1071         https://bugs.webkit.org/show_bug.cgi?id=70032
1072
1073         Reviewed by Zoltan Herczeg.
1074
1075         Covered by existing tests.
1076
1077         According to measurements on Mac and Linux it is a
1078         considerable speedup for SVG on multicore.
1079
1080         Remove the ENABLE(PARALLEL_JOBS) guard. Fix the Windows build
1081         by qualifying ParallelJobs with the WTF namespace (otherwise
1082         MSVC believes it belongs to WebCore which is likely a compiler bug).
1083
1084         * platform/graphics/filters/FEConvolveMatrix.cpp:
1085         (WebCore::FEConvolveMatrix::setInteriorPixelsWorker):
1086         (WebCore::FEConvolveMatrix::platformApplySoftware):
1087         * platform/graphics/filters/FEConvolveMatrix.h:
1088         * platform/graphics/filters/FEGaussianBlur.cpp:
1089         (WebCore::FEGaussianBlur::platformApplyWorker):
1090         (WebCore::FEGaussianBlur::platformApply):
1091         * platform/graphics/filters/FEGaussianBlur.h:
1092         * platform/graphics/filters/FELighting.cpp:
1093         (WebCore::FELighting::platformApplyGenericWorker):
1094         (WebCore::FELighting::platformApplyGeneric):
1095         * platform/graphics/filters/FELighting.h:
1096         * platform/graphics/filters/FEMorphology.cpp:
1097         (WebCore::FEMorphology::platformApplyWorker):
1098         (WebCore::FEMorphology::platformApply):
1099         * platform/graphics/filters/FEMorphology.h:
1100         * platform/graphics/filters/FETurbulence.cpp:
1101         (WebCore::FETurbulence::fillRegionWorker):
1102         (WebCore::FETurbulence::platformApplySoftware):
1103         * platform/graphics/filters/FETurbulence.h:
1104         * platform/graphics/filters/arm/FELightingNEON.cpp:
1105         (WebCore::FELighting::platformApplyNeonWorker):
1106         * platform/graphics/filters/arm/FELightingNEON.h:
1107         (WebCore::FELighting::platformApplyNeon):
1108
1109 2011-12-06  Andreas Kling  <kling@webkit.org>
1110
1111         Unreviewed assertion fix for r102123.
1112
1113         * platform/KURL.cpp:
1114         (WebCore::checkEncodedString):
1115
1116 2011-12-06  Benjamin Poulain  <benjamin@webkit.org>
1117
1118         Simplify KURL's checkEncodedString()
1119         https://bugs.webkit.org/show_bug.cgi?id=73890
1120
1121         Reviewed by Andreas Kling.
1122
1123         The method was reimplementing String::containsOnlyASCII().
1124         Use the method from String and we can remove the #if NDEBUG.
1125
1126         * platform/KURL.cpp:
1127         (WebCore::checkEncodedString):
1128
1129 2011-12-06  Sheriff Bot  <webkit.review.bot@gmail.com>
1130
1131         Unreviewed, rolling out r102111.
1132         http://trac.webkit.org/changeset/102111
1133         https://bugs.webkit.org/show_bug.cgi?id=73902
1134
1135         Breaks compilation (Requested by vsevik on #webkit).
1136
1137         * editing/Editor.cpp:
1138         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
1139         * editing/Editor.h:
1140
1141 2011-12-06  Hajime Morrita  <morrita@chromium.org>
1142
1143         [Refactoring] Accessing Node::m_document should be minimized.
1144         https://bugs.webkit.org/show_bug.cgi?id=73800
1145
1146         Reviewed by Kent Tamura.
1147
1148         No new tests. No behavioral change.
1149
1150         Replaced m_document reference with the document() accessor
1151         or temporaril variables. This is a preparation for using
1152         m_document space to point a shadow root pointer.
1153
1154         * dom/Document.h:
1155         (WebCore::Node::Node):
1156         * dom/Node.cpp:
1157         (WebCore::Node::~Node):
1158
1159 2011-12-06  Shinya Kawanaka  <shinyak@google.com>
1160
1161         https://bugs.webkit.org/show_bug.cgi?id=73889
1162         TextCheckingParagraph::offsetTo should not have a side effect.
1163
1164         Reviewed by Hajime Morita.
1165
1166         Since TextCheckingParagraph::offsetTo had a side effect, its cache often became inconsistent.
1167         This is likely to cause a bug when changing SpellChecker and Editor.
1168
1169         No new tests. Covered by existing tests.
1170
1171         * editing/TextCheckingHelper.cpp:
1172         (WebCore::TextCheckingParagraph::offsetTo):
1173
1174 2011-12-06  Eric Penner  <epenner@google.com>
1175
1176         [chromium] Set texture limits as multiples of viewport size instead of hardcoded values
1177         https://bugs.webkit.org/show_bug.cgi?id=72202
1178
1179         Reviewed by James Robinson.
1180
1181         * platform/graphics/chromium/LayerRendererChromium.cpp: 
1182         (WebCore::LayerRendererChromium::drawLayers): added viewport param
1183         (WebCore::LayerRendererChromium::initializeSharedObjects): ditto 
1184         * platform/graphics/chromium/TextureManager.cpp: 
1185         (WebCore::TextureManager::highLimitBytes): calculated based on viewport
1186         (WebCore::TextureManager::reclaimLimitBytes): ditto
1187         (WebCore::TextureManager::lowLimitBytes): ditto
1188         (WebCore::TextureManager::TextureManager): added viewport param
1189         (WebCore::TextureManager::setMaxMemoryLimitBytes): changed name
1190         (WebCore::TextureManager::setPreferredMemoryLimitBytes): added function
1191         (WebCore::TextureManager::requestTexture): added viewport param
1192         * platform/graphics/chromium/TextureManager.h: ditto
1193         (WebCore::TextureManager::create): ditto
1194         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: ditto
1195         (WebCore::CCLayerTreeHost::initialize): ditto
1196         (WebCore::CCLayerTreeHost::beginCommitOnImplThread): ditto
1197         (WebCore::CCLayerTreeHost::setViewport): ditto
1198         (WebCore::CCLayerTreeHost::setVisible): ditto
1199         (WebCore::CCLayerTreeHost::didBecomeInvisibleOnImplThread): ditto
1200
1201 2011-12-06  Huang Dongsung  <luxtella@company100.net>
1202
1203         [TexMap][QT] Draw the borders of media and webgl elements in TexMap.
1204         https://bugs.webkit.org/show_bug.cgi?id=73817
1205
1206         GraphicsContext3D only draws the content of the WebGL canvas, not the additional
1207         CSS such as the borders. TextureMapper should render the content of a
1208         media/webgl layer before drawing the actual canvas.
1209         This makes LayoutTests/compositing/webgl/webgl-reflection.html work.
1210
1211         Reviewed by Noam Rosenthal.
1212
1213         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
1214         (WebCore::GraphicsLayerTextureMapper::setContentsNeedsDisplay):
1215         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
1216         * platform/graphics/texmap/TextureMapperNode.cpp:
1217         (WebCore::TextureMapperNode::renderContent):
1218         (WebCore::TextureMapperNode::paintSelf):
1219
1220 2011-12-06  Sheriff Bot  <webkit.review.bot@gmail.com>
1221
1222         Unreviewed, rolling out r102043.
1223         http://trac.webkit.org/changeset/102043
1224         https://bugs.webkit.org/show_bug.cgi?id=73898
1225
1226         Breaks chromium mac-cg compilation. (Requested by vsevik on
1227         #webkit).
1228
1229         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
1230         (WebCore::GraphicsLayerChromium::setContentsToImage):
1231         * platform/graphics/chromium/GraphicsLayerChromium.h:
1232         (WebCore::GraphicsLayerChromium::contentsLayer):
1233         * platform/graphics/chromium/ImageLayerChromium.cpp:
1234         (WebCore::ImageLayerChromium::setContents):
1235
1236 2011-12-06  Shinya Kawanaka  <shinyak@google.com>
1237
1238         Refactoring: Editor::markAllMisspellingsAndBadGrammarInRanges should be refactored.
1239         https://bugs.webkit.org/show_bug.cgi?id=73628
1240
1241         Reviewed by Hajime Morita.
1242
1243         Extracted a code for adding markers and replacing misspelled words from WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges.
1244
1245         No new tests. covered by existing tests.
1246
1247         * editing/Editor.cpp:
1248         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
1249           Extracted a code for adding markers and replacing missplled words, and moved to markAndReplaceFor.
1250         (WebCore::Editor::markAndReplaceFor):
1251         * editing/Editor.h:
1252
1253 2011-12-05  Alexander Pavlov  <apavlov@chromium.org>
1254
1255         Web Inspector: [Audits] Implement "Stop" button and progress bar instead of spinner.
1256         https://bugs.webkit.org/show_bug.cgi?id=73626
1257
1258         Reviewed by Yury Semikhatsky.
1259
1260         * English.lproj/localizedStrings.js:
1261         * inspector/front-end/AuditLauncherView.js:
1262         (WebInspector.AuditLauncherView):
1263         (WebInspector.AuditLauncherView.prototype._setAuditRunning):
1264         (WebInspector.AuditLauncherView.prototype._launchButtonClicked):
1265         (WebInspector.AuditLauncherView.prototype._createLauncherUI):
1266         (WebInspector.AuditLauncherView.prototype._updateResourceProgress):
1267         (WebInspector.AuditLauncherView.prototype._updateButton):
1268         * inspector/front-end/AuditRules.js:
1269         (WebInspector.AuditRules.GzipRule.prototype.doRun):
1270         (WebInspector.AuditRules.CombineExternalResourcesRule.prototype.doRun):
1271         (WebInspector.AuditRules.MinimizeDnsLookupsRule.prototype.doRun):
1272         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.evalCallback.selectorsCallback):
1273         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.evalCallback.documentLoaded):
1274         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.evalCallback):
1275         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.styleSheetCallback):
1276         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.allStylesCallback):
1277         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun):
1278         (WebInspector.AuditRules.CacheControlRule.prototype.doRun):
1279         (WebInspector.AuditRules.ImageDimensionsRule.prototype.doRun):
1280         (WebInspector.AuditRules.CssInHeadRule.prototype.doRun):
1281         (WebInspector.AuditRules.CssInHeadRule.prototype.doRun.externalStylesheetsReceived):
1282         (WebInspector.AuditRules.CssInHeadRule.prototype.doRun.inlineStylesReceived):
1283         (WebInspector.AuditRules.CssInHeadRule.prototype.doRun.onDocumentAvailable):
1284         (WebInspector.AuditRules.StylesScriptsOrderRule.prototype.doRun):
1285         (WebInspector.AuditRules.StylesScriptsOrderRule.prototype.doRun.cssBeforeInlineReceived):
1286         (WebInspector.AuditRules.StylesScriptsOrderRule.prototype.doRun.lateStylesReceived):
1287         (WebInspector.AuditRules.StylesScriptsOrderRule.prototype.doRun.onDocumentAvailable):
1288         (WebInspector.AuditRules.CookieRuleBase.prototype.doRun.resultCallback):
1289         (WebInspector.AuditRules.CookieRuleBase.prototype.doRun):
1290         * inspector/front-end/AuditsPanel.js:
1291         (WebInspector.AuditsPanel):
1292         (WebInspector.AuditsPanel.prototype._executeAudit.ruleResultReadyCallback):
1293         (WebInspector.AuditsPanel.prototype._executeAudit):
1294         (WebInspector.AuditsPanel.prototype._auditFinishedCallback):
1295         (WebInspector.AuditsPanel.prototype.terminateAudit):
1296         (WebInspector.AuditCategory.prototype.run):
1297         (WebInspector.AuditRule.prototype.run):
1298         (WebInspector.AuditRule.prototype.doRun):
1299         (WebInspector.AuditProgressMonitor):
1300         (WebInspector.AuditProgressMonitor.prototype.setTotalWork):
1301         (WebInspector.AuditProgressMonitor.prototype.worked):
1302         (WebInspector.AuditProgressMonitor.prototype.get indeterminate):
1303         (WebInspector.AuditProgressMonitor.prototype.done):
1304         (WebInspector.AuditProgressMonitor.prototype.get canceled):
1305         (WebInspector.AuditProgressMonitor.prototype.set canceled):
1306
1307 2011-12-06  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
1308
1309         [Qt] [WK2] MiniBrowser assert on startup in debug build after r101713
1310         https://bugs.webkit.org/show_bug.cgi?id=73874
1311
1312         This change partially reverts r101713 restoring original behaviour for
1313         KUrl creation from empty string and fixes asserts in debug build.
1314
1315         Reviewed by Alexey Proskuryakov.
1316
1317         No new tests. Tests from r101713 pass.
1318
1319         * platform/KURL.cpp:
1320         (WebCore::KURL::init):
1321         (WebCore::KURL::parse):
1322         * platform/KURL.h:
1323
1324 2011-12-06  Andreas Kling  <kling@webkit.org>
1325
1326         Use HashMap<OwnPtr> for EventListenerMap's internal map.
1327         <http://webkit.org/b/73761>
1328
1329         Reviewed by Benjamin Poulain.
1330
1331         Changed the value type of EventListenerMap::m_hashMap to OwnPtr<EventListenerVector>.
1332         This means we no longer need to manually delete the vectors when taking them out of
1333         the map, which makes the code a little prettier.
1334
1335         A few tweaks were necessary; release() instead of leakPtr() when switching modes
1336         and adoptPtr()/get() sprinkled as needed.
1337
1338         * dom/EventListenerMap.h:
1339         * dom/EventListenerMap.cpp:
1340         (WebCore::EventListenerMap::clear):
1341         (WebCore::EventListenerMap::add):
1342         (WebCore::EventListenerMap::remove):
1343         (WebCore::EventListenerMap::find):
1344         (WebCore::EventListenerMap::removeFirstEventListenerCreatedFromMarkup):
1345         (WebCore::EventListenerMap::copyEventListenersNotCreatedFromMarkupToTarget):
1346
1347 2011-12-05  Rafael Weinstein  <rafaelw@chromium.org>
1348
1349         [MutationObservers] Support 'attributes' mutation records for element.removeAttribute
1350         https://bugs.webkit.org/show_bug.cgi?id=73880
1351
1352         Reviewed by Ojan Vafai.
1353
1354         * dom/Element.cpp:
1355         (WebCore::enqueueAttributesMutationRecord):
1356         (WebCore::Element::removeAttribute):
1357
1358 2011-12-05  Dana Jansens  <danakj@chromium.org>
1359
1360         Set opaque flag for WebGLLayerChromium
1361         https://bugs.webkit.org/show_bug.cgi?id=73876
1362
1363         Reviewed by James Robinson.
1364
1365         New unit test in tests/WebGLLayerChromiumTest.cpp
1366
1367         * platform/graphics/chromium/DrawingBufferChromium.cpp:
1368         (WebCore::DrawingBuffer::platformLayer):
1369
1370 2011-12-05  Benjamin Poulain  <bpoulain@apple.com>
1371
1372         Upstream the Cursor implementation of iOS
1373         https://bugs.webkit.org/show_bug.cgi?id=73724
1374
1375         Reviewed by David Kilzer.
1376
1377         iOS does not need to support the Cursor of WebKit. For compatibility, Cursor
1378         is implemented as an empty class on the platform.
1379
1380         * Configurations/WebCore.xcconfig:
1381         * WebCore.xcodeproj/project.pbxproj:
1382         * platform/Cursor.h:
1383         (WebCore::Cursor::Cursor):
1384         * platform/ios/CursorIOS.cpp: Added.
1385         (WebCore::cursor):
1386         (WebCore::pointerCursor):
1387         (WebCore::crossCursor):
1388         (WebCore::handCursor):
1389         (WebCore::moveCursor):
1390         (WebCore::iBeamCursor):
1391         (WebCore::waitCursor):
1392         (WebCore::helpCursor):
1393         (WebCore::eastResizeCursor):
1394         (WebCore::northResizeCursor):
1395         (WebCore::northEastResizeCursor):
1396         (WebCore::northWestResizeCursor):
1397         (WebCore::southResizeCursor):
1398         (WebCore::southEastResizeCursor):
1399         (WebCore::southWestResizeCursor):
1400         (WebCore::westResizeCursor):
1401         (WebCore::northSouthResizeCursor):
1402         (WebCore::eastWestResizeCursor):
1403         (WebCore::northEastSouthWestResizeCursor):
1404         (WebCore::northWestSouthEastResizeCursor):
1405         (WebCore::columnResizeCursor):
1406         (WebCore::rowResizeCursor):
1407         (WebCore::middlePanningCursor):
1408         (WebCore::eastPanningCursor):
1409         (WebCore::northPanningCursor):
1410         (WebCore::northEastPanningCursor):
1411         (WebCore::northWestPanningCursor):
1412         (WebCore::southPanningCursor):
1413         (WebCore::southEastPanningCursor):
1414         (WebCore::southWestPanningCursor):
1415         (WebCore::westPanningCursor):
1416         (WebCore::verticalTextCursor):
1417         (WebCore::cellCursor):
1418         (WebCore::contextMenuCursor):
1419         (WebCore::noDropCursor):
1420         (WebCore::notAllowedCursor):
1421         (WebCore::progressCursor):
1422         (WebCore::aliasCursor):
1423         (WebCore::zoomInCursor):
1424         (WebCore::zoomOutCursor):
1425         (WebCore::copyCursor):
1426         (WebCore::noneCursor):
1427         (WebCore::grabCursor):
1428         (WebCore::grabbingCursor):
1429         (WebCore::determineHotSpot):
1430
1431 2011-12-05  Noel Gordon  <noel.gordon@gmail.com>
1432
1433         [GTK] GIF image test crashes on 32- and 64-bit Release
1434         https://bugs.webkit.org/show_bug.cgi?id=73812
1435
1436         Reviewed by Adam Barth.
1437
1438         Call resize() on the image pixel backing store after allocation to see if
1439         that stops the GIF image decoder animation tests crashes on GTK.
1440
1441         No new tests, covered by exiting tests ...
1442           fast/backgrounds/animated-gif-as-background.html
1443           fast/images/dont-crash-with-null-gif-frames.html
1444           fast/images/gif-loop-count.html
1445
1446         * platform/image-decoders/ImageDecoder.cpp:
1447         (WebCore::ImageFrame::setSize):
1448
1449 2011-12-05  Erik Arvidsson  <arv@chromium.org>
1450
1451         Could save a lot of memory in CharacterData by not always storing a String
1452         https://bugs.webkit.org/show_bug.cgi?id=72404
1453
1454         Reviewed by Ojan Vafai.
1455
1456         When a Text node is created by the parser we check if the string is all whitespace
1457         and if so we put it in the AtomicString table so that all future identical whitespace
1458         strings can share the StringImpl.
1459
1460         No new tests. Covered by existing tests.
1461
1462         * html/parser/HTMLConstructionSite.cpp:
1463         (WebCore::HTMLNames::isAllWhitespace):
1464         (WebCore::HTMLConstructionSite::insertTextNode):
1465
1466             If we do not know whether the string is all whitespace this now checks the string
1467             If the string is all whitespace we create an AtomicString for it.
1468
1469         * html/parser/HTMLConstructionSite.h:
1470         * html/parser/HTMLTreeBuilder.cpp:
1471         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::skipLeadingNonWhitespace): We never cared about the return value here.
1472         (WebCore::HTMLTreeBuilder::processCharacterBuffer): Pass WhitespaceMode in the case we know whether the string is all whitespace or not.
1473         (WebCore::HTMLTreeBuilder::defaultForInTableText): Ditto.
1474
1475 2011-12-05  Benjamin Poulain  <benjamin@webkit.org>
1476
1477         Update KURL's copy copyASCII to avoid String::characters()
1478         https://bugs.webkit.org/show_bug.cgi?id=73794
1479
1480         Reviewed by Andreas Kling.
1481
1482         When the String is already on 8 bits, we can simply copy the
1483         data. In the 16 bits case, everything remains the same.
1484
1485         * platform/KURL.cpp:
1486         (WebCore::copyASCII):
1487         (WebCore::appendASCII):
1488         (WebCore::KURL::init):
1489         (WebCore::KURL::parse):
1490         (WebCore::KURL::copyToBuffer):
1491
1492 2011-12-05  Yong Li  <yoli@rim.com>
1493
1494         https://bugs.webkit.org/show_bug.cgi?id=73683
1495         Implement KeyframeValueList::operator=() and KeyframeValueList::swap().
1496
1497         Reviewed by Darin Adler.
1498
1499         No new tests as no functional change.
1500
1501         * platform/graphics/GraphicsLayer.h: 
1502         (WebCore::KeyframeValueList::operator=): Added
1503         (WebCore::KeyframeValueList::swap): Added
1504
1505 2011-12-05  Adrienne Walker  <enne@google.com>
1506
1507         [chromium] setNeedsCommit on non-composited host layers should trigger commit
1508         https://bugs.webkit.org/show_bug.cgi?id=73711
1509
1510         Reviewed by James Robinson.
1511
1512         Pipe non-composited content host syncs to setNeedsCommit.
1513
1514         Since now the NonCompositedContentHost generates setNeedsCommit, don't
1515         call it unnecessarily, e.g. calling setBackgroundColor to the same
1516         color each frame should not retrigger more commits.
1517
1518         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
1519         (WebCore::GraphicsLayerChromium::setAnchorPoint):
1520         (WebCore::GraphicsLayerChromium::setTransform):
1521         (WebCore::GraphicsLayerChromium::setChildrenTransform):
1522         (WebCore::GraphicsLayerChromium::setMasksToBounds):
1523         (WebCore::GraphicsLayerChromium::setBackgroundColor):
1524         (WebCore::GraphicsLayerChromium::clearBackgroundColor):
1525         (WebCore::GraphicsLayerChromium::setContentsOpaque):
1526         (WebCore::GraphicsLayerChromium::setBackfaceVisibility):
1527         (WebCore::GraphicsLayerChromium::setOpacity):
1528         * platform/graphics/chromium/LayerChromium.cpp:
1529         (WebCore::LayerChromium::setNeedsCommit):
1530         (WebCore::LayerChromium::setAnchorPoint):
1531         (WebCore::LayerChromium::setAnchorPointZ):
1532         (WebCore::LayerChromium::setBackgroundColor):
1533         (WebCore::LayerChromium::setMasksToBounds):
1534         (WebCore::LayerChromium::setMaskLayer):
1535         (WebCore::LayerChromium::setOpacity):
1536         (WebCore::LayerChromium::setOpaque):
1537         (WebCore::LayerChromium::setPosition):
1538         (WebCore::LayerChromium::setSublayerTransform):
1539         (WebCore::LayerChromium::setTransform):
1540         (WebCore::LayerChromium::setScrollPosition):
1541         (WebCore::LayerChromium::setScrollable):
1542         (WebCore::LayerChromium::setDoubleSided):
1543         * platform/graphics/chromium/LayerChromium.h:
1544         (WebCore::LayerChromium::setReplicaLayer):
1545         * platform/graphics/chromium/NonCompositedContentHost.cpp:
1546         (WebCore::NonCompositedContentHost::notifySyncRequired):
1547         * platform/graphics/chromium/NonCompositedContentHost.h:
1548
1549 2011-12-05  Tony Chang  <tony@chromium.org>
1550
1551         small refactor of RenderFlexibleBox
1552         https://bugs.webkit.org/show_bug.cgi?id=73854
1553
1554         Reviewed by Darin Adler.
1555
1556         No new tests, just a refactor.
1557
1558         * rendering/RenderFlexibleBox.cpp:
1559         (WebCore::RenderFlexibleBox::isLeftToRightFlow): Inline isReverseFlow since it's only used in one place.
1560         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Rename startEdge
1561         to mainAxisOffset.  Rename logicalTop to crossAxisOffset.  Get rid of
1562         logicalLeft local variable since it's confusing.  Move shouldFlipMainAxis
1563         out of the for loop to avoid computing it each iteration.
1564         * rendering/RenderFlexibleBox.h:
1565
1566 2011-12-05  Florin Malita  <fmalita@google.com>
1567
1568         Heap-buffer-overflow in WebCore::HTMLTreeBuilder::processEndTag
1569         https://bugs.webkit.org/show_bug.cgi?id=73765
1570
1571         Reviewed by Adam Barth.
1572
1573         Test: fast/parser/foreign-content-crash.html
1574
1575         Use m_tree.currentNode() instead of m_tree.currentElement() as the top node is not always an Element.
1576
1577         * html/parser/HTMLTreeBuilder.cpp:
1578         (WebCore::HTMLTreeBuilder::processEndTag):
1579
1580 2011-12-05  Stephen White  <senorblanco@chromium.org>
1581
1582         Allow the ImageBuffers used by SVG filters to be accelerated
1583         https://bugs.webkit.org/show_bug.cgi?id=73842
1584
1585         Reviewed by Kenneth Russell.
1586
1587         Regressions covered by existing SVG tests; new functionality to be
1588         tested by the API exposed on Internals.
1589
1590         * page/Settings.cpp:
1591         (WebCore::Settings::Settings):
1592         * page/Settings.h:
1593         (WebCore::Settings::setAcceleratedFiltersEnabled):
1594         (WebCore::Settings::acceleratedFiltersEnabled):
1595         * platform/graphics/filters/FETile.cpp:
1596         (WebCore::FETile::platformApplySoftware):
1597         * platform/graphics/filters/Filter.h:
1598         (WebCore::Filter::Filter):
1599         (WebCore::Filter::renderingMode):
1600         (WebCore::Filter::setRenderingMode):
1601         * platform/graphics/filters/FilterEffect.cpp:
1602         (WebCore::FilterEffect::asImageBuffer):
1603         (WebCore::FilterEffect::createImageBufferResult):
1604         * platform/graphics/skia/ImageBufferSkia.cpp:
1605         (WebCore::ImageBuffer::platformTransformColorSpace):
1606         * rendering/svg/RenderSVGResourceClipper.cpp:
1607         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
1608         * rendering/svg/RenderSVGResourceFilter.cpp:
1609         (WebCore::RenderSVGResourceFilter::applyResource):
1610         * rendering/svg/RenderSVGResourceMasker.cpp:
1611         (WebCore::RenderSVGResourceMasker::applyResource):
1612         * rendering/svg/RenderSVGResourcePattern.cpp:
1613         (WebCore::RenderSVGResourcePattern::createTileImage):
1614         * rendering/svg/SVGImageBufferTools.cpp:
1615         (WebCore::SVGImageBufferTools::createImageBuffer):
1616         * rendering/svg/SVGImageBufferTools.h:
1617         * testing/Internals.cpp:
1618         (WebCore::Internals::setAcceleratedFiltersEnabled):
1619         * testing/Internals.h:
1620         * testing/Internals.idl:
1621
1622 2011-12-05  Benjamin Poulain  <bpoulain@apple.com>
1623
1624         Upstream htmlSelectMultipleItems needed for <select multiple> by iOS
1625         https://bugs.webkit.org/show_bug.cgi?id=73734
1626
1627         Reviewed by David Kilzer.
1628
1629         * platform/DefaultLocalizationStrategy.cpp:
1630         (WebCore::DefaultLocalizationStrategy::htmlSelectMultipleItems):
1631         * platform/DefaultLocalizationStrategy.h:
1632
1633 2011-12-05  Darin Adler  <darin@apple.com>
1634
1635         Use HashMap<OwnPtr> in CrossOriginPreflightResultCache
1636         https://bugs.webkit.org/show_bug.cgi?id=73785
1637
1638         Reviewed by Andreas Kling.
1639
1640         * loader/CrossOriginPreflightResultCache.cpp:
1641         (WebCore::CrossOriginPreflightResultCache::appendEntry): Changed code to use set
1642         instead of add, since it wants to replace existing entries. Also removed leakPtr
1643         and removed the FIXME that documented the memory leak now fixed here.
1644         (WebCore::CrossOriginPreflightResultCache::canSkipPreflight): Removed unneeded
1645         std:: prefix here and also unneeded explicit delete call.
1646         (WebCore::CrossOriginPreflightResultCache::empty): Removed unneeded deleteAllValues
1647         call here.
1648
1649         * loader/CrossOriginPreflightResultCache.h: Make mapped value of the
1650         CrossOriginPreflightResultHashMap be OwnPtr instead of raw pointer.
1651
1652 2011-12-05  Darin Adler  <darin@apple.com>
1653
1654         Some small improvements to ContainerNode.h
1655         https://bugs.webkit.org/show_bug.cgi?id=73786
1656
1657         Reviewed by Alexey Proskuryakov.
1658
1659         * dom/ContainerNode.cpp:
1660         (WebCore::ContainerNode::suspendPostAttachCallbacks): Added a FIXME comment about the
1661         peculiar behavior of this function. Somehow the post-attach suspend state is both
1662         global and specific to a certain Page object. That can't be right. If it was truly
1663         global then this would be a static member function. If it was truly per-page, then
1664         the related functions could not be static.
1665
1666         * dom/ContainerNode.h: Removed some unneeded argument names. Moved the hasChildNodes
1667         function up with the other basic getters. Put the other getters, childNodeCount and
1668         childNode, right after the basic getters. Used ASSERT_NO_EXCEPTION in all the basic
1669         mutation functions so they can be used in a cleaner fashion in C++ code where we have
1670         some reason to know an exception won't occur. Grouped all the overrides of functions
1671         from Node into a single paragraph and used the OVERRIDE macro on all of them. Made the
1672         queuePostAttachCallback and postAttachCallbacksAreSuspended functions protected.
1673
1674         * dom/Element.h: Moved the include of ExceptionCodePlaceholder.h into ContainerNode.h.
1675
1676         * dom/Node.cpp:
1677         (WebCore::Node::lazyAttach): Use hasChildNodes instead of firstChild for clarity.
1678         (WebCore::Node::isDescendantOf): Ditto.
1679
1680 2011-12-05  Benjamin Poulain  <benjamin@webkit.org>
1681
1682         Get rid of KURL::KURL(ParsedURLStringTag, const char*);
1683         https://bugs.webkit.org/show_bug.cgi?id=73792
1684
1685         Reviewed by Andreas Kling.
1686
1687         In all cases where the constructor is used, the constructor
1688         taking a String is as effective because the string is valid and converted
1689         to String for m_string.
1690
1691         This patch remove the constructor KURL::KURL(ParsedURLStringTag, const char*)
1692         and change the call sites that were using that constructor to build
1693         empty URLs.
1694
1695         * dom/Document.cpp:
1696         (WebCore::Document::initSecurityContext):
1697         * loader/FrameLoader.cpp:
1698         (WebCore::FrameLoader::init):
1699         * loader/archive/cf/LegacyWebArchive.cpp:
1700         (WebCore::LegacyWebArchive::create):
1701         * page/DOMWindow.cpp:
1702         (WebCore::DOMWindow::createWindow):
1703         * platform/KURL.cpp:
1704         * platform/KURL.h:
1705         * platform/KURLGoogle.cpp:
1706
1707 2011-12-05  Benjamin Poulain  <benjamin@webkit.org>
1708
1709         Remove methods declared but never implemented with GOOGLEURL
1710         https://bugs.webkit.org/show_bug.cgi?id=73795
1711
1712         Reviewed by Adam Barth.
1713
1714         * platform/KURL.h:
1715
1716 2011-12-05  Darin Adler  <darin@apple.com>
1717
1718         Change CSSFontSelector to use HashMap<OwnPtr>
1719         https://bugs.webkit.org/show_bug.cgi?id=73781
1720
1721         Reviewed by Dan Bernstein.
1722
1723         * css/CSSFontSelector.cpp:
1724         (WebCore::CSSFontSelector::~CSSFontSelector): Removed calls to deleteAllValues.
1725         (WebCore::CSSFontSelector::addFontFaceRule): Updated to use OwnPtr instead of raw
1726         pointer for the entry in m_fontFaces and m_locallyInstalledFontFaces.
1727         (WebCore::CSSFontSelector::getFontData): Updated to use OwnPtr instead of raw
1728         pointer for the entry in m_fonts. Also removed an unneeded std:: prefix.
1729
1730         * css/CSSFontSelector.h: Made m_fontFaces, m_locallyInstalledFontFaces, and m_fonts
1731         be HashMap<OwnPtr>.
1732
1733 2011-12-05  Adam Klein  <adamk@chromium.org>
1734
1735         V8RecursionScope should call didLeaveScriptContext when recursionLevel reaches zero
1736         https://bugs.webkit.org/show_bug.cgi?id=73867
1737
1738         Reviewed by Adam Barth.
1739
1740         Moved V8RecursionScope into its own file, and moved
1741         V8Proxy::didLeaveScriptContext into that file, along with a static
1742         recursionLevel accessor, hiding the V8BindingPerIsolateData methods
1743         from V8Proxy.
1744
1745         This will make it easy and less error-prone to use V8RecursionScope
1746         properly. I plan to make use of it in V8LazyEventListener to fix
1747         https://bugs.webkit.org/show_bug.cgi?id=73492.
1748
1749         No new tests, refactoring only.
1750
1751         * Target.pri:
1752         * UseV8.cmake:
1753         * WebCore.gypi:
1754         * bindings/v8/V8Binding.h:
1755         (WebCore::V8BindingPerIsolateData::incrementRecursionLevel): return the new recursion level.
1756         (WebCore::V8BindingPerIsolateData::decrementRecursionLevel): return the new recursion level.
1757         * bindings/v8/V8Proxy.cpp: remove didLeaveScriptContext.
1758         (WebCore::V8Proxy::runScript): remove explicit call to didLeaveScriptContext.
1759         (WebCore::V8Proxy::instrumentedCallFunction): remove explicit call to didLeaveScriptContext.
1760         * bindings/v8/V8Proxy.h: remove didLeaveScriptContext.
1761         * bindings/v8/V8RecursionScope.cpp: Added.
1762         (WebCore::V8RecursionScope::didLeaveScriptContext): copied from V8Proxy.cpp.
1763         * bindings/v8/V8RecursionScope.h: Added.
1764         (WebCore::V8RecursionScope::V8RecursionScope):
1765         (WebCore::V8RecursionScope::~V8RecursionScope):
1766         (WebCore::V8RecursionScope::recursionLevel):
1767
1768 2011-12-05  Benjamin Poulain  <bpoulain@apple.com>
1769
1770         Build fix for SecurityOrigin.cpp when neither BLOB nor FILE_SYSTEM are defined
1771
1772         Reviewed by David Kilzer.
1773
1774         When neither BLOB nor FILE_SYSTEM are defined, the parameter is unused.
1775
1776         * page/SecurityOrigin.cpp:
1777         (WebCore::shouldUseInnerURL):
1778
1779 2011-12-05  Darin Adler  <darin@apple.com>
1780
1781         Change RuleSet to use HashMap<OwnPtr>
1782         https://bugs.webkit.org/show_bug.cgi?id=73783
1783
1784         Reviewed by Andreas Kling.
1785
1786         * css/CSSStyleSelector.cpp: Make RuleSet::AtomRuleMap use OwnPtr for the mapped values.
1787         (WebCore::RuleSet::addToRuleSet): Use add instead of get/set to set up a new entry in the
1788         map or find the old entry in the map.
1789
1790 2011-12-05  Mario Sanchez Prada  <msanchez@igalia.com>
1791
1792         [GTK] Move emissions of AtkDocument signals down to WebCore
1793         https://bugs.webkit.org/show_bug.cgi?id=73750
1794
1795         Reviewed by Chris Fleizach.
1796
1797         Implement the needed infrastructure to allow notifying
1798         accessibility, in a cross-platform way, when a event related to
1799         the load of a document happens. Added a generic method, which will
1800         be called from the FrameLoader, and platform specific versions of
1801         it so every port has a chance to decide what to do with those
1802         notifications.
1803
1804         This patch doesn't include a new test because the one testing this
1805         functionality is the GTK-specific unit test added along with patch
1806         for bug 73746: testWebkitAtkDocumentLoadingEvents.
1807
1808         * accessibility/AXObjectCache.h:
1809         (WebCore::AXObjectCache::frameLoadingEventNotification): New, called
1810         from the FrameLoader to notify accessibility when an event happens.
1811         (WebCore::AXObjectCache::frameLoadingEventPlatformNotification): New,
1812         platform specific function to let ports decide what to do.
1813         * accessibility/AXObjectCache.cpp:
1814         (WebCore::AXObjectCache::frameLoadingEventNotification): New.
1815         * accessibility/chromium/AXObjectCacheChromium.cpp:
1816         (WebCore::AXObjectCache::frameLoadingEventPlatformNotification): Dummy
1817         implementation of the platform specific function for chromium.
1818         * accessibility/gtk/AXObjectCacheAtk.cpp:
1819         (WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
1820         * accessibility/mac/AXObjectCacheMac.mm:
1821         (WebCore::AXObjectCache::frameLoadingEventPlatformNotification): Dummy
1822         implementation of the platform specific function for the Mac.
1823         * accessibility/win/AXObjectCacheWin.cpp:
1824         (WebCore::AXObjectCache::frameLoadingEventPlatformNotification): Dummy
1825         implementation of the platform specific function for Windows.
1826
1827         * loader/FrameLoader.cpp:
1828         (WebCore::FrameLoader::prepareForLoadStart): Notify accessibility
1829         by calling the new frameLoadingEventNotification() function.
1830         (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Ditto.
1831
1832 2011-12-05  Benjamin Poulain  <benjamin@webkit.org>
1833
1834         Update String::containsOnlyASCII() to handle 8 bits strings
1835         https://bugs.webkit.org/show_bug.cgi?id=73799
1836
1837         Reviewed by Darin Adler.
1838
1839         When possible, change the call sites from charactersAreAllASCII()
1840         to the optimized version String::containsOnlyASCII().
1841
1842         * platform/KURL.cpp:
1843         (WebCore::KURL::init):
1844         * platform/cf/BinaryPropertyList.cpp:
1845         (WebCore::BinaryPropertyListPlan::writeStringObject):
1846         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
1847         (WebCore::FontCodepage::if):
1848
1849 2011-12-01  Vangelis Kokkevis  <vangelis@chromium.org>
1850
1851         [chromium] Use ANGLE's texture_usage and texture_storage extensions when allocating compositor textures
1852         https://bugs.webkit.org/show_bug.cgi?id=73621
1853
1854         When the extensions are available, compositor textures are allocated via
1855         glTexStorage2DEXT instead of glTexImage2D to eliminate creation of unnecessary
1856         mip levels on the service side. In addition, the GL_FRAMEBUFFER_ATTACHMENT_ANGLE
1857         is specified for all textures used by RenderSurfaces to eliminate the need for
1858         a system memory bitmap allocation.
1859
1860         Reviewed by Kenneth Russell.
1861
1862         * platform/graphics/chromium/Extensions3DChromium.h:
1863         * platform/graphics/chromium/LayerRendererChromium.cpp:
1864         (WebCore::LayerRendererChromium::initialize):
1865         (WebCore::LayerRendererChromium::initializeSharedObjects):
1866         * platform/graphics/chromium/TrackingTextureAllocator.cpp:
1867         (WebCore::TrackingTextureAllocator::TrackingTextureAllocator):
1868         (WebCore::textureToStorageFormat):
1869         (WebCore::isTextureFormatSupportedForStorage):
1870         (WebCore::TrackingTextureAllocator::createTexture):
1871         * platform/graphics/chromium/TrackingTextureAllocator.h:
1872         (WebCore::TrackingTextureAllocator::setTextureUsageHint):
1873         (WebCore::TrackingTextureAllocator::setUseTextureStorageExt):
1874         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1875         (WebCore::LayerRendererCapabilities::LayerRendererCapabilities):
1876
1877 2011-12-05  Chris Fleizach  <cfleizach@apple.com>
1878
1879         AX: aria-hidden doesn't work on iframe elements
1880         https://bugs.webkit.org/show_bug.cgi?id=73857
1881
1882         Reviewed by Darin Adler.
1883
1884         Test: platform/mac/accessibility/iframe-aria-hidden.html
1885
1886         * accessibility/AccessibilityRenderObject.cpp:
1887         (WebCore::AccessibilityRenderObject::addAttachmentChildren):
1888         (WebCore::AccessibilityRenderObject::addChildren):
1889         * accessibility/AccessibilityRenderObject.h:
1890         * accessibility/AccessibilityScrollView.cpp:
1891         (WebCore::AccessibilityScrollView::accessibilityIsIgnored):
1892         (WebCore::AccessibilityScrollView::addChildren):
1893         * accessibility/AccessibilityScrollView.h:
1894
1895 2011-12-05  Chris Fleizach  <cfleizach@apple.com>
1896
1897         AX: web search mechanism does not work with frames
1898         https://bugs.webkit.org/show_bug.cgi?id=73836
1899
1900         Reviewed by Beth Dakin.
1901
1902         This allows searching for, and within, frames for elements using the accessibility
1903         search mechanism.
1904
1905         Test: platform/mac/accessibility/search-with-frames.html
1906
1907         * accessibility/AccessibilityObject.cpp:
1908         (WebCore::AccessibilityObject::isAccessibilityObjectSearchMatch):
1909         (WebCore::appendAccessibilityObject):
1910         (WebCore::appendChildrenToArray):
1911
1912 2011-12-05  Anders Carlsson  <andersca@apple.com>
1913
1914         Make LayerFlushSchedulerClient::flushLayers indicate whether the flush was successful or not
1915         https://bugs.webkit.org/show_bug.cgi?id=73862
1916
1917         Reviewed by Andy Estes.
1918
1919         Change LayerFlushSchedulerClient::flushLayers to return a boolean. If it returns true, the flush was
1920         successful and the run loop observer will be invalidated.
1921
1922         * platform/graphics/ca/LayerFlushScheduler.h:
1923         * platform/graphics/ca/LayerFlushSchedulerClient.h:
1924         * platform/graphics/ca/mac/LayerFlushSchedulerMac.cpp:
1925         (WebCore::LayerFlushScheduler::runLoopObserverCallback):
1926
1927 2011-12-05  Dana Jansens  <danakj@chromium.org>
1928
1929         [chromium] Set opaque flag for ImageLayerChromium
1930         https://bugs.webkit.org/show_bug.cgi?id=72964
1931
1932         Reviewed by James Robinson.
1933
1934         New unit test in tests/ImageLayerChromiumTest.cpp.
1935
1936         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
1937         (WebCore::GraphicsLayerChromium::setContentsToImage):
1938         * platform/graphics/chromium/GraphicsLayerChromium.h:
1939         (WebCore::GraphicsLayerChromium::contentsLayer):
1940         * platform/graphics/chromium/ImageLayerChromium.cpp:
1941         (WebCore::ImageLayerChromium::setContents):
1942
1943 2011-12-05  Julien Chaffraix  <jchaffraix@webkit.org>
1944
1945         TD width in precentage doesn't work.
1946         https://bugs.webkit.org/show_bug.cgi?id=34758
1947
1948         Reviewed by David Hyatt.
1949
1950         Test: fast/table/colspan-with-all-percent-cells.html
1951
1952         * rendering/AutoTableLayout.cpp:
1953         (WebCore::AutoTableLayout::calcEffectiveLogicalWidth):
1954         In the case where all our columns have percent lengths, split the colspan
1955         logical width using the percentages from the lengths. This should be properly
1956         handled by the massive 'else' case but it is not and I did not feel like refactor
1957         that due to massive compatibility issues that would arise.
1958
1959 2011-12-05  Chris Fleizach  <cfleizach@apple.com>
1960
1961         platform/mac/accessibility/search-when-element-starts-in-table.html is failing
1962         https://bugs.webkit.org/show_bug.cgi?id=73751
1963
1964         When encountering a table, the rows() and not the cells() should be queried (otherwise
1965         we can end up finding the element we started with).
1966
1967         When searching in reverse, we also need to account for searching elements within the
1968         parent hierarchy. because technically it is "behind" the start element.
1969
1970         Reviewed by Darin Adler.
1971
1972         * accessibility/AccessibilityObject.cpp:
1973         (WebCore::appendChildrenToArray):
1974         (WebCore::AccessibilityObject::objectMatchesSearchCriteriaWithResultLimit):
1975         (WebCore::AccessibilityObject::findMatchingObjects):
1976         * accessibility/AccessibilityObject.h:
1977
1978 2011-12-02  Jer Noble  <jer.noble@apple.com>
1979
1980         <video> elements should disable the system and display sleep when playing on OS X.
1981         https://bugs.webkit.org/show_bug.cgi?id=73730
1982         <rdar://problem/9502155>
1983
1984         Reviewed by Alexey Proskuryakov.
1985
1986         No new tests; platform specific system behavior only.
1987
1988         Create a new DisplaySleepDisabler object when the playback rate becomes non-zero, and destroy
1989         that object when the playback rate drops back to zero.
1990
1991         * html/HTMLMediaElement.cpp:
1992         (WebCore::HTMLMediaElement::mediaPlayerRateChanged):
1993         * html/HTMLMediaElement.h:
1994
1995 2011-12-05  Peter Beverloo  <peter@chromium.org>
1996
1997         [Chromium] Add Android keycodes and build Linux clipboard/filesystem files.
1998         https://bugs.webkit.org/show_bug.cgi?id=73672
1999
2000         Add the KeyCodeConversionAndroid.cpp file, which is a partial re-land
2001         of an older file from the Android port:
2002         http://trac.webkit.org/browser/trunk/WebCore/platform/android/KeyEventAndroid.cpp?rev=56704
2003
2004         Add IconChromiumAndroid.cpp which nullifies the rendering of icons in
2005         file upload boxes, which is not something we want to support now. Also
2006         include ClipboardChromiumLinux.cpp and FileSystemChromiumLinux.cpp
2007         as their functionality can be re-used for Android.
2008
2009         Reviewed by Adam Barth.
2010
2011         * WebCore.gyp/WebCore.gyp:
2012         * WebCore.gypi:
2013         * platform/chromium/KeyCodeConversionAndroid.cpp: Added.
2014         (WebCore::windowsKeyCodeForKeyEvent):
2015         * platform/graphics/chromium/IconChromiumAndroid.cpp: Added.
2016         (WebCore::Icon::Icon):
2017         (WebCore::Icon::~Icon):
2018         (WebCore::Icon::paint):
2019
2020 2011-12-05  Steve Falkenburg  <sfalken@apple.com>
2021
2022         Reviewed by Sam Weinig.
2023
2024         On Windows, filenames not properly preserved when copied into a file list exposed by Event.dataTransfer
2025         https://bugs.webkit.org/show_bug.cgi?id=73841
2026         <rdar://problem/10521879>
2027
2028         No test since repro case involves dropping a file onto the WebView.
2029         
2030         Calling characters() explicitly causes a non-terminated string buffer to get passed back
2031         to the String() constructor that expects a terminated buffer. The characters() call isn't
2032         necessary at all, since we have a String and the method we're calling expects a String.
2033
2034         * platform/win/ClipboardWin.cpp:
2035         (WebCore::ClipboardWin::files): Remove characters() since it doesn't null terminate.
2036
2037 2011-12-05  Timothy Hatcher  <timothy@apple.com>
2038
2039         Keep both InspectorBackend.js and InspectorBackendStub.js in Release builds after
2040         they have been combined into inspector.js.
2041
2042         The InspectorBackend.js file split out of the generated InspectorBackendStub.js
2043         in r101670, and both files are needed to be useful.
2044
2045         https://webkit.org/b/73839
2046
2047         Reviewed by Joseph Pecoraro and Brian Weinstein.
2048
2049         * WebCore.xcodeproj/project.pbxproj: Pass -not -name "InspectorBackend*.js" to find
2050         instead of -not -name InspectorBackendStub.js.
2051
2052 2011-12-05  Mikhail Naganov  <mnaganov@chromium.org>
2053
2054         Web Inspector: [Chromium] Heap profiler should designate weak references.
2055         https://bugs.webkit.org/show_bug.cgi?id=69948
2056
2057         Weak references are now ignored when tracing paths to GC roots.
2058
2059         Reviewed by Yury Semikhatsky.
2060
2061         * inspector/front-end/HeapSnapshot.js:
2062         (WebInspector.HeapSnapshotEdge.prototype.get isWeak):
2063         (WebInspector.HeapSnapshotEdge.prototype.toString):
2064         (WebInspector.HeapSnapshotEdge.prototype.get _hasStringName):
2065         (WebInspector.HeapSnapshotRetainerEdge.prototype.get isWeak):
2066         (WebInspector.HeapSnapshot.prototype._init):
2067         (WebInspector.HeapSnapshotPathFinder.prototype._fillRootChildren):
2068         (WebInspector.HeapSnapshotPathFinder.prototype._skipEdge):
2069
2070 2011-12-05  Sheriff Bot  <webkit.review.bot@gmail.com>
2071
2072         Unreviewed, rolling out r102004.
2073         http://trac.webkit.org/changeset/102004
2074         https://bugs.webkit.org/show_bug.cgi?id=73835
2075
2076         Breaks qt minimal release compilation (Requested by vsevik on
2077         #webkit).
2078
2079         * inspector/CodeGeneratorInspector.py:
2080         (Capitalizer.upper_camel_case_to_lower):
2081         (RawTypes.get):
2082         (RawTypes.String.get_c_param_type):
2083         (RawTypes.Object.get_c_param_type):
2084         (RawTypes.Object):
2085         (ParamType):
2086         (TypeData.__init__):
2087         (TypeData.get_raw_type):
2088         (TypeMap.__init__):
2089         (InspectorFrontend_h):
2090         (InspectorArray):
2091         (InspectorObject):
2092         (String):
2093         (InspectorBackendDispatcher_h):
2094         (Generator.process_command):
2095         * inspector/InspectorValues.h:
2096
2097 2011-12-05  Peter Rybin  <peter.rybin@gmail.com>
2098
2099         Web Inspector: [protocol] generate C++ classes for protocol JSON named types
2100         https://bugs.webkit.org/show_bug.cgi?id=72835
2101
2102         Reviewed by Yury Semikhatsky.
2103
2104         Extends python generator functionality.
2105         Makes constructor in InspectorObject public.
2106
2107         * inspector/CodeGeneratorInspector.py:
2108         * inspector/InspectorValues.h:
2109
2110 2011-12-05  Pavel Podivilov  <podivilov@chromium.org>
2111
2112         Web Inspector: fix fronted compilation.
2113         https://bugs.webkit.org/show_bug.cgi?id=73831
2114
2115         Reviewed by Yury Semikhatsky.
2116
2117         * inspector/front-end/CompilerSourceMapping.js:
2118         (WebInspector.ClosureCompilerSourceMappingPayload):
2119
2120 2011-12-05  Eric Carlson  <eric.carlson@apple.com>
2121
2122         Out-of-band text tracks may only load from same origin as the media element's Document's origin
2123         https://bugs.webkit.org/show_bug.cgi?id=73184
2124
2125         Reviewed by Sam Weinig.
2126
2127         Test: http/tests/security/text-track-crossorigin.html
2128
2129         * html/HTMLTrackElement.cpp:
2130         (WebCore::urlForLogging): Debug-only function for logging urls.
2131         (WebCore::HTMLTrackElement::scheduleLoad): Call canLoadUrl() before passing control off to
2132             the Track.
2133         (WebCore::HTMLTrackElement::canLoadUrl): Don't ask HTMLMediaElement to validate the url, the
2134             requirements for <track> are different from <video>.
2135         (WebCore::HTMLTrackElement::didCompleteLoad): Change bool param to enum.
2136         (WebCore::HTMLTrackElement::mediaElementCrossOriginAttribute): New, return parent 'crossorigin' 
2137             attribute value.
2138         * html/HTMLTrackElement.h:
2139
2140         * html/LoadableTextTrack.cpp:
2141         (WebCore::LoadableTextTrack::scheduleLoad): Add comments from the spec.
2142         (WebCore::LoadableTextTrack::loadTimerFired): Always cancel pending loads. Let the caller know 
2143             if the loader refuses the url immediately.
2144         (WebCore::LoadableTextTrack::cueLoadingStarted): The <track> deals with readyState.
2145         (WebCore::LoadableTextTrack::cueLoadingCompleted): HTMLTrackElement::didCompleteLoad takes
2146             an enum, not a bool.
2147
2148         * loader/TextTrackLoader.cpp:
2149         (WebCore::TextTrackLoader::corsPolicyPreventedLoad): New, log the error and set m_state.
2150         (WebCore::TextTrackLoader::notifyFinished): Check for CORS failure.
2151         (WebCore::TextTrackLoader::load): Take media element cross-origin attribute as a param so we
2152             can make the correct checks.
2153         * loader/TextTrackLoader.h:
2154
2155 2011-12-05  Roland Steiner  <rolandsteiner@chromium.org>
2156
2157         "Raw" pseudo selectors don't match if immediately after a child or descendant combinator
2158         https://bugs.webkit.org/show_bug.cgi?id=72933
2159
2160         Remove shortcut that prevents universal selectors from being created before shadow pseudo-elements.
2161
2162         Reviewed by Antti Koivisto.
2163
2164         * css/CSSParser.cpp:
2165         (WebCore::CSSParser::updateSpecifiersWithElementName):
2166
2167 2011-12-05  Sheriff Bot  <webkit.review.bot@gmail.com>
2168
2169         Unreviewed, rolling out r101983.
2170         http://trac.webkit.org/changeset/101983
2171         https://bugs.webkit.org/show_bug.cgi?id=73827
2172
2173         It broke all tests on GTK and on Qt in debug mode (Requested
2174         by Ossy on #webkit).
2175
2176         * dom/Document.h:
2177         (WebCore::Node::Node):
2178         * dom/Node.cpp:
2179         (WebCore::Node::~Node):
2180         * dom/Node.h:
2181         (WebCore::Node::inDocument):
2182
2183 2011-12-05  Roland Steiner  <rolandsteiner@chromium.org>
2184
2185         <style scoped>: Add 'scoped' attribute
2186         https://bugs.webkit.org/show_bug.cgi?id=67718
2187
2188         Add 'scoped' attribute to IDL and attribute list,
2189         implement and test setting/resetting of the attribute.
2190
2191         Reviewed by Antti Koivisto.
2192
2193         Test: fast/css/style-scoped/basic-attribute.html
2194
2195         * html/HTMLAttributeNames.in:
2196         * html/HTMLStyleElement.cpp:
2197         (WebCore::HTMLStyleElement::scoped):
2198         (WebCore::HTMLStyleElement::setScoped):
2199         (WebCore::HTMLStyleElement::scopingElement):
2200         * html/HTMLStyleElement.h:
2201         * html/HTMLStyleElement.idl:
2202
2203 2011-12-05  Hajime Morrita  <morrita@chromium.org>
2204
2205         [Refactoring] Accessing Node::m_document should be minimized.
2206         https://bugs.webkit.org/show_bug.cgi?id=73800
2207
2208         Reviewed by Kent Tamura.
2209
2210         No new tests. No behavioral change.
2211
2212         Replaced m_document reference with the document() accessor
2213         or temporaril variables. This is a preparation for using
2214         m_document space to point a shadow root pointer.
2215
2216         * dom/Document.h:
2217         (WebCore::Node::Node):
2218         * dom/Node.cpp:
2219         (WebCore::Node::~Node):
2220         * dom/Node.h:
2221         (WebCore::Node::inDocument):
2222
2223 2011-12-05  Shinya Kawanaka  <shinyak@google.com>
2224
2225         Asynchronous SpellChecker should consider multiple requests.
2226         https://bugs.webkit.org/show_bug.cgi?id=72939
2227
2228         Reviewed by Hajime Morita.
2229
2230         Now SpellChecker saves a request when it is processing the previous spellcheck request.
2231         If there is a request having the same root editable element, the older request is replaced by newer request
2232
2233         Test: editing/spelling/spellcheck-queue.html
2234
2235         * editing/SpellChecker.cpp:
2236         (WebCore::SpellChecker::SpellCheckRequest::SpellCheckRequest):
2237           A structure to have spell check request.
2238         (WebCore::SpellChecker::SpellCheckRequest::sequence):
2239         (WebCore::SpellChecker::SpellCheckRequest::range):
2240         (WebCore::SpellChecker::SpellCheckRequest::text):
2241         (WebCore::SpellChecker::SpellCheckRequest::mask):
2242         (WebCore::SpellChecker::SpellCheckRequest::rootEditableElement):
2243         (WebCore::SpellChecker::SpellChecker):
2244         (WebCore::SpellChecker::createRequest):
2245         (WebCore::SpellChecker::timerFiredToProcessQueuedRequest):
2246           When timer is fired, queued request is processed if any.
2247         (WebCore::SpellChecker::canCheckAsynchronously):
2248         (WebCore::SpellChecker::requestCheckingFor):
2249           When the spellchecker is processing another request, the latest request is queued.
2250         (WebCore::SpellChecker::invokeRequest):
2251         (WebCore::SpellChecker::enqueueRequest):
2252           Enqueues a request. If there is an older request whose root editable element is the same as the request,
2253           it will be replaced.
2254         (WebCore::SpellChecker::didCheck):
2255         * editing/SpellChecker.h:
2256
2257 2011-12-05  Eric Carlson  <eric.carlson@apple.com>
2258
2259         WebCore part of: Add WebKit preferences for text track settings
2260         https://bugs.webkit.org/show_bug.cgi?id=73721
2261
2262         Reviewed by John Sullivan.
2263
2264         No new tests yet, still nothing to test.
2265
2266         * page/Settings.cpp:
2267         (WebCore::Settings::setShouldDisplaySubtitles): Move the setters to the .cpp file so they
2268             aren't inlined.
2269         (WebCore::Settings::setShouldDisplayCaptions): Ditto.
2270         (WebCore::Settings::setShouldDisplayTextDescriptions): Ditto.
2271         * page/Settings.h:
2272
2273 2011-12-05  Noel Gordon  <noel.gordon@gmail.com>
2274
2275         ImageDecoder setSize() should check for backing store allocation failure
2276         https://bugs.webkit.org/show_bug.cgi?id=72864
2277
2278         Reviewed by Adam Barth.
2279
2280         The backing store of a decoded image is a Vector<PixelData> on the affected
2281         ports. And Vector<> provides a resize capacity member that returns false if
2282         memory allocation fails.
2283
2284         setSize() should be called once only during an image decode - add an ASSERT
2285         for that. Resize the backing store capacity to the requested image size and
2286         return false if memory allocation fails.
2287
2288         ImageDecoder::isOverSize(width, height) is called to check that the decoded
2289         width and height won't overflow 'width x height x sizeof(PixelData)' before
2290         calls to setSize(). Refer to http://webkit.org/b/48634
2291
2292         No new tests. Covered by fast/images/size-failure.html
2293
2294         * platform/image-decoders/ImageDecoder.cpp:
2295         (WebCore::ImageFrame::setSize):
2296
2297 2011-12-04  Andreas Kling  <kling@webkit.org>
2298
2299         CSSStyleSheet can't be reparented, enforce this at compile time.
2300         <http://webkit.org/b/73793>
2301
2302         Reviewed by Benjamin Poulain.
2303
2304         * css/StyleSheet.h:
2305         (WebCore::StyleSheet::clearOwnerRule):
2306
2307             Changed setParentRule(CSSImportRule*) to clearOwnerRule() to document and
2308             enforce the fact that style sheets should never be reparented after creation.
2309
2310         (WebCore::StyleSheet::ownerRule):
2311
2312             Renamed parentRule() to ownerRule() to match the CSSOM name.
2313
2314         (WebCore::StyleSheet::ownerNode):
2315         (WebCore::StyleSheet::clearOwnerNode):
2316
2317             Also renamed StyleSheet::m_parentNode to m_ownerNode to match its accessors.
2318
2319         * css/CSSStyleSheet.h:
2320
2321             Removed ownerRule() as we now inherit it from StyleSheet.
2322
2323         * bindings/js/JSDOMBinding.h:
2324         (WebCore::root):
2325         * css/CSSImportRule.cpp:
2326         (WebCore::CSSImportRule::~CSSImportRule):
2327         (WebCore::CSSImportRule::setCSSStyleSheet):
2328         * css/StyleSheet.cpp:
2329         (WebCore::StyleSheet::StyleSheet):
2330         (WebCore::StyleSheet::parentStyleSheet):
2331         (WebCore::StyleSheet::baseURL):
2332         * inspector/InspectorStyleSheet.cpp:
2333         (WebCore::fillMediaListChain):
2334
2335             Update call sites to use the new names.
2336
2337 2011-12-04  Andreas Kling  <kling@webkit.org>
2338
2339         border-width: initial and border-color: initial cannot be removed via CSSOM.
2340         <http://webkit.org/b/68551>
2341
2342         Reviewed by Darin Adler.
2343
2344         Test: fast/css/cssom-remove-shorthand-property.html
2345
2346         When asked to remove a shorthand property, we should toss out both the
2347         sub-properties of that shorthand as well as the shorthand itself, should the
2348         declaration contain it. The latter part was missing in our implementation.
2349
2350         * css/CSSMutableStyleDeclaration.h:
2351         * css/CSSMutableStyleDeclaration.cpp:
2352         (WebCore::CSSMutableStyleDeclaration::removePropertiesInSet):
2353         (WebCore::CSSMutableStyleDeclaration::removeShorthandProperty):
2354
2355             Changed to return true only if something was actually removed.
2356
2357 2011-12-04  Ryosuke Niwa  <rniwa@webkit.org>
2358
2359         HIERARCHY_REQUEST_ERR check in checkAcceptChild should be optimized for newChild without children
2360         https://bugs.webkit.org/show_bug.cgi?id=73737
2361
2362         Reviewed by Darin Adler.
2363
2364         It turned out that 50-70% of nodes inserted by DOM APIs such as insertBefore and appendChild
2365         don't have any descendent nodes. Optimize isDescendantOf which is used by checkAcceptChild for this case.
2366         On a test case attached on the bug, we see a 40% improvement.
2367
2368         Also optimize for cases where either new child or new parent but not both are in document as suggested
2369         by Erik Arvidsson. This appears to happen about 40-70% of the time, and the symmetric difference between
2370         the two cases is about 50% so it's worth implementing both optimizations.
2371
2372         Unfortunately no tests because we still have a O(n) algorithm somewhere.
2373
2374         * dom/Node.cpp:
2375         (WebCore::Node::isDescendantOf):
2376         (WebCore::Node::contains):
2377
2378 2011-12-04  Andreas Kling  <kling@webkit.org>
2379
2380         CSSValuePool: Inline trivial getters.
2381         <http://webkit.org/b/73763>
2382
2383         Reviewed by Anders Carlsson.
2384
2385         * css/CSSValuePool.cpp:
2386         * css/CSSValuePool.h:
2387         (WebCore::CSSValuePool::createInheritedValue): Inlined.
2388         (WebCore::CSSValuePool::createImplicitInitialValue): Ditto.
2389         (WebCore::CSSValuePool::createExplicitInitialValue): Ditto.
2390
2391 2011-12-03  Noel Gordon  <noel.gordon@gmail.com>
2392
2393         Fix WebPImageDecoder decoder leak.
2394         https://bugs.webkit.org/show_bug.cgi?id=73756
2395
2396         Reviewed by Andreas Kling.
2397
2398         Delete the m_decoder member in the destructor if needed with WebPIDelete.
2399
2400         No new tests, it's valgrind territory.
2401
2402         * platform/image-decoders/webp/WEBPImageDecoder.cpp:
2403         (WebCore::WEBPImageDecoder::~WEBPImageDecoder):
2404
2405 2011-12-03  Andreas Kling  <kling@webkit.org>
2406
2407         CSSStyleSheet: Parent rule can only ever be @import, enforce this at compile time.
2408         <http://webkit.org/b/73725>
2409
2410         Reviewed by Darin Adler.
2411
2412         Made StyleSheet::m_parentRule a CSSImportRule* rather than a CSSRule*
2413         and updated getters, setters and constructors accordingly.
2414
2415         There is no change in behavior, this simply enforces the status quo.
2416
2417         * WebCore.xcodeproj/project.pbxproj:
2418         * bindings/js/JSDOMBinding.h:
2419         * bindings/scripts/CodeGeneratorV8.pm:
2420         (AddIncludesForType):
2421         * css/CSSStyleSheet.cpp:
2422         (WebCore::CSSStyleSheet::CSSStyleSheet):
2423         * css/CSSStyleSheet.h:
2424         (WebCore::CSSStyleSheet::create):
2425         (WebCore::CSSStyleSheet::ownerRule):
2426         * css/StyleSheet.cpp:
2427         (WebCore::StyleSheet::StyleSheet):
2428         * css/StyleSheet.h:
2429         (WebCore::StyleSheet::parentRule):
2430         (WebCore::StyleSheet::setParentRule):
2431
2432 2011-12-03  Andreas Kling  <kling@webkit.org>
2433
2434         Unreviewed, revert accidental change from r101932.
2435
2436         * bindings/scripts/CodeGeneratorV8.pm:
2437         (AddIncludesForType):
2438
2439 2011-12-03  Mary Wu  <mary.wu@torchmobile.com.cn>
2440
2441         Upstream 4 files into WebCore/platform/blackberry
2442         https://bugs.webkit.org/show_bug.cgi?id=73614
2443
2444         Reviewed by Eric Seidel.
2445
2446         * platform/blackberry/CursorBlackBerry.cpp: Added.
2447         (WebCore::AllCursors::AllCursors):
2448         (WebCore::getCursor):
2449         (WebCore::Cursor::Cursor):
2450         (WebCore::Cursor::~Cursor):
2451         (WebCore::Cursor::operator=):
2452         (WebCore::aliasCursor):
2453         (WebCore::cellCursor):
2454         (WebCore::columnResizeCursor):
2455         (WebCore::contextMenuCursor):
2456         (WebCore::copyCursor):
2457         (WebCore::crossCursor):
2458         (WebCore::eastResizeCursor):
2459         (WebCore::eastWestResizeCursor):
2460         (WebCore::grabbingCursor):
2461         (WebCore::grabCursor):
2462         (WebCore::handCursor):
2463         (WebCore::helpCursor):
2464         (WebCore::iBeamCursor):
2465         (WebCore::moveCursor):
2466         (WebCore::noDropCursor):
2467         (WebCore::noneCursor):
2468         (WebCore::northEastResizeCursor):
2469         (WebCore::northEastSouthWestResizeCursor):
2470         (WebCore::northResizeCursor):
2471         (WebCore::northSouthResizeCursor):
2472         (WebCore::northWestResizeCursor):
2473         (WebCore::northWestSouthEastResizeCursor):
2474         (WebCore::notAllowedCursor):
2475         (WebCore::pointerCursor):
2476         (WebCore::progressCursor):
2477         (WebCore::rowResizeCursor):
2478         (WebCore::southEastResizeCursor):
2479         (WebCore::southResizeCursor):
2480         (WebCore::southWestResizeCursor):
2481         (WebCore::verticalTextCursor):
2482         (WebCore::waitCursor):
2483         (WebCore::westResizeCursor):
2484         (WebCore::zoomInCursor):
2485         (WebCore::zoomOutCursor):
2486         (WebCore::middlePanningCursor):
2487         (WebCore::eastPanningCursor):
2488         (WebCore::northPanningCursor):
2489         (WebCore::northEastPanningCursor):
2490         (WebCore::northWestPanningCursor):
2491         (WebCore::southPanningCursor):
2492         (WebCore::southEastPanningCursor):
2493         (WebCore::southWestPanningCursor):
2494         (WebCore::westPanningCursor):
2495         * platform/blackberry/DragDataBlackBerry.cpp: Added.
2496         (WebCore::DragData::canSmartReplace):
2497         (WebCore::DragData::containsColor):
2498         (WebCore::DragData::containsCompatibleContent):
2499         (WebCore::DragData::containsFiles):
2500         (WebCore::DragData::containsPlainText):
2501         (WebCore::DragData::containsURL):
2502         (WebCore::DragData::asFilenames):
2503         (WebCore::DragData::asColor):
2504         (WebCore::DragData::asPlainText):
2505         (WebCore::DragData::asURL):
2506         (WebCore::DragData::asFragment):
2507         * platform/blackberry/DragImageBlackBerry.cpp: Added.
2508         (WebCore::createDragImageFromImage):
2509         (WebCore::createDragImageIconForCachedImage):
2510         (WebCore::deleteDragImage):
2511         (WebCore::dissolveDragImageToFraction):
2512         (WebCore::scaleDragImage):
2513         (WebCore::dragImageSize):
2514         * platform/blackberry/EventLoopBlackBerry.cpp: Added.
2515         (WebCore::EventLoop::platformInit):
2516         (WebCore::EventLoop::cycle):
2517
2518 2011-12-03  Andreas Kling  <kling@webkit.org>
2519
2520         Cache CSSInitialValue instances per-document.
2521         <http://webkit.org/b/73745>
2522
2523         Reviewed by Oliver Hunt.
2524
2525         Test: http/tests/security/cross-origin-css-primitive.html
2526
2527         Have CSSValuePool manage the caching of CSSInitialValue objects.
2528
2529         * css/CSSInitialValue.h:
2530         (WebCore::CSSInitialValue::createExplicit):
2531         (WebCore::CSSInitialValue::createImplicit):
2532         (WebCore::CSSInitialValue::CSSInitialValue):
2533         * css/CSSParser.cpp:
2534         (WebCore::CSSParser::parseValue):
2535         (WebCore::CSSParser::parseFillShorthand):
2536         (WebCore::CSSParser::parseAnimationShorthand):
2537         (WebCore::CSSParser::parseTransitionShorthand):
2538         (WebCore::CSSParser::parseShorthand):
2539         * css/CSSValuePool.cpp:
2540         (WebCore::CSSValuePool::CSSValuePool):
2541         (WebCore::CSSValuePool::createImplicitInitialValue):
2542         (WebCore::CSSValuePool::createExplicitInitialValue):
2543         * css/CSSValuePool.h:
2544
2545 2011-12-03  Andreas Kling  <kling@webkit.org>
2546
2547         Keep CSSInheritedValue in the CSS value pool.
2548         <http://webkit.org/b/73747>
2549
2550         Reviewed by Antti Koivisto.
2551
2552         We only need one CSSInheritedValue instance per document, so cache it
2553         in CSSValuePool and have the parser create it through there.
2554
2555         * css/CSSParser.cpp:
2556         (WebCore::CSSParser::parseValue):
2557         * css/CSSValuePool.cpp:
2558         (WebCore::CSSValuePool::CSSValuePool):
2559         (WebCore::CSSValuePool::createInheritedValue):
2560         * css/CSSValuePool.h:
2561
2562 2011-12-03  Andreas Kling  <kling@webkit.org>
2563
2564         Rename CSSPrimitiveValueCache to CSSValuePool.
2565         <http://webkit.org/b/73742>
2566
2567         Reviewed by Antti Koivisto.
2568
2569         CSSPrimitiveValueCache -> CSSValuePool
2570         Document::primitiveValueCache() -> Document::cssValuePool()
2571
2572         This is in preparation for sharing more than just primitive values.
2573
2574         * CMakeLists.txt:
2575         * GNUmakefile.list.am:
2576         * Target.pri:
2577         * WebCore.gypi:
2578         * WebCore.vcproj/WebCore.vcproj:
2579         * WebCore.xcodeproj/project.pbxproj:
2580         * bindings/scripts/CodeGeneratorV8.pm:
2581         (AddIncludesForType):
2582         * css/CSSComputedStyleDeclaration.cpp:
2583         (WebCore::valueForNinePieceImageSlice):
2584         (WebCore::valueForNinePieceImageQuad):
2585         (WebCore::valueForNinePieceImageRepeat):
2586         (WebCore::valueForNinePieceImage):
2587         (WebCore::zoomAdjustedPixelValue):
2588         (WebCore::zoomAdjustedNumberValue):
2589         (WebCore::zoomAdjustedPixelValueForLength):
2590         (WebCore::valueForReflection):
2591         (WebCore::getPositionOffsetValue):
2592         (WebCore::CSSComputedStyleDeclaration::currentColorOrValidColor):
2593         (WebCore::getBorderRadiusCornerValue):
2594         (WebCore::computedTransform):
2595         (WebCore::CSSComputedStyleDeclaration::valueForFilter):
2596         (WebCore::valueForGridTrackList):
2597         (WebCore::getDelayValue):
2598         (WebCore::getDurationValue):
2599         (WebCore::createLineBoxContainValue):
2600         (WebCore::CSSComputedStyleDeclaration::getFontSizeCSSValuePreferringKeyword):
2601         (WebCore::CSSComputedStyleDeclaration::valueForShadow):
2602         (WebCore::valueForFamily):
2603         (WebCore::renderTextDecorationFlagsToCSSValue):
2604         (WebCore::fillRepeatToCSSValue):
2605         (WebCore::fillSizeToCSSValue):
2606         (WebCore::contentToCSSValue):
2607         (WebCore::counterToCSSValue):
2608         (WebCore::fontFamilyFromStyle):
2609         (WebCore::lineHeightFromStyle):
2610         (WebCore::fontSizeFromStyle):
2611         (WebCore::fontStyleFromStyle):
2612         (WebCore::fontVariantFromStyle):
2613         (WebCore::fontWeightFromStyle):
2614         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2615         * css/CSSParser.cpp:
2616         (WebCore::parseColorValue):
2617         (WebCore::parseSimpleLengthValue):
2618         (WebCore::CSSParser::setStyleSheet):
2619         (WebCore::CSSParser::createPrimitiveNumericValue):
2620         (WebCore::CSSParser::createPrimitiveStringValue):
2621         (WebCore::CSSParser::parseValidPrimitive):
2622         (WebCore::CSSParser::parseValue):
2623         (WebCore::parseBackgroundClip):
2624         (WebCore::CSSParser::parseFillShorthand):
2625         (WebCore::CSSParser::parsePage):
2626         (WebCore::CSSParser::parseSizeParameter):
2627         (WebCore::CSSParser::parseContent):
2628         (WebCore::CSSParser::parseAttr):
2629         (WebCore::CSSParser::parseBackgroundColor):
2630         (WebCore::CSSParser::parseFillPositionX):
2631         (WebCore::CSSParser::parseFillPositionY):
2632         (WebCore::CSSParser::parseFillPositionComponent):
2633         (WebCore::CSSParser::parseFillPosition):
2634         (WebCore::CSSParser::parseFillRepeat):
2635         (WebCore::CSSParser::parseFillSize):
2636         (WebCore::CSSParser::parseFillProperty):
2637         (WebCore::CSSParser::parseAnimationDirection):
2638         (WebCore::CSSParser::parseAnimationFillMode):
2639         (WebCore::CSSParser::parseAnimationIterationCount):
2640         (WebCore::CSSParser::parseAnimationName):
2641         (WebCore::CSSParser::parseAnimationPlayState):
2642         (WebCore::CSSParser::parseAnimationProperty):
2643         (WebCore::CSSParser::parseAnimationTimingFunction):
2644         (WebCore::CSSParser::parseGridTrackList):
2645         (WebCore::CSSParser::parseDashboardRegions):
2646         (WebCore::CSSParser::parseCounterContent):
2647         (WebCore::CSSParser::parseShape):
2648         (WebCore::CSSParser::parseWrapShape):
2649         (WebCore::CSSParser::parseFont):
2650         (WebCore::CSSParser::parseFontFamily):
2651         (WebCore::CSSParser::parseFontStyle):
2652         (WebCore::CSSParser::parseFontVariant):
2653         (WebCore::CSSParser::parseFontWeight):
2654         (WebCore::CSSParser::parseColor):
2655         (WebCore::ShadowParseContext::ShadowParseContext):
2656         (WebCore::ShadowParseContext::commitLength):
2657         (WebCore::ShadowParseContext::commitStyle):
2658         (WebCore::CSSParser::parseShadow):
2659         (WebCore::CSSParser::parseReflect):
2660         (WebCore::CSSParser::parseFlex):
2661         (WebCore::BorderImageParseContext::BorderImageParseContext):
2662         (WebCore::CSSParser::parseBorderImage):
2663         (WebCore::CSSParser::parseBorderImageRepeat):
2664         (WebCore::BorderImageSliceParseContext::BorderImageSliceParseContext):
2665         (WebCore::BorderImageSliceParseContext::commitNumber):
2666         (WebCore::BorderImageSliceParseContext::commitBorderImageSlice):
2667         (WebCore::CSSParser::parseBorderImageSlice):
2668         (WebCore::BorderImageQuadParseContext::BorderImageQuadParseContext):
2669         (WebCore::BorderImageQuadParseContext::commitNumber):
2670         (WebCore::BorderImageQuadParseContext::commitBorderImageQuad):
2671         (WebCore::CSSParser::parseBorderImageQuad):
2672         (WebCore::CSSParser::parseBorderRadius):
2673         (WebCore::CSSParser::parseAspectRatio):
2674         (WebCore::CSSParser::parseCounter):
2675         (WebCore::parseDeprecatedGradientPoint):
2676         (WebCore::parseDeprecatedGradientColorStop):
2677         (WebCore::CSSParser::parseDeprecatedGradient):
2678         (WebCore::valueFromSideKeyword):
2679         (WebCore::parseGradientColorOrKeyword):
2680         (WebCore::CSSParser::parseLinearGradient):
2681         (WebCore::CSSParser::parseRadialGradient):
2682         (WebCore::CSSParser::parseCrossfade):
2683         (WebCore::CSSParser::parseCustomFilter):
2684         (WebCore::CSSParser::parseFilter):
2685         (WebCore::CSSParser::parseFlowThread):
2686         (WebCore::CSSParser::parseRegionThread):
2687         (WebCore::CSSParser::parseTextEmphasisStyle):
2688         (WebCore::CSSParser::parseFontFeatureSettings):
2689         * css/CSSParser.h:
2690         (WebCore::CSSParser::cssValuePool):
2691         * css/CSSValuePool.cpp: Renamed from Source/WebCore/css/CSSPrimitiveValueCache.cpp.
2692         (WebCore::CSSValuePool::CSSValuePool):
2693         (WebCore::CSSValuePool::~CSSValuePool):
2694         (WebCore::CSSValuePool::createIdentifierValue):
2695         (WebCore::CSSValuePool::createColorValue):
2696         (WebCore::CSSValuePool::createValue):
2697         * css/CSSValuePool.h: Renamed from Source/WebCore/css/CSSPrimitiveValueCache.h.
2698         (WebCore::CSSValuePool::create):
2699         (WebCore::CSSValuePool::createValue):
2700         * css/mediaControlsGtk.css:
2701         (audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider):
2702         * dom/Document.cpp:
2703         (WebCore::Document::cssValuePool):
2704         * dom/Document.h:
2705
2706 2011-12-03  Andreas Kling  <kling@webkit.org>
2707
2708         Shrink CSSValueList.
2709         <http://webkit.org/b/73732>
2710
2711         Reviewed by Antti Koivisto.
2712
2713         Packed CSSValueList::m_isSpaceSeparated into the CSSValue bit field
2714         and renamed it to m_isSpaceSeparatedValue, shrinking CSSValueList
2715         by one CPU word.
2716
2717         Also renamed CSSValue::m_isImplicit to m_isImplicitInitialValue
2718         for good measure.
2719
2720         * css/CSSInitialValue.h:
2721         (WebCore::CSSInitialValue::CSSInitialValue):
2722         * css/CSSValue.h:
2723         (WebCore::CSSValue::isImplicitInitialValue):
2724         (WebCore::CSSValue::CSSValue):
2725         * css/CSSValueList.cpp:
2726         (WebCore::CSSValueList::CSSValueList):
2727         (WebCore::CSSValueList::copy):
2728         (WebCore::CSSValueList::customCssText):
2729         * css/CSSValueList.h:
2730         (WebCore::CSSValueList::isSpaceSeparated):
2731
2732 2011-12-02  Philippe Normand  <pnormand@igalia.com>
2733
2734         [GStreamer] Fullscreen controller support for the new WebKit Fullscreen API
2735         https://bugs.webkit.org/show_bug.cgi?id=66968
2736
2737         Reviewed by Martin Robinson.
2738
2739         * GNUmakefile.am: Don't use the Quicktime fullscreen CSS anymore,
2740         it wasn't suited for GTK in the first place anyway.
2741         * platform/gtk/RenderThemeGtk.cpp:
2742         (WebCore::RenderThemeGtk::extraFullScreenStyleSheet): Simply reuse
2743         GTK CSS.
2744
2745 2011-12-03  Alejandro G. Castro  <alex@igalia.com>
2746
2747         [GTK] TextureMapperNode should not use Qt types and functions
2748         https://bugs.webkit.org/show_bug.cgi?id=73713
2749
2750         Replace qreal with double and qMin with std::min.
2751
2752         Reviewed by Noam Rosenthal.
2753
2754         * platform/graphics/texmap/TextureMapperNode.cpp:
2755         (WebCore::solveCubicBezierFunction):
2756         (WebCore::solveStepsFunction):
2757
2758 2011-12-03  Dan Winship  <danw@gnome.org>
2759
2760         [GTK] Remove lots of code that is now unnecessary after
2761         SoupRequestHTTP API changes.
2762         https://bugs.webkit.org/show_bug.cgi?id=71611
2763
2764         Reviewed by Martin Robinson.
2765
2766         No new tests; behavior is unchanged
2767
2768         * platform/network/ResourceHandleInternal.h:
2769         (WebCore::ResourceHandleInternal::ResourceHandleInternal): remove
2770         no-longer-needed fields.
2771         * platform/network/soup/ResourceHandleSoup.cpp:
2772         (WebCore::finishedCallback): remove this, and m_finished, which
2773         we no longer need to explicitly track
2774         (WebCore::statusWillBeHandledBySoup):
2775         (WebCore::soupErrorShouldCauseLoadFailure): No longer needed;
2776         SoupRequestHTTP's logic is now aligned with WebKit's.
2777         (WebCore::gotChunkCallback): remove gotChunkCallback, which
2778         is no longer needed
2779         (WebCore::startHTTPRequest):
2780         (WebCore::sendRequestCallback):
2781         (WebCore::gotHeadersCallback):
2782         (WebCore::contentSniffedCallback): merge the code from
2783         gotHeadersCallback and contentSniffedCallback into
2784         sendRequestCallback
2785         * platform/network/soup/ResourceResponseSoup.cpp:
2786         (WebCore::ResourceResponse::updateFromSoupMessage): move the
2787         sniffing override logic here
2788
2789 2011-12-03  Sheriff Bot  <webkit.review.bot@gmail.com>
2790
2791         Unreviewed, rolling out r101904.
2792         http://trac.webkit.org/changeset/101904
2793         https://bugs.webkit.org/show_bug.cgi?id=73739
2794
2795         It broke zillions of tests on all bot (Requested by
2796         Ossy_weekend on #webkit).
2797
2798         * bindings/js/JSDOMWindowCustom.cpp:
2799         (WebCore::handlePostMessage):
2800
2801 2011-12-02  Kentaro Hara  <haraken@chromium.org>
2802
2803         [Refactoring] Use join(", ", @arguments) to build a method argument string in CodeGenerator*.pm
2804         https://bugs.webkit.org/show_bug.cgi?id=73651
2805
2806         Reviewed by Darin Adler.
2807
2808         The code in CodeGenerator*.pm to build a method argument string is really dirty
2809         and error-prone. It is building an argument string incrementally judging whether
2810         ", " is necessary or not, like this:
2811
2812             my $method = ... ? "func(" : "func(a";
2813             if (...) {
2814                 $method .= $method =~ /\($/ ? "b" : ", b";
2815             }
2816             $method .= ")";
2817
2818         Alternatively, we can refactor the code as follows:
2819
2820             my $funcName = "func";
2821             my @arguments;
2822             push(@arguments, "a") if (...);
2823             push(@arguments, "b") if (...);
2824             my $method = $funcName . "(" . join(", ", @arguments) . ")";
2825
2826         This patch just refactors the code, and generated .h and .cpp files should be
2827         exactly the same as the current .h and .cpp files.
2828
2829         Tests: bindings/scripts/test/*
2830
2831         * bindings/scripts/CodeGenerator.pm:
2832         (GetterExpression):
2833         (SetterExpression):
2834         * bindings/scripts/CodeGeneratorCPP.pm:
2835         (GenerateImplementation):
2836         * bindings/scripts/CodeGeneratorGObject.pm:
2837         ():
2838         * bindings/scripts/CodeGeneratorJS.pm:
2839         (GenerateImplementation):
2840         * bindings/scripts/CodeGeneratorObjC.pm:
2841         (GenerateImplementation):
2842         * bindings/scripts/CodeGeneratorV8.pm:
2843         (GenerateNormalAttrGetter):
2844         (GenerateNormalAttrSetter):
2845
2846 2011-12-02  David Levin  <levin@chromium.org>
2847
2848         Rename WTF class from TemporarilyChange to TemporaryChange.
2849         https://bugs.webkit.org/show_bug.cgi?id=73479
2850
2851         Reviewed by Eric Seidel.
2852
2853         * ForwardingHeaders/wtf/TemporarilyChange.h: Removed.
2854         * ForwardingHeaders/wtf/TemporaryChange.h: Added.
2855         * page/FrameView.cpp:
2856         (WebCore::FrameView::forceLayoutParentViewIfNeeded):
2857         (WebCore::FrameView::layout):
2858         (WebCore::FrameView::setScrollPosition):
2859         (WebCore::FrameView::autoSizeIfEnabled):
2860
2861 2011-12-02  Armand Navabi  <armand.navabi@gmail.com>
2862
2863         ASSERT fails in updateState ACTION_DRAW case
2864         https://bugs.webkit.org/show_bug.cgi?id=73351
2865
2866         Reviewed by James Robinson.
2867
2868         Changed ASSERT in CCSchedulerStateMachine to include ( || !m_visible) as discussed in bug 
2869         report. m_commitState is set to COMMIT_STATE_WAITING_FOR_FIRST_DRAW if m_needsCommit or
2870         !m_visible, so in ACTION_DRAW the assert should have both conditions.
2871
2872         * platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp:
2873         (WebCore::CCSchedulerStateMachine::updateState):
2874
2875 2011-12-02  Shawn Singh  <shawnsingh@chromium.org>
2876
2877         [chromium] Scissor rect optimization for chromium compositor
2878         https://bugs.webkit.org/show_bug.cgi?id=67341
2879
2880         Reviewed by James Robinson.
2881
2882         Mostly covered by damage tracker tests. Currently this relies on
2883         manually running layout tests, because this patch requires partial
2884         swaps that are not supported by DumpRenderTree. The feature
2885         automatically disables if partial swap is not supported.
2886
2887         * platform/graphics/chromium/LayerRendererChromium.cpp:
2888         (WebCore::LayerRendererChromium::initialize):
2889         (WebCore::LayerRendererChromium::trackDamageForAllSurfaces):
2890         (WebCore::LayerRendererChromium::drawLayersOntoRenderSurfaces):
2891         (WebCore::LayerRendererChromium::drawLayersInternal):
2892         (WebCore::LayerRendererChromium::swapBuffers):
2893         (WebCore::LayerRendererChromium::drawLayer):
2894         * platform/graphics/chromium/LayerRendererChromium.h:
2895         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
2896         (WebCore::CCSettings::CCSettings):
2897         (WebCore::LayerRendererCapabilities::LayerRendererCapabilities):
2898         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
2899         (WebCore::CCRenderSurface::draw):
2900         * platform/graphics/chromium/cc/CCRenderSurface.h:
2901
2902 2011-12-02  Dmitry Lomov  <dslomov@google.com>
2903
2904         https://bugs.webkit.org/show_bug.cgi?id=73691
2905         [JSC] Implement correct order of window.postMessage arguments.
2906
2907         Reviewed by Geoffrey Garen.
2908
2909         * bindings/js/JSDOMWindowCustom.cpp:
2910         (WebCore::handlePostMessage):
2911
2912 2011-12-02  Stephen Chenney  <schenney@chromium.org>
2913
2914         REGRESSION (r91125): Polyline tool in google docs is broken
2915         https://bugs.webkit.org/show_bug.cgi?id=65796
2916
2917         Reviewed by Darin Adler.
2918
2919         Work around a bug in CoreGraphics, that caused incorrect bounds for paths
2920         consisting only of move-to elements. This causes problems in SVG, when the enormous
2921         bounds prevented the drawing of things behind.
2922
2923         Tests: svg/custom/path-moveto-only-rendering.svg
2924                svg/custom/subpaths-moveto-only-rendering.svg
2925
2926         * platform/graphics/cg/PathCG.cpp:
2927         (WebCore::PathIsEmptyOrSingleMoveTester::PathIsEmptyOrSingleMoveTester): Class to
2928         test for isEmpty accoridng ot the same rules as other platforms.
2929         (WebCore::PathIsEmptyOrSingleMoveTester::isEmpty): Query the result
2930         (WebCore::PathIsEmptyOrSingleMoveTester::testPathElement): Path iterator method
2931         (WebCore::PathHasOnlyMoveToTester::PathHasOnlyMoveToTester): Class to test whether a
2932         path contains only move-to elements, and hence should have null bounds.
2933         (WebCore::PathHasOnlyMoveToTester::hasOnlyMoveTo): Query the result
2934         (WebCore::PathHasOnlyMoveToTester::testPathElement): Path iterator method.
2935         (WebCore::Path::boundingRect): Modified to check for move-to only paths
2936         (WebCore::Path::fastBoundingRect): Modified to check for move-to only paths
2937         (WebCore::Path::isEmpty): Now uses the method that matches other platforms.
2938         (WebCore::Path::hasCurrentPoint): Now uses CGPathIsEmpty directly
2939         (WebCore::Path::transform) : Now uses CGPathIsEmpty directly
2940
2941 2011-12-02  Mihnea Ovidenie  <mihnea@adobe.com>
2942
2943         [CSSRegions]More renaming for region style rules.
2944         https://bugs.webkit.org/show_bug.cgi?id=73526
2945
2946         Reviewed by Eric Seidel.
2947
2948         Rename isRegionStyleRule() -> isRegionRule()
2949         WEBKIT_REGION_STYLE_RULE -> WEBKIT_REGION_RULE.
2950
2951         * bindings/objc/DOMCSS.mm:
2952         (kitClass):
2953         * bindings/v8/custom/V8CSSRuleCustom.cpp:
2954         (WebCore::toV8):
2955         * css/CSSGrammar.y:
2956         * css/CSSParser.cpp:
2957         (WebCore::CSSParser::createRegionRule):
2958         * css/CSSParser.h:
2959         * css/CSSRule.cpp:
2960         (WebCore::CSSRule::cssText):
2961         (WebCore::CSSRule::destroy):
2962         * css/CSSRule.h:
2963         (WebCore::CSSRule::isRegionRule):
2964         * css/CSSRule.idl:
2965         * css/CSSStyleSelector.cpp:
2966         (WebCore::CSSStyleSelector::addRegionRule):
2967         (WebCore::RuleSet::addRulesFromSheet):
2968         * css/CSSStyleSelector.h:
2969         * css/WebKitCSSRegionRule.cpp:
2970         (WebCore::WebKitCSSRegionRule::WebKitCSSRegionRule):
2971         * css/tokenizer.flex:
2972
2973 2011-12-02  Tom Sepez  <tsepez@chromium.org>
2974
2975         XSSAuditor includes more terminating characters when truncating
2976         attribute values.
2977         https://bugs.webkit.org/show_bug.cgi?id=73684
2978
2979         Reviewed by Daniel Bates.
2980
2981         * html/parser/XSSAuditor.cpp:
2982         (WebCore::isTerminatingCharacter):
2983         (WebCore::XSSAuditor::eraseDangerousAttributesIfInjected):
2984
2985 2011-12-02  Tony Chang  <tony@chromium.org>
2986
2987         Need to implement flex-flow: column-reverse
2988         https://bugs.webkit.org/show_bug.cgi?id=73504
2989
2990         Reviewed by David Hyatt.
2991
2992         We can't just change the direction of the FlexOrderIterator because we want the overflow to be
2993         on the top. We can't just position them in the reverse location since we don't know where the
2994         bottom edge is until we've layed out the flex items. So we do an extra pass, but it should be
2995         fast since we're not laying out, just moving.
2996
2997         * rendering/RenderFlexibleBox.cpp:
2998         (WebCore::RenderFlexibleBox::flowAwareBorderEnd):
2999         (WebCore::RenderFlexibleBox::flowAwarePaddingEnd):
3000         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
3001         (WebCore::RenderFlexibleBox::layoutColumnReverse): Do an extra pass to reposition flexitems in the reverse order.
3002         * rendering/RenderFlexibleBox.h:
3003
3004 2011-12-02  Stephen Chenney  <schenney@chromium.org>
3005
3006         Divide by zero for zero-length arcs
3007         https://bugs.webkit.org/show_bug.cgi?id=73021
3008
3009         Reviewed by Nikolas Zimmermann.
3010
3011         A zero-length path produces divide by zero, resulting in nothing being
3012         drawn. This change modifies the behavior to produce a zero-length line
3013         which will generate correct linecaps.
3014
3015         Test: svg/stroke/zero-length-arc-linecaps-rendering.svg
3016
3017         * svg/SVGPathParser.cpp:
3018         (WebCore::SVGPathParser::parseArcToSegment): Catch the case of
3019         zero-length arcs and convert them to lines (the same as would happen
3020         for zero arc radii).
3021
3022 2011-12-02  James Wei <james.wei@intel.com> & Xingnan Wang <xingnan.wang@intel.com>
3023
3024         -Implement the SSE optimization for vsmul and vadd.
3025         https://bugs.webkit.org/show_bug.cgi?id=73182
3026
3027         Reviewed by Kenneth Russell.
3028
3029         * platform/audio/VectorMath.cpp:
3030         (WebCore:VectorMath):
3031
3032 2011-12-02  David Grogan  <dgrogan@chromium.org>
3033
3034         Grant workers experimental access to IndexedDB.
3035         https://bugs.webkit.org/show_bug.cgi?id=73609
3036
3037         Reviewed by Nate Chapin.
3038
3039         No new tests - there will be chromium ui tests that depend on
3040         webkit.org/b/73297.
3041
3042         * storage/IDBFactory.cpp:
3043         (WebCore::IDBFactory::open): Call new function,
3044         IDBFactoryBackendInterface::openFromWorker.
3045         * storage/IDBFactoryBackendImpl.cpp:
3046         (WebCore::IDBFactoryBackendImpl::open):
3047         (WebCore::IDBFactoryBackendImpl::openFromWorker):
3048         (WebCore::IDBFactoryBackendImpl::openInternal):
3049         * storage/IDBFactoryBackendImpl.h:
3050         * storage/IDBFactoryBackendInterface.h:
3051         * workers/WorkerContext.cpp:
3052         (WebCore::WorkerContext::webkitIndexedDB): Stores
3053         IDBFactoryBackendInterface, implemented by IDBFactoryBackendProxy in
3054         chromium, in the WorkerContext.  For the Document case it is stored in
3055         the PageGroup.  Storing it in the WorkerContext causes more memory
3056         churn, but that should be trivial.  I don't know of any better
3057         alternatives.
3058         * workers/WorkerContext.h:
3059         * workers/WorkerContext.idl:
3060
3061 2011-12-02  Aaron Colwell  <acolwell@chromium.org>
3062
3063         Fix mixed content handling for video in Chromium by having
3064         CachedResourceLoader & SubresourceLoader use the 
3065         ResourceRequest::TargetType when determining if a RawResource can
3066         be requested.
3067         https://bugs.webkit.org/show_bug.cgi?id=72178
3068
3069         Reviewed by Adam Barth.
3070
3071         Tests: http/tests/security/mixedContent/insecure-video-in-iframe.html
3072                http/tests/security/mixedContent/insecure-video-in-main-frame.html
3073                http/tests/security/mixedContent/redirect-http-to-https-video-in-main-frame.html
3074                http/tests/security/mixedContent/redirect-https-to-http-video-in-main-frame.html
3075
3076         * loader/SubresourceLoader.cpp:
3077         (WebCore::SubresourceLoader::willSendRequest):
3078         * loader/cache/CachedRawResource.cpp:
3079         (WebCore::CachedRawResource::CachedRawResource):
3080         * loader/cache/CachedRawResource.h:
3081         * loader/cache/CachedResource.cpp:
3082         (WebCore::defaultPriorityForResourceType):
3083         (WebCore::cachedResourceTypeToTargetType):
3084         (WebCore::CachedResource::targetTypeToCachedResourceType):
3085         * loader/cache/CachedResource.h:
3086         * loader/cache/CachedResourceLoader.cpp:
3087         (WebCore::createResource):
3088         (WebCore::CachedResourceLoader::checkInsecureContent):
3089         (WebCore::CachedResourceLoader::canRequest):
3090         (WebCore::CachedResourceLoader::requestResource):
3091
3092 2011-12-02  Sheriff Bot  <webkit.review.bot@gmail.com>
3093
3094         Unreviewed, rolling out r101731.
3095         http://trac.webkit.org/changeset/101731
3096         https://bugs.webkit.org/show_bug.cgi?id=73706
3097
3098         Broke copy and paste in chromium. (Requested by dcheng on #webkit).
3099
3100         * editing/SpellChecker.cpp:
3101         (WebCore::SpellChecker::SpellChecker):
3102         (WebCore::SpellChecker::initRequest):
3103         (WebCore::SpellChecker::clearRequest):
3104         (WebCore::SpellChecker::canCheckAsynchronously):
3105         (WebCore::SpellChecker::isBusy):
3106         (WebCore::SpellChecker::isValid):
3107         (WebCore::SpellChecker::requestCheckingFor):
3108         (WebCore::SpellChecker::doRequestCheckingFor):
3109         (WebCore::SpellChecker::didCheck):
3110         * editing/SpellChecker.h:
3111
3112 2011-12-02  Fady Samuel  <fsamuel@chromium.org>
3113
3114         When page scaling is in use position:fixed has incorrect results
3115         https://bugs.webkit.org/show_bug.cgi?id=68617
3116
3117         Reviewed by Simon Fraser.
3118
3119         Add the option for position:fixed elements to be fixed to the frame
3120         instead of the layout rectangle of the document.
3121
3122         Tests: fast/repaint/fixed-in-page-scale.html
3123                fast/repaint/fixed-right-bottom-in-page-scale.html
3124                fast/repaint/fixed-right-in-page-scale.html
3125
3126         * WebCore.exp.in:
3127         * page/FrameView.cpp:
3128         (WebCore::FrameView::reset):
3129         (WebCore::FrameView::scrollXForFixedPosition):
3130         (WebCore::FrameView::scrollYForFixedPosition):
3131           If position:fixed elements are relative to the frame, disregard the
3132           drag factor.
3133         (WebCore::FrameView::setShouldLayoutFixedElementsRelativeToFrame):
3134         * page/FrameView.h:
3135         (WebCore::FrameView::shouldLayoutFixedElementsRelativeToFrame):
3136         * rendering/RenderBox.cpp:
3137         (WebCore::RenderBox::shouldLayoutFixedElementRelativeToFrame):
3138         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
3139         (WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
3140           If position:fixed elements are relative to the frame, their container
3141           is the frame instead of the layout rect of the document. 
3142           This allows proper positioning of these elements to the right and
3143           bottom.
3144         * rendering/RenderBox.h:
3145         * testing/Internals.cpp:
3146         (WebCore::Internals::setShouldLayoutFixedElementsRelativeToFrame):
3147         * testing/Internals.h:
3148         * testing/Internals.idl:
3149           Allow enabling and disabling the new behavior in layout tests.
3150
3151 2011-12-02  Benjamin Poulain  <bpoulain@apple.com>
3152
3153         Build fix for SubresourceLoader when building with Core Foundation
3154         https://bugs.webkit.org/show_bug.cgi?id=73709
3155
3156         Reviewed by David Kilzer.
3157
3158         The patch r100311 removed SubresourceClient and merged it in SubresourceLoader.
3159         Consequently, m_client does not exist anymore and there is no need to do the check
3160         before invoking didReceiveData().
3161
3162         * loader/cf/SubresourceLoaderCF.cpp:
3163         (WebCore::SubresourceLoader::didReceiveDataArray):
3164
3165 2011-12-02  Andreas Kling  <kling@webkit.org>
3166
3167         StyledElement: Simplify addCSSColor().
3168         <http://webkit.org/b/73703>
3169
3170         Reviewed by Darin Adler.
3171
3172         The Color(const String&) constructor handles both named and 3/6-digit
3173         hex colors, so there's no need to handle those separately here.
3174         Also tweaked some comments and minor things.
3175
3176         * dom/StyledElement.cpp:
3177         (WebCore::StyledElement::addCSSColor):
3178
3179 2011-12-02  Benjamin Poulain  <bpoulain@apple.com>
3180
3181         Update platform/iphone to platform/ios
3182         https://bugs.webkit.org/show_bug.cgi?id=73708
3183
3184         Reviewed by Darin Adler.
3185
3186         The platform is now best known as iOS, update the platform layer accordingly.
3187
3188         * Configurations/WebCore.xcconfig:
3189         * WebCore.gypi:
3190         * WebCore.xcodeproj/project.pbxproj:
3191         * platform/cocoa/KeyEventCocoa.mm:
3192         * platform/ios/KeyEventCodesIOS.h: Renamed from Source/WebCore/platform/iphone/KeyEventCodesIPhone.h.
3193         * platform/ios/KeyEventIOS.mm: Renamed from Source/WebCore/platform/iphone/KeyEventIPhone.mm.
3194         (WebCore::keyIdentifierForKeyEvent):
3195         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
3196         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
3197         (WebCore::PlatformKeyboardEvent::currentCapsLockState):
3198         (WebCore::PlatformKeyboardEvent::getCurrentModifierState):
3199
3200 2011-12-02  Jonathan Backer  <backer@chromium.org>
3201
3202         [chromium] Eliminate unnecessary state on previous CL
3203         https://bugs.webkit.org/show_bug.cgi?id=73661
3204
3205         Reviewed by Kenneth Russell.
3206
3207         * platform/graphics/chromium/LayerRendererChromium.cpp:
3208         (WebCore::LayerRendererChromium::initialize):
3209         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3210         (WebCore::CCLayerTreeHost::initialize):
3211         (WebCore::CCLayerTreeHost::didBecomeInvisibleOnImplThread):
3212         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
3213         (WebCore::CCSettings::CCSettings):
3214         (WebCore::LayerRendererCapabilities::LayerRendererCapabilities):
3215
3216 2011-12-02  Dan Bernstein  <mitz@apple.com>
3217
3218         <rdar://problem/10520670> REGRESSION (r91738): didFinishLoad is called before custom fonts have finished loading
3219         https://bugs.webkit.org/show_bug.cgi?id=73688
3220
3221         Reviewed by Darin Adler.
3222
3223         The problem was that after CSSFontFaceSource::getFontData() had scheduled a 0-delay timer to
3224         begin loading the font, but before that timer fired, the subresource loader appeared to have
3225         had no resources waiting to be loaded, and therefore didFinishLoad could be called. This change
3226         reworks the fix for <http://webkit.org/b/65123> so that while the load is still started on a
3227         0-delay timer, the subresource loader’s request count is incremented immediately, preventing
3228         it from hitting 0 while the font load is scheduled to begin. The delayed load mechanism is
3229         moved from CSSFontFaceSource into CSSFontSelector in order to safely handle the possibility of
3230         the latter being decommissioned while waiting for font loading to begin.
3231
3232         * css/CSSFontFaceSource.cpp:
3233         (WebCore::CSSFontFaceSource::CSSFontFaceSource): Removed initializer for m_loadStartTimer.
3234         (WebCore::CSSFontFaceSource::~CSSFontFaceSource): Removed stopping of m_loadStartTimer.
3235         (WebCore::CSSFontFaceSource::getFontData): Replaced code to schedule loading on a timer with
3236         a call to CSSFontSelector::beginLoadingFontSoon.
3237         * css/CSSFontFaceSource.h: Removed m_loadStartTimer and m_fontSelector member variables.
3238         * css/CSSFontSelector.cpp:
3239         (WebCore::CSSFontSelector::CSSFontSelector): Added initialized for m_beginLoadingTimer.
3240         (WebCore::CSSFontSelector::~CSSFontSelector): Added call to clearDocument(), to deal with
3241         anything remaining in m_fontsToBeginLoading at this time.
3242         (WebCore::CSSFontSelector::clearDocument): Now stops m_beginLoadingTimer and balances
3243         incrementRequestCount() calls for anything remaining in m_fontsToBeginLoading.
3244         (WebCore::CSSFontSelector::beginLoadingFontSoon): Added. Schedules the actual call to
3245         CachedFont::beginLoadingIfNeeded on a 0-delay timer, and meanwhile increments the request count
3246         on the CachedResourceLoader, which ensures that didFinishLoad will not be called while waiting
3247         for the timer to fire.
3248         (WebCore::CSSFontSelector::beginLoadTimerFired): Added. Actually calls
3249         CachedFont::beginLoadIfNeeded and balances the incrementRequestCount() made when the timer was
3250         scheduled.
3251         * css/CSSFontSelector.h:
3252
3253 2011-12-02  David Tseng  <dtseng@google.com>
3254
3255         Send an AXCheckedStateChanged notification when the aria-checked attribute changes.
3256         https://bugs.webkit.org/show_bug.cgi?id=72754
3257
3258         Reviewed by Chris Fleizach.
3259
3260         Test: accessibility/aria-checkbox-sends-notification.html
3261
3262         * accessibility/AXObjectCache.cpp:
3263         (WebCore::AXObjectCache::checkedStateChanged):
3264         * accessibility/AXObjectCache.h:
3265         * dom/Element.cpp:
3266         (WebCore::Element::updateAfterAttributeChanged):
3267         * html/HTMLInputElement.cpp:
3268         (WebCore::HTMLInputElement::setChecked):
3269
3270 2011-12-02  Grace Kloba  <klobag@chromium.org>
3271
3272         [chromium] Recycle tile-sized textures during commit to prevent reallocations
3273         https://bugs.webkit.org/show_bug.cgi?id=70645
3274
3275         Reviewed by James Robinson.
3276
3277         Currently texture request is capped by the high limit while we reclaim the
3278         textures in each commit. This triggers new tiles always allocated when scrolling.
3279         The proposal is to recycle the texture during request if the total used memory
3280         is about to exceed the reclaim limit.
3281
3282         * platform/graphics/chromium/ManagedTexture.cpp:
3283         (WebCore::ManagedTexture::reserve):
3284         * platform/graphics/chromium/TextureManager.cpp:
3285         (WebCore::TextureManager::setMemoryLimitBytes):
3286         (WebCore::TextureManager::replaceTexture):
3287         (WebCore::TextureManager::requestTexture):
3288         * platform/graphics/chromium/TextureManager.h:
3289
3290 2011-12-02  Kent Tamura  <tkent@chromium.org>
3291
3292         [Chromium] Show placeholder even if the element is focused
3293         https://bugs.webkit.org/show_bug.cgi?id=73629
3294
3295         Reviewed by Hajime Morita.
3296
3297         No new tests. Need to update some existing placeholder tests.
3298
3299         * rendering/RenderThemeChromiumMac.h: Add shouldShowPlaceholderWhenFocused().
3300         * rendering/RenderThemeChromiumMac.mm:
3301         (WebCore::RenderThemeChromiumMac::shouldShowPlaceholderWhenFocused):
3302         Returns true.
3303         * rendering/RenderThemeChromiumSkia.cpp:
3304         (WebCore::RenderThemeChromiumSkia::shouldShowPlaceholderWhenFocused): ditto.
3305         * rendering/RenderThemeChromiumSkia.h: Add shouldShowPlaceholderWhenFocused().
3306
3307 2011-12-02  Kent Tamura  <tkent@chromium.org>
3308
3309         [Lion][Windows] Both of placeholder and input text are shown in <input type=number>
3310         https://bugs.webkit.org/show_bug.cgi?id=73615
3311
3312         Reviewed by Joseph Pecoraro.
3313
3314         Placeholder visibility was checked by HTMLInputElement::value
3315         emptiness. It should be innerTextValue emptiness because it is
3316         possible that a number field has empty HTMLInputElement::value and
3317         non-empty innerTextValue.
3318
3319         Tests: fast/forms/number/number-placeholder-with-unacceptable-value.html
3320
3321         * html/HTMLInputElement.cpp:
3322         (WebCore::HTMLInputElement::updateInnerTextValue):
3323         We should update placeholder visiblity when the innerTextValue is updated.
3324         (WebCore::HTMLInputElement::subtreeHasChanged): ditto.
3325         (WebCore::HTMLInputElement::setSuggestedValue):
3326         We don't need to call updatePlaceholderVisibility() because updateInnerTextValue() calls it.
3327         (WebCore::HTMLInputElement::setValueFromRenderer):
3328         We don't need to call updatePlaceholderVisibility() because subtreeHasChanged() calls it.
3329         * html/HTMLInputElement.h: Checks innerTextValue emptiness.
3330         * html/TextFieldInputType.cpp:
3331         (WebCore::TextFieldInputType::setValue):
3332         We don't need to call updatePlaceholderVisibility() because updateInnerTextValue() calls it.
3333
3334 2011-12-01  Alok Priyadarshi  <alokp@chromium.org>
3335
3336         [chromium] CCLayerQuad does not return FloatQuad in correct order
3337         https://bugs.webkit.org/show_bug.cgi?id=73247
3338
3339         Reviewed by James Robinson.
3340
3341         Returned the FloatQuad coordinates in correct order.
3342         
3343         Covered by new unit tests in CCLayerQuadTest.cpp.
3344
3345         * platform/graphics/chromium/cc/CCLayerQuad.cpp:
3346         (WebCore::CCLayerQuad::floatQuad):
3347
3348 2011-12-02  Sheriff Bot  <webkit.review.bot@gmail.com>
3349
3350         Unreviewed, rolling out r101833.
3351         http://trac.webkit.org/changeset/101833
3352         https://bugs.webkit.org/show_bug.cgi?id=73678
3353
3354         test_expectations file invalid: run Tools/Scripts/new-run-
3355         webkit-tests --lint-test-files (Requested by scheib on
3356         #webkit).
3357
3358         * platform/graphics/chromium/cc/CCLayerQuad.cpp:
3359         (WebCore::CCLayerQuad::floatQuad):
3360
3361 2011-12-02  Alok Priyadarshi  <alokp@chromium.org>
3362
3363         [chromium] CCLayerQuad does not return FloatQuad in correct orientation
3364         https://bugs.webkit.org/show_bug.cgi?id=73247
3365
3366         Reviewed by James Robinson.
3367
3368         Returned the FloatQuad coordinates in correct order.
3369         
3370         Covered by new unit tests in CCLayerQuadTest.cpp.
3371
3372         * platform/graphics/chromium/cc/CCLayerQuad.cpp:
3373         (WebCore::CCLayerQuad::floatQuad):
3374
3375 2011-12-01  Dmitry Lomov  <dslomov@google.com>
3376
3377         https://bugs.webkit.org/show_bug.cgi?id=73589
3378         [V8][Chromium] Adjust postMessage to the latest "implementation-ready" spec.
3379         - postMessage should support transfer of MessagePorts
3380         - the order of arguments to Window::postMessage and Window::webkitPostMessage should be (msg, targetOrigin [, transfer])
3381
3382         Reviewed by David Levin.
3383
3384         * bindings/v8/custom/V8DOMWindowCustom.cpp:
3385         (WebCore::handlePostMessageCallback):
3386         * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp:
3387         (WebCore::handlePostMessageCallback):
3388         * bindings/v8/custom/V8MessagePortCustom.cpp:
3389         (WebCore::handlePostMessageCallback):
3390         * bindings/v8/custom/V8WorkerCustom.cpp:
3391         (WebCore::handlePostMessageCallback):
3392
3393 2011-12-02  Enrica Casucci  <enrica@apple.com>
3394
3395         https://bugs.webkit.org/show_bug.cgi?id=73497
3396         This is a followup to the patch submitted for the bug above.
3397         Tha patch was landed in r101575 and I missed to make one of the changes
3398         suggested by the reviewer that had pointed out that the code was still
3399         making use of the deprecatedNode method.
3400
3401         Unreviewed.
3402
3403         * editing/DeleteSelectionCommand.cpp:
3404         (WebCore::DeleteSelectionCommand::removeRedundantBlocks): Changed deprecatedNode to containerNode.
3405
3406 2011-12-02  Tom Sepez  <tsepez@chromium.org>
3407
3408         Content-security-policy script-src not enforced on workers.
3409         https://bugs.webkit.org/show_bug.cgi?id=73240
3410
3411         Reviewed by Adam Barth.
3412
3413         Add a CSP check in AbstractWorker.cpp as part of resolving URL.
3414         
3415         Test: http/tests/security/contentSecurityPolicy/worker-script-src.html
3416
3417         * workers/AbstractWorker.cpp:
3418         (WebCore::AbstractWorker::resolveURL):
3419
3420 2011-12-02  Daniel Cheng  <dcheng@chromium.org>
3421
3422         [chromium] Add plumbing for supporting custom MIME types in DataTransfer.
3423         https://bugs.webkit.org/show_bug.cgi?id=73594
3424
3425         Reviewed by David Levin.
3426
3427         Tests: editing/pasteboard/clipboard-customData.html
3428                fast/events/drag-customData.html
3429
3430         * platform/chromium/ChromiumDataObject.cpp:
3431         (WebCore::ChromiumDataObject::types):
3432         (WebCore::ChromiumDataObject::getData):
3433         (WebCore::ChromiumDataObject::setData):
3434         * platform/chromium/ChromiumDataObject.h:
3435         (WebCore::ChromiumDataObject::customData):
3436         * platform/chromium/PlatformSupport.h:
3437
3438 2011-12-02  Darin Adler  <darin@apple.com>
3439
3440         [Mac] Form stream data structures still not threadsafe
3441         https://bugs.webkit.org/show_bug.cgi?id=73674
3442
3443         Reviewed by Anders Carlsson.
3444
3445         * platform/network/mac/FormDataStreamMac.mm:
3446         (WebCore::streamFieldsMapMutex): Added. 
3447         (WebCore::associateStreamWithResourceHandle): Use streamFieldsMapMutex.
3448         (WebCore::formCreate): Ditto.
3449         (WebCore::formFinalize): Ditto.
3450         (WebCore::httpBodyFromStream): Ditto.
3451
3452 2011-12-02  Joshua Bell  <jsbell@chromium.org>
3453
3454         IndexedDB: Rename "multientry" to "multiEntry" per spec change
3455         https://bugs.webkit.org/show_bug.cgi?id=73578
3456
3457         Reviewed by Darin Fisher.
3458
3459         * storage/IDBIndex.h:
3460         (WebCore::IDBIndex::multiEntry):
3461         * storage/IDBIndex.idl:
3462         * storage/IDBIndexBackendImpl.cpp:
3463         (WebCore::IDBIndexBackendImpl::IDBIndexBackendImpl):
3464         * storage/IDBIndexBackendImpl.h:
3465         (WebCore::IDBIndexBackendImpl::create):
3466         (WebCore::IDBIndexBackendImpl::multiEntry):
3467         * storage/IDBIndexBackendInterface.h:
3468         * storage/IDBLevelDBBackingStore.cpp:
3469         (WebCore::IDBLevelDBBackingStore::getIndexes):
3470         (WebCore::IDBLevelDBBackingStore::createIndex):
3471         * storage/IDBLevelDBCoding.cpp:
3472         * storage/IDBObjectStore.cpp:
3473         (WebCore::IDBObjectStore::createIndex):
3474         * storage/IDBObjectStoreBackendImpl.cpp:
3475         (WebCore::IDBObjectStoreBackendImpl::putInternal):
3476         (WebCore::IDBObjectStoreBackendImpl::createIndex):
3477         (WebCore::IDBObjectStoreBackendImpl::createIndexInternal):
3478         (WebCore::IDBObjectStoreBackendImpl::loadIndexes):
3479         * storage/IDBObjectStoreBackendImpl.h:
3480         * storage/IDBObjectStoreBackendInterface.h:
3481
3482 2011-12-02  Sheriff Bot  <webkit.review.bot@gmail.com>
3483
3484         Unreviewed, rolling out r101805.
3485         http://trac.webkit.org/changeset/101805
3486         https://bugs.webkit.org/show_bug.cgi?id=73670
3487
3488         Many canvas tests started failing due to the isEmpty change
3489         (Requested by darin on #webkit).
3490
3491         * platform/graphics/cg/PathCG.cpp:
3492         (WebCore::Path::boundingRect):
3493         (WebCore::Path::fastBoundingRect):
3494         (WebCore::Path::isEmpty):
3495
3496 2011-12-01  Darin Adler  <darin@apple.com>
3497
3498         [Mac] Reference count threading violation in FormDataStreamMac.mm
3499         https://bugs.webkit.org/show_bug.cgi?id=73627
3500
3501         Reviewed by Sam Weinig.
3502
3503         Shows up as a crash during existing layout test runs so no new tests are required.
3504
3505         * platform/network/mac/FormDataStreamMac.mm:
3506         (WebCore::streamFieldsMap): Replaced getStreamFormDataMap with this.
3507         Use an NSMapTable instead of a HashMap because we need to remove items from this
3508         on a non-main thread.
3509         (WebCore::associate