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